pub fn stretch_contrast<P>(
    image: &Image<P>,
    input_lower: u8,
    input_upper: u8,
    output_lower: u8,
    output_upper: u8,
) -> Image<P>
where
    P: Pixel<Subpixel = u8>,
{
    let mut out = image.clone();
    stretch_contrast_mut(
        &mut out,
        input_lower,
        input_upper,
        output_lower,
        output_upper,
    );
    out
}
Stretches the contrast in an image, linearly mapping intensities in `(input_lower, input_upper)` to `(output_lower, output_upper)` and saturating
values outside this input range.

# Examples
```
# extern crate image;
# #[macro_use]
# extern crate imageproc;
# fn main() {
use imageproc::contrast::stretch_contrast;

let image = gray_image!(
0,   20,  50;
80,  100, 255);

let lower = 20;
let upper = 100;

// Pixel intensities between 20 and 100 are linearly
// scaled so that 20 is mapped to 0 and 100 is mapped to 255.
// Pixel intensities less than 20 are sent to 0 and pixel
// intensities greater than 100 are sent to 255.
let stretched = stretch_contrast(&image, lower, upper, 0u8, 255u8);

let expected = gray_image!(
0,   0,  95;
191, 255, 255);

assert_pixels_eq!(stretched, expected);
# }
```

# Panics
If `input_lower >= input_upper` or `output_lower > output_upper`.
src/contrast.rs