public class AdvancedCalibration extends LensCalibrationParams
cameraMatrix, distortionCoefficients, enabled
propertyChangeSupport
Constructor and Description |
---|
AdvancedCalibration() |
Modifier and Type | Method and Description |
---|---|
void |
applyCalibrationToMachine(ReferenceHead head,
ReferenceCamera camera)
Apply the calibration results to the machine.
|
void |
commit() |
protected static CvPipeline |
createDefaultPipeline() |
int |
getAlphaPercent() |
double |
getApparentMotionDirection() |
double |
getApproximateCameraF() |
Location |
getCalibratedOffsets() |
Location |
getCameraOffsetAtZ(Length zHeight)
Gets the offset from the physical camera to the intersection of the camera's Z axis and the
horizontal plane at zHeight
|
int |
getDesiredRadialLinesPerTestPattern() |
Length |
getDistanceToCameraAtZ(Length zHeight)
Gets the distance to the camera from the point at the intersection of the camera's principal
axis and the plane at the specified zHeight
|
int |
getFiducialDiameter() |
double |
getHeightFov() |
double |
getMirrored() |
double[][][] |
getModeledImagePointsList() |
java.util.ArrayList<java.lang.Integer> |
getOutlierPointList() |
CvPipeline |
getPipeline() |
Location |
getPrimaryLocation() |
Mat |
getRectificationMatrix() |
double |
getRmsError() |
double |
getRotationErrorX() |
double |
getRotationErrorY() |
double |
getRotationErrorZ() |
double[][][] |
getSavedTestPattern3dPointsList() |
double[][][] |
getSavedTestPatternImagePointsList() |
Location |
getSecondaryLocation() |
double |
getTestPatternFillFraction() |
Length |
getTrialStep() |
Mat |
getUnitVectorPhyCamZInMachRefFrame()
Gets the unit vector in the direction of the physical camera's Z axis with components
expressed in the machine reference frame
|
Mat |
getVectorFromMachToPhyCamInMachRefFrame()
Gets the vector from the machine origin to the physical camera origin with components
expressed in the machine reference frame
|
Mat |
getVectorFromMachToVirCamInMachRefFrame()
Gets the vector from the machine origin to the virtual camera origin with components
expressed in the machine reference frame
|
Mat |
getVectorFromPhyCamToDesiredPrincipalPointInPhyCamRefFrame()
Gets the vector from the physical camera origin to the desired principal point with
components expressed in the physical camera reference frame
|
Mat |
getVirtualCameraMatrix() |
double |
getVirtualHeightFov() |
double |
getVirtualWidthFov() |
double |
getWalkingLoopGain() |
double |
getWidthFov() |
void |
initializeApproximateCameraF() |
void |
initUndistortRectifyMap(Size size,
Mat undistortionMap1,
Mat undistortionMap2)
Initializes the tables used to map the pixels from the distorted/rotated images to the
undistorted images
|
java.lang.Boolean |
isDataAvailable() |
boolean |
isDisableDistortionCorrection() |
boolean |
isDisableTangentialDistortionCorrection() |
boolean |
isDisableTiltCorrection() |
boolean |
isOverridingOldTransformsAndDistortionCorrectionSettings()
Checks if the new advanced calibration settings are overriding the old image
transform and lens distortion settings
|
java.lang.Boolean |
isValid()
Checks if the calibration parameters validity flag is set
|
void |
persist() |
void |
processRawCalibrationData(double[][][] testPattern3dPoints,
double[][][] testPatternImagePoints,
Size size,
double mirrored,
double apparentMotionDirection)
Processes the raw calibration data to set the advanced calibration parameters
|
void |
processRawCalibrationData(Size size) |
void |
setAlphaPercent(int alphaPercent) |
void |
setApparentMotionDirection(double apparentMotionDirection) |
void |
setApproximateCameraF(double approximateCameraF) |
void |
setCalibratedOffsets(Location calibratedOffsets) |
void |
setDataAvailable(java.lang.Boolean dataAvailable) |
void |
setDesiredRadialLinesPerTestPattern(int desiredRadialLinesPerTestPattern) |
void |
setDisableDistortionCorrection(boolean disableDistortionCorrection) |
void |
setDisableTangentialDistortionCorrection(boolean disableTangentialDistortionCorrection) |
void |
setDisableTiltCorrection(boolean disableTiltCorrection) |
void |
setFiducialDiameter(int fiducialDiameter) |
void |
setHeightFov(double heightFov) |
void |
setMirrored(double mirrored) |
void |
setModeledImagePointsList(double[][][] modeledImagePointsList) |
void |
setOutlierPoints(java.util.ArrayList<java.lang.Integer> outlierPointList) |
void |
setOverridingOldTransformsAndDistortionCorrectionSettings(boolean b)
Enables the new advanced calibration settings to override the old image transform and
lens distortion settings
|
void |
setPipeline(CvPipeline pipeline) |
void |
setPrimaryLocation(Location primaryLocation) |
void |
setRectificationMatrix(Mat rectificationMatrix) |
void |
setRmsError(double rmsError) |
void |
setRotationErrorX(double rotationErrorX) |
void |
setRotationErrorY(double rotationErrorY) |
void |
setRotationErrorZ(double rotationErrorZ) |
void |
setSavedTestPattern3dPointsList(double[][][] savedTestPattern3dPointsList) |
void |
setSavedTestPatternImagePointsList(double[][][] savedTestPatternImagePointsList) |
void |
setSecondaryLocation(Location secondaryLocation) |
void |
setTestPatternFillFraction(double testPatternFillFraction) |
void |
setTrialStep(Length trialStep) |
void |
setUnitVectorPhyCamZInMachRefFrame(Mat vect)
Sets the unit vector in the direction of the physical camera's Z axis with components
expressed in the machine reference frame
|
void |
setValid(java.lang.Boolean valid)
Sets the calibration parameters validity flag to the specified state
|
void |
setVectorFromMachToPhyCamInMachRefFrame(Mat vect)
Sets the vector from the machine origin to the physical camera origin with components
expressed in the machine reference frame
|
void |
setVectorFromMachToVirCamInMachRefFrame(Mat vect)
Sets the vector from the machine origin to the virtual camera origin with components
expressed in the machine reference frame
|
void |
setVectorFromPhyCamToDesiredPrincipalPointInPhyCamRefFrame(Mat vect)
Sets the vector from the physical camera origin to the desired principal point with
components expressed in the physical camera reference frame
|
void |
setVirtualCameraMatrix(Mat virtualCameraMatrix) |
void |
setVirtualHeightFov(double virtualHeightFov) |
void |
setVirtualWidthFov(double virtualWidthFov) |
void |
setWalkingLoopGain(double walkingLoopGain) |
void |
setWidthFov(double widthFov) |
void |
updateApproximateCameraF(double upp,
double uppZ) |
getCameraMatrixMat, getDistortionCoefficientsMat, isEnabled, setCameraMatrixMat, setDistortionCoefficientsMat, setEnabled
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener
protected static CvPipeline createDefaultPipeline()
public void commit()
public void persist()
public boolean isOverridingOldTransformsAndDistortionCorrectionSettings()
public void setOverridingOldTransformsAndDistortionCorrectionSettings(boolean b)
b
- - set to true to have the new advanced calibration settings override the old
settingspublic java.lang.Boolean isValid()
public void setValid(java.lang.Boolean valid)
valid
- - the state to set the validity flagpublic java.lang.Boolean isDataAvailable()
public void setDataAvailable(java.lang.Boolean dataAvailable)
dataAvailable
- the dataAvailable to setpublic double[][][] getSavedTestPatternImagePointsList()
public double[][][] getSavedTestPattern3dPointsList()
public void setSavedTestPattern3dPointsList(double[][][] savedTestPattern3dPointsList)
savedTestPattern3dPointsList
- the savedTestPattern3dPointsList to setpublic void setSavedTestPatternImagePointsList(double[][][] savedTestPatternImagePointsList)
savedTestPatternImagePointsList
- the savedTestPatternImagePointsList to setpublic double[][][] getModeledImagePointsList()
public void setModeledImagePointsList(double[][][] modeledImagePointsList)
modeledImagePointsList
- the modeledImagePointsList to setpublic java.util.ArrayList<java.lang.Integer> getOutlierPointList()
public void setOutlierPoints(java.util.ArrayList<java.lang.Integer> outlierPointList)
outlierPointList
- the outlierPointList to setpublic int getAlphaPercent()
public void setAlphaPercent(int alphaPercent)
alphaPercent
- the alphaPercent to setpublic CvPipeline getPipeline()
public void setPipeline(CvPipeline pipeline)
pipeline
- the pipeline to setpublic Mat getVirtualCameraMatrix()
public void setVirtualCameraMatrix(Mat virtualCameraMatrix)
virtualCameraMatrix
- - the virtual camera matrix to setpublic Mat getRectificationMatrix()
public void setRectificationMatrix(Mat rectificationMatrix)
rectificationMatrix
- - the rectification matrix to setpublic Mat getVectorFromMachToPhyCamInMachRefFrame()
public void setVectorFromMachToPhyCamInMachRefFrame(Mat vect)
vect
- - the vector as a 3x1 matrixpublic Mat getUnitVectorPhyCamZInMachRefFrame()
public void setUnitVectorPhyCamZInMachRefFrame(Mat vect)
vect
- - the vector as a 3x1 matrixpublic Mat getVectorFromMachToVirCamInMachRefFrame()
public void setVectorFromMachToVirCamInMachRefFrame(Mat vect)
vect
- - the vector as a 3x1 matrixpublic Mat getVectorFromPhyCamToDesiredPrincipalPointInPhyCamRefFrame()
public void setVectorFromPhyCamToDesiredPrincipalPointInPhyCamRefFrame(Mat vect)
vect
- - the vector as a 3x1 matrixpublic double getRotationErrorZ()
public void setRotationErrorZ(double rotationErrorZ)
rotationErrorZ
- - the rotationErrorZ to setpublic double getRotationErrorY()
public void setRotationErrorY(double rotationErrorY)
rotationErrorY
- - the rotationErrorY to setpublic double getRotationErrorX()
public void setRotationErrorX(double rotationErrorX)
rotationErrorX
- - the rotationErrorX to setpublic double getRmsError()
public void setRmsError(double rmsError)
rmsError
- the rmsError to setpublic int getDesiredRadialLinesPerTestPattern()
public void setDesiredRadialLinesPerTestPattern(int desiredRadialLinesPerTestPattern)
desiredRadialLinesPerTestPattern
- the desiredRadialLinesPerTestPattern to setpublic double getTestPatternFillFraction()
public void setTestPatternFillFraction(double testPatternFillFraction)
testPatternFillFraction
- the testPatternFillFraction to setpublic double getWalkingLoopGain()
public void setWalkingLoopGain(double walkingLoopGain)
walkingLoopGain
- the walkingLoopGain to setpublic double getMirrored()
public void setMirrored(double mirrored)
mirrored
- the mirrored to setpublic double getApparentMotionDirection()
public void setApparentMotionDirection(double apparentMotionDirection)
apparentMotionDirection
- the apparentMotionDirection to setpublic Location getCalibratedOffsets()
public void setCalibratedOffsets(Location calibratedOffsets)
calibratedOffsets
- the calibratedOffsets to setpublic double getWidthFov()
public void setWidthFov(double widthFov)
widthFov
- the widthFov to setpublic double getHeightFov()
public void setHeightFov(double heightFov)
heightFov
- the heightFov to setpublic double getVirtualWidthFov()
public void setVirtualWidthFov(double virtualWidthFov)
virtualWidthFov
- the virtualWidthFov to setpublic double getVirtualHeightFov()
public void setVirtualHeightFov(double virtualHeightFov)
heightFov
- the heightFov to setpublic boolean isDisableTiltCorrection()
public void setDisableTiltCorrection(boolean disableTiltCorrection)
public boolean isDisableDistortionCorrection()
public void setDisableDistortionCorrection(boolean disableDistortionCorrection)
public boolean isDisableTangentialDistortionCorrection()
public void setDisableTangentialDistortionCorrection(boolean disableTangentialDistortionCorrection)
public int getFiducialDiameter()
public void setFiducialDiameter(int fiducialDiameter)
fiducialDiameter
- the fiducialDiameter to setpublic Location getPrimaryLocation()
public void setPrimaryLocation(Location primaryLocation)
primaryLocation
- the primaryLocation to setpublic Location getSecondaryLocation()
public void setSecondaryLocation(Location secondaryLocation)
secondaryLocation
- the secondaryLocation to setpublic Length getTrialStep()
public void setTrialStep(Length trialStep)
trialStep
- the trialStep to setpublic void initializeApproximateCameraF()
public void updateApproximateCameraF(double upp, double uppZ)
public double getApproximateCameraF()
public void setApproximateCameraF(double approximateCameraF)
public void processRawCalibrationData(Size size) throws java.lang.Exception
java.lang.Exception
public void processRawCalibrationData(double[][][] testPattern3dPoints, double[][][] testPatternImagePoints, Size size, double mirrored, double apparentMotionDirection) throws java.lang.Exception
testPattern3dPoints
- - a numberOfTestPatterns x numberOfPointsPerTestPattern x 3 array
containing the 3D machine coordinates at which the corresponding point in
testPatternImagePoints were collectedtestPatternImagePoints
- - a numberOfTestPatterns x numberOfPointsPerTestPattern x 2
array containing the 2D image coordinates corresponding to the points in testPattern3dPointssize
- - the size of the imagejava.lang.Exception
public void initUndistortRectifyMap(Size size, Mat undistortionMap1, Mat undistortionMap2)
size
- - size of the physical camera imagesundistortionMap1
- - output X pixel mappingundistortionMap2
- - output Y pixel mappingpublic Length getDistanceToCameraAtZ(Length zHeight)
zHeight
- - the specified Z heightpublic Location getCameraOffsetAtZ(Length zHeight)
zHeight
- - the height of the horizontal planepublic void applyCalibrationToMachine(ReferenceHead head, ReferenceCamera camera)
head
- camera
-