Example: 01-Camera/03-Event-Cameras/02-Genx320/genx320_grayscale_set_afk.py

# 本作品采用MIT许可证授权。
# 版权所有 (c) 2013-2024 OpenMV LLC。保留所有权利。
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# This example shows off using the GenX320 event sensor from Prophesee and controlling
# AntiFlicKer (AFK) filter bloc in the GenX320 digital pipeline.
# AFK allows to detect periodic changes of given frequencies in the scene and filter them out.

import sensor
import time

sensor.reset()
sensor.set_pixformat(sensor.GRAYSCALE)  # 必须始终为灰度。
sensor.set_framesize(sensor.B320X320)  # 必须始终为320x320。
sensor.set_framerate(100)

# Enables AFK filter to remove periodic data in the frequency range from 130Hz to 160Hz
sensor.ioctl(sensor.IOCTL_GENX320_SET_AFK, 1, 130, 160)
# Disables AFK filter
# sensor.ioctl(sensor.IOCTL_GENX320_SET_AFK, 0)

clock = time.clock()

while True:
    clock.tick()

    img = sensor.snapshot()

    print(clock.fps())

results matching ""

    No results matching ""