Class CameraPinhole

java.lang.Object
boofcv.struct.calib.CameraModel
boofcv.struct.calib.CameraPinhole
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CameraKannalaBrandt, 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 Details

    • 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 Details

    • CameraPinhole

      public CameraPinhole()
    • CameraPinhole

      public CameraPinhole​(CameraPinhole param)
      Copy constructor
    • CameraPinhole

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

    • reset

      public void reset()
      Sets all variables to zero.
    • fsetK

      public CameraPinhole fsetK​(double fx, double fy, double skew, double cx, double cy)
    • fsetK

      public CameraPinhole fsetK​(DMatrixRMaj K)
    • fsetK

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

      public CameraPinhole fsetShape​(int width, int height)
    • setTo

      public void setTo​(CameraPinhole param)
    • 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()
      Description copied from class: CameraModel
      Prints a summary of this model to stdout
      Overrides:
      print in class CameraModel
    • 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 String toString()
      Overrides:
      toString in class Object
    • isEquals

      public boolean isEquals​(CameraPinhole param, double tol)