Nodes/comfyui_cv/cv2.HoughLines
ComfyUI Node

cv2.HoughLines

Raw wrapper of cv2.HoughLines(image, rho, theta, threshold, srn?, stn?, min_theta?, max_theta?, use_edgeval?). Parameters marked '?' are optional; blank means OpenCV default. See the OpenCV documentation for details.

By bmad4ever·Created 3 months ago·Updated 2 days ago· 0
cv2.HoughLines
  • image
  • nparray
rho0.0000
theta0.0000
threshold0
srn0.0000
stn0.0000
min_theta0.0000
max_theta3.1416
use_edgevalfalse
Categoryimage/CV/low-level/cv2 H

Inputs (9)

NameTypeDefaultDescription
imageNPARRAY,IMAGE,MASK8-bit, single-channel binary source image. The image may be modified by the function. Accepts a ComfyUI IMAGE/MASK directly (frame 0 of a batch) or an NPARRAY. Arithmetic ops (add, multiply, etc.) process the full IMAGE batch when both inputs have the same batch size.
rhoFLOAT0.0000-1e+38–1e+38Distance resolution of the accumulator in pixels.
thetaFLOAT0.0000-1e+38–1e+38Angle resolution of the accumulator in radians.
thresholdINT0-2147483648–2147483647%Accumulator threshold parameter. Only those lines are returned that get enough votes ( $>\texttt{threshold}$ ).
srnoptFLOAT0.0000-1e+38–1e+38For the multi-scale Hough transform, it is a divisor for the distance resolution rho. The coarse accumulator distance resolution is rho and the accurate accumulator resolution is rho/srn. If both srn=0 and stn=0, the classical Hough transform is used. Otherwise, both these parameters should be positive. Preset to the OpenCV default (0.0).
stnoptFLOAT0.0000-1e+38–1e+38For the multi-scale Hough transform, it is a divisor for the distance resolution theta. Preset to the OpenCV default (0.0).
min_thetaoptFLOAT0.0000-1e+38–1e+38For standard and multi-scale Hough transform, minimum angle to check for lines. Must fall between 0 and max_theta. Preset to the OpenCV default (0.0).
max_thetaoptFLOAT3.1416-1e+38–1e+38For standard and multi-scale Hough transform, an upper bound for the angle. Must fall between min_theta and CV_PI. The actual maximum angle in the accumulator may be slightly less than max_theta, depending on the parameters min_theta and theta. Preset to the OpenCV default (3.141592653589793).
use_edgevaloptBOOLEANfalseTrue if you want to use weighted Hough transform. Preset to the OpenCV default (False).

Outputs (1)

NameTypeDescription
nparrayNPARRAY