mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Add ignored cameras regex to command-line arguemnts (#849)
This adds a regex that ignores cameras if they match it, for if you have another piece of software running that needs a second camera, or if you have a webcam in your laptop that cscore hates.
This commit is contained in:
@@ -99,6 +99,7 @@ public final class OpenCVHelp {
|
||||
}
|
||||
return new MatOfPoint3f(points);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a new 3d translation from this {@link Mat}. The opencv tvec is a vector with three
|
||||
* elements representing {x, y, z} in the EDN coordinate system.
|
||||
@@ -128,6 +129,7 @@ public final class OpenCVHelp {
|
||||
rotation = rotationNWUtoEDN(rotation);
|
||||
return new MatOfPoint3f(new Point3(rotation.getQuaternion().toRotationVector().getData()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a 3d rotation from this {@link Mat}. The opencv rvec Mat is a vector with three
|
||||
* elements representing the axis scaled by the angle in the EDN coordinate system. (angle = norm,
|
||||
@@ -228,6 +230,7 @@ public final class OpenCVHelp {
|
||||
new Rotation3d(), CoordinateSystem.NWU(), CoordinateSystem.EDN())
|
||||
.plus(CoordinateSystem.convert(rot, CoordinateSystem.EDN(), CoordinateSystem.NWU()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a rotation from EDN to NWU. For example, if you have a rotation X,Y,Z {1, 0, 0} in EDN,
|
||||
* this would be XYZ {0, -1, 0} in NWU.
|
||||
@@ -324,6 +327,7 @@ public final class OpenCVHelp {
|
||||
corn.release();
|
||||
return rect;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the rotated rectangle with minimum area which bounds this contour.
|
||||
*
|
||||
@@ -338,6 +342,7 @@ public final class OpenCVHelp {
|
||||
corn.release();
|
||||
return rect;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the area in pixels of this target's contour. It's important to note that this may be
|
||||
* different from the area of the bounding rectangle around the contour.
|
||||
@@ -451,6 +456,7 @@ public final class OpenCVHelp {
|
||||
if (alt != null) return new PNPResults(best, alt, errors[0] / errors[1], errors[0], errors[1]);
|
||||
else return new PNPResults(best, errors[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the transformation that maps the camera's pose to the target pose. The camera's pose
|
||||
* relative to the target is determined by the supplied 3d points of the target's model and their
|
||||
|
||||
Reference in New Issue
Block a user