OpenCV  4.10.0-dev
Open Source Computer Vision
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
cv::mcc::CCheckerDetector Class Referenceabstract

A class to find the positions of the ColorCharts in the image. More...

#include <opencv2/mcc/checker_detector.hpp>

Collaboration diagram for cv::mcc::CCheckerDetector:

Public Member Functions

virtual Ptr< mcc::CCheckergetBestColorChecker ()=0
 Get the best color checker. By the best it means the one detected with the highest confidence.
 
virtual std::vector< Ptr< CChecker > > getListColorChecker ()=0
 Get the list of all detected colorcheckers.
 
virtual bool process (InputArray image, const TYPECHART chartType, const int nc=1, bool useNet=false, const Ptr< DetectorParameters > &params=DetectorParameters::create())=0
 Find the ColorCharts in the given image.
 
virtual bool process (InputArray image, const TYPECHART chartType, const std::vector< Rect > &regionsOfInterest, const int nc=1, bool useNet=false, const Ptr< DetectorParameters > &params=DetectorParameters::create())=0
 Find the ColorCharts in the given image.
 
virtual bool setNet (dnn::Net net)=0
 Set the net which will be used to find the approximate bounding boxes for the color charts.
 
- Public Member Functions inherited from cv::Algorithm
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 Clears the algorithm state.
 
virtual bool empty () const
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.
 
virtual String getDefaultName () const
 
virtual void read (const FileNode &fn)
 Reads algorithm parameters from a file storage.
 
virtual void save (const String &filename) const
 
void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 
virtual void write (FileStorage &fs) const
 Stores algorithm parameters in a file storage.
 
void write (FileStorage &fs, const String &name) const
 

Static Public Member Functions

static Ptr< CCheckerDetectorcreate ()
 Returns the implementation of the CCheckerDetector.
 
- Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr< _Tpload (const String &filename, const String &objname=String())
 Loads algorithm from the file.
 
template<typename _Tp >
static Ptr< _TploadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String.
 
template<typename _Tp >
static Ptr< _Tpread (const FileNode &fn)
 Reads algorithm from the file node.
 

Additional Inherited Members

- Protected Member Functions inherited from cv::Algorithm
void writeFormat (FileStorage &fs) const
 

Detailed Description

A class to find the positions of the ColorCharts in the image.

Member Function Documentation

◆ create()

static Ptr< CCheckerDetector > cv::mcc::CCheckerDetector::create ( )
static
Python:
cv.mcc.CCheckerDetector.create() -> retval
cv.mcc.CCheckerDetector_create() -> retval

Returns the implementation of the CCheckerDetector.

◆ getBestColorChecker()

virtual Ptr< mcc::CChecker > cv::mcc::CCheckerDetector::getBestColorChecker ( )
pure virtual
Python:
cv.mcc.CCheckerDetector.getBestColorChecker() -> retval

Get the best color checker. By the best it means the one detected with the highest confidence.

Returns
checker A single colorchecker, if atleast one colorchecker was detected, 'nullptr' otherwise.

◆ getListColorChecker()

virtual std::vector< Ptr< CChecker > > cv::mcc::CCheckerDetector::getListColorChecker ( )
pure virtual
Python:
cv.mcc.CCheckerDetector.getListColorChecker() -> retval

Get the list of all detected colorcheckers.

Returns
checkers vector of colorcheckers

◆ process() [1/2]

virtual bool cv::mcc::CCheckerDetector::process ( InputArray  image,
const TYPECHART  chartType,
const int  nc = 1,
bool  useNet = false,
const Ptr< DetectorParameters > &  params = DetectorParameters::create() 
)
pure virtual
Python:
cv.mcc.CCheckerDetector.process(image, chartType[, nc[, useNet[, params]]]) -> retval
cv.mcc.CCheckerDetector.processWithROI(image, chartType, regionsOfInterest[, nc[, useNet[, params]]]) -> retval

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

Parameters
imageimage in color space BGR
chartTypetype of the chart to detect
ncnumber of charts in the image, if you don't know the exact then keeping this number high helps.
useNetif 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.
paramsparameters of the detection system. More information about them can be found in the struct DetectorParameters.
Returns
true if atleast one chart is detected otherwise false

◆ process() [2/2]

virtual bool cv::mcc::CCheckerDetector::process ( InputArray  image,
const TYPECHART  chartType,
const std::vector< Rect > &  regionsOfInterest,
const int  nc = 1,
bool  useNet = false,
const Ptr< DetectorParameters > &  params = DetectorParameters::create() 
)
pure virtual
Python:
cv.mcc.CCheckerDetector.process(image, chartType[, nc[, useNet[, params]]]) -> retval
cv.mcc.CCheckerDetector.processWithROI(image, chartType, regionsOfInterest[, nc[, useNet[, params]]]) -> retval

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

Parameters
imageimage in color space BGR
chartTypetype of the chart to detect
regionsOfInterestregions of image to look for the chart, if it is empty, charts are looked for in the entire image
ncnumber of charts in the image, if you don't know the exact then keeping this number high helps.
useNetif 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.
paramsparameters of the detection system. More information about them can be found in the struct DetectorParameters.
Returns
true if atleast one chart is detected otherwise false

◆ setNet()

virtual bool cv::mcc::CCheckerDetector::setNet ( dnn::Net  net)
pure virtual
Python:
cv.mcc.CCheckerDetector.setNet(net) -> retval

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.

Parameters
netthe neural network, if the network in empty, then the function will return false.
Returns
true if it was able to set the detector's network, false otherwise.

The documentation for this class was generated from the following file: