OpenCV HoughLinesWithAccumulator_1
The duplicate of 'Hough lines with confidence scores'
- image
- lines
- nparray
HoughLinesWithAccumulator_1 is the twin of HoughLinesWithAccumulator_0 - same eight inputs, same (N, 1, 3) output, same cv2.HoughLinesWithAccumulator call. The opencv-comfyui generator numbers every overload, and this one is a duplicate with no behavioral difference. If a workflow saved with the _1 name, it runs identically with _0.
What it does (briefly)
Hough line detection that returns each line as [rho, theta, votes] - the third element being how many edge pixels supported it. That vote count is a confidence score you can threshold, sort, or keep-top-K with, which is the whole reason to pick this over plain HoughLines_*. Read the HoughLinesWithAccumulator_0 article for the full mechanics; everything there holds.
Quick recap of the knobs: image needs to be an 8-bit grayscale nparray (convert with cvtColor code 6, run Canny_0 in front - feeding a 3-channel image trips the img.type() == CV_8UC1 error), rho/theta are the resolution (start 1.0 and 0.0174), threshold is minimum votes, and min_theta/max_theta restrict the angle search. srn/stn stay 0 unless you're doing multi-scale Hough. The lines optional input is the generator's out-parameter; leave it disconnected.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/geroldmeisinger/opencv-comfyui
or "OpenCV" via ComfyUI Manager, plus pip install opencv-contrib-python. No model files.
Bottom line
There's no decision to make between _0 and _1. The real choice is this node vs. plain HoughLines_0 - and that comes down to whether you need the vote counts as a confidence score. If you don't, the plain version has one fewer column to trip over.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | NPARRAY | — | |
| rho | FLOAT | — | |
| theta | FLOAT | — | |
| threshold | INT | — | |
| srn | FLOAT | — | |
| stn | FLOAT | — | |
| min_theta | FLOAT | — | |
| max_theta | FLOAT | — | |
| linesopt | NPARRAY | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | — |