Skip to content

bkai/opencv-js

This branch is 1 commit ahead of, 2 commits behind TechStark/opencv-js:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Feb 7, 2025
e90262a · Feb 7, 2025
Aug 6, 2024
Aug 6, 2024
Aug 12, 2024
Jan 4, 2025
Jan 4, 2025
Jul 1, 2024
Oct 3, 2023
Feb 12, 2021
Aug 12, 2024
May 2, 2022
Nov 6, 2023
Feb 12, 2021
Feb 7, 2025
Aug 25, 2024
Aug 21, 2023

Repository files navigation

opencv-js

OpenCV JavaScript version (NPM package) for node.js or browser. Get started guide OpenCV.js Tutorials.

The file opencv.js was downloaded from https://docs.opencv.org/4.10.0/opencv.js

TypeScript is supported (thanks to mirada).

Code Examples

Live Demo

Using in react.js project

Using in Angular project

Real-time face detection

Real-time face detection

How to Use

  • npm install @techstark/opencv-js
  • or yarn add @techstark/opencv-js
  • import cv from "@techstark/opencv-js"
    • for TypeScript, set "esModuleInterop": true in tsconfig.json
  • or import * as cv from "@techstark/opencv-js"

Webpack Configuration (for browser usage)

If you use this package for browsers, you need to set some polyfills. In the file "webpack.config.js", set

module.exports = {
  resolve: {
    modules: [...],
    fallback: {
      fs: false,
      path: false,
      crypto: false
    }
  }
};

What methods and properties are available

The TypeScript type declarations may not be up to date with the latest OpenCV.js. Refer to cvKeys.json to check the available methods and properties at runtime.

Star History

Star History Chart

About

OpenCV JavaScript version for node.js or browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%