[][src]Struct rqrr::SkewedGridLocation

pub struct SkewedGridLocation {
    pub caps: [CapStone; 3],
    pub align: Point,
    pub grid_size: usize,
    pub c: Perspective,
}

Location of a skewed square in an image

A skewed square formed by 3 CapStones and possibly an alignment pattern located in the 4th corner. This can be converted into a normal Grid that can be decoded.

Fields

caps: [CapStone; 3]align: Pointgrid_size: usizec: Perspective

Methods

impl SkewedGridLocation[src]

pub fn from_group(
    img: &mut SearchableImage,
    group: CapStoneGroup
) -> Option<Self>
[src]

Create a SkewedGridLocation from corners

Given 3 corners of a grid, this tries to match the expected features of a QR code such that the SkewedGridLocation maps onto those features.

For all grids this includes searching for timing patterns between capstones to determine the grid size.

For bigger grids this includes searching for an alignment pattern in the 4 corner.

If no sufficient match could be produces, return None instead.

pub fn into_grid_image(self, img: &SearchableImage) -> RefGridImage[src]

Convert into a grid referencing the underlying image as source

Trait Implementations

impl Clone for SkewedGridLocation[src]

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

Performs copy-assignment from source. Read more

impl Debug for SkewedGridLocation[src]

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto 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> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut 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.