麻烦大佬帮我看一下,谢谢谢谢,急!!!
-
import sensor, time, image
SUB = "s2"
NUM_SUBJECTS = 5
NUM_SUBJECTS_IMGS = 10img = image.Image("orl_faces/%s/1.pgm"%(SUB)).mask_ellipse()
d0 = img.find_lbp((0, 0, img.width(), img.height()))
img = Noneprint("")
for s in range(1, NUM_SUBJECTS+1):
dist = 0
for i in range(2, NUM_SUBJECTS_IMGS+1):
img = image.Image("orl_faces/s%d/%d.pgm"%(s, i)).mask_ellipse()
d1 = img.find_lbp((0, 0, img.width(), img.height()))
dist += image.match_descriptor(d0, d1)
print("Average dist for subject %d: %d"%(s, dist/NUM_SUBJECTS_IMGS))img = image.Image("orl_faces/%s/1.pgm"%(SUB)).mask_ellipse()
img = image.Image("orl_faces/s%d/%d.pgm"%(s, i)).mask_ellipse()
我把上面这两句话改成下面这两句,运行时会出现错误,麻烦大佬告诉我哪里出了问题,谢谢。。。。
img = image.Image("C:/Users/wx/Desktop/wx.pgm"%(SUB)).mask_ellipse()
img = image.Image("C:/Users/wx/Desktop%d/%d.pgm"%(s, i)).mask_ellipse()
-
http://book.openmv.cc/MCU/filesys.html
你的C盘,与OpenMV没有关系,OpenMV的文件系统是他自己的。
-
@kidswong999 我把SD卡插在了MV上,img = image.Image("orl_faces/I/wx"%(SUB)).mask_ellipse()可是提示 这样的错误,那我应该怎么改呢?麻烦提示一下