Hough Circle Transform Parameter Tuning with Examples

Conclusion

We can roughly estimate minRadius and maxRadius by calculating the number of circles that can fit on the horizontal.
If our circles are next to each other touching each other, we can give minDist twice the value of minRadius.
If our circles are far apart, we need to give higher values.
If we detected less circle than we should, we can try to lower the param2 value.
Lowering dp causes false negatives, raising it causes false positives.
If we could not achieve a good result despite all our parameter settings, we may consider blurring, canny edge detection, etc. if we did not do it at the beginning.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store