3534 Vision Code

Hey all,

Below is the link to Team 3534 Vision code for 2017. It is our first attempt at Vision.

Highlights:

  1. In C++
  2. Uses OpenCV; no GRIP
  3. Does have code for NetworkTables
  4. Threaded!
  5. Distance calculations
  6. Comments in the code :slight_smile:

We were able to run 2 camera full time @ 30 fps 800x600 (both cameras) over WIFI. Due to the limitations of the radio it was decreased to 640x240 @30 fps per camera. All processing was done on a Jaguarboard and the final image was sent to the driver station via UDP. The final image consisted of both cameras images with HUD display merged into a single image (i.e. camera0 then camera1 image side by side). The result was nearly realtime identification of targets.

https://github.com/chaoticmachinery/3534/blob/master/3534_vision.tar.gz

Driver station Receiver
https://github.com/chenxiaoqino/udp-image-streaming

Feel free to ping me if you have questions.

K Murphy

Cool! Thanks for sharing this. What protocol did you use for the video? JPG for sequential still images?

Yes we did use JPG.

And Marshall we owe your team a BIG thank you for the stuff you posted on vision. It was extremely helpful in our first endeavor into vision.

Also need to thank Metal Muscle for getting us started with OpenCV. Their example code really gave us a boost in learn OpenCV.

You’re quite welcome! Thanks for sharing what you did back!

I should add the code isn’t for automation. Just for driving and targeting during driving.

K Murphy