【2024 DigiKey 创意大赛】“双光融合”智能热像仪第一部分:可见光部分实现
# 【2024 DigiKey 创意大赛】“双光融合”智能热像仪第一部分:可见光部分实现## 一、openmv入门使用
### 1. openmvIDE
#### 1.1 软件安装
在官网上安装与自己使用的版本相同的软件
网址:(https://openmv.io/pages/download)
#### 1.2 了解IDE的功能与使用方式
(1)将openmv通过数据线连接到电脑,在IDE的右下角显示出一个可被连接的图标
(2)点击连接,最下方的信息中显示出板子与摄像头的型号、固件信息等
#### 1.3 demo运行测试
(1)点击左下角绿色播放按键运行代码,可以看到运行正常无报错,帧缓冲区中显示出拍摄到的图像,输出拍摄的帧率。
代码如下:
```python
# This work is licensed under the MIT license.
# Copyright (c) 2013-2023 OpenMV LLC. All rights reserved.
# https://github.com/openmv/openmv/blob/master/LICENSE
#
# Hello World Example
#
# Welcome to the OpenMV IDE! Click on the green run arrow button below to run the script!
import sensor
import time
sensor.reset()# Reset and initialize the sensor.
sensor.set_pixformat(sensor.RGB565)# Set pixel format to RGB565 (or GRAYSCALE)
sensor.set_framesize(sensor.QVGA)# Set frame size to QVGA (320x240)
sensor.skip_frames(time=2000)# Wait for settings take effect.
clock = time.clock()# Create a clock object to track the FPS.
while True:
clock.tick()# Update the FPS clock.
img = sensor.snapshot()# Take a picture and return the image.
print(clock.fps())# Note: OpenMV Cam runs about half as fast when connected
# to the IDE. The FPS should increase once disconnected.
```
(2)运行结果如下:
<p>openmv相关连接:<br />
网址:https://openmv.io/pages/download<br />
中文教程:https://book.openmv.cc/<br />
中文函数文档(版本较老,有能力的建议直接阅读英文):https://docs.singtown.com/micropython/zh/latest/pyboard/index.html</p>
<p>openmv使用micropython语言,给出相关连接:<br />
micropython官网:https://micropython.org/<br />
micropython GitHub仓库:https://github.com/micropython/micropython</p>
页:
[1]