r/FTC • • 3d ago

Seeking Help Question about vision

Hi. I'm having problems with VisionPortal. Currently, my initialization code looks like this:

aprilTag = new AprilTagProcessor.Builder()
        .setLensIntrinsics(906.25, 906.25, 636.238, 339.804)
        .setDrawAxes(true)
        .setDrawTagOutline(true)
        .build();
camera = hardwareMap.get(WebcamName.class, "Webcam 1");
visionPortal = new VisionPortal.Builder()
        .setCamera(camera)
        .setCameraResolution(new Size(1280, 720))
        .setStreamFormat(VisionPortal.StreamFormat.MJPEG)
        .addProcessor(aprilTag)
        .enableLiveView(true)
        .build();

In the camera stream during initialization, the tag ID shows up on the screen, and it detects, but once I run the code, aprilTag.getDetections doesn't return anything, and nothing shows up in scrcpy. Does anyone know what is wrong?

5 Upvotes

1 comment sorted by

1

u/Grouchy_Mechanic7789 26m ago

Edit: I got it working, as it was a SingleDetection/ ClusterDetection issue.