VisionPortal Camera Setup
Open camera streams and processors reliably.
Open camera streams and processors reliably.
In this lesson, you will:
VisionPortal manages camera opening, streaming, and processors. It is the foundation beneath OpenCV and AprilTag decisions.
The robot cannot make trustworthy visual decisions until the team can see what the camera sees and confirm the processor is running.
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();Camera bugs include wrong names, USB issues, exposure, and processor lifecycle. Start with portal state before debugging thresholds.
Create a camera test OpMode that streams and reports camera state.
Check your understanding before moving on.
0 of 2 answered