ResetVisionFramework- Get your vision code up and running in minutes!

**ResetVisionFramework
**Easy, Quick, Fully Customizable, Get your Vision code up and running in minutes!

Github: https://github.com/Reset-Robotics/ResetVisionFramework

Features
Fully customizable framework allowing you to do whatever you want to do with your vision tracking. A GUI that auto generates vision code to your team’s needs in a matter of seconds for beginners and experts! Able to set how many cameras, what operations wanted, what to calculate (CenterX, CenterY), filter by aspect ratio, GPU acceleration option, communication library and more! Use the code generator to get started quickly or start coding manually using the framework.
Detailed framework allowing beginners to quickly learn how to code vision is C++ as well as giving full extensive options for experts to do various operations, filtering, and calculations.

How to Use
Note: this requires CMake and C++ compiler to already be installed. If you are not using CMake, just modify and use the .cpp on the platform you want.

Code Framework

  1. Download the folder from the github which contains ResetVisionFramework.cpp and a CmakeLists.txt

  2. First open up CMakeLists.txt and follow the commented instructions and what it does and what to change to fit your needs.

  3. Then open up the .cpp file and go over the framework. The comments will explain out what each section does, give some examples, and give you a template code to write out what you need. If you want to perform functions that are not in the examples, the OpenCV Documents are a great place to find them.

  4. After going through the template and having created your code, save both files and now you have a completed .cpp and CMakeLists.cpp

Code Generator Interface (coming soon)

  1. Click on all the options you want
  2. Press Submit
  3. It will auto generate a .cpp file (and a CMakeLists.txt if selected)

Final Steps

  1. Now that you have your .cpp and CMakelists.txt, go into the build folder (create an empty build folder if there is no build folder)
  2. run cmake…
  3. Then run make
  4. then ./filename.cpp

ResetVision Code Generator vs GRIP
The code generator is still in the works, but it sounds a lot like GRIP. The main differences between GRIP and this one is that this one will be a lot simpler to use and offer extra features that GRIP does not have like GPU acceleration, and ZMQ and UDP communication protocol support. This generator generates code that is easily customizable since it is based off the framework which allows it to be much more flexible and hopefully easier to integrate than GRIP to do all those complicated operations that the code generators do not offer. GRIP is still a great tool and I think that these two tools can complement each other.

Optional
Make your program run on startup

If you have any questions or comments please feel free to open up an issue on github, post it here, or shoot us an email at support@resetrobotics.org. You can check for any updates on the ChiefDelphi Thread or on Github.

**Coming Soon
**GUI Code Generator
Instructions on adding program to startup
Python Vision Framework

Indeed it is.

In a way, I sound like James Earl Jones. :wink:

Looks like an interesting project and I’m now following it on GitHub.

Thanks! Your team’s vision projects are amazing! I definitely got some inspiration from them :slight_smile:

The main differences between GRIP and this one is that this one will be a lot simpler to use and offer extra features that GRIP does not have like multiple camera support, GPU acceleration, and other communication protocol support

I’d like to point out that GRIP supports arbitrarily many camera inputs and GPU support is in the works.

What communication protocols are you planning on supporting? GRIP has network tables, ROS, and runs an HTTP REST endpoint.

Yeah it does. :cool:

I was planning on supporting ZMQ (TCP) and possibly a basic UDP setup and network tables of course. The main goal of the generator is to generate code based off the framework so that teams can easily adapt it to their situation. I really like the GRIP pipeline setup but I felt that integrating it with the robot was a bit harder. I want to make this generator easier to integrate because the framework allows the person to learn what exactly is going on and than they can go into the generated file and add in optimizations that either code generators do not have. My bad on the communications, I’ll edit the post.

I can’t wait to give this a go. I would love to see some tutorials and videos.

I might make some soon. Definitely check out the current framework released and feel free to ask any questions.

No computers at the lake. Even phone internet is sketchy. I’ll take a look at work this weekend.

I see you’re using system() calls to set camera settings and using the OpenCV VideoCapture object for image capture. I recommend you consider using the cscore library instead for this functionality, as it is much more robust than the OpenCV VideoCapture object regarding things like camera dropouts (disconnect/reconnect). The cscore library also provides MJPG server functionality for sending the camera stream to the dashboard. It’s designed to interoperate nicely with OpenCV, so it should be pretty close to a drop-in for the OpenCV VideoCapture stuff.

You may also want to look at https://github.com/wpilibsuite/VisionBuildSamples

I have actually looked into cscore before. I was originally planning on using that for this year’s vision code but it couldn’t compile on a Jetson so I used system() calls which worked fine so far so I decided to keep using system() calls in the framework. I could maybe add in a cscore option for the extra features.

Pushed out a release on github. So far the code generator performs all the operations and now I am working on filtering with bounding rectangles. The operations right now are only resize, converting to hsv, hsv threshold, and find contours. However, I’ll add more later but I’m going to try to quickly go through the rest and release a beta or take in some beta testers and then add in the extra features.

Code on GitHub seems to be about 4 days old. Not sure what you pushed or changed.

Oops, I just realized how misleading that sounds. I just made the the project into a release tag but I have not actually pushed out the new code generator changes. I’m planning on waiting till after finishing the filtering part.

Heres a big update on whats going on

The original design plans were wiped for something that looks completely different then that was originally in mind. The purpose of this project has also changed and so have the similarities and differences with GRIP.

Code Generator’s Purpose
This will be a graphical scripting engine that allows people to write vision scripts without needing to know a single line of code. The engine itself could be used for anything, but we’re focusing on vision first because we’ve noticed many teams struggling with its complexity and we’d like to help lower the barrier to entry.

We are planning on eventually expanding it to cover different use cases, and turning it into an educational tool to help people learn programming. The main difference between this and GRIP is that this will have more of the basic programming functions, such as loops, ifs, mathematical operations, and logic, rather than just vision processing. Also, this aims to be more flexible than grip with what you can do. When this is done, you should be able to be running four different camera pipelines simultaneous each with their own operations and conditions on when to run :smiley:

The visual script will be compiled into regular code, and will support multiple platforms including the roboRio, raspberry pi, and nvidia jetson with GPU acceleration. It will also have a live mode, where you will be able to run your script from within the program, edit the flowchart while it’s running, and see how your changes affect the output in realtime.

There will be monitor blocks that you can use to view images being processed by your script, as well as other data like booleans or numbers. Monitors will be ignored when compiling the script. Eventually, we might create a version of this tool that could be used for every aspect of FRC programming, including main robot code and smart dashboard. However, we would like to ask if anyone would actually want to use this tool for things like robot code and smart dashboard.

Here’s a sneak peek so far…