Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running with opencv-python instead of installing opencv from source #7

Open
RohanDoshi2018 opened this issue Oct 29, 2022 · 1 comment

Comments

@RohanDoshi2018
Copy link

I am trying to deploy a Flask app that calls this code on images, and I want to avoid having to installing opencv from source every time from source for each new machine I scale to (it takes a long time and is error prone).

Is it possible to run this repo with the python bindings for opencv (e.g. installed using: pip3 install python-opencv)? If not, is there a way to export some sort of C++ binary (compiled once) and call it from Python.

@vacancy
Copy link
Owner

vacancy commented Oct 30, 2022

I think you can not easily do that. Basically the compiled file requires the OpenCV library (.so files) to run. I think 1) you can install OpenCV from command line tools to make your deployment process a bit smoother (e.g., sudo apt-get install libopencv-dev) or 2) you can try to modify the Makefile so that opencv libraries are statically linked to the compiled program. I am not exactly sure if opencv allows you to do that but it's a possible option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants