Histogram processing and thresholding target detection

The goal of this project is to find different complications in images. The pictures are related to an airport and the desert area around it, to find the roads we use the thresholding method. To be able to find an appropriate threshold, the print command checked the values of the pixels and then I set my threshold to 200.

The results were obtained as follows:

Find roads using threshold

The output image where the roads are marked in white:

The output image where the roads are marked in white:

To create the above image, I used the first band, the red band. Because in case of using the green band, other complications besides the road will be revealed, which is not desirable for us. If you use the blue band, only the wider main road can be recognized.

Single banding with rgb2gray command:

It is easier to extract the roads with this command and the resulting image is clearer.

The next photo is a part of the airport and the aim is to extract the planes, for this purpose I used the first band and set my threshold to 230. Here is the result:

The next image is a satellite image in which we extracted urban areas, vegetation, and agricultural lands with suitable thresholds. Here is the result:

urban areas
Urban areas/I used the first band and the threshold limit of 230.
Vegetation/I used the first band and the threshold limit of 100.
Agricultural lands/To extract this item, I used the second band and the sharing of two ranges

In this part of the project, we have to count The modified image as follows along with the gray image containers by histogram equalization and applying a suitable threshold

The modified image is as follows along with the gray image:

The histograms of different bands are as follows:

First band
Second band
Third band

To extract the green boxes, I first took the image to the HSV space and then applied the limitations.

Here is the result:

To extract this photo, the minimum value [42,70,24] and the maximum value [255,180,135] were used.

after all these works, there are two questions:

  1. What are the main factors that affect the use of this method?

2. What are the main problems in extracting in this way?

This method depends a lot on weather conditions and on what time of day the photo was taken because if any of these factors change, the limits of the thresholds will change. In extracting roads or boxes, due to the proximity of different toll colors, the accuracy of this method for extracting tolls decreases.
Finally, it can be said that the threshold method is not accurate.

The detailed report of this project is available via the following link:

Leave a Reply

Your email address will not be published. Required fields are marked *