Package org.photonvision.vision.frame
Class FrameStaticProperties
java.lang.Object
org.photonvision.vision.frame.FrameStaticProperties
Represents the properties of a frame.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal org.opencv.core.Point
final double
final double
final double
final double
final double
final int
final int
final double
-
Constructor Summary
ConstructorsConstructorDescriptionFrameStaticProperties
(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
-
imageHeight
-
fov
-
imageArea
-
centerX
-
centerY
-
centerPoint
-
horizontalFocalLength
-
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
-