Skip to content

How to build using pre-build linux OpenCV Libraries? #190

Closed
@scottmudge

Description

@scottmudge

I have pre-built a custom OpenCV version (from 4.1.0) with optimizations specific to my device. I had to carefully make additional tweaks in CMake as well.

Using the instructions here, opencv-python simply re-downloads the source code, re-runs the build cycle (without my customizations/optimizations), and bundles the wheel from that.

I have the Python3 shared library (.so) built from my custom version, how do I wrap that with opencv-python?

The cv2 module works as is (installed by 'make install' from the custom OpenCV build). This is installed to /usr/local/lib/python3.6/dist-packages/cv2.

The .so file can be found in:

/usr/local/lib/python3.6/dist-packages/cv2/python-3.6/cv2.cpython-36m-x86_64-linux-gnu.so

However, with the standard OpenCV python installation, static analysis often fails, and tools like PyCharm do not see the cv2 package. The only way to get it to work is to use opencv-python.

Is it possible to wrap my existing installation with opencv-python?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions