Segment Dumbbell Structure into Two Circles and One Rectangle

3 vues (au cours des 30 derniers jours)
Paul Safier
Paul Safier le 9 Déc 2019
Commenté : Paul Safier le 9 Déc 2019
I'm trying to analyze three shapes from this image--two circles and one rectangle. I would like each to be a separate object detected by bwconncomp so that I can analyze with various region props. All three are touching. Using bwconncomp unfortunately gives a single object. I tried various bwmorph operations but they are altering the objects too much. For example, I used the thin operation with n=20, followed by the open operation and then finally the thicken operation with n=20. My strategy was to isolate the circles first, then subtract from the original image to get the rectangle isolated. Unfortunately the bwmorph operations make the circles into more of a square shape afterwards. I have also tried using the watershed function to the image after it was transformed via bwdist--this also did not work, i.e. there were way too many watershed lines when I would only want two.
There is no contrast between the circles and the rectangle.
Any suggestions would be most welcome!Dumbell.JPG

Réponse acceptée

Image Analyst
Image Analyst le 9 Déc 2019
Try imfindcircles() to find the centers and radii of the circles.
Then create a circular mask to mask them out -- see The FAQ for code to create a circle, then use poly2mask() to make a mask.
  1 commentaire
Paul Safier
Paul Safier le 9 Déc 2019
Thanks for the suggestion--I have been able to make it work!

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by