Check for None in keypoints script.

This commit is contained in:
iabdalkader 2018-06-25 01:23:28 +02:00
parent 833bc04f78
commit be902e1271

View File

@ -18,10 +18,11 @@ sensor.skip_frames(time = 2000)
sensor.set_auto_gain(False, value=100) sensor.set_auto_gain(False, value=100)
def draw_keypoints(img, kpts): def draw_keypoints(img, kpts):
print(kpts) if kpts:
img.draw_keypoints(kpts) print(kpts)
img = sensor.snapshot() img.draw_keypoints(kpts)
time.sleep(1000) img = sensor.snapshot()
time.sleep(1000)
kpts1 = None kpts1 = None
# NOTE: uncomment to load a keypoints descriptor from file # NOTE: uncomment to load a keypoints descriptor from file