最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How do I integrate openCV in reactjs project? - Stack Overflow

programmeradmin1浏览0评论

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 badges
Add a ment  | 

2 Answers 2

Reset to default 2

Have 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

发布评论

评论列表(0)

  1. 暂无评论