Package trclib.vision
Class TrcVisionTargetInfo<O extends TrcVisionTargetInfo.ObjectInfo>
java.lang.Object
trclib.vision.TrcVisionTargetInfo<O>
This class calculates and stores the info for a vision detected target.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
This interface implements a method to get the rectangle of the detected object. -
Field Summary
FieldsModifier and TypeFieldDescriptiondouble
org.opencv.core.Rect
-
Constructor Summary
ConstructorsConstructorDescriptionTrcVisionTargetInfo
(O detectedObj) Constructor: Create an instance of the object.TrcVisionTargetInfo
(O detectedObj, TrcHomographyMapper homographyMapper, double objGroundOffset, double cameraHeight) Constructor: Create an instance of the object. -
Method Summary
-
Field Details
-
detectedObj
-
objRect
public org.opencv.core.Rect objRect -
objArea
public double objArea -
objPixelWidth
-
objPixelHeight
-
objRotatedAngle
-
objPose
-
objWidth
-
objDepth
-
-
Constructor Details
-
TrcVisionTargetInfo
public TrcVisionTargetInfo(O detectedObj, TrcHomographyMapper homographyMapper, double objGroundOffset, double cameraHeight) Constructor: Create an instance of the object.- Parameters:
detectedObj
- specifies the detected object.homographyMapper
- specifies the homography mapper, can be null if not provided in which case distanceFromCamera, targetWidth and horizontalAngle will not be determined.objGroundOffset
- specifies the object ground offset above the floor, used by homography. Can be zero if homographyMapper is null.cameraHeight
- specifies the height of the camera above the floor, used by homography. Can be zero if homographyMapper is null.
-
TrcVisionTargetInfo
Constructor: Create an instance of the object.- Parameters:
detectedObj
- specifies the detected object.
-
-
Method Details