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-doodle-house.png

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

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.

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, AprilTags, and AI Classifications. Some of this data is shown in the AI Vision Utility and can help when planning and creating a VEXcode project. 

A Blue Barrel being tracked by a vision system. A white outline surrounds the object, with a centered white cross inside the outline. The top-left label indicates the object's as a Blue Barrel, along with center coordinates CX:174, CY:95, and dimensions W:50, H:57.

Width and Height

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

The width and height measurements help identify different objects. For example, a barrel will have a larger height than a sport ball.

A Blue Barrel being tracked by a vision system. A white outline surrounds the object, with a centered white cross inside the outline. The top-left label indicates the object's as a Blue Barrel, along with center coordinates CX:163, CY:95, and dimensions W:50, H:57.

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.

Angle

Angle is a property only available for Color Codes and AprilTags. This represents if the detected Color Code or AprilTag is orientated differently.

A Blue Barrel being tracked by a vision system. A white outline surrounds the object, with a centered white cross inside the outline. The top-left label indicates the object's as a Blue Barrel, along with center coordinates CX:176, CY:95, and dimensions W:50, H:57. A small red square highlights the object's top-left corner.

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.

A Blue Barrel being tracked by a vision system. A white outline surrounds the object, with a centered white cross inside the outline. The top-left label indicates the object's as a Blue Barrel, along with center coordinates CX:178, CY:95, and dimensions W:50, H:57. One purple AprilTags being tracked by a vision system. The AprilTag is labeled ID:3, showing coordinates A:350°, X:206, Y:47, W:29, H:29. Each card has a white outline, and the system is tracking their positions and orientations.

TagID

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

AprilTags will display the actual ID number.

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

alt

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 these four objects' AI Classifications. You can use this score to ensure your robot only focuses on highly confident detections.

For more information on how to code your VEX AIM Coding Robot with these data, visit VEXcode API Reference - AIM.

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

Last Updated: