how to make Geometric shapes detection?

41 views (last 30 days)
i have popup menu to detect shapes. for example, i need when i click circle, just circles will show in rgb image on axes2. i am new to this, so couldn't arrange anything. Can anyone help me? i upload my codes. i think, you can understand exactly what i mean, when you check color menu on my codes. thank you.

Accepted Answer

Image Analyst
Image Analyst on 29 Dec 2015
mete, because you did not attach your image, to answer your question I had to write a program to draw random shapes. Please see attached demo. It creates an image with random shapes and then computes the circularity of the shapes and assigns the shape to the shape with the theoretical circularity that is closest to the shape's actual circularity. Someday I hope to add another method where I find and count peaks in the centroid to perimeter distance. For now, it will create an image like this:
  9 Comments
Image Analyst
Image Analyst on 7 Aug 2021
@Beenish Ishtiaq I did give him code and he said it was working. Not sure how to help you unless you start a new question with your own images and own code, or my code that you modified.

Sign in to comment.

More Answers (1)

Anindya Banerjee
Anindya Banerjee on 17 May 2019
@image analyst your code is not working! in the line pwd its showing error..can you please fix it?
  12 Comments
Image Analyst
Image Analyst on 26 Jun 2019
My program was meant for binary images and with this image you can't just threshold it to find shapes.
You will probably have to hand-trace the shapes to create a mask. Or you might try deep learning and see if that can find the shapes you want.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!