Skip to main content

gaussian_pyramid_build

Function gaussian_pyramid_build 

Source
pub fn gaussian_pyramid_build(
    src: &[f32],
    width: u32,
    height: u32,
    n_levels: usize,
    out_packed: &mut [f32],
    meta: &mut [PyramidLevelMeta; 6],
) -> Result<usize, CvError>
Expand description

Build a Gaussian pyramid into a packed caller buffer.

Level 0 copies src (width*height f32). Each subsequent level is a 2× spatial downsample of the previous (4-neighbor mean with edge clamp).

Returns number of levels written (≤ n_levels, stops early if dim stalls at 1×1).