Assigning pointer to PySwigObject in Boost

W

willievdm

Hi all

I'm working with Boost.Python at the moment and have to do the
following:
-Using Boost, assign a char* in C++ to a PySwigObject (SWIG exposed
object) of type uchar*, which is received in C++ as a
boost::python::eek:bject class.

The uchar* pointer in the PySwigObject points to a buffer containing
image data. All I wish to do is assign a C++ pointer that is also
pointing to a buffer with image data to the PySwigObject pointer and
send it back to Python. The PySwigObject is part of the CvMat class
used with OpenCV for image-processing in Python. It is already wrapped
in SWIG, so I CANNOT change it. I've already been to the python Wiki
that explains how to extract SWIG exposed pointers in python (http://
wiki.python.org/moin/boost.python/HowTo), but this does NOT tell me
how to do the opposite: assigning C++ pointers to SWIG exposed
pointers with Boost.

Any tips or tricks to get this working?

Thanks

Will
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top