use of boofcv.gui.RenderCalibrationTargetsGraphics2D in project BoofCV by lessthanoptimal.
the class CameraCalibrationGui method calibrationParametersChanged.
@Override
public void calibrationParametersChanged(CalibrationTargetPanel.TargetType type, Object _config) {
final RenderCalibrationTargetsGraphics2D renderer = new RenderCalibrationTargetsGraphics2D(20, 1);
if (type == CalibrationTargetPanel.TargetType.CHESSBOARD) {
ConfigChessboard chess = (ConfigChessboard) _config;
renderer.chessboard(chess.numRows, chess.numCols, 20);
} else if (type == CalibrationTargetPanel.TargetType.SQUARE_GRID) {
ConfigSquareGrid config = (ConfigSquareGrid) _config;
double space = 20 * config.spaceWidth / config.squareWidth;
renderer.squareGrid(config.numRows, config.numCols, 20, space);
} else if (type == CalibrationTargetPanel.TargetType.CIRCLE_GRID) {
ConfigCircleRegularGrid config = (ConfigCircleRegularGrid) _config;
double space = 10 * config.centerDistance / config.circleDiameter;
renderer.circleRegular(config.numRows, config.numCols, 10, space);
} else if (type == CalibrationTargetPanel.TargetType.CIRCLE_HEX) {
ConfigCircleHexagonalGrid config = (ConfigCircleHexagonalGrid) _config;
double space = 10 * config.centerDistance / config.circleDiameter;
renderer.circleHex(config.numRows, config.numCols, 10, space);
}
renderingPanel.setImageUI(renderer.getBufferred());
}
Aggregations