From: Max Value Date: Sun, 14 Sep 2025 23:20:03 +0000 (+0100) Subject: Setup to write LUT generator X-Git-Url: https://git.ozva.co.uk/?a=commitdiff_plain;h=b46af45d4cf17ada2bf52a7a2f7c284dffb329d9;p=rust_fft Setup to write LUT generator --- 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();