edges=cv2.Canny(gaus,50,150, apertureSize=3) minLineLength=100 maxLineGap=10 lines=cv2.HoughLinesP(edges,1, np.pi/180,100, minLineLength, maxLineGap) forx1, y1, x2, y2inlines[0]: cv2.line(img, (x1, y1), (x2, y2), (0,255,0),2) cv2.imshow("houghline",img) cv2.waitKey...
www.dbjr.com.cn/article/2152...htm 2025-6-3