logo

load_decriptor方法一直报错

2020-03-14 22:06
7
_42ti
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)
2020-03-14 22:19
7
_42ti

@42ti 一直报错 'module' object has no attribute 'load_decriptor' 但是用help(image)看这个方法是有的。固件库也已经更新到最新了

2020-03-15 16:42
I
网红小智智 星瞳科技

load_descriptor

不是 load_decriptor

2020-03-15 17:54
7
_42ti

@kidswong999 谢谢,不过这个函数中文文档和IDE的自动代码补全都是错误的这个,你们可以把它改过来