2024-05-17 10:36:23 +08:00
|
|
|
|
枚举视频捕获设备:https://learn.microsoft.com/zh-cn/windows/win32/medfound/enumerating-video-capture-devices
|
|
|
|
|
|
|
|
|
|
媒体基础中的音频/视频捕获:https://learn.microsoft.com/zh-cn/windows/win32/medfound/audio-video-capture-in-media-foundation,里面有枚举打印示例代码。
|
|
|
|
|
|
|
|
|
|
如何设置视频捕获格式:https://learn.microsoft.com/zh-cn/windows/win32/medfound/how-to-set-the-video-capture-format
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```
|
2024-05-31 00:45:46 +08:00
|
|
|
|
palmDetectionProcess
|
|
|
|
|
facePalmDetectionProcess # 处理每帧,在MPP的回调函数里面
|
|
|
|
|
uart_msg_proc() -> cmd_exec()执行串口协议命令
|
2024-05-22 20:17:07 +08:00
|
|
|
|
|
2024-06-05 12:13:10 +08:00
|
|
|
|
sock_cmd_exec() 内部线程逻辑之间通信
|
|
|
|
|
|
|
|
|
|
线程函数frame_proc_task()
|
|
|
|
|
algo_cb()->onFacePalmDetectionPassed()->app_server_alive()->sock_cmd_exec:SOCK_CMD__ALIVE_PALM
|
|
|
|
|
|
|
|
|
|
ST__PlamRegister()->__PalmRegister() -> PalmFeatureExtract() -> spv2_get_feature()
|
2024-06-13 15:41:40 +08:00
|
|
|
|
|
|
|
|
|
frame_proc_task()
|
|
|
|
|
frame_sync_task() // L015 V200 __DUAL_SNS_FAKE__ 双sensor活体
|
2024-05-31 00:45:46 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## 门锁开发环境搭建
|
|
|
|
|
|
|
|
|
|
安装如下 python 环境:
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
sudo apt-get install lz4 unzip python3-pip
|
|
|
|
|
pip3 install yoctools # 安装在 ~/.local 目录下
|
|
|
|
|
|
|
|
|
|
# Ubuntu下product实际为product64
|
|
|
|
|
cd ~/.local/bin
|
|
|
|
|
ln -s product64 product
|
|
|
|
|
|
|
|
|
|
# 以下两条命令打印版本,验证是否安装成功,如无版本信息输出,最好重启一下机器。可能安装yoctools后,可能yoc、product还找不到
|
|
|
|
|
yoc -V
|
|
|
|
|
product version
|
|
|
|
|
|
|
|
|
|
# 将 python 软链接定向为 python3
|
|
|
|
|
cd /usr/bin
|
|
|
|
|
ln -s python3 python
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
原门锁构建环境应该是采用 CenterOS 搭建的,所以很多脚本使用的是 `sh`,在 Ubuntu 环境下,需要注意构建输出,一旦出现疑似脚本错误的问题,可以将脚本开头的 `#/bin/sh` 改为 `#/bin/bash` 再重试。例如脚本文件 `Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1/bin/riscv64-unknown-elf-g++`。
|
|
|
|
|
|
|
|
|
|
修改编译器位置,我习惯于将编译器独立于项目工程之外:
|
|
|
|
|
|
|
|
|
|
```makefile title="solutions/smart_doorbell/Makefile"
|
|
|
|
|
HOST_TOOLS := /opt/Xuantie-900-gcc-elf-newlib-x86_64-V2.6.1/bin
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
上述步骤执行完毕之后,即可编译打包:
|
|
|
|
|
|
|
|
|
|
```shell
|
2024-08-05 17:42:27 +08:00
|
|
|
|
./boot-rebuild.sh # 编译boot
|
2024-05-31 00:45:46 +08:00
|
|
|
|
./rebuild-app.sh y L015 V200 R002 # 编译烧录固件
|
2024-08-16 11:34:21 +08:00
|
|
|
|
|
|
|
|
|
# 编译OTA固件,11为OTA版本号,这个版本号只做固件文件名显示。
|
|
|
|
|
# 实际的版本设置在 cv181x_alios/solutions/smart_doorbell/package.yaml.L015_V200R002
|
2024-09-23 19:19:10 +08:00
|
|
|
|
./rebuild-app-ota.sh y L015 V200 R002 05
|
2024-06-13 15:41:40 +08:00
|
|
|
|
600X800
|
2024-05-31 00:45:46 +08:00
|
|
|
|
```
|
2024-05-17 10:36:23 +08:00
|
|
|
|
|
2024-07-23 20:03:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Flash设置
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
__FLASH_16MB__
|
|
|
|
|
cv181x_alios/boards/cv181xc_qfn/configs/config.yaml
|
|
|
|
|
cv181x_alios/boards/cv181xc_qfn/configs/partition_alios_spinor.xml
|
|
|
|
|
cv181x_alios/solutions/smart_doorbell/face_lock_app/flash-part.h
|
|
|
|
|
```
|
|
|
|
|
|
2024-08-14 19:51:37 +08:00
|
|
|
|
修改`cv181x_alios/pack-ota.sh`,以支持将boot打进ota升级文件中。(有升级变砖风险)
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
# $ota_pack_tool $OTA_PKG imtb yoc.bin algo.bin.1 boot $@
|
|
|
|
|
```
|
|
|
|
|
|