Jump to content

I'm having trouble understanding how to import and use a library from an SDK in Python for a new GigE machine vision camera I've got.

 

With a previous USB camera and motor controller I've been using, the SDKs came with a single header file and a DLL I could import using ctypes. The SDK for this new camera includes no DLLs, but a collection of 130 C header files with matching '.libs', along with some C++ examples. I would like to be able to use this SDK to control the camera using Python, as I already have a GUI written up for the old camera. I've tried StackExchange, but my C++ knowledge is limited, and answers to previous similar questions haven't been that helpful.

 

Has anyone here had experience importing a library of this style into Python? 

Link to comment
https://linustechtips.com/topic/1245646-accessing-c-library-in-python/
Share on other sites

Link to post
Share on other sites

If they have .NET libraries (quite likely for Windows) then you could use them in IronPython directly. To use that C++  with standard Python you would have to make or find a wrapper that compiles to a Python extension. And what's the vendor of the camera?

Link to post
Share on other sites

Photonic Science, although they use the eBUS SDK. With a bit more looking I have found a set of DLLs in the x86 common folder, some of which seem to relate to .NET. Ctypes says it can't find the modules or dependencies, so perhaps they are all .NET DLLs. I've never heard of IronPython, so I'll take a look. Is there anything like ctypes' "cdll.LoadLibrary()" for .NET dlls?

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×