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일)
image-ques.jpg
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.

답변 (2개)

Constantino Carlos Reyes-Aldasoro
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
NO
NO 2019년 10월 3일
Thank you for the answer.
But it may not be the second darkest part for other images.... it may be changed...
and sir regarding the pixel values it is unknown (manually it can be checked but at the time of segmentation itself how to do this?)

Constantino Carlos Reyes-Aldasoro
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.

Community Treasure Hunt

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

Start Hunting!

Translated by