Skip to content

Commit eefdd12

Browse files
committed
task changes
1 parent 8a9468b commit eefdd12

2 files changed

Lines changed: 367 additions & 5 deletions

File tree

‎task3.py‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def mark_lines(max_theta, max_p, img):
157157

158158
def main():
159159

160-
#task 1
160+
#task 3 (a)
161161

162162
hough_img = cv2.imread("original_imgs/hough.jpg", 0)
163163

@@ -197,6 +197,12 @@ def main():
197197
hough_img_red = mark_lines(max_theta, max_p, hough_img_red)
198198

199199

200+
201+
write_image(hough_img_red,'output/red_line')
202+
203+
204+
# task 3(b)
205+
200206
hough_img_blue = hough_img.copy()
201207
co_p_t = np.unravel_index(np.argsort(accumulator.ravel())[-2800:], accumulator.shape)
202208

@@ -207,13 +213,9 @@ def main():
207213
angle_theshold = 2
208214
if abs(max_theta-145) <angle_theshold or abs(max_theta+38) <angle_theshold:
209215
hough_img_blue = mark_lines(max_theta, max_p, hough_img_blue)
210-
211-
212-
213216

214217

215218
write_image(hough_img_blue,'output/blue_line')
216-
write_image(hough_img_red,'output/red_line')
217219

218220

219221

0 commit comments

Comments
 (0)