OpenCV for Unity 3.0.4
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/5.0/index.html ) for the details of the argument of the method.
Loading...
Searching...
No Matches
OpenCVForUnity.ObjdetectModule.CCheckerDetector Class Reference

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

Public Member Functions

DetectorParametersMCC getDetectionParams ()
 
Mat getRefColors ()
 Gets the reference color for chart.
 
bool getUseDnnModel ()
 
bool process (Mat image)
 Find the ColorCharts in the given image.
 
bool process (Mat image, int nc)
 Find the ColorCharts in the given image.
 
bool processWithROI (Mat image, MatOfRect regionsOfInterest)
 Find the ColorCharts in the given image.
 
bool processWithROI (Mat image, MatOfRect regionsOfInterest, int nc)
 Find the ColorCharts in the given image.
 
void setDetectionParams (DetectorParametersMCC _params)
 Sets the detection paramaters for mcc.
 
void setUseDnnModel (bool useDnn)
 Enables or disables the use of the neural network for detection.
 
- Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
virtual void clear ()
 Clears the algorithm state.
 
virtual bool empty ()
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.
 
virtual string getDefaultName ()
 
IntPtr getNativeObjAddr ()
 
void save (string filename)
 
- Public Member Functions inherited from OpenCVForUnity.DisposableObject
void Dispose ()
 Releases resources used by this object.
 
void ThrowIfDisposed ()
 Throws ObjectDisposedException if this object has been disposed.
 

Static Public Member Functions

static new CCheckerDetector __fromPtr__ (IntPtr addr)
 
static CCheckerDetector create ()
 Returns the implementation of the CCheckerDetector.
 
static CCheckerDetector create (Net net)
 Set the net which will be used to find the approximate bounding boxes for the color charts. And returns the implementation of the CCheckerDetector.
 
- Static Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
static Algorithm __fromPtr__ (IntPtr addr)
 
- Static Public Member Functions inherited from OpenCVForUnity.DisposableObject
static IntPtr ThrowIfNullIntPtr (IntPtr ptr)
 Returns the native pointer, or throws CoreModule.CvException if it is zero.
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm
- Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject
 DisposableOpenCVObject ()
 Initializes a new instance with a zero native pointer and dispose enabled.
 
 DisposableOpenCVObject (bool isEnabledDispose)
 Initializes a new instance with a zero native pointer.
 
 DisposableOpenCVObject (IntPtr ptr)
 Initializes a new instance with the specified native pointer and dispose enabled.
 
 DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose)
 Initializes a new instance with the specified native pointer.
 
override void Dispose (bool disposing)
 
- Protected Member Functions inherited from OpenCVForUnity.DisposableObject
 DisposableObject ()
 Initializes a new instance with dispose enabled.
 
 DisposableObject (bool isEnabledDispose)
 Initializes a new instance.
 

Additional Inherited Members

- Package Functions inherited from OpenCVForUnity.CoreModule.Algorithm
- Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject
- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

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

Member Function Documentation

◆ __fromPtr__()

static new CCheckerDetector OpenCVForUnity.ObjdetectModule.CCheckerDetector.__fromPtr__ ( IntPtr addr)
static

◆ create() [1/2]

static CCheckerDetector OpenCVForUnity.ObjdetectModule.CCheckerDetector.create ( )
static

Returns the implementation of the CCheckerDetector.

◆ create() [2/2]

static CCheckerDetector OpenCVForUnity.ObjdetectModule.CCheckerDetector.create ( Net net)
static

Set the net which will be used to find the approximate bounding boxes for the color charts. And returns the implementation of the CCheckerDetector.

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.

◆ Dispose()

override void OpenCVForUnity.ObjdetectModule.CCheckerDetector.Dispose ( bool disposing)
protectedvirtual

◆ getDetectionParams()

DetectorParametersMCC OpenCVForUnity.ObjdetectModule.CCheckerDetector.getDetectionParams ( )

◆ getRefColors()

Mat OpenCVForUnity.ObjdetectModule.CCheckerDetector.getRefColors ( )

Gets the reference color for chart.

◆ getUseDnnModel()

bool OpenCVForUnity.ObjdetectModule.CCheckerDetector.getUseDnnModel ( )

◆ process() [1/2]

bool OpenCVForUnity.ObjdetectModule.CCheckerDetector.process ( Mat image)

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
ncnumber of charts in the image, if you don't know the exact then keeping this number high helps.
Returns
true if atleast one chart is detected otherwise false

◆ process() [2/2]

bool OpenCVForUnity.ObjdetectModule.CCheckerDetector.process ( Mat image,
int nc )

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
ncnumber of charts in the image, if you don't know the exact then keeping this number high helps.
Returns
true if atleast one chart is detected otherwise false

◆ processWithROI() [1/2]

bool OpenCVForUnity.ObjdetectModule.CCheckerDetector.processWithROI ( Mat image,
MatOfRect regionsOfInterest )

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
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.
Returns
true if atleast one chart is detected otherwise false

◆ processWithROI() [2/2]

bool OpenCVForUnity.ObjdetectModule.CCheckerDetector.processWithROI ( Mat image,
MatOfRect regionsOfInterest,
int nc )

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
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.
Returns
true if atleast one chart is detected otherwise false

◆ setDetectionParams()

void OpenCVForUnity.ObjdetectModule.CCheckerDetector.setDetectionParams ( DetectorParametersMCC _params)

Sets the detection paramaters for mcc.

Parameters
paramsDetectorParametersMCC structure containing detection configuration parameters.

◆ setUseDnnModel()

void OpenCVForUnity.ObjdetectModule.CCheckerDetector.setUseDnnModel ( bool useDnn)

Enables or disables the use of the neural network for detection.

Parameters
useDnnBoolean flag to indicate whether to use neural network (true) or not (false).

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