diff --git a/photon-client/src/components/cameras/CameraCalibrationCard.vue b/photon-client/src/components/cameras/CameraCalibrationCard.vue index ba6ca5470..29b4d2b88 100644 --- a/photon-client/src/components/cameras/CameraCalibrationCard.vue +++ b/photon-client/src/components/cameras/CameraCalibrationCard.vue @@ -25,15 +25,8 @@ const getUniqueVideoFormatsByResolution = (): VideoFormat[] => { const calib = useCameraSettingsStore().getCalibrationCoeffs(format.resolution); if (calib !== undefined) { - // Is this the right formula for RMS error? who knows! not me! - const perViewSumSquareReprojectionError = calib.observations.flatMap((it) => - it.reprojectionErrors.flatMap((it2) => [it2.x, it2.y]) - ); // For each error, square it, sum the squares, and divide by total points N - format.mean = Math.sqrt( - perViewSumSquareReprojectionError.map((it) => Math.pow(it, 2)).reduce((a, b) => a + b, 0) / - perViewSumSquareReprojectionError.length - ); + format.mean = calib.meanErrors.reduce((a, b) => a + b) / calib.meanErrors.length; format.horizontalFOV = 2 * Math.atan2(format.resolution.width / 2, calib.cameraIntrinsics.data[0]) * (180 / Math.PI); diff --git a/photon-client/src/components/cameras/CameraCalibrationInfoCard.vue b/photon-client/src/components/cameras/CameraCalibrationInfoCard.vue index 3ebc29960..39498333e 100644 --- a/photon-client/src/components/cameras/CameraCalibrationInfoCard.vue +++ b/photon-client/src/components/cameras/CameraCalibrationInfoCard.vue @@ -1,51 +1,19 @@