logo

没能在图像中返回一条直线

2019-07-26 17:36
3
愚
# Hello World Example
#
# Welcome to the OpenMV IDE! Click on the green run arrow button below to run the script!

import sensor, image, time

red_thresholds = (33, 77, 12, 82, -4, 59)

sensor.reset()                      
sensor.set_pixformat(sensor.RGB565) 
sensor.set_framesize(sensor.QQQVGA) 
sensor.skip_frames(time = 2000)     
clock = time.clock()               

while(True):
    clock.tick()                    
    img = sensor.snapshot().binary([red_thresholds]) 
    line = img.get_regression([(100,100,0,0,0,0)], robust = True)
    if (line):
        img.draw_line(line.line(), color = 127)
    
    print(clock.fps())
07c57393-715b-4fdd-bd0f-cb63e34d9527.PNG
2019-07-26 18:25
I
网红小智智 星瞳科技

固件有bug,升级到最新的3.4.1固件解决。

2019-07-27 10:32
3
愚

@kidswong999 谢了