Skip to content

read_class_svmReadClassSvmReadClassSvmread_class_svmT_read_class_svm🔗

Short description🔗

read_class_svmReadClassSvmReadClassSvmread_class_svmT_read_class_svm — Read a support vector machine from a file.

Signature🔗

read_class_svm( filename.read FileName, out class_svm SVMHandle )void ReadClassSvm( const HTuple& FileName, HTuple* SVMHandle )static void HOperatorSet.ReadClassSvm( HTuple fileName, out HTuple SVMHandle )def read_class_svm( file_name: str ) -> HHandle

Herror T_read_class_svm( const Htuple FileName, Htuple* SVMHandle )

void HClassSvm::HClassSvm( const HString& FileName )

void HClassSvm::HClassSvm( const char* FileName )

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

public HClassSvm( string fileName )

void HClassSvm::ReadClassSvm( const HString& FileName )

void HClassSvm::ReadClassSvm( const char* FileName )

void HClassSvm::ReadClassSvm( const wchar_t* FileName ) (Windows only)

void HClassSvm.ReadClassSvm( string fileName )

Description🔗

read_class_svmReadClassSvm reads a support vector machine (SVM) that has been stored with write_class_svmWriteClassSvm. Since the training of an SVM can consume a relatively long time, the SVM is typically trained in an offline process and written to a file with write_class_svmWriteClassSvm. In the online process the SVM is read with read_class_svmReadClassSvm and subsequently used for classification with classify_class_svmClassifyClassSvm. The default HALCON file extension for the SVM classifier is 'gsc'.

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.

File extension: .gsc

SVMHandleSVMHandlesvmhandle (output_control) class_svm → (handle)HTuple (HHandle)HClassSvm, HTuple (IntPtr)HHandleHtuple (handle)

SVM handle.

Result🔗

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

Combinations with other operators🔗

Combinations

Possible successors

classify_class_svmClassifyClassSvm, create_class_lut_svmCreateClassLutSvm

Alternatives

read_dl_modelReadDlModel

See also

create_class_svmCreateClassSvm, write_class_svmWriteClassSvm

Module🔗

Foundation