How to detect triangles, ellipses, and circles in binary image?

3 vues (au cours des 30 derniers jours)
John Doe
John Doe le 2 Avr 2021
I have this binary image, and I need to classify between triangles, ellipses, circles, and rectangles. I already done the rectangle classification part. Apart from thresholding circularity, extent, boundingbox values (which works), how to classify the triangle (it always gets detected as circle using algorithms), classify ellipses vs circles (there is 1 circle in image)?

Réponses (1)

Image Analyst
Image Analyst le 2 Avr 2021
A good way is to find the centroid and boundaries, then use findpeaks() to find the number of vertices. See my attached shape analysis demos.

Community Treasure Hunt

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

Start Hunting!

Translated by