GithubHelp home page GithubHelp logo

dogecv / dogecv Goto Github PK

View Code? Open in Web Editor NEW
69.0 23.0 64.0 13.48 MB

FTC Vision Library

Home Page: https://discord.gg/colton

License: GNU General Public License v3.0

Java 100.00%
ftc robotics vision opencv memes

dogecv's Introduction

THIS PROJECT IS NO LONGER SUPPORTED, AND COMPLETELY NON FUNCTIONAL FOR ANYTHING PAST THE ROVER RUCKUS SEASON.

PLEASE CHECK OUT EASYOPENCV, WHICH LETS YOU USE OPENCV IN FTC. IT HAS GREAT EXPLANATORY EXAMPLES THAT CAN BE ADAPTED TO WHATEVER THE CURRENT SEASON IS.

DogeCV

An easy to use computer vision library used for FTC Games to detect game objects. Based on EasyOpenCV and OpenCV.

Project Status:

No Longer Developed

DISCLAIMER

THIS REPO IS STILL UNDER CONTINUOUS DEVELOPMENT. WE WILL BE ADDING FURTHER DOCUMENTATION, BUG FIXES, AND NEW FEATURES

To run this library, you need an SDK version of at least 5.1

Unfortunately, this library will not work on the ZTE phones, as OpenCV does not work on KitKat.

Unfortunately, the video tutorials, are outdated and will be updated soon. Please read the installation directions and be check out the examples inside the code. Please contact any of the developed if you need help!

Videos (OUTDATED!!!)

Wizards.exe have been amazing with their DogeCV coverage, so please check them out and give your support, the videos are easy to understand and well made, great for people who want to learn DogeCV for past versions. Please do keep in mind that these tutorials are for older versions of DogeCV and will not work for the newest version.

Detectors Status

  • Stone Detector - Implemented. Needs improvement.
  • Skystone Detector - Implemented. Not Reliable, Under rewrite.

(In)active Development Team

  • Aditya Mangalampalli FTC 9614 Hyperion @Alpheron#2162
  • Alex Carter FTC 7195 Mechanical Memes @VictoryForPhil#0001
  • Arnav Komaragiri FTC 8719 Quantum Leap @-----#9037
  • Ben Loan FTC 3795 JagWired @Ben6501#0094
  • Abigail FTC 7026 JDroids @abidingabi#5805
  • Frank Portman FTC 8581 Aedificatores @Something Disposable#9622

(In)active Contributors

  • Adhit Siripurapu FTC 9614 Hyperion (Testing) @Prickles#0203
  • Ishaan Oberoi FTC 9794 Wizards.exe (Publicity) @RollerCoaster45#0637
  • Nathaniel Lesser FTC 12897 Newton's Law of Mass' (Logos)
  • Sarthak Bhatnagar FTC 9794 Wizards.exe (Odometry & Tutorials) @s.bhatnag#0906
  • OpenFTC Team for EasyOpenCV which this library is based on

Doge Alumni

  • Levi Gershon FTC 12897 Newton's Law of Mass @LegoF4#2372

Other Past Contributors

  • Robert Iridon and Prodaniuc Pavel FTC 15994 CSH (Webcam testing)
  • Nathaniel Lesser FTC 12897 Newton's Law of Mass' (Banner art)
  • Karter FTC 5975 Cybots (Brainstorming for Jewel Detector)
  • Guineawheek (EnderCV Classes)
  • Owen Gonzalez (Testing)
  • Kwon Paradigm Break (Testing)

Install (Credit to EasyOpenCV)

  1. Pull up Android Studio, with the FTC application SDK open
  2. Go to the root build.gradle
  3. To the repositories section, add the lines
allprojects {
  repositories {
    maven { url 'https://jitpack.io' } // this line!
  }
}
  1. Add the line implementation 'com.github.dogecv:dogecv:2020.4-alpha' to TeamCode's build.release.gradle, inside the dependencies block
  2. Press the Sync Now button that should appear in the top right
  3. 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.

Known Issues

(These issues are referring to the 2019-2020 FTC Year Detectors, and not the Relic Recovery or Rover Ruckus ones as those are no longer supported)

  • Skystone detectors aren't accurate
  • Stone detectors aren't accurate

Planned Features / TODO

  • Expand Wiki
  • Add in distance scoring between samples to increase accuracy
  • General Code Clean up
  • Basic angle/positioning of elements
  • Port Old detectors to new systems
  • Better Safety checks
  • New Frame Input System
  • ML detectors

FAQ

  • Can I still use classic OpenCV? Yes! We want teams to use DogeCV to learn about vision and start to create their own vision systems. That's why OpenCV is open in all layers of DogeCV, and we keep the classic OpenCvPipepline introduced in the EasyOpenCV library.
  • Can I use a webcam? Once more, yes! See the DogeQuickStart and the wiki for an explanation of how to this.

Changelogs

2020.1-alpha:

  • Changed to EasyOpenCV from EnderCV (thanks OpenFTC team!)
  • Added StoneDetector
  • Added SkystoneDetector
  • Removed legacy detectors (may be added back later)
  • Added DigitalCamera class for localization

2019.1:

  • Complete re-work of the Dogeforia system. It is now integrated within the OpenCVPipeline class, and is much simpler.
  • Implemented image cropping, see CroppingExample
  • Fixed miss-rotation in Vuforia display. The image should now be correctly oriented on the RC display
  • Added VuMarkExample OpMode to demonstrate the basics of the new system
  • Added WebcamGoldExample OpMode to demonstrate how to use a webcam with a detector under the new system
  • Added `GoldAndVuMarks
  • Added CroppingExample OpMode, intended to ease image cropping and to showcase functionality
  • Added GoldExample OpMode
  • Added method getYPosition() to GoldAlignDetector
  • Added VuMarkDetector to provide a ready-made detector for the VuMarks within DogeCV. I will have it highlight VuMarks at a later date
  • Added enum VuMark to DogeCV to make dealing with VuMarks easier in code
  • Added enum 'CameraModetoDogeCVto make setting the camera betweenFRONT, BACK, and WEBCAM` easier
  • Added wiki entries for VuMarks and Webcams
  • Reworked code comments
  • Removed camera index as a constructor argument in OpenCVPipeline. This has been replaced by DogeCV.CameraMode
  • Updated page banner - thanks Nathan!
  • Updated this README

2018.2.1 HOTFIX:

  • Removed AsyncFilterRunner import from Sampling Detector #12
  • Fixed Dogeforia crash on stop #10

2018.2:

  • Added HoughSilverDetector: intended for slighter slower but more precise silver mineral classification. Works nicely.
  • Added JavaDocs and in-depths comments on most detectors, scorers, and filters
  • Changed DogeCVScorer input from MatOfPoint to Mat in order to facilitate more diverse scoring methods
  • Detectors now have a seperate displayMat as opposed to a workingMat; one is for detection work, the other is for displaying the results
  • Added SilverExample OpMode for demonstrating silver detector use
  • Added HoughSilverExample OpMode for demonstrating Hough transform-based silver detector use
  • Gold Align Detector now has setAlignSettings(int offset, int width) function to set parameters
  • Updated SamplingOrderDetector to choose top two silver minerals instead of all
  • Ported GenericDetector to using DogeCVDetector
  • Ported BlankDetector to using DogeCVDetector
  • Added updateSettings to LeviColorFilter
  • Corrected typos within this README
  • Added an experimental WHITE option to LeviColorFilter
  • Cleaned up detectors and filters

2018.1:

  • Added HSVRangeFilter that uses classic lower and upper HSV ranges
  • HSVColorFilter now divides the range by 2 on each side of the perfect color value. (Now range acts as expected) (Issue #9)
  • Added SilverDetector (Same as Gold but for silver)
  • Moved SamplingOrderDetector to use HSVRangeFilter for silver
  • Tuned Sampling (Still not competition ready)
  • Cleaned up Dogeforia handling per suggestions of "@BillTheCat123 | Mentor | 3763" on FTC Discord
  • Fixed Gradle import issues of :FTCRobotController with Dogeforia class. (Issue #8)
  • Cleaned up Gradle Build files to lessen import errors
  • Added common Gradle Build errors to wiki
  • DogeCVDetector now handles printing the detector setting to the screen

2018.0:

  • New Versioning System
  • New Scoring API
  • New DogeCVDetector Class
  • Vuforia Support
  • Gold Align, Mineral Order, and Gold Detectors
  • General Code Cleanup
  • Cleaner Params
  • Moved Downscaling to DogeCVDetector Class
  • Updated to EnderCV 2.0 (Modfied)

1.1.1 HOTFIX:

  • Fixed Jewel Detector Blue Filter

1.1:

  • New Color Filter API
  • New Generic Detector
  • Fixed Jewel Debug Scores
  • Fixed Imports for DogeLogger inside Cryptobox Detector
  • Ported all detectors to Color Filter API
  • Added Yellow to LeviColorFilter
  • Added HSV color filter
  • New Relic/Generic Example

1.0:

  • New Cryptobox Detector
  • YouTube Tutorials
  • Per-Detector Documentation
  • Wiki Start
  • Added perfectRatio tuning for Jewels
  • Optimization
  • Removed Multiple Mat returning

0.5:

  • Fixed rotated preview on portrait mode.
  • Detectors return an array of images. You can cycle through them by tapping on the preview screen

Contact

Please feel free to message us on Discord with the usernames that we have listed above. You can also usually spot us on the FTC Discord and feel free to ask us if you have any questions.

dogecv's People

Contributors

abidingabi avatar amangalampalli avatar arnavkomaragiri avatar duniwayrobotics avatar fgpor avatar guineawheek avatar jeffless avatar jeremycole avatar kadengordon avatar legof4 avatar lukeboi avatar paarthtandon avatar pjtnt11 avatar victoryforphil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dogecv's Issues

Issue with building gradle

Build Output

Information:Gradle tasks [:FtcRobotController:generateDebugSources, :FtcRobotController:generateDebugAndroidTestSources, :FtcRobotController:mockableAndroidJar, :FtcRobotController:compileDebugAndroidTestSources, :FtcRobotController:compileDebugUnitTestSources, :FtcRobotController:compileDebugSources, :TeamCode:generateDebugSources, :TeamCode:generateDebugAndroidTestSources, :TeamCode:mockableAndroidJar, :TeamCode:compileDebugAndroidTestSources, :TeamCode:compileDebugUnitTestSources, :TeamCode:compileDebugSources, :openCVLibrary3:generateDebugSources, :openCVLibrary3:generateDebugAndroidTestSources, :openCVLibrary3:mockableAndroidJar, :openCVLibrary3:compileDebugAndroidTestSources, :openCVLibrary3:compileDebugUnitTestSources, :openCVLibrary3:compileDebugSources, :DogeCV:generateDebugSources, :DogeCV:generateDebugAndroidTestSources, :DogeCV:mockableAndroidJar, :DogeCV:compileDebugAndroidTestSources, :DogeCV:compileDebugUnitTestSources, :DogeCV:compileDebugSources]
C:\Users\Sam\Desktop\Botics\DogeCV\src\main\java\com\disnodeteam\dogecv\Dogeforia.java
Error:(21, 57) error: package org.firstinspires.ftc.robotcore.external.function does not exist
Error:(22, 57) error: package org.firstinspires.ftc.robotcore.external.function does not exist
Error:(26, 66) error: package org.firstinspires.ftc.robotcore.internal.camera.libuvc.api does not exist
Error:(27, 66) error: package org.firstinspires.ftc.robotcore.internal.camera.libuvc.api does not exist
Error:(28, 66) error: package org.firstinspires.ftc.robotcore.internal.camera.libuvc.api does not exist
Error:(30, 56) error: VuforiaTrackableImpl is not public in org.firstinspires.ftc.robotcore.internal.vuforia; cannot be accessed from outside package
Error:(32, 73) error: package org.firstinspires.ftc.robotcore.internal.vuforia.externalprovider does not exist
Error:(118, 22) error: cannot find symbol method convertFrameToBitmap(Frame)
Error:Execution failed for task ':DogeCV:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.
Information:BUILD FAILED in 1s
Information:9 errors
Information:0 warnings
Information:See complete output in console

Hello!

This is my first time using Android Studio and DogeCV for FTC, so sorry if this is a PEBKAC error. I have been trying to import DogeCV/OpenCV, but whenever I try to build the app, it crashes with this output. The errors seem to be in the Dogeforia.java file. My FTC App fork can be found at https://github.com/FeehanRobotics/ftc_app.

Thank you!

TensorFlow (FTC Supported)

Just wanted to mention that FTC now officially supports TensorFlow for vision tracking, so teams may use that since DogeCV is still in alpha.

error when running app on phones

The app can build properly, but when I try and run it on a phone it gives me this error:
"error: cannot access CameraBridgeViewBase
class file for org.opencv.android.CameraBridgeViewBase not found"

Distance Scoring

One of the goals you have listed is "Add in distance scoring between samples to increase accuracy".

I was curious how distance scoring is any different from area scoring? Wouldn't they be the same thing?

Documentation for Generic Detector and Color Filter API

I would love to use your framework to make a custom Detector for a project I'm trying, but your wiki page for the Generic Detector is vague and pretty hard to understand. Can you please clarify what some of the fields do? The Color Filter API's page is easier to understand, but still leaves a little to be desired.

Can you please supply a better guide to creating customized detectors using Generic Detector and Color Filter API?

Gradle Sync Issue with new SkyStone FTC SDK

When i install the dogeCV libraries into my project with the updated Skystone SDK, i get this error.

ERROR: Failed to resolve: :RobotCore-release:
Affected Modules: DogeCV

does anyone know a way to fix this with the new SDK???

AsyncFilterRunner missing from 2018.2 Release

Line 7 in SamplingOrderDetector.java in 2018.2 imports com.disnodeteam.dogecv.filters.AsyncFilterRunner but there doesn't seem to be an associated file / class in filters. This wasn't there in 2018.1, and 2018.2 seems to build fine after commenting the line out.

FTC Robot controller app crashing at stop?

TI'm experiencing a bug in which after using the Vuforia phone testing OpMode(which works correctly), either after init or after starting the FTC Robot Controller app on the RC phone crashes, with an android dialog saying "Unfortunately, FTC Robot Controller has stopped." This will probably prove to be an issue for us in the future, is there any way to fix this? We are using ZTE speeds for now, but we might upgrade later down the line. Is there any way to stop the app from crashing?

Fails gradle lint

We are using TravisCI and DogeCV fails the gradle lint stage:

/home/travis/build/ftc16072/2019preseason/DogeCV/build.gradle:4: Error: The compileSdkVersion (23) should not be lower than the targetSdkVersion (27) [GradleCompatible]
1757 compileSdkVersion 23
1758 ~~~~~~~~~~~~~~~~~~~~

How do I access the alignedX var outside of the class

I'm working on a opmode with gold align detector, and i want to use the alignedX variable in my code to use. I've messed around with some values and things but can't figure it out. More spicificly, I'm looking for the center of what the detector considers aligned.

Should color filter values be clipped?

Wondering... In the filtering methods, should the HSV ranges be clipped?.

eg: in the following code, a poor user-choice of perfect and range values could result in negative or excessive HSV values...

Scalar lower = new Scalar(perfect.val[0] - range.val[0], perfect.val[1] - range.val[1],perfect.val[2] - range.val[2]);
        Scalar upper = new Scalar(perfect.val[0] + range.val[0], perfect.val[1] + range.val[1],perfect.val[2] + range.val[2]);

android 5.1 support

Can't use library because OpenCV3 uses old API(less 21). Can you update it?

Gradle sync failed.

ERROR: Could not find method implementation() for arguments [project ':DogeCV'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

Will the OPENCVLibrary3 be in the Zip File as it was last year?

When we downloaded the DOGE CV zip file, we didn't see the OPENCVLibrary3 in it so it also didn't show up in Android Studio. In last year's package the OPENCV library was there but this year it's not in the folder. Do you guys have any plan on putting it in the zip file? Also, which OpenCV library version is used for Doge CV.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.