Understanding the Data in the AI Vision Utility

The AI Vision Utility is what allows you to connect and configure your AI Vision Sensor. To read about how to do so, you can read these articles here:

Understanding how the AI Vision Sensor detects and measures objects can help you better use these measurements in your coding projects. With this knowledge, you can improve your coding skills and create more precise solutions for tasks like object recognition and spatial analysis.

Understanding Pixels and Resolution

Grid with a doodled house overtop.

Imagine you're drawing a picture on a piece of grid paper. Each tiny square on the paper is like a pixel. When you color in these squares, you're making your picture.

Low Resolution High Resolution
Heavily pixelated version of a cartoon VEX 123 robot. Highly detailed version of a cartoon VEX 123 robot.

Now, let's talk about resolution. Resolution is the number of pixels in an image. If you have lots of tiny squares (pixels) in your grid paper, your picture will look sharp and detailed. But if you only have a few pixels, your picture might look blurry and not very clear.

Rectangle to indicate the resolution of the AI Vision Sensor. The upper left corner has the coordinates 0 comma 0. The upper right corner has the coordinates 320 comma 0. The lower left corner has the coordinates 0 comma 240. And the center has coordinates reading 160 comma 120.

The AI Vision Sensor has a resolution of 320 pixels horizontally by 240 pixels vertically. This means that the precise center of detection aligns with coordinates 160 on the X-axis and 120 on the Y-axis.

How Does the AI Vision Sensor Measure Objects

The AI Vision Sensor collects data on configured colors, AprilTag IDs, and AI Classifications. Some of this data is shown in the AI Vision Utility and can help when planning and creating a VEXcode project. 

Close up of a Blue Cube being detected by the AI Vision in the Utility. A highlight calls out a portion of the text above the Blue Cube that reads W colon 80 H colon 92. This shows that the width of the cube is 80 pixels and the height is 92 pixels.

Width and Height

This is the width or height of the detected object in pixels.

The width and height measurements can help identify different objects. For example, Cubes would have a similar width and height, but Rings would have a larger width than height. 

Close up of a Blue Cube being detected by the AI Vision in the Utility. A highlight calls out a portion of the text above the Blue Cube that reads C X colon 169 C Y colon 139. This indicates that the center coordinate of the cube is 169, 139.

CenterX and CenterY

This is the center coordinates of the detected object in pixels.

CenterX and CenterY coordinates help with navigation and positioning. The AI Vision Sensor has a resolution of 320 x 240 pixels.

A rotating image showing how as a color code is rotated, the angle value moves from 0 to 90 to 180 to 360 degrees.

Angle

Angle is a property only available for Color Codes and AprilTag IDs. This represents the orientation of the detected Color Code or AprilTag ID.

Close up of a Blue Cube being detected by the AI Vision in the Utility. A highlight calls out the upper left corner of the box around the Blue Cube, indicating the origin point.

OriginX and OriginY

OriginX and OriginY is the coordinate at the top-left corner of the detected object in pixels.

OriginX and OriginY coordinates help with navigation and positioning. By combining this coordinate with the object's Width and Height, you can determine the size of the object's bounding box. This can help with tracking moving objects or navigating between objects.

Close up of a Blue Cube being detected by the AI Vision in the Utility. A highlight calls out a portion of the text above the object that reads Blue Cube

Close up of a Blue Cube being detected by the AI Vision in the Utility. A highlight calls out a portion of the text above the Blue Cube that reads I D colon 5. This indicates the AprilTag ID is number 5.

TagID

The tagID is only available for AI Classification and AprilTags. AI Classification will display its proper name.

AprilTag IDs will display the actual ID number.

Identifying specific AprilTag IDs allows for selective navigation. You can code your robot to move towards certain AprilTag IDs while ignoring others, effectively using them as signposts for automated navigation.

Close up of a Blue Cube being detected by the AI Vision in the Utility. A highlight calls out text above the object that reads score colon 99 percent.

Score

The score property is used when detecting AI Classifications with the AI Vision Sensor.

The confidence score indicates how certain the AI Vision Sensor is about its detection. In this image, it's 99% confident in identifying this object as a Blue Cube. You can use this score to ensure your robot only focuses on highly confident detections.

For more information on how to code your VEX IQ robot with this data, visit VEXcode API Reference - IQ (2nd gen).

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

Last Updated: