diff --git a/docs/doc/en/modules/thermography_mlx90640.md b/docs/doc/en/modules/thermography_mlx90640.md new file mode 100644 index 00000000..1f10c13f --- /dev/null +++ b/docs/doc/en/modules/thermography_mlx90640.md @@ -0,0 +1,15 @@ +--- +title: MaixCAM MaixPy Reading Thermography Sensor mlx90640 +--- + +## Introduction + +MLX90640 is an industrial standard and fully calibrated 32*24 pixel thermal infrared array sensor. + +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. + +If you have this requirement, please visit [Sipeed Store](https://wiki.sipeed.com/store.html) for inquiries and purchases. + +## Usage + +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) diff --git a/docs/doc/en/modules/tof_opns303x.md b/docs/doc/en/modules/tof_opns303x.md new file mode 100644 index 00000000..45ef54fc --- /dev/null +++ b/docs/doc/en/modules/tof_opns303x.md @@ -0,0 +1,17 @@ +--- +title: MaixCAM MaixPy Using TOF Module OPNS303x for Ranging and Terrain Detection +--- + +## Introduction + +OPNS303x is a 100x100 TOF module, suitable for ranging or terrain detection. + +The current OPNS303x driver is compatible with OPNS3031 (the same model as MaixSense-A010). + +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. + +If you have a TOF requirement, please visit [Sipeed Store](https://wiki.sipeed.com/store.html) for inquiries and purchases. + +## Usage + +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) diff --git a/docs/doc/en/sidebar.yaml b/docs/doc/en/sidebar.yaml index 119f7422..9d53ee91 100644 --- a/docs/doc/en/sidebar.yaml +++ b/docs/doc/en/sidebar.yaml @@ -72,7 +72,7 @@ items: - file: vision/object_track.md label: Object tracking and counting - file: vision/ocr.md - label: OCR + label: OCR - file: vision/maixhub_train.md label: MaixHub online AI training - file: vision/customize_model_yolov5.md @@ -178,8 +178,12 @@ items: label: Power Management Unit - file: modules/fp5510.md label: Voice Coil Motor FP5510 - file: modules/spilcd.md + - file: modules/spilcd.md label: SPI LCD Screen + - file: modules/thermography_mlx90640.md + label: MLX90640 + - file: modules/tof_opns303x.md + label: TOF OPNS303x - label: Projects items: diff --git a/docs/doc/zh/modules/thermography_mlx90640.md b/docs/doc/zh/modules/thermography_mlx90640.md new file mode 100644 index 00000000..eb04c0f2 --- /dev/null +++ b/docs/doc/zh/modules/thermography_mlx90640.md @@ -0,0 +1,17 @@ +--- +title: MaixCAM MaixPy 读取热成像传感器mlx90640 +--- + +## 简介 + +MLX90640 是工业标准并经过完全校准的 32*24 像素热红外阵列传感器. + +通过给 MaixCAM 外挂一个热成像传感器mlx90640, 调用 `matrix()` 方法可以获得 32x24 的温度数据矩阵(list[24][32]), 适用于需要温度数据的应用场景. 调用 `image()` 方法可以直接获取 MaixCAM 能显示的伪彩色图像, 相当于 `obj.image_from(obj.matrix())`. 调用 `xxx_temp_point()` 方法可以获得最近一帧数据中的最小最大以及中心温度的值和对应的坐标. + +如果您有该需求, 欢迎您访问 [Sipeed Store](https://wiki.sipeed.com/store.html) 咨询购买. + +## 使用 + +示例代码在[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) + + diff --git a/docs/doc/zh/modules/tof_opns303x.md b/docs/doc/zh/modules/tof_opns303x.md new file mode 100644 index 00000000..f9973680 --- /dev/null +++ b/docs/doc/zh/modules/tof_opns303x.md @@ -0,0 +1,19 @@ +--- +title: MaixCAM MaixPy 使用 TOF 模块 OPNS303x 测距和地形检测 +--- + +## 简介 + +OPNS303x 是炬佑推出的 100x100 TOF 模块, 可用于测距或者地形检测. + +本 OPNS303x 驱动目前适配了 OPNS3031(MaixSense-A010同款). + +通过给 MaixCAM 外接一个 OPNS3031, 调用 `matrix()` 方法可以获得距离数据矩阵, 适用于需要距离数据的应用场景. 调用 `image()` 方法可以直接获取 MaixCAM 能显示的伪彩色图像, 相当于 `obj.image_from(obj.matrix())`. 调用 `xxx_dis_point()` 方法可以获得最近一帧数据中的最小最大以及中心点距离的值和对应的坐标. + +如果您有 TOF 需求, 欢迎您访问 [Sipeed Store](https://wiki.sipeed.com/store.html) 咨询购买. + +## 使用 + +示例代码在[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) + + diff --git a/docs/doc/zh/sidebar.yaml b/docs/doc/zh/sidebar.yaml index 0f3ed643..5e3ec2ac 100644 --- a/docs/doc/zh/sidebar.yaml +++ b/docs/doc/zh/sidebar.yaml @@ -179,8 +179,12 @@ items: label: 电源管理单元 - file: modules/fp5510.md label: 音圈电机 FP5510 - file: modules/spilcd.md + - file: modules/spilcd.md label: SPI LCD 屏幕 + - file: modules/thermography_mlx90640.md + label: 热成像模块 MLX90640 + - file: modules/tof_opns303x.md + label: TOF模块 OPNS303x - label: 项目实战 items: diff --git a/examples/ext_dev/sensors/thermography_mlx90640/mlx90640_example.py b/examples/ext_dev/sensors/thermography_mlx90640/mlx90640_example.py new file mode 100644 index 00000000..65ed0ada --- /dev/null +++ b/examples/ext_dev/sensors/thermography_mlx90640/mlx90640_example.py @@ -0,0 +1,18 @@ +from maix import display, app, time, ext_dev + +disp = display.Display() + +mlx = ext_dev.mlx90640.MLX90640Celsius( + 5, + ext_dev.mlx90640.FPS.FPS_32, + ext_dev.cmap.Cmap.WHITE_HOT, + 5, 50, 0.95) + +while not app.need_exit(): + img = mlx.image() + disp.show(img) + print("min: ", mlx.min_temp_point()) + print("max: ", mlx.max_temp_point()) + print("center: ", mlx.center_point()) + fps = time.fps() + print(f"time: {1000/fps:.02f}ms, fps: {fps:.02f}") \ No newline at end of file diff --git a/examples/ext_dev/sensors/tof_opns303x/tof_opns303x_example.py b/examples/ext_dev/sensors/tof_opns303x/tof_opns303x_example.py new file mode 100644 index 00000000..fe97aca1 --- /dev/null +++ b/examples/ext_dev/sensors/tof_opns303x/tof_opns303x_example.py @@ -0,0 +1,19 @@ +from maix import display, app, time, ext_dev + +disp = display.Display() + +tof = ext_dev.opns303x.Opns303x( + 4, + ext_dev.opns303x.Resolution.RES_50x50, + ext_dev.cmap.Cmap.JET, + 40, 1000) + +while not app.need_exit(): + img = tof.image() + if img is not None: + disp.show(img) + print("min: ", tof.min_dis_point()) + print("max: ", tof.max_dis_point()) + print("center: ", tof.center_point()) + fps = time.fps() + print(f"time: {1000/fps:.02f}ms, fps: {fps:.02f}") \ No newline at end of file