Package org.jvision.camera.distortion
Interface LensDistortionBrown
- All Superinterfaces:
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)
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
-
Field Summary
Fields inherited from interface org.jvision.camera.distortion.LensDistortion
TYPE_NO_DISTORTION, TYPE_PRISM, TYPE_RADIAL, TYPE_RADIAL_RATIONAL, TYPE_RADIAL_SIMPLE, TYPE_TANGENTIAL, TYPE_TILT -
Method Summary
Modifier and TypeMethodDescriptiondoublegetK1()Get the first radial distortion coefficient.doublegetK2()Get the second radial distortion coefficient.doublegetK3()Get the third radial distortion coefficient.doublegetK4()Get the fourth radial distortion coefficient.doublegetP1()Get the first tangential distortion coefficient.doublegetP2()Get the second tangential distortion coefficient.doublegetP3()Get the third tangential distortion coefficient.doublegetP4()Get the fourth tangential distortion coefficient.intGet the maximum number of iterations to process when computing undistortion of a point (default is5).voidsetDistortionCoefficients(double k1, double k2, double k3, double k4, double p1, double p2, double p3, double p4)Set the distortion coefficients.voidsetUndistortIterationMax(int max)Set the maximum number of iterations to process when computing undistortion of a point (default is5).Methods inherited from interface org.jvision.camera.distortion.LensDistortion
distort, distort, getDistortionCoefficients, getDistortionCoefficients, getDistortionCoefficientsDouble, getDistortionCoefficientsDouble, getDistortionCoefficientsFloat, getDistortionCoefficientsFloat, getDistortionComponents, getDistortionConvention, setDistortionCoefficients, setDistortionCoefficients, setDistortionCoefficients, undistort, undistort
-
Method Details
-
getK1
double getK1()Get the first radial distortion coefficient. -
getK2
double getK2()Get the second radial distortion coefficient. -
getK3
double getK3()Get the third radial distortion coefficient. -
getK4
double getK4()Get the fourth radial distortion coefficient. -
getP1
double getP1()Get the first tangential distortion coefficient. -
getP2
double getP2()Get the second tangential distortion coefficient. -
getP3
double getP3()Get the third tangential distortion coefficient. -
getP4
double getP4()Get the fourth tangential distortion coefficient. -
getUndistortIterationMax
int getUndistortIterationMax()Get the maximum number of iterations to process when computing undistortion of a point (default is5).- 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 is5).- 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 coefficientk2- the second radial distortion coefficientk3- the third radial distortion coefficientk4- the fourth radial distortion coefficientp1- the first tangential distortion coefficientp2- the second tangential distortion coefficientp3- the third tangential distortion coefficientp4- the fourth tangential distortion coefficient
-