Go to Post used to find BBQ(Blue Banner Quotient) and SAUCE(Sextuple Advancement Uniform Counting Era)[URL="http://bbqfirst.x10host.com/index.php"]bbqfirst.x10host.com[/URL] Happy BBQing! - Beaker [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 24-01-2012, 23:13
dmitch's Avatar
dmitch dmitch is offline
Chief Head Electrical Guy
AKA: Daniel Mitchell
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Bishop Miege High School
Posts: 142
dmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the rough
Axis Camera Tracking

What our team is wanting to do is have the camera track the target to the point where on our driver station we will have cues for the driver as to what direction to go.

Now, I am a rookie programmer and our coach is dead set on using this so I need help with vision tracking, and using it to give cues to the driver station. How would I go about doing something like this?
__________________
Reply With Quote
  #2   Spotlight this post!  
Unread 25-01-2012, 00:30
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Axis Camera Tracking

Have you read the Vision Targeting white paper.
http://www.chiefdelphi.com/media/papers/2620
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 25-01-2012, 23:56
Tommy.Brown's Avatar
Tommy.Brown Tommy.Brown is offline
Lead Programmer
FRC #1477 (Texas Torque)
Team Role: Programmer
 
Join Date: Jul 2011
Rookie Year: 2011
Location: The Woodlands
Posts: 27
Tommy.Brown is an unknown quantity at this point
Re: Axis Camera Tracking

Ah, well working with nivision.h for image processing is already difficult enough. Basically your program flow will look like the following:

Take in image from the camera -> Apply threshold to the image -> convex hull operation -> edge detection -> get the corner edges so that you know how far you are away from the target in pixels. (All of these functions can be found in nivision.h or in the Vision folder in WPILib)


Having it send the cues to the DriverStation will be and issue. If you have yet to do so, look into SmartDashboard in WPILib or NetworkTables in WPILib. With them you should be able to freely send data back and forth between the cRIO and the DriverStation.
__________________
FRC Team 1477 - Texas Torque
The Woodlands, Texas
Reply With Quote
  #4   Spotlight this post!  
Unread 28-01-2012, 15:15
dmitch's Avatar
dmitch dmitch is offline
Chief Head Electrical Guy
AKA: Daniel Mitchell
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Bishop Miege High School
Posts: 142
dmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the rough
Re: Axis Camera Tracking

THanks for the replies, while the information given was helpful I'm afraid I didn't specify well enough what I meant. I have almost no programming experience whatsoever. I don't even know where to start for such tasks as getting the image or applying specific filters to it or putting that into code. Any examples or papers that take me step-by-step would be great, thanks!
__________________
Reply With Quote
  #5   Spotlight this post!  
Unread 28-01-2012, 16:24
dvanvoorst dvanvoorst is offline
Registered User
FRC #2771 (Code Red)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Grand Rapids, MI
Posts: 61
dvanvoorst is an unknown quantity at this point
Re: Axis Camera Tracking

If you are programming in Java, we just noticed there was an update to the wpi libraries that includes additional functions for image processing as well as a new sample program specifically for tracking this years targets. We were able to use the sample program and within an hour have it identify targets and print information about them using the camera input. (The sample is coded to use a stored image, but you just need to uncomment the camera code and comment out the stored image code).
You DEFINITELY want to check out that sample program for a starting point.
Reply With Quote
  #6   Spotlight this post!  
Unread 31-01-2012, 16:55
l0stboy l0stboy is offline
Registered User
FRC #4064 (InZombiacs)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: United States
Posts: 22
l0stboy is an unknown quantity at this point
Re: Axis Camera Tracking

My team is also just starting out and looking into programming the camera. We have a basic idea on the process, and we feel that we can do it. However, how would the sample NetBeans project be converted to use with the CommandBase Robot style?
__________________

Pedro
Ocala InZombiacs
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 02:33.

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