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.Xfeatures2dModule.BOWTrainer Class Reference

Abstract base class for training the bag of visual words vocabulary from a set of descriptors. More...

Public Member Functions

void add (Mat descriptors)
 Adds descriptors to a training set.
 
void clear ()
 
virtual Mat cluster ()
 
virtual Mat cluster (Mat descriptors)
 Clusters train descriptors.
 
int descriptorsCount ()
 Returns the count of all descriptors stored in the training set.
 
List< Mat > getDescriptors ()
 Returns a training set of descriptors.
 
IntPtr getNativeObjAddr ()
 
- 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 BOWTrainer __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.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 Attributes inherited from OpenCVForUnity.DisposableOpenCVObject
- Properties inherited from OpenCVForUnity.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

Abstract base class for training the bag of visual words vocabulary from a set of descriptors.

For details, see, for example, Visual Categorization with Bags of Keypoints by Gabriella Csurka, Christopher R. Dance, Lixin Fan, Jutta Willamowski, Cedric Bray, 2004. :

Member Function Documentation

◆ __fromPtr__()

static BOWTrainer OpenCVForUnity.Xfeatures2dModule.BOWTrainer.__fromPtr__ ( IntPtr addr)
static

◆ add()

void OpenCVForUnity.Xfeatures2dModule.BOWTrainer.add ( Mat descriptors)

Adds descriptors to a training set.

Parameters
descriptorsDescriptors to add to a training set. Each row of the descriptors matrix is a descriptor.

The training set is clustered using clustermethod to construct the vocabulary.

◆ clear()

void OpenCVForUnity.Xfeatures2dModule.BOWTrainer.clear ( )

◆ cluster() [1/2]

virtual Mat OpenCVForUnity.Xfeatures2dModule.BOWTrainer.cluster ( )
virtual

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Reimplemented in OpenCVForUnity.Xfeatures2dModule.BOWKMeansTrainer.

◆ cluster() [2/2]

virtual Mat OpenCVForUnity.Xfeatures2dModule.BOWTrainer.cluster ( Mat descriptors)
virtual

Clusters train descriptors.

Parameters
descriptorsDescriptors to cluster. Each row of the descriptors matrix is a descriptor. Descriptors are not added to the inner train descriptor set.

The vocabulary consists of cluster centers. So, this method returns the vocabulary. In the first variant of the method, train descriptors stored in the object are clustered. In the second variant, input descriptors are clustered.

Reimplemented in OpenCVForUnity.Xfeatures2dModule.BOWKMeansTrainer.

◆ descriptorsCount()

int OpenCVForUnity.Xfeatures2dModule.BOWTrainer.descriptorsCount ( )

Returns the count of all descriptors stored in the training set.

◆ Dispose()

override void OpenCVForUnity.Xfeatures2dModule.BOWTrainer.Dispose ( bool disposing)
protectedvirtual

Reimplemented from OpenCVForUnity.DisposableObject.

◆ getDescriptors()

List< Mat > OpenCVForUnity.Xfeatures2dModule.BOWTrainer.getDescriptors ( )

Returns a training set of descriptors.

◆ getNativeObjAddr()

IntPtr OpenCVForUnity.Xfeatures2dModule.BOWTrainer.getNativeObjAddr ( )

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