Skip to content

read_class_knnReadClassKnnReadClassKnnread_class_knnT_read_class_knnπŸ”—

Short descriptionπŸ”—

read_class_knnReadClassKnnReadClassKnnread_class_knnT_read_class_knn β€” Read the k-NN classifier from a file.

SignatureπŸ”—

read_class_knn( filename.read FileName, out class_knn KNNHandle )void ReadClassKnn( const HTuple& FileName, HTuple* KNNHandle )static void HOperatorSet.ReadClassKnn( HTuple fileName, out HTuple KNNHandle )def read_class_knn( file_name: str ) -> HHandle

Herror T_read_class_knn( 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)

public HClassKnn( string fileName )

void HClassKnn::ReadClassKnn( const HString& FileName )

void HClassKnn::ReadClassKnn( const char* FileName )

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

void HClassKnn.ReadClassKnn( string fileName )

DescriptionπŸ”—

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

Execution informationπŸ”—

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 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πŸ”—

FileNamefileNamefile_name (input_control) filename.read β†’ (string)HTuple (HString)HTuple (string)strHtuple (char*)

File name of the classifier.

File extension: .gnc

KNNHandleKNNHandleknnhandle (output_control) class_knn β†’ (handle)HTuple (HHandle)HClassKnn, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the k-NN classifier.

ResultπŸ”—

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

Combinations with other operatorsπŸ”—

Combinations

Possible successors

classify_class_knnClassifyClassKnn

See also

create_class_knnCreateClassKnn

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