add_samples_image_class_gmmT_add_samples_image_class_gmmAddSamplesImageClassGmmAddSamplesImageClassGmmadd_samples_image_class_gmm (Operator)
Name
add_samples_image_class_gmmT_add_samples_image_class_gmmAddSamplesImageClassGmmAddSamplesImageClassGmmadd_samples_image_class_gmm
— Add training samples from an image to the training data of a
Gaussian Mixture Model.
Signature
Description
add_samples_image_class_gmmadd_samples_image_class_gmmAddSamplesImageClassGmmAddSamplesImageClassGmmAddSamplesImageClassGmmadd_samples_image_class_gmm
adds training samples from the
ImageImageImageImageimageimage
to the Gaussian Mixture Model (GMM) given by
GMMHandleGMMHandleGMMHandleGMMHandleGMMHandlegmmhandle
. add_samples_image_class_gmmadd_samples_image_class_gmmAddSamplesImageClassGmmAddSamplesImageClassGmmAddSamplesImageClassGmmadd_samples_image_class_gmm
is used to
store the training samples before a classifier to be used for the
pixel classification of multichannel images with
classify_image_class_gmmclassify_image_class_gmmClassifyImageClassGmmClassifyImageClassGmmClassifyImageClassGmmclassify_image_class_gmm
is trained.
add_samples_image_class_gmmadd_samples_image_class_gmmAddSamplesImageClassGmmAddSamplesImageClassGmmAddSamplesImageClassGmmadd_samples_image_class_gmm
works analogously to
add_sample_class_gmmadd_sample_class_gmmAddSampleClassGmmAddSampleClassGmmAddSampleClassGmmadd_sample_class_gmm
. The ImageImageImageImageimageimage
must have a number
of channels equal to NumDimNumDimNumDimNumDimnumDimnum_dim
, as specified with
create_class_gmmcreate_class_gmmCreateClassGmmCreateClassGmmCreateClassGmmcreate_class_gmm
. The training regions for the
NumClassesNumClassesNumClassesNumClassesnumClassesnum_classes
pixel classes are passed in
ClassRegionsClassRegionsClassRegionsClassRegionsclassRegionsclass_regions
. Hence, ClassRegionsClassRegionsClassRegionsClassRegionsclassRegionsclass_regions
must be a tuple
containing NumClassesNumClassesNumClassesNumClassesnumClassesnum_classes
regions. The order of the regions
in ClassRegionsClassRegionsClassRegionsClassRegionsclassRegionsclass_regions
determines the class of the pixels. If
there are no samples for a particular class in ImageImageImageImageimageimage
an
empty region must be passed at the position of the class in
ClassRegionsClassRegionsClassRegionsClassRegionsclassRegionsclass_regions
. With this mechanism it is possible to use
multiple images to add training samples for all relevant classes to
the GMM by calling add_samples_image_class_gmmadd_samples_image_class_gmmAddSamplesImageClassGmmAddSamplesImageClassGmmAddSamplesImageClassGmmadd_samples_image_class_gmm
multiple
times with the different images and suitably chosen regions. The
regions in ClassRegionsClassRegionsClassRegionsClassRegionsclassRegionsclass_regions
should contain representative
training samples for the respective classes. Hence, they need not
cover the entire image. The regions in ClassRegionsClassRegionsClassRegionsClassRegionsclassRegionsclass_regions
should
not overlap each other, because this would lead to the fact that in
the training data the samples from the overlapping areas would be
assigned to multiple classes, which may lead to a lower
classification performance. Image data of integer type can be
particularly badly suited for modeling with a
GMM. RandomizeRandomizeRandomizeRandomizerandomizerandomize
can be used to overcome this problem, as
explained in add_sample_class_gmmadd_sample_class_gmmAddSampleClassGmmAddSampleClassGmmAddSampleClassGmmadd_sample_class_gmm
.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
This operator modifies the state of the following input parameter:
During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.
Parameters
ImageImageImageImageimageimage
(input_object) (multichannel-)image →
objectHImageHObjectHImageHobject (byte / cyclic / direction / int1 / int2 / uint2 / int4 / real)
Training image.
ClassRegionsClassRegionsClassRegionsClassRegionsclassRegionsclass_regions
(input_object) region-array →
objectHRegionHObjectHRegionHobject
Regions of the classes to be trained.
GMMHandleGMMHandleGMMHandleGMMHandleGMMHandlegmmhandle
(input_control, state is modified) class_gmm →
HClassGmm, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
GMM handle.
RandomizeRandomizeRandomizeRandomizerandomizerandomize
(input_control) real →
HTuplefloatHTupleHtuple (real) (double) (double) (double)
Standard deviation of the Gaussian noise added
to the training data.
Default value: 0.0
Suggested values: 0.0, 1.5, 2.0
Restriction: Randomize >= 0.0
Result
If the parameters are valid, the operator
add_samples_image_class_gmmadd_samples_image_class_gmmAddSamplesImageClassGmmAddSamplesImageClassGmmAddSamplesImageClassGmmadd_samples_image_class_gmm
returns the value 2 (H_MSG_TRUE). If
necessary an exception is raised.
Possible Predecessors
create_class_gmmcreate_class_gmmCreateClassGmmCreateClassGmmCreateClassGmmcreate_class_gmm
Possible Successors
train_class_gmmtrain_class_gmmTrainClassGmmTrainClassGmmTrainClassGmmtrain_class_gmm
,
write_samples_class_gmmwrite_samples_class_gmmWriteSamplesClassGmmWriteSamplesClassGmmWriteSamplesClassGmmwrite_samples_class_gmm
Alternatives
read_samples_class_gmmread_samples_class_gmmReadSamplesClassGmmReadSamplesClassGmmReadSamplesClassGmmread_samples_class_gmm
See also
classify_image_class_gmmclassify_image_class_gmmClassifyImageClassGmmClassifyImageClassGmmClassifyImageClassGmmclassify_image_class_gmm
,
add_sample_class_gmmadd_sample_class_gmmAddSampleClassGmmAddSampleClassGmmAddSampleClassGmmadd_sample_class_gmm
,
clear_samples_class_gmmclear_samples_class_gmmClearSamplesClassGmmClearSamplesClassGmmClearSamplesClassGmmclear_samples_class_gmm
,
get_sample_num_class_gmmget_sample_num_class_gmmGetSampleNumClassGmmGetSampleNumClassGmmGetSampleNumClassGmmget_sample_num_class_gmm
,
get_sample_class_gmmget_sample_class_gmmGetSampleClassGmmGetSampleClassGmmGetSampleClassGmmget_sample_class_gmm
Module
Foundation