SmartLockerTools/Readme.md

84 lines
2.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

枚举视频捕获设备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
```
palmDetectionProcess
facePalmDetectionProcess # 处理每帧在MPP的回调函数里面
uart_msg_proc() -> cmd_exec()执行串口协议命令
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()
frame_proc_task()
frame_sync_task() // L015 V200 __DUAL_SNS_FAKE__ 双sensor活体
```
## 门锁开发环境搭建
安装如下 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
./boot-rebuild.sh # 编译boot
./rebuild-app.sh y L015 V200 R002 # 编译烧录固件
./rebuild-app-ota.sh y L015 V200 R002 14 # 编译OTA固件11为OTA版本号
600X800
```
# 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
```
修改`cv181x_alios/pack-ota.sh`,以支持将boot打进ota升级文件中。有升级变砖风险
```
# $ota_pack_tool $OTA_PKG imtb yoc.bin algo.bin.1 boot $@
```