Framework for creating a FRC Vision System using C++/OpenCV 2.xx

A Smartdashboard widget that calls a c++ executable to perform a Computer Vision Algorithm on the Axis Camera image using OpenCV 2.xx. The image is passed to the c++ executable which runs the vision algorithm and returns the results. The widget also draws large cross-hairs over the whole video feed and small cross-hairs over the target found by the c++ executable.

I’ve released my vision framework for FRC over on GitHub.com: github.com/kevinhughes27/cppVision

This framework can easily be extended to call any vision processing program from the smartdashboard, for example it would be easy to write a vision algorithm in python and call that.

Its a bit more of an idea for how things could be done rather than the polished piece of software I had envisioned when I started. I really would like to see OpenCV become the standard way to do computer vision for FRC.

As it says in the GitHub README here are some future considerations for the project:

  • The upcoming version of OpenCV features official desktop Java bindings essentially making this framework obsolete
  • It would be cool to code a stand-alone (aka no Smartdashboard) java program that does the same thing
  • It would also be neat to do the entire framework in c++, I originally looked into compiling the FRC / WPIlib NetworkTables for desktop c++ I made some progress but eventually ran out of time/steam
  • Another possible avenue for separate FRC vision systems would be to use the python wrappers for OpenCV and the robotpy (github.com/robotpy) project which can be compiled for desktop.