remove contor from tracked target

This commit is contained in:
Matt
2020-01-02 11:27:34 -08:00
parent a1c54db1be
commit 14e3babd2a
3 changed files with 0 additions and 11 deletions

View File

@@ -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();

View File

@@ -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;
}
}

View File

@@ -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),