Class FrameStaticProperties

java.lang.Object
org.photonvision.vision.frame.FrameStaticProperties

public class FrameStaticProperties extends Object
Represents the properties of a frame.
  • Field Details

    • imageWidth

      public final int imageWidth
    • imageHeight

      public final int imageHeight
    • fov

      public final double fov
    • imageArea

      public final double imageArea
    • centerX

      public final double centerX
    • centerY

      public final double centerY
    • centerPoint

      public final org.opencv.core.Point centerPoint
    • horizontalFocalLength

      public final double horizontalFocalLength
    • verticalFocalLength

      public final double verticalFocalLength
    • cameraCalibration

      public CameraCalibrationCoefficients cameraCalibration
  • Constructor Details

    • FrameStaticProperties

      public FrameStaticProperties(VideoMode mode, double fov, CameraCalibrationCoefficients cal)
      Instantiates a new Frame static properties.
      Parameters:
      mode - The Video Mode of the camera.
      fov - The FOV (Field Of Vision) of the image in degrees.
    • FrameStaticProperties

      public FrameStaticProperties(int imageWidth, int imageHeight, double fov, CameraCalibrationCoefficients cal)
      Instantiates a new Frame static properties.
      Parameters:
      imageWidth - The width of the image in pixels.
      imageHeight - The width of the image in pixels.
      fov - The FOV (Field Of Vision) of the image in degrees.
  • Method Details

    • rotate

      public FrameStaticProperties rotate(ImageRotationMode rotation)
    • calculateHorizontalVerticalFoV

      public static DoubleCouple calculateHorizontalVerticalFoV(double diagonalFoV, int imageWidth, int imageHeight)
      Calculates the horizontal and vertical FOV components from a given diagonal FOV and image size.
      Parameters:
      diagonalFoV - Diagonal FOV in degrees
      imageWidth - Image width in pixels
      imageHeight - Image height in pixels
      Returns:
      Horizontal and vertical FOV in degrees