openmv/usr/examples/surf_detect_and_draw.py
2014-04-04 21:08:33 +02:00

12 lines
293 B
Python

import sensor, time
# Set sensor to grayscale
sensor.set_pixformat(sensor.GRAYSCALE)
clock = time.clock()
while (True):
image = sensor.snapshot()
clock.tick()
kp = image.find_keypoints(upright=False, thresh=0.0004, octaves=2)
image.draw_keypoints(kp)
print (clock.avg())