增加自动下载
This commit is contained in:
@ -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");
|
||||
|
Reference in New Issue
Block a user