Effacer les filtres
Effacer les filtres

Fixing the appropriate threshold level to binarize a droplet image where the droplet area is found to vary with the threshold

2 vues (au cours des 30 derniers jours)
I have to measure the diameter of a falling droplet as attached here. I can binarize and fill the holes to get the area in pixels. I have checked the area for threshold level 0.5 to 0.95 in imbinarize() function including the otsu's threshold value. Different threshold gives different area in pixels ranging from 1037 pixels to 1077 pixels as shown below. Now, how to choose the appropriate threshold level here for my diameter calculation?
Threshold area in pixels
0.95 1077
0.9 1073
0.85 1067
0.8 1064
0.75 1063
0.7 1061
0.65 1057
Otsu Threshold 1056
0.6 1050
0.55 1048
0.5 1037

Réponse acceptée

Image Analyst
Image Analyst le 12 Mai 2020
For things that do not have super sharp edges, like a blob with a Gaussian profile, there is no one "right" or "correct" threshold. It's basically whatever you say it is, unless you can get some ground truth, like you have a bead and you can use calipers to measure it, and your image is blurred. So just pick something that looks right to you. I mean, who's to say it's wrong? If you have a known ground truth diameter (like the hard bead) , then you can try different thresholds until it gives you the right answer.
  10 commentaires
Image Analyst
Image Analyst le 22 Mai 2020
I don't think sharpening the edge will make much difference in the diameter of the droplet. If you need more precision then use a higher resolution lens and camera.

Connectez-vous pour commenter.

Plus de réponses (1)

Constantino Carlos Reyes-Aldasoro
Dear Anjan
There is no exact way to decide the threshold. To illustrate this, I have taken a profile line to illustrate the intensity of the droplet. When you decide the threshold you are selecting where you are cutting, and as you go up or down you will include more or fewer pixels. One option is to go halfway, or you can go closer to the top or the bottom.
What is very important is that if you are going to do this for a large number of cases, you should be consistent on your decision.
Hope this helps.


En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by