[][src]Struct rqrr::PreparedImage

pub struct PreparedImage<S> { /* fields omitted */ }

An black-and-white image that can be mutated on search for QR codes

During search for QR codes, some black zones will be recolored in 'different' shades of black. This is done to speed up the search and mitigate the impact of a huge zones.

Methods

impl<S> PreparedImage<S> where
    S: ImageBuffer, 
[src]

pub fn prepare(buf: S) -> Self[src]

pub fn detect_grids(&mut self) -> Vec<Grid<RefGridImage<S>>>[src]

pub fn without_preparation(buf: S) -> Self[src]

pub fn width(&self) -> usize[src]

Return the width of the image

pub fn height(&self) -> usize[src]

Return the height of the image

pub fn get_pixel_at_point(&self, p: Point) -> PixelColor[src]

pub fn get_pixel_at(&self, x: usize, y: usize) -> PixelColor[src]

pub fn write_state_to(&self, p: &str)[src]

impl PreparedImage<BasicImageBuffer>[src]

pub fn prepare_from_bitmap<F>(w: usize, h: usize, fill: F) -> Self where
    F: FnMut(usize, usize) -> bool
[src]

Given a function with binary output, generate a searchable image

If the given function returns true the matching pixel will be 'black'.

pub fn prepare_from_greyscale<F>(w: usize, h: usize, fill: F) -> Self where
    F: FnMut(usize, usize) -> u8
[src]

Given a byte valued function, generate a searchable image

The values returned by the function are interpreted as luminance. i.e. a value of 0 is black, 255 is white.

Trait Implementations

impl<S> Clone for PreparedImage<S> where
    S: Clone
[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<S> Send for PreparedImage<S> where
    S: Send

impl<S> Sync for PreparedImage<S> where
    S: Sync

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.