how do i analyze the objects properties (size, diameter...) in an image?

i need to measure the grain dimensions from this image:
this is an image of a steel taken by microscope. i want to measure the grains (the black areas). Do anyone knows if there are existing apps or code that I can use for that purpose?

 Accepted Answer

See my Image Segmentation Tutorial in my File Exchange http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862. You might also want to check out the color segmentation demos there.

4 Comments

hi, I tried to use the blobsDemo by opening it's code and swiching the "coins.bmp" pic to mine (the one in my question, jpg format). it doesn't work... what do I need to change in the code in order to get the grain sizes?
Upload your image here so I can try it. Also, did you read the comments? There are instructions in it for places where you might need to make changes, such as changing the thresholding if you want dark objects instead of light objects, etc.
I want to know 2 things from this pic: 1. the area of each grain or the average area of the grains 2. the percentage of each color
You need to get the binary image first. I told you how to do that in your duplicate question. Since we should not carry out this discussion in multiple threads, let's continue it there.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!