View Single Post
  #2   Spotlight this post!  
Unread 24-07-2012, 22:21
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: pic: Vision Development

A little bit of timeline to go along with this picture:

-We had the baskets built in a few days. The night they were finished with retro-reflective tape, I took these pictures with my phone. I turned on the flash to get good bright rectangles.

-I ended up with 15 or so pictures from various places. I ran them through a bulk resizer to end up with 640x480 and 320x240 versions in 8-bit greyscale, since I was planning on processing them in greyscale for speed (at this point in time, I was still planning on running the vision code on the cRio itself).

-I took the sample LabVIEW code and heavily modified it into what I have now, and tested the algorithm on each folder of images, printing the data returned onto the images as baked overlays, and writing them to new JPEG files (such as this one). The resulting images were all 320x240 or 640x480 24-bit color, although ChiefDelphi has resized this one.

-I ran about 40 different primary revisions of the code through the vision test setup, incrementing the output directory each time (this particular image is from diamond day2 round5 testing, so it's the 5th major revision of the 2nd day I worked on the diamonds).

-The diamond algorithm finds all of the rectangles using a modified example program, then finds all possibly links between them (16 links for 4 targets), categorizes the links, categorizes the targets by guessed position in the diamond, and then weights each of the targets to find the proper center of the diamond. I began writing code to do "side angle calculation" (calculating the angle offset to the basket to allow compensation for side banking shots or side swish shots), but it never worked before I gave up.

-I ended up with the code I have today. You can find it in the Buzz17 Code I posted on ChiefDelphi, specifically the 2012vision zip ("test_vision.vi" is the actual test harness I used to generate this image).

-It took me about a week and a half to finish this. After finishing the JPEG runs, I setup a cRio/Axis cam setup and was thoroughly unimpressed with the performance, and designed the UDP dashboard system we use now.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
Reply With Quote