View Source Evision.MCC.CCheckerDetector (Evision v0.2.9)
Summary
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
process
processWithROI
Reads algorithm parameters from a file storage
save
setNet
Stores algorithm parameters in a file storage
write
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
create
Return
- retval:
CCheckerDetector
\brief Returns the implementation of the CCheckerDetector.
Python prototype (for reference only):
create() -> retval
@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
@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
@spec getDefaultName(Keyword.t()) :: any() | {:error, String.t()}
@spec getDefaultName(t()) :: binary() | {:error, String.t()}
getDefaultName
Positional Arguments
- self:
Evision.MCC.CCheckerDetector.t()
Return
- retval:
String
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 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(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
@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
@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
@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(t(), Evision.FileNode.t()) :: t() | {:error, String.t()}
Reads algorithm parameters from a file storage
Positional Arguments
- self:
Evision.MCC.CCheckerDetector.t()
- func:
Evision.FileNode
Python prototype (for reference only):
read(fn) -> None
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
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
- name:
String
Has overloading in C++
Python prototype (for reference only):
write(fs, name) -> None