Skip to content

Commit

Permalink
release41
Browse files Browse the repository at this point in the history
- CreateCalibrationTargetGui: Fixed incorrect encoding being rendered in preview
  • Loading branch information
lessthanoptimal committed Sep 1, 2022
1 parent 103b839 commit a318a2c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ private void updatePreview() {
if (selectedType == CalibrationPatterns.ECOCHECK) {
ConfigECoCheckMarkers c = (ConfigECoCheckMarkers)selectedCalib;

ECoCheckUtils utils = new ECoCheckUtils();
var utils = new ECoCheckUtils();
utils.setParametersFromConfig(c);
utils.fixate();
ConfigECoCheckMarkers.MarkerShape shape = c.markerShapes.get(0);
Expand All @@ -283,7 +283,7 @@ private void updatePreview() {
// Render the marker. Adjust marker size so that when the border is added it will match the paper size
FiducialRenderEngineGraphics2D render = configureRenderGraphics2D(markerWidth, markerHeight, unitsToPixel);

ECoCheckGenerator generator = new ECoCheckGenerator(utils);
var generator = new ECoCheckGenerator(utils);
generator.squareWidth = shape.squareSize*unitsToPixel;
generator.setRender(render);
generator.render(0);
Expand All @@ -297,7 +297,7 @@ private void updatePreview() {

FiducialRenderEngineGraphics2D render = configureRenderGraphics2D(markerWidth, markerHeight, unitsToPixel);

HammingChessboardGenerator generator = new HammingChessboardGenerator(c);
var generator = new HammingChessboardGenerator(c);
generator.squareWidth = unitsToPixel;
generator.setRender(render);
generator.render();
Expand All @@ -319,7 +319,7 @@ private void updatePreview() {
return;
}

final RenderCalibrationTargetsGraphics2D renderer = new RenderCalibrationTargetsGraphics2D(-1, 400/paperWidth);
final var renderer = new RenderCalibrationTargetsGraphics2D(-1, 400/paperWidth);
renderer.setPaperSize(paperWidth, paperHeight);

if (selectedType == CalibrationPatterns.CHESSBOARD) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public CalibrationTargetPanel( Listener listener, boolean onlyDetectable ) {

/** Return only patterns that can be used to calibrate */
private static CalibrationPatterns[] supportedPatterns() {
var ret = new CalibrationPatterns[CalibrationPatterns.values().length-2];
var ret = new CalibrationPatterns[CalibrationPatterns.values().length - 2];
System.arraycopy(CalibrationPatterns.values(), 0, ret, 0, ret.length);
return ret;
}
Expand Down Expand Up @@ -117,7 +117,8 @@ public ConfigCalibrationTarget createConfigCalibrationTarget() {
public DetectSingleFiducialCalibration createSingleTargetDetector() {
return switch (selected) {
case CHESSBOARD -> FactoryFiducialCalibration.chessboardX(null, configChessboard);
case ECOCHECK -> new MultiToSingleFiducialCalibration(FactoryFiducialCalibration.ecocheck(null, configECoCheck));
case ECOCHECK ->
new MultiToSingleFiducialCalibration(FactoryFiducialCalibration.ecocheck(null, configECoCheck));
case SQUARE_GRID -> FactoryFiducialCalibration.squareGrid(null, configSquare);
case CIRCLE_GRID -> FactoryFiducialCalibration.circleRegularGrid(null, configCircle);
case CIRCLE_HEXAGONAL -> FactoryFiducialCalibration.circleHexagonalGrid(null, configCircleHex);
Expand Down Expand Up @@ -178,7 +179,8 @@ public void updateConfig( ConfigCalibrationTarget config ) {
case HAMMING_CHESSBOARD -> config.hammingChess.setTo(configHammingChess);
case HAMMING_GRID -> config.hammingGrid.setTo(configHammingGrid);
default -> throw new RuntimeException("Target type not yet supported.");
};
}
;
}

public Object getActiveConfig() {
Expand Down Expand Up @@ -249,7 +251,6 @@ public EcoCheckPanel() {
addLabeled(sMarkers, "Count", "Number of unique markers");
addLabeled(comboErrorLevel, "Error Level", "Amount of error correction. 0 = none. 10 = max.");
addLabeled(comboChecksum, "Checksum", "Bits for checksum. 0 = none. 8 = max.");

}

@Override
Expand Down Expand Up @@ -381,7 +382,7 @@ private class HammingChessPanel extends StandardAlgConfigPanel implements Change
JSpinnerNumber sCols = spinnerWrap(configHammingChess.numCols, 1, 1000, 1);
JSpinnerNumber sWidth = spinnerWrap(configHammingChess.squareSize, 0, 1000000.0, 1);
JSpinnerNumber sScale = spinnerWrap(configHammingChess.markerScale, 0, 1.0, 0.02);
JComboBox<?> cDict = combo(configHammingChess.markers.dictionary.ordinal(), (Object[])HammingDictionary.allPredefined());
JComboBox<?> cDict = combo(configHammingChess.markers.dictionary.ordinal() - 1, (Object[])HammingDictionary.allPredefined());
JSpinnerNumber sOffset = spinnerWrap(configHammingChess.markerOffset, 0, 200, 1);
JCheckBoxValue cEven = checkboxWrap("Even pattern", configHammingChess.chessboardEven);

Expand Down Expand Up @@ -432,7 +433,7 @@ private class HammingGridPanel extends StandardAlgConfigPanel implements ChangeL
JSpinnerNumber sCols = spinnerWrap(configHammingGrid.numCols, 1, 1000, 1);
JSpinnerNumber sWidth = spinnerWrap(configHammingGrid.squareSize, 0, 1000000.0, 1);
JSpinnerNumber sSpace = spinnerWrap(configHammingGrid.spaceToSquare, 0, 1.0, 0.02);
JComboBox<?> cDict = combo(configHammingGrid.markers.dictionary.ordinal(), (Object[])HammingDictionary.allPredefined());
JComboBox<?> cDict = combo(configHammingGrid.markers.dictionary.ordinal() - 1, (Object[])HammingDictionary.allPredefined());
JSpinnerNumber sOffset = spinnerWrap(configHammingGrid.markerOffset, 0, 200, 1);

public HammingGridPanel() {
Expand Down
2 changes: 0 additions & 2 deletions misc/release_check_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

--- Fresh Checkout ---

WARNING: Android will currently cause JavaDoc to fail. Either debug this or comment out in settings.gradle.

VERSION=v0.XX
git clone -b SNAPSHOT --recursive [email protected]:lessthanoptimal/BoofCV.git boofcv
cd boofcv;./gradlew autogenerate;rm -rf .git;cd ..;zip -r boofcv-$VERSION-src.zip boofcv
Expand Down

0 comments on commit a318a2c

Please sign in to comment.