Created
May 1, 2014 23:48
-
-
Save cancan101/e19982815e4d3b2b3b95 to your computer and use it in GitHub Desktop.
Automatic perspective correction for quadrilateral objects
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)
I am also getting line in right part of the image. Any solution for that?
@RAMIRO-GM , @mistiansen
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I have tried running this but it only ever finds one line in the card. Specifically, it grabs the right edge of the card. Do you have any thoughts as to what could be causing this?