190 likes | 209 Views
Arithmetic and Geometric Transformations. CS474/674 – Prof. Bebis Sections 2.4, 2.5. Addition. Useful for combining information between two images:. 0 <= α <= 1. Averaging. Image quality can be improved by averaging several images together (e.g., very useful in astronomy). 10. 5.
E N D
Arithmetic and Geometric Transformations CS474/674 – Prof. Bebis Sections 2.4, 2.5
Addition • Useful for combining information between two images: 0 <= α <= 1
Averaging • Image quality can be improved by averaging several images together (e.g., very useful in astronomy). 10 5 Note: images must be registered! 20 100 50
Subtraction • Useful for “change” detection.
Geometric Transformations • Transformation applied on the coordinates of the pixels (i.e., relocate pixels). • A geometric transformation has the general form (x,y) = T{(v,w)} where (v,w) are the original pixel coordinates and (x,y) are the transformed pixel coordinates.
Geometric Transformations scaling transformation y=v sinθ + w cosθ affine transformation
Forward mapping • Transformed pixel coordinates might not lie within the bounds of the image and can be non-integers. • As a result, certain locations in the transformed image might not have a corresponding pixel in the input image. No one-to-one correspondence!
Forward mapping (cont’) • Example: formation of holes due to image rotation (implemented using the forward transformation).
Inverse Mapping • To guarantee that a value is generated for every pixel in the output image, we must consider each output pixel in turn and use the inversemapping to determine the position in the input image. • To assign intensity values to these locations, we need to use some form of intensity interpolation.
Zero-order interpolation • Take the nearest-neighbor.
First-order interpolation • Take the averageof the four closest neighbors.
Bilinear interpolation • Fit a bilinear function using the four closest neighbors: • Take the value of I(x,y) at the inverse-mapped location. I(x,y) = ax + by + cxy + d The coefficients (a,b,c,d) of the bilinear function can be determined by solving a system of 4 equations in 4 unknowns (formed by the 4 nearest neighbors).
Bilinear interpolation (cont’d) http://en.wikipedia.org/wiki/Bilinear_interpolation
Bicubic interpolation • Fit a bicubic function using the 16 closest neighbors (4 x 4 window): • Take the value of I(x,y) at the inverse-mapped location. The coefficients aij of the bicubic function can be determined by solving a system of 16 equations in 16 unknowns (formed by the 16 nearest neighbors).
Examples: Interpolation original bicubic bilinear nearest neighbor
Image Registration • Goal: register two or more images of the same scene. • How: estimate a transformation that aligns the images.
Image Registration (cont’d) • Under certain assumptions, an affine transformation can be used to align the images. • There are 6 unknowns (i.e., t11, t12, t21, t22, t31, t32) • We need at least 6 equations.
Image Registration (cont’d) Three correspondences are enough, more are better
First Quiz • When: next Monday (Sept 23rd) • What: PGM Image File Format, Introduction to Image Processing, Intensity Transformations, Arithmetic and Geometric Transformations • Duration: ~ 10 minutes