Package trclib.vision

Class TrcVisionTargetInfo<O extends TrcVisionTargetInfo.ObjectInfo>

java.lang.Object
trclib.vision.TrcVisionTargetInfo<O>

public class TrcVisionTargetInfo<O extends TrcVisionTargetInfo.ObjectInfo> extends Object
This class calculates and stores the info for a vision detected target.
  • Field Details

    • detectedObj

      public O extends TrcVisionTargetInfo.ObjectInfo detectedObj
    • objRect

      public org.opencv.core.Rect objRect
    • objArea

      public double objArea
    • objPixelWidth

      public Double objPixelWidth
    • objPixelHeight

      public Double objPixelHeight
    • objRotatedAngle

      public Double objRotatedAngle
    • objPose

      public TrcPose2D objPose
    • objWidth

      public Double objWidth
    • objDepth

      public Double 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

      public TrcVisionTargetInfo(O detectedObj)
      Constructor: Create an instance of the object.
      Parameters:
      detectedObj - specifies the detected object.
  • Method Details

    • toString

      public String toString()
      This method returns the string form of the target info.
      Overrides:
      toString in class Object
      Returns:
      string form of the target info.