Closed JediScoy closed 1 year ago
EasyOpenCV on Github
Installation instructions (Android Studio): IMPORTANT NOTE: These instructions assume 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.
IMPORTANT NOTE #2: Do NOT locally clone and/or import this project unless you want to develop this library itself! If you're just a normal user, follow the below instructions verbatim.
[x] Open your FTC SDK Android Studio project
[x] Open the build.gradle file for the TeamCode module:
[x] At the bottom, add this: dependencies { implementation 'org.openftc:easyopencv:1.5.2' }
[x] Open the build.common.gradle file, scroll down until you find this part:
Remove both references to "arm64-v8a" described in debug and release blocks, leaving "armeabi-v7a" untouched: *If you already had "arm64-v8a" removed, no further changes are needed
**This step is needed because the OpenCV native library is compiled for 32-bit, and Android applications cannot load both 32-bit and 64-bit libraries at the same time. Otherwise, a warning will be shown when opening the app, indicating that OpenCV-enabled OpModes will crash.
[x] Now perform a Gradle Sync:
[x] Because EasyOpenCv depends on OpenCV-Repackaged, you will also need to copy libOpenCvAndroid453.so from the /doc/native_libs folder of that repo into the FIRST(sdcard/FIRST in Android Studio File Transfer) folder on the USB storage of the Robot Controller (i.e. connect the Robot Controller to your computer with a USB cable, put it into MTP mode, browse the contents of the file system, and drag 'n drop the file into the "FIRST" folder at the top level of the filesystem). Note that Control Hubs default to MTP mode and thus should be recognized immediately upon plugging it in. For Mac, you will either need to use the Android File Transfer program, or you can use the built-in file explorer side pane in Android Studio.contents of the file system, and drag 'n drop the file into the "FIRST" folder at the top level of the filesystem). Note that Control Hubs default to MTP mode and thus should be recognized immediately upon plugging it in. For Mac, you will either need to use the Android File Transfer program, or you can use the built-in file explorer side pane in Android Studio.
[ ] Congrats, you're ready to go! Now check out the example OpModes and other documentation in the Documentation Section.
Most of setup is complete (see checklist above) Next step is looking at examples (already copied to dev-auton branch) and customizing OpenFTC/EOCV-AprilTag-Plugin
Fully functional! Maybe some minor tweaks on parking, but 100% accuracy reading AprilTag
Proof of concept is working on dev branch. I have added signalOnePark( ) method, signalTwoPark( ) method and signalThreePark( ) to Red 25 as proof of concepts. Vuforia to be integrated soon @lvanscoyoc