Class CameraPinholeBrown

All Implemented Interfaces:
Serializable

public class CameraPinholeBrown extends CameraPinhole implements Serializable

Adds radial and tangential distortion to the intrinsic parameters of a pinhole camera.

Radial and Tangential Distortion:
xd = xn + xn[k1 r2 + ... + kn r2n] + dx
dxu = [ 2t1 u v + t2(r2 + 2u2)]
dxv = [ t1(r2 + 2v2) + 2 t2 u v]

r2 = u2 + v2
where xd is the distorted coordinates, xn=(u,v) is undistorted normalized image coordinates. Pixel coordinates are found x = K*[u;v]

See Also:
  • Field Details

    • radial

      @Nullable public @org.jetbrains.annotations.Nullable double[] radial
      radial distortion parameters
    • t1

      public double t1
      tangential distortion parameters
    • t2

      public double t2
      tangential distortion parameters
  • Constructor Details

    • CameraPinholeBrown

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

      public CameraPinholeBrown(int numRadial)
    • CameraPinholeBrown

      public CameraPinholeBrown(CameraPinholeBrown param)
    • CameraPinholeBrown

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

    • reset

      public void reset()
      Description copied from class: CameraPinhole
      Sets all variables to zero.
      Overrides:
      reset in class CameraPinhole
    • fsetK

      public CameraPinholeBrown fsetK(double fx, double fy, double skew, double cx, double cy, int width, int height)
      Overrides:
      fsetK in class CameraPinhole
    • fsetRadial

      public CameraPinholeBrown fsetRadial(@Nullable @org.jetbrains.annotations.Nullable double... radial)
    • fsetTangential

      public CameraPinholeBrown fsetTangential(double t1, double t2)
    • setTo

      public CameraPinholeBrown setTo(CameraPinholeBrown param)
    • setTo

      public CameraPinhole setTo(CameraPinhole param)
      Overrides:
      setTo in class CameraPinhole
    • isDistorted

      public boolean isDistorted()
      If true then distortion parameters are specified.
    • isDistorted

      public boolean isDistorted(double tol)
    • getRadial

      @Nullable public @org.jetbrains.annotations.Nullable double[] getRadial()
    • setRadial

      public void setRadial(double... radial)
    • print

      public void print()
      Description copied from class: CameraModel
      Prints a summary of this model to stdout
      Overrides:
      print in class CameraPinhole
    • toString

      public String toString()
      Overrides:
      toString in class CameraPinhole
    • toStringArray

      public static String toStringArray(FancyPrint fp, String name, @Nullable @org.jetbrains.annotations.Nullable double[] param)
    • 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
      Overrides:
      createLike in class CameraPinhole