forked from PaddlePaddle/Paddle.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(mediapipe): add lightweight opencv package
- Loading branch information
1 parent
8e2811f
commit 8ee48ae
Showing
6 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
**/*.d.ts | ||
node_modules | ||
packages/paddlejs-enc/**/* | ||
packages/paddlejs-mediapipe/opencv/**/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
[中文版](./README_cn.md) | ||
|
||
# opencv_blur.js | ||
|
||
A lightweight npm package which just includes modules **core imgproc js video**. | ||
|
||
# modules | ||
OpenCV modules: | ||
-- To be built: **core imgproc js video** | ||
-- Disabled: calib3d dnn features2d flann highgui imgcodecs ml photo stitching videoio world | ||
-- Disabled by dependency: objdetect | ||
-- Unavailable: gapi java python2 python3 ts | ||
-- Applications: - | ||
-- Documentation: js | ||
-- Non-free algorithms: NO | ||
|
||
|
||
# npm | ||
|
||
```bash | ||
npm install @paddlejs-mediapipe/opencv | ||
``` | ||
|
||
# Usage | ||
|
||
```javascript | ||
import cv from '@paddlejs-mediapipe/opencv/library/opencv_blur'; | ||
let logit = cv.imread('canvas'); | ||
let dst = new cv.Mat(); | ||
let ksize = new cv.Size(5, 5); | ||
let anchor = new cv.Point(-1, -1); | ||
cv.blur(logit, dst, ksize, anchor, cv.BORDER_DEFAULT); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[English](./README.md) | ||
|
||
# opencv_blur.js | ||
|
||
一个轻量级 opencv 库,目前包含模块 **core imgproc js video**,主要用于边缘模糊处理。 | ||
|
||
# 模块 | ||
|
||
OpenCV 模块: | ||
-- 包含: **core imgproc js video** | ||
-- 禁用: calib3d dnn features2d flann highgui imgcodecs ml photo stitching videoio world | ||
|
||
# npm | ||
|
||
```bash | ||
npm install @paddlejs-mediapipe/opencv | ||
``` | ||
|
||
# Usage | ||
|
||
```javascript | ||
import cv from '@paddlejs-mediapipe/opencv/library/opencv_blur'; | ||
let logit = cv.imread('canvas'); | ||
let dst = new cv.Mat(); | ||
let ksize = new cv.Size(5, 5); | ||
let anchor = new cv.Point(-1, -1); | ||
cv.blur(logit, dst, ksize, anchor, cv.BORDER_DEFAULT); | ||
``` |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "@paddlejs-mediapipe/opencv", | ||
"version": "0.0.1", | ||
"description": "lightweight opencv.js", | ||
"main": "library/", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [ | ||
"opencv", "blur", "core" | ||
], | ||
"author": "", | ||
"license": "ISC" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "../../../tsconfig", | ||
"include": [], | ||
"exclude": [ | ||
"library/*.js" | ||
] | ||
} |