diff --git a/opencv-calibrate/src/lib.rs b/opencv-calibrate/src/lib.rs index 107f25c16..f588639f4 100644 --- a/opencv-calibrate/src/lib.rs +++ b/opencv-calibrate/src/lib.rs @@ -63,8 +63,8 @@ impl From for Result { #[derive(Debug)] pub struct CalibrationResult { - /// mean reprojection error - pub mean_reprojection_error: f64, + /// mean reprojection distance, in pixels + pub mean_reprojection_distance_pixels: f64, /// camera calibration matrix, row major order pub camera_matrix: [f64; 9], /// non-linear distortion coefficients (k1, k2, p1, p2, k3) @@ -132,12 +132,12 @@ pub fn calibrate_camera( ) } .into(); - let mean_reprojection_error = r1?; + let mean_reprojection_distance_pixels = r1?; debug_assert!(rotation_matrices.len() == all_pts.len()); debug_assert!(translation_vectors.len() == all_pts.len()); Ok(CalibrationResult { - mean_reprojection_error, + mean_reprojection_distance_pixels, camera_matrix, distortion_coeffs, rotation_matrices, diff --git a/strand-cam/strand-cam-offline-checkerboards/src/main.rs b/strand-cam/strand-cam-offline-checkerboards/src/main.rs index d6dc94ea7..15fd7848e 100644 --- a/strand-cam/strand-cam-offline-checkerboards/src/main.rs +++ b/strand-cam/strand-cam-offline-checkerboards/src/main.rs @@ -107,7 +107,7 @@ fn main() -> Result<()> { info!( "Mean reprojection error: {}", - raw_opencv_cal.mean_reprojection_error + raw_opencv_cal.mean_reprojection_distance_pixels ); info!("got calibrated intrinsics: {:?}", intrinsics); @@ -141,7 +141,7 @@ fn main() -> Result<()> { # Mean reprojection distance: {:.2}\n", env!["CARGO_PKG_NAME"], local, - raw_opencv_cal.mean_reprojection_error + raw_opencv_cal.mean_reprojection_distance_pixels ) .as_bytes(), )?;