ルーチン説明 04-Image-Filters->grayscale_binary_filter グレースケール二値化
import sensor, image, math
sensor.reset()
sensor.set_framesize(sensor.QVGA)
sensor.set_pixformat(sensor.GRAYSCALE)
low_threshold = (0, 50)
high_threshold = (205, 255)
while(True):
for i in range(100):
img = sensor.snapshot()
img.binary([low_threshold])
for i in range(100):
img = sensor.snapshot()
img.binary([high_threshold])
for i in range(100):
img = sensor.snapshot()
img.binary([low_threshold], invert = 1)
for i in range(100):
img = sensor.snapshot()
img.binary([high_threshold], invert = 1)
Singtown Technology OpenMV
公式中国語ドキュメント機能説明: