Class RadialDistortionEstimateLinear
- java.lang.Object
-
- boofcv.alg.geo.calibration.RadialDistortionEstimateLinear
-
public class RadialDistortionEstimateLinear extends java.lang.ObjectEstimates radial lens distortion by solving a linear equation with observed features on a calibration grid. Typically used as an initial estimate for use in non-linear optimization. An arbitrary number of distortion parameters can be solved for, but typically only two are found. The estimated is computed using a known intrinsic camera matrix,and homographies relating grid to camera coordinates. Based upon the description found in Section 3.3 in [1].
Radial distortion is modeled using the following equations:
u' = u + (u - u0)*[ k1(x2 + y2) +k2(x2 + y2)2]
v' = v + (v - v0)*[ k1(x2 + y2) +k2(x2 + y2)2]
where (u',v') is the observed distortion in pixel coordinates, (u0,v0) is the image center in pixel coordinates, (x,y) is the predicted distortion free calibrated coordinates.The algorithm works by solving the system of equations below:
[ (u-u0)*r2 , (u-u0)*r4 ][k1] = [u'-u]
[ (v-v0)*r2 , (v-v0)*r4 ][k2] = [v'-v]
where r2 = (x2+y2).[1] Zhengyou Zhang, "Flexible Camera Calibration By Viewing a Plane From Unknown Orientations," 1999
-
-
Constructor Summary
Constructors Constructor and Description RadialDistortionEstimateLinear(java.util.List<Point2D_F64> layout, int numParam)Creates a estimator for the specified number of distortion parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description double[]getParameters()Returns radial distortion parameters.voidprocess(org.ejml.data.DenseMatrix64F cameraCalibration, java.util.List<org.ejml.data.DenseMatrix64F> homographies, java.util.List<CalibrationObservation> observations)Computes radial distortion using a linear method.
-
-
-
Constructor Detail
-
RadialDistortionEstimateLinear
public RadialDistortionEstimateLinear(java.util.List<Point2D_F64> layout, int numParam)
Creates a estimator for the specified number of distortion parameters.- Parameters:
layout- Description of calibration gridnumParam- Number of radial distortion parameters. Two is a good number.
-
-
Method Detail
-
process
public void process(org.ejml.data.DenseMatrix64F cameraCalibration, java.util.List<org.ejml.data.DenseMatrix64F> homographies, java.util.List<CalibrationObservation> observations)Computes radial distortion using a linear method.- Parameters:
cameraCalibration- Camera calibration matrix. Not modified.observations- Observations of calibration grid. Not modified.
-
getParameters
public double[] getParameters()
Returns radial distortion parameters.- Returns:
- radial distortion parameters.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG