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.
<img src="https://i.stack.imgur.com/VFTNz.jpg" alt="enter image description here">
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.