
# Color Binary Filter Example
#
# This script shows off the binary image filter. You may pass binary any
# number of thresholds to segment the image by.
import sensor, image, time
sensor.reset()
sensor.set_framesize(sensor.QVGA)
sensor.set_pixformat(sensor.RGB565)
sensor.skip_frames(time = 2000)
clock = time.clock()
# Use the Tools -> Machine Vision -> Threshold Edtor to pick better thresholds.
red_threshold = (23,45, -6,2, -1,8) # L A B
while(True):
# Test red threshold
for i in range(100):
clock.tick()
img = sensor.snapshot()
img.binary([red_threshold])
print(img.get_pixel(100,200))升级到最新的固件。
3.4.1解决这个bug。
好的:grinning_face_with_smiling_eyes:
@fry6 请问你解决了吗 我的是最新的 还是这样 灰度图像
@klhc 你要确定你的固件版本,目前最新的是3.4.1