mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-22 01:11:40 +00:00
bug fixed dual target intersection
This commit is contained in:
@@ -93,9 +93,10 @@ public class GroupContoursPipe implements Pipe<List<MatOfPoint>, List<StandardCV
|
||||
|
||||
if (contourBuffer.cols() != 0 && contourBuffer.rows() != 0) {
|
||||
RotatedRect rect = Imgproc.minAreaRect(contourBuffer);
|
||||
Rect boundingRect = Imgproc.boundingRect(contourBuffer);
|
||||
var target = new StandardCVPipeline.TrackedTarget();
|
||||
target.minAreaRect = rect;
|
||||
|
||||
target.boundingRect = boundingRect;
|
||||
// find left and right bouding rectangles
|
||||
target.leftRightDualTargetPair =
|
||||
Pair.of(Imgproc.boundingRect(firstContour),
|
||||
|
||||
Reference in New Issue
Block a user