Fixing the appropriate threshold level to binarize a droplet image where the droplet area is found to vary with the threshold
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
Image Analyst
2020년 5월 12일
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
Image Analyst
2020년 5월 22일
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.
추가 답변 (1개)
Constantino Carlos Reyes-Aldasoro
2020년 5월 12일
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.
참고 항목
카테고리
Help Center 및 File Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!