image_statistics_info.py

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

import csi
import time

csi0 = csi.CSI()
csi0.reset()
csi0.pixformat(csi.GRAYSCALE)  # أو RGB565.
csi0.framesize(csi.QVGA)
csi0.snapshot(time=2000)
csi0.auto_gain(False)  # يجب إيقافه من أجل تتبع الألوان
csi0.auto_whitebal(False)  # يجب إيقافه من أجل تتبع الألوان

clock = time.clock()

while True:
    clock.tick()
    img = csi0.snapshot()
    print(img.get_statistics())
    print(clock.fps())

# يمكنك أيضًا تمرير "roi=" إلى get_statistics() للحصول على إحصائيات تلك المنطقة فقط.
# تتيح لك get_statistics() تحديد معلومات قناة اللون بسرعة لـ
# أي منطقة في الصورة.

results matching ""

    No results matching ""