1 / 41

Krivljenje slike - warping

Krivljenje slike - warping. Princip 2D krivljenja. Demo. Krivljenje ( Warping ). Krivljenje ( warp ) je 2-D geometri jska transformacija in ob uporabi na neki sliki tvori popačeno sliko

Download Presentation

Krivljenje slike - warping

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Krivljenje slike - warping

  2. Princip 2D krivljenja Demo

  3. Krivljenje (Warping) • Krivljenje (warp) je 2-D geometrijska transformacija in ob uporabi na neki sliki tvori popačeno sliko • Dva načina krivljenja slik:- Preslikava naprej (Forward mapping).  preslikava nazaj (Reverse mapping).

  4. Krivljenje (Warping) warp Destination image Source image

  5. Preslikava (mapping)

  6. Primer preslikave

  7. Primer preslikave

  8. Primer preslikave

  9. Primer krivljenja

  10. Druge preslikave

  11. Implementacija krivljenja slike

  12. Preslikava naprej

  13. Preslikava naprej

  14. Preslikava naprej

  15. Problemi preslikave naprej

  16. Problemi preslikave naprej V rezultirajoči sliki lahko pride do lukenj

  17. Problemi preslikave naprej

  18. Preslikava nazaj (backward mapping)

  19. Implementacija krivljenja slike (2)

  20. Preslikava nazaj

  21. Problemi preslikave nazaj

  22. Problemi preslikave nazaj

  23. Forward and Reverse Mapping • Forward  Some pixels in the destination might not get painted, and would have to be interpolated. • Reverse  Every pixel in the destination image gets set to something appropriate.

  24. Ponovno vzorčenje (Resampling) • Evaluate source image at arbitrary (u, v) • (u, v) does not usually have integer coordinates • Some kinds of resampling • Point resampling • Triangle filter • Gaussian filter Source Image Destination Image

  25. Vzorčenje točk (Point Sampling) • Take value at closest pixel int iu = trunc(u + 0.5); int iv = trunc(v + 0.5); dst(x, y) = src(iu, iv); • Simple, but causes aliasing

  26. Trikotni filter • Konvolucija s trikotnim filtrom

  27. Trikotni filter • Bilinearna interpolacija 4 najbližjih pikslov • a = linear interpolation of src(u1, v2) and src(u2, v2) • b = linear interpolation of src(u1, v1) and src(u2, v1) • dst(x, y) = linear interpolation of ‘a’ and ‘b’

  28. Konvolucija z Gaussovim filtrom Width of Gaussian kernel affects bluriness

  29. Primerjava metod filtriranja • Kompromisi • Aliasing nasproti zamegljevanju • Hitrost računanja

  30. Implementacija krivljenja slike

  31. Implementacija krivljenja slike

  32. Primer: skaliranje

  33. Primer: vrtenje

  34. Primer: vrtinec (swirl)

  35. Povzetek krivljenja slik

  36. Preslikava naprej in nazaj • In either case, the problem is to determine the way in which the pixels in one image should be mapped to the pixels in the other image. • So, we need to specify how each pixel moves between the two images. • This could be done by specifying the mapping for a few important pixels.

  37. 2D krivljenje objektov

  38. 2D krivljenje objektov • The shape modification can also be performed on a vertex-basis instead of on a space-basis. • A displacement for a seed vertex can be specified by the user and this displacement can be propagated to nearby vertices. • The displacement can be attenuated as a function of the distance that the vertex to be displaced is away from the seed vertex.

  39. 2D krivljenje objektov • The distance function can be chosen to trade-off quality of results and computational complexity. • Minimum number of edges connecting the vertex to be displaced from the seed vertex. • Minimum distance traveled over the surface of the object to get from the vertex to be displaced to the seed vertex. • Power functions to control the amount of attenuation. • The user could select the maximum distance at which the displacement would have an affect.

  40. Preslikava tekstur

  41. Preslikava tekstur

More Related