运行的时候会出现could not find the file,帮我看下下面格式是否有问题
-
sensor.set_gainceiling(16)
sensor.set_framesize(sensor.QQVGA)
sensor.set_pixformat(sensor.GRAYSCALE)
templates = ["/0.pgm", "/1.pgm", "/2.pgm","/3.pgm","/4.pgm","/5.pgm","/6.pgm", "/7.pgm","/8.pgm","/9.pgm"]
roi1=(80,38,10,12)
roi2=(90,38,10,12)
roi2=(98,38,10,12)
roi2=(106,38,10,12)
roi2=(111,38,10,12)
clock = time.clock()
while (True):
clock.tick()
img = sensor.snapshot()
for t in templates:
template = image.Image(t)
r = img.find_template(template, 0.70,roi1=(80,38,10,12), step=4, search=SEARCH_EX)
if r:
img.draw_rectangle(r)
print(t)image.find_template() #print(clock.fps())
-
你的SD卡里有这10个pgm文件?