EasyStack Docs

RectDetectorPipeline

Esta página ainda não foi traduzida. Mostrando a versão em inglês.

RectDetectorPipeline is an interface for your own vision processors that find rectangles in the camera image. It extends the FTC VisionProcessor, so it works with any VisionPortal. It lives in the package dev.easyfamily.EasyStack.controllable.

#Methods

  • getDetections(): the list of rectangles found in the last frame. You must implement it.
  • suspendDetection(): stops looking for rectangles. It does nothing by default.
  • resumeDetection(): starts looking again. It does nothing by default.

#RectBlob

Each detection is a RectBlob. All sizes are normalized, so they are values between 0 and 1 that do not depend on the camera resolution.

  • id: the number of the detection.
  • label: the name, or Rectangle when none is given.
  • cxNorm, cyNorm: the center of the rectangle, from 0 on the left and top to 1 on the right and bottom.
  • wNorm, hNorm: the width and height.
  • confidence: how sure the pipeline is.
  • area(): width times height, never negative.
Java
for (RectDetectorPipeline.RectBlob blob : pipeline.getDetections()) {
    if (blob.confidence > 0.7 && blob.area() > 0.02) {
        double turn = (blob.cxNorm - 0.5) * 0.8;
        drive.driveRobotCentric(0, 0, turn);
    }
}

Última atualização 2026-11-16

EasyStack - FTC Java library

This site records page views of visitors to understand how the documentation is used. Nothing is sold or shared with third parties.