@opencvjs/node
v4.12.0-release.1
Published
[OpenCV.js](https://docs.opencv.org/4.x/d0/d84/tutorial_js_usage.html) for Node.js.
Downloads
204
Readme
@opencvjs/node
OpenCV.js for Node.js.
Installation
npm install @opencvjs/nodeUsage
@opencvjs/node exports a loadOpenCV function that returns a Promise that resolves to the OpenCV.js API.
const { loadOpenCV } = require("@opencvjs/node");
const cv = await loadOpenCV();
const mat = new cv.Mat();TypeScript
@opencvjs/node exports a type OpenCV for the OpenCV.js API.
import { loadOpenCV, type OpenCV } from "@opencvjs/node";
const cv: typeof OpenCV = await loadOpenCV();
const mat: OpenCV.Mat = new cv.Mat();Example
Credits
TypeScript definitions are based on the @techstark/opencv-js and mirada projects.
License
Apache-2.0
