Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created May 11, 2020 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prateekjoshi565/49cc26894b4c86121bd2eb5ee1d38178 to your computer and use it in GitHub Desktop.
Save prateekjoshi565/49cc26894b4c86121bd2eb5ee1d38178 to your computer and use it in GitHub Desktop.
lines = cv2.HoughLinesP(thresh, 1, np.pi/180, 30, maxLineGap=200)
# create a copy of the original frame
dmy = col_images[idx][:,:,0].copy()
# draw Hough lines
for line in lines:
x1, y1, x2, y2 = line[0]
cv2.line(dmy, (x1, y1), (x2, y2), (255, 0, 0), 3)
# plot frame
plt.figure(figsize=(10,10))
plt.imshow(dmy, cmap= "gray")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment