tof_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
#
# Time-of-Flight-Kamera-Demo.

import image
import time
import tof

IMAGE_SCALE = 10  # Bild auf das 10-fache skalieren.

# ToF-Sensor initialisieren
tof.init()  # Erkennt den angeschlossenen Sensor automatisch.

# FPS-Uhr
clock = time.clock()

while True:
    clock.tick()

    try:
        img = tof.snapshot(
            vflip=True,
            hmirror=True,
            x_scale=IMAGE_SCALE,
            y_scale=IMAGE_SCALE,
            hint=image.BILINEAR,
            scale=(0, 4000),
            copy_to_fb=True,
            color_palette=image.PALETTE_DEPTH,
        )
    except RuntimeError:
        continue

    print(clock.fps())

results matching ""

    No results matching ""