I'm working on a reactjs project for a few months now one module requires some image processing. So, I would like to know how can I integrate openCV with reactjs. I can't find any articles, documentations for the same.
I'm working on a reactjs project for a few months now one module requires some image processing. So, I would like to know how can I integrate openCV with reactjs. I can't find any articles, documentations for the same.
Share Improve this question asked May 12, 2021 at 7:21 aishcriptaishcript 5831 gold badge15 silver badges31 bronze badges2 Answers
Reset to default 2Have you tried to implement TensorFlow models instead of openCV to your ReactJS project?
Try checking out TensorFlow.js(website:https://www.tensorflow/js) They have JavaScript patible CV models. Maybe that's easier to implement than openCV.
I have pleted several projects with TensorFlow.js and ReactJS. They work fine together.
You can use opencv.js for this. Unfortunately there isn't any NPM packages. However you can import it the same way as you would with an NPM package. Just in this case you need to manually download and add opencv.js to your project.
However, opencv.js is huge so I would remend using a CDN for it.
Here is a link for the NodeJS tutorials of the documentation: https://docs.opencv/3.4/dc/de6/tutorial_js_nodejs.html
Further more I would not remend it on a frontend application. Because of the size and putational power it needs. You could set up a backend API for it with NodeJS