Skip to content
CrocoDocs
Starter GuideProgrammingEngineeringDesignPortfolio
Documentation

Introduction

IntroductionBIOBUZZ game overview

Getting started

Getting startedBlocksOnBot JavaAndroid StudioYour first OpModeJava basicsMotors and servosNonblocking codeDebugging robot code

Control systems

Control systemsJoystick mappingField-centric mecanum drivePID controlFeedforwardFlywheel velocity controlSystem identificationMotion profilingKalman filterLow-pass filter

Autonomous

AutonomousTimed and encoder movementOdometryLocalization troubleshootingMotion planningReliable autonomous sequencesPure PursuitSensor fusionAuto to TeleOp handoff

Season topics

Season topicsProjectile mathematicsTurret aimingShooting on the move

Code practices

Code practicesNaming conventionsCode organizationLoop timing and bulk readsFormattingComments and documentationTeam collaboration

Libraries

LibrariesNextFTCFTCLibSolversLibPedro PathingRoad RunnerFTC DashboardMercurial v2Mercurial v1PanelsSloth

Community software

Community softwareBlaze FTCOpenLoopHive Vision

Sensors and vision

Vision overviewVision basicsLimelight 3A
Starter Guide
Engineering
Design
Portfolio
Appearance

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.

OpenCV stages on an official BIOBUZZ Pollen photo: source image, yellow HSV mask, cleaned candidate, and measured blob.

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:

  1. Capture a frame. The camera supplies a color image. Its width and height are measured in pixels.
  2. Choose an area to search. A region of interest (ROI) limits detection to the part of the image where the object could appear.
  3. Mark pixels that match. A color range converts the image into a mask: white means “matches this range,” black means “does not.”
  4. Group connected matching pixels. Each group becomes a candidate blob. A processor can report the blob's area, shape, and center point.
  5. 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 PredominantColorProcessorA 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 processorBlob measurements such as area and a fitted box/center.
Which known fiducial marker is visible, or its estimated pose?FTC AprilTag processorDetection identity and pose fields, subject to SDK version and calibration.
A custom shape, feature, or rule?EasyOpenCV pipelineYour 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:

  1. Does the camera show a live image, and is it rotated the way you expect?
  2. What changes when you move the target from the left side of the frame to the right?
  3. What does the processor report when the target leaves the image?
  4. Does a similar-colored background create a false detection?
  5. 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.

Sources

  • FTC color processing overview
  • FTC Color Blob Concepts
  • FTC VisionPortal overview
  • FTC AprilTag pose and calibration
  • AndyMark: BIOBUZZ scoring elements — source photo

Vision overview

Choose and use camera-based vision tools in FTC

Limelight 3A

Read a configured pipeline, reject stale results, and separate target aiming from field localization

On this page

Pipeline stagesRGB and HSVImage and field coordinatesVision toolsCamera exerciseNext stepsSources