Advertisement
resta89

Untitled

Oct 23rd, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1.  
  2.  
  3. uint8
  4.  
  5. ---------------------------------------------------------------------------
  6. NameError Traceback (most recent call last)
  7. <ipython-input-63-33c069b700f4> in <module>()
  8. 121 return line_img
  9. 122
  10. --> 123 ht=hough_lines(reg,1,np.pi/180,1,25,10)
  11. 124 plt.imshow(ht)
  12. 125 plt.show()
  13.  
  14. <ipython-input-63-33c069b700f4> in hough_lines(reg, rho, theta, threshold, min_line_len, max_line_gap)
  15. 118 lines = cv2.HoughLinesP(reg, rho, theta, threshold, minLineLength=min_line_len, maxLineGap=max_line_gap)
  16. 119 line_img = np.zeros((reg.shape[0], reg.shape[1], 3), dtype=np.uint8)
  17. --> 120 draw_lines(line_img, lines)
  18. 121 return line_img
  19. 122
  20.  
  21. <ipython-input-63-33c069b700f4> in draw_lines(masked, lines, color, thickness)
  22. 100 for line in lines:
  23. 101 for x1,y1,x2,y2 in line:
  24. --> 102 cv2.line(line_image,(x1,y1),(x2,y2),(255,0,0),10)
  25. 103 color_edges = np.dstack((edges, edges, edges))
  26. 104 lines_edges = cv2.addWeighted(color_edges, 0.8, line_image, 1, 0)
  27.  
  28. NameError: name 'line_image' is not defined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement