diff --git a/chapter3/hough_lines.py b/chapter3/hough_lines.py index b5503fc..1abbb98 100644 --- a/chapter3/hough_lines.py +++ b/chapter3/hough_lines.py @@ -7,7 +7,8 @@ minLineLength = 20 maxLineGap = 5 lines = cv2.HoughLinesP(edges,1,np.pi/180,20,minLineLength,maxLineGap) -for x1,y1,x2,y2 in lines[0]: +lines = lines[:,0,:] +for x1,y1,x2,y2 in lines: cv2.line(img,(x1,y1),(x2,y2),(0,255,0),2) cv2.imshow("edges", edges) diff --git a/chapter3/planets_circles.jpg b/chapter3/planets_circles.jpg index 9b0fb43..a2abe00 100644 Binary files a/chapter3/planets_circles.jpg and b/chapter3/planets_circles.jpg differ diff --git a/chapter3/skin.jpg b/chapter3/skin.jpg index de692b6..cbfbf0a 100644 Binary files a/chapter3/skin.jpg and b/chapter3/skin.jpg differ