public abstract class CalibrateCameraProcess
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CalibrateCameraProcess.CameraCalibrationProcessProperties |
Modifier and Type | Field and Description |
---|---|
protected CameraWalker |
cameraWalker |
protected java.util.ArrayList<Point> |
expectedImagePointsList |
protected java.lang.Boolean |
previousProceedActionResult |
protected java.util.ArrayList<java.lang.Integer> |
testPatternIndiciesList |
protected java.util.ArrayList<Location> |
testPatternLocationsList |
protected Mat |
transformImageToMachine |
Constructor and Description |
---|
CalibrateCameraProcess(MainFrame mainFrame,
CameraView cameraView,
java.util.List<Location> calibrationLocations,
java.util.ArrayList<java.lang.Integer> detectionDiameters,
int automationLevel) |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanUpWhenCancelled()
Clean-up when the process is cancelled
|
protected void |
cleanUpWhenDone()
Clean-up when the process is done/cancelled
|
protected abstract void |
processCanceled()
This method is called when the raw calibration data collection has been canceled and must
be overridden to perform any necessary clean-up
|
protected abstract void |
processRawCalibrationData(double[][][] testPattern3dPoints,
double[][][] testPatternImagePoints,
Size size,
double mirrored,
double apparentMotionDirection)
This method is called when the raw calibration data collection has completed and must be
overridden to process the raw calibration data into a usable form
|
protected boolean |
repeatAction()
Action to repeat the calibration collection at another height
|
protected void |
showCircle(org.opencv.core.Point center,
int radius,
java.awt.Color color)
Overlays a circle on the camera's view
|
protected void |
showPoint(org.opencv.core.Point point,
java.awt.Color color)
Overlays a point (displayed as a +) on the camera's view
|
protected void |
showPointAndCircle(org.opencv.core.Point point,
org.opencv.core.Point center,
int radius,
java.awt.Color color)
Overlays a point (displayed as a +) and a circle on the camera's view
|
protected void |
showPointAndCircle(org.opencv.core.Point point,
org.opencv.core.Point center,
int radius,
java.awt.Color pointColor,
java.awt.Color circleColor)
Overlays a point (displayed as a +) and a circle on the camera's view
|
protected Mat transformImageToMachine
protected java.util.ArrayList<Point> expectedImagePointsList
protected java.util.ArrayList<Location> testPatternLocationsList
protected java.util.ArrayList<java.lang.Integer> testPatternIndiciesList
protected java.lang.Boolean previousProceedActionResult
protected CameraWalker cameraWalker
public CalibrateCameraProcess(MainFrame mainFrame, CameraView cameraView, java.util.List<Location> calibrationLocations, java.util.ArrayList<java.lang.Integer> detectionDiameters, int automationLevel) throws java.lang.Exception
java.lang.Exception
protected abstract void processRawCalibrationData(double[][][] testPattern3dPoints, double[][][] testPatternImagePoints, Size size, double mirrored, double apparentMotionDirection) throws java.lang.Exception
testPattern3dPoints
- - A List of N x 1 MatOfPoint3f containing the 3D machine
coordinates of the corresponding image points in testPatternImagePointstestPatternImagePoints
- - A List of N x 1 MatOfPoint2f containing the 2D image points
of the corresponding machine coordinates in testPatternImagePointssize
- - the size of the imagesmirrored
- - -1.0 if the raw camera image coordinates are mirrored (flipped) relative to
the machine coordinates, +1.0 otherwiseapparentMotionDirection
- - +1.0 if the apparent motion of objects in the images moves
in the same direction as the machine moves, -1.0 otherwisejava.lang.Exception
protected abstract void processCanceled()
protected boolean repeatAction()
protected void cleanUpWhenDone()
protected void cleanUpWhenCancelled()
protected void showPoint(org.opencv.core.Point point, java.awt.Color color)
point
- - the location, in pixels, of the +color
- - the color of the +protected void showCircle(org.opencv.core.Point center, int radius, java.awt.Color color)
center
- - the center, in pixels, of the circleradius
- - the radius, in pixels, of the circlecolor
- - the color of the circleprotected void showPointAndCircle(org.opencv.core.Point point, org.opencv.core.Point center, int radius, java.awt.Color color)
point
- - the center, in pixels, of the +center
- - the center, in pixels, of the circleradius
- - the radius, in pixels, of the circlecolor
- - the color of the + and the circleprotected void showPointAndCircle(org.opencv.core.Point point, org.opencv.core.Point center, int radius, java.awt.Color pointColor, java.awt.Color circleColor)
point
- - the center, in pixels, of the +center
- - the center, in pixels, of the circleradius
- - the radius, in pixels, of the circlepointColor
- - the color of the +circleColor
- - the color of the circle