public class SelfCalibrationRefineDualQuadratic extends SelfCalibrationBase
Non-linear optimization on camera parameters for each view and for the plane at infinity. The plane at infinity is used to compute a predicted camera parameter from projectives and that is then compared against the estimated camera parameter for each view. The error which is minimized is an algebraic error and this should be followed up with geometric error from bundle adjustment. See [1] for a complete description of the mathematics.
w*i = Ki *KTi
w*i = PiQ*∞PTi
A[i] = PiQ*∞PTi
residual[i] = w*i/||w*i|| - A[i]/||A[i]||
Different restrictions on camera parameters can be turned on and off. Zero principle-point, zero-skew, and fixed aspect ratio. If fixed aspect ratio is true then the aspect ratio of the input parameters is used and kept constant.
SelfCalibrationBase.Projective| Constructor and Description |
|---|
SelfCalibrationRefineDualQuadratic() |
| Modifier and Type | Method and Description |
|---|---|
int |
encodeK(org.ejml.data.DMatrix3x3 K,
int which,
int offset,
double[] params)
Encode the calibration as a 3x3 matrix.
|
boolean |
isFixedAspectRatio() |
boolean |
isZeroPrinciplePoint() |
boolean |
isZeroSkew() |
boolean |
refine(java.util.List<boofcv.struct.calib.CameraPinhole> calibration,
org.ejml.data.DMatrix4x4 Q)
Refine calibration matrix K given the dual absolute quadratic Q.
|
void |
setFixedAspectRatio(boolean fixedAspectRatio) |
void |
setZeroPrinciplePoint(boolean zeroPrinciplePoint) |
void |
setZeroSkew(boolean zeroSkew) |
addProjective, addProjectives, computeW, encodeQ, getMinimumProjectivespublic boolean refine(java.util.List<boofcv.struct.calib.CameraPinhole> calibration,
org.ejml.data.DMatrix4x4 Q)
calibration - (Input) Initial estimates of K. (Output) Refined estimate.Q - (Input) Initial estimate of absolute quadratic (Output) refined estimate.public int encodeK(org.ejml.data.DMatrix3x3 K,
int which,
int offset,
double[] params)
public boolean isZeroPrinciplePoint()
public void setZeroPrinciplePoint(boolean zeroPrinciplePoint)
public boolean isZeroSkew()
public void setZeroSkew(boolean zeroSkew)
public boolean isFixedAspectRatio()
public void setFixedAspectRatio(boolean fixedAspectRatio)