|
|
|
|
|
| Threshold detection methods | |
| Multispectral thresholding | |
| Thresholding in hierarchical data structures |
Segmentation is one of the most important steps leading to the
analysis of processed image data, its main goal is to divide an image into
parts that have a strong correlation with objects or areas of the real world
contained in the image
| |||||||
| Totally correct and complete segmentation of complex scenes usually cannot
be achieved in this processing phase. A reasonable aim is to use partial
segmentation as an input to higher level processing. | |||||||
| Segmentation methods global knowledge, e.g. using histogram of image features edge-based segmentations region-based segmentations
|
| Gray level thresholding is the simplest segmentation process. Many
objects or image regions are characterized by constant reflectivity or light
absorption of their surface. | |
| Thresholding is computationally inexpensive and fast and can easily be
done in real time using specialized hardware. | |
A complete segmentation of an image R is a finite set of regions R1,
. . .RS, ![]() For binary images, there is a single threshold: ![]() |
Thresholding algorithm
Search all the pixels f(i,j) of the image f. An image element g(i,j)
of the segmented image is an object pixel if f(i,j) >=T, and is a
background pixel otherwise.
![]()
Practical Experiment 5.A - Grey-level Thresholding
Save the rabbit.jpg image to your directory. Open
Matlab and download threshgl.m.
Load the image into matlab. Run this function with the command:
>xt=threshgl(x,Tlo,Thi);%where x is the image matrix
By trial and error, determine the threshold segmenting the rabbit from the background. To do this, adjust the upper and lower thresholds (upperT, lowerT) of this function. Determine the interval in which the threshold has to be defined to perform the desired segmentation. Now, apply the same approach to segmentation of the airplane use the image airplane.jpg - did you find a suitable threshold?
![]()
Correct threshold selection is crucial for successful threshold
segmentation. Threshold selection can be interactive or can be the
result of some threshold detection method ![]() | |
| Single global threshold ... successful only under very unusual circumstances gray level variations are likely - due to non-uniform lighting, non-uniform input device parameters or a number of other factors. | |
| Variable thresholding (also adaptive thresholding), in which the
threshold value varies over the image as a function of local image
characteristics, can produce the solution in these cases. image f is divided into subimages fc a threshold is determined independently in each subimage if a threshold cannot be determined in some subimage, it can be interpolated from thresholds determined in neighboring subimages. each subimage is then processed with respect to its local threshold. |
![]()
Practical Experiment 5.B Adaptive Thresholding
Open Matlab and download threshgl.m. Using the airplane.jpg
image, modify threshold.m to perform adaptive thresholding - divide the image in
blocks and use the local mean-the local variance as the threshold. Did the
segmentation improve, what happens for different block sizes?
![]()
Thresholding modifications:
|
![]()
Practical Experiment 5.C - Band Thresholding
Open Matlab and download threshgl.m
Using the rabbit.jpg image, select appropriate
thresholds to perform band-thresholding-based border detection.
Apply this idea to the airplane.jpg image and textsheet.jpg.
![]()
| Multithresholding resulting image is no longer binary ![]() | |
Semithresholding aims to mask out the image background leaving
gray level information present in the objects ![]() | |
![]()
Practical Experiment 5.D - Semi-Thresholding
Open Matlab and invoke semithreshgl.m
Using the rabbit.jpg image, select an appropriate
threshold to perform semi-thresholding - segment the background and keep the
rabbit gray level information.
![]()
| Thresholding can also be applied to gradient, local texture or any other image decomposition criterion |
| If some property of an image after segmentation is known a priori, the
task of threshold selection is simplified, since the threshold is chosen to
ensure this property is satisfied. | |||||||
P-tile-thresholding
| |||||||
| More complex methods of threshold detection based on histogram shape
analysis bimodal histogram - if objects have approximately the same gray level that differs from the gray level of the background |
| Threshold-based segmentation ... minimum segmentation error
requirements it makes intuitive sense to determine the threshold as the gray level that has a minimum histogram value between the two maxima.
| |||||||||||
Optimal thresholding
|
![]()
Last Modified: 03/20/01