This preview shows pages 1–19. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Image Filtering, Warping and Sampling Jason Lawrence CS 4810: Graphics Acknowledgement: slides by Misha Kazhdan, Allison Klein, Tom Funkhouser, Adam Finkelstein and David Dobkin Outline Image Processing Image Warping Image Sampling Image Processing What about the case when the modifcation that we would like to make to a pixel depends on the pixels around it? o Blurring o Edge Detection o Etc. MultiPixel Operations In the simplest case, we defne a mask oF weights which tells us how the values at adjacent pixels should be combined to generate the new value. Blurring To blur across pixels, defne a mask: o Whose value is largest at the center pixel o Whose entries sum to one. Original Blur Filter = Blurring Original Filter = Pixel(x,y): red = 36 green = 36 blue = 0 Blurring Original Filter = Pixel(x,y): red = 36 green = 36 blue = 0 Pixel(x,y).red and its red neighbors X  1 X X + 1 Y  1 36 109 146 Y 32 36 109 Y + 1 32 36 73 Blurring Original Filter = Pixel(x,y).red and its red neighbors X  1 X X + 1 Y  1 36 109 146 Y 32 36 109 Y + 1 32 36 73 New value for Pixel(x,y).red = (36 * 1/16) + (109 * 2/16) + (146 * 1/16) (32 * 2/16) + (36 * 4/16) + (109 * 2/16) (32 * 1/16) + (36 * 2/16) + (73 * 1/16) Blurring Original Filter = Pixel(x,y).red and its red neighbors X  1 X X + 1 Y  1 36 109 146 Y 32 36 109 Y + 1 32 36 73 New value for Pixel(x,y).red = 62.69 Blurring Original New value for Pixel(x,y).red = 63 Blur Repeat for each pixel and each color channel Note 1 : Keep source and destination separate to avoid drift. Note 2 : For boundary pixels, not all neighbors are used, and you need to normalize the mask so that the sum of the values is correct. Blurring In general, the mask can have arbitrary size: o We can express a smaller mask as a bigger one by padding with zeros. Blurring Original Blur In general, the mask can have arbitrary size: o We can have more nonzero entries to give rise to a wider blur. Blurring Original Narrow Blur Wide Blur A general way for deFning the entries of an n x n mask is to use the values of a Gaussian: o equals the mask radius ( n/2 for an n x n mask) o x is i s horizontal distance from center pixel o y is j s vertical distance from center pixel o Don t forget to normalize! Blurring Gaussian Mask[i][j] = Edge Detection To fnd the edges in an image, defne a mask: o Whose value is largest at the center pixel o Whose entries sum to zero. Edge pixels are those whose value is larger (on average) than those oF its neighbors. Original Detected Edges Filter = Edge Detection Original Pixel(x,y): red = 36 green = 36 blue = 0 Filter = Edge Detection Original Pixel(x,y): red = 36 green = 36 blue = 0 Pixel(x,y).red and its red neighbors X  1 X X + 1 Y  1 36 109 146 Y 32 36 109 Y + 1 32 36 73 Filter = Edge Detection Original Pixel(x,y).red and its red neighbors X  1 X X + 1 Y  1 36 109 146 Y 32 36 109 Y + 1 32 36 73 New value for Pixel(x,y).red = (36 * 1) + (109 * 1) + (146 * 1) (32 * 1) + (36 * 8) + (109 * 1) (32 * 1) + (36 * 1) + (73 * 1) Filter = Edge Detection...
View
Full
Document
 Spring '10
 LAWRENCE
 Image processing, Computer Graphics

Click to edit the document details