WestlakeLEARN
FTC · Java

FIRST Tech Challenge

FTC · Java

  • VisionPortal Camera Setup
  • OpenCV Color and Region Processors
  • AprilTags and Field Pose
  • Vision Fallbacks and Confidence

VisionPortal Camera Setup

Open camera streams and processors reliably.

Module 11: Vision and AprilTagsVision

In this lesson, you will:

  1. 01Create a VisionPortal.
  2. 02Report camera state.
  3. 03Stream for debugging.

Concept narrative

VisionPortal manages camera opening, streaming, and processors. It is the foundation beneath OpenCV and AprilTag decisions.

Robot mental model

The robot cannot make trustworthy visual decisions until the team can see what the camera sees and confirm the processor is running.

Implementation walkthrough

Open the webcam by configured name, attach one processor, print portal state, and verify preview. Add additional processors only after the stream is stable.

VisionPortalSetup.javaJava

VisionPortal portal = new VisionPortal.Builder()
    .setCamera(hardwareMap.get(WebcamName.class, "Webcam 1"))
    .addProcessor(processor)
    .build();

Common mistakes and debugging

Camera bugs include wrong names, USB issues, exposure, and processor lifecycle. Start with portal state before debugging thresholds.

Practice

Create a camera test OpMode that streams and reports camera state.

Checkpoint

  • Camera opens.
  • Portal state is visible.
  • Preview matches expected field view.
  • The test record includes the setup, prediction, and observed result.
  • A teammate can repeat the check from the saved evidence without guessing.

Reflection check

Check your understanding before moving on.

Which result best demonstrates completion of “VisionPortal Camera Setup”?

Why record the test setup, prediction, and observed result?

0 of 2 answered

References

FTC VisionPortal DocsOfficial FTC camera and processor lifecycle documentation.GM0 Computer VisionFTC-oriented vision concepts, pipelines, and practical advice.FTC AprilTag DocsOfficial AprilTag detection and metadata reference.

Finished reading?

Mark this lesson complete — “OpenCV Color and Region Processors” is up next.

Tune and Validate a Profiled ArmOpenCV Color and Region Processors