Image Pyramid
Overview
This is a small Rust crate that facilitates quickly generating an image pyramid from a user-provided image.
- See OpenCV: Image Pyramids for an overview of the two most common pyramid types, Lowpass (AKA Gaussian) and Bandpass (AKA Laplacian).
- The Tomasi paper Lowpass and Bandpass Pyramids has an authoritative explanation as well.
- Wikipedia has a decent explanation of a steerable pyramid
Usage
See the crates.io page for installation instructions, then check out the examples directory for example code. Below is a simple illustrative example of computing a default pyramid (Gaussian where each level is half resolution).
use *;
let image = todo!;
let pyramid = match create ;
Or a slightly more complex example, illustrating how to create a bandpass pyramid where each octave is $2\over{3}$ the resolution, smoothed using a triangle (linear) filter.
use *;
let image = todo!;
let params = ImagePyramidParams ;
let pyramid = match create ;
The scale_factor field is a UnitIntervalValue, which must be in the interval $(0, 1)$. Creating a value of this type yields a Result and will contain an error if the value is not valid.
Support
Open an Issue with questions or bug reports, and feel free to open a PR with proposed changes.
Contributing
Follow standard Rust conventions, and be sure to add tests for any new code added.