public class RadialDistortionEstimateLinear
extends java.lang.Object
Estimates 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 and Description |
|---|
RadialDistortionEstimateLinear(java.util.List<georegression.struct.point.Point2D_F64> layout,
int numParam)
Creates a estimator for the specified number of distortion parameters.
|
| Modifier and Type | Method and Description |
|---|---|
double[] |
getParameters()
Returns radial distortion parameters.
|
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.
|
public RadialDistortionEstimateLinear(java.util.List<georegression.struct.point.Point2D_F64> layout,
int numParam)
layout - Description of calibration gridnumParam - Number of radial distortion parameters. Two is a good number.public void process(org.ejml.data.DenseMatrix64F cameraCalibration,
java.util.List<org.ejml.data.DenseMatrix64F> homographies,
java.util.List<CalibrationObservation> observations)
cameraCalibration - Camera calibration matrix. Not modified.observations - Observations of calibration grid. Not modified.public double[] getParameters()