how to calculate irregular shape area in the image

30 Ansichten (letzte 30 Tage)
norfaizayu
norfaizayu am 28 Dez. 2011
Kommentiert: Image Analyst am 12 Apr. 2019
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 Kommentare
Piya
Piya am 11 Apr. 2019
What is the unit of area

Melden Sie sich an, um zu kommentieren.

Antworten (3)

Florin Neacsu
Florin Neacsu am 4 Jan. 2012
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 Kommentare
Image Analyst
Image Analyst am 26 Jan. 2012
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 am 26 Jan. 2012
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

Melden Sie sich an, um zu kommentieren.


Image Analyst
Image Analyst am 28 Dez. 2011
You might be able to adapt my BlobsDemo tutorial to your image:
  11 Kommentare
Sean de Wolski
Sean de Wolski am 4 Jan. 2012
How about a threshold, a borderclearing, and a sum?
norfaizayu
norfaizayu am 5 Jan. 2012
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?

Melden Sie sich an, um zu kommentieren.


Gyaneshwar dubacharla
Gyaneshwar dubacharla am 22 Jan. 2016
how to find area from contour plots????
  1 Kommentar
Image Analyst
Image Analyst am 22 Jan. 2016
Contour() returns the coordinates. You could then use polyarea() or poly2mask() followed by regionprops().

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by