4

I want to work on an Android project (under Eclipse) using Opencv, I've imported the Opencv library and it's associated samples to Eclipse, as explained here:

http://opencv.itseez.com/doc/tutorials/introduction/android_binary_package/android_binary_package.html.

I tested the samples and they work well. But when I create my new own Android project in Eclipse, it can't link Opencv which is placed in the same workspace as the project (i.e. error when I write import org.opencv.core.*).

Is there something that has to be done for a new project to be linked with Opencv (src and lib)?

sth
  • 222,467
  • 53
  • 283
  • 367
Y.AL
  • 1,808
  • 13
  • 27
  • 2
    you need to add that project from your project through java buildpath check there, there will options to link project with your project. – mayank_droid May 23 '12 at 12:26

2 Answers2

3

I recomend you to download the OpenCV prebuild package and follow these instructions.

I don't know if you are going to use C++ for openCV and crosscompile with NDK and JNI library, but that way is quite easy to set up everything. If you need more help about how including C++ OpenCV codes in android projects I can check my codes. Good luck.

Jav_Rock
  • 22,059
  • 20
  • 123
  • 164
2

It sounds like you haven’t included the Open CV library’s in your new project.

I can’t remember the exact step to include libraries in projects but below are a couple of link that might help.

http://wiki.eclipse.org/FAQ_How_do_I_add_an_extra_library_to_my_project's_classpath%3F

Import Libraries in Eclipse?

Community
  • 1
  • 1
Minty
  • 103
  • 7