[−][src]Function imageproc::integral_image::column_running_sum
pub fn column_running_sum(
image: &GrayImage,
column: u32,
buffer: &mut [u32],
padding: u32
)
Computes the running sum of one column of image, padded at the top and bottom. The padding is by continuity. Takes a reference to buffer so that this can be reused for all columns in an image.
Panics
- If
buffer.len() < 2 * padding + image.height()
. - If
column >= image.width()
. - If
image.height() == 0
.
Examples
use imageproc::integral_image::column_running_sum; let image = gray_image!( 1, 4; 2, 5; 3, 6); // Buffer has length two greater than image height, hence padding of 1 let mut buffer = [0; 5]; column_running_sum(&image, 0, &mut buffer, 1); // The image is padded by continuity on top and bottom assert_eq!(buffer, [1, 2, 4, 7, 10]);