[OpenCV.js](https://docs.opencv.org/4.x/d0/d84/tutorial_js_usage.html) for browser.
npm install @opencvjs/webOpenCV.js for browser.
``bash`
npm install @opencvjs/web
@opencvjs/web exports a loadOpenCV function that returns a Promise that resolves to the OpenCV.js API.
`js
import { loadOpenCV } from "@opencvjs/web";
const cv = await loadOpenCV();
const mat = new cv.Mat();
`
@opencvjs/web exports a type OpenCV for the OpenCV.js API.
`ts
import { loadOpenCV, type OpenCV } from "@opencvjs/web";
const cv: typeof OpenCV = await loadOpenCV();
const mat: OpenCV.Mat = new cv.Mat();
``

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