2
26cl 发布的帖子
-
openmv 图像闪屏 加失真
```
#设置阈值,(0,100)检测黑色线 THRESHOLD = (0, 100) # Grayscale threshold for dark things... #设置是否使用img.binary()函数进行图像分割 BINARY_VISIBLE = True # Does binary first so you can see what the linear regression # is being run on... might lower FPS though. import sensor, image, time sensor.reset() sensor.set_pixformat(sensor.GRAYSCALE) sensor.set_framesize(sensor.QQVGA) sensor.skip_frames(time = 2000) clock = time.clock() while(True): clock.tick() img = sensor.snapshot().binary([THRESHOLD]) if BINARY_VISIBLE else sensor.snapshot() img.invert()