How OpenCV accesses the camera on Android

I had been having trouble accessing camera imagery on some Android devices using OpenCV. All of the devices were from the same manufacturer, but had different versions of Android on them.

OpenCV uses undocumented calls to enable it to access the camera on Android, as explained in this message exchange,

http://answers.opencv.org/question/21192/segfault-in-libnative_camera/

Whenever the API changes, the code to call it needs to be updated.

In this case. It appears the poster had success by recompiling OpenCV, the camera library, and his application using the same library. So it may be possible to add some code myself, and recompile OpenCV to get it working.

Leave a comment