thermal_camera.py

# Dieses Werk ist unter der MIT-Lizenz lizenziert.
# Copyright (c) 2013-2023 OpenMV LLC. Alle Rechte vorbehalten.
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# Wärmebildkamera-Demo
#
# Dieses Beispiel zeigt, wie eine Heatmap auf die
# Live-Videoausgabe der Hauptkamera Ihrer OpenMV Cam überlagert wird.

import image
import time
import fir

IMAGE_SCALE = 5  # Bild auf das 5-fache skalieren.
drawing_hint = image.BICUBIC  # oder image.BILINEAR oder 0 (nächster Nachbar)

# Wärmebildsensor initialisieren
fir.init()
w = fir.width()
h = fir.height()

if fir.type() == fir.FIR_AMG8833:
    IMAGE_SCALE = IMAGE_SCALE * 2

# FPS-Uhr
clock = time.clock()

while True:
    clock.tick()

    try:
        img = fir.snapshot(
            x_scale=IMAGE_SCALE,
            y_scale=IMAGE_SCALE,
            color_palette=image.PALETTE_IRONBOW,
            hint=drawing_hint,
            copy_to_fb=True,
        )
    except OSError:
        continue

    # FPS ausgeben.
    print(clock.fps())

results matching ""

    No results matching ""