Using the AI Vision Sensor with VEX EXP

The AI Vision Sensor is a sensor compatible with VEXcode EXP. This advanced sensor features a wide field of view and high resolution, allowing it to capture visual information from its surroundings. For more information about the AI Vision Sensor's capabilities, read the article below.

With the AI Vision Sensor, you can detect Color Signatures, Color Codes, AprilTags, and AI Classifications.

An AI Vision utility interface where a blue cube is being tracked. The left side displays the cube with coordinates X:174, Y:109, and dimensions W:88, H:100. On the right side, the color settings are labeled as Blue, with a hue range set to 10 and saturation range set to 0.20. There is a Set Color button and a color swatch showing the selected shade of blue. Below that is an option to add the color and a disabled button labeled Add Color Code.

Color Signatures are specified colors that the AI Vision Sensor will detect. For more information on how to train your AI Vision Sensor to detect specific colors, refer to Configuring Color Signatures with the AI Vision Sensor in VEXcode EXP.

An AI Vision utility interface tracking two cubes, one blue and one green, labeled as

Color Codes are sequences of Color Signatures. They allow the AI Vision Sensor to identify and distinguish specific patterns. For more information on how to create Color Codes, refer to Configuring Color Codes with the AI Vision Sensor in VEXcode EXP.

The image shows three AprilTags being tracked by a vision system. The left tag is labeled ID:0, with coordinates X:110, Y:96, W:41, H:41, and an angle of A:350°. The middle tag is labeled ID:3, with coordinates X:187, Y:180, W:57, H:57, and an angle of A:1°. The right tag is labeled ID:9, with coordinates X:237, Y:89, W:38, H:38, and an angle of A:3°. Each tag is outlined, indicating its tracking by the system.

AprilTags are visual markers with specific patterns that the AI Vision Sensor can detect and identify. For more information on AprilTags and how to enable their detection, refer to AprilTags with the AI Vision Sensor in VEXcode EXP.

The image shows four objects being tracked by a vision system: two balls and two rings. The red ball is labeled with coordinates X:122, Y:84, dimensions W:67, H:66, and a score of 99%. The blue ball has coordinates X:228, Y:86, dimensions W:70, H:68, and a score of 99%. The green ring is labeled with coordinates X:109, Y:186, dimensions W:98, H:92, and a score of 99%. The red ring has coordinates X:259, Y:187, dimensions W:89, H:91, and a score of 99%. Each object is outlined with a white box.

AI Classifications are specific objects that the AI Vision Sensor has been trained to be able to detect. These include VEX objects in classrooms as well as competition fields. For more information on what AI Classifications can be detected by the AI Vision Sensor and how to enable their detection, refer to AI Classifications with the AI Vision Sensor in VEXcode EXP.

How Does the AI Vision Sensor Work?

The AI Vision Sensor works by taking in light and turning it into electrical signals. These signals are processed internally and then turned into output signals that can be used by the V5 or EXP Brain.

This sensor can be trained to identify colors from various sources, including solid-colored three-dimensional (3D) objects and printed two-dimensional (2D) images. Additionally, it has the capability to learn and recognize combinations of colors.

An AI vision sensor pointed toward a white sheet with a red hexagonal shape. A dashed red line connects the sensor to the hexagon, indicating that the sensor is detecting or tracking the shape.

The image shows an AI vision sensor aimed at a red cube. A dashed red line connects the sensor to the cube, indicating that the sensor is detecting or tracking the cube.

For optimal performance, it's essential to maintain consistent lighting conditions when using the AI Vision Sensor throughout your project.

Common Uses of the AI Vision Sensor

The AI Vision Brain can be coded to do many things such as:

  • Spot colors from a distance to recognize them, helpful for identifying objects or materials.
  • Approach objects without needing to use multiple sensors, such as the Distance Sensor, Optical Sensor, and Vision Sensor for better navigation.
  • Align with objects autonomously for precise positioning, which is useful for tasks like robotic arm movements.

Getting Started with the AI Vision Sensor

To begin coding the AI Vision Sensor, make sure your Sensor is mounted to your robot and connected to either Web-based or App-based VEXcode EXP.

Once connected, learn about what the AI Vision Sensor can do in Blocks, Python, or C++.

For more information on the individual Blocks or text-commands for the AI Vision Sensor, check out api.vex.com.

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

Last Updated: