Rectangle Recognition


How are you guys recognizing the retroreflective rectangle with the LabVIEW example?

For our team, the code keeps looping between recognizing the rectangle for less than a second and then deciding it’s not a rectangle before recognizing it again. We only achieve these results by shining a bright LED flashlight from near the camera lens toward the rectangle.

Will a ring of LEDs work, or is there anything else you guys are using that might work?


A ring of LED lights around the camera works great! If you use a particular color, such as red LEDs, then you can filter your image for red objects.

A light ring is a great way to do it, though consider when you choose your color what colors are likely to be in the environment :wink:

If you are just using the stock example, take a look at the NI Vision Assistant, it’s a handy tool for tuning the vision detection algorithm for your situation. You’ll want to play around and find what works best for your lighting situation.

Theres alot of great information in the NI Vision white paper for how to setup the vision assistant as well, and be sure to tune the settings on your camera (like the brightness) to get the best results.

Don’t use red!

The lights are red and blue, depending on the alliance…

But the red and blue alliance lights are relatively small. They are not 18" x 24" hollow rectangles. So, it shouldn’t be difficult to use red or blue even in the presence of an alliance light, with your ring-light reflecting off of the diamond plate, and with a team with red and blue T-Shirts at the driving stations.

Greg McKaskle

But why not just use a color that is not one of the alliance colors, say green LED lights…

Thinking about what is on the field and will show up in the image is a very good idea. If you can guarantee a unique color, it will allow for simpler processing. If you cannot guarantee it, and it breaks the simple targeting, and the options are to modify the color, or up the processing to use additional features.

Greg Mckaskle

well, the site my team was planning on getting our ring led’s from is sold out of 60mm diameter green ring LED’s

We use LED rings (Angel Eyes) from . They are perfect for this job.