Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
I'm new to OpenEV and looking for some direction with some challenges I'm having.
I'm trying to use OpenEV from C++ (this interface is pre-defined, so I have no choice at this time). Platform is Linux, OpenEV is from FWTools. As a first step, I've looked at Python and have been able to embedded Python into C++ code. I thought this would help guide me with embedding OpenEV.
When I'm using Python (2.5) alone, I link in "libpython2.5.a" which I assume is what gives me access to the methods and objects. Here is a simple example from http://www.codesampler.com/python.htm:
using namespace std;
int main(int argc, char * argv)
PyObject *pModule = PyImport_ImportModule( "string" );
PyObject *pDictionary = PyModule_GetDict( pModule );
PyObject *pResult = PyRun_String( "uppercase", eval_input, pDictionary, pDictionary );
PyArg_Parse( pResult, "s", &cStr );
cout << cStr << endl;
PyObject_SetAttrString( pModule, "x", pResult );
PyRun_String( "print lower(x)", file_input, pDictionary, pDictionary );
Py_DECREF( pResult );
Py_DECREF( pDictionary );
Py_DECREF( pModule );
This works fine. However, with FWTools I don't see anything like "libpython". It seems like everything is launched via a script that in turn kicks off python to run a py file, e.g. "python openev.py". Any insight as to how I can make the connection from C++ to OpenEV?
AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.com.