opencv library project sowing many errors - android

After importing opencv-android-sdk library project into workspace, it shows so many errors.
I tried following tutorial
http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html
But i am not getting
....\sdk\java
under Library section as picture showing in step 2 in tutorial.
(Sorry I am allowed to post image here.)
Is there any problem with my java.
I am using Ubuntu 13.04 with Eclipse Version: 3.8.1 and OpenCV-2.4.6-android-sdk

Check your project build properties, change the OpenCV import path to the correct one (make sure the path of opencv relative to your application matches what you place in import path).

Related

Trying to add opencv to a flutter plugin

Trying to add opencv to a flutter plugin. I have tried to follow example by Sawan Kumar Bundelkhandi. When I did an import module of OpenCV into the (java) project, it only shows me a name of :Java, not anything like openVClibrary4.0. Maybe that is my first problem.
Later, I cannot add the libs directory to the java project. I tried various right click, create Directory, but nothing seemd to be created. I did a copy in Windows explorer, and renamed it to jnilibs, but I cannot make the Android Studio project see that directory.
Any suggestions where I could look for more information?

How to import openCV samples into Android Studio

Just as the title says. I tried "Import Project" then selected this file:
C:...\OpenCV-2.4.10-android-sdk\samples\tutorial-1-camerapreview
Then selected this folder as the location for the full copy of the project:
C:...\AndroidStudioProjects\tutorial-1-camerapreview4
I then get the following warnings:
Project OpenCV Tutorial 1 - Camera Preview:C:\Users\Michael\OpenCV-2.4.10-android-sdk\samples\tutorial-1-camerapreview\project.properties:
Library reference ....\sdk\java could not be found
Path is C:\Users\Michael\OpenCV-2.4.10-android-sdk\samples\tutorial-1-camerapreview....\sdk\java which resolves to C:\Users\Michael\OpenCV-2.4.10-android-sdk\sdk\java
Can anyone help please? searches for answers so far have not been fruitful.
From the existing project where you have configured to include OpenCV module, use "Import Module" to import opencv samples.

Error in OpenCV Android eclipse setting up sample projects

I already watched so many tutorials online but I can't figure out what's wrong with the sample projects given by the openCv.
I also follow the steps given in this link : sample question
The error in 15 puzzle is different from camera-calibration and color-blob-detection.
After I deleted the error lines in JavaCameraView.java file, some of the samples start to works fine.
My ndk version is r10 and OpenCV version is 2.4.9. I hope someone can help me solve my problem. Thanks in advance!
You can look at this sample. Basically you will just need to redirect the library to your folder
After some configurations, I finally figured out how to solve my problem. Here are the steps:
First: Click on every folder->Properties->Android->Delete the unknown reference then add the OpenCV library.
Second: Make sure to link the C/C++ Build by Properties-> C/C++ Build-> Then copy the file path of your ndk folder
Third:copy jni folder present in face detection or other projects then paste it to a project that don't have a jni folder.
Fourth: Change the include declaration to local library of OpenCV.mk in Android.mk file.
Ex. include C:/Dev/OpenCV-2.4.9-android-sdk/OpenCV-2.4.9-android-sdk/sdk/native/jni/OpenCV.mk
Fifth:Make sure to clean and build the project.
Finally run every project on your device. cherio!

opencv - face detection on android

Im trying to use face dection code of opencv on android
but there are some problems even i clean the project like the others said.
here is the description on the eclipse
The project cannot be built until build path errors are
resolved OpenCV Sample - color-blob-detection Unknown Java Problem
The container 'Android Dependencies' references non existing library
'C:\OpenCV-2.4.3-android-sdk\sdk\java\bin\opencv library -
2.4.3.jar' OpenCV Sample - color-blob-detection Build path Build Path Problem
Its mostly a problem with the path.
Have you checked the path correctly? (Jones suggestion should work for you)
If its correctly set... I would ask you to check the make file in JNI folder and use this full path, and also check the build path -> C++ -> GNU C++ -> add this path (if not already added).
Then you should be able to get this to work.
There isn't any .jar to import.
If you follow openCV tutorial (http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html)
and import all Samples and Library you should be sure that Library project can be built without error.
In my case I have just set the Android Target at the current release 5.1.1.
To do that, right click on project "OpenCV Library - 2.4.11"->Properties->Android->Select Android 5.1.1->Apply

Eclipse will not recognize project as library (ActionBarSherlock/ViewPagerIndicator)

I'm trying to get ActionBarSherlock and the ViewPagerIndicator libraries set up for my projects, but I seem to be running into a few issues. I sent Jake Wharton (The developer) a few messages earlier about it, and got a few replies but couldn't get anywhere - and I think he got busy with a few other things.
What my issue is, For both VPI and ABS
Both libraries open up without any errors, and I'm using compiler version 1.6 for all as is required.
The funny thing is, if I load in the samples that are provided - they work fine and link to his library; but when I go to add the library to my project - the above happens.
Where to store the actual library project does not matter, as long as you use a relative link to reference it. Check out the Library Projects - Development considerations:
Library project storage location
There are no specific requirements on where you should store a library project, relative to a dependent application project, as long as the application project can reference the library project by a relative link. What is important is that the main project can reference the library project through a relative link.
You should always use the Eclipse ADT plugin to select and set up Library Project Reference, i.e. right-click project -> Properties -> Android -> Add, then in the opened Project Selection window, select the Library Project list here (of cause you should import them in the same Eclipse workspace as your Main Project). This will add a android.library.reference using relative path into project.properties as well as show relative path in the Android preference window:
android.library.reference.2=../../../../../Documents and Settings/yorkw/Desktop/JakeWharton-Android-ViewPagerIndicator-f09acb0/library
If you directly alter it using absolute path from project.properties as below:
android.library.reference.1=C:\\Documents and Settings\\yorkw\\Desktop\\JakeWharton-Android-ViewPagerIndicator-f09acb0\\library
Then after Eclipse refresh your project, you get the exact error described in your question, see my screenshot below:
Hope this helps.
While importing the libraries, make sure that you tick the "Copy projects int workspace" check box. The library projects need to be in the same workspace for them to work.
delete and import the project and lib again. build the lib project , add lib to project, still error shows.. rename the lib project. this worked for me ....

Categories

Resources