mirror of
https://github.com/m5stack/m5-docs.git
synced 2026-05-20 10:23:01 -07:00
add v-function color trace tutorial
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 105 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
@@ -36,12 +36,24 @@ ESP32Cam/M5Camera AP can only connect with one device at a time.
|
||||
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/LukeVideo/M5stack%20ESP32cam%20VS%20M5Camera%20(PSram)%20%20%20Setup.mp4" type="video/mp4">
|
||||
</video>
|
||||
|
||||
## Firmware
|
||||
## Example
|
||||
|
||||
ESP32Cam Firmware: https://github.com/m5stack/M5Stack-Camera/tree/master/wifi/wifi_ap/firmware/ESP32-Camera
|
||||
### Firmware
|
||||
|
||||
M5Camera Firmware: https://github.com/m5stack/M5Stack-Camera/tree/master/wifi/wifi_ap/firmware/M5Camera
|
||||
- **[M5Camera](https://github.com/m5stack/M5Stack-Camera/tree/master/wifi/wifi_ap/firmware/M5Camera)**
|
||||
|
||||
M5CameraX Firmware: https://github.com/m5stack/M5Stack-Camera/tree/master/wifi/wifi_ap/firmware/M5CameraX
|
||||
|
||||
M5CameraF Firmware: https://github.com/m5stack/M5Stack-Camera/tree/master/wifi/wifi_ap/firmware/M5CameraF
|
||||
### Code
|
||||
|
||||
- **[Face recognition](https://github.com/m5stack/M5Stack-Camera/tree/master/face_recognize/firmware/M5Camera)**
|
||||
|
||||
- **[Serial communication-M5Camera](https://github.com/m5stack/M5Stack-Camera/tree/master/uart/firmware/M5Camera)**
|
||||
|
||||
- **[Serial communication-M5Core](https://github.com/m5stack/M5Stack-Camera/tree/master/uart/arduino)**(The serial communication routine is the communication between the camera and the M5Core.)
|
||||
|
||||
- **[QRcode](https://github.com/m5stack/M5Stack-Camera/tree/master/qr)**
|
||||
|
||||
- **[MPU6050](https://github.com/m5stack/M5Stack-Camera/tree/master/mpu6050/firmware/M5Camera)**(Gyro Example after soldering **MPU6050**)
|
||||
|
||||
### Source Code
|
||||
- **[M5Camera](https://github.com/m5stack/M5Stack-Camera)**
|
||||
@@ -23,6 +23,7 @@ V-Function is a series of **visual recognition** functional firmware developed b
|
||||
<div style="margin: 0px 10px 10px 0px ;display:inline-block;">
|
||||
<el-tag onclick="page_move('motion-detect')">Motion detect</el-tag>
|
||||
<el-tag onclick="page_move('target-trace')">Target Trace</el-tag>
|
||||
<el-tag onclick="page_move('color-trace')">Color Trace</el-tag>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
@@ -153,6 +154,60 @@ V-Function is a series of **visual recognition** functional firmware developed b
|
||||
<img src="assets\img\quick_start\v_function\target_detect_example_02.webp" width="100%">
|
||||
|
||||
|
||||
### Color Trace
|
||||
|
||||
>Set the LAB color threshold, track the target that meets the threshold in the screen, and obtain the position information of the target object in the screen in real time.
|
||||
|
||||
<img src="assets\img\quick_start\v_function\color_trace.webp" width="50%">
|
||||
|
||||
>Program block introduction
|
||||
|
||||
- `init`
|
||||
+ initialization
|
||||
|
||||
- `Set color by L-min L-max A-min A-max B-min B-max`
|
||||
+ Set the LAB threshold for tracking
|
||||
|
||||
- `Get area pixel number`
|
||||
+ Read the number of pixels that meet the LAB threshold in the frame target
|
||||
|
||||
- `Get area x coordinate`
|
||||
+ Read the coordinate x of the upper left corner of the frame target
|
||||
|
||||
- `Get area Y coordinate`
|
||||
+ Read the coordinate y of the upper left corner of the target
|
||||
|
||||
- `Get area width`
|
||||
+ Read the width of the target object
|
||||
|
||||
- `Get area height`
|
||||
+ Read the height of the target object
|
||||
|
||||
|
||||
#### Set LAB threshold
|
||||
|
||||
> Click the button below to download the LAB color picking tool. (Currently only supports windows system)
|
||||
|
||||
<a href="https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/software/LAB-Color-Tool.exe"><el-button type="primary">下载LAB取色工具</el-button></a>
|
||||
|
||||
>Use a mobile phone or other device to take a sample picture, double-click to open the application, and click `open`-->`image` to import the image.
|
||||
|
||||
<img src="assets\img\quick_start\v_function\lab_color_tool_01.webp" width="50%">
|
||||
|
||||
|
||||
> Click the object you want to use for color recognition, record the LAB value generated below, and configure it for use in UIFlow. Supplement: Drag the interval bar of the LAB value, which can be used to customize the LAB value.
|
||||
|
||||
|
||||
<img src="assets\img\quick_start\v_function\lab_color_tool_02.webp" width="50%">
|
||||
|
||||
|
||||
>Program case: Set the LAB threshold for recognition, realize the color tracking effect, and obtain the coordinate data of the tracked object in the screen, and the number of pixels that meet the threshold.
|
||||
|
||||
<img src="assets\img\quick_start\v_function\color_trace_example_01.webp" width="100%">
|
||||
|
||||
<img src="assets\img\quick_start\v_function\color_trace_example_02.webp" width="100%">
|
||||
|
||||
|
||||
## Protocol
|
||||
|
||||
>Click the button below to download the Protocol format table. The user can use it to analyze the data format and connect the V-function to other programming platforms.
|
||||
|
||||
@@ -38,14 +38,25 @@ ESP32Cam/M5Camera 的热点一次只能连接一台电脑
|
||||
<source src="https://m5stack.oss-cn-shenzhen.aliyuncs.com/video/LukeVideo/M5stack%20ESP32cam%20VS%20M5Camera%20(PSram)%20%20%20Setup.mp4" type="video/mp4">
|
||||
</video>
|
||||
|
||||
## 固件
|
||||
## 案例程序
|
||||
|
||||
ESP32Cam 固件地址:https://github.com/m5stack/m5stack-cam-psram/tree/master/wifi/wifi_ap/firmware/ESP32-Camera
|
||||
### 出厂固件(WiFi传输图像)
|
||||
|
||||
M5Camera 固件地址 (A model):https://github.com/m5stack/m5stack-cam-psram/tree/master/wifi/wifi_ap/firmware/Camera%20A
|
||||
- **[M5Camera](https://github.com/m5stack/m5stack-cam-psram/tree/master/wifi/wifi_sta/firmware/Camera%20B)**
|
||||
|
||||
M5Camera 固件地址 (B model):https://github.com/m5stack/m5stack-cam-psram/tree/master/wifi/wifi_ap/firmware/Camera%20B
|
||||
### 例程
|
||||
|
||||
M5CameraX 固件地址:https://github.com/m5stack/m5stack-cam-psram/tree/master/wifi/wifi_ap/firmware/Camera%20X
|
||||
- **[人脸识别](https://github.com/m5stack/m5stack-cam-psram/tree/master/face_recognize/firmware/Camera%20B)**
|
||||
|
||||
- **[串口通信-M5Camera](https://github.com/m5stack/m5stack-cam-psram/tree/master/uart/firmware/Camera%20B)**
|
||||
|
||||
M5CameraF 固件地址:https://github.com/m5stack/m5stack-cam-psram/tree/master/wifi/wifi_ap/firmware/Camera%20F
|
||||
- **[串口通信-M5Core](https://github.com/m5stack/m5stack-cam-psram/tree/master/uart/arduino)**(串口通信例程为,摄像头与M5Core之间通信)
|
||||
|
||||
- **[QRcode识别](https://github.com/m5stack/m5stack-cam-psram/tree/master/qr/firmware/Camera%20B)**
|
||||
|
||||
- **[MPU6050](https://github.com/m5stack/m5stack-cam-psram/tree/master/mpu6050/firmware/Camera%20B)**(焊接**MPU6050**芯片后,陀螺仪的例程)
|
||||
|
||||
|
||||
### 源码
|
||||
|
||||
- **[M5Camera](https://github.com/m5stack/m5stack-cam-psram)**
|
||||
@@ -23,6 +23,7 @@ V-Function是由M5Stack团队针对V系列设备开发的多个**视觉识别**
|
||||
<div style="margin: 0px 10px 10px 0px ;display:inline-block;">
|
||||
<el-tag onclick="page_move('运动目标检测')">运动目标检测</el-tag>
|
||||
<el-tag onclick="page_move('目标追踪')">目标追踪</el-tag>
|
||||
<el-tag onclick="page_move('颜色追踪')">颜色追踪</el-tag>
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
@@ -143,7 +144,7 @@ V-Function是由M5Stack团队针对V系列设备开发的多个**视觉识别**
|
||||
+ 读取框选目标所在图像上的坐标,返回值为列表形式,其中包含选框的左上角坐标x,y以及选框的宽度,高度
|
||||
|
||||
- `Get trace area center coordinate`
|
||||
+ 读取框选目标所在图像上的中心坐标,返回值为列表形式,其中包含选框的中心坐标x,y。
|
||||
+ 读取框选目标所在图像上的中心坐标,返回值为列表形式,其中包含选框的中心坐标x,y
|
||||
|
||||
>程序案例:通过按键A设置框选目标,读取目标坐标值,用于控制屏幕上的矩形元素移动,模拟显示物体的运动轨迹。
|
||||
|
||||
@@ -152,6 +153,60 @@ V-Function是由M5Stack团队针对V系列设备开发的多个**视觉识别**
|
||||
<img src="assets\img\quick_start\v_function\target_detect_example_02.webp" width="100%">
|
||||
|
||||
|
||||
### 颜色追踪
|
||||
|
||||
>设置LAB颜色阈值,追踪画面中符合阈值目标,并实时获取目标对象处于画面中位置信息。
|
||||
|
||||
<img src="assets\img\quick_start\v_function\color_trace.webp" width="50%">
|
||||
|
||||
>程序块介绍
|
||||
|
||||
- `init`
|
||||
+ 初始化
|
||||
|
||||
- `Set color by L-min L-max A-min A-max B-min B-max`
|
||||
+ 设置追踪的LAB阈值
|
||||
|
||||
- `Get area pixel number`
|
||||
+ 读取框选目标中符合LAB阈值的像素数量
|
||||
|
||||
- `Get area x coordinate`
|
||||
+ 读取框选目标的左上角坐标x
|
||||
|
||||
- `Get area Y coordinate`
|
||||
+ 读取框选目标的左上角坐标y
|
||||
|
||||
- `Get area width`
|
||||
+ 读取框选对象的宽度
|
||||
|
||||
- `Get area height`
|
||||
+ 读取框选对象的高度
|
||||
|
||||
|
||||
#### 设置LAB阈值
|
||||
|
||||
>点击下方按钮,下载LAB取色工具。(目前仅支持windows系统)
|
||||
|
||||
<a href="https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/software/LAB-Color-Tool.exe"><el-button type="primary">下载LAB取色工具</el-button></a>
|
||||
|
||||
>使用手机或者是其他设备拍摄样本图片,双击打开应用,点击`open`-->`image`导入图片。
|
||||
|
||||
<img src="assets\img\quick_start\v_function\lab_color_tool_01.webp" width="50%">
|
||||
|
||||
|
||||
>点击想要用作颜色识别的物体,记录下方生成的LAB数值,在UIFlow中配置使用。补充:拖动LAB数值的区间条,可以用于自定义LAB数值。
|
||||
|
||||
|
||||
<img src="assets\img\quick_start\v_function\lab_color_tool_02.webp" width="50%">
|
||||
|
||||
|
||||
>程序案例:设置识别的LAB阈值,实现颜色追踪效果,并获取被追踪对象在画面中的坐标数据,符合阈值的像素数量。
|
||||
|
||||
<img src="assets\img\quick_start\v_function\color_trace_example_01.webp" width="100%">
|
||||
|
||||
<img src="assets\img\quick_start\v_function\color_trace_example_02.webp" width="100%">
|
||||
|
||||
|
||||
## 数据包格式
|
||||
|
||||
>点击下方按钮,下载数据包格式表格,用户可用于分析数据格式,将V-function接入到别的编程平台中使用。
|
||||
|
||||
Reference in New Issue
Block a user