Package org.photonvision.vision.target
Class TrackedTarget
java.lang.Object
org.photonvision.vision.target.TrackedTarget
- All Implemented Interfaces:
Releasable
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTrackedTarget
(AprilTagDetection tagDetection, AprilTagPoseEstimate tagPose, TrackedTarget.TargetCalculationParameters params) TrackedTarget
(List<org.opencv.core.Point> corners) TrackedTarget
(ArucoDetectionResult result, AprilTagPoseEstimate tagPose, TrackedTarget.TargetCalculationParameters params) TrackedTarget
(PotentialTarget origTarget, TrackedTarget.TargetCalculationParameters params, CVShape shape) -
Method Summary
Modifier and TypeMethodDescriptionvoid
org.opencv.core.MatOfPoint2f
double
getArea()
org.opencv.core.Mat
org.opencv.core.Mat
int
double
int
org.opencv.core.RotatedRect
double
getPitch()
double
org.opencv.core.Point
getShape()
double
getSkew()
List<org.opencv.core.Point>
org.opencv.core.Point
double
getYaw()
boolean
boolean
void
release()
void
void
setApproximateBoundingPolygon
(org.opencv.core.MatOfPoint2f boundingPolygon) Set the approximate bounding polygon.void
void
setCameraRelativeRvec
(org.opencv.core.Mat cameraRelativeRvec) void
setCameraRelativeTvec
(org.opencv.core.Mat cameraRelativeTvec) void
setFiducialId
(int id) void
setPoseAmbiguity
(double ambiguity) void
void
setTargetCorners
(List<org.opencv.core.Point> targetCorners) static List<PhotonTrackedTarget>
simpleFromTrackedTargets
(List<TrackedTarget> targets)
-
Field Details
-
m_mainContour
-
m_subContours
-
-
Constructor Details
-
TrackedTarget
public TrackedTarget(PotentialTarget origTarget, TrackedTarget.TargetCalculationParameters params, CVShape shape) -
TrackedTarget
public TrackedTarget(AprilTagDetection tagDetection, AprilTagPoseEstimate tagPose, TrackedTarget.TargetCalculationParameters params) -
TrackedTarget
-
TrackedTarget
public TrackedTarget(ArucoDetectionResult result, AprilTagPoseEstimate tagPose, TrackedTarget.TargetCalculationParameters params)
-
-
Method Details
-
getConfidence
public double getConfidence()- Returns:
- Returns the confidence of the detection ranging from 0 - 1.
-
getClassID
public int getClassID()- Returns:
- O-indexed class index for the detected object.
-
setFiducialId
public void setFiducialId(int id) -
getFiducialId
public int getFiducialId() -
setPoseAmbiguity
public void setPoseAmbiguity(double ambiguity) -
getPoseAmbiguity
public double getPoseAmbiguity() -
setApproximateBoundingPolygon
public void setApproximateBoundingPolygon(org.opencv.core.MatOfPoint2f boundingPolygon) Set the approximate bounding polygon.- Parameters:
boundingPolygon
- List of points to copy. Not modified.
-
getTargetOffsetPoint
public org.opencv.core.Point getTargetOffsetPoint() -
getRobotOffsetPoint
public org.opencv.core.Point getRobotOffsetPoint() -
getPitch
public double getPitch() -
getYaw
public double getYaw() -
getSkew
public double getSkew() -
getArea
public double getArea() -
getMinAreaRect
public org.opencv.core.RotatedRect getMinAreaRect() -
getApproximateBoundingPolygon
public org.opencv.core.MatOfPoint2f getApproximateBoundingPolygon() -
calculateValues
-
release
public void release()- Specified by:
release
in interfaceReleasable
-
setTargetCorners
-
getTargetCorners
-
hasSubContours
public boolean hasSubContours() -
getBestCameraToTarget3d
-
getAltCameraToTarget3d
-
setBestCameraToTarget3d
-
setAltCameraToTarget3d
-
getCameraRelativeTvec
public org.opencv.core.Mat getCameraRelativeTvec() -
setCameraRelativeTvec
public void setCameraRelativeTvec(org.opencv.core.Mat cameraRelativeTvec) -
getCameraRelativeRvec
public org.opencv.core.Mat getCameraRelativeRvec() -
setCameraRelativeRvec
public void setCameraRelativeRvec(org.opencv.core.Mat cameraRelativeRvec) -
getShape
-
setShape
-
toHashMap
-
isFiducial
public boolean isFiducial() -
simpleFromTrackedTargets
-