pythonopencvximea

Accessing Ximea API via OpenCV in Python


OpenCV has a great support for XIMEA cameras. However, I cannot find a way to access the XIMEA-specific functions and key words. I found on other sites (and on Stackoverflow), that there are key words like CV_CAP_XIAPI or CV_CAP_PROP_XI_DOWNSAMPLING, but I can't find them in Python.

In detail, the cameras have an auto-exposure feature and I would like to deactivate that. If I set the CV_CAP_PROP_EXPOSURE to a specific value, it changes, however, after a couple of (milli)seconds, the auto-exposure takes over again. Is there a way to force the camera to stick to that value?

Thank you for your help.

Best, anki

Btw, there's a direct XIMEA Python binding called pyximea, but I haven't solved building it on Windows yet, so, I rely on OpenCV (which is great and would be even better when I could directly access the API).


Solution

  • As outlined by Ryan, the OpenCV version is crucial. Building OpenCV 3.0.0 from Source including the option WITH_XIMEA for Python 2.7.x works perfect. I offer a downloadable compiled package on my blog. Thanks!