mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-22 01:11:40 +00:00
remove contor from tracked target
This commit is contained in:
@@ -254,7 +254,6 @@ public class StandardCVPipeline extends CVPipeline<StandardCVPipelineResult, Sta
|
||||
public double yaw = 0.0;
|
||||
public double area = 0.0;
|
||||
public RotatedRect minAreaRect;
|
||||
public MatOfPoint2f contour;
|
||||
|
||||
// 3d stuff
|
||||
public Pose2d cameraRelativePose = new Pose2d();
|
||||
@@ -265,7 +264,6 @@ public class StandardCVPipeline extends CVPipeline<StandardCVPipelineResult, Sta
|
||||
public Pair<RotatedRect, RotatedRect> leftRightRotatedRect = null;
|
||||
|
||||
public void release() {
|
||||
contour.release();
|
||||
rVector.release();
|
||||
tVector.release();
|
||||
imageCornerPoints.release();
|
||||
|
||||
@@ -76,12 +76,6 @@ public class Draw2dContoursPipe implements Pipe<Pair<Mat, List<StandardCVPipelin
|
||||
Imgproc.rectangle(input.getLeft(), new Point(box.x, box.y), new Point((box.x + box.width), (box.y + box.height)), Helpers.colorToScalar(settings.maximumBoxColor), settings.boxOutlineSize);
|
||||
}
|
||||
|
||||
if(settings.showContor) {
|
||||
MatOfPoint matOfPoint = new MatOfPoint();
|
||||
matOfPoint.fromArray(target.contour.toArray());
|
||||
Imgproc.drawContours(input.getLeft(), List.of(matOfPoint), 0, new Scalar(255, 255, 255));
|
||||
}
|
||||
|
||||
// contour.release();
|
||||
}
|
||||
}
|
||||
@@ -104,6 +98,5 @@ public class Draw2dContoursPipe implements Pipe<Pair<Mat, List<StandardCVPipelin
|
||||
public Color centroidColor = Color.GREEN;
|
||||
public Color rotatedBoxColor = Color.BLUE;
|
||||
public Color maximumBoxColor = Color.RED;
|
||||
public boolean showContor = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,6 @@ public class GroupContoursPipe implements Pipe<List<MatOfPoint>, List<StandardCV
|
||||
RotatedRect rect = Imgproc.minAreaRect(contour);
|
||||
var target = new StandardCVPipeline.TrackedTarget();
|
||||
target.minAreaRect = rect;
|
||||
target.contour = contour;
|
||||
groupedContours.add(target);
|
||||
}
|
||||
});
|
||||
@@ -90,7 +89,6 @@ public class GroupContoursPipe implements Pipe<List<MatOfPoint>, List<StandardCV
|
||||
RotatedRect rect = Imgproc.minAreaRect(contour);
|
||||
var target = new StandardCVPipeline.TrackedTarget();
|
||||
target.minAreaRect = rect;
|
||||
target.contour = contour;
|
||||
|
||||
target.leftRightDualTargetPair =
|
||||
Pair.of(Imgproc.boundingRect(firstContour),
|
||||
|
||||
Reference in New Issue
Block a user