MATLAB: How to make Geometric shapes detection

detectshapeImage Processing Toolboxshapeshape detection

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.

Best Answer

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:
Related Question