get_sample_class_gmm — Return a training sample from the training data of a Gaussian
Mixture Models (GMM).
get_sample_class_gmm reads out a training sample from the
Gaussian Mixture Model (GMM) given by
GMMHandle that was
add_samples_image_class_gmm. The index of the sample is
NumSample. The index is counted from 0,
NumSample must be a number between 0 and
NumSamples - 1, where
NumSamples can be
get_sample_num_class_gmm. The training
sample is returned in
Features is a feature vector of length
ClassID is its class (see
get_sample_class_gmm can, for example, be used to reclassify
the training data with
classify_class_gmm in order to
determine which training samples, if any, are classified
Index of the stored training sample.
Feature vector of the training sample.
Class of the training sample.
create_class_gmm (2, 2, [1,10], 'spherical', 'none', 2, 42, GMMHandle) read_samples_class_gmm (GMMHandle, 'samples.gsf') train_class_gmm (GMMHandle, 100, 1e-4, 'training', 1e-4, Centers, Iter) * Reclassify the training samples get_sample_num_class_gmm (GMMHandle, NumSamples) for I := 0 to NumSamples-1 by 1 get_sample_class_gmm (GMMHandle, I, Features, Class) classify_class_gmm (GMMHandle, Features, 2, ClassID, ClassProb,\ Density, KSigmaProb) if (not (Class == ClassProb)) * classified incorrectly endif endfor
If the parameters are valid, the operator
get_sample_class_gmm returns the value TRUE. If necessary
an exception is raised.