Spatial Image Enhancement March 10, 2000 Spatial Image Enhancement FR 4262
23. Image Enhancement March 10, 2000 Spatial Enhancement Area operation --- depends on the values of surrounding “neighborhood” pixels, as well as the pixel being processed. Deals with “spatial frequency” the difference between the highest and lowest values of a contiguous set of pixels; or the number of changes in brightness values per unit distance for any particular part of an image. Spatial frequency Zero Low High FR 4262
Convolution Filtering 23. Image Enhancement March 10, 2000 Convolution Filtering Process of averaging small sets of pixels across an image to change the spatial frequency characteristics of the image. FR 4262
23. Image Enhancement General procedure March 10, 2000 Establish a “moving window” (the kernel) with an odd number of rows and columns Move the kernel through the image and replace the central pixel value with a newly computed value FR 4262
Kinds of Filters (Kernels) 23. Image Enhancement March 10, 2000 Kinds of Filters (Kernels) Low Pass Filters reduce texture by suppressing high spatial frequencies; creates a smoothing effect High Pass Filters increase image texture by passing the high frequencies; enhances edges 1 1 1 - 1 - 1 -1 -1 16 -1 -1 -1 -1 FR 4262
Example of High Pass Convolution Filtering 23. Image Enhancement March 10, 2000 Example of High Pass Convolution Filtering Consider a 5 x 5 block of pixels in an image and a 3 x 3 kernel applied to pixel 3, 3 2 8 6 6 6 2 8 6 6 6 2 2 8 6 6 2 2 2 8 6 2 2 2 2 8 -1 -1 -1 -1 16 -1 FR 4262
The output value for pixel 3, 3 is 23. Image Enhancement March 10, 2000 The output value for pixel 3, 3 is (-1 * 8) + (-1 * 6) + (-1 * 6) + (-1 * 2) + (16 * 8) + (-1 * 6) + (-1 * 2) + (-1 * 2) + (-1 * 8) (-1 + -1 + -1 + -1 +16 + -1 + -1 + -1 + -1) = (128 - 40) / (16 - 8) = 88 / 8 = 11 FR 4262
23. Image Enhancement March 10, 2000 When the 3 x 3 set of pixels in the center of the image is convolved, the output values are: The lower values decrease and the higher values increase, increasing the spatial frequency of the image and accentuating edges. 2 8 6 6 6 2 11 5 5 6 2 0 11 6 6 2 1 0 11 6 2 2 2 2 8 FR 4262
Image with no enhancement 23. Image Enhancement Image with no enhancement March 10, 2000 FR 4262
Edge Sharpening with high pass filter 23. Image Enhancement Edge Sharpening with high pass filter March 10, 2000 FR 4262
Smoothing with low pass filter 23. Image Enhancement Smoothing with low pass filter March 10, 2000 FR 4262
Contrast Stretch and Edge Enhancement 23. Image Enhancement March 10, 2000 Contrast Stretch and Edge Enhancement FR 4262