Struct mss_saliency::Img [] [src]

pub struct Img<Container> {
    pub buf: Container,
    pub stride: usize,
    pub width: u32,
    pub height: u32,
}

Basic struct used for both owned (alias ImgVec) and borrowed (alias ImgRef) image fragments.

Fields

Storage for the pixels. Usually Vec<Pixel> or &[Pixel]. See ImgVec and ImgRef.

Number of pixels to skip in the container to advance to the next row.

Note: pixels between width and stride may not be usable, and may not even exist in the last row.

Width of the image in pixels.

Note that this isn't same as the width of the row in the buf, see stride

Height of the image in pixels.

Methods

impl<'a, T> Img<&'a [T]>
[src]

impl<T> Img<Vec<T>>
[src]

Create a mutable view into a region within the image. See sub_image() for read-only views.

If you need a mutable reference, see sub_image_mut()

impl<T> Img<T>
[src]

impl<OldContainer> Img<OldContainer>
[src]

Trait Implementations

impl<'a, T> Copy for Img<&'a [T]>
[src]

impl<Pixel, Container> ImgExt<Pixel> for Img<Container> where
    Container: AsRef<[Pixel]>, 
[src]

impl<Container> Clone for Img<Container> where
    Container: Clone
[src]