Graphics III Image Processing II.

download Graphics III Image Processing II.

If you can't read please download the document

description

Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia Technology course of University of Louisiana at Lafayette. I’d like to thank Assoc. Prof. Dr. William Bares who create such a good work on these lecture notes.

Transcript of Graphics III Image Processing II.

Graphics III Image Processing II Acknowledgement Most of this lecture note has been taken from the lecture note on Multimedia Technology course of University of Louisiana at Lafayette. Id like to thank Assoc. Prof. Dr. William Bares who create such a good work on these lecture notes. Image Processing Applications
Improve contrast, sharpen, remove noise, detect edges of features Detect motion in consecutive frames for motion detection in security systems Retouch scanned photographs Creative effects: warping, emboss, compositing Contrast and Dynamic Range
Contrast: distinction between light and dark shades Dynamic Range: span from minimum to maximum color intensity values Using histograms to analyze contrast and dynamic range Histogram Graph of the number of pixels in an image having each possible pixel value Example, assume monochrome images 8-bit per pixel and allocate a histogram array of 256 integer values all initially zero. Loop over all image pixels p c = Monochrome intensity value of pixel p Histogram[c] = Histogram[c] + 1 Grayscale image and its histogram Histograms for RGB color images
For RGB color images, a separate histogram is generated for red, green, and blue components The horizontal axis is labeled with the RGB pixel values , and the vertical axis measures the number of pixels having a given pixel value RGB histogram for a color image Contrast Enhancement Improve the contrast and dynamic range of a dull and washed out image Low contrast grayscale image and its histogram Contrast Enhancement Process
Step 2: Scale histogram to expand dynamic range Scale highest intensity H into a value equal to or close to 255 Scale = 255 / H Loop over all pixels (x,y) ResultPixel2(x,y) = Scale * ResultPixel1(x,y) Step 1: Shift histogram Shift histogram so more pixels have values near zero. Loop over all pixels (x,y) ResultPixel1(x,y) = InputPixel(x,y) L Image Processing Filters
Convolve pixels of input image using an HxV filter kernel Changing the filter kernel produces a variety of effects such as low pass filter (blur), emboss, edge detect Filter kernel applied to 3x3 block of pixels
For example, the 3x3 filter kernel is to be applied at a pixel (x,y) of an image. The following convolution step is applied for each pixel of an image. Loop over all pixels (x,y) ResultPisel(x,y) = K(1) * P(x-1,y+1)+ K(2) * P(x,y+1) + K(3) * P(x+1,y+1) + K(4) * P(x-1,y) K(5) * P(x,y) K(6) * P(x+1,y) + K(7) * P(x-1,y-1) + K(8) * P(x,y-1) K(9) * P(x+1,y-1) Clamp ResultPixel(x,y) to range Image Processing Filter ()
Note: Assign pixel values of zero when the filter extends past the edge of the image. RGB color images: Each pixel is represented by 3 values (r,g,b), where 0