object ‘int’ is not a tuple or list?
-
import sensor, image, time sensor.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.QVGA) sensor.skip_frames(time = 2000) thresholds = [(27, 67, 19, 91, 45, 76), # 红色 (27, 90, -3, -28, 31, 125),# 绿色 (0, 30, -20, 30, -40, 50)] # 蓝色 clock = time.clock() while(True): clock.tick() img = sensor.snapshot() blobs = img.find_blobs(thresholds[0], pixels_threshold=10, area_threshold=10) if blobs.count(): max_blob=find_max(blobs) print(max_blob.code()) print(clock.fps())
好像在 blobs = img.find_blobs(thresholds[0], pixels_threshold=10, area_threshold=10)这行出的错
-