View Source Evision.BOWTrainer (Evision v0.1.15)
Link to this section Summary
Types
Type that represents an Evision.BOWTrainer
struct.
Functions
Adds descriptors to a training set.
Python prototype (for reference):
Clusters train descriptors.
Returns the count of all descriptors stored in the training set.
Returns a training set of descriptors.
Link to this section Types
@type t() :: %Evision.BOWTrainer{ref: reference()}
Type that represents an Evision.BOWTrainer
struct.
ref.
reference()
The underlying erlang resource variable.
Link to this section Functions
@spec add(t(), Evision.Mat.maybe_mat_in()) :: :ok | {:error, String.t()}
Adds descriptors to a training set.
Positional Arguments
descriptors:
Evision.Mat
.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.
Python prototype (for reference):
add(descriptors) -> None
Python prototype (for reference):
clear() -> None
@spec cluster(t()) :: Evision.Mat.t() | {:error, String.t()}
Return
- retval:
Evision.Mat
Has overloading in C++
Python prototype (for reference):
cluster() -> retval
@spec cluster(t(), Evision.Mat.maybe_mat_in()) :: Evision.Mat.t() | {:error, String.t()}
Clusters train descriptors.
Positional Arguments
descriptors:
Evision.Mat
.Descriptors to cluster. Each row of the descriptors matrix is a descriptor. Descriptors are not added to the inner train descriptor set.
Return
- retval:
Evision.Mat
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.
Python prototype (for reference):
cluster(descriptors) -> retval
Returns the count of all descriptors stored in the training set.
Return
- retval:
int
Python prototype (for reference):
descriptorsCount() -> retval
@spec getDescriptors(t()) :: [Evision.Mat.t()] | {:error, String.t()}
Returns a training set of descriptors.
Return
- retval:
std::vector<Mat>
Python prototype (for reference):
getDescriptors() -> retval