lecture #4 - case western reserve...
TRANSCRIPT
![Page 1: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/1.jpg)
EECS490: Digital Image Processing
Lecture #4
• Image Warping
• Spatial & gray level interpolation
• Intensity transformations
![Page 2: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/2.jpg)
EECS490: Digital Image Processing
Geometric Transformations
x y 1[ ] = v w 1[ ]T = v w 1[ ]
t11 t12 0
t21 t22 0
t31 t32 1
© 2002 R. C. Gonzalez & R. E. Woods
![Page 3: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/3.jpg)
EECS490: Digital Image Processing
and motion blurRotation
1999-2007 by Richard Alan Peters II
![Page 4: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/4.jpg)
EECS490: Digital Image Processing
Image Registration
© 2002 R. C. Gonzalez & R. E. Woods
![Page 5: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/5.jpg)
EECS490: Digital Image Processing
Image Warping
1999-2007 by Richard Alan Peters II
![Page 6: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/6.jpg)
EECS490: Digital Image Processing
Geometric Transformations (Warping)
![Page 7: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/7.jpg)
EECS490: Digital Image Processing
Spatial Warping
![Page 8: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/8.jpg)
EECS490: Digital Image Processing
Polynomial Spatial Warp
• Represent the coordinate transformations as polynomials in x
and y
• Using corresponding point pairs write the coordinate
transformations as systems of linear equations and put them in
matrix form
• solve for the unknown coefficients
G(x, y) = F(x ', y ') = F(ax + by + cxy + d,ex + fy + gxy + h)
x1 ' = ax1 + by1 + cx1y1 + d
x2 ' = ax2 + by2 + cx2y2 + d
x3 ' = ax3 + by3 + cx3y3 + d
x4 ' = ax4 + by4 + cx4y4 + d
x1 '
x2 '
x3 '
x4 '
=
x1 y1 x1y1 1
x2 y2 x2y2 1
x3 y3 x3y3 1
x4 y4 x4y4 1
a
b
c
d
a
b
c
d
![Page 9: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/9.jpg)
EECS490: Digital Image Processing
Simple Rotation Example
original pixel
rotated pixel
original image transformed image
nearestneighbor
Forward mapping with nearest neighborassignment of intensity value
![Page 10: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/10.jpg)
EECS490: Digital Image Processing
© 2002 R. C. Gonzalez & R. E. Woods
![Page 11: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/11.jpg)
EECS490: Digital Image Processing
Gray Level Interpolationforward mapping
f(x,y)
f(x',y')
1. Can result in pixels mapping to pixels outside the image
2. Complex transforms can map several input pixels to thesame output pixel
3. Does not guarantee that all output pixels will have a value
![Page 12: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/12.jpg)
EECS490: Digital Image Processing
Gray Level Interpolationbackward mapping (pixel filling)
f(x,y) f(x',y')
1. for EACH output pixel (x’,y’) determine corresponding location(x,y) in input image
2. Use gray level interpolation* for pixels surrounding (x,y) toassign a pixel value f(x’,y’) to selected output pixel
3. Guarantees that all pixels in output image will have a value
*can be nearest neighbor, bilinear, etc.
![Page 13: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/13.jpg)
EECS490: Digital Image Processing
Gray Level Interpolation
Nearest Neighbor
Assigns output f(x’,y’) the value of the
closest pixel
Can produce artifacts when input f(x,y)
changes rapidly
![Page 14: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/14.jpg)
EECS490: Digital Image Processing
Gray level interpolationbilinear
![Page 15: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/15.jpg)
EECS490: Digital Image Processing
Bilinear Intensity Interpolation
• Linearly interpolate along y=0
• Linearly interpolate along y=1
• Interpolate along x
• Combine equationsf x, y( ) = f 1,0( ) f 0,0( ) x + f 0,1( ) f 0,0( ) y + f 1,1( ) + f 0,0( ) f 0,1( ) f 1,0( ) xy + f 0,0( )
f x,0( ) = f 0,0( ) + x f 1,0( ) f 0,0( )
f x,1( ) = f 0,1( ) + x f 1,1( ) f 1,0( )
f x, y( ) = f x,0( ) + y f x,1( ) f x,0( )
![Page 16: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/16.jpg)
EECS490: Digital Image Processing
Results of interpolation methods
© 2002 R. C. Gonzalez & R. E. Woods
![Page 17: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/17.jpg)
EECS490: Digital Image Processing
Interpolation can be applied tovectors
© 2002 R. C. Gonzalez & R. E. Woods
![Page 18: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/18.jpg)
EECS490: Digital Image Processing
• In a digital image, point = pixel.
• Point processing transforms a
pixel’s value as a function of its
value alone;
• pixel’s value does not depend on
the values of the pixel’s
neighbors.
Point Processing of Images
1999-2007 by Richard Alan Peters II
![Page 19: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/19.jpg)
EECS490: Digital Image Processing
• Brightness and contrast adjustment
• Gamma correction
• Histogram equalization
• Histogram matching
• Color correction.
Point Processing of Images
1999-2007 by Richard Alan Peters II
![Page 20: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/20.jpg)
EECS490: Digital Image Processing
Image Contrast
© 2002 R. C. Gonzalez & R. E. Woods
![Page 21: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/21.jpg)
EECS490: Digital Image Processing
Negative Transformation
© 2002 R. C. Gonzalez & R. E. Woods
![Page 22: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/22.jpg)
EECS490: Digital Image Processing
Negative Transformation
© 2002 R. C. Gonzalez & R. E. Woods
![Page 23: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/23.jpg)
EECS490: Digital Image Processing
More Intensity Transformations
© 2002 R. C. Gonzalez & R. E. Woods
![Page 24: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/24.jpg)
EECS490: Digital Image Processing
s = c log 1+ r( )
Log Transformation
© 2002 R. C. Gonzalez & R. E. Woods
![Page 25: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/25.jpg)
EECS490: Digital Image Processing
Log Transformation
© 2002 R. C. Gonzalez & R. E. Woods
![Page 26: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/26.jpg)
EECS490: Digital Image Processing
s = cr
Gamma Transformation
© 2002 R. C. Gonzalez & R. E. Woods
![Page 27: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/27.jpg)
EECS490: Digital Image Processing
Gamma Transformation
input intensity
input intensity
input intensity
input intensity
© 2002 R. C. Gonzalez & R. E. Woods
![Page 28: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/28.jpg)
EECS490: Digital Image Processing
Gamma Transformation
input intensity
dark bright
© 2002 R. C. Gonzalez & R. E. Woods
![Page 29: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/29.jpg)
EECS490: Digital Image Processing
Gamma Transformation
input intensity
dark bright
© 2002 R. C. Gonzalez & R. E. Woods
![Page 30: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/30.jpg)
EECS490: Digital Image Processing
Piece-wise Linear Transformations
© 2002 R. C. Gonzalez & R. E. Woods
![Page 31: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/31.jpg)
EECS490: Digital Image Processing
Piece-wise Linear Transformations
© 2002 R. C. Gonzalez & R. E. Woods
![Page 32: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/32.jpg)
EECS490: Digital Image Processing
Piece-wise Linear Transformations
input intensity
dark bright
input intensity
dark bright
© 2002 R. C. Gonzalez & R. E. Woods
![Page 33: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/33.jpg)
EECS490: Digital Image Processing
Piece-wise Linear Transformations
© 2002 R. C. Gonzalez & R. E. Woods
![Page 34: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/34.jpg)
EECS490: Digital Image Processing
© 2002 R. C. Gonzalez & R. E. Woods
![Page 35: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/35.jpg)
EECS490: Digital Image Processing
© 2002 R. C. Gonzalez & R. E. Woods
![Page 36: Lecture #4 - Case Western Reserve Universityengr.case.edu/merat_francis/eecs490f07/Lectures/Lecture4.pdf · EECS490: Digital Image Processing Lecture #4 • Image Warping • Spatial](https://reader035.vdocuments.us/reader035/viewer/2022062506/5f01d1a77e708231d401311a/html5/thumbnails/36.jpg)
EECS490: Digital Image Processing
Brightness & Contrast
© 2002 R. C. Gonzalez & R. E. Woods