SumitBirla.com

Home » Software » Image Processing I » Thresholding, Histograms and Binary Images

Assignment 3: Thresholding, Histograms, Binary Images

This part of the report deals with the various uses of histograms. The first is the global thresholding where a threshold value is chosen and used for the binarization of the entire image. The second deals with local thresholding where different values are selected for different regions of the picture. In our case, we divided the picture into 4 quadrants. The last use of thresholding is for binarization of a part of an image. The user can define a region (rectange) on the image with the mouse. The operation is then done on just that part of the image.

Source code:

Sample pictures:
Original Global Thresholded Local Thresholded

Analysis:
The images above show how binarization can help detect the objects in the image by chosing a proper threshold. The histogram shows the distribution of the 256 intensity levels in the image. In some cases, it is better to have local thresholds depending on the light intensity of the different regions of the picture. In the locally thresholded lax.gif, a lower threshold was chosen for the top left quarter of the image. This can be applied to any region depending on the intensities present in that region.

Binarization of a section of the image helps see features of that area while keeping rest of the picture in perspective. In the image of the heart below, a part has been binarized.