Now I’m creating a app that using some cv2 algorithms, the main part is in rust linked with cv2 built by vcpkg. But I’d like to also including a python interpreter with opencv-python so that we could do some quick prototype.
How to setup 2 instances of cv2 in the same executable?
- There are no data shared between 2 instances of cv2, data are exchanged in the format of numpy.
- I don’t wan’t to use python in a separate process, it’s hard to sync other app state.
I found a similar question Embedding python in C++, using opencv both in python and C++ (dinamically) conflicts
My problem is I can successfully link and run, but the program crashes as long as import cv2
on linux. (seems panics in libprotobuf)
E0000 00:00:1746748110.704875 26256 descriptor_database.cc:633] File already exists in database: opencv-caffe.proto
F0000 00:00:1746748110.704953 26256 descriptor.cc:2248] Check failed: GeneratedDatabse()->Add(encoded_file_descriptor, size)