Ask Your Question
0

how to compile OpenCV4Android on Ubuntu Eclipse with NDK

asked 2016-03-03 19:34:44 -0600

ardeal gravatar image

My platform: 1) Ubuntu 12.04 X86_64 2) eclipse-cpp-luna-SR2-linux-gtk-x86_64.tar.gz 3) cdt-8.6.0.zip 4) android-sdk_r24.4.1-linux.tgz 5) android-ndk-r10e-linux-x86_64.bin 6) ADT-23.0.6.zip 7) OpenCV-3.1.0-android-sdk.zip

I followed the steps on OpenCV official website to import OpenCV to Eclipse on Ubuntu: General--->Existing Projects into Workspace--->press Next button--->choose OpenCV-android-sdk/sdk fodler

My questions are: After OpenCV310 is imported to Eclipse, how to build OpenCV4Android.so for Android application? On OpenCV official website, there is no docs about how to compile OpenCV library for android application.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-03-04 00:14:01 -0600

berak gravatar image

updated 2016-03-04 00:17:31 -0600

since you're trying to build OpenCV4Android, your previous steps setting up eclipse are irrelevant.

you will need the opencv src code from github, and build from there

https://github.com/Itseez/opencv/wiki...

edit flag offensive delete link more

Comments

Hi,

I would like to include opencv_contrib in my opencv4android application on oepncv 3.1.0. what should I do for that? should I download opencv3.1.0 and opencv_contrib and rebuild them for Android? or opencv_contrib has already been included in opencv4android3.1.0.zip(libopencv_java3.so) from opencv official website?

ardeal gravatar imageardeal ( 2016-03-06 23:19:36 -0600 )edit

no, those are not included in the prebuild opencv_java3.so, you additionally need opencv_contrib (see readme there) and build opencv4android from src.

berak gravatar imageberak ( 2016-03-07 01:01:45 -0600 )edit

Hi, as you know, I am not aware of how to bufild opencv and opencv_contrib src for Android. do you have any docs about how to do that?

ardeal gravatar imageardeal ( 2016-03-07 01:21:59 -0600 )edit

sorry, i never tried that, so https://github.com/Itseez/opencv/wiki... is all i know.

berak gravatar imageberak ( 2016-03-07 01:25:56 -0600 )edit

Got it. Many thanks!

ardeal gravatar imageardeal ( 2016-03-07 01:41:51 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-03-03 19:34:44 -0600

Seen: 321 times

Last updated: Mar 03 '16