Go to Post Even though others have had success, I will be honest, this method sort of creeps me out. - Joe Johnson [more]
Home
Go Back   Chief Delphi > ChiefDelphi.com Website > Extra Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-24-2012, 09:09 PM
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: Clarkston, 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
pic: Vision Development

Reply With Quote
  #2   Spotlight this post!  
Unread 07-24-2012, 09:21 PM
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: Clarkston, 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
  #3   Spotlight this post!  
Unread 07-26-2012, 09:59 PM
Tom Line's Avatar
Tom Line Tom Line is offline
Don't lay blame. Fix probems.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 3,072
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: pic: Vision Development

We were having dismal vision tracking at Troy (using only the high target). While I was standing talking to Jim, I saw this screen flickering while you were tuning your shooting.

At that point, we had considered doing multiple target tracking, but simply not had time to implement it. Our good showing at West Mich. made us think it wasn't necessary.

After seeing that screen and having a nightmare at Troy, we spent a week developing a system that would lock on to various combinations of targets in this order of preference:
  1. All 4
  2. Top, Left, and Right.
  3. Bottom, Left, and Right.
  4. Top and Bottom.
  5. Left and Right.
  6. Top and Left
  7. Top and Right
  8. Bottom and Left
  9. Bottom and Right
  10. Top.
  11. Bottom.

We verified the target by first classifying them based on size (throwing out too large and too small), their height from the floor, then by angular relationships to other targets.

It worked beautifully, and was primarily finished because we knew you had already done it.

Figured you deserved the credit for pushing us to work just a little harder .
Reply With Quote
  #4   Spotlight this post!  
Unread 07-26-2012, 10:20 PM
Ekcrbe's Avatar
Ekcrbe Ekcrbe is offline
MIssin' the MItten
AKA: Erik Boyle
FRC #0395 (2 Train Robotics), FRC #4640 (Metallic Panthers)
Team Role: College Student
 
Join Date: Jan 2012
Rookie Year: 2012
Location: New York, NY
Posts: 407
Ekcrbe has a reputation beyond reputeEkcrbe has a reputation beyond reputeEkcrbe has a reputation beyond reputeEkcrbe has a reputation beyond reputeEkcrbe has a reputation beyond reputeEkcrbe has a reputation beyond reputeEkcrbe has a reputation beyond reputeEkcrbe has a reputation beyond reputeEkcrbe has a reputation beyond reputeEkcrbe has a reputation beyond reputeEkcrbe has a reputation beyond repute
Re: pic: Vision Development

It sounds so easy!!!


Noteworthy: First emoticon in 151 posts by Ekcrbe... He's given in.
__________________
Four years of FRC 68 Truck Town Thunder
2012 Championship Newton Division FinalistsóThanks 330 and 639 for the Full Court Press! | 2013 Kettering University District Chairman's Award Winners! | 2014 Great Lakes Bay Region District WinnersóThanks 288, 4819, and 5166! | 2014 Waterford District Chairman's Award Winners! | 2014 Michigan FRC State Championship Chairman's Award WinnersóCongratulations 33 and 503! | 2015 Center Line District Chairman's Award Winners! | 2015 Lansing District WinnersóThanks 314 and 1684! | 2015 FIRST in Michigan District Championship Chairman's Award WinnersóCongratulations 503 and 2137!


Reply With Quote
  #5   Spotlight this post!  
Unread 07-27-2012, 09:00 PM
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: Clarkston, 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

Quote:
Originally Posted by Tom Line View Post
We verified the target by first classifying them based on size (throwing out too large and too small), their height from the floor, then by angular relationships to other targets.
I don't actually use the height from the floor, just a few basic parameters (min size, rectangularity, edge strength) and the angular relationships.

If I were to improve it, I would probably attempt to guess position in the evil two-target scenario based on size vs height. I couldn't just categorize it by height or size since we do both fender and key shooting (and the fender shot prefers the lower targets, while the key prefers the upper ones).

Currently, we help the evil two-target guess by reading the gun state, but this is not very good for code reasons (the compare is done on the laptop side, so modifying anything in the state-machine means I have to recompile the laptop vision helper).
__________________
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
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:02 PM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi