From b46af45d4cf17ada2bf52a7a2f7c284dffb329d9 Mon Sep 17 00:00:00 2001 From: Max Value Date: Mon, 15 Sep 2025 00:20:03 +0100 Subject: [PATCH] Setup to write LUT generator --- src/cube/cube.py | 4 ++++ src/main.rs | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 src/cube/cube.py diff --git a/src/cube/cube.py b/src/cube/cube.py new file mode 100644 index 0000000..ad3062c --- /dev/null +++ b/src/cube/cube.py @@ -0,0 +1,4 @@ +#!.venv/bin/python + +import cv2 as cv + diff --git a/src/main.rs b/src/main.rs index 904af4f..832355d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -112,6 +112,7 @@ impl ImageArray { for i in 0..self.chunks { (r, theta) = buffer[i].to_polar(); + // make linear and normalize amplitude = 20f32 * r.log10(); amplitude = ((amplitude - VOLUME_MIN) / (VOLUME_REL / AMPLITUDE_REL)) + AMPLITUDE_MIN; @@ -230,12 +231,9 @@ fn main () -> Result<(), Box> { let homography = [0f64; 9]; // homography is a 3x3 matrix of 64-bit floats let mut image_array = ImageArray::new(homography); - println!("registered image array"); - // create the debug window let debug_window = create_window("Debug", Default::default())?; - // create window for displaying images and display calibration image let display_window = create_window("Display", Default::default())?; let calibration_image = ImageReader::open("src/calibration.jpg")?.decode()?; @@ -251,7 +249,6 @@ fn main () -> Result<(), Box> { } } - // calibrate camera image_array.calibrate(); -- 2.39.2