@Namespace(value="cv")
@NoOffset
public static class opencv_features2d.BOWTrainer
extends org.bytedeco.javacpp.Pointer
/** \brief 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. :
| Constructor and Description |
|---|
BOWTrainer(org.bytedeco.javacpp.Pointer p)
Pointer cast constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(opencv_core.Mat descriptors)
\brief Adds descriptors to a training set.
|
void |
clear() |
opencv_core.Mat |
cluster()
\overload
|
opencv_core.Mat |
cluster(opencv_core.Mat descriptors)
\brief Clusters train descriptors.
|
int |
descriptorsCount()
\brief Returns the count of all descriptors stored in the training set.
|
opencv_core.MatVector |
getDescriptors()
\brief Returns a training set of descriptors.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic BOWTrainer(org.bytedeco.javacpp.Pointer p)
Pointer.Pointer(Pointer).public void add(@Const @ByRef
opencv_core.Mat descriptors)
descriptors - Descriptors 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.
@Const @ByRef public opencv_core.MatVector getDescriptors()
public int descriptorsCount()
public void clear()
@ByVal public opencv_core.Mat cluster()
@ByVal public opencv_core.Mat cluster(@Const @ByRef opencv_core.Mat descriptors)
descriptors - Descriptors 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.
Copyright © 2018. All rights reserved.