-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* multi cam but individual * ignore * init extrinsic * trait dvec vec3 * clippy * params name * initial extrinsic works * still failed but fix one bug * work but need to save the output * need validation * write extrinsic * seperate result * add io * clean up * clippy * type * type * update image
- Loading branch information
Showing
11 changed files
with
686 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,5 @@ Cargo.lock | |
remaped.png | ||
.DS_Store | ||
output.json | ||
results/ | ||
results/ | ||
default_board_config.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"tag_size_meter": 0.088, | ||
"tag_spacing": 0.3, | ||
"tag_rows": 5, | ||
"tag_cols": 9, | ||
"first_id": 0 | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use std::io::Write; | ||
|
||
use crate::types::Extrinsics; | ||
|
||
pub fn extrinsics_to_json(output_path: &str, extrinsic: &Extrinsics) { | ||
let j = serde_json::to_string_pretty(extrinsic).unwrap(); | ||
let mut file = std::fs::File::create(output_path).unwrap(); | ||
file.write_all(j.as_bytes()).unwrap(); | ||
} | ||
|
||
pub fn write_report(output_path: &str, with_extrinsic: bool, rep_rms: &[(f64, f64)]) { | ||
let mut s = String::new(); | ||
s += format!("Calibrate with extrinsics: {}\n\n", with_extrinsic).as_str(); | ||
for (cam_idx, &(avg_rep, med_rep)) in rep_rms.iter().enumerate() { | ||
s += format!("cam{}:\n", cam_idx).as_str(); | ||
s += format!(" average reprojection error: {:.5} px\n", avg_rep).as_str(); | ||
s += format!(" median reprojection error: {:.5} px\n\n", med_rep).as_str(); | ||
} | ||
let mut file = std::fs::File::create(output_path).unwrap(); | ||
file.write_all(s.as_bytes()).unwrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.