2026 Test Mode Images (#2285)

Adds test image from wpilib 2026 field test images

Co-authored-by: Matt <matthew.morley.ca@gmail.com>
This commit is contained in:
DeltaDizzy
2026-01-11 13:48:10 -06:00
committed by GitHub
parent e4749a3ea9
commit 12a8b88b4a
3 changed files with 81 additions and 21 deletions

View File

@@ -18,6 +18,7 @@
package org.photonvision.common.util;
import com.fasterxml.jackson.databind.ObjectMapper;
import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.math.geometry.Translation2d;
import edu.wpi.first.math.util.Units;
import java.awt.HeadlessException;
@@ -25,6 +26,7 @@ import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import org.opencv.core.Mat;
import org.opencv.core.Size;
import org.opencv.highgui.HighGui;
import org.photonvision.vision.calibration.CameraCalibrationCoefficients;
import org.photonvision.vision.pipeline.result.CVPipelineResult;
@@ -101,6 +103,26 @@ public class TestUtils {
}
}
public enum WPI2026Images {
// 4000 x 1868 px
// Galaxy S23, 6.3mm focal length
kBlueOutpostFuelSpread;
public static final Size resolution = new Size(4000, 1868);
public static final Rotation2d FOV = Rotation2d.fromDegrees(85.0);
public final Path path;
Path getPath() {
var filename = this.toString().substring(1);
return Path.of("2026", filename + ".jpg");
}
WPI2026Images() {
this.path = getPath();
}
}
public enum WPI2024Images {
kBackAmpZone_117in,
kSpeakerCenter_143in;