Vision basics
Learn what a camera pipeline measures before writing robot decisions
A camera does not see “a game piece” the way a person does. It gives the program an image made of pixels. Vision turns those pixels into measurements—such as “these pixels look blue,” “this shape is centered at x = 210,” or “I can read tag ID 4.” Your must decide what those measurements mean and what the should do next.

This controlled example uses a product photo; a robot camera sees a different background, distance, and lighting.
Pipeline stages
The picture above shows the stages of a basic color pipeline:
- Capture a frame. The camera supplies a color image. Its width and height are measured in pixels.
- Choose an area to search. A region of interest (ROI) limits detection to the part of the image where the object could appear.
- Mark pixels that match. A color range converts the image into a mask: white means “matches this range,” black means “does not.”
- Group connected matching pixels. Each group becomes a candidate blob. A processor can report the blob's area, shape, and center point.
- Make a robot decision. Your program checks whether the result is plausible, then selects an action or a fallback.
A blob is a candidate, not proof that the robot found the intended game object. A colored light, field decoration, or reflection can look like a match too. Preview the output and test several distances and lighting conditions before trusting it.
RGB and HSV
RGB stores the red, green, and blue amount for each pixel. It is easy to understand, but a shadow can change all three values even when the object is the same color.
HSV stores hue (the color family), saturation (how vivid it is), and value (brightness). This can make thresholding easier, but it does not make detection independent of lighting. In OpenCV's common 8-bit HSV representation, hue runs from 0 to 179; other libraries or formats may use a different range. Check the image format and processor you are actually using.
A threshold is a range of numbers, not a universal definition of “blue” or “red.” Calibrate it with the real camera, object, distance, and field lighting. 's built-in color swatches are convenient starting points, but the FTC color guide notes that some swatches were tuned for older game pieces.
Image and field coordinates
In a camera image, (0, 0) is usually the top-left pixel. X increases to the right and Y increases downward. If a blob center is at x = 80 in a 320-pixel-wide image, it is left of center. This does not directly tell you how many inches away the object is.
To estimate field position or distance, the robot needs additional geometry and calibration—for example, camera calibration, known object size, a known field tag layout, or another . AprilTag pose results are estimates and depend on correct tag size and camera calibration. A pixel coordinate alone is not a field pose.
Vision tools
| If you need to know… | Start with… | What it returns |
|---|---|---|
| What color is in a camera image region? | FTC SDK PredominantColorProcessor | A color estimate from the selected image region. This is camera vision, not a REV color sensor. |
| Where a group of a chosen color appears in the frame? | FTC Color Locator processor | Blob measurements such as area and a fitted box/center. |
| Which known fiducial marker is visible, or its estimated pose? | FTC AprilTag processor | Detection identity and pose fields, subject to SDK version and calibration. |
| A custom shape, feature, or rule? | EasyOpenCV pipeline | Your own OpenCV processing steps and measurements. |
VisionPortal is the FTC SDK camera-and-processor workflow. EasyOpenCV is a separate library used for custom pipelines. Start with the FTC sample OpModes when using a built-in processor; they are maintained with the SDK and match its current API.
Camera exercise
Before making the robot move, run a sample or preview OpMode and answer these questions:
- Does the camera show a live image, and is it rotated the way you expect?
- What changes when you move the target from the left side of the frame to the right?
- What does the processor report when the target leaves the image?
- Does a similar-colored background create a false detection?
- Does it still work from the distance and under the lights where the robot will run?
Keep vision in or display results with telemetry while learning. For your first test, make the robot report a location; do not let it drive toward an unverified detection.
Next steps
- VisionPortal — connect FTC processors to a camera.
- Color blob locator — find and inspect matching color regions.
- AprilTag detection — understand tag results and pose limits.
- EasyOpenCV basics — build a custom image pipeline.