Go to Post Amazing what you can find with a quick video and the unlimited power of the internet! - AveryLevin. [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 19-01-2014, 00:03
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
pic: Found It!

Reply With Quote
  #2   Spotlight this post!  
Unread 19-01-2014, 00:04
geomapguy's Avatar
geomapguy geomapguy is offline
Centenary '18
AKA: Graham Maxwell
FRC #1818
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Alexandria, LA
Posts: 535
geomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud ofgeomapguy has much to be proud of
Re: pic: Found It!

What's the code/setup behind this?
__________________
The Cowboys - FIRST Robotics Team #1818 2015-
The Bolton Bear Bots - FIRST Robotics Team #3666 2011-204 (30-26-0)
2014 Oklahoma Regional - 20/62 (6-4-0), 5/62 in OPR
2014 Arkansas Regional - 14/39 (8-7-0, Quarterfinalists with 1706 and 1939), 24/39 in OPR
2013 Lone Star Regional Dean's List Finalist!
2013 Lone Star Regional - 22/57 (6-5-0), 17/57 in OPR
2012 Bayou Regional - 16/49 (6-5-0)
2011 Dallas Regional - 10/52 (4-2-5, #6 Alliance Captain, Quarterfinalists with 2948 and 3350)
Reply With Quote
  #3   Spotlight this post!  
Unread 19-01-2014, 00:07
otherguy's Avatar
otherguy otherguy is offline
sparkE
AKA: James
FRC #2168 (The Aluminum Falcons)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: CT
Posts: 431
otherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to beholdotherguy is a splendid one to behold
Re: pic: Found It!

Would you describe the algorithm you are using to detect the ball?
__________________
http://team2168.org
Reply With Quote
  #4   Spotlight this post!  
Unread 19-01-2014, 00:23
jmartin jmartin is offline
Registered User
AKA: Joseph Martin
FRC #0172 (Northernforce)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Gorham
Posts: 30
jmartin is on a distinguished road
Re: pic: Found It!

I too would be interested in what algorithm is being used. More specifically, since you seem to be using a Kinnect, are you using the point cloud data to help identify the ball?

I know I'm really excited to use ball tracking to try to do some automated catching. I had though about using a Kinnect, but I don't think the raspberry pi we're using for onboard vision processing would be able to process fast enough using the Kinnect. What cool things are you going to do with your ball tracking?
Reply With Quote
  #5   Spotlight this post!  
Unread 19-01-2014, 10:08
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: pic: Found It!

Where you could probably get the kinect working with some linux distribution, I'm not sure if some the of the features of the kinect sdk are readily available from the open kinect projects and such. Specifically the ability to map color pixels to depth pixels.

I simply used the straight microsoft c# sdk, and used the KinectExplorer example as a basis.
My theoretical setup would include a nuc, an arduino and a kinect. My thinking was that I would use the arduino to relay the target's x, y, and depth back to the crio. Avoiding any of the issues that may occur passing this data through the network.

The algorithm should be able to be reproduced, and is not perfect. The first thing I put it through is a blob area and color threshold.

The color threshold is a max red, max green, min blue, and max average color.

For area, essentially I find a pixel that meets the color threshold, and then recursively fan out from there, finding any neighboring pixels, and checking them too. Each returns 1 or 0 to indicate whether the pixel is hot or not. As its recursive I can get the area of the connected blob.

I then calculate the distance to the center of mass of that blob.

The center of mass is often not the actual center of the ball, so I then you the depth sensor to find neighboring pixels, to find the closes pixel to the camera. My minDepth function also only accepts values that are > 90% of the current minDepth. Which helps to avoid any foreground items.

I then maintain a 5 frame running average of x and y, and use that for the position. Downside to this right now is that if I get a false positive it could take several frames for the target to reacquire.

It's far from perfect, but I do like the idea of being able to find the center of the ball based on depth as opposed to color. I am considering trying to get a kinect v2 developer kit, to see if I can get something put together for next season. Kind of like the startings of a wpilib type thing for the kinect.

The biggest issue is weight and power. I would personally prefer powering the nuc and arduino off a 19v battery than the power supply. Something like this: http://www.xpalpower.com/energizer/xp18000a.php. I guess I could resell it and make it a cots item:

http://www.newegg.com/Product/Produc...82E16856102001

But i'm not sure that nuc sale price will stick around for long. I also would prefer having the nuc with the i5 for obvious reasons. I guess if I come up with it, I'll just have to find a more FIRST friendly way of providing voltage boosters.

It's also probably around 5 pounds for the set up... Certainly more than most teams would be willing to spend.
__________________
"Never let your schooling interfere with your education" -Mark Twain
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 19:18.

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


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