-
Notifications
You must be signed in to change notification settings - Fork 87
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
Use pbctv in embedded Python #45
Comments
I changed my code to pass cv::Mat to python and not explicitely call the converter. This works just fine without any segfault. |
The converter was not used because the function with cv::Mat was never called. When I call this function the segfault can be observed again. |
Hi, @linux-fan-dave. Sorry you are having trouble with pbcvt. I am not currently supporting embedded python development (I'm very far away from either embedded things or OpenCV at this point in time), but you're welcome to contribute anything that helps to get this issue resolved. The only thing I can think of is: try to understand / debug why pbcvt works in a regular python setting, but segfaults in the embedded setting. |
where is the configure? |
@KingfaLuis I'm not sure what you mean by "configure". The |
I try to use this code in a embedded python interpreter. Embedded means that I start a programm which embeds python via boost python. The pbctv as well as the Testcode use a c++ dll inside of python instead. I use the static library and added the initialisation code to my code.
My problem is that I get an segfault whenever I use pbctv. It segfaults in the call to pyboost_cv4_converter.cpp:105 in the call to PyArray_SimpleNew.
The problem seems to be that I did not initialize/import numpy correctly. I use the following code to init the libraries (init_ar is copied from the example. This init code is executed before I use the converter for the first time.
The following code shows how I use pbctv in my code:
Is there something I'm missing? I tried as well without the call to boost::python::numpy::initialize().
I forgot to mention that I can succesfully compile and use pbctv correctly as a python plugin dll.
The text was updated successfully, but these errors were encountered: