Operator Reference

write_class_boxT_write_class_boxWriteClassBoxWriteClassBoxwrite_class_box (Operator)

write_class_boxT_write_class_boxWriteClassBoxWriteClassBoxwrite_class_box — Save a classifier in a file.

Warning

write_class_boxwrite_class_boxWriteClassBoxWriteClassBoxwrite_class_box is obsolete and is only provided for reasons of backward compatibility. New applications should use the MLP, SVM, KNN or GMM operators instead. The operator will be removed with HALCON 25.11.

Signature

write_class_box( : : ClassifHandle, FileName : )

Herror T_write_class_box(const Htuple ClassifHandle, const Htuple FileName)

void WriteClassBox(const HTuple& ClassifHandle, const HTuple& FileName)

void HClassBox::WriteClassBox(const HString& FileName) const

void HClassBox::WriteClassBox(const char* FileName) const

void HClassBox::WriteClassBox(const wchar_t* FileName) const   ( Windows only)

static void HOperatorSet.WriteClassBox(HTuple classifHandle, HTuple fileName)

void HClassBox.WriteClassBox(string fileName)

def write_class_box(classif_handle: HHandle, file_name: str) -> None

Description

write_class_boxwrite_class_boxWriteClassBoxWriteClassBoxwrite_class_box writes the classifier ClassifHandleClassifHandleClassifHandleclassifHandleclassif_handle to the file given by FileNameFileNameFileNamefileNamefile_name. The classifier can be read with read_class_boxread_class_boxReadClassBoxReadClassBoxread_class_box. The default HALCON file extension for the box classifier is 'gbc'.

Attention

If a file with this name exists, it is overwritten without a warning. The file can not be edited.

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

Parameters

ClassifHandleClassifHandleClassifHandleclassifHandleclassif_handle (input_control)  class_box HClassBox, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the classifier.

FileNameFileNameFileNamefileNamefile_name (input_control)  filename.write HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Name of the file which contains the written data.

File extension: .gbc

Result

write_class_boxwrite_class_boxWriteClassBoxWriteClassBoxwrite_class_box returns 2 ( H_MSG_TRUE) . An exception is raised if it was not possible to open file FileNameFileNameFileNamefileNamefile_name.

Possible Predecessors

create_class_boxcreate_class_boxCreateClassBoxCreateClassBoxcreate_class_box, enquire_class_boxenquire_class_boxEnquireClassBoxEnquireClassBoxenquire_class_box, learn_class_boxlearn_class_boxLearnClassBoxLearnClassBoxlearn_class_box, test_sampset_boxtest_sampset_boxTestSampsetBoxTestSampsetBoxtest_sampset_box

Possible Successors

close_class_boxclose_class_boxCloseClassBoxCloseClassBoxclose_class_box, clear_sampsetclear_sampsetClearSampsetClearSampsetclear_sampset

See also

create_class_boxcreate_class_boxCreateClassBoxCreateClassBoxcreate_class_box, read_class_boxread_class_boxReadClassBoxReadClassBoxread_class_box

Module

Foundation