maxLineGap = 20
lines = cv2.HoughLinesP(edges, 0.05, np.pi / 5000, 10, minLineLength,
    maxLineGap)
print(len(lines))
for i in range(len(lines)):
    x1, y1, x2, y2 = lines[i][0]
cv2.line(img, (x1, y1), (x2, y2), (0, 255, 0), 2)
cv2.imwrite('houghlines5.jpg', img)
How to detect a laser line in an image using Python