OpenFTC / OpenCV-Repackaged

10 stars 8 forks source link

OpenCV-Repackaged

This is the OpenCV Java API, repackaged into an AAR that you can add as a Gradle dependency to your Android Studio project. This is exactly the same thing that is in the /sdk/java folder of the OpenCV Android bundle.

Why would I want to use this?

To avoid the pain of having to download the OpenCV Android bundle, extract the Java library, and import it as a module in Android Studio. This bloats your git repository and makes it a pain to upgrade to a newer OpenCV version.

Installation Instructions

  1. Open your FTC SDK Android Studio project

  2. Open the build.gradle file for the TeamCode module:

    img-her

  3. At the bottom, add this:

    dependencies {
        implementation 'org.openftc:opencv-repackaged-bundled-dylibs:4.10.0-A'
     }
  4. You can now use OpenCV just as you would as if you had manually imported the module, with one minor difference being you do not need to call any methods such as OpenCVLoader.initDebug() because the native library is automatically loaded in the background when the SDK boots.

Changelog:

v4.10.0-A

v4.7.0-A

v4.5.3-C

v4.5.3-B

v4.5.3-A

v4.1.0-C

v4.1.0-B

v4.1.0-A