Hi,
I want to detect white lines in my camera’s images, using this code:
img = sensor.snapshot()
blackImage = img.to_grayscale(copy = True).binary([(190, 255)])
segments = blackImage.find_line_segments(merge_distance = 10, max_theta_diff = 5)
for segment in segments:
img.draw_line(segment.line(), color = (255, 0, 0))
I’m calling to_grayscale() and binary() to detect the lines in a black and white image, to be more accurate.
But the last call (img.draw_line) doesn’t draw the lines in the displayed image (in the IDE), why?
(If I put to_grayscale(copy = False), I see grey lines in the displayed image)