logo

为什么这个grayscale_to_binary没法使用

2019-04-06 10:29
1
_17396229650
import sensor, image, time

sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)

clock = time.clock()

while(True):
    clock.tick()
    img = sensor.snapshot()
    img.grayscale_to_binary(128)
    print(clock.fps())
7aff4920-057e-46cb-99aa-29f7c001d85e.png
2019-04-08 09:30
I
网红小智智 星瞳科技

OpenMV本来也没有这个grayscale_to_binary函数,这个函数是你猜的名字。

灰度二值化

http://book.openmv.cc/example/04-Image-Filters/grayscale-binary-filter.html

彩色二值化

http://book.openmv.cc/example/04-Image-Filters/color-binary-filter.html