# react-opencvjs

> Bind OpenCV.js on demand in ReactJS

Latest version **1.0.2** (published 2021-03-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-opencvjs
pnpm add react-opencvjs
yarn add react-opencvjs
bun add react-opencvjs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-03-18 |
| First published | 2021-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Maintainers | fattahmuhyiddeen |
| Keywords | react, opencv, opencvjs, dynamic |

## Links

- npm: https://www.npmjs.com/package/react-opencvjs
- Repository: https://github.com/fattahmuhyiddeen/react-opencvjs
- Homepage: https://github.com/fattahmuhyiddeen/react-opencvjs#readme
- Issues: https://github.com/fattahmuhyiddeen/react-opencvjs/issues
- npm.io page: https://npm.io/package/react-opencvjs

## Dependencies (1)

- [react-inject-script](https://npm.io/package/react-inject-script.md) ^1.0.3

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2021-03-18
- 1.0.1 — 2021-01-18
- 1.0.0 — 2021-01-17

## README

# react-opencvjs

## Installation
`yarn add react-opencvjs`

## Usage

`import openCV from 'react-opencvjs'`

....

```javascript
useEffect(()=>{
  openCV({
    onLoaded: () => console.log('open cv loaded'),
    onFailed: () => console.log('open cv failed to load'),
    version: '4.5.1'
  })
},[])

// if open cv loaded
// eslint-disable-next-line no-undef
cv.imread('img id')
```

it will take several seconds to load. so it will be great you you load earlier before the component that you wish to use is going to load. this library already handle if you try to import twice, it will only ensure it load once.

---
_Source: https://npm.io/package/react-opencvjs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
