@kidswong999
由于不能上传pgm格式图片,我把拓展名改成了jpg格式,麻烦一下您下载后把拓展名改回pgm格式,然后试一下。谢谢!
K
kbl4 发布的帖子
-
RE: SD卡里图片是用openmv的VGA像素拍摄的,
-
SD卡里图片是用openmv的VGA像素拍摄的,
代码就是检测到有人,就把视线内的所有人脸与SD卡里的人脸对比,SD卡里图片是用openmv的VGA像素拍摄的,有90多KB。一读取就内存报错MemoryError: Out of normal MicroPython Heap Memory!。代码和要比对的图片如下:
# Face recognition with LBP descriptors. # See Timo Ahonen's "Face Recognition with Local Binary Patterns". # # Before running the example: # 1) Download the AT&T faces database http://www.cl.cam.ac.uk/Research/DTG/attarchive/pub/data/att_faces.zip # 2) Exract and copy the orl_faces directory to the SD card root. import sensor, time, image, pyb sensor.reset() # Initialize the camera sensor. sensor.set_pixformat(sensor.GRAYSCALE) # or sensor.GRAYSCALE sensor.set_framesize(sensor.VGA) # or sensor.QQVGA (or others) sensor.skip_frames(10) # Let new settings take affect. sensor.skip_frames(time = 5000) #等待5s i = 1 # 拍摄当前人脸。 face_cascade = image.HaarCascade("frontalface", stages=25) while(True): img = sensor.snapshot() #img = image.Image("singtown/%s/1.pgm"%(SUB)) objects = img.find_features(face_cascade, threshold=0.75, scale=1.35) if not objects : print("no people") continue for face in objects: d0 = img.find_lbp(face) img = image.Image("%d.pgm"%i) d1 = img.find_lbp((0, 0, img.width(), img.height())) dist = image.match_descriptor(d0, d1)#计算d0 d1即样本图像与被检测人脸的特征差异度。 if dist >28000: print("people is not match") else: print("There's a match here ")
-
请问用openmv4plus,如何把外部ram分配用来存储程序里的变量?
请问openmv4plus,外部ram只能用来做帧数据缓冲区吗?可以分配用来存储程序里的变量吗?读取SD卡文件300多KB文件就报内存溢出。
-
请问openmv4 H7plus如何调用外部ram?
请问openmv4 H7plus如何调用外部ram? 还是固件里已经分配好了,之前买的openmv4报错内存不够,后来买了openmv4plus还是运行到同一行代码就内存报错。