import sensor, time, image, pyb
sensor.reset() # Initialize the camera sensor.
sensor.set_pixformat(sensor.GRAYSCALE) # or sensor.GRAYSCALE
sensor.set_framesize(sensor.B128X128) # or sensor.QQVGA (or others)
sensor.set_windowing((92,112))
sensor.skip_frames(10) # Let new settings take affect.
sensor.skip_frames(time = 500) #等待5s
# 拍摄当前人脸。
img = sensor.snapshot()
d0 = img.find_lbp((0, 0, img.width(), img.height()))
d1 = image.load_decriptor("cs/c1.orb")
dist= image.match_descriptor(d0, d1)
print(dist)@42ti 一直报错 'module' object has no attribute 'load_decriptor' 但是用help(image)看这个方法是有的。固件库也已经更新到最新了
load_descriptor
不是 load_decriptor
@kidswong999 谢谢,不过这个函数中文文档和IDE的自动代码补全都是错误的这个,你们可以把它改过来