Use chessboard squares (vs interior corners); fix resolution selector bug (#139)

* Change chessboard size to be squares not interior corners

This reduces ambiguity

* Force users to select resolution

This forces the correct video mode index to be selected. Otherwise the 0th camera videomode index will be used, as it's zero-inited. This is undesirable.

* Make target model an enum

This will allow the UI to remember the currently selected target.
This commit is contained in:
Matt
2020-10-13 06:58:50 -07:00
committed by GitHub
parent 6e0a6b804e
commit 23f3c0e6e1
13 changed files with 146 additions and 194 deletions

View File

@@ -54,7 +54,7 @@ public class ConfigTest {
COLORED_SHAPE_PIPELINE_SETTINGS = new ColoredShapePipelineSettings();
REFLECTIVE_PIPELINE_SETTINGS.pipelineNickname = "2019Tape";
REFLECTIVE_PIPELINE_SETTINGS.targetModel = TargetModel.get2019Target();
REFLECTIVE_PIPELINE_SETTINGS.targetModel = TargetModel.k2019DualTarget;
COLORED_SHAPE_PIPELINE_SETTINGS.pipelineNickname = "2019Cargo";
COLORED_SHAPE_PIPELINE_SETTINGS.pipelineIndex = 1;

View File

@@ -97,7 +97,7 @@ public class CirclePNPTest {
pipeline.getSettings().cornerDetectionAccuracyPercentage = 4;
pipeline.getSettings().cornerDetectionUseConvexHulls = true;
pipeline.getSettings().cameraCalibration = getCoeffs(LIFECAM_480P_CAL_FILE);
pipeline.getSettings().targetModel = TargetModel.getCircleTarget(7);
pipeline.getSettings().targetModel = TargetModel.kCircularPowerCell7in;
pipeline.getSettings().cameraPitch = Rotation2d.fromDegrees(0.0);
pipeline.getSettings().outputShouldDraw = true;
pipeline.getSettings().outputShowMultipleTargets = false;

View File

@@ -98,7 +98,7 @@ public class SolvePNPTest {
pipeline.getSettings().contourGroupingMode = ContourGroupingMode.Dual;
pipeline.getSettings().contourIntersection = ContourIntersectionDirection.Up;
pipeline.getSettings().cornerDetectionUseConvexHulls = true;
pipeline.getSettings().targetModel = TargetModel.get2019Target();
pipeline.getSettings().targetModel = TargetModel.k2019DualTarget;
var frameProvider =
new FileFrameProvider(
@@ -133,7 +133,7 @@ public class SolvePNPTest {
pipeline.getSettings().solvePNPEnabled = true;
pipeline.getSettings().cornerDetectionAccuracyPercentage = 4;
pipeline.getSettings().cornerDetectionUseConvexHulls = true;
pipeline.getSettings().targetModel = TargetModel.get2020Target();
pipeline.getSettings().targetModel = TargetModel.k2020HighGoalOuter;
var frameProvider =
new FileFrameProvider(