mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
23 lines
553 B
Python
23 lines
553 B
Python
# This work is licensed under the MIT license.
|
|
# Copyright (c) 2013-2024 OpenMV LLC. All rights reserved.
|
|
# https://github.com/openmv/openmv/blob/master/LICENSE
|
|
#
|
|
# This example shows off using the genx320 event camera from Prophesee.
|
|
|
|
import sensor
|
|
import time
|
|
|
|
sensor.reset()
|
|
sensor.set_pixformat(sensor.GRAYSCALE) # Must always be grayscale.
|
|
sensor.set_framesize(sensor.B320X320) # Must always be 320x320.
|
|
|
|
clock = time.clock()
|
|
|
|
while True:
|
|
clock.tick()
|
|
|
|
img = sensor.snapshot()
|
|
# img.median(1) # noise cleanup.
|
|
|
|
print(clock.fps())
|