[][src]Struct quircs::Quirc

pub struct Quirc {
    pub pixels: Vec<Pixel>,
    pub w: usize,
    pub h: usize,
    pub regions: Vec<Region>,
    pub capstones: Vec<Capstone>,
    pub grids: Vec<Grid>,
}

Fields

pixels: Vec<Pixel>w: usizeh: usizeregions: Vec<Region>capstones: Vec<Capstone>grids: Vec<Grid>

Implementations

impl Quirc[src]

pub fn identify(&mut self, image: &[u8])[src]

These functions are used to process images for QR-code recognition. The locations and content of each code may be obtained using accessor functions described below.

pub fn extract(&self, index: usize) -> Result<Code, ExtractError>[src]

Extract the QR-code specified by the given index.

impl Quirc[src]

pub fn new() -> Self[src]

Construct a new QR-code recognizer. This function will return NULL if sufficient memory could not be allocated.

pub fn resize(&mut self, width: usize, height: usize)[src]

Resize the QR-code recognizer. The size of an image must be specified before codes can be analyzed.

This function returns 0 on success, or -1 if sufficient memory could not be allocated.

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

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

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

Return the number of QR-codes identified in the last processed image.

Trait Implementations

impl Clone for Quirc[src]

impl Debug for Quirc[src]

impl Default for Quirc[src]

Auto Trait Implementations

impl RefUnwindSafe for Quirc

impl Send for Quirc

impl Sync for Quirc

impl Unpin for Quirc

impl UnwindSafe for Quirc

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.