View Source Evision.Barcode.BarcodeDetector (Evision v0.1.37)

Summary

Types

t()

Type that represents an Barcode.BarcodeDetector struct.

Functions

Initialize the BarcodeDetector.

Initialize the BarcodeDetector.

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 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.

Decodes barcode 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 graphical codes

Both detects and decodes graphical codes

Both detects and decodes barcode

Both detects and decodes barcode

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.

Types

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

Type that represents an Barcode.BarcodeDetector struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec barcodeDetector() :: t() | {:error, String.t()}

Initialize the BarcodeDetector.

Return
  • self: BarcodeDetector

Python prototype (for reference only):

BarcodeDetector() -> <barcode_BarcodeDetector object>
Link to this function

barcodeDetector(prototxt_path, model_path)

View Source
@spec barcodeDetector(binary(), binary()) :: t() | {:error, String.t()}

Initialize the BarcodeDetector.

Positional Arguments
  • prototxt_path: string.

    prototxt file path for the super resolution model

  • model_path: string.

    model file path for the super resolution model

Return
  • self: BarcodeDetector

Parameters allow to load optional Super Resolution DNN model for better quality.

Python prototype (for reference only):

BarcodeDetector(prototxt_path, model_path) -> <barcode_BarcodeDetector object>
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.Barcode.BarcodeDetector.t()

  • img: Evision.Mat.t().

    grayscale or color (BGR) image containing graphical code.

  • points: Evision.Mat.t().

    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.Barcode.BarcodeDetector.t()

  • img: Evision.Mat.t().

    grayscale or color (BGR) image containing graphical code.

  • points: Evision.Mat.t().

    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

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.Barcode.BarcodeDetector.t()

  • img: Evision.Mat.t().

    grayscale or color (BGR) image containing graphical codes.

  • points: Evision.Mat.t().

    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.Barcode.BarcodeDetector.t()

  • img: Evision.Mat.t().

    grayscale or color (BGR) image containing graphical codes.

  • points: Evision.Mat.t().

    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

decodeWithType(self, img, points)

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

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

Positional Arguments
  • self: Evision.Barcode.BarcodeDetector.t()

  • img: Evision.Mat.t().

    grayscale or color (BGR) image containing bar code.

  • points: Evision.Mat.t().

    vector of rotated rectangle vertices found by detect() method (or some other algorithm). For N detected barcodes, the dimensions of this array should be [N][4]. Order of four points in vector<Point2f> is bottomLeft, topLeft, topRight, bottomRight.

Return
  • retval: bool

  • decoded_info: [string].

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

  • decoded_type: [string].

    vector strings, specifies the type of these barcodes

@return true if at least one valid barcode have been found

Python prototype (for reference only):

decodeWithType(img, points) -> retval, decoded_info, decoded_type
@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.Barcode.BarcodeDetector.t()

  • img: Evision.Mat.t().

    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.Barcode.BarcodeDetector.t()

  • img: Evision.Mat.t().

    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(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.Barcode.BarcodeDetector.t()

  • img: Evision.Mat.t().

    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.Barcode.BarcodeDetector.t()

  • img: Evision.Mat.t().

    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

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.Barcode.BarcodeDetector.t()

  • img: Evision.Mat.t().

    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

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.Barcode.BarcodeDetector.t()

  • img: Evision.Mat.t().

    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

Python prototype (for reference only):

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

detectAndDecodeWithType(self, img)

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

Both detects and decodes barcode

Positional Arguments
  • self: Evision.Barcode.BarcodeDetector.t()

  • img: Evision.Mat.t().

    grayscale or color (BGR) image containing barcode.

Return
  • retval: bool

  • decoded_info: [string].

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

  • decoded_type: [string].

    vector of strings, specifies the type of these barcodes

  • points: Evision.Mat.t().

    optional output vector of vertices of the found barcode rectangle. Will be empty if not found.

@return true if at least one valid barcode have been found

Python prototype (for reference only):

detectAndDecodeWithType(img[, points]) -> retval, decoded_info, decoded_type, points
Link to this function

detectAndDecodeWithType(self, img, opts)

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

Both detects and decodes barcode

Positional Arguments
  • self: Evision.Barcode.BarcodeDetector.t()

  • img: Evision.Mat.t().

    grayscale or color (BGR) image containing barcode.

Return
  • retval: bool

  • decoded_info: [string].

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

  • decoded_type: [string].

    vector of strings, specifies the type of these barcodes

  • points: Evision.Mat.t().

    optional output vector of vertices of the found barcode rectangle. Will be empty if not found.

@return true if at least one valid barcode have been found

Python prototype (for reference only):

detectAndDecodeWithType(img[, points]) -> retval, decoded_info, decoded_type, points
@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.Barcode.BarcodeDetector.t()

  • img: Evision.Mat.t().

    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.Barcode.BarcodeDetector.t()

  • img: Evision.Mat.t().

    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