public class CalibrateMonoPlanar
extends java.lang.Object
Performs the full processing loop for calibrating a mono camera from a planar grid. A directory is specified that the images are read in from. Calibration points are detected inside the image and feed into the Zhang99 algorithm for parameter estimation.
Internally it supports status updates for a GUI and skips over bad images. Invoke functions in the following order:
configure(boofcv.alg.geo.calibration.PlanarCalibrationTarget, boolean, int)reset()addImage(boofcv.struct.image.ImageFloat32)process()getIntrinsic()Most 3D operations in BoofCV assume that the image coordinate system is right handed and the +Z axis is pointing out of the camera. In standard image coordinate the origin (0,0) is at the top left corner with +x going to the right and +y going down, then if it is right handed +z will be out of the image. However some times this pseudo standard is not followed and the y-axis needs to be inverted by setting isInverted to true.
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
assumeZeroSkew |
protected PlanarCalibrationDetector |
detector |
protected java.util.List<ImageResults> |
errors |
protected boolean |
flipY |
protected boofcv.struct.calib.IntrinsicParameters |
foundIntrinsic |
protected Zhang99Parameters |
foundZhang |
protected java.util.List<java.util.List<georegression.struct.point.Point2D_F64>> |
observations |
protected java.util.List<java.util.List<georegression.struct.point.Point2D_F64>> |
observationsAdj |
protected PlanarCalibrationTarget |
target |
boolean |
verbose |
protected CalibrationPlanarGridZhang99 |
zhang99 |
| Constructor and Description |
|---|
CalibrateMonoPlanar(PlanarCalibrationDetector detector,
boolean flipY)
High level configuration
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addImage(boofcv.struct.image.ImageFloat32 image)
Adds a new view of the calibration target and processes it.
|
static java.util.List<ImageResults> |
computeErrors(java.util.List<java.util.List<georegression.struct.point.Point2D_F64>> observation,
Zhang99Parameters param,
java.util.List<georegression.struct.point.Point2D_F64> grid)
After the parameters have been estimated this computes the error for each calibration point in
each image and summary error statistics.
|
void |
configure(PlanarCalibrationTarget target,
boolean assumeZeroSkew,
int numRadialParam)
Specify calibration assumptions.
|
java.util.List<ImageResults> |
getErrors() |
boofcv.struct.calib.IntrinsicParameters |
getIntrinsic() |
java.util.List<java.util.List<georegression.struct.point.Point2D_F64>> |
getObservations() |
PlanarCalibrationTarget |
getTarget() |
Zhang99Parameters |
getZhangParam() |
boolean |
isFlipY() |
static void |
printErrors(java.util.List<ImageResults> results)
Prints out error information to standard out
|
void |
printStatistics() |
boofcv.struct.calib.IntrinsicParameters |
process()
After calibration points have been found this invokes the Zhang99 algorithm to
estimate calibration parameters.
|
void |
removeLatestImage()
Removes the most recently added image
|
void |
reset()
Resets internal data structures.
|
protected PlanarCalibrationDetector detector
protected boolean flipY
protected CalibrationPlanarGridZhang99 zhang99
protected PlanarCalibrationTarget target
protected boolean assumeZeroSkew
protected Zhang99Parameters foundZhang
protected boofcv.struct.calib.IntrinsicParameters foundIntrinsic
protected java.util.List<java.util.List<georegression.struct.point.Point2D_F64>> observations
protected java.util.List<java.util.List<georegression.struct.point.Point2D_F64>> observationsAdj
protected java.util.List<ImageResults> errors
public boolean verbose
public CalibrateMonoPlanar(PlanarCalibrationDetector detector, boolean flipY)
detector - Target detection algorithm.flipY - If true the y-axis will be inverted to ensure the assumed coordinate system is being used.
Normally this should be false.public void configure(PlanarCalibrationTarget target, boolean assumeZeroSkew, int numRadialParam)
target - Description of the calibration target's physical layout.assumeZeroSkew - If true then zero skew is assumed. Typically this will be true.numRadialParam - Number of radial parameters. Typically set to 2.public void reset()
public boolean addImage(boofcv.struct.image.ImageFloat32 image)
image - Image of a calibration targetpublic void removeLatestImage()
public boofcv.struct.calib.IntrinsicParameters process()
public void printStatistics()
public static java.util.List<ImageResults> computeErrors(java.util.List<java.util.List<georegression.struct.point.Point2D_F64>> observation, Zhang99Parameters param, java.util.List<georegression.struct.point.Point2D_F64> grid)
observation - Observed control point locationparam - Found calibration parameterspublic static void printErrors(java.util.List<ImageResults> results)
public java.util.List<java.util.List<georegression.struct.point.Point2D_F64>> getObservations()
public java.util.List<ImageResults> getErrors()
public Zhang99Parameters getZhangParam()
public boofcv.struct.calib.IntrinsicParameters getIntrinsic()
public PlanarCalibrationTarget getTarget()
public boolean isFlipY()