22
Ch 5 part2 Geometric Transformation CS446 Instructor: Nada ALZaben

Ch 5 part2 Geometric Transformation

  • Upload
    keola

  • View
    60

  • Download
    3

Embed Size (px)

DESCRIPTION

Ch 5 part2 Geometric Transformation. CS446 Instructor: Nada ALZaben. Transforming Points. Suppose that ( w,z ) and ( x,y ) are two spatial coordinates systems called the input space and output space , respectively - PowerPoint PPT Presentation

Citation preview

Page 1: Ch 5  part2 Geometric Transformation

Ch 5 part2Geometric TransformationCS446 Instructor: Nada ALZaben

Page 2: Ch 5  part2 Geometric Transformation

Transforming PointsSuppose that (w,z) and (x,y) are two spatial

coordinates systems called the input space and output space, respectively

A geometric coordinate transformation can be defined that maps input space to output space points:

(x,y = )T{(w,z))}◦ T{.} is called a forward transformation or forward

mapping If T{.} has an inverse, then the inverse maps

output space points to input space points:(w,z = )T-1{(x,y)}

◦ T-1{.} is called the inverse transformation or inverse mapping

Page 3: Ch 5  part2 Geometric Transformation
Page 4: Ch 5  part2 Geometric Transformation

Affine Transformations An affine transformation is a mapping from one vector

space to another, consisting of:◦ A linear part expressed as matrix multiplication◦ And an additive part, an offset or translation

For two-dimensional space an affine transformation can be written as:

Which can be written as a single matrix multiplication by adding a third coordinate:

◦ Also can be written: [x y 1] = [w z 1] T , where T is the affine matrix

The notational convention of adding a 1 to the [x y] and [w z] vectors results in a homogeneous coordinates

Page 5: Ch 5  part2 Geometric Transformation
Page 6: Ch 5  part2 Geometric Transformation

Affine TransformationImportant affine transformation

include:◦Scaling◦Rotation◦Translation◦Sharing◦Refliction

Page 7: Ch 5  part2 Geometric Transformation
Page 8: Ch 5  part2 Geometric Transformation

Affine TransformationRotation, translation and reflection

belong to an important subset of affine transformation called similarity transformation

Similarity transformation preserves angles between lines and changes all distance in the same ration → preserves shapes◦Scaling is a similarity transformation when

the horizontal and vertical scale factors are the same

Page 9: Ch 5  part2 Geometric Transformation
Page 10: Ch 5  part2 Geometric Transformation

Projective TransformationsAffine transformation is a special case of

projective transformationIn projective transformation, line map to lines

but most parallel lines do not stay parallelIt is useful to define two-dimensional projective

transformation using an auxiliary third dimension:

◦ The auxiliary dimension h is not a constant◦ a13 and a23 are nonzero ◦ and x = x’/h and y = y’/h

Page 11: Ch 5  part2 Geometric Transformation
Page 12: Ch 5  part2 Geometric Transformation

Projective Transformations The figure shows the set of parallel lines transform to

output-space lines that intersect at locations called vanishing points which lines on the horizon line◦ Only parallel lines parallel to the horizon line remain

parallel when transformed◦ All other set of parallel lines transform to lines that

intersect at a vanishing point on the horizon line

Page 13: Ch 5  part2 Geometric Transformation

Applying Geometric Transformations to Imagesg(x,y) = f( T-1{(x,y)} )The procedure for computing the

output pixel at location (xk , yk) is:1. Evaluate (wk , zk) = T-1{(xk , yk)}2. Evaluate f(wk , zk) 3. g(xk , yk) = f(wk , zk)

The procedure is sometimes called inverse mapping

Page 14: Ch 5  part2 Geometric Transformation
Page 15: Ch 5  part2 Geometric Transformation

Image InterpolationWe examine more closely the second step, evaluating

f(wk , zk), where f is the input image and (wk , zk) = T-

1{(xk , yk)}Even if xk and yk are integers, wk and zk usually are notFor digital images the values of f are known only

at integer-valued locationsUsing these known values to evaluate f at non-

integer-valued locations is an example of interpolation – the process of constructing a continuously defined function from discrete data

Nearest-neighbor interpolation: The value of f’(x) is computed as the value of f(y) at the location

y closest to x, if f(y) defined for integer values of y: f’(x) = f(round(x))

Page 16: Ch 5  part2 Geometric Transformation
Page 17: Ch 5  part2 Geometric Transformation

Image InterpolationBilinear interpolation:

The process of interpolating in two dimensions using a sequence of one-dimensional linear interpolations

Bicubic interpolation:The process of interpolating in two

dimensions using a sequence of one-dimensional cubic interpolations

Page 18: Ch 5  part2 Geometric Transformation

Image RegistrationOne of the most important image

processing applications of geometric transformations

Image registration methods seek to align two or more images of the same scene◦e.g. Images taken at different times such

as satellite images to detect environment changes, or images taken at the same time but with different instruments

Page 19: Ch 5  part2 Geometric Transformation

Image Registration ProcessImage registration methods consist

of the following basic steps:1. Detect features2. Match corresponding features3. Infer geometric transformation4. Use the geometric transformation to

align one image with the other◦An image feature: is any portion of an

image that can potentially be identified and located in both images (e.g. points, lines, corners)

Page 20: Ch 5  part2 Geometric Transformation

Image Registration ProcessImage registration methods can be

manual or automatic depending on whether feature detection and matching is human-assisted or performed using an automatic algorithm

Image transformation can be:◦Global transformation: transformation

function is the same everywhere in the image Affine transformation, projective transformation

and polynomial transformation ◦Local transformation: a transformation

function with locally varying parameters

Page 21: Ch 5  part2 Geometric Transformation
Page 22: Ch 5  part2 Geometric Transformation

ResourceR.C. Gonzalez and R.E. Woods,

Digital Image Processing Using MATLAB, 2rd Edition, Mc Graw Hill