react-opencvjs

1.0.2 • Public • Published

react-opencvjs

Installation

yarn add react-opencvjs

Usage

import openCV from 'react-opencvjs'

....

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.

Package Sidebar

Install

npm i react-opencvjs

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

3.14 kB

Total Files

5

Last publish

Collaborators

  • fattahmuhyiddeen