增加自动下载

This commit is contained in:
2025-03-17 11:51:23 +08:00
parent 6c29336660
commit 84f388f294
8 changed files with 91 additions and 10 deletions

View File

@ -2,7 +2,7 @@
简单的OpenCV封装
## 编译源码
## 编译源码(可选)
1. 依赖
1. python3
1. cmake
@ -31,6 +31,9 @@ import cv from '@yizhi/opencv';
//配置addon路径
cv.config("ADDON_PATH", "/path/to/cv.node");
//下载addon可选
// 如果配置了ADDON_PATH则下载addon到ADDON_PATH否则下载到build/cv.node
await cv.downloadAddon();
//正常使用
const im = cv.imread("/path/to/input");