Package org.photonvision.vision.frame
Class FrameStaticProperties
java.lang.Object
org.photonvision.vision.frame.FrameStaticProperties
Represents the properties of a frame.
-
Field Summary
Modifier and TypeFieldDescriptionfinal org.opencv.core.Point
final double
final double
final double
final double
final double
final int
final int
final double
-
Constructor Summary
ConstructorDescriptionFrameStaticProperties
(int imageWidth, int imageHeight, double fov, CameraCalibrationCoefficients cal) Instantiates a new Frame static properties.FrameStaticProperties
(VideoMode mode, double fov, CameraCalibrationCoefficients cal) Instantiates a new Frame static properties. -
Method Summary
Modifier and TypeMethodDescriptionstatic DoubleCouple
calculateHorizontalVerticalFoV
(double diagonalFoV, int imageWidth, int imageHeight) Calculates the horizontal and vertical FOV components from a given diagonal FOV and image size.rotate
(ImageRotationMode rotation)
-
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
-
-
Constructor Details
-
FrameStaticProperties
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
-
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 degreesimageWidth
- Image width in pixelsimageHeight
- Image height in pixels- Returns:
- Horizontal and vertical FOV in degrees
-