循迹程序,为什么画面里不显示教程里那个绿色的直线
-
THRESHOLD =(0, 30, -10, 2, -6, 6) # Grayscale threshold for dark things... import sensor, image, time sensor.reset() #sensor.set_vflip(True) #sensor.set_hmirror(True) sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.QQVGA) # 80x60 (4,800 pixels) - O(N^2) max = 2,3040,000. #sensor.set_windowing([0,20,80,40]) sensor.skip_frames(time = 2000) # WARNING: If you use QQVGA it may take seconds clock = time.clock() # to process a frame sometimes. while(True): clock.tick() img = sensor.snapshot().binary([THRESHOLD]) line = img.get_regression([(100,100,0,0,0,0)], robust = True) if (line): rho_err = abs(line.rho())-img.width()/2 if line.theta()>90: theta_err = line.theta()-180 else: theta_err = line.theta() img.draw_line(line.line(), color=(255,0,0)) print(rho_err,line.magnitude(),rho_err)
循迹程序,为什么画面里不显示教程里那个绿色的直线
-
https://forum.singtown.com/topic/2888/更新固件后二值化函数binary-跟以前的不一样了-问题很严重-请官方给与解释/7
我感觉是固件的问题,你烧录成3.2.0的固件试一下。