OpenCV library package not found

I am trying to run the sample OCV 15 Puzzle Android app provided by OpenCV, but it does not work; Each time I try to start the application, a message appears: "The package was not found, the OpenCV library package was not found! Try installing it? Yes / No." I click "Yes" and then a request for a new message appears: "OpenCV Manager, installing the package did not work!".

I installed the OpenCV manager from Google Play, so theoretically I should run a sample application. I also searched everywhere for a solution, and so far I have had 0 success. I am using Samsung Galaxy mini S3 to run the application. (Android version 4.1.2).

Any help is greatly appreciated by people!

+5
source share
2 answers

OpenCV Manager, available on Google Play, is for the 2.4 OpenCV branch. Since you used 3.0 sdk, this error is expected.

The OpenCV manager for the 3.x branch is not available on Google Play, instead you must manually download the apk file corresponding to the hardware platform you are targeting. Files OpenCV_3.0.0_Manager_3.00 _ *. Apk are in the apk directory to download sdk.

After installing the correct OpenCV Manager, it should work.

Alex

+6
source

Ok, I solved the problem by getting rid of OpenCV Manager and using the library version of OpenCV-android-2.4.11 instead of 3.0. In short, I did this:

  • Download OpenCV-android-sdk-2.4.11
  • Unzip it
  • Right-click on the Package Explorer and "Import" an existing project into the workspace by loading "OpenCV Library 2.4.11" and also "15 Puzzle" from the folder you just unzipped.
  • Right-click on the 15 Project Project Panel β†’ Properties β†’ Android β†’ Add OpenCV 2.4.11 Library
  • Right-click the 15 Folders folder and create a new folder called "libs"
  • Copy all the folders from OpenCV-android-sdk / sdk / native / libs to the libs folder you just created.
  • Right-click on the project folder β†’ Properties β†’ Build Path β†’ Order and Export β†’ Check the box next to β€œAndroid (some number)” if it is not checked
  • Go to src folder β†’ org.opencv.samples.puzzle15 β†’ Puzzle15Activity.java and edit it by adding

    static {if (! OpenCVLoader.initDebug ()) {// Handle the initialization error}}

right after the global variables and comment out the line

OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_3_0_0, this, mLoaderCallback); 

located in the overridden method "OnResume ()".

After all this, I launched it on my phone and it worked! Hope this helps someone who is about to throw their computer out of the window because of disappointment. Hooray!

+4
source

All Articles