[−][src]Struct rqrr::PreparedImage
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]
S: ImageBuffer,
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]
F: FnMut(usize, usize) -> bool,
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]
F: FnMut(usize, usize) -> u8,
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]
S: Clone,
Auto Trait Implementations
impl<S> Send for PreparedImage<S> where
S: Send,
S: Send,
impl<S> Sync for PreparedImage<S> where
S: Sync,
S: Sync,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
Sets value
as a parameter of self
.