From 96e4afb96b65f5b6e899c84c8e613c9f46bb2e40 Mon Sep 17 00:00:00 2001 From: KHTee <75174583+KHTee@users.noreply.github.com> Date: Thu, 4 Mar 2021 17:21:03 +0800 Subject: [PATCH] Include parameter names in cv2.HoughLinesP() There is a parameter called 'lines' in between threshold and minLineLength. Without specifying the parameter name will cause cv2.HoughLinesP() to take the wrong positional parameter. Docstring: HoughLinesP(image, rho, theta, threshold[, lines[, minLineLength[, maxLineGap]]]) --- source/py_tutorials/py_imgproc/py_houghlines/py_houghlines.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/py_tutorials/py_imgproc/py_houghlines/py_houghlines.rst b/source/py_tutorials/py_imgproc/py_houghlines/py_houghlines.rst index ba3c0b3..6287d21 100644 --- a/source/py_tutorials/py_imgproc/py_houghlines/py_houghlines.rst +++ b/source/py_tutorials/py_imgproc/py_houghlines/py_houghlines.rst @@ -100,7 +100,7 @@ Best thing is that, it directly returns the two endpoints of lines. In previous edges = cv2.Canny(gray,50,150,apertureSize = 3) minLineLength = 100 maxLineGap = 10 - lines = cv2.HoughLinesP(edges,1,np.pi/180,100,minLineLength,maxLineGap) + lines = cv2.HoughLinesP(edges,1,np.pi/180,100,minLineLength=minLineLength,maxLineGap=maxLineGap) for x1,y1,x2,y2 in lines[0]: cv2.line(img,(x1,y1),(x2,y2),(0,255,0),2)