Skip to content

Commit a1913ee

Browse files
authored
Merge pull request #92 from MK16kawai/dev
add mlx90640&tof_opns303x example&docs
2 parents b6fca43 + f3ee66f commit a1913ee

File tree

8 files changed

+116
-3
lines changed

8 files changed

+116
-3
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
title: MaixCAM MaixPy Reading Thermography Sensor mlx90640
3+
---
4+
5+
## Introduction
6+
7+
MLX90640 is an industrial standard and fully calibrated 32*24 pixel thermal infrared array sensor.
8+
9+
By attaching a thermography sensor mlx90640 to MaixCAM, you can obtain a 32x24 temperature data matrix (list[24][32]) by calling the `matrix()` method, which is suitable for applications requiring temperature data. The `image()` method can directly get the pseudo-color image that MaixCAM can display, equivalent to `obj.image_from(obj.matrix())`. The `xxx_temp_point()` method can get the values and corresponding coordinates of the minimum, maximum, and center temperatures in the most recent frame of data.
10+
11+
If you have this requirement, please visit [Sipeed Store](https://wiki.sipeed.com/store.html) for inquiries and purchases.
12+
13+
## Usage
14+
15+
Example code is available at [MaixPy/examples/ext_dev/sensors/thermography_mlx90640/mlx90640_example.py](https://github.com/sipeed/MaixPy/tree/main/examples/ext_dev/sensors/thermography_mlx90640/mlx90640_example.py)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: MaixCAM MaixPy Using TOF Module OPNS303x for Ranging and Terrain Detection
3+
---
4+
5+
## Introduction
6+
7+
OPNS303x is a 100x100 TOF module, suitable for ranging or terrain detection.
8+
9+
The current OPNS303x driver is compatible with OPNS3031 (the same model as MaixSense-A010).
10+
11+
By connecting an OPNS3031 to MaixCAM, you can obtain a distance data matrix by calling the `matrix()` method, which is suitable for applications requiring distance data. The `image()` method can directly get the pseudo-color image that MaixCAM can display, equivalent to `obj.image_from(obj.matrix())`. The `xxx_dis_point()` method can get the values and corresponding coordinates of the minimum, maximum, and center point distances in the most recent frame of data.
12+
13+
If you have a TOF requirement, please visit [Sipeed Store](https://wiki.sipeed.com/store.html) for inquiries and purchases.
14+
15+
## Usage
16+
17+
Example code is available at [MaixPy/examples/ext_dev/sensors/tof_opns303x/tof_opns303x_example.py](https://github.com/sipeed/MaixPy/tree/main/examples/ext_dev/sensors/tof_opns303x/tof_opns303x_example.py)

docs/doc/en/sidebar.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ items:
7474
- file: vision/object_track.md
7575
label: Object tracking and counting
7676
- file: vision/ocr.md
77-
label: OCR
77+
label: OCR
7878
- file: vision/maixhub_train.md
7979
label: MaixHub online AI training
8080
- file: vision/customize_model_yolov5.md
@@ -180,8 +180,12 @@ items:
180180
label: Power Management Unit
181181
- file: modules/fp5510.md
182182
label: Voice Coil Motor FP5510
183-
file: modules/spilcd.md
183+
- file: modules/spilcd.md
184184
label: SPI LCD Screen
185+
- file: modules/thermography_mlx90640.md
186+
label: MLX90640
187+
- file: modules/tof_opns303x.md
188+
label: TOF OPNS303x
185189

186190
- label: Projects
187191
items:
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: MaixCAM MaixPy 读取热成像传感器mlx90640
3+
---
4+
5+
## 简介
6+
7+
MLX90640 是工业标准并经过完全校准的 32*24 像素热红外阵列传感器.
8+
9+
通过给 MaixCAM 外挂一个热成像传感器mlx90640, 调用 `matrix()` 方法可以获得 32x24 的温度数据矩阵(list[24][32]), 适用于需要温度数据的应用场景. 调用 `image()` 方法可以直接获取 MaixCAM 能显示的伪彩色图像, 相当于 `obj.image_from(obj.matrix())`. 调用 `xxx_temp_point()` 方法可以获得最近一帧数据中的最小最大以及中心温度的值和对应的坐标.
10+
11+
如果您有该需求, 欢迎您访问 [Sipeed Store](https://wiki.sipeed.com/store.html) 咨询购买.
12+
13+
## 使用
14+
15+
示例代码在[MaixPy/examples/ext_dev/sensors/thermography_mlx90640/mlx90640_example.py](https://github.com/sipeed/MaixPy/tree/main/examples/ext_dev/sensors/thermography_mlx90640/mlx90640_example.py)
16+
17+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
title: MaixCAM MaixPy 使用 TOF 模块 OPNS303x 测距和地形检测
3+
---
4+
5+
## 简介
6+
7+
OPNS303x 是炬佑推出的 100x100 TOF 模块, 可用于测距或者地形检测.
8+
9+
本 OPNS303x 驱动目前适配了 OPNS3031(MaixSense-A010同款).
10+
11+
通过给 MaixCAM 外接一个 OPNS3031, 调用 `matrix()` 方法可以获得距离数据矩阵, 适用于需要距离数据的应用场景. 调用 `image()` 方法可以直接获取 MaixCAM 能显示的伪彩色图像, 相当于 `obj.image_from(obj.matrix())`. 调用 `xxx_dis_point()` 方法可以获得最近一帧数据中的最小最大以及中心点距离的值和对应的坐标.
12+
13+
如果您有 TOF 需求, 欢迎您访问 [Sipeed Store](https://wiki.sipeed.com/store.html) 咨询购买.
14+
15+
## 使用
16+
17+
示例代码在[MaixPy/examples/ext_dev/sensors/tof_opns303x/tof_opns303x_example.py](https://github.com/sipeed/MaixPy/tree/main/examples/ext_dev/sensors/tof_opns303x/tof_opns303x_example.py)
18+
19+

docs/doc/zh/sidebar.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,12 @@ items:
181181
label: 电源管理单元
182182
- file: modules/fp5510.md
183183
label: 音圈电机 FP5510
184-
file: modules/spilcd.md
184+
- file: modules/spilcd.md
185185
label: SPI LCD 屏幕
186+
- file: modules/thermography_mlx90640.md
187+
label: 热成像模块 MLX90640
188+
- file: modules/tof_opns303x.md
189+
label: TOF模块 OPNS303x
186190

187191
- label: 项目实战
188192
items:
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
from maix import display, app, time, ext_dev
2+
3+
disp = display.Display()
4+
5+
mlx = ext_dev.mlx90640.MLX90640Celsius(
6+
5,
7+
ext_dev.mlx90640.FPS.FPS_32,
8+
ext_dev.cmap.Cmap.WHITE_HOT,
9+
5, 50, 0.95)
10+
11+
while not app.need_exit():
12+
img = mlx.image()
13+
disp.show(img)
14+
print("min: ", mlx.min_temp_point())
15+
print("max: ", mlx.max_temp_point())
16+
print("center: ", mlx.center_point())
17+
fps = time.fps()
18+
print(f"time: {1000/fps:.02f}ms, fps: {fps:.02f}")
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from maix import display, app, time, ext_dev
2+
3+
disp = display.Display()
4+
5+
tof = ext_dev.opns303x.Opns303x(
6+
4,
7+
ext_dev.opns303x.Resolution.RES_50x50,
8+
ext_dev.cmap.Cmap.JET,
9+
40, 1000)
10+
11+
while not app.need_exit():
12+
img = tof.image()
13+
if img is not None:
14+
disp.show(img)
15+
print("min: ", tof.min_dis_point())
16+
print("max: ", tof.max_dis_point())
17+
print("center: ", tof.center_point())
18+
fps = time.fps()
19+
print(f"time: {1000/fps:.02f}ms, fps: {fps:.02f}")

0 commit comments

Comments
 (0)