封装在OpenCV函数**cv.HoughLines**()中。它只是返回一个:math:(rho,theta)值的数组。ρ以像素为单位,θ以弧度为单位。...gray = cv.cvtColor(img,cv.COLOR_BGR2GRAY)
edges = cv.Canny(gray,50,150,apertureSize = 3)
lines = cv.HoughLines...x0 - 1000*(-b))
y2 = int(y0 - 1000*(a))
cv.line(img,(x1,y1),(x2,y2),(0,0,255),2)
cv.imwrite('houghlines3