genx320_histogram_grayscale_mode.py

# هذا العمل مرخص بموجب ترخيص MIT.
# حقوق النشر (c) 2013-2024 OpenMV LLC. جميع الحقوق محفوظة.
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# يوضح هذا المثال استخدام كاميرا الأحداث genx320 من شركة Prophesee.

import csi
import time

csi0 = csi.CSI(cid=csi.GENX320)
csi0.reset()
csi0.pixformat(csi.GRAYSCALE)
csi0.framesize((320, 320))
csi0.brightness(128)  # اتركها عند 128 عمومًا (هذه هي القيمة الافتراضية).
csi0.contrast(16)  # زدها لجعل الصورة أكثر وضوحًا.

# معدل الإطارات الافتراضي هو 50 FPS. يمكنك تغييره بين ~20 FPS و~350 FPS.
csi0.framerate(50)

clock = time.clock()

while True:
    clock.tick()

    img = csi0.snapshot()
    # img.median(1) # تنظيف الضوضاء.

    print(clock.fps())

results matching ""

    No results matching ""