Interface LensDistortionBrown

All Superinterfaces:
LensDistortion

public interface LensDistortionBrown extends LensDistortion
An interface that describes the lens distortion within the Brown model. A complete description of the model can be found in Decentering distortion of lenses

The distortion is used to compute distorted / undistorted points for a given camera. Let (x, y) be the projection of a 3D point onto an image. A new point (x', y') that integrate distortion (a distorted point) can be obtained a follows:

r = sqrt(x2 + y2)
x' = x(1 + K1r2 + K2r4 + K3r6 + K4r8) + (P2(r2+2x2) + 2P1xy)(1 + P3r2 + P4r4)
y' = y(1 + K1r2 + K2r4 + K3r6 + K4r8) + (P1(r2+2y2) + 2P2xy)(1 + P3r2 + P4r4)
Since:
1.0.0
Version:
"1.0.0" b202104211400L
Author:
Julien Seinturier - JOrigin - contact@jorigin.org - https://github.com/jorigin/jvision
  • Method Details

    • getK1

      double getK1()
      Get the first radial distortion coefficient.
      Returns:
      the first radial distortion coefficient.
      See Also:
      getK2(), getK3(), getK4()
    • getK2

      double getK2()
      Get the second radial distortion coefficient.
      Returns:
      the second radial distortion coefficient.
      See Also:
      getK1(), getK3(), getK4()
    • getK3

      double getK3()
      Get the third radial distortion coefficient.
      Returns:
      the third radial distortion coefficient.
      See Also:
      getK1(), getK2(), getK4()
    • getK4

      double getK4()
      Get the fourth radial distortion coefficient.
      Returns:
      the fourth radial distortion coefficient.
      See Also:
      getK1(), getK2(), getK3()
    • getP1

      double getP1()
      Get the first tangential distortion coefficient.
      Returns:
      the first tangential distortion coefficient.
      See Also:
      getP2(), getP3(), getP4()
    • getP2

      double getP2()
      Get the second tangential distortion coefficient.
      Returns:
      the second tangential distortion coefficient.
      See Also:
      getP1(), getP3(), getP4()
    • getP3

      double getP3()
      Get the third tangential distortion coefficient.
      Returns:
      the third tangential distortion coefficient.
      See Also:
      getP1(), getP2(), getP4()
    • getP4

      double getP4()
      Get the fourth tangential distortion coefficient.
      Returns:
      the fourth tangential distortion coefficient.
      See Also:
      getP1(), getP2(), getP3()
    • getUndistortIterationMax

      int getUndistortIterationMax()
      Get the maximum number of iterations to process when computing undistortion of a point (default is 5).
      Returns:
      the maximum number of iterations to process when computing undistortion of a point.
      See Also:
      setUndistortIterationMax(int)
    • setUndistortIterationMax

      void setUndistortIterationMax(int max)
      Set the maximum number of iterations to process when computing undistortion of a point (default is 5).
      Parameters:
      max - the maximum number of iterations to process when computing undistortion of a point.
      See Also:
      getUndistortIterationMax()
    • setDistortionCoefficients

      void setDistortionCoefficients(double k1, double k2, double k3, double k4, double p1, double p2, double p3, double p4)
      Set the distortion coefficients.
      Parameters:
      k1 - the first radial distortion coefficient
      k2 - the second radial distortion coefficient
      k3 - the third radial distortion coefficient
      k4 - the fourth radial distortion coefficient
      p1 - the first tangential distortion coefficient
      p2 - the second tangential distortion coefficient
      p3 - the third tangential distortion coefficient
      p4 - the fourth tangential distortion coefficient