View Source Evision.MCC.CChecker (Evision v1.0.0-rc.0)

Summary

Types

t()

Type that represents an MCC.CChecker struct.

Functions

Clears the algorithm state

Create a new CChecker object.

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

Computes and returns the coordinates of the central parts of the charts modules.

Reads algorithm parameters from a file storage

Stores algorithm parameters in a file storage

Types

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

Type that represents an MCC.CChecker struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec clear(Keyword.t()) :: any() | {:error, String.t()}
@spec clear(t()) :: t() | {:error, String.t()}

Clears the algorithm state

Positional Arguments
  • self: Evision.MCC.CChecker.t()

Python prototype (for reference only):

clear() -> None
@spec create() :: t() | {:error, String.t()}

Create a new CChecker object.

Return
  • retval: CChecker

@return A pointer to the implementation of the CChecker

Python prototype (for reference only):

create() -> retval
@spec create(Keyword.t()) :: any() | {:error, String.t()}
@spec empty(Keyword.t()) :: any() | {:error, String.t()}
@spec empty(t()) :: boolean() | {:error, String.t()}

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read

Positional Arguments
  • self: Evision.MCC.CChecker.t()
Return
  • retval: bool

Python prototype (for reference only):

empty() -> retval
@spec getBox(Keyword.t()) :: any() | {:error, String.t()}
@spec getBox(t()) :: [{number(), number()}] | {:error, String.t()}

getBox

Positional Arguments
  • self: Evision.MCC.CChecker.t()
Return
  • retval: [Point2f]

Python prototype (for reference only):

getBox() -> retval
@spec getCenter(Keyword.t()) :: any() | {:error, String.t()}
@spec getCenter(t()) :: {number(), number()} | {:error, String.t()}

getCenter

Positional Arguments
  • self: Evision.MCC.CChecker.t()
Return
  • retval: Point2f

Python prototype (for reference only):

getCenter() -> retval
Link to this function

getChartsRGB(named_args)

View Source
@spec getChartsRGB(Keyword.t()) :: any() | {:error, String.t()}
@spec getChartsRGB(t()) :: Evision.Mat.t() | {:error, String.t()}

getChartsRGB

Positional Arguments
  • self: Evision.MCC.CChecker.t()
Keyword Arguments
  • getStats: bool.
Return
  • retval: Evision.Mat.t()

Python prototype (for reference only):

getChartsRGB([, getStats]) -> retval
Link to this function

getChartsRGB(self, opts)

View Source
@spec getChartsRGB(t(), [{:getStats, term()}] | nil) ::
  Evision.Mat.t() | {:error, String.t()}

getChartsRGB

Positional Arguments
  • self: Evision.MCC.CChecker.t()
Keyword Arguments
  • getStats: bool.
Return
  • retval: Evision.Mat.t()

Python prototype (for reference only):

getChartsRGB([, getStats]) -> retval
Link to this function

getChartsYCbCr(named_args)

View Source
@spec getChartsYCbCr(Keyword.t()) :: any() | {:error, String.t()}
@spec getChartsYCbCr(t()) :: Evision.Mat.t() | {:error, String.t()}

getChartsYCbCr

Positional Arguments
  • self: Evision.MCC.CChecker.t()
Return
  • retval: Evision.Mat.t()

Python prototype (for reference only):

getChartsYCbCr() -> retval
Link to this function

getColorCharts(named_args)

View Source
@spec getColorCharts(Keyword.t()) :: any() | {:error, String.t()}
@spec getColorCharts(t()) :: [{number(), number()}] | {:error, String.t()}

Computes and returns the coordinates of the central parts of the charts modules.

Positional Arguments
  • self: Evision.MCC.CChecker.t()
Return
  • retval: [Point2f]

This method computes transformation matrix from the checkers's coordinates (CChecker::getBox()) and find by this the coordinates of the central parts of the charts modules. It is used in CCheckerDetector::draw() and in ChartsRGB calculation.

Python prototype (for reference only):

getColorCharts() -> retval
@spec getCost(Keyword.t()) :: any() | {:error, String.t()}
@spec getCost(t()) :: number() | {:error, String.t()}

getCost

Positional Arguments
  • self: Evision.MCC.CChecker.t()
Return
  • retval: float

Python prototype (for reference only):

getCost() -> retval
Link to this function

getDefaultName(named_args)

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

getDefaultName

Positional Arguments
  • self: Evision.MCC.CChecker.t()
Return

Returns the algorithm string identifier. This string is used as top level xml/yml node tag when the object is saved to a file or string.

Python prototype (for reference only):

getDefaultName() -> retval
@spec getTarget(Keyword.t()) :: any() | {:error, String.t()}
@spec getTarget(t()) :: Evision.MCC.ColorChart.t() | {:error, String.t()}

getTarget

Positional Arguments
  • self: Evision.MCC.CChecker.t()
Return
  • retval: ColorChart

Python prototype (for reference only):

getTarget() -> retval
@spec read(Keyword.t()) :: any() | {:error, String.t()}
@spec read(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}

Reads algorithm parameters from a file storage

Positional Arguments

Python prototype (for reference only):

read(fn) -> None
@spec save(Keyword.t()) :: any() | {:error, String.t()}
@spec save(t(), binary()) :: t() | {:error, String.t()}

save

Positional Arguments
  • self: Evision.MCC.CChecker.t()
  • filename: String

Saves the algorithm to a file. In order to make this method work, the derived class must implement Algorithm::write(FileStorage& fs).

Python prototype (for reference only):

save(filename) -> None
@spec setBox(Keyword.t()) :: any() | {:error, String.t()}
@spec setBox(t(), [{number(), number()}]) :: t() | {:error, String.t()}

setBox

Positional Arguments
  • self: Evision.MCC.CChecker.t()
  • box: [Point2f]

Python prototype (for reference only):

setBox(_box) -> None
@spec setCenter(Keyword.t()) :: any() | {:error, String.t()}
@spec setCenter(
  t(),
  {number(), number()}
) :: t() | {:error, String.t()}

setCenter

Positional Arguments
  • self: Evision.MCC.CChecker.t()
  • center: Point2f

Python prototype (for reference only):

setCenter(_center) -> None
Link to this function

setChartsRGB(named_args)

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

setChartsRGB(self, chartsRGB)

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

setChartsRGB

Positional Arguments

Python prototype (for reference only):

setChartsRGB(_chartsRGB) -> None
Link to this function

setChartsYCbCr(named_args)

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

setChartsYCbCr(self, chartsYCbCr)

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

setChartsYCbCr

Positional Arguments

Python prototype (for reference only):

setChartsYCbCr(_chartsYCbCr) -> None
@spec setCost(Keyword.t()) :: any() | {:error, String.t()}
@spec setCost(t(), number()) :: t() | {:error, String.t()}

setCost

Positional Arguments
  • self: Evision.MCC.CChecker.t()
  • cost: float

Python prototype (for reference only):

setCost(_cost) -> None
@spec setTarget(Keyword.t()) :: any() | {:error, String.t()}
@spec setTarget(t(), Evision.MCC.ColorChart.t()) :: t() | {:error, String.t()}

setTarget

Positional Arguments
  • self: Evision.MCC.CChecker.t()
  • target: ColorChart

Python prototype (for reference only):

setTarget(_target) -> None
@spec write(Keyword.t()) :: any() | {:error, String.t()}
@spec write(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}

Stores algorithm parameters in a file storage

Positional Arguments

Python prototype (for reference only):

write(fs) -> None
@spec write(t(), Evision.FileStorage.t(), binary()) :: t() | {:error, String.t()}

write

Positional Arguments

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None