lightweight opencv.js
A lightweight npm package which just includes modules core imgproc js video.
Modify the opencv build_js script to package a few modules and api.
Opencv3.4 contains most of the commonly used APIs, supporting cv.boxPoints api.
Encapsulate the opencv API used by ocr module, Containing the following api:
``javascript`
[
'findContours',
'minAreaRect',
'boxPoints',
'fillPoly',
'getPerspectiveTransform',
'warpPerspective',
'getRotationMatrix2D',
'warpAffine',
'resize'
]
`bash`
npm install @paddlejs-mediapipe/opencv
`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);
1、cv.mean api has precision error when calculating floating-point numbers