Variable Thresholding Using Moving Averages
Variable Thresholding Using Moving Averages
Rahul Katoor
4MT17EC076
Thresholding
In digital image processing, thresholding is the simplest method of segmenting images. From a grayscale
image, thresholding can be used to create binary images
Definition
The simplest thresholding methods replace each pixel in an image with a black pixel if the intensity I(i,j)
image intensity is less than some fixed constant T that is I(i,j < T) or a white pixel if the image intensity is
greater than that constant.
The images here, after applying thresholding the dark tree becoming completely black, and the white
snow becoming completely white.
Using moving Averages
This is special case of local thresholding method that is based on computing a moving average along scan
lines of an image. This implementation is very useful in document processing, where speed is a
fundamental requirement. The scanning is carried out line by line in a zigzag pattern to reduce illumination
bias.
Let z(k-1) denote the intensity of the point encountered in the scanning sequence at step (K+1). The
moving average (mean intensity) at the new point is given above.
N denotes the number of points used in computing the average and m(1)= z1/n. This initial value is not
strictly correct because the average of a single point is the value of the point itself.
Moving average is computed for every point in the image, segmentation is implemented using the equation
below.
In the previous slide, the first image at the left is an image of a handwritten text shaded by a spot
intensity pattern. This form of intensity shading is from images obtained along with a photographic flash.
The second image is the result of segment is by Otsu global thresholding. The last image in the right
shows a successful segmentation with local thresholding using moving averages.
Thank you!