0% found this document useful (0 votes)
186 views8 pages

Variable Thresholding Using Moving Averages

This document discusses variable thresholding methods in digital image processing. It describes thresholding as a simple segmentation technique that converts grayscale images to binary images by replacing pixels below a threshold with black and pixels above it with white. The document outlines different types of thresholding methods including histogram-based, clustering-based, entropy-based, and spatial/local methods. It specifically describes using moving averages as a local thresholding technique, where the threshold value is adapted for each pixel based on the average intensity of neighboring pixels. An example is given showing how moving average thresholding can successfully segment an image with uneven illumination better than global thresholding.

Uploaded by

Darshan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
186 views8 pages

Variable Thresholding Using Moving Averages

This document discusses variable thresholding methods in digital image processing. It describes thresholding as a simple segmentation technique that converts grayscale images to binary images by replacing pixels below a threshold with black and pixels above it with white. The document outlines different types of thresholding methods including histogram-based, clustering-based, entropy-based, and spatial/local methods. It specifically describes using moving averages as a local thresholding technique, where the threshold value is adapted for each pixel based on the average intensity of neighboring pixels. An example is given showing how moving average thresholding can successfully segment an image with uneven illumination better than global thresholding.

Uploaded by

Darshan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

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.

Types of thresholding methods


● Histogram
● Clustering
● Entropy
● Object Attribute
● Spatial
● Local
● Histogram shape-based methods, where, for example, the peaks, valleys and curvatures of the
smoothed histogram are analyzed
● Clustering-based methods, where the gray-level samples are clustered in two parts as
background and foreground (object), or alternately are modeled as a mixture of two Gaussians
● Entropy-based methods result in algorithms that use the entropy of the foreground and
background regions, the cross-entropy between the original and binarized image, etc.
● Object Attribute-based methods search a measure of similarity between the gray-level and the
binarized images, such as fuzzy shape similarity, edge coincidence, etc.
● Spatial methods that use higher-order probability distribution and/or correlation between pixels
● Local methods adapt the threshold value on each pixel to the local image characteristics. In
these methods, a different T is selected for each pixel in the image.
Original Image Threshold image

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!

You might also like