Professional Documents
Culture Documents
Previously, image enhancement techniques were discussed that make use of the gray value at a single pixel. In general, filtering methods typically use a function defined over a neighborhood of points that surround a given pixel.
Image Enhancement
Image Filtering
Point Operators
Typically modify the gray value of a pixel using a function of the information contained at that pixel Examples?
Filter Operators
Typically modify the gray value of a pixel using a function of the information in a local neighborhood around the pixel smoothing edge detection nonlinear operators geometric warping and correction thresholding
Image Enhancement
Filtering: Definitions
An informal definition
Filtering is the process of replacing a pixel with a value based on some function of spatially proximate data.
Image Enhancement
Let g(x,y) =
g (x,y)
i
i=1
Then, E[g(x,y)] = f(x,y) Variance in g : 2g = 1/M* Problems? 1) Assumptions about noise model may not hold. 2) Image Registration is required
4
Image Enhancement
Image Subtraction In(x,y) = g(x,y) - h(x,y) Image Addition In(x,y) = g(x,y) + h(x,y) Image Division In(x,y) = g(x,y)/h(x,y)
Image Enhancement
Image Smoothing
Averaging pixel values in a local neighborhood tends to suppress high-frequency events. 255
255
0
6
Image Enhancement
In practice, the weights or values of the Kernel are pointwise multiplied with the image and then added together Resulting sum is divided (normalized) by the sum of the weights of the Kernel. Final result is the convolution value at the pixel centered on the Kernel.
Image Enhancement
Mask: M
104 103 94 99
1 1 1 1 1 1 1 1 1
-1 0 1 1 1
100 99 91 94 87
S=
M(k,m)1
101 98
k=-1 m= -1
If(i,j) =
k=-1 m= -1
(i+k,j+m) *M(k,m)1
If = IM
8
Image Enhancement
21
1/9 = 21
1 1 1
1 1 1
1 1 1
51 21 14
9 19
9 19 22 27
Kernel is aligned with pixel in image, multiplicative sum is computed, normalized, and stored in result image. Process is repeated across image range. What happens when Kernel is near edge of input image?
Image Enhancement
Convolution
Convolution of two functions g and f
g(x) f() = f() g(x - ) where is known as the dummy variable of integration. Results in computing the area beneath the curve produced by all offsets of g with respect to f
Example: f(x) 1 g() .5 1 1
-1
-.5 0 fg
-1
-1
1.5
-1
10
Image Enhancement
Observation: Convolution is a spatial operation on the image Images can be converted to their frequency component prior to filtering to facilitate direct manipulation of image frequency characteristics. We will discuss techniques to accomplish this next lecture.
11
Image Enhancement
Original
12
Image Enhancement
Example:
Multiple Filter Processing
Gaussian Blur
Threshold
13