diff --git a/photon-client/src/components/cameras/CameraCalibrationCard.vue b/photon-client/src/components/cameras/CameraCalibrationCard.vue index a777d84a7c..81e98789cb 100644 --- a/photon-client/src/components/cameras/CameraCalibrationCard.vue +++ b/photon-client/src/components/cameras/CameraCalibrationCard.vue @@ -30,7 +30,7 @@ const getCalibrationCoeffs = (resolution: Resolution): CameraCalibrationResult | const getMeanFromView = (o: BoardObservation) => { // Is this the right formula for RMS error? who knows! not me! const perViewSumSquareReprojectionError = o.reprojectionErrors.flatMap((it2) => [it2.x, it2.y]); - + // For each error, square it, sum the squares, and divide by total points N return Math.sqrt( perViewSumSquareReprojectionError.map((it) => Math.pow(it, 2)).reduce((a, b) => a + b, 0) / diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/UICalibrationData.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/UICalibrationData.java index 6890ddc49e..624104569b 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/UICalibrationData.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/UICalibrationData.java @@ -17,10 +17,6 @@ package org.photonvision.vision.pipeline; -import java.util.Map; - -import org.opencv.core.Size; - public class UICalibrationData { public int videoModeIndex; public int count; diff --git a/photon-core/src/main/java/org/photonvision/vision/processes/VisionModule.java b/photon-core/src/main/java/org/photonvision/vision/processes/VisionModule.java index b6f69f81c0..8a2d57ecc1 100644 --- a/photon-core/src/main/java/org/photonvision/vision/processes/VisionModule.java +++ b/photon-core/src/main/java/org/photonvision/vision/processes/VisionModule.java @@ -26,7 +26,6 @@ import java.util.LinkedList; import java.util.List; import java.util.function.BiConsumer; - import org.opencv.core.Size; import org.photonvision.common.configuration.CameraConfiguration; import org.photonvision.common.configuration.ConfigManager; diff --git a/photon-core/src/main/java/org/photonvision/vision/processes/VisionModuleChangeSubscriber.java b/photon-core/src/main/java/org/photonvision/vision/processes/VisionModuleChangeSubscriber.java index 8d763ffbe2..68efd6d845 100644 --- a/photon-core/src/main/java/org/photonvision/vision/processes/VisionModuleChangeSubscriber.java +++ b/photon-core/src/main/java/org/photonvision/vision/processes/VisionModuleChangeSubscriber.java @@ -17,7 +17,6 @@ package org.photonvision.vision.processes; -import java.io.IOException; import java.util.ArrayList; import java.util.Map; import org.apache.commons.lang3.tuple.Pair; @@ -107,7 +106,9 @@ public void onDataChangeEvent(DataChangeEvent event) { case "startCalibration": // var data = UICalibrationData.fromMap((Map) newPropValue); try { - var data = JacksonUtils.deserialize((Map)newPropValue, UICalibrationData.class); + var data = + JacksonUtils.deserialize( + (Map) newPropValue, UICalibrationData.class); parentModule.startCalibration(data); parentModule.saveAndBroadcastAll(); } catch (Exception e) { diff --git a/photon-core/src/test/java/org/photonvision/vision/processes/PipelineManagerTest.java b/photon-core/src/test/java/org/photonvision/vision/processes/PipelineManagerTest.java index 1fb5b536f6..7072c802a7 100644 --- a/photon-core/src/test/java/org/photonvision/vision/processes/PipelineManagerTest.java +++ b/photon-core/src/test/java/org/photonvision/vision/processes/PipelineManagerTest.java @@ -29,7 +29,8 @@ public class PipelineManagerTest { @Test public void testUniqueName() { TestUtils.loadLibraries(); - PipelineManager manager = new PipelineManager(new DriverModePipelineSettings(), List.of(), "meme_name"); + PipelineManager manager = + new PipelineManager(new DriverModePipelineSettings(), List.of(), "meme_name"); manager.addPipeline(PipelineType.Reflective, "Another"); // We now have ["New Pipeline", "Another"]