arthew0

← back

HoughLinesP

HoughLinesP — computervision, abstract, generativeart, touchdesigner

cv::HoughLinesP is an OpenCV function that implements the Probabilistic Hough Transform to detect line segments in an image (unlike the classic HoughLines which finds infinite lines).

Download TouchDesigner version on my Patreon

HoughLinesP: hough lines procimility5 — computervision, abstract, generativeart, touchdesigner


HoughLinesP: hough lines procimility3 — computervision, abstract, generativeart, touchdesigner


It directly returns the start and end points of each detected segment (x1,y1,x2,y2), making it much more practical and widely used for real-world applications such as lane detection, document scanning, or contour analysis.

How it works in TouchDesigner

A Script OP takes a TOP texture as input, runs edge detection and cv::HoughLinesP on each frame, and outputs the endpoints of detected segments as structured data. Those coordinates can then be rendered as geometry: every frame of a live video becomes a set of straight strokes that follow the structure of the scene.

Key parameters to tune:

But if you use a proximity node, you can get an interesting effect — nearby endpoints get connected into web-like structures, turning a technical detector into an abstract generative drawing:

HoughLinesP: hough lines procimility — computervision, abstract, generativeart, touchdesigner

Use cases

HoughLinesP: hough lines procimility2 — computervision, abstract, generativeart, touchdesigner