[OpenCV] It's better to use a minimum circumscribed circle than to use Hough Circle Transform for circle detection


This is a tip I found when I tried to detect a red ball.

One of the popular methods is using Hough Circle Transform.
This method is difficult to explain, so I list some references.↓↓

However, the Hough transform is heavy, slow, and inaccurate. Besides, the size of the detected circle is not stable.

I was wondering how to deal with it, then an experienced friend told me that "it is better to use a minimum circumscribed circle".
I actually used it, and I found it was much more accurate (it doesn't mean truly accurate, though) and smooth.
it would be more accurate to say that it seems to recognize circles with good accuracy because it's actually not recognizing circles. It only detects certain colors, so the detection is fast and accurate.

I recognized a red ball displayed on my smartphone as a demo.
It seems good, isn't it?

Of course, there are cases of the Hough Circle Transform is a suitable choice, but this time I want to recognize only one red ball, so using the minimum circumscribed circle was comfortable enough.

An example code is shown below.

Everyone, let's use the minimum circumscribed circle!



また、* が付いている欄は必須項目となりますので、必ずご記入をお願いします。


18 − nine =

This site uses Akismet to reduce spam. Learn how your comment data is processed.