Class CameraPinhole

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    CameraPinholeBrown, CameraUniversalOmni

    public class CameraPinhole
    extends CameraModel

    Intrinsic camera parameters for a pinhole camera. Specifies the calibration matrix K and distortion parameters.

         [ fx skew  cx ]
     K = [  0   fy  cy ]
         [  0    0   1 ]
     
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      double cx
      image center (units: pixels)
      double cy
      image center (units: pixels)
      double fx
      focal length along x and y axis (units: pixels)
      double fy
      focal length along x and y axis (units: pixels)
      double skew
      skew parameter, typically 0 (units: pixels)
    • Field Detail

      • fx

        public double fx
        focal length along x and y axis (units: pixels)
      • fy

        public double fy
        focal length along x and y axis (units: pixels)
      • skew

        public double skew
        skew parameter, typically 0 (units: pixels)
      • cx

        public double cx
        image center (units: pixels)
      • cy

        public double cy
        image center (units: pixels)
    • Constructor Detail

      • CameraPinhole

        public CameraPinhole()
        Default constructor. flipY is false and everything else is zero or null.
      • CameraPinhole

        public CameraPinhole​(double fx,
                             double fy,
                             double skew,
                             double cx,
                             double cy,
                             int width,
                             int height)
    • Method Detail

      • fsetK

        public CameraPinhole fsetK​(double fx,
                                   double fy,
                                   double skew,
                                   double cx,
                                   double cy,
                                   int width,
                                   int height)
      • isInside

        public boolean isInside​(double x,
                                double y)
        Is the pixel coordinate inside the image. For floating points numbers a pixel is inside the image if it is less than width or height. Justification for this is if you converted it to an int it would round down and be inside.
        Parameters:
        x - pixel location x-axis
        y - pixel location y-axis
        Returns:
        true if inside or false if not
      • isInside

        public boolean isInside​(int x,
                                int y)
        Returns true if the pixel coordinate is inside the image
        Parameters:
        x - pixel location x-axis
        y - pixel location y-axis
        Returns:
        true if inside or false if not
      • print

        public void print()
      • createLike

        public <T extends CameraModel> T createLike()
        Description copied from class: CameraModel
        Creates a new camera model with zero values of the same type os this one
        Specified by:
        createLike in class CameraModel
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isEquals

        public boolean isEquals​(CameraPinhole param,
                                double tol)