3

I would like to use opencv for shape detection. I tried the code from this: How to detect simple geometric shapes using OpenCV but it does not detect overlapping shapes or shape within shape.

Can someone recommend an approach with opencv for finding shapes within shapes and overall better detection of different sizes of shapes. I am hoping to code in python.

Below is an example image that has example shapes that I would like to detect.

enter image description here

Community
  • 1
  • 1
user3133475
  • 2,951
  • 3
  • 13
  • 11

1 Answers1

0

You can first detect all edges using Canny Edge Detector.

Then you can apply suitable shape fitting method to the detected edges. Check out Structural Analysis and Shape Descriptors for more info.

herohuyongtao
  • 49,413
  • 29
  • 133
  • 174