100 likes | 254 Views
14. Warping. Image warping a kind of image processing that causes pixels to change their locations (geometric processing) a mapping function describes the relationship between the coordinates in a source and target image Homogeneous transform includes translation scaling rotation shear.
E N D
14. Warping • Image warping • a kind of image processing that causes pixels to change their locations (geometric processing) • a mapping function • describes the relationship between the coordinates in a source and target image • Homogeneous transform • includes • translation • scaling • rotation • shear
14.1 Translation (이동) • Translation matrix T | 1 0 Tx | | 0 1 Ty | | 0 0 1 |
14.2 Scaling (크기) • Scaling matrix S | Sx 0 0 | | 0 Sy 0 | | 0 0 1 |
14.3 Rotation (회전) • Rotation matrix R | cos -sin 0 | | sin cos 0 | | 0 0 1 |
14.4 Shear • Shear matrix Sh | 1 shx 0 | | shy 1 0 | | 0 0 1 |
적용 예 • 다각형 (polygon) 예 P2=(1,3) P1=(2,1) P0=(1,1)
14.6 Applying the transforms to an image • Applying 3*3 transform matrix to every pixel in the image • Forward mapping • pixel p에 transform matrix 적용하여 p’ 구함 (p’=T p) • p’의 실수 좌표를 정수로 rounding • target image에 hole (dark pixel) 발생하는 문제 source image target image
14.6 Applying the transforms to an image • Inverse mapping (destination scanning) • destination (target) image pixel (p’)에 대해 source image pixel (p)구함 • p = T-1 p’ • target image에 hole (dark pixel) 발생하는 문제 없음 source image target image
14.6 Applying the transforms to an image • 적용 예 • Rotation: Figure 14-6 • Scaling: Figure 14-7 • Shear: Figure 14-8 & 14-9
14.9 Effects • fishEye • Plate 14-2 • polar transform • Plate 14-3 • Square root transform • Plate 14-4 • Conformal mapping • Plate 14-6