pub struct SummedAreaTable {
    pub sums: Vec<u32>,
    pub width: usize,
    pub height: usize,
}
Expand description

A data structure to efficiently compute summed pixel values over regions in an image (repeatedly).

Fields

sums: Vec<u32>width: usizeheight: usize

Implementations

Creates an SAT of the same size of image, where each entry (x,y) is the sum of pixel values of the block of pixels with bottom right corner at (x,y) in image.

This construction takes 1 pass through the pixels in image.

Returns the entry in the SAT.

If the input point is out of boundary, this function returns 0.

This is only to facilitate the implementation of other functions; avoid calling this function directly.

Computes the sum of pixel values in the specified region in O(1) time.

Computes the sum of pixel values in the specified region in O(1) time.

Computes the mean of pixel values in the specified region in O(1) time.

Computes the mean of pixel values in the specified region in O(1) time.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.