Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Detecting the vision target (http://www.chiefdelphi.com/forums/showthread.php?t=99423)

biojae 07-01-2012 21:45

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?

Greg McKaskle 07-01-2012 21:51

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

biojae 07-01-2012 22:10

Re: Detecting the vision target
 
Quote:

Originally Posted by Greg McKaskle (Post 1098724)
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)?

Ginto8 08-01-2012 00:07

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.

jhersh 08-01-2012 03:13

Re: Detecting the vision target
 
Quote:

Originally Posted by biojae (Post 1098758)
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

owiegand 08-01-2012 09:57

Where is the code example in LV located? Having a hard time finding it.

Greg McKaskle 08-01-2012 10:16

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

owiegand 08-01-2012 11:38

Thanks for the information

fb39ca4 08-01-2012 13:10

Re: Detecting the vision target
 
I would try to find bounding boxes first, and then further analyze the target.


All times are GMT -5. The time now is 23:35.

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