Go to Post I don't get what all you people have done wrong to make the drills have so many problems. - Cory [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 12-02-2010, 11:50
guoruiwu1994 guoruiwu1994 is offline
Registered User
FRC #1815
 
Join Date: Feb 2010
Location: Toronto
Posts: 15
guoruiwu1994 is an unknown quantity at this point
Tracking Ball with Camera

Does anyone know any good ways to track the balls with the camera? From reading the forums, I see that a good way is to see where the carpet is missing, and then just assume that's where the ball is. However, we don't know which classes and funtions to use in order to achieve this. If anyone can help us on this that would be great.
Reply With Quote
  #2   Spotlight this post!  
Unread 12-02-2010, 12:50
DavidGitz's Avatar
DavidGitz DavidGitz is offline
Lead Technical Advisor
FRC #1208 (MeTool Brigade)
Team Role: Coach
 
Join Date: Dec 2006
Rookie Year: 1996
Location: O'Fallon, IL
Posts: 341
DavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud ofDavidGitz has much to be proud of
Send a message via AIM to DavidGitz Send a message via MSN to DavidGitz Send a message via Yahoo to DavidGitz
Re: Tracking Ball with Camera

Quote:
Originally Posted by guoruiwu1994 View Post
From reading the forums, I see that a good way is to see where the carpet is missing, and then just assume that's where the ball is. However, we don't know which classes and funtions to use in order to achieve this. If anyone can help us on this that would be great.

We were originally going to try this method, but due to other objects on the field like robots and the playing field, and having to deal with elements outside of the playing field that the camera would pick up, we deemed this not to be very practical. Unless of course your camera is pointed down sufficiently enough that these things wouldn't be an issue.

Instead our students implemented a normal circle tracking script tuned to the ball instead, reportedly it can track the ball while its even flying through the air (Not sure of the utility in this capability but this means it will work pretty reliably on the ground). I will upload the NI Vision script here so that other teams can tune it to their own needs.
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 12-02-2010, 17:24
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Tracking Ball with Camera

If they've achieved results that amazing, they must have implemented one of those CSI filters the policemen use on TV all the time. Perhaps they can also zoom in and estimate the air pressure of the ball and determine which team's robot kicked it by using the shadows in the image .

The circle tracker will be quite slow, needs sharply defined edges, doesn't like shadows. The carpet technique sill be pretty fast and more resistant to blur. The key is to use some of the particle filters before you get the particle analysis and to look at some of the measurements that indicate how circular the particle is.

Note that this technique and the circle detection both need the camera to point downwards in order to be effective. This is pretty easy to verify simply by moving a ball around in front of the robot and viewing on the dashboard.

Greg McKaskle
Reply With Quote
  #4   Spotlight this post!  
Unread 13-02-2010, 09:16
guoruiwu1994 guoruiwu1994 is offline
Registered User
FRC #1815
 
Join Date: Feb 2010
Location: Toronto
Posts: 15
guoruiwu1994 is an unknown quantity at this point
Re: Tracking Ball with Camera

detectEllipse seems to be a good one to use, however, I cannot find enough documentation on that, where would I put it, and would I have to declare anything?
Reply With Quote
  #5   Spotlight this post!  
Unread 13-02-2010, 09:26
ideasrule's Avatar
ideasrule ideasrule is offline
Registered User
FRC #0610 (Coyotes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Toronto
Posts: 108
ideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the rough
Re: Tracking Ball with Camera

Quote:
Originally Posted by guoruiwu1994 View Post
detectEllipse seems to be a good one to use, however, I cannot find enough documentation on that, where would I put it, and would I have to declare anything?
I've fiddled with detectEllipse, and you're right, the documentation is lacking. If you open Vision Assistant and open the shape detection function, you'll understand what to put for *most* of the parameters. You can find more documentation in the Java library and in the nivision.h header file.
Reply With Quote
  #6   Spotlight this post!  
Unread 13-02-2010, 10:47
guoruiwu1994 guoruiwu1994 is offline
Registered User
FRC #1815
 
Join Date: Feb 2010
Location: Toronto
Posts: 15
guoruiwu1994 is an unknown quantity at this point
Re: Tracking Ball with Camera

I tried opening up Vision Assistant on the provided Classmate PC, however, I wouldn't work the error message said that the screen resolution is too low. Also, there is no VGA plug to plug in another monitor. Is there a way to stop the screen resolution check?
Reply With Quote
  #7   Spotlight this post!  
Unread 13-02-2010, 11:03
guoruiwu1994 guoruiwu1994 is offline
Registered User
FRC #1815
 
Join Date: Feb 2010
Location: Toronto
Posts: 15
guoruiwu1994 is an unknown quantity at this point
Re: Tracking Ball with Camera

We are using Netbeans to program the robot, how would I get this working under Netbeans?
Reply With Quote
  #8   Spotlight this post!  
Unread 17-02-2010, 01:40
joxphoto joxphoto is offline
Registered User
FRC #0369
 
Join Date: Mar 2009
Location: Brooklyn, NY
Posts: 9
joxphoto is an unknown quantity at this point
Re: Tracking Ball with Camera

Quote:
Originally Posted by guoruiwu1994 View Post
I tried opening up Vision Assistant on the provided Classmate PC, however, I wouldn't work the error message said that the screen resolution is too low. Also, there is no VGA plug to plug in another monitor. Is there a way to stop the screen resolution check?
-----------

You can increase the screen resolution to the maximum (1024 x 768, if I'm not mistaken). The tradeoff is that your "workarea" will be slightly bigger than the screen, thus, "panning" effect will be experienced when going from edge-to-edge of the screen.

If you have another computer to use, I suggest installing the Vision Assistant there, create all your scripts and maybe generate some code, then deploy those to your Classmate.

We've done both methods and both work reliably.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
ball tracking w/ camera kamocat Programming 13 20-02-2010 17:49
Camera not tracking with default code iTHOS=awesome C/C++ 3 09-02-2009 11:14
Camera Color Tracking with Team 2859 Personality LightWaves1636 Programming 4 29-01-2009 21:03
Trouble With Autonomous Camera Tracking whswrestler189 NI LabVIEW 5 21-01-2009 19:20
Moving robot while tracking with camera questions... Steve Orr Programming 6 02-02-2006 22:24


All times are GMT -5. The time now is 12:36.

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