View Source Evision.MCC.CCheckerDetector (Evision v0.2.9)

Summary

Types

t()

Type that represents an MCC.CCheckerDetector struct.

Functions

Clears the algorithm state

create

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

getBestColorChecker

getListColorChecker

Reads algorithm parameters from a file storage

Stores algorithm parameters in a file storage

Types

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

Type that represents an MCC.CCheckerDetector 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.CCheckerDetector.t()

Python prototype (for reference only):

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

create

Return
  • retval: CCheckerDetector

\brief Returns the implementation of the CCheckerDetector.

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.CCheckerDetector.t()
Return
  • retval: bool

Python prototype (for reference only):

empty() -> retval
Link to this function

getBestColorChecker(named_args)

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

getBestColorChecker

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

\brief Get the best color checker. By the best it means the one

     detected with the highest confidence.

\return checker A single colorchecker, if atleast one colorchecker

             was detected, 'nullptr' otherwise.

Python prototype (for reference only):

getBestColorChecker() -> 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.CCheckerDetector.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
Link to this function

getListColorChecker(named_args)

View Source
@spec getListColorChecker(Keyword.t()) :: any() | {:error, String.t()}
@spec getListColorChecker(t()) :: [Evision.MCC.CChecker.t()] | {:error, String.t()}

getListColorChecker

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

\brief Get the list of all detected colorcheckers \return checkers vector of colorcheckers

Python prototype (for reference only):

getListColorChecker() -> retval
@spec process(Keyword.t()) :: any() | {:error, String.t()}
Link to this function

process(self, image, chartType)

View Source
@spec process(t(), Evision.Mat.maybe_mat_in(), Evision.MCC.TYPECHART.enum()) ::
  boolean() | {:error, String.t()}

process

Positional Arguments
  • self: Evision.MCC.CCheckerDetector.t()
  • image: Evision.Mat
  • chartType: TYPECHART
Keyword Arguments
  • nc: integer().
  • useNet: bool.
  • params: DetectorParameters.
Return
  • retval: bool

\brief Find the ColorCharts in the given image. Differs from the above one only in the arguments. This version searches for the chart in the full image. The found charts are not returned but instead stored in the detector, these can be accessed later on using getBestColorChecker() and getListColorChecker() \param image image in color space BGR \param chartType type of the chart to detect \param nc number of charts in the image, if you don't know the exact

       then keeping this number high helps.

\param useNet if it is true the network provided using the setNet()

           is used for preliminary search for regions where chart
           could be present, inside the regionsOfInterest provied.

\param params parameters of the detection system. More information

           about them can be found in the struct DetectorParameters.

\return true if atleast one chart is detected otherwise false

Python prototype (for reference only):

process(image, chartType[, nc[, useNet[, params]]]) -> retval
Link to this function

process(self, image, chartType, opts)

View Source
@spec process(
  t(),
  Evision.Mat.maybe_mat_in(),
  Evision.MCC.TYPECHART.enum(),
  [nc: term(), params: term(), useNet: term()] | nil
) :: boolean() | {:error, String.t()}

process

Positional Arguments
  • self: Evision.MCC.CCheckerDetector.t()
  • image: Evision.Mat
  • chartType: TYPECHART
Keyword Arguments
  • nc: integer().
  • useNet: bool.
  • params: DetectorParameters.
Return
  • retval: bool

\brief Find the ColorCharts in the given image. Differs from the above one only in the arguments. This version searches for the chart in the full image. The found charts are not returned but instead stored in the detector, these can be accessed later on using getBestColorChecker() and getListColorChecker() \param image image in color space BGR \param chartType type of the chart to detect \param nc number of charts in the image, if you don't know the exact

       then keeping this number high helps.

\param useNet if it is true the network provided using the setNet()

           is used for preliminary search for regions where chart
           could be present, inside the regionsOfInterest provied.

\param params parameters of the detection system. More information

           about them can be found in the struct DetectorParameters.

\return true if atleast one chart is detected otherwise false

Python prototype (for reference only):

process(image, chartType[, nc[, useNet[, params]]]) -> retval
Link to this function

processWithROI(named_args)

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

processWithROI(self, image, chartType, regionsOfInterest)

View Source
@spec processWithROI(t(), Evision.Mat.maybe_mat_in(), Evision.MCC.TYPECHART.enum(), [
  {number(), number(), number(), number()}
]) :: boolean() | {:error, String.t()}

processWithROI

Positional Arguments
  • self: Evision.MCC.CCheckerDetector.t()
  • image: Evision.Mat
  • chartType: TYPECHART
  • regionsOfInterest: [Rect]
Keyword Arguments
  • nc: integer().
  • useNet: bool.
  • params: DetectorParameters.
Return
  • retval: bool

\brief Find the ColorCharts in the given image. The found charts are not returned but instead stored in the detector, these can be accessed later on using getBestColorChecker() and getListColorChecker() \param image image in color space BGR \param chartType type of the chart to detect \param regionsOfInterest regions of image to look for the chart, if

                      it is empty, charts are looked for in the
                      entire image

\param nc number of charts in the image, if you don't know the exact

       then keeping this number high helps.

\param useNet if it is true the network provided using the setNet()

           is used for preliminary search for regions where chart
           could be present, inside the regionsOfInterest provied.

\param params parameters of the detection system. More information

           about them can be found in the struct DetectorParameters.

\return true if atleast one chart is detected otherwise false

Python prototype (for reference only):

processWithROI(image, chartType, regionsOfInterest[, nc[, useNet[, params]]]) -> retval
Link to this function

processWithROI(self, image, chartType, regionsOfInterest, opts)

View Source
@spec processWithROI(
  t(),
  Evision.Mat.maybe_mat_in(),
  Evision.MCC.TYPECHART.enum(),
  [{number(), number(), number(), number()}],
  [nc: term(), params: term(), useNet: term()] | nil
) :: boolean() | {:error, String.t()}

processWithROI

Positional Arguments
  • self: Evision.MCC.CCheckerDetector.t()
  • image: Evision.Mat
  • chartType: TYPECHART
  • regionsOfInterest: [Rect]
Keyword Arguments
  • nc: integer().
  • useNet: bool.
  • params: DetectorParameters.
Return
  • retval: bool

\brief Find the ColorCharts in the given image. The found charts are not returned but instead stored in the detector, these can be accessed later on using getBestColorChecker() and getListColorChecker() \param image image in color space BGR \param chartType type of the chart to detect \param regionsOfInterest regions of image to look for the chart, if

                      it is empty, charts are looked for in the
                      entire image

\param nc number of charts in the image, if you don't know the exact

       then keeping this number high helps.

\param useNet if it is true the network provided using the setNet()

           is used for preliminary search for regions where chart
           could be present, inside the regionsOfInterest provied.

\param params parameters of the detection system. More information

           about them can be found in the struct DetectorParameters.

\return true if atleast one chart is detected otherwise false

Python prototype (for reference only):

processWithROI(image, chartType, regionsOfInterest[, nc[, useNet[, params]]]) -> 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.CCheckerDetector.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 setNet(Keyword.t()) :: any() | {:error, String.t()}
@spec setNet(t(), Evision.DNN.Net.t()) :: boolean() | {:error, String.t()}

setNet

Positional Arguments
  • self: Evision.MCC.CCheckerDetector.t()
  • net: Evision.DNN.Net.t()
Return
  • retval: bool

\brief Set the net which will be used to find the approximate

     bounding boxes for the color charts.

It is not necessary to use this, but this usually results in better detection rate. \param net the neural network, if the network in empty, then

        the function will return false.

\return true if it was able to set the detector's network,

     false otherwise.

Python prototype (for reference only):

setNet(net) -> retval
@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