Go to Post Now really, who would want to try and go against Andy Baker? That's like trying to single-handedly outscore 25, 254, and your choice of triplet with a shopping cart. - Billfred [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


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:45.

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