Measuring the size of regions in an image

조회 수: 1 (최근 30일)
med-sweng
med-sweng 2013년 12월 18일
댓글: Image Analyst 2013년 12월 19일
Say that there are some regions I'm interested in in some image. How can I measure the size of such regions in MATLAB?
Thanks.

답변 (2개)

Walter Roberson
Walter Roberson 2013년 12월 18일
Use the Image Processing Toolbox with the regionprops() function.
Note: the result will be in square pixels. To convert the square pixels to a physical area, you will need information about the relationship between pixels and physical distance for that image.
  댓글 수: 2
med-sweng
med-sweng 2013년 12월 19일
Thanks for your answer. I used the property 'Area' in order to find the area of every labeled region. The question here is, for instance, say that I now have 300 labeled regions. I now know the area of each region. But, how can I know which region in the image each label represents. Say that I have a region with label "176". How can I know what part of the image represents this label?
Image Analyst
Image Analyst 2013년 12월 19일
If you have also measured the centroids you can put a number over each blob. See my blobsdemo in my File Exchange for a demo of that.

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2013년 12월 18일
Also see attached spatial calibration demo, below in blue text.
  댓글 수: 3
med-sweng
med-sweng 2013년 12월 19일
I followed the steps, and entered the real world measure in "microns", but, getting the following:
Area= 0.0 square microns.
Mean gray level = NaN.
Image Analyst
Image Analyst 2013년 12월 19일
You did not draw the area or length correctly. If you want, run psr.exe (from Windows) and record your screen movements so I can see what you did wrong.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by