Sizing of Poly Objects in an Image
Afficher commentaires plus anciens
Hello,
I was trying to measure the length and width of the each objects seen below image. I could have the each objefct seperately but is there a way to measure the length and size each object at the same code? Each red circled part are the objects and I would like to measure the length and width at the same code.

Réponse acceptée
Plus de réponses (2)
Walter Roberson
le 1 Mar 2018
0 votes
If you can work out an appropriate mask (which does not look easy for this case unless the red is already there) then mask and regionprops() to get the characteristics.
3 commentaires
Murat Kocaman
le 1 Mar 2018
Walter Roberson
le 1 Mar 2018
I do not understand why those 7 should be picked and not the other 24-ish round objects around the edge?
Is there any possibility of improving the lighting on the images?
Walter Roberson
le 2 Mar 2018
I think finding the boundaries between the adjacent objects would be tricky. I do not think I have any suggestions at this time. Image Analyst might have some ideas.
I would tend to think that the third of those images, the larger darker blue, would be the easiest one to work with of what you have shown: it is the only one in which the small round(-ish) dots are somewhat clear. Though I could be wrong: perhaps edge detection on the back-lit version might be easier.
Image Analyst
le 2 Mar 2018
0 votes
What are you after? Do you want to find out if there are any missing jewels? If so, just use a template and look for the presence of blue. If you really want the size, it could be tricky because they are so cluttered where they abut each other. You could try to separate them with watershed. See Steve's blog: http://blogs.mathworks.com/steve/2013/11/19/watershed-transform-question-from-tech-support/
3 commentaires
Murat Kocaman
le 4 Mar 2018
Image Analyst
le 4 Mar 2018
OK, then after watershed you have a labeled image which you can pass directly into regionprops() to do the measurements.
Murat Kocaman
le 5 Mar 2018
Déplacé(e) : DGM
le 13 Fév 2023
Catégories
En savoir plus sur Region and Image Properties dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

