classify_image_class_lutT_classify_image_class_lutClassifyImageClassLutClassifyImageClassLut (Operator)
Name
classify_image_class_lutT_classify_image_class_lutClassifyImageClassLutClassifyImageClassLut
— Classify a byte image using a look-up table.
Signature
Description
classify_image_class_lutclassify_image_class_lutClassifyImageClassLutClassifyImageClassLutClassifyImageClassLut
performs a pixel classification on a
multi-channel byte ImageImageImageImageimage
using a look-up table (LUT)
ClassLUTHandleClassLUTHandleClassLUTHandleClassLUTHandleclassLUTHandle
. The operator can replace
classify_image_class_gmmclassify_image_class_gmmClassifyImageClassGmmClassifyImageClassGmmClassifyImageClassGmm
, classify_image_class_knnclassify_image_class_knnClassifyImageClassKnnClassifyImageClassKnnClassifyImageClassKnn
,
classify_image_class_mlpclassify_image_class_mlpClassifyImageClassMlpClassifyImageClassMlpClassifyImageClassMlp
and classify_image_class_svmclassify_image_class_svmClassifyImageClassSvmClassifyImageClassSvmClassifyImageClassSvm
.
The classification gets a major speed-up,
because the estimation of the class in every image point is no longer
necessary since every possible response of the GMM, KNN, MLP or SVM,
respectively, is stored in the LUT. This LUT classifier must be created
with the trained classifier in create_class_lut_gmmcreate_class_lut_gmmCreateClassLutGmmCreateClassLutGmmCreateClassLutGmm
,
create_class_lut_knncreate_class_lut_knnCreateClassLutKnnCreateClassLutKnnCreateClassLutKnn
, create_class_lut_mlpcreate_class_lut_mlpCreateClassLutMlpCreateClassLutMlpCreateClassLutMlp
or
create_class_lut_svmcreate_class_lut_svmCreateClassLutSvmCreateClassLutSvmCreateClassLutSvm
, respectively, before
classify_image_class_lutclassify_image_class_lutClassifyImageClassLutClassifyImageClassLutClassifyImageClassLut
can be used. For the classification the
parameters in create_class_gmmcreate_class_gmmCreateClassGmmCreateClassGmmCreateClassGmm
, create_class_knncreate_class_knnCreateClassKnnCreateClassKnnCreateClassKnn
,
create_class_mlpcreate_class_mlpCreateClassMlpCreateClassMlpCreateClassMlp
and create_class_svmcreate_class_svmCreateClassSvmCreateClassSvmCreateClassSvm
, respectively,
are important: The byte ImageImageImageImageimage
must have the same number of channels
as specified by NumInput
, NumFeatures
or NumDim
,
respectively. As result of the pixel classification
classify_image_class_lutclassify_image_class_lutClassifyImageClassLutClassifyImageClassLutClassifyImageClassLut
passes NumOutput
or
NumClasses
regions in ClassRegionsClassRegionsClassRegionsClassRegionsclassRegions
, respectively
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on internal data level.
Parameters
ImageImageImageImageimage
(input_object) (multichannel-)image →
objectHImageHImageHobject (byte)
Input image.
ClassRegionsClassRegionsClassRegionsClassRegionsclassRegions
(output_object) region-array →
objectHRegionHRegionHobject *
Segmented classes.
ClassLUTHandleClassLUTHandleClassLUTHandleClassLUTHandleclassLUTHandle
(input_control) class_lut →
HClassLUT, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the LUT classifier.
Example (HDevelop)
read_image (Image, 'patras')
gen_rectangle1 (Sea, 10, 10, 120, 270)
gen_rectangle2 (Deck, [170,400], [350,375], [-0.56192,-0.75139], \
[64,104], [26,11])
union1 (Deck, Deck)
gen_rectangle1 (Walls, 355, 623, 420, 702)
gen_rectangle2 (Chimney, 286, 623, -0.56192, 64, 33)
concat_obj (Sea, Deck, Classes)
concat_obj (Classes, Walls, Classes)
concat_obj (Classes, Chimney, Classes)
*
* create MLP classifier and train it with sample classes
create_class_mlp (3, 3, 4, 'softmax', 'principal_components', 3, \
42, MLPHandle)
add_samples_image_class_mlp (Image, Classes, MLPHandle)
train_class_mlp (MLPHandle, 200, 1, 0.01, Error, ErrorLog)
*
* create the LUT classifier
create_class_lut_mlp (MLPHandle, [], [], ClassLUTHandle)
*
* classify the image with the LUT
classify_image_class_lut (Image, ClassRegions, ClassLUTHandle)
Result
If the parameters are valid, the operator
classify_image_class_lutclassify_image_class_lutClassifyImageClassLutClassifyImageClassLutClassifyImageClassLut
returns the value 2 (H_MSG_TRUE). If
necessary an exception is raised.
Possible Predecessors
create_class_lut_gmmcreate_class_lut_gmmCreateClassLutGmmCreateClassLutGmmCreateClassLutGmm
,
create_class_lut_knncreate_class_lut_knnCreateClassLutKnnCreateClassLutKnnCreateClassLutKnn
,
create_class_lut_mlpcreate_class_lut_mlpCreateClassLutMlpCreateClassLutMlpCreateClassLutMlp
,
create_class_lut_svmcreate_class_lut_svmCreateClassLutSvmCreateClassLutSvmCreateClassLutSvm
Alternatives
classify_image_class_gmmclassify_image_class_gmmClassifyImageClassGmmClassifyImageClassGmmClassifyImageClassGmm
,
classify_image_class_knnclassify_image_class_knnClassifyImageClassKnnClassifyImageClassKnnClassifyImageClassKnn
,
classify_image_class_mlpclassify_image_class_mlpClassifyImageClassMlpClassifyImageClassMlpClassifyImageClassMlp
,
classify_image_class_svmclassify_image_class_svmClassifyImageClassSvmClassifyImageClassSvmClassifyImageClassSvm
See also
create_class_lut_gmmcreate_class_lut_gmmCreateClassLutGmmCreateClassLutGmmCreateClassLutGmm
,
create_class_lut_knncreate_class_lut_knnCreateClassLutKnnCreateClassLutKnnCreateClassLutKnn
,
create_class_lut_mlpcreate_class_lut_mlpCreateClassLutMlpCreateClassLutMlpCreateClassLutMlp
,
create_class_lut_svmcreate_class_lut_svmCreateClassLutSvmCreateClassLutSvmCreateClassLutSvm
,
create_class_lut_gmmcreate_class_lut_gmmCreateClassLutGmmCreateClassLutGmmCreateClassLutGmm
Module
Foundation