I want to create an algorithm in order to detect the following shape (in the blue region) in videos or images:

enter image description here

I have no dataset from the corresponding object so I thought that if I define it geometrically, I could use traditional image processing techniques with OpenCV (such as edge detection)to identify it.

Is there more efficient or easier way ?


1 Answer 1


The classic solution to your question is called Hough Transform, a feature extraction method focusing on shapes. More specific, if you know that you always look for circles, you can use Circle Hough Transform.

This link shows you how to apply it in Python and C.

  • $\begingroup$ Thank you for your answer. As I understand Hough transform algorithm is mostly for line and circle detection while I want to detect the whole blue region that I posted above which contains a pi-shaped region with a circle in the center. I read that there is a generalized Hough transform for more complex shapes, maybe this is a solution right ? $\endgroup$
    – Capdi
    Jul 9, 2021 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.