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.Zhang99IntrinsicParam)reset()addImage(boofcv.alg.geo.calibration.CalibrationObservation)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 DetectorFiducialCalibration |
detector |
protected java.util.List<ImageResults> |
errors |
protected boofcv.struct.calib.CameraModel |
foundIntrinsic |
protected Zhang99AllParam |
foundZhang |
protected java.util.List<georegression.struct.point.Point2D_F64> |
layout |
protected java.util.List<CalibrationObservation> |
observations |
boolean |
verbose |
protected CalibrationPlanarGridZhang99 |
zhang99 |
| Constructor and Description |
|---|
CalibrateMonoPlanar(java.util.List<georegression.struct.point.Point2D_F64> layout) |
| Modifier and Type | Method and Description |
|---|---|
void |
addImage(CalibrationObservation observation)
Adds the observations from a calibration target detector
|
static java.util.List<ImageResults> |
computeErrors(java.util.List<CalibrationObservation> observation,
Zhang99AllParam 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(Zhang99IntrinsicParam param)
Specifies the calibration model.
|
void |
configurePinhole(boolean assumeZeroSkew,
int numRadialParam,
boolean includeTangential) |
void |
configureUniversalOmni(boolean assumeZeroSkew,
int numRadialParam,
boolean includeTangential) |
void |
configureUniversalOmni(boolean assumeZeroSkew,
int numRadialParam,
boolean includeTangential,
double mirrorOffset) |
java.util.List<ImageResults> |
getErrors() |
<T extends boofcv.struct.calib.CameraModel> |
getIntrinsic() |
java.util.List<CalibrationObservation> |
getObservations() |
CalibrationPlanarGridZhang99 |
getZhang99() |
Zhang99AllParam |
getZhangParam() |
static void |
printErrors(java.util.List<ImageResults> results)
Prints out error information to standard out
|
void |
printStatistics() |
<T extends boofcv.struct.calib.CameraModel> |
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 DetectorFiducialCalibration detector
protected java.util.List<georegression.struct.point.Point2D_F64> layout
protected CalibrationPlanarGridZhang99 zhang99
protected Zhang99AllParam foundZhang
protected boofcv.struct.calib.CameraModel foundIntrinsic
protected java.util.List<CalibrationObservation> observations
protected java.util.List<ImageResults> errors
public boolean verbose
public CalibrateMonoPlanar(java.util.List<georegression.struct.point.Point2D_F64> layout)
public void configure(Zhang99IntrinsicParam param)
public void configurePinhole(boolean assumeZeroSkew,
int numRadialParam,
boolean includeTangential)
public void configureUniversalOmni(boolean assumeZeroSkew,
int numRadialParam,
boolean includeTangential)
public void configureUniversalOmni(boolean assumeZeroSkew,
int numRadialParam,
boolean includeTangential,
double mirrorOffset)
public void reset()
public void addImage(CalibrationObservation observation)
observation - Detected calibration pointspublic void removeLatestImage()
public <T extends boofcv.struct.calib.CameraModel> T process()
public void printStatistics()
public static java.util.List<ImageResults> computeErrors(java.util.List<CalibrationObservation> observation, Zhang99AllParam 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<CalibrationObservation> getObservations()
public java.util.List<ImageResults> getErrors()
public Zhang99AllParam getZhangParam()
public <T extends boofcv.struct.calib.CameraModel> T getIntrinsic()
public CalibrationPlanarGridZhang99 getZhang99()