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

Link to this section 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

getDefaultName

getListColorChecker

Reads algorithm parameters from a file storage

Stores algorithm parameters in a file storage

Link to this section Types

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

Type that represents an MCC.CCheckerDetector struct.

  • ref. reference()

    The underlying erlang resource variable.

Link to this section Functions

@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 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(self)

View Source
@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
@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(self)

View Source
@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
Link to this function

process(self, image, chartType)

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

process

Positional Arguments
  • self: Evision.MCC.CCheckerDetector.t()
  • image: Evision.Mat.t()
  • chartType: TYPECHART
Keyword Arguments
  • nc: int.
  • 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.t(),
  [{atom(), term()}, ...] | nil
) ::
  boolean() | {:error, String.t()}

process

Positional Arguments
  • self: Evision.MCC.CCheckerDetector.t()
  • image: Evision.Mat.t()
  • chartType: TYPECHART
Keyword Arguments
  • nc: int.
  • 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(self, image, chartType, regionsOfInterest)

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

processWithROI

Positional Arguments
  • self: Evision.MCC.CCheckerDetector.t()
  • image: Evision.Mat.t()
  • chartType: TYPECHART
  • regionsOfInterest: [Rect]
Keyword Arguments
  • nc: int.
  • 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.t(),
  [{number(), number(), number(), number()}],
  [{atom(), term()}, ...] | nil
) :: boolean() | {:error, String.t()}

processWithROI

Positional Arguments
  • self: Evision.MCC.CCheckerDetector.t()
  • image: Evision.Mat.t()
  • chartType: TYPECHART
  • regionsOfInterest: [Rect]
Keyword Arguments
  • nc: int.
  • 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(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}

Reads algorithm parameters from a file storage

Positional Arguments
  • self: Evision.MCC.CCheckerDetector.t()
  • fn_: Evision.FileNode.t()

Python prototype (for reference only):

read(fn_) -> None
@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(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(t(), Evision.FileStorage.t()) :: t() | {:error, String.t()}

Stores algorithm parameters in a file storage

Positional Arguments
  • self: Evision.MCC.CCheckerDetector.t()
  • fs: Evision.FileStorage.t()

Python prototype (for reference only):

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

write

Positional Arguments
  • self: Evision.MCC.CCheckerDetector.t()
  • fs: Evision.FileStorage.t()
  • name: String

Has overloading in C++

Python prototype (for reference only):

write(fs, name) -> None