classify_image_class_lutT_classify_image_class_lutClassifyImageClassLutClassifyImageClassLutclassify_image_class_lut (Operator)

Name

classify_image_class_lutT_classify_image_class_lutClassifyImageClassLutClassifyImageClassLutclassify_image_class_lut — Classify a byte image using a look-up table.

Signature

classify_image_class_lut(Image : ClassRegions : ClassLUTHandle : )

Herror T_classify_image_class_lut(const Hobject Image, Hobject* ClassRegions, const Htuple ClassLUTHandle)

void ClassifyImageClassLut(const HObject& Image, HObject* ClassRegions, const HTuple& ClassLUTHandle)

HRegion HImage::ClassifyImageClassLut(const HClassLUT& ClassLUTHandle) const

HRegion HClassLUT::ClassifyImageClassLut(const HImage& Image) const

static void HOperatorSet.ClassifyImageClassLut(HObject image, out HObject classRegions, HTuple classLUTHandle)

HRegion HImage.ClassifyImageClassLut(HClassLUT classLUTHandle)

HRegion HClassLUT.ClassifyImageClassLut(HImage image)

def classify_image_class_lut(image: HObject, class_luthandle: HHandle) -> HObject

Description

classify_image_class_lutclassify_image_class_lutClassifyImageClassLutClassifyImageClassLutClassifyImageClassLutclassify_image_class_lut performs a pixel classification on a multi-channel byte ImageImageImageImageimageimage using a look-up table (LUT) ClassLUTHandleClassLUTHandleClassLUTHandleClassLUTHandleclassLUTHandleclass_luthandle. The operator can replace classify_image_class_gmmclassify_image_class_gmmClassifyImageClassGmmClassifyImageClassGmmClassifyImageClassGmmclassify_image_class_gmm, classify_image_class_knnclassify_image_class_knnClassifyImageClassKnnClassifyImageClassKnnClassifyImageClassKnnclassify_image_class_knn, classify_image_class_mlpclassify_image_class_mlpClassifyImageClassMlpClassifyImageClassMlpClassifyImageClassMlpclassify_image_class_mlp and classify_image_class_svmclassify_image_class_svmClassifyImageClassSvmClassifyImageClassSvmClassifyImageClassSvmclassify_image_class_svm. 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_gmmCreateClassLutGmmCreateClassLutGmmCreateClassLutGmmcreate_class_lut_gmm, create_class_lut_knncreate_class_lut_knnCreateClassLutKnnCreateClassLutKnnCreateClassLutKnncreate_class_lut_knn, create_class_lut_mlpcreate_class_lut_mlpCreateClassLutMlpCreateClassLutMlpCreateClassLutMlpcreate_class_lut_mlp or create_class_lut_svmcreate_class_lut_svmCreateClassLutSvmCreateClassLutSvmCreateClassLutSvmcreate_class_lut_svm, respectively, before classify_image_class_lutclassify_image_class_lutClassifyImageClassLutClassifyImageClassLutClassifyImageClassLutclassify_image_class_lut can be used. For the classification the parameters in create_class_gmmcreate_class_gmmCreateClassGmmCreateClassGmmCreateClassGmmcreate_class_gmm, create_class_knncreate_class_knnCreateClassKnnCreateClassKnnCreateClassKnncreate_class_knn, create_class_mlpcreate_class_mlpCreateClassMlpCreateClassMlpCreateClassMlpcreate_class_mlp and create_class_svmcreate_class_svmCreateClassSvmCreateClassSvmCreateClassSvmcreate_class_svm, respectively, are important: The byte ImageImageImageImageimageimage must have the same number of channels as specified by NumInputNumInputNumInputNumInputnumInputnum_input, NumFeaturesNumFeaturesNumFeaturesNumFeaturesnumFeaturesnum_features or NumDimNumDimNumDimNumDimnumDimnum_dim, respectively. As result of the pixel classification classify_image_class_lutclassify_image_class_lutClassifyImageClassLutClassifyImageClassLutClassifyImageClassLutclassify_image_class_lut passes NumOutputNumOutputNumOutputNumOutputnumOutputnum_output or NumClassesNumClassesNumClassesNumClassesnumClassesnum_classes regions in ClassRegionsClassRegionsClassRegionsClassRegionsclassRegionsclass_regions, respectively

Execution Information

Parameters

ImageImageImageImageimageimage (input_object)  (multichannel-)image objectHImageHObjectHImageHobject (byte)

Input image.

ClassRegionsClassRegionsClassRegionsClassRegionsclassRegionsclass_regions (output_object)  region-array objectHRegionHObjectHRegionHobject *

Segmented classes.

ClassLUTHandleClassLUTHandleClassLUTHandleClassLUTHandleclassLUTHandleclass_luthandle (input_control)  class_lut HClassLUT, HTupleHHandleHTupleHtuple (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_lutClassifyImageClassLutClassifyImageClassLutClassifyImageClassLutclassify_image_class_lut returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Possible Predecessors

create_class_lut_gmmcreate_class_lut_gmmCreateClassLutGmmCreateClassLutGmmCreateClassLutGmmcreate_class_lut_gmm, create_class_lut_knncreate_class_lut_knnCreateClassLutKnnCreateClassLutKnnCreateClassLutKnncreate_class_lut_knn, create_class_lut_mlpcreate_class_lut_mlpCreateClassLutMlpCreateClassLutMlpCreateClassLutMlpcreate_class_lut_mlp, create_class_lut_svmcreate_class_lut_svmCreateClassLutSvmCreateClassLutSvmCreateClassLutSvmcreate_class_lut_svm

Alternatives

classify_image_class_gmmclassify_image_class_gmmClassifyImageClassGmmClassifyImageClassGmmClassifyImageClassGmmclassify_image_class_gmm, classify_image_class_knnclassify_image_class_knnClassifyImageClassKnnClassifyImageClassKnnClassifyImageClassKnnclassify_image_class_knn, classify_image_class_mlpclassify_image_class_mlpClassifyImageClassMlpClassifyImageClassMlpClassifyImageClassMlpclassify_image_class_mlp, classify_image_class_svmclassify_image_class_svmClassifyImageClassSvmClassifyImageClassSvmClassifyImageClassSvmclassify_image_class_svm

See also

create_class_lut_gmmcreate_class_lut_gmmCreateClassLutGmmCreateClassLutGmmCreateClassLutGmmcreate_class_lut_gmm, create_class_lut_knncreate_class_lut_knnCreateClassLutKnnCreateClassLutKnnCreateClassLutKnncreate_class_lut_knn, create_class_lut_mlpcreate_class_lut_mlpCreateClassLutMlpCreateClassLutMlpCreateClassLutMlpcreate_class_lut_mlp, create_class_lut_svmcreate_class_lut_svmCreateClassLutSvmCreateClassLutSvmCreateClassLutSvmcreate_class_lut_svm, create_class_lut_gmmcreate_class_lut_gmmCreateClassLutGmmCreateClassLutGmmCreateClassLutGmmcreate_class_lut_gmm

Module

Foundation