First time here? Check out the FAQ!

Ask Your Question
0

How to use Aruco in Android?

asked Apr 10 '18

Sellmair gravatar image

Hi, I was not able to find the Aruco package documented here https://docs.opencv.org/trunk/javadoc... (v.3.4.1)

in the SDK provided here https://sourceforge.net/projects/open...

Is there a way to use the Auroc package for Android?

Thanks in advance :)

Preview: (hide)

3 answers

Sort by » oldest newest most voted
0

answered Dec 8 '18

Sellmair gravatar image

We published packaged .aar builds for opencv android to jcenter. Feel free to use our packages: https://github.com/quickbirdstudios/o...

dependencies {

  // opencv 3.4.1
  implementation 'com.quickbirdstudios:opencv:3.4.1'

  // opencv 3.4.4 with contribution packages
  implementation 'com.quickbirdstudios:opencv:3.4.4-contrib'
}
Preview: (hide)

Comments

that's a nice attempt, but are you going to maintain that in the future ?

berak gravatar imageberak (Dec 9 '18)edit
0

answered May 8 '18

mshabunin gravatar image

Please check build logs from our CI builder: http://pullrequest.opencv.org/buildbo... For example: http://pullrequest.opencv.org/buildbo... It had built OpenCV Android SDK with contrib successfully.

Preview: (hide)

Comments

This post helps. I spent days trying to build opencv contrib for android with no success.

syaifulnizamyahya gravatar imagesyaifulnizamyahya (Nov 12 '18)edit
0

answered Apr 10 '18

berak gravatar image

updated Apr 10 '18

the aruco module is from opencv_contrib , and it's not included in the prebuilt android sdk from SF.

you'll have to download the contrib repo, and rebuild the sdk from src

Preview: (hide)

Comments

Hey, thanks for your quick answer! I tried to build from source and tried many things, but it always fails with the output below. Tried build tools version 24.4.1, 25, 27 Tried ndk version 10, 15, 16

/opencv/platforms/android/build/o4a/android_sdk/AndroidManifest.xml
[1025/1193] Linking CXX executable bin/hello-android
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "../build_sdk.py", line 363, in <module>
Sellmair gravatar imageSellmair (Apr 10 '18)edit

I am sorry for opening a duplicate, but could you please give me more information? I used ninja version 1.8.2 if this was your hint?

Sellmair gravatar imageSellmair (Apr 10 '18)edit

it did not find it (i dont think the version is a problem)

if youcan just type "ninja" on you cmdline, and it runs, it's all fine, else you have to put it on the PATH or such

berak gravatar imageberak (Apr 10 '18)edit

Then ninja looks fine! I would only need to build the jniLib .so files to make it work, as the java code is already generated. Maybe I can find a workaround? I successfully built OpenCV with the contrib module. It only fails for the android_sdk =(

Sellmair gravatar imageSellmair (Apr 10 '18)edit

This is my build command:

python ../build_sdk.py --extra_modules_path=/Users/sellmair/0source/opencv/opencv_contrib/modules --ndk_path=/Users/sellmair/Desktop/android-ndk-r15c --sdk_path=/Users/sellmair/Desktop/tools --no_ccache . /Users/sellmair/0source/opencv/opencv/
Sellmair gravatar imageSellmair (Apr 10 '18)edit

wait, can you try with an older ndk, like 10 or 12 ? (15 might be too advanced)

berak gravatar imageberak (Apr 10 '18)edit

I also tried 10e. I am really frustrated =(

Sellmair gravatar imageSellmair (Apr 10 '18)edit

I am trying version 9 now! Hopefully this helps!

Sellmair gravatar imageSellmair (Apr 10 '18)edit

Did not work =/

Sellmair gravatar imageSellmair (Apr 10 '18)edit

Question Tools

1 follower

Stats

Asked: Apr 10 '18

Seen: 3,238 times

Last updated: Dec 08 '18