From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

FIRST Robotics Competition LabVIEW Examples

cancel
Showing results for 
Search instead for 
Did you mean: 

2020 LabVIEW for FRC Vision Examples

The vision example can be used to compare approaches, algorithms, and cameras. The project allows for quick experimentation or calibration of vision code even before you have access to a roboRIO. It can also be used as a basis for dashboard based vision processing. If you are looking for the roboRIO example, look in the roboRIO target section in the project window.

 

This example project comes with a collection of sample images. You can also change to the camera tab and enter in your camera's address. The USB camera will typically be "USB 0" or "USB 1" depending on whether the computer has a built-in webcam. Axis cameras can be accessed at their fixed IP address, or using "axis-camera.local" -- provided that is their host name. Older Axis cameras often use their axis-serial number as the default host name. The host name can be modified using the Axis web-based camera configuration utility.

 

The FRC Color Processing Example.vi assumes the bright retro-reflection from a ring light and scores particles in the image using analytical measurements based on the geometry of the taped shape. By default it is set up to perform a color threshold for a colored LED ring light. If the robot uses a white ring light, it is possible to modify the processing to be intensity based for either a color or a grayscale image. The default scoring uses propertions, and shape to identify the best target. You may want to review the analytical calculations, adjust the way these scores are combined, or adjust the threshold. Annotations within the image help explain the scores of various particles.

 

The distance calculation is based on particle measurements and calibration info for the camera lens.

 

The desktop VIs support interactive calibration. If you click and draw a line segment over the target in the image, the sampled pixels will be used to set the H, S, and V values based on the average and standard deviation of each element.

 

The Tutorials tab of the LabVIEW Getting Started Window contains step-by-step information for integration with robot and dashboard code.

Michael B.
Product Support Engineer
National Instruments
Contributors