57
Digital Image Processing, 3rd ed. Digital Image Processing, 3rd ed. www.ImageProcessingPlace.com Gonzalez & Woods Chapter 2 Digital Image Fundamentals Chapter 2 Digital Image Fundamentals The Cornea is a tough, transparent tissue that covers the anterior surface of the eye. The Sclera is an opaque membrane that encloses the remainder of the optic globe The Choroid contrarians the blood vessels, The Choroid contrarians the blood vessels, which are the major source of nutrition to the eye. The lens is made up of concentric layer of fibers cells and is supported by fibers that attach to the ciliary body. The Retina lines the inside of the wall’s entire posterior portion. Its surface include two classes of light receptors: cones and rods. The cones lies on the fovea and highly sensitive to color (6-7 million in each eye). The rods (75-150 million), which are distributed over the retinal surface and serves to give general © 1992–2008 R. C. Gonzalez & R. E. Woods overall picture of the field of view and are sensitive to low level illumination.

Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

  • Upload
    others

  • View
    23

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

The Cornea is a tough, transparent tissue g , pthat covers the anterior surface of the eye.The Sclera is an opaque membrane that encloses the remainder of the optic globeThe Choroid contrarians the blood vessels,The Choroid contrarians the blood vessels,which are the major source of nutrition tothe eye.The lens is made up of concentric layer of fibers cells and is supported by fibers that pp yattach to the ciliary body.The Retina lines the inside of the wall’s entire posterior portion. Its surface includetwo classes of light receptors: cones and rods.The cones lies on the fovea and highly sensitive to color (6-7 million in each eye).The rods (75-150 million), which are distributed over the retinal surface and serves to give general

© 1992–2008 R. C. Gonzalez & R. E. Woods

overall picture of the field of view and are sensitive to low level illumination.

Page 2: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 3: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 4: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

The human eye can adapt to enormous range of light intensity levels – on the order of 1010 . The subjectivebrightness (the intensity perceived by the eye) of the eye is a logarithmic function.Ph t i i i i th i i f th d ll litPhotopic vision is the vision of the eye under well-lit conditions. In humans and many other animals, photopic vision allows color perception, mediated by cone cells.Scotopic vision is the vision of the eye under low light conditions

© 1992–2008 R. C. Gonzalez & R. E. Woods

conditions.

Page 5: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 6: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 7: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 8: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 9: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 10: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 11: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 12: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 13: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 14: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 15: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 16: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 17: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 18: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 19: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 20: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 21: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 22: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 23: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 24: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 25: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 26: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 27: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Simple Image Operationp g pWe assume the image pixels as elements of a set and use the set operation to manipulate images

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 28: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Simple Image OperationNegating a binary image is done simply by exchanging the white pixels “1” by back pixels “0” and vise versa. For gray scale images this is done by subtracting 255 from the intensity of each pixel; i.e., Ci=255- Ci

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 29: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Logical Operations on Imagesg p gWe assume binary values for pixels of the image (B/W) and treat the image as a binary buffer.

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 30: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 31: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Image Operationg pMost of image operation take into account the adjacent pixels when computing the resulting values (for pixels).Example: The value of a pixel, in the resulting image, is taken as the average of of its adjacent neighbors.

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 32: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Geometric Spatial TransformationpThese operations modify the spatial relationship between pixels in an image.In digital images Geometric Transformations involvesinvolves1. Spatial Transformation of coordinates.2. Intensity interpolations.The geometric coordinate could be expressed as (xp, yp) = T{(up, vp) }, where(up, up) are the coordinate of the pixel p before applying the transformation T and (xp, yp) are thecoordinate of the pi el p before appl ing Tcoordinate of the pixel p before applying TIt is often written as vector operations

Tvuyx pppp ],[),(

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 33: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

TranslationTranslationAlter the position of apoint or an object in 2D space.p j p

)( vu

),( dyvdxu ),(),(),( , dyvdxuvuTyx dydx

),( vu

11001

),( vu

dydx

yx

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 34: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

R t tiRotation• Rotate a pixel P(x, y) around

the origin by an angle α.Th lt i l iti i• The results pixel position is P’(x’,y’)

)sin()cos( vux

),( vu

α))cos()sin(),sin()cos((),(

)cos()sin(

vuvuvuRvuy

),( yx

)i ()(

vu

yx

)cos()sin()sin()cos(

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 35: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Rotation around the center of the image by 250

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 36: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Image Scale• Scale a region of pixels by a

factor• Each pixel in this region P(u v) is

Image Scale),( yx

),( yx ss• Each pixel in this region P(u, v) is

“scaled” to a new position is P’(x,y)

)(sux

The scale of include additional translation when no point of the

),( vu

y

x

suysux

)()( svsuyx translation when no point of the scaled region is in the origin

uS

Sx x

00

),(),( yx svsuyx

© 1992–2008 R. C. Gonzalez & R. E. Woods

vSy y0

Page 37: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

S2 2S2,2

S2,1

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 38: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

I ShImage Sheer• Scale a region of pixels by a factor

(Shx,Shy).• Each pixel in this region P(u v) is

(x’, y’)

• Each pixel in this region P(u, v) is “Sheered” to a new position is P’(x, y)

(x y) (x, y)

hy

hx

suvysvux

)()( ),(),( hyhx suvsvuyx

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 39: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Horizontal SheerHorizontal Sheer

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 40: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

H C di tHomogenous Coordinates

Let us consider applying several transformation T0, T1,…, Tk on the same image.

This requires k matrix multiplication for each pixel}}...}}{{...{{ 011

v

uTTTT kk

uu

If we can perform the following, where T= T0 T1… Tk , we are required to perform one time k matrix multiplication and one matrix multiplication for each vertex

v

uT

vu

TTTT kk 011...

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 41: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Example:Let us consider the following transformation

u

u

vu

TSRTS

20107)30sin()30cos(50101

4,25,7303,52,1

v41050)30cos()30sin(31020

It is impossible to multiply these matrices. p p y

To overcome this limitation we use a homogeneous coordinate (x, y, w), where w =1. This also update all the spatial transformation to 3×3 matrices.

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 42: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 43: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 44: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 45: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Spatial Transformationp

• Scaling an image by mapping each pixel to a target.

• In the resulting image• In the resulting image– The number of pixels

increasesS i l “ t ”– Some pixels are “empty”

– How to determine their values?

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 46: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

After Scaling

Original

After Scaling

A better Result

Original Image

After Scaling withNearest Pixel

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 47: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Spatial Transformation - Forward Scanningp g

Scale +

In this approach missing pixel are clearly visible. To fill the missing pixel,

ld li tRotate one could replicate pixels. However, the quality of the resultingis image

Mapping the image of the square pixel covers all thesquare pixel covers all the pixels in the target image.The value of a pixel is determined by the mapped squares that cover it

© 1992–2008 R. C. Gonzalez & R. E. Woods

squares that cover it.

Page 48: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Spatial Transformation - Backward ScanningIn this approach we fill the target image pixel by pixel. For each pixel we compute it source position. The value of the target pixel is computed by interpolating the pixels around the source position.

Spatial Transformation Backward Scanning

p

T-1

This approach does not need to take into account the type of transformationInverse

Transformation

the type of transformation to determine the adjacent pixels of the source position

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 49: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Interpolation

• According to WikipediaIn the mathematical subfield of numerical analysis interpolation is aIn the mathematical subfield of numerical analysis, interpolation is a method of constructing new data points within the range of a discrete set of known data points.

• In Image Processing• In Image ProcessingIt is a techniques to assign values to pixels in an images based on their adjacent pixels, or adjacent samples that my not be correlate with pixel location in the image

© 1992–2008 R. C. Gonzalez & R. E. Woods

location in the image.

Page 50: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Value InterpolationValue Interpolation

• Let us assume we have several f0 f f

f3

samples of a function f– f0, f1, f2,…,fn

N t (Z O d )

0 f1 f

2

3fk

f0

f3• Nearest (Zero Order)

f0 f

1 f2

3fk

f f• Bilinear (First Order)

f0 f

1 f2

f3

fk

f f

© 1992–2008 R. C. Gonzalez & R. E. Woods

• Bicubic (Third Order) f0 f

1 f2

f3

fk

Page 51: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Bili I t l ti

Length = 1t1D

bai tCCtC )1(

Bilinear Interpolation

Ca Cb

tCi

bai )(

2D Length = 12DCtl Ctr

wCt

ngth

= 1

trtlt

wCCwCwCCwC

)1()1(

Len

tbwh

brblb

hCChCwCCwC

)1()1(

h Cwh

© 1992–2008 R. C. Gonzalez & R. E. Woods

Cbl CbrCb

Page 52: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Q d i d C bi I t l tiQuadric and Cubic Interpolation

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 53: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Q d i d C bi I t l ti

The value of the sample position f(x+dx, y+dy) is determined based

Quadric and Cubic Interpolation

)()(),(),(2

1

2

1jdyCidxCjyixfdyydxxf aa

i j

( y y)on the following equation.

||202||1,4||8||5||1||0,1||)3(||)2(

)( 23

23

1 1

xxaxaxaxaxxaxa

xCa

i j

||2,0 x

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 54: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

1D Quadric InterpolationXi-1 X Xi

f3

fGeneral Quadric Equation

1D Quadric Interpolation

iXi+1

fkcbxaxy 2

Using the three points to determine the equation parameters

p

cbxaxy

cbxaxy

iii

iii

211

21

q p

After determining the parameters of the quadric function, we plug in xp to

cbxaxy iii

ii

112

1

determine its value, yp

Similarly we can derive the 1D cubic interpolation of a point xp But we need

© 1992–2008 R. C. Gonzalez & R. E. Woods

Similarly we can derive the 1D cubic interpolation of a point xp, But we need four points.

Page 55: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

(x,y)yx yCxCyxf )(*)(),(

2D Cubic Interpolation

yyyyy

xxxxx

dycybyayC

dxcxbxaxC

23

23

)(

)(

3,12,11,10,1

3,02,01,00,0

aaaaaaaa

dbcbbbabdacabaaa

yxyxyxyx

yxyxyxyx

1,31,31,30,3

3,22,21,20,2

,,,,

aaaaaaaa

ddcdbdaddcccbcac

yxyxyxyx

yxyxyxyx

yyyy

© 1992–2008 R. C. Gonzalez & R. E. Woods

We need to determine the value of the 16 parameters to compute the value of (xp,xp) But we need four points.

Page 56: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Approximating Cubic InterpolationApproximating Cubic Interpolation

© 1992–2008 R. C. Gonzalez & R. E. Woods

Page 57: Chapter 2 Digital Image Fundamentals - BGUChapter 2 Digital Image Fundamentals The human eye can adapt to enormous range of light intensity levels – on the order of 10 10. The subjective

Digital Image Processing, 3rd ed.Digital Image Processing, 3rd ed.

www.ImageProcessingPlace.com

Gonzalez & Woods

Chapter 2Digital Image Fundamentals

Chapter 2Digital Image Fundamentals

Visual Examples

BiLinear

Visual Examples

Original Imageg g

BiCubicNearest

BiCubic

© 1992–2008 R. C. Gonzalez & R. E. Woods