Skip to content

Commit 052b596

Browse files
Merge pull request #1 from shreedhar-sde/shreedhar-sde-patch-1
Update py_houghlines.rst
2 parents 4353285 + 3b8c83c commit 052b596

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

source/py_tutorials/py_imgproc/py_houghlines/py_houghlines.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ Everything explained above is encapsulated in the OpenCV function, **cv2.HoughLi
5151
import cv2
5252
import numpy as np
5353

54-
img = cv2.imread('dave.jpg')
54+
img = cv2.imread('dave.png')
5555
gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
5656
edges = cv2.Canny(gray,50,150,apertureSize = 3)
5757

5858
lines = cv2.HoughLines(edges,1,np.pi/180,200)
59-
for rho,theta in lines[0]:
59+
for line in lines:
60+
rho,theta= line[0]
6061
a = np.cos(theta)
6162
b = np.sin(theta)
6263
x0 = a*rho

0 commit comments

Comments
 (0)