Example: 50-Arduino-Boards/Nano-RP2040/53-Thermal/thermal_camera.py

# 本作品采用MIT许可证授权。
# 版权所有 (c) 2013-2023 OpenMV LLC。保留所有权利。
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# 热像仪演示
#
# 此示例展示了如何使用常见的低分辨率 FIR 传感器(如 MLX 或 AMG)。
# 注意:目前只有 AMG8833 在 NANO RP2040 上启用。

import image
import time
import fir

IMAGE_SCALE = 5  # 将图像缩放至5倍。
drawing_hint = image.BICUBIC  # 或 image.BILINEAR 或 0(最近邻)

# 初始化热传感器
fir.init()  # 自动检测连接的传感器。

# FPS时钟
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。
    print(clock.fps())

results matching ""

    No results matching ""