Ask Your Question

Chaos_99's profile - activity

2016-02-03 10:28:35 -0600 received badge  Notable Question (source)
2015-01-24 18:52:01 -0600 received badge  Popular Question (source)
2013-11-10 12:04:56 -0600 received badge  Student (source)
2013-08-09 03:14:13 -0600 commented question Cannot use camera on Android 4.1.2 with OpenCV 2.4.6

Qt5 creates the Java stub to call the JNI functions and it's complex enough that I didn't try to mess with it. The Qt5 project settings allow to either load all libraries to the device on build/run or just use the ones already present on the device. While I tried the former first, I also manually installed the OpenCV Manager app (and the Ministro app, which is kind of the same for the Qt libs) to externally load the needed libs and try the second option. Seems that the "load libs to device" option doesn't quite work for non-Qt shared libs like the libnative_camera. (And I've tried to explicitly mention it as needed in the project file.) Also the OpenCV Manager App doesn't seem to load the libs either if it's just startet on its own and not called correctly from the Java code.

2013-08-08 08:50:17 -0600 received badge  Supporter (source)
2013-08-08 08:30:40 -0600 commented question Cannot use camera on Android 4.1.2 with OpenCV 2.4.6

@Moster It worked! Thanks a lot. The video output is still very slow and there are some issues with rotation, but at least the camera works. Do you know why this lib wasn't present on the device before? Shouldn't this be handled by the OpenCV Manager App? And why does it build in the first place, although this library isn't linked? (If you give this as an answer, I could accept it as right. Also, if you like, you could answer the same question on stackexchange if you are active on that platform.)

2013-08-07 09:52:07 -0600 received badge  Editor (source)
2013-08-07 09:50:37 -0600 asked a question Cannot use camera on Android 4.1.2 with OpenCV 2.4.6

There are numerous questions here, but none of them quite match my case. (And a lot are unanswered anyway.)

I'm using OpenCV for Android 2.4.6 (the prebuilt version downloadable from the main site) to build a native App for Android (4.1.2) on a Samsung Galaxy Note 2 with Qt 5.0.1 for Android (using QtCreator 2.7.2) on a x86_64 Linux host.

I've linked against the libraries in the ../sdk/native/libs/armeabi-v7a folder. (I haven't built OpenCV from source, I'm just using what was in the downloaded package). This includes a libopencv_androidcam.a library. I've also downloaded the market app "OpenCV Manager".

The sample .apks from the samples directory work on my phone, but I haven't tried to build them on my own, as I don't have a Java development environment set up.

Starting my application, which contains a cv::VideoCapture inputCapture(CV_CAM_ANDROID); statement, I get the following error and no camera input:

E/OpenCV::camera(15299): CameraWrapperConnector::connectToLib ERROR: cannot dlopen camera wrapper library
E/OpenCV::camera(15299): Native_camera returned opening error: 4

My questions:

  • Should this work? I have seen a lot of bug reports, but all with older OpenCV versions and newer/older Android versions. Bonus points if it has been seen working on this phone model.
  • Should this work out of the box with the downloaded OpenCV Android SDK? Or do I need to build OpenCV from source with some special options? (Which ones?)
  • Do I need special library versions on the phone itself? Do I need to have root access to the device to make this work?
  • Are there any "known to be working" Andoid examples using native code instead of Java?

Thanks a lot for any help!

2012-11-04 15:37:19 -0600 asked a question OpenCV 2.4.3 build on MacOS 10.6.8 fails

Hi, I'm trying to build OpenCV on a Mac following the standard

mkdir build
cd build
cmake -G "Unix Makefiles" ..
make -j8
make install

Cmake runs fine, but reports only cocoa as found GUI (although QT is installed as well). Then make fails at

Linking CXX shared library ../../lib/libopencv_highgui.dylib
[ 46%] Built target opencv_photo
[ 47%] Built target opencv_video
Undefined symbols:
  "_av_get_channel_layout_string", referenced from:
      _avcodec_string in libavcodec.a(utils.o)
      _avcodec_get_channel_layout_string in libavcodec.a(audioconvert.o)

and a lot of other undefined symbols like

"_av_image_fill_pointers"
"_av_get_bits_per_sample_fmt"
"_av_image_copy_plane"
"_av_image_check_size"
"_av_parse_video_rate"

and so on. What am I doing wrong? Does anyone recognize those symbols? In which library should they be defined?

Thanks, Chaos