Created
May 1, 2014 23:48
-
-
Save cancan101/e19982815e4d3b2b3b95 to your computer and use it in GitHub Desktop.
Automatic perspective correction for quadrilateral objects
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As lines has shape of (x,y,z) we have to iterate in to two for loops, as well as indicate inside of the HoughLinesP arguments th np.array[], as it follows:
lines = cv2.HoughLinesP(bw_canny, 1, np.pi/180, 70, np.array([]), minLineLength=30, maxLineGap=10)
line_image = np.copy(image)
for line in lines:
for x1,y1,x2,y2 in line:
cv2.line(line_image,(x1,y1),(x2,y2),(255,0,0),3)