read_class_knnT_read_class_knnReadClassKnnReadClassKnn (Operator)

Name

read_class_knnT_read_class_knnReadClassKnnReadClassKnn — Read the k-NN classifier from a file.

Signature

read_class_knn( : : FileName : KNNHandle)

Herror T_read_class_knn(const Htuple FileName, Htuple* KNNHandle)

void ReadClassKnn(const HTuple& FileName, HTuple* KNNHandle)

void HClassKnn::HClassKnn(const HString& FileName)

void HClassKnn::HClassKnn(const char* FileName)

void HClassKnn::HClassKnn(const wchar_t* FileName)   (Windows only)

void HClassKnn::ReadClassKnn(const HString& FileName)

void HClassKnn::ReadClassKnn(const char* FileName)

void HClassKnn::ReadClassKnn(const wchar_t* FileName)   (Windows only)

static void HOperatorSet.ReadClassKnn(HTuple fileName, out HTuple KNNHandle)

public HClassKnn(string fileName)

void HClassKnn.ReadClassKnn(string fileName)

Description

read_class_knnread_class_knnReadClassKnnReadClassKnnReadClassKnn reads the saved classifier from the file FileNameFileNameFileNameFileNamefileName (see write_class_knnwrite_class_knnWriteClassKnnWriteClassKnnWriteClassKnn). The values of the current classifier are overwritten. The default HALCON file extension for the k-NN classifier is 'gnc'.

Execution Information

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters

FileNameFileNameFileNameFileNamefileName (input_control)  filename.read HTupleHTupleHtuple (string) (string) (HString) (char*)

File name of the classifier.

File extension: .gnc

KNNHandleKNNHandleKNNHandleKNNHandleKNNHandle (output_control)  class_knn HClassKnn, HTupleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the k-NN classifier.

Result

read_class_knnread_class_knnReadClassKnnReadClassKnnReadClassKnn returns 2 (H_MSG_TRUE). An exception is raised if it was not possible to open the file FileNameFileNameFileNameFileNamefileName or the file has the wrong format.

Possible Successors

classify_class_knnclassify_class_knnClassifyClassKnnClassifyClassKnnClassifyClassKnn

See also

create_class_knncreate_class_knnCreateClassKnnCreateClassKnnCreateClassKnn

References

Marius Muja, David G. Lowe: “Fast Approximate Nearest Neighbors with Automatic Algorithm Configuration”; International Conference on Computer Vision Theory and Applications (VISAPP 09); 2009.

Module

Foundation