View Source Evision.MCC.CCheckerDetector (Evision v1.0.0-rc.0)
Summary
Functions
Clears the algorithm state
Returns the implementation of the CCheckerDetector.
Set the net which will be used to find the approximate bounding boxes for the color charts. And returns the implementation of the CCheckerDetector.
Draws the checker to the given image.
Draws the checker to the given image.
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read
Get the best color checker. By the best it means the one detected with the highest confidence.
getColorChartType
getDefaultName
getDetectionParams
Get the list of all detected colorcheckers
Gets the reference color for chart.
getUseDnnModel
Find the ColorCharts in the given image.
Find the ColorCharts in the given image.
Find the ColorCharts in the given image.
Find the ColorCharts in the given image.
Reads algorithm parameters from a file storage
save
Sets the color chart type for MCC detection.
Sets the detection paramaters for mcc.
Enables or disables the use of the neural network for detection.
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
Returns the implementation of the CCheckerDetector.
Return
- retval:
CCheckerDetector
Python prototype (for reference only):
create() -> retval
@spec create(Keyword.t()) :: any() | {:error, String.t()}
@spec create(Evision.DNN.Net.t()) :: t() | {:error, String.t()}
Set the net which will be used to find the approximate bounding boxes for the color charts. And returns the implementation of the CCheckerDetector.
Positional Arguments
net:
Evision.DNN.Net.t().the neural network, if the network in empty, then the function will return false.
Return
- retval:
CCheckerDetector
It is not necessary to use this, but this usually results in better detection rate.
Python prototype (for reference only):
create(net) -> retval
@spec draw(t(), [Evision.MCC.Ptr_CChecker.t()], Evision.Mat.maybe_mat_in()) :: Evision.Mat.t() | {:error, String.t()}
Draws the checker to the given image.
Positional Arguments
self:
Evision.MCC.CCheckerDetector.t()checkers:
[Ptr_CChecker].The checkers which will be drawn by this object.
Keyword Arguments
color:
Evision.scalar().The color by with which the squares of the checker will be drawn
thickness:
integer().The thickness with which the sqaures will be drawn
Return
img:
Evision.Mat.t().image in color space BGR
Python prototype (for reference only):
draw(checkers, img[, color[, thickness]]) -> img
@spec draw( t(), [Evision.MCC.Ptr_CChecker.t()], Evision.Mat.maybe_mat_in(), [color: term(), thickness: term()] | nil ) :: Evision.Mat.t() | {:error, String.t()}
Draws the checker to the given image.
Positional Arguments
self:
Evision.MCC.CCheckerDetector.t()checkers:
[Ptr_CChecker].The checkers which will be drawn by this object.
Keyword Arguments
color:
Evision.scalar().The color by with which the squares of the checker will be drawn
thickness:
integer().The thickness with which the sqaures will be drawn
Return
img:
Evision.Mat.t().image in color space BGR
Python prototype (for reference only):
draw(checkers, img[, color[, thickness]]) -> img
@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()}
Get the best color checker. By the best it means the one detected with the highest confidence.
Positional Arguments
- self:
Evision.MCC.CCheckerDetector.t()
Return
- retval:
Evision.MCC.CCheckerDetector.t()
@return checker A single colorchecker, if atleast one colorchecker
was detected, 'nullptr' otherwise.Python prototype (for reference only):
getBestColorChecker() -> retval
@spec getColorChartType(Keyword.t()) :: any() | {:error, String.t()}
@spec getColorChartType(t()) :: Evision.MCC.ColorChart.t() | {:error, String.t()}
getColorChartType
Positional Arguments
- self:
Evision.MCC.CCheckerDetector.t()
Return
- retval:
ColorChart
Python prototype (for reference only):
getColorChartType() -> 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 getDetectionParams(Keyword.t()) :: any() | {:error, String.t()}
@spec getDetectionParams(t()) :: Evision.MCC.DetectorParametersMCC.t() | {:error, String.t()}
getDetectionParams
Positional Arguments
- self:
Evision.MCC.CCheckerDetector.t()
Return
- retval:
DetectorParametersMCC
Python prototype (for reference only):
getDetectionParams() -> retval
@spec getListColorChecker(Keyword.t()) :: any() | {:error, String.t()}
@spec getListColorChecker(t()) :: [Evision.MCC.CChecker.t()] | {:error, String.t()}
Get the list of all detected colorcheckers
Positional Arguments
- self:
Evision.MCC.CCheckerDetector.t()
Return
- retval:
[CChecker]
@return checkers vector of colorcheckers
Python prototype (for reference only):
getListColorChecker() -> retval
@spec getRefColors(Keyword.t()) :: any() | {:error, String.t()}
@spec getRefColors(t()) :: Evision.Mat.t() | {:error, String.t()}
Gets the reference color for chart.
Positional Arguments
- self:
Evision.MCC.CCheckerDetector.t()
Return
- retval:
Evision.Mat.t()
Python prototype (for reference only):
getRefColors() -> retval
@spec getUseDnnModel(Keyword.t()) :: any() | {:error, String.t()}
@spec getUseDnnModel(t()) :: boolean() | {:error, String.t()}
getUseDnnModel
Positional Arguments
- self:
Evision.MCC.CCheckerDetector.t()
Return
- retval:
bool
Python prototype (for reference only):
getUseDnnModel() -> retval
@spec process(t(), Evision.Mat.maybe_mat_in()) :: boolean() | {:error, String.t()}
Find the ColorCharts in the given image.
Positional Arguments
self:
Evision.MCC.CCheckerDetector.t()image:
Evision.Mat.image in color space BGR
Keyword Arguments
nc:
integer().number of charts in the image, if you don't know the exact then keeping this number high helps.
Return
- retval:
bool
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() @return true if atleast one chart is detected otherwise false
Python prototype (for reference only):
process(image[, nc]) -> retval
@spec process(t(), Evision.Mat.maybe_mat_in(), [{:nc, term()}] | nil) :: boolean() | {:error, String.t()}
Find the ColorCharts in the given image.
Positional Arguments
self:
Evision.MCC.CCheckerDetector.t()image:
Evision.Mat.image in color space BGR
Keyword Arguments
nc:
integer().number of charts in the image, if you don't know the exact then keeping this number high helps.
Return
- retval:
bool
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() @return true if atleast one chart is detected otherwise false
Python prototype (for reference only):
process(image[, nc]) -> retval
@spec processWithROI(t(), Evision.Mat.maybe_mat_in(), [ {number(), number(), number(), number()} ]) :: boolean() | {:error, String.t()}
Find the ColorCharts in the given image.
Positional Arguments
self:
Evision.MCC.CCheckerDetector.t()image:
Evision.Mat.image in color space BGR
regionsOfInterest:
[Rect].regions of image to look for the chart, if it is empty, charts are looked for in the entire image
Keyword Arguments
nc:
integer().number of charts in the image, if you don't know the exact then keeping this number high helps.
Return
- retval:
bool
The found charts are not returned but instead stored in the detector, these can be accessed later on using getBestColorChecker() and getListColorChecker() @return true if atleast one chart is detected otherwise false
Python prototype (for reference only):
processWithROI(image, regionsOfInterest[, nc]) -> retval
@spec processWithROI( t(), Evision.Mat.maybe_mat_in(), [{number(), number(), number(), number()}], [{:nc, term()}] | nil ) :: boolean() | {:error, String.t()}
Find the ColorCharts in the given image.
Positional Arguments
self:
Evision.MCC.CCheckerDetector.t()image:
Evision.Mat.image in color space BGR
regionsOfInterest:
[Rect].regions of image to look for the chart, if it is empty, charts are looked for in the entire image
Keyword Arguments
nc:
integer().number of charts in the image, if you don't know the exact then keeping this number high helps.
Return
- retval:
bool
The found charts are not returned but instead stored in the detector, these can be accessed later on using getBestColorChecker() and getListColorChecker() @return true if atleast one chart is detected otherwise false
Python prototype (for reference only):
processWithROI(image, regionsOfInterest[, nc]) -> 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
Sets the color chart type for MCC detection.
Positional Arguments
self:
Evision.MCC.CCheckerDetector.t()chartType:
ColorChart.ColorChart enum specifying the type of color chart to detect.
Python prototype (for reference only):
setColorChartType(chartType) -> None
@spec setDetectionParams(t(), Evision.MCC.DetectorParametersMCC.t()) :: t() | {:error, String.t()}
Sets the detection paramaters for mcc.
Positional Arguments
self:
Evision.MCC.CCheckerDetector.t()params:
DetectorParametersMCC.DetectorParametersMCC structure containing detection configuration parameters.
Python prototype (for reference only):
setDetectionParams(params) -> None
Enables or disables the use of the neural network for detection.
Positional Arguments
self:
Evision.MCC.CCheckerDetector.t()useDnn:
bool.Boolean flag to indicate whether to use neural network (true) or not (false).
Python prototype (for reference only):
setUseDnnModel(useDnn) -> None
@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