View Source Evision.QRCodeDetector (Evision v0.2.9)

Summary

Types

t()

Type that represents an QRCodeDetector struct.

Functions

Decodes graphical code in image once it's found by the detect() method.

Decodes graphical code in image once it's found by the detect() method.

Decodes QR code on a curved surface in image once it's found by the detect() method.

Decodes QR code on a curved surface in image once it's found by the detect() method.

Decodes graphical codes in image once it's found by the detect() method.

Decodes graphical codes in image once it's found by the detect() method.

Detects graphical code in image and returns the quadrangle containing the code.

Detects graphical code in image and returns the quadrangle containing the code.

Both detects and decodes graphical code

Both detects and decodes graphical code

Both detects and decodes QR code on a curved surface

Both detects and decodes QR code on a curved surface

Both detects and decodes graphical codes

Both detects and decodes graphical codes

Detects graphical codes in image and returns the vector of the quadrangles containing the codes.

Detects graphical codes in image and returns the vector of the quadrangles containing the codes.

QRCodeDetector

sets the epsilon used during the horizontal scan of QR code stop marker detection.

sets the epsilon used during the vertical scan of QR code stop marker detection.

use markers to improve the position of the corners of the QR code

Types

@type t() :: %Evision.QRCodeDetector{ref: reference()}

Type that represents an QRCodeDetector struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec decode(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

decode(self, img, points)

View Source
@spec decode(t(), Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in()) ::
  {binary(), Evision.Mat.t()} | {:error, String.t()}

Decodes graphical code in image once it's found by the detect() method.

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing graphical code.

  • points: Evision.Mat.

    Quadrangle vertices found by detect() method (or some other algorithm).

Return
  • retval: string

  • straight_code: Evision.Mat.t().

    The optional output image containing binarized code, will be empty if not found.

Returns UTF8-encoded output string or empty string if the code cannot be decoded.

Python prototype (for reference only):

decode(img, points[, straight_code]) -> retval, straight_code
Link to this function

decode(self, img, points, opts)

View Source
@spec decode(
  t(),
  Evision.Mat.maybe_mat_in(),
  Evision.Mat.maybe_mat_in(),
  [{atom(), term()}, ...] | nil
) ::
  {binary(), Evision.Mat.t()} | {:error, String.t()}

Decodes graphical code in image once it's found by the detect() method.

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing graphical code.

  • points: Evision.Mat.

    Quadrangle vertices found by detect() method (or some other algorithm).

Return
  • retval: string

  • straight_code: Evision.Mat.t().

    The optional output image containing binarized code, will be empty if not found.

Returns UTF8-encoded output string or empty string if the code cannot be decoded.

Python prototype (for reference only):

decode(img, points[, straight_code]) -> retval, straight_code
Link to this function

decodeCurved(named_args)

View Source
@spec decodeCurved(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

decodeCurved(self, img, points)

View Source
@spec decodeCurved(t(), Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in()) ::
  {binary(), Evision.Mat.t()} | {:error, String.t()}

Decodes QR code on a curved surface in image once it's found by the detect() method.

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing QR code.

  • points: Evision.Mat.

    Quadrangle vertices found by detect() method (or some other algorithm).

Return
  • retval: String

  • straight_qrcode: Evision.Mat.t().

    The optional output image containing rectified and binarized QR code

Returns UTF8-encoded output string or empty string if the code cannot be decoded.

Python prototype (for reference only):

decodeCurved(img, points[, straight_qrcode]) -> retval, straight_qrcode
Link to this function

decodeCurved(self, img, points, opts)

View Source
@spec decodeCurved(
  t(),
  Evision.Mat.maybe_mat_in(),
  Evision.Mat.maybe_mat_in(),
  [{atom(), term()}, ...] | nil
) :: {binary(), Evision.Mat.t()} | {:error, String.t()}

Decodes QR code on a curved surface in image once it's found by the detect() method.

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing QR code.

  • points: Evision.Mat.

    Quadrangle vertices found by detect() method (or some other algorithm).

Return
  • retval: String

  • straight_qrcode: Evision.Mat.t().

    The optional output image containing rectified and binarized QR code

Returns UTF8-encoded output string or empty string if the code cannot be decoded.

Python prototype (for reference only):

decodeCurved(img, points[, straight_qrcode]) -> retval, straight_qrcode
@spec decodeMulti(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

decodeMulti(self, img, points)

View Source
@spec decodeMulti(t(), Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in()) ::
  {[binary()], [Evision.Mat.t()]} | false | {:error, String.t()}

Decodes graphical codes in image once it's found by the detect() method.

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing graphical codes.

  • points: Evision.Mat.

    vector of Quadrangle vertices found by detect() method (or some other algorithm).

Return
  • retval: bool

  • decoded_info: [string].

    UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.

  • straight_code: [Evision.Mat].

    The optional output vector of images containing binarized codes

Python prototype (for reference only):

decodeMulti(img, points[, straight_code]) -> retval, decoded_info, straight_code
Link to this function

decodeMulti(self, img, points, opts)

View Source
@spec decodeMulti(
  t(),
  Evision.Mat.maybe_mat_in(),
  Evision.Mat.maybe_mat_in(),
  [{atom(), term()}, ...] | nil
) :: {[binary()], [Evision.Mat.t()]} | false | {:error, String.t()}

Decodes graphical codes in image once it's found by the detect() method.

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing graphical codes.

  • points: Evision.Mat.

    vector of Quadrangle vertices found by detect() method (or some other algorithm).

Return
  • retval: bool

  • decoded_info: [string].

    UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.

  • straight_code: [Evision.Mat].

    The optional output vector of images containing binarized codes

Python prototype (for reference only):

decodeMulti(img, points[, straight_code]) -> retval, decoded_info, straight_code
@spec detect(Keyword.t()) :: any() | {:error, String.t()}
@spec detect(t(), Evision.Mat.maybe_mat_in()) ::
  Evision.Mat.t() | false | {:error, String.t()}

Detects graphical code in image and returns the quadrangle containing the code.

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing (or not) graphical code.

Return
  • retval: bool

  • points: Evision.Mat.t().

    Output vector of vertices of the minimum-area quadrangle containing the code.

Python prototype (for reference only):

detect(img[, points]) -> retval, points
@spec detect(t(), Evision.Mat.maybe_mat_in(), [{atom(), term()}, ...] | nil) ::
  Evision.Mat.t() | false | {:error, String.t()}

Detects graphical code in image and returns the quadrangle containing the code.

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing (or not) graphical code.

Return
  • retval: bool

  • points: Evision.Mat.t().

    Output vector of vertices of the minimum-area quadrangle containing the code.

Python prototype (for reference only):

detect(img[, points]) -> retval, points
Link to this function

detectAndDecode(named_args)

View Source
@spec detectAndDecode(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

detectAndDecode(self, img)

View Source
@spec detectAndDecode(t(), Evision.Mat.maybe_mat_in()) ::
  {binary(), Evision.Mat.t(), Evision.Mat.t()} | {:error, String.t()}

Both detects and decodes graphical code

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing graphical code.

Return
  • retval: string

  • points: Evision.Mat.t().

    optional output array of vertices of the found graphical code quadrangle, will be empty if not found.

  • straight_code: Evision.Mat.t().

    The optional output image containing binarized code

Python prototype (for reference only):

detectAndDecode(img[, points[, straight_code]]) -> retval, points, straight_code
Link to this function

detectAndDecode(self, img, opts)

View Source
@spec detectAndDecode(t(), Evision.Mat.maybe_mat_in(), [{atom(), term()}, ...] | nil) ::
  {binary(), Evision.Mat.t(), Evision.Mat.t()} | {:error, String.t()}

Both detects and decodes graphical code

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing graphical code.

Return
  • retval: string

  • points: Evision.Mat.t().

    optional output array of vertices of the found graphical code quadrangle, will be empty if not found.

  • straight_code: Evision.Mat.t().

    The optional output image containing binarized code

Python prototype (for reference only):

detectAndDecode(img[, points[, straight_code]]) -> retval, points, straight_code
Link to this function

detectAndDecodeCurved(named_args)

View Source
@spec detectAndDecodeCurved(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

detectAndDecodeCurved(self, img)

View Source
@spec detectAndDecodeCurved(t(), Evision.Mat.maybe_mat_in()) ::
  {binary(), Evision.Mat.t(), Evision.Mat.t()} | {:error, String.t()}

Both detects and decodes QR code on a curved surface

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing QR code.

Return
  • retval: string

  • points: Evision.Mat.t().

    optional output array of vertices of the found QR code quadrangle. Will be empty if not found.

  • straight_qrcode: Evision.Mat.t().

    The optional output image containing rectified and binarized QR code

Python prototype (for reference only):

detectAndDecodeCurved(img[, points[, straight_qrcode]]) -> retval, points, straight_qrcode
Link to this function

detectAndDecodeCurved(self, img, opts)

View Source
@spec detectAndDecodeCurved(
  t(),
  Evision.Mat.maybe_mat_in(),
  [{atom(), term()}, ...] | nil
) ::
  {binary(), Evision.Mat.t(), Evision.Mat.t()} | {:error, String.t()}

Both detects and decodes QR code on a curved surface

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing QR code.

Return
  • retval: string

  • points: Evision.Mat.t().

    optional output array of vertices of the found QR code quadrangle. Will be empty if not found.

  • straight_qrcode: Evision.Mat.t().

    The optional output image containing rectified and binarized QR code

Python prototype (for reference only):

detectAndDecodeCurved(img[, points[, straight_qrcode]]) -> retval, points, straight_qrcode
Link to this function

detectAndDecodeMulti(named_args)

View Source
@spec detectAndDecodeMulti(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

detectAndDecodeMulti(self, img)

View Source
@spec detectAndDecodeMulti(t(), Evision.Mat.maybe_mat_in()) ::
  {[binary()], Evision.Mat.t(), [Evision.Mat.t()]}
  | false
  | {:error, String.t()}

Both detects and decodes graphical codes

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing graphical codes.

Return
  • retval: bool

  • decoded_info: [string].

    UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.

  • points: Evision.Mat.t().

    optional output vector of vertices of the found graphical code quadrangles. Will be empty if not found.

  • straight_code: [Evision.Mat].

    The optional vector of images containing binarized codes

  • If there are QR codes encoded with a Structured Append mode on the image and all of them detected and decoded correctly, method writes a full message to position corresponds to 0-th code in a sequence. The rest of QR codes from the same sequence have empty string.

Python prototype (for reference only):

detectAndDecodeMulti(img[, points[, straight_code]]) -> retval, decoded_info, points, straight_code
Link to this function

detectAndDecodeMulti(self, img, opts)

View Source
@spec detectAndDecodeMulti(
  t(),
  Evision.Mat.maybe_mat_in(),
  [{atom(), term()}, ...] | nil
) ::
  {[binary()], Evision.Mat.t(), [Evision.Mat.t()]}
  | false
  | {:error, String.t()}

Both detects and decodes graphical codes

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing graphical codes.

Return
  • retval: bool

  • decoded_info: [string].

    UTF8-encoded output vector of string or empty vector of string if the codes cannot be decoded.

  • points: Evision.Mat.t().

    optional output vector of vertices of the found graphical code quadrangles. Will be empty if not found.

  • straight_code: [Evision.Mat].

    The optional vector of images containing binarized codes

  • If there are QR codes encoded with a Structured Append mode on the image and all of them detected and decoded correctly, method writes a full message to position corresponds to 0-th code in a sequence. The rest of QR codes from the same sequence have empty string.

Python prototype (for reference only):

detectAndDecodeMulti(img[, points[, straight_code]]) -> retval, decoded_info, points, straight_code
@spec detectMulti(Keyword.t()) :: any() | {:error, String.t()}
@spec detectMulti(t(), Evision.Mat.maybe_mat_in()) ::
  Evision.Mat.t() | false | {:error, String.t()}

Detects graphical codes in image and returns the vector of the quadrangles containing the codes.

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing (or not) graphical codes.

Return
  • retval: bool

  • points: Evision.Mat.t().

    Output vector of vector of vertices of the minimum-area quadrangle containing the codes.

Python prototype (for reference only):

detectMulti(img[, points]) -> retval, points
Link to this function

detectMulti(self, img, opts)

View Source
@spec detectMulti(t(), Evision.Mat.maybe_mat_in(), [{atom(), term()}, ...] | nil) ::
  Evision.Mat.t() | false | {:error, String.t()}

Detects graphical codes in image and returns the vector of the quadrangles containing the codes.

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • img: Evision.Mat.

    grayscale or color (BGR) image containing (or not) graphical codes.

Return
  • retval: bool

  • points: Evision.Mat.t().

    Output vector of vector of vertices of the minimum-area quadrangle containing the codes.

Python prototype (for reference only):

detectMulti(img[, points]) -> retval, points
@spec qrCodeDetector() :: t() | {:error, String.t()}

QRCodeDetector

Return
  • self: Evision.QRCodeDetector.t()

Python prototype (for reference only):

QRCodeDetector() -> <QRCodeDetector object>
Link to this function

qrCodeDetector(named_args)

View Source
@spec qrCodeDetector(Keyword.t()) :: any() | {:error, String.t()}
@spec setEpsX(Keyword.t()) :: any() | {:error, String.t()}
@spec setEpsX(t(), number()) :: t() | {:error, String.t()}

sets the epsilon used during the horizontal scan of QR code stop marker detection.

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • epsX: double.

    Epsilon neighborhood, which allows you to determine the horizontal pattern of the scheme 1:1:3:1:1 according to QR code standard.

Return
  • retval: Evision.QRCodeDetector.t()

Python prototype (for reference only):

setEpsX(epsX) -> retval
@spec setEpsY(Keyword.t()) :: any() | {:error, String.t()}
@spec setEpsY(t(), number()) :: t() | {:error, String.t()}

sets the epsilon used during the vertical scan of QR code stop marker detection.

Positional Arguments
  • self: Evision.QRCodeDetector.t()

  • epsY: double.

    Epsilon neighborhood, which allows you to determine the vertical pattern of the scheme 1:1:3:1:1 according to QR code standard.

Return
  • retval: Evision.QRCodeDetector.t()

Python prototype (for reference only):

setEpsY(epsY) -> retval
Link to this function

setUseAlignmentMarkers(named_args)

View Source
@spec setUseAlignmentMarkers(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

setUseAlignmentMarkers(self, useAlignmentMarkers)

View Source
@spec setUseAlignmentMarkers(t(), boolean()) :: t() | {:error, String.t()}

use markers to improve the position of the corners of the QR code

Positional Arguments
  • self: Evision.QRCodeDetector.t()
  • useAlignmentMarkers: bool
Return
  • retval: Evision.QRCodeDetector.t()

alignmentMarkers using by default

Python prototype (for reference only):

setUseAlignmentMarkers(useAlignmentMarkers) -> retval