Imagine a robot checking whether a drilled hole is in the correct place. The robot does not need to understand the whole object; it only needs to find a circle and measure it. The Classic Hough Transform can do this from image geometry without training a model on labeled examples.
1. What is the Classic Hough Transform?
Suppose a robot inspects a metal plate and must verify that a drilled hole is present, round, and in the correct place. Training a semantic detector for “hole” may be unnecessary. The drawing already tells us the feature should be circular, so the image-processing method can search directly for that geometry.
The Circle Hough Transform is a voting method for finding circular structures in an image. It does not learn the appearance of a bearing, cap, or pipe. Instead, it gathers evidence from boundary pixels and asks whether many of them agree on one centre and radius.
This makes the method attractive in controlled workcells. It needs no labeled training set, and its parameters can often be connected to physical knowledge. If calibration says the hole should appear between 35 and 45 pixels in radius, the algorithm can ignore every other size.
The same assumption also defines the limit. If perspective turns the circle into an ellipse, most of the boundary is hidden, or nearby texture creates many circular arcs, the evidence no longer gathers cleanly around one circle.
1.1 See the Full Circle Detection Pipeline
Grayscale image → detected circles
Many edge pixels agreeing on the same parameters create a detectable accumulator peak.
1.2 From a Grayscale Image to a Detected Circle
Read the diagram from top to bottom. Grayscale image becomes Canny edges. Circle voting adds evidence to an Accumulator, and Peak decoding turns strong accumulator peaks into Circles with centres and radii.
A circle with centre and radius contains image points satisfying
The diagram begins at Grayscale image. The Canny edges stage marks pixels where intensity changes sharply. These pixels may lie on the edge of the drilled hole, but they can also come from scratches, shadows, or other parts.
Take one edge pixel . By itself, it does not define a circle. Many circles with different centres and radii could pass through that point. During Circle voting, the pixel votes for parameter combinations compatible with the circle equation. Those votes are stored in the Accumulator.
Now consider all pixels around the real hole. Each one votes for many possibilities, but the correct parameter triple is compatible with all of them. Their votes therefore pile up near the same accumulator cell. Peak decoding finds these strong peaks and converts them into the final Circles.
A direct implementation uses a three-dimensional accumulator—two dimensions for the centre and one for radius. That can require substantial memory and computation. Physical constraints immediately help: a known radius range removes implausible circles, and a crop removes irrelevant image regions.
The local edge gradient can narrow the search further. At a clean circle boundary, the gradient points approximately toward or away from the centre. Instead of voting in every direction, a boundary pixel can vote mainly along that line. Image downsampling and staged searches provide other ways to exchange precision for speed.
1.3 Why Circle Voting Works
The key insight is the change of space. In the original image, the hole may appear as broken edge fragments separated by glare or noise. Connecting those fragments directly is difficult. In parameter space, every fragment can still vote for the same circle, and their agreement appears as a peak.
Duda and Hart developed this parameter-space formulation for lines and analytic curves. Yuen et al. later compared five circle-finding approaches, including the standard transform, a hierarchical method, a two-stage method, and space-saving variants. These methods preserve the voting idea while reducing computation or accumulator storage in different ways.
1.4 When Should You Use the Hough Transform?
| Method | Prior | Strength | Main failure |
|---|---|---|---|
| Circle Hough | Circular edge + radius range | Interpretable; no training | Cluttered arcs and perspective ellipses |
| Contour + circle fit | Segmented closed boundary | Rich residual and shape diagnostics | Needs clean, connected segmentation |
| Learned detector | Labeled appearance examples | Handles semantic variation | Data/domain dependence; coarse boxes |
| Segmentation model | Pixel-level object concept | Handles irregular visible regions | More compute and annotation complexity |
The right method follows from the question. If a bore must be circular by specification, a detected centre, radius, and geometric residual are more informative than the semantic label “hole.” If the task is “find every coffee mug,” circle geometry is insufficient because mugs can appear from many viewpoints and are defined by more than a circular rim.
1.5 Why Circle Detection Fails
- Concentric edges: a ring can create inner and outer detections; constrain radius or reason about paired radii.
- Repeated detections: require greater separation between accepted centres or stronger accumulator evidence.
- Missed partial circles: lower the accumulator threshold cautiously and constrain radius more tightly.
- False texture circles: raise the edge threshold, denoise, crop, or mask irrelevant regions.
- Elliptical projections: rectify the plane or use an ellipse-capable model.
- Changing scale: update radius bounds using depth or maintain per-workcell parameters.
These failure modes are easier to diagnose when you follow the voting story. Extra arcs create competing peaks, weak edges produce too few votes, poor radius limits spread work across irrelevant parameter values, and perspective violates the circle model itself. The solution is often better scene constraints or a better geometric model—not merely a lower threshold.
2. How to Use the Classic Hough Transform in the Telekinesis Agentic OS
Telekinesis provides the Classic Hough Transform as the Retina Skill detect_circle_using_classic_hough. The code below loads a grayscale image, constrains the radius range, sets the edge and accumulator thresholds, and prints the returned circle centres and radii.
from telekinesis import datatypes, retina
image = datatypes.Image.from_url(
url="https://assets.telekinesis.ai/examples/v1/images/metal_gears.jpg"
).to_grayscale()
circles = retina.detect_circle_using_classic_hough(
image=image,
inverse_resolution_ratio=1,
min_distance=50,
min_radius=40,
max_radius=60,
canny_detector_upper_threshold=300,
accumulator_threshold=30,
)
for center, radius in zip(circles.centers, circles.radii):
print(f"center={center}, radius={radius}")
The rendered result shows which accumulator peaks survived as circles. Look for repeated detections on concentric edges and false votes from arcs or gear teeth before using a centre as a robot target.

Strong, repeated circular edge evidence creates accumulator peaks. Texture inside a part is largely irrelevant unless it creates competing edges.
3. Benchmarking
3.1 Evidence Reported in the Circle-Hough Literature
The classic literature does not provide a modern, universal AP/latency leaderboard. Yuen et al. compare standard, fast, two-stage, and space-saving Hough variants on synthetic data and metallurgical images across four engineering dimensions:
| Evaluation dimension | What the paper studies |
|---|---|
| Accuracy | Centre and radius recovery |
| Reliability | Detection stability under image variation |
| Computation | Cost of accumulating and finding peaks |
| Storage | Memory required by alternative accumulator schemes |
For your deployment, report centre error and radius error in pixels and millimetres, precision/recall under an explicit matching tolerance, false circles on negative images, and p50/p95 end-to-end latency.
4. Where to Go Next?
Continue with Contour Detection when the complete boundary matters, or YOLOX when shape alone cannot identify the target.
5. References
- Duda, R. O., and Hart, P. E. “Use of the Hough Transformation to Detect Lines and Curves in Pictures”, Communications of the ACM, 1972.
- Yuen, H. K., Princen, J., Illingworth, J., and Kittler, J. “Comparative Study of Hough Transform Methods for Circle Finding”, Image and Vision Computing, 1990.
- Canny, J. “A Computational Approach to Edge Detection”, IEEE Transactions on Pattern Analysis and Machine Intelligence, 1986.