- Use the OpenCV function @ref cv::HoughCircles to detect circles in an image.
- Use the OpenCV function **HoughCircles()** to detect circles in an image.
Theory
------
...
...
@@ -31,31 +34,96 @@ Theory
the best radius for each candidate center. For more details, please check the book *Learning
OpenCV* or your favorite Computer Vision bibliography
#### What does this program do?
- Loads an image and blur it to reduce the noise
- Applies the *Hough Circle Transform* to the blurred image .
- Display the detected circle in a window.
Code
----
-# **What does this program do?**
- Loads an image and blur it to reduce the noise
- Applies the *Hough Circle Transform* to the blurred image .
- Display the detected circle in a window.
-# The sample code that we will explain can be downloaded from [here](https://github.com/opencv/opencv/tree/master/samples/cpp/houghcircles.cpp).
A slightly fancier version (which shows trackbars for
changing the threshold values) can be found [here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ImgTrans/HoughCircle_Demo.cpp).
@include samples/cpp/houghcircles.cpp
@add_toggle_cpp
The sample code that we will explain can be downloaded from