ClassesClassesClassesClasses | | | | Operators

create_class_lut_gmmT_create_class_lut_gmmCreateClassLutGmmcreate_class_lut_gmmCreateClassLutGmmCreateClassLutGmm (Operator)

Name

create_class_lut_gmmT_create_class_lut_gmmCreateClassLutGmmcreate_class_lut_gmmCreateClassLutGmmCreateClassLutGmm — Create a look-up table using a gaussian mixture model to classify byte images.

Signature

create_class_lut_gmm( : : GMMHandle, GenParamNames, GenParamValues : ClassLUTHandle)

Herror T_create_class_lut_gmm(const Htuple GMMHandle, const Htuple GenParamNames, const Htuple GenParamValues, Htuple* ClassLUTHandle)

Herror create_class_lut_gmm(const HTuple& GMMHandle, const HTuple& GenParamNames, const HTuple& GenParamValues, Hlong* ClassLUTHandle)

HClassLUT HClassGmm::CreateClassLutGmm(const HTuple& GenParamNames, const HTuple& GenParamValues) const

void HClassLUT::CreateClassLutGmm(const HClassGmm& GMMHandle, const HTuple& GenParamNames, const HTuple& GenParamValues)

void CreateClassLutGmm(const HTuple& GMMHandle, const HTuple& GenParamNames, const HTuple& GenParamValues, HTuple* ClassLUTHandle)

HClassLUT HClassGmm::CreateClassLutGmm(const HTuple& GenParamNames, const HTuple& GenParamValues) const

void HClassLUT::HClassLUT(const HClassGmm& GMMHandle, const HTuple& GenParamNames, const HTuple& GenParamValues)

void HClassLUT::CreateClassLutGmm(const HClassGmm& GMMHandle, const HTuple& GenParamNames, const HTuple& GenParamValues)

void HOperatorSetX.CreateClassLutGmm(
[in] VARIANT GMMHandle, [in] VARIANT GenParamNames, [in] VARIANT GenParamValues, [out] VARIANT* ClassLUTHandle)

IHClassLUTX* HClassGmmX.CreateClassLutGmm(
[in] VARIANT GenParamNames, [in] VARIANT GenParamValues)

void HClassLUTX.CreateClassLutGmm(
[in] IHClassGmmX* GMMHandle, [in] VARIANT GenParamNames, [in] VARIANT GenParamValues)

static void HOperatorSet.CreateClassLutGmm(HTuple GMMHandle, HTuple genParamNames, HTuple genParamValues, out HTuple classLUTHandle)

HClassLUT HClassGmm.CreateClassLutGmm(HTuple genParamNames, HTuple genParamValues)

public HClassLUT(HClassGmm GMMHandle, HTuple genParamNames, HTuple genParamValues)

void HClassLUT.CreateClassLutGmm(HClassGmm GMMHandle, HTuple genParamNames, HTuple genParamValues)

Description

create_class_lut_gmmcreate_class_lut_gmmCreateClassLutGmmcreate_class_lut_gmmCreateClassLutGmmCreateClassLutGmm generates a look-up table (LUT) ClassLUTHandleClassLUTHandleClassLUTHandleClassLUTHandleClassLUTHandleclassLUTHandle using the data of a trained gaussian mixture model (GMM) GMMHandleGMMHandleGMMHandleGMMHandleGMMHandleGMMHandle to classify multi-channel byte images. By using this GMM-based LUT classifier the operator classify_image_class_gmmclassify_image_class_gmmClassifyImageClassGmmclassify_image_class_gmmClassifyImageClassGmmClassifyImageClassGmm of the subsequent classification can be replaced by the operator classify_image_class_lutclassify_image_class_lutClassifyImageClassLutclassify_image_class_lutClassifyImageClassLutClassifyImageClassLut. 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 is stored in the LUT. For the generation of the LUT, the parameters NumDim, Preprocessing, and NumComponents defined in the earlier called operator create_class_gmmcreate_class_gmmCreateClassGmmcreate_class_gmmCreateClassGmmCreateClassGmm are important. In NumDim, the number of image channels the images must have to be classified is defined. By using the Preprocessing (see create_class_gmmcreate_class_gmmCreateClassGmmcreate_class_gmmCreateClassGmmCreateClassGmm) the number of image channels can be transformed to NumComponents. NumComponents defines the length of the feature vector, which the classifier classify_class_gmmclassify_class_gmmClassifyClassGmmclassify_class_gmmClassifyClassGmmClassifyClassGmm handles internally. Because of performance and disk space, the LUT is restricted to be maximal 3-dimensional. Since it replaces the operator classify_class_gmmclassify_class_gmmClassifyClassGmmclassify_class_gmmClassifyClassGmmClassifyClassGmm, NumComponents <= 3 must hold. If there is no preprocessing that reduces the number of image channels (NumDim = NumComponents), all possible pixel values, which can occur in a byte image, are classified with classify_class_gmmclassify_class_gmmClassifyClassGmmclassify_class_gmmClassifyClassGmmClassifyClassGmm. The returned classes are stored in the LUT. If there is a preprocessing that reduces the number of image channels (NumDim > NumComponents), the preprocessing parameters of the GMM are stored in a separate structure of the LUT. To create the LUT, all transformed pixel values are classified with classify_class_gmmclassify_class_gmmClassifyClassGmmclassify_class_gmmClassifyClassGmmClassifyClassGmm. The returned classes are stored in the LUT. Because of the discretization of the LUT, the accuracy of the LUT classifier could become lower than the accuracy of classify_image_class_gmmclassify_image_class_gmmClassifyImageClassGmmclassify_image_class_gmmClassifyImageClassGmmClassifyImageClassGmm. With 'bit_depth'"bit_depth""bit_depth""bit_depth""bit_depth""bit_depth" and 'class_selection'"class_selection""class_selection""class_selection""class_selection""class_selection" the accuracy of the classification, the required storage, and the runtime needed to create the LUT can be controlled.

The following parameters of the GMM-based LUT classifier can be set with GenParamNamesGenParamNamesGenParamNamesGenParamNamesGenParamNamesgenParamNames and GenParamValuesGenParamValuesGenParamValuesGenParamValuesGenParamValuesgenParamValues:

'bit_depth'"bit_depth""bit_depth""bit_depth""bit_depth""bit_depth":

Number of bits used from the pixels. It controls the storage requirement of the LUT classifier and is bounded by the bit depth of the image ('bit_depth'"bit_depth""bit_depth""bit_depth""bit_depth""bit_depth" <= 8). If the bit depth of the LUT is smaller ('bit_depth'"bit_depth""bit_depth""bit_depth""bit_depth""bit_depth" < 8), the classes of multiple pixel combinations will be mapped to the same LUT entry, which can result in a lower accuracy for the classification. One of these clusters contains 2^(NumComponents*(8-bit_depth)) pixel combinations, where NumComponents denotes the dimension of the LUT, which is specified in create_class_gmmcreate_class_gmmCreateClassGmmcreate_class_gmmCreateClassGmmCreateClassGmm. For example, for 'bit_depth'"bit_depth""bit_depth""bit_depth""bit_depth""bit_depth" = 7, NumComponents = 3, the classes of 8 pixel combinations are mapped in the same LUT entry. The LUT requires at most 2^(NumComponents*bit_depth+2) bytes of storage. For example, for NumComponents = 3, 'bit_depth'"bit_depth""bit_depth""bit_depth""bit_depth""bit_depth" = 8 and NumClasses < 16 (specified in create_class_gmmcreate_class_gmmCreateClassGmmcreate_class_gmmCreateClassGmmCreateClassGmm), the LUT requires 8 MB of storage with internal storage optimization. If NumClasses = 1, the LUT requires only 2 MB of storage by using the full bit depth of the LUT. The runtime for the classification in classify_image_class_lutclassify_image_class_lutClassifyImageClassLutclassify_image_class_lutClassifyImageClassLutClassifyImageClassLut becomes minimal if the LUT fits into the cache. The default value is 8, typical values are [6,7,8]. Restrictions: 'bit_depth'"bit_depth""bit_depth""bit_depth""bit_depth""bit_depth" >= 1, 'bit_depth'"bit_depth""bit_depth""bit_depth""bit_depth""bit_depth" <= 8.

'class_selection'"class_selection""class_selection""class_selection""class_selection""class_selection":

Method for the class selection for the LUT. Can be modified to control the accuracy and the runtime needed to create the LUT classifier. The value in 'class_selection'"class_selection""class_selection""class_selection""class_selection""class_selection" is ignored if the bit depth of the LUT is maximal, thus 'bit_depth'"bit_depth""bit_depth""bit_depth""bit_depth""bit_depth" = 8 holds. If the bit depth of the LUT is smaller ('bit_depth'"bit_depth""bit_depth""bit_depth""bit_depth""bit_depth" < 8), the classes of multiple pixel combinations will be mapped to the same LUT entry. One of these clusters contains 2^(NumComponents*(8-bit_depth)) pixel combinations, where NumComponents denotes the dimension of the LUT, which is specified in create_class_gmmcreate_class_gmmCreateClassGmmcreate_class_gmmCreateClassGmmCreateClassGmm. By choosing 'class_selection'"class_selection""class_selection""class_selection""class_selection""class_selection" = 'best'"best""best""best""best""best", the class that appears most often in the cluster is stored in the LUT. For 'class_selection'"class_selection""class_selection""class_selection""class_selection""class_selection" = 'fast'"fast""fast""fast""fast""fast", only one pixel of the cluster, i.e., the pixel with the smallest value (component-wise), is classified. The returned class is stored in the LUT. In this case, the accuracy of the subsequent classification could become lower. On the other hand, the runtime needed to create the LUT can be reduced, which is proportional to the maximal needed storage of the LUT, which is defined with 2^(NumComponents*bit_depth+2). The default value is 'fast'"fast""fast""fast""fast""fast", possible values are ['fast'"fast""fast""fast""fast""fast", 'best'"best""best""best""best""best"].

'rejection_threshold'"rejection_threshold""rejection_threshold""rejection_threshold""rejection_threshold""rejection_threshold":

Threshold for the rejection of uncertain classified points of the GMM. The parameter represents a threshold on the K-sigma probability measure returned by the classification (see classify_class_gmmclassify_class_gmmClassifyClassGmmclassify_class_gmmClassifyClassGmmClassifyClassGmm and evaluate_class_gmmevaluate_class_gmmEvaluateClassGmmevaluate_class_gmmEvaluateClassGmmEvaluateClassGmm). All pixels having a probability below 'rejection_threshold'"rejection_threshold""rejection_threshold""rejection_threshold""rejection_threshold""rejection_threshold" are not assigned to any class. The default value is 0.0001. Restriction: 'rejection_threshold'"rejection_threshold""rejection_threshold""rejection_threshold""rejection_threshold""rejection_threshold" >= 0, 'rejection_threshold'"rejection_threshold""rejection_threshold""rejection_threshold""rejection_threshold""rejection_threshold" <= 1.

Parallelization

Parameters

GMMHandleGMMHandleGMMHandleGMMHandleGMMHandleGMMHandle (input_control)  class_gmm HClassGmm, HTupleHTupleHClassGmm, HTupleHClassGmmX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

GMM handle.

GenParamNamesGenParamNamesGenParamNamesGenParamNamesGenParamNamesgenParamNames (input_control)  attribute.name-array HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Names of the generic parameters that can be adjusted for the LUT classifier creation.

Default value: []

Suggested values: 'bit_depth'"bit_depth""bit_depth""bit_depth""bit_depth""bit_depth", 'class_selection'"class_selection""class_selection""class_selection""class_selection""class_selection", 'rejection_threshold'"rejection_threshold""rejection_threshold""rejection_threshold""rejection_threshold""rejection_threshold"

GenParamValuesGenParamValuesGenParamValuesGenParamValuesGenParamValuesgenParamValues (input_control)  attribute.value-array HTupleHTupleHTupleVARIANTHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)

Values of the generic parameters that can be adjusted for the LUT classifier creation.

Default value: []

Suggested values: 8, 7, 6, 'fast'"fast""fast""fast""fast""fast", 'best'"best""best""best""best""best"

ClassLUTHandleClassLUTHandleClassLUTHandleClassLUTHandleClassLUTHandleclassLUTHandle (output_control)  class_lut HClassLUT, HTupleHTupleHClassLUT, HTupleHClassLUTX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the LUT classifier.

Result

If the parameters are valid, the operator create_class_lut_gmmcreate_class_lut_gmmCreateClassLutGmmcreate_class_lut_gmmCreateClassLutGmmCreateClassLutGmm returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Possible Predecessors

train_class_gmmtrain_class_gmmTrainClassGmmtrain_class_gmmTrainClassGmmTrainClassGmm, read_class_gmmread_class_gmmReadClassGmmread_class_gmmReadClassGmmReadClassGmm

Possible Successors

classify_image_class_lutclassify_image_class_lutClassifyImageClassLutclassify_image_class_lutClassifyImageClassLutClassifyImageClassLut

Alternatives

create_class_lut_knncreate_class_lut_knnCreateClassLutKnncreate_class_lut_knnCreateClassLutKnnCreateClassLutKnn, create_class_lut_mlpcreate_class_lut_mlpCreateClassLutMlpcreate_class_lut_mlpCreateClassLutMlpCreateClassLutMlp, create_class_lut_svmcreate_class_lut_svmCreateClassLutSvmcreate_class_lut_svmCreateClassLutSvmCreateClassLutSvm

See also

classify_image_class_lutclassify_image_class_lutClassifyImageClassLutclassify_image_class_lutClassifyImageClassLutClassifyImageClassLut, clear_class_lutclear_class_lutClearClassLutclear_class_lutClearClassLutClearClassLut

Module

Foundation


ClassesClassesClassesClasses | | | | Operators