Skip to content

Commit

Permalink
set all the things
Browse files Browse the repository at this point in the history
  • Loading branch information
crschardt committed Nov 4, 2024
1 parent 99c5d3a commit 30644cd
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,16 @@ protected void setPipeParamsImpl() {
config.quadDecimate = settings.decimate;

var quadParams = new AprilTagDetector.QuadThresholdParameters();
// 5 was the default minClusterPixels in WPILib prior to 2025
// increasing it causes detection problems when decimate > 1
quadParams.minClusterPixels = 5;
// these are the same as the values in WPILib 2025
// setting them here to prevent upstream changes from changing behavior of the detector
quadParams.maxNumMaxima = 10;
quadParams.criticalAngle = 45 * Math.PI / 180.0;
quadParams.maxLineFitMSE = 10.0f;
quadParams.minWhiteBlackDiff = 5;
quadParams.deglitch = false;

aprilTagDetectionPipe.setParams(
new AprilTagDetectionPipeParams(settings.tagFamily, config, quadParams));
Expand Down

0 comments on commit 30644cd

Please sign in to comment.