how can i calculate diamond's area in picture

1 view (last 30 days)
hi i did a project in matlab. i have an image that contains a diamond i want to select diamond and calculate it's area .i used (bwareaopen , bwlabel , regionprops , imfill) to find it . i declare a Tresh Number that user can change it . the Tresh uses for creating binaryImage.when i change it , diamond's area will change. what is the real area? i want to just diamond's area , how can i remove all others object? and which Tresh is correct? i put my project. please look this. thank my project link :<https://www.zeta-uploader.com/1237848448>

Answers (1)

Image Analyst
Image Analyst on 19 Feb 2015
That's just what my Image Sgementation Tutorial does: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
Please post your image here.
It's possible that the threshold will change the area if the edges are not the same gray level, for example if it's blurry. You can use ismember() to filter blobs based on criteria such as intensity or area.

Community Treasure Hunt

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

Start Hunting!