Enum Class ImageRotationMode

java.lang.Object
java.lang.Enum<ImageRotationMode>
org.photonvision.vision.opencv.ImageRotationMode
All Implemented Interfaces:
Serializable, Comparable<ImageRotationMode>, Constable

public enum ImageRotationMode extends Enum<ImageRotationMode>
An image rotation about the camera's +Z axis, which points out of the camera towards the world. This is mirrored relative to what you might traditionally think of as image rotation, which is about an axis coming out of the image towards the viewer or camera. TODO: pull this from image-rotation.md
  • Enum Constant Details

  • Field Details

    • value

      public final int value
    • rotation2d

      public final Rotation2d rotation2d
  • Method Details

    • values

      public static ImageRotationMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ImageRotationMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • rotatePoint

      public org.opencv.core.Point rotatePoint(org.opencv.core.Point point, double width, double height)
      Rotate a point in an image
      Parameters:
      point - The point in the unrotated image
      width - Image width, in pixels
      height - Image height, in pixels
      Returns:
      The point in the rotated frame