Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
I have a segmented image.. Now i need to find the smallest area from the image using the pixels values. How to do this in Matlab? Thank you in advanced...
조회 수: 1 (최근 30일)
이전 댓글 표시
From the above image i need the regions marked with red circles. The marked regions hold the lowest number of pixels in the image. Please suggest some techniques.
댓글 수: 0
답변 (2개)
Constantino Carlos Reyes-Aldasoro
2019년 10월 3일
Hello
If the areas are defined by the pixel values then you can discard all other pixels by comparing against the value of interest. It looks like you have 4 values and the one you want is the second darkest after the background. Say your image is contained in a variable called brain, then your regions of interest can be extracted like this
brain2 = (brain==2);
that will keep only the two regions of interest. Then you need to distinguish them, to do that use bwlabel
brain3 = bwlabel(brain2);
bran4 = regionprops(brain3,'area');
And that will identify your regions and their propoerties
댓글 수: 1
Constantino Carlos Reyes-Aldasoro
2019년 10월 3일
to find the values of your pixels, add the colorbar to your figure and you can find out. Alternatively you can use this
unique(brain)
and will give you the unique values of your image.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!