@opencvjs/web
TypeScript icon, indicating that this package has built-in type declarations

4.11.0-release.1 • Public • Published

@opencvjs/web

OpenCV.js for browser.

Installation

npm install @opencvjs/web

Usage

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

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

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

TypeScript

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

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

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

Readme

Keywords

none

Package Sidebar

Install

npm i @opencvjs/web

Weekly Downloads

78

Version

4.11.0-release.1

License

Apache-2.0

Unpacked Size

11.4 MB

Total Files

7

Last publish

Collaborators

  • ocavue