fn compute_color_lut(bins: u32, sigma: f32, max_value: f32) -> Vec<f32> {
        let v = (0..bins as i32).collect::<Vec<i32>>();
        let step_size = max_value / bins as f32;
        let vals = v.iter().map(|&x| x as f32 * step_size).collect::<Vec<_>>();
        let sigma_squared = sigma.powi(2);
        let gauss_weights = vals
            .iter()
            .map(|&x| gaussian_weight(x, sigma_squared))
            .collect::<Vec<_>>();
        gauss_weights
    }
/// Create look-up table of Gaussian weights for color dimension.
Create look-up table of Gaussian weights for color dimension.
Create look - up table of Gaussian weights for color dimension .
fn compute_color_lut(bins: u32, sigma: f32, max_value: f32) -> Vec<f32> {
        let v = (0..bins as i32).collect::<Vec<i32>>();
        let step_size = max_value / bins as f32;
        let vals = v.iter().map(|&x| x as f32 * step_size).collect::<Vec<_>>();
        let sigma_squared = sigma.powi(2);
        let gauss_weights = vals
            .iter()
            .map(|&x| gaussian_weight(x, sigma_squared))
            .collect::<Vec<_>>();
        gauss_weights
    }
fn compute_color_lut ( bins : u32 , sigma : f32 , max_value : f32 ) -> Vec < f32 > { let v = ( 0 .. bins as i32 ) . collect :: < Vec < i32 > > ( ) ; let step_size = max_value / bins as f32 ; let vals = v . iter ( ) . map ( | & x | x as f32 * step_size ) . collect :: < Vec < _ > > ( ) ; let sigma_squared = sigma . powi ( 2 ) ; let gauss_weights = vals . iter ( ) . map ( | & x | gaussian_weight ( x , sigma_squared ) ) . collect :: < Vec < _ > > ( ) ; gauss_weights }
Create look-up table of Gaussian weights for color dimension.
Create look - up table of Gaussian weights for color dimension .
bins
u32
sigma
f32
max_value
f32
bins
u32
sigma
f32
max_value
f32