Ask Your Question
0

OpenCV in platform indepentent Gradle project (for Android and Desktop)

asked 2016-12-02 04:56:51 -0600

Flo gravatar image

I'm using Gluon Mobile plugin in Eclipse to deploy a basic imaging project to Desktop and Android. Gluon Mobile creates a Gradle-based project and uses javafxports. So the idea is write once - run anywhere. But I don't konw how to add OpenCV so that I can do some image processing on both platforms Desktop and Android. Can anyone help?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-12-24 07:53:07 -0600

Flo gravatar image

I'm using JavaCV 1.3 now and after a few problems it seems to work well now.

For anybody who's interested, I've edited my build.gradle like this:

...
dependencies {
    compile group: 'org.bytedeco', name: 'javacv', version: '1.3'
    desktopCompile 'org.bytedeco.javacpp-presets:opencv:3.1.0-1.3:windows-x86_64'
    androidCompile 'org.bytedeco.javacpp-presets:opencv:3.1.0-1.3:android-arm'
}
configurations {
    all*.exclude group: 'org.bytedeco', module: 'javacpp-presets'
}
...

Update your project and Gradle will download all necessary files and put it in your "Gradle Dependencies" Folder.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-12-02 04:55:45 -0600

Seen: 806 times

Last updated: Dec 24 '16