Best threshold values for segmenting images

Best threshold values for segmenting images

by Camille Valentine Axelle Montemagni -
Number of replies: 1

Hello,

I just checked the solutions for the first exercises session, and I'm not sure to understand how the best threshold values are chosen in the first exercise. For the first image, I understood that the treshold are chosen such that, on the pixels intensity histogram, the thresholds separate the two intensity peaks. On the second image (brain) I understood that the threshold values are chosen as to separate all the black pixels (the peak on the histogram) from the rest. I'm not sure how they are chosen on the third image.

Thank you in advance for your answer!

In reply to Camille Valentine Axelle Montemagni

Re: Best threshold values for segmenting images

by Corentin Dumery -

Yes, the thresholds are set such that the object of interest lies between them. When it's color is distinct from that of the background, the histogram makes this easy and you can take threshold values before and after the object's "blob" in the histogram.

The third image, "shading.png",  is more of an example that highlights how your thresholds can select a range of greys. There is nothing to segment here so set them however you want, just try a couple different values.