3-Image

3-Image - Image Filtering, Warping and Sampling Jason...

Info iconThis preview shows pages 1–19. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the 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. Multi-Pixel 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 non-zero 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

Page1 / 141

3-Image - Image Filtering, Warping and Sampling Jason...

This preview shows document pages 1 - 19. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online