What is thresholding? Explain about global thresholding.
Thresholding:
Because of its intuitive properties and simplicity of implementation, image thresholding enjoys a central position in applications of image segmentation.
Global Thresholding:
The simplest of all thresholding techniques is to partition the image histogram by using a single global threshold, T. Segmentation is then accomplished by scanning the image pixel by pixel and labeling each pixel as object or back-ground, depending on whether the gray level of that pixel is greater or less than the value of T. As indicated earlier, the success of this method depends entirely on how well the histogram can be partitioned.

Fig.4.1 FIGURE 10.28 (a) Original image, (b) Image histogram, (c) Result of global thresholding with T midway between the maximum and minimum gray levels.
Figure 4.1(a) shows a simple image, and Fig. 4.1(b) shows its histogram. Figure 4.1(c) shows the result of segmenting Fig. 4.1(a) by using a threshold T midway between the maximum and minimum gray levels. This threshold achieved a "clean" segmentation by eliminating the shadows and leaving only the objects themselves. The objects of interest in this case are darker than the background, so any pixel with a gray level ≤ T was labeled black (0), and any pixel with a gray level ≥ T was labeled white (255).The key objective is merely to generate a binary image, so the black-white relationship could be reversed. The type of global thresholding just described can be expected to be successful in highly controlled environments. One of the areas in which this often is possible is in industrial inspection applications, where control of the illumination usually is feasible.
The threshold in the preceding example was specified by using a heuristic approach, based on visual inspection of the histogram. The following algorithm can be used to obtain T automatically:
- Select an initial estimate for
- Segment the image using T. This will produce two groups of pixels: G1 consisting of all pixels with gray level values >T and G2 consisting of pixels with values <
- Compute the average gray level values µ1 and µ2 for the pixels in regions G1and G
- Compute a new threshold value:

The threshold in the preceding example was specified by using a heuristic approach, based on visual inspection of the histogram. The following algorithm can be used to obtain T automatically:
- Select an initial estimate for
- Segment the image using T. This will produce two groups of pixels: G1 consisting of all pixels with gray level values >T and G2 consisting of pixels with values <
- Compute the average gray level values µ1 and µ2 for the pixels in regions G1and G
- Compute a new threshold value: