Hough Circles

cv::HoughCircles is an OpenCV function that detects circles in an image using the Hough Circle Transform (based on the gradient method).
Download TouchDesigner version on my Patreon
Browser version: try the detectors live in OpenCV.js — open CV Detectors

It is fast and quite reliable when edge detection is clean, but it is very sensitive to parameter tuning:
- minDist — minimum distance between detected circle centers; too small produces duplicates, too large misses neighbors.
- param1 — upper Canny edge threshold; controls how strong an edge must be to count.
- param2 — accumulator threshold; lower values find more (and more false) circles.
- minRadius / maxRadius — the radius range to search in.

ScriptOP using TOP texture as input and output lines coordinates as CHOP:
A Script OP receives any TOP texture — a camera, video file, or rendered image — converts it to grayscale, runs cv::HoughCircles on each frame, and outputs the center coordinates and radius of every detected circle as CHOP channels. From there the data can drive instancing, geometry, or sound: detected circles in the real world become control signals for a generative system.

Use cases
- Abstract visuals — circles found in everyday footage (eyes, lights, wheels, cups) become the raw material for minimal geometric compositions.
- Interactive installations — physical round objects act as controllers for real-time graphics.
- Machine vision studies — visualizing how detection quality reacts to parameters and lighting.