Ask Your Question
0

How to use Aruco in Android?

asked 2018-04-10 02:56:35 -0600

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 :)

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
0

answered 2018-12-08 11:53:49 -0600

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'
}
edit flag offensive delete link more

Comments

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

berak gravatar imageberak ( 2018-12-08 20:45:05 -0600 )edit
0

answered 2018-05-08 05:11:26 -0600

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.

edit flag offensive delete link more

Comments

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

syaifulnizamyahya gravatar imagesyaifulnizamyahya ( 2018-11-11 22:06:00 -0600 )edit
0

answered 2018-04-10 03:01:56 -0600

berak gravatar image

updated 2018-04-10 03:04:43 -0600

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

edit flag offensive delete link more

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 ( 2018-04-10 08:32:28 -0600 )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 ( 2018-04-10 08:51:41 -0600 )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 ( 2018-04-10 09:10:37 -0600 )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 ( 2018-04-10 09:19:02 -0600 )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 ( 2018-04-10 09:27:50 -0600 )edit

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

berak gravatar imageberak ( 2018-04-10 09:36:31 -0600 )edit

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

Sellmair gravatar imageSellmair ( 2018-04-10 09:43:29 -0600 )edit

I am trying version 9 now! Hopefully this helps!

Sellmair gravatar imageSellmair ( 2018-04-10 10:10:55 -0600 )edit

Did not work =/

Sellmair gravatar imageSellmair ( 2018-04-10 10:44:47 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-04-10 02:56:35 -0600

Seen: 2,958 times

Last updated: Dec 08 '18