From 91365deccbfd1d5686ff62d77d9dea6937fcdb4d Mon Sep 17 00:00:00 2001 From: gennyble Date: Sat, 9 Mar 2024 22:07:25 -0600 Subject: prism: output images have camera id --- prism/src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/prism/src/main.rs b/prism/src/main.rs index 8a52e0f..427b3db 100644 --- a/prism/src/main.rs +++ b/prism/src/main.rs @@ -34,7 +34,7 @@ fn main() { println!("{} images", lri.image_count()); if let Some(refimg) = lri.reference_image() { - output::make_png(refimg, directory.join("reference.png"), gain); + println!("The reference camera is {}", refimg.camera); } let mut set: HashMap = HashMap::new(); @@ -52,7 +52,8 @@ fn main() { println!("{} {:?} {}", kv.0, kv.1.sensor, kv.1.count); });*/ - for (idx, img) in lri.images().enumerate() { - output::make_png(img, directory.join(format!("image_{idx}.png")), gain); + for img in lri.images() { + let path = format!("{}.png", img.camera); + output::make_png(img, directory.join(path), gain); } } -- cgit 1.4.1-3-g733a5