Ask Your Question

Revision history [back]

Better way to include OpenCV into Android application

When reading the tutorials about using OpenCV with Android, I get the impression that I must add over 100MB of data into my GIT-repository which I obviously don't want, but did so far. Is there a better way to include OpenCV into my Android application without polluting my repo?

When using OpenCV, I aim for the OpenCV Manager on Android Devices anyway, so I just want to add a minimal jar-file to my project that I can use, like the one, which is actually built when following the procedure from above.

Ideally it would be possible to add OpenCV just like any other dependency into my Gradle Buildscript and the respective jar is automatically pulled from a repository like jcenter.

dependencies {
     compile 'org.opencv:android:2.4.10'
}

Then all I had to do was to include something like this into my build-script and could start using OpenCV almost straight away. Would that be hard to realise?

If that is not possible, what do you think of building the library only once and just adding the 200k jar file to my repository and application? (If that works, it could be added to the documentation as a "lightweight"-way of using OpenCV with Android).

Better way to include OpenCV into Android application

When reading the tutorials or answers about using OpenCV with Android, I get the impression that I must add over 100MB of data into my GIT-repository which I obviously don't want, but did so far. Is there a better way to include OpenCV into my Android application without polluting my repo?

When using OpenCV, I aim for the OpenCV Manager on Android Devices anyway, so I just want to add a minimal jar-file to my project that I can use, like the one, which is actually built when following the procedure from above.

Ideally it would be possible to add OpenCV just like any other dependency into my Gradle Buildscript and the respective jar is automatically pulled from a repository like jcenter.

dependencies {
     compile 'org.opencv:android:2.4.10'
}

Then all I had to do was to include something like this into my build-script and could start using OpenCV almost straight away. Would that be hard to realise?

If that is not possible, what do you think of building the library only once and just adding the 200k jar file to my repository and application? (If that works, it could be added to the documentation as a "lightweight"-way of using OpenCV with Android).