mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
15 lines
449 B
Python
15 lines
449 B
Python
import sensor, imlib, time
|
|
clock = time.clock()
|
|
# Set sensor to grayscale
|
|
sensor.set_pixformat(sensor.GRAYSCALE)
|
|
sensor.set_brightness(-2)
|
|
image = sensor.snapshot()
|
|
surf1 = imlib.surf_detector(image, False, 0.0004)
|
|
imlib.surf_draw_ipts(image, surf1)
|
|
time.sleep(2000)
|
|
while (True):
|
|
image = sensor.snapshot()
|
|
clock.tick()
|
|
surf2 = imlib.surf_detector(image, False, 0.0004)
|
|
imlib.surf_match(image, surf1, surf2)
|
|
print (clock.avg()) |