필터 지우기
필터 지우기

how to calculate irregular shape area in the image

조회 수: 30 (최근 30일)
norfaizayu
norfaizayu 2011년 12월 28일
댓글: Image Analyst 2019년 4월 12일
hi..i have i project that need me to detect and extract the irregular shape in the image.then i should to calculate the area in the unit cm.can you help me,how can i detect the irregular shape in the image automatic and how can i calculate that irregular shape area.i hope you can help me.Thank you.
  댓글 수: 8
Piya
Piya 2019년 4월 11일
What is the unit of area
Image Analyst
Image Analyst 2019년 4월 12일
Pixels.

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

답변 (3개)

Florin Neacsu
Florin Neacsu 2012년 1월 4일
Hi,
Given your example I would suggest this approach:
after your edge detection:
create structural element of radius 4 (or 5 or whatever works for you)
dilate your edge map
erode (with the same strel)
imclearborder
create metric to eliminate "noise" (you can do something similar to circle detection : perimeter/area)
determine the area (in pixels; you need to know the spatial resolution of your initial image to obtain it in cm2).
Hope this helps.
Regards, Florin
  댓글 수: 10
Image Analyst
Image Analyst 2012년 1월 26일
Have you imaged your known object yet? When you have, call improfile() to interactively get the length by calculating the two line endpoints that improfile will provide to you. Then you conversion factor is your real world length (e.g. 10 mm) divided by the number of pixels that the distance is.
Walter Roberson
Walter Roberson 2012년 1월 26일
Urgency does not make the impossible possible.
Perhaps, though, it would be appropriate to ask about your accuracy goals. If your accuracy goals are not especially high, then you could make use of the average of the real-world measurements that have been studied; see http://uclue.com/?xq=4504

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


Image Analyst
Image Analyst 2011년 12월 28일
You might be able to adapt my BlobsDemo tutorial to your image:
  댓글 수: 11
Sean de Wolski
Sean de Wolski 2012년 1월 4일
How about a threshold, a borderclearing, and a sum?
norfaizayu
norfaizayu 2012년 1월 5일
i cannot do the threshold..always error.what's mean for threshold?border clearing already there.sum for what?i didn't get the source code for area.can u help me?

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


Gyaneshwar dubacharla
Gyaneshwar dubacharla 2016년 1월 22일
how to find area from contour plots????
  댓글 수: 1
Image Analyst
Image Analyst 2016년 1월 22일
Contour() returns the coordinates. You could then use polyarea() or poly2mask() followed by regionprops().

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

Community Treasure Hunt

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

Start Hunting!

Translated by