View Single Post
  #4   Spotlight this post!  
Unread 14-02-2016, 14:39
DGoldDragon28's Avatar
DGoldDragon28 DGoldDragon28 is offline
Programmer
FRC #1719 (The Umbrella Corporation)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2015
Location: Baltimore, MD
Posts: 10
DGoldDragon28 is an unknown quantity at this point
Re: Vision for frc 2016

For vision code, you have two parts: One that analyzes the image and spits out data about the contours of the image and another that analyzes those contours and gives you a position. For the former, I suggest using GRIP, a Java-based image processor with a great GUI which can be found on GitHub. It can be run on the RIO or, as we did, on a co-processor (WARNING: GRIP only works on some architectures so make sure your processor has a supported architecture). General way to use it is Image source -> Filter -> Find Contours -> Publish Contours. You then have a network table at GRIP/<nameyouchoose> that contains several arrays with contour information. Read that on the RIO and perform some trigonometry, and you have the position of the target.

NOTE: for sensing retroreflective tape, you should ring your camera with LEDs and sense for that color. You may have to adjust your camera's exposure (Or LifeCam's default was quite whitewashed).
Reply With Quote