how to make Geometric shapes detection?

40 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Image Analyst
Image Analyst il 29 Dic 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 Commenti
Image Analyst
Image Analyst il 7 Ago 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.

Accedi per commentare.

Più risposte (1)

Anindya Banerjee
Anindya Banerjee il 17 Mag 2019
@image analyst your code is not working! in the line pwd its showing error..can you please fix it?
  12 Commenti
Image Analyst
Image Analyst il 26 Giu 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.
Anindya Banerjee
Anindya Banerjee il 5 Lug 2019
ANY OTHER SUGGETIONS?

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by