Using the Vision Utility with the Vision Sensor

The Vision Sensor allows your robot to detect and respond to colors in its environment. Using a built-in camera and onboard processing, the Vision Sensor can identify and track Color Signatures, which are specific colors that you configure for your project.

Once Color Signatures are configured, the sensor can report information such as the location, size, and count of matching objects within its field of view.

Important: The Vision Sensor can only be configured if you have an internet connection.

Connect to the Vision Utility

VEXcode V5 Devices menu after the Add a device button has been selected. The Vision option is highlighted.

To begin configuring your Vision Sensor, first, add it as a device in the Devices Window.

The Vision Sensor Settings panel in VEXcode V5 with the sensor labeled as Vision1. A large Vision Sensor icon is displayed, and beneath it, a blue button labeled Open Utility is highlighted.

Select Open Utility to begin configuring Color Signatures.

Vision Utility menu is open with the Camera icon in the top left highlighted.

Select the camera icon in the top-left corner of the window to connect your Vision Sensor.

A close-up of the back of a VEX Vision Sensor showing its ports. The micro USB port is on the left and it is highlighted.

Connect the Vision Sensor to your computer using its micro-USB port.

A browser prompt from vision.vexcode.cloud asking to connect to a device. The device named Vision Sensor is highlighted. Buttons labeled Connect and Cancel are shown at the bottom of the prompt.

Using your device's dialog, select the Vision Sensor. A Windows interface is shown here for reference.

Note: The Vision Sensor cannot be configured with the Vision Utility while it is connected to the V5 Brain.

The live preview feed from the Vision Sensor Utility showing a red cube centered in a white calibration space. The interface displays a Brightness slider set to 50 at the top and configuration controls for SIG_1 through SIG_7 on the right side.

Once connected, the Vision Sensor will display a picture taken when it was connected and the camera icon in the top left will turn green.

Configuring a Color Signature

Vision Utility with the green Camera icon in the top left corner highlighted.

To update the image shown in the Vision Utility, select the green camera icon.

Low brightness

Vision Utility showing a red cube with brightness set to 10. The scene is very dim and it is hard to tell what color the cube is.

High brightness

Vision Utility showing a red cube with brightness set to 150. The scene is much brigher and the cube is clearly red.

To change the brightness of the pictures taken by the Vision Sensor, use the Brightness slider at the top of the Vision Utility.

Position your mouse cursor over the solid-colored object, then select and drag across the desired color to configure it as shown in this video.

Note: Make sure to stay within the confines of the color you want to select. Otherwise, you may accidentally grab colors from the background that can throw off the Vision Sensor’s detection.

The Vision Sensor Utility with the SIG_1 Set button highlighted, indicating that it is used for signature training.

The Set button will turn green. Select it to save the color.

The Vision Sensor preview showing a red cube being tracked. A white bounding box and crosshair overlay surround the object, labeled RED_BOX. The coordinates CX 147, CY 142, width 94, and height 96 are displayed in white text above the object. On the right, the RED_BOX signature is listed and selected among other SIG entries.

When a Color Signature is set, a bounding box will appear around any colors matching that signature. For more information about an object's properties and how to code with them, go to the V5 API Reference Site.

You can also rename the Color Signature by clicking the name (by default the first name is SIG_1). Selecting outside of the text field will save the name.

Select the arrows icon next to a Color Signature to adjust its tolerance, as shown in this video.

Increasing the tolerance allows a wider range of similar shades to be recognized as the same Color Signature, which is useful in situations with inconsistent lighting—such as shadows or glare. Lowering the tolerance makes the sensor more selective, recognizing only colors very close to the original signature.

Configuring a Color Code

The Vision Sensor preview shows two tracked objects labeled RED_BOX and BLUE_BOX, each with a bounding box and crosshair overlay. The red box is on the left with coordinates CX 73, CY 137, width 90, and height 90. The blue box is on the right with coordinates CX 191, CY 140, width 94, and height 92. On the right side, the signature list includes RED_BOX and BLUE_BOX. The Codes tab at the bottom is highlighted.

A color code is a combination of color signatures that form a horizontal pattern. Once you have the color signatures configured, select the Codes tab to begin configuring color codes.

The Codes tab is now active. The same red and blue cubes are detected on the left, with RED_BOX and BLUE_BOX labels. On the right panel, the top row shows a grouped code with both names: RED_BOX, BLUE_BOX.

In the right text box, enter the names of the color signatures to include in the color code, in order and separated by commas.

For example, to create a pattern of Red followed by Blue, enter RED_BOX,BLUE_BOX. To create a pattern of Blue followed by Red, enter BLUE_BOX,RED_BOX.

The Vision Sensor preview again shows the red and blue cubes side by side. A custom label, BOX_CODE, is shown in the code list, grouping RED_BOX and BLUE_BOX under one entry. The grouped entry appears on the same row as the cube names.

Rename the Color Signature by clicking inside the left text field.

The Vision Sensor preview shows a single large white bounding box combining both the red and blue cubes. The text at the top reads CX 128, CY 134, width 220, height 108, Sig 12 Ang=-1, indicating the combined object signature. The Codes panel on the right shows BOX_CODE as the identifier, with RED_BOX and BLUE_BOX listed as component elements.

Once a name is saved for the new color code, it will show on the screen.

Color Codes have a unique property that can be used with their objects called Angle. For more information about this property, visit the  V5 API Reference Site.

Save the Vision Sensor's Configuration

The Vision Sensor utility interface shows a live preview with two objects detected and labeled as RED_BOX and BLUE_BOX. Their bounding boxes are displayed with crosshairs, and coordinate data is shown for each. Below the preview, a JSON configuration snippet for RED_BOX is visible, including brightness, signature name, and color parameters. A blue button labeled Copy Config is highlighted at the bottom of the menu.

Once all color signatures and color codes have been set, select Copy Config and return to VEXcode.

The Vision Sensor Settings screen with a blue button that is highlighted and labeled Paste Config.

Inside VEXcode, select Paste Config.

The same Vision Sensor Settings screen, now with the configuration JSON pasted into the text field. The JSON includes brightness and RED_BOX signature parameters. The Done button at the bottom right is highlighted, indicating the configuration is ready to be applied.

Then select Done to save the Vision Sensor configuration and begin using it to code in VEXcode V5.

For more information, help, and tips, check out the many resources at VEX Professional Development Plus

Last Updated: