mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
19 lines
473 B
Python
19 lines
473 B
Python
import sensor, time
|
|
# Set sensor gainceiling
|
|
sensor.set_gainceiling(16)
|
|
# Set sensor brightness
|
|
sensor.set_brightness(-2)
|
|
# Set sensor to grayscale
|
|
sensor.set_pixformat(sensor.GRAYSCALE)
|
|
|
|
image = sensor.snapshot()
|
|
kp = image.find_keypoints(upright=False, thresh=0.0004, octaves=2)
|
|
image.draw_keypoints(kp)
|
|
time.sleep(2000)
|
|
|
|
clock = time.clock()
|
|
while (True):
|
|
image = sensor.snapshot()
|
|
clock.tick()
|
|
ipts2 = image.find_keypoints_match(kp)
|
|
print (clock.avg()) |