Skip to content
No description, website, or topics provided.
Java
Branch: master
Clone or download
Latest commit 77bddb8 Aug 10, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc/images Initial commit Jul 26, 2019
easyopencv Various fixes Aug 10, 2019
examples Sample things Aug 10, 2019
gradle/wrapper Initial commit Jul 26, 2019
.gitignore Initial commit Jul 26, 2019
build.gradle Initial commit Jul 26, 2019
gradle.properties Initial commit Jul 26, 2019
gradlew Initial commit Jul 26, 2019
gradlew.bat Initial commit Jul 26, 2019
readme.md v1.0 release Aug 10, 2019
release-aar.gradle Initial commit Jul 26, 2019
settings.gradle Initial commit Jul 26, 2019

readme.md

EasyOpenCV

Finally, a straightforward and easy way to use OpenCV on an FTC robot! With this library, you can go from a stock SDK to running a sample OpenCV OpMode, with either an internal or external camera, in just a few minutes!

Installation instructions:

IMPORTANT NOTE: This tutorial assumes you are starting with a clean SDK project. This library includes the OpenCV Android SDK, so if you have already installed OpenCV in your project through the traditional means, you will need to remove it first. Otherwise, you will get a compiler error that multiple files define the same class.

  1. Open your FTC SDK Android Studio project

  2. Open the build.common.gradle file:

    img-here

  3. Add jcenter() to the repositories block at the bottom:

    img-here

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

    img-here

  5. At the bottom, add this:

     dependencies {
         implementation 'org.openftc:easyopencv:1.0'
      }
    
  6. Now perform a Gradle Sync:

    img-her

  7. Because EasyOpenCv depends on OpenCV-Repackaged, you will also need to copy libOpenCvNative.so from the /doc folder of that repo into the FIRST folder on the internal storage of the Robot Controller.

  8. Congrats, you're ready to go! Now check out the example OpModes.

Known Issues:

Feel free to submit a pull request if you know how to fix any of these!

  • Currently, this library uses the SDK's built-in UVC driver for webcam support. Unforutnetly, the SDK's UVC driver is a buggy mess. This can cause all sorts of undesirable things to happen, such as crashes on USB disconnection, (or, if it survived the USB disconnection, hanging/deadlock when trying to stop the OpMode after the connection was restored), crashing of the Linux kernel if run too many times in a row, etc. However, the architecture of this library has been designed such that it would be straightforward to integrate an alternate implementation that would use a 3rd party UVC driver.
  • Internal camera support is currently provided via the Android Camera v1 API. This means that manual focus/exposure/ISO control is not possible. However, the architecture of this library has been designed such that it would be straightforward to integrate an alternate implementation that used the Camera v2 API.
  • [???] Opening the internal camera very occasionally fails with a "Fail to connect to camera service" error from the Android OS. I think this may be a bug in the ROM of my test device rather than a bug with this library, because in that scenario the standard camera app also fails to open the camera with the same error.

Changelog:

v1.0

  • Initial release
You can’t perform that action at this time.