MemoryError:Out of normal MicroPython Heap Memory!
-
import time, sensor, image from image import SEARCH_EX, SEARCH_DS sensor.reset() sensor.set_contrast(1) sensor.set_gainceiling(16) sensor.set_framesize(sensor.QQVGA) sensor.set_pixformat(sensor.GRAYSCALE) templates = ["/ren.pgm", "/zhi.pgm", "/chu.pgm"] clock = time.clock() while (True): clock.tick() img = sensor.snapshot() for tem in templates: template = image.Image(tem) r = img.find_template(template, 0.70, step=4, search=SEARCH_EX) if r: img.draw_rectangle(r) print(tem) print(clock.fps())
求助大佬 谢谢
-
模版图像太大了,用小一点的模版
-
一般都是用多大的
-