
代码为:
import pyb, sensor, image
sensor.reset()
sensor.set_framesize(sensor.QVGA)
grayscale_thres = (170, 255)
rgb565_thres = (70, 100, -128, 127, -128, 127)
while(True):
img = image.Image('2.bmp',copy_to_fb=True)
img.dilate(4)
for l in img.find_lines(threshold = 1000, theta_margin = 25, rho_margin = 25):
img.draw_line(l.line(), color = (255, 0, 0))

改改参数试试,或者被识别图的彩图发来看看
增大threshold 参数,
