]> OzVa Git service - rust_fft/commitdiff
Setup to write LUT generator
authorMax Value <greenwoodw50@gmail.com>
Sun, 14 Sep 2025 23:20:03 +0000 (00:20 +0100)
committerMax Value <greenwoodw50@gmail.com>
Sun, 14 Sep 2025 23:20:03 +0000 (00:20 +0100)
src/cube/cube.py [new file with mode: 0644]
src/main.rs

diff --git a/src/cube/cube.py b/src/cube/cube.py
new file mode 100644 (file)
index 0000000..ad3062c
--- /dev/null
@@ -0,0 +1,4 @@
+#!.venv/bin/python
+
+import cv2 as cv
+
index 904af4f4d3e567dfebc21076a3bc16774df5470f..832355d4dd09319475faac4ca934b26b8daf4690 100644 (file)
@@ -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<dyn std::error::Error>> {
        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<dyn std::error::Error>> {
                }
        }
 
-
        // calibrate camera
        image_array.calibrate();