mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
* Remove SURF code and MP functions * Add FAST/FREAK keypoint extractor/descriptor * Add FAST/FREAK Python example
21 lines
433 B
Python
21 lines
433 B
Python
import sensor, time
|
|
#sensor.reset()
|
|
sensor.set_framesize(sensor.QQVGA)
|
|
# Set sensor to grayscale
|
|
sensor.set_pixformat(sensor.GRAYSCALE)
|
|
|
|
image = sensor.snapshot()
|
|
kpts = image.find_keypoints(threshold=30, normalized=False)
|
|
print (kpts)
|
|
time.sleep(500)
|
|
|
|
clock = time.clock()
|
|
while (True):
|
|
clock.tick()
|
|
image = sensor.snapshot()
|
|
try:
|
|
image.match_keypoints(kpts, 64)
|
|
except:
|
|
pass
|
|
print (clock.fps())
|