2016-01-08 08:24:18 -0600 | answered a question | initAsync not applicable for the arguments Wow, old question and no answer... I would guess that your class is not a context. I has to be a subclass of context. You could for example declarate your class like this: Maybe this can help someone... probably the author of this question not anymore. :( |
2016-01-06 10:47:33 -0600 | asked a question | initasync Nullpointer Exception Hi all, I have the following question: I have several ideas for different apps using one and the key feature. Therefore I want to implement that feature as a library project. I created one, referenced the OpenCV Library project and also created a project for Android JUnit test. In the library project I have a class that extends activity in which call the constructor and initialize opencv in async mode like this: So I basically made things like in the examples ( at least I think I did). I now create an instance of Abc class in my Android test. The test starts and fails with a NullPointerException that is being triggered by I can follow it back to ContentWrapper.bindService (but can't look at the source code of this method). Whole exception looks like this: Of course I do have OpenCV Manager 3.0.0 installed on my device. Examples do work fine. Any idea what I do wrong? Thanks and greetings, Sebastian |
2015-06-07 11:59:52 -0600 | asked a question | JavaCV 0.11 VideoInputLib Android UnsatisfiedLinkError Hi all, I currently have to face the following problem, that I already googled a lot about, but still did not find a working solution: I implemented a small javacv example for windows, which is working well. The example's purpose is simply to print out available video hardware, like my webcam. Now I want to run this example on an Android device. So I created a new Android app project, created a button and a text field. When clicking the button, the text field has to be filled with the information about the video hardware. I added javacv.jar, javacpp.jar and videoinput.jar to the "libs" folder of the android project. In Eclipse I added those jars to the build path. Additionally I checked the jars to be exported in the build path configuration. Then I extracted the .so files from ffmpeg-android-arm.jar and opencv-android-arm.jar into the libs/armeabi folder. The code I try to run is free from errors as far as Eclipse tells me and is being build without errors. The app launches on the device (Nexus 5), but when I try to press the button to detect the video devices it crashes with the folowing exceptions: This is the part of code that is not working: The exception occurs on the line videoInput.listDevices(); The videoInput class is of course importet in the class file: I've used this tutorial: http://javacv4android.blogspot.de/201... But I did not use JavaCV / CPP 0.7, I used 0.11. In 0.11 there is no javacv-android-arm.jar file, I could have extracted some .so files out, so I left that step out. Maybe there is still missing something in my configuration? I also tried with 0.7 later on, but 0.7 is missing "videolib.jar" so I can not even compile the code example using those older libraries. Any suggestions / experience ? Thanks a lot in advance!!! Sebastian |