Go to Post Don't get mad, learn, and get even. - Eric O [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-01-2012, 21:45
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Detecting the vision target

What is the best way to detect the Vision target with the camera?

For last year, we were able to use the NIVision detect circle to find the posts.
So far, I have not been able to get the Vision Assistant to detect a rectangle.
Steps:
Code:
Acquire image -> extract Saturation plane -> binary threshold -> detect geometry (Rectangle, allow scaling, occlusion, and rotation)
What is the best way to detect the target?
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
  #2   Spotlight this post!  
Unread 07-01-2012, 21:51
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,748
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: Detecting the vision target

The LV installation contains a new example for rectangular image processing. Additionally, there should soon be a white paper posted to the NI site that will explain a few approaches.

The most obvious approach is to use the rectangle fit function, but it is quite picky, expecting angles to be quite close to 90 degrees and lines to be quite straight. Distortion due to lens and position easily cause the rectangle definition to fail its requirements.

The example in LV is particle based, and scores the particles for rectangularity, aspect ratio, and edge strength. If they score above the limits, the position and distance are calculated.

If the paper doesn't make it up soon, I'll be happy to answer other questions.

Greg McKaskle
  #3   Spotlight this post!  
Unread 07-01-2012, 22:10
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Detecting the vision target

Quote:
Originally Posted by Greg McKaskle View Post
The LV installation contains a new example for rectangular image processing. Additionally, there should soon be a white paper posted to the NI site that will explain a few approaches.

The most obvious approach is to use the rectangle fit function, but it is quite picky, expecting angles to be quite close to 90 degrees and lines to be quite straight. Distortion due to lens and position easily cause the rectangle definition to fail its requirements.

The example in LV is particle based, and scores the particles for rectangularity, aspect ratio, and edge strength. If they score above the limits, the position and distance are calculated.
Is this example in the other languages? (C++, Java)
I don't have the software installed and updated yet.

Quote:
If the paper doesn't make it up soon, I'll be happy to answer other questions.

Greg McKaskle
Thank you very much.

EDIT:
Does the example depend on the lighting source being a certain color?
and does the distance calculation account for which target is seen (I would assume that it doesn't)?
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!

Last edited by biojae : 08-01-2012 at 00:43.
  #4   Spotlight this post!  
Unread 08-01-2012, 00:07
Ginto8's Avatar
Ginto8 Ginto8 is offline
Programming Lead
AKA: Joe Doyle
FRC #2729 (Storm)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Marlton, NJ
Posts: 174
Ginto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of light
Re: Detecting the vision target

If your software guys are up for some heavy image processing, they can use the resources linked by davidthefat in this thread. They describe the Hough algorithm, which constructs a polygon from a series of points in an image. If you use an algorithm that can construct a polygon instead of looking for an ellipse or rectangle, you don't have to worry as much about perspective distortion affecting detection, because even if you're at an angle that makes the vision target look like a parallelogram instead of a rectangle, the algorithm will be able to tell that it's there.
  #5   Spotlight this post!  
Unread 08-01-2012, 03:13
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Detecting the vision target

Quote:
Originally Posted by biojae View Post
Is this example in the other languages? (C++, Java)
I don't have the software installed and updated yet.
The new vision example has not yet been ported to java or c++.

Joe
  #6   Spotlight this post!  
Unread 08-01-2012, 09:57
owiegand owiegand is offline
Registered User
FRC #2614
 
Join Date: Mar 2011
Rookie Year: 2009
Location: Morgantown
Posts: 5
owiegand is an unknown quantity at this point
Where is the code example in LV located? Having a hard time finding it.
  #7   Spotlight this post!  
Unread 08-01-2012, 10:16
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,748
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: Detecting the vision target

It is located in Program Files\National Instruments\LabVIEW 2011\examples\FRC\vision and is called Rectangular Target Processing or something very similar. You can also find it using the Getting Started window's Support tab and the Find FRC Examples button. And that is just a shortcut to the Help>>Find Examples and then scrolling to FRC Robotics. Finally, I believe the Tutorials tab includes one on integrating vision and it is based on the Rectangular Target code.

Greg McKaksle
  #8   Spotlight this post!  
Unread 08-01-2012, 11:38
owiegand owiegand is offline
Registered User
FRC #2614
 
Join Date: Mar 2011
Rookie Year: 2009
Location: Morgantown
Posts: 5
owiegand is an unknown quantity at this point
Thanks for the information
  #9   Spotlight this post!  
Unread 08-01-2012, 13:10
fb39ca4 fb39ca4 is offline
Registered User
FRC #1899
 
Join Date: Jan 2012
Location: Bellevue, WA
Posts: 195
fb39ca4 is a name known to allfb39ca4 is a name known to allfb39ca4 is a name known to allfb39ca4 is a name known to allfb39ca4 is a name known to allfb39ca4 is a name known to all
Re: Detecting the vision target

I would try to find bounding boxes first, and then further analyze the target.
Closed Thread


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 09:20.

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