Problem 42616. Detect circles in images
Given an image and a target radius range, specified as [rmin rmax], find circles in the image. Your function should output an m-by-2 array of circle centers (x,y positions in the image) and an m-by-1 vector of radii corresponding to m circles.
Your detector will be judged on its precision and recall. The recall must be 0.75 or higher and the precision must be 0.5 or higher to pass.
For example, if an image has 4 true circles, you can miss at most 1 of the circles and have at most 4 false detections.
Additional notes:
- Circles can be brighter or darker than the background.
- A detection is considered a match if its position and radius is within 5 pixels of a true circle.
- To make things easier, the target number of circles (N) is provided as an input. Pat yourself on the back if you do not need it.
Solution Stats
Problem Comments
-
3 Comments
PDIST2 is not available here, please fix it
Thanks for bringing this to my attention LY Cao. The test suite has been fixed.
Fair warning to the challenger, we need to do some preprocessing for each image. There are black and white, grayscale, and color images within the test case set. I learned a lot from this problem, however...I found it very unsettling that I could not use functions from the image processing toolbox (I had to implement the Circle Hough transform myself).
Imho, the required precision should have been smaller: 5-pixel distance is absurd when one has rubber bands in an image that are not perfect circles. Or, at least, the test cases should allow that we return any number of circles and radii (it is easy to test if the desired circles are within the returned results).
Solution Comments
Show commentsProblem Recent Solvers6
Suggested Problems
-
2724 Solvers
-
1650 Solvers
-
Construct a string from letters and counts
142 Solvers
-
44 Solvers
-
Replace all zeros and NaNs in a matrix with the string 'error'
99 Solvers
More from this Author44
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!