4.11.0-release.1 • Published 12 months ago

@opencvjs/worker v4.11.0-release.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
12 months ago

@opencvjs/worker

OpenCV.js for web worker.

Installation

npm install @opencvjs/worker

Usage

@opencvjs/worker exports a loadOpenCV function that returns a Promise that resolves to the OpenCV.js API.

import { loadOpenCV } from "@opencvjs/worker";

const cv = await loadOpenCV();
const mat = new cv.Mat();

TypeScript

@opencvjs/worker exports a type OpenCV for the OpenCV.js API.

import { loadOpenCV, type OpenCV } from "@opencvjs/worker";

const cv: typeof OpenCV = await loadOpenCV();
const mat: OpenCV.Mat = new cv.Mat();

Example

Open in StackBlitz

Credits

TypeScript definitions are based on the @techstark/opencv-js and mirada projects.

License

Apache-2.0

4.11.0-release.1

12 months ago

4.10.0-release.6

12 months ago