Hello,
I’m using Openmv cam7 and lerning micropython. I saved ORB descriptor using “image.save_descriptor” then tried to match descriptors using
“image.match_descriptor”. But this error was returned.
OSError:Descriptor type is not supported
Same error was occuerred LBP descriptor. Please teach me how to solve this problem.
import time, image, sensor, pyb
def resistration():
global kpts1
global tem_img
global FILE_NAME1
global FILE_NAME2
global FILE_NAME3
global FILE_NAME4
global desc1
FILE_NAME1="01"
FILE_NAME2="02"
FILE_NAME3="03"
FILE_NAME4="04"
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
clock = time.clock()
clock.tick()
pyb.delay(100)
tem_img=sensor.snapshot().save("/%s.bmp"%(FILE_NAME1),roi=(121,0,203,196))
tem_img=tem_img.mode(3, threshold=True, offset=4, invert=True)
kpts1=tem_img.find_keypoints(max_keypoints=300,roi=(121,0,203,196),threshold=20,normalized=False,scale_factor=1.2,corner_detector=image.CORNER_AGAST)
key_temimg=tem_img.draw_keypoints(kpts1)
desc1=image.save_descriptor(kpts1,"/%s.orb"%(FILE_NAME1))
def authentication():
global img_dst
sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)
sensor.set_framesize(sensor.QVGA)
sensor.skip_frames(time = 2000)
clock = time.clock()
clock.tick()
pyb.delay(100)
img=sensor.snapshot().save("/%s.bmp"%(FILE_NAME3),roi=(121,0,203,196))
tem2=img.mode(3, threshold=True, offset=4, invert=True)
kpts2=tem2.find_keypoints(max_keypoints=300,roi=(121,0,203,196),threshold=20,normalized=False,scale_factor=1.2,corner_detector=image.CORNER_AGAST)
key_img=tem2.draw_keypoints(kpts2)
desc2=image.save_descriptor(kpts2,"/%s.orb"%(FILE_NAME4))
match=image.match_descriptor(desc1,desc2,threshold=70,filter_outliers=True)
if match.count()>=10:
print(match.count())
time.sleep(100)
else:
print("match count:",match.count())
raise(Exception("AUTHENTICATE FAIL : TRY AGAIN!"))
Thank you for your advence.