write_ocr_class_knnT_write_ocr_class_knnWriteOcrClassKnnWriteOcrClassKnnwrite_ocr_class_knn (Operator)

Name

write_ocr_class_knnT_write_ocr_class_knnWriteOcrClassKnnWriteOcrClassKnnwrite_ocr_class_knn — Write a k-NN classifier for an OCR task to a file.

Signature

write_ocr_class_knn( : : OCRHandle, FileName : )

Herror T_write_ocr_class_knn(const Htuple OCRHandle, const Htuple FileName)

void WriteOcrClassKnn(const HTuple& OCRHandle, const HTuple& FileName)

void HOCRKnn::WriteOcrClassKnn(const HString& FileName) const

void HOCRKnn::WriteOcrClassKnn(const char* FileName) const

void HOCRKnn::WriteOcrClassKnn(const wchar_t* FileName) const   (Windows only)

static void HOperatorSet.WriteOcrClassKnn(HTuple OCRHandle, HTuple fileName)

void HOCRKnn.WriteOcrClassKnn(string fileName)

def write_ocr_class_knn(ocrhandle: HHandle, file_name: str) -> None

Description

write_ocr_class_knnwrite_ocr_class_knnWriteOcrClassKnnWriteOcrClassKnnWriteOcrClassKnnwrite_ocr_class_knn writes the k-NN classifier for an OCR task with the OCRHandleOCRHandleOCRHandleOCRHandleOCRHandleocrhandle to the file given by FileNameFileNameFileNameFileNamefileNamefile_name. If a file extension is not specified in FileNameFileNameFileNameFileNamefileNamefile_name the default extension '.onc'".onc"".onc"".onc"".onc"".onc" is appended to FileNameFileNameFileNameFileNamefileNamefile_name. write_ocr_class_knnwrite_ocr_class_knnWriteOcrClassKnnWriteOcrClassKnnWriteOcrClassKnnwrite_ocr_class_knn is typically called after the classifier has been trained with trainf_ocr_class_knntrainf_ocr_class_knnTrainfOcrClassKnnTrainfOcrClassKnnTrainfOcrClassKnntrainf_ocr_class_knn. The classifier can be read with read_ocr_class_knnread_ocr_class_knnReadOcrClassKnnReadOcrClassKnnReadOcrClassKnnread_ocr_class_knn.

Execution Information

Parameters

OCRHandleOCRHandleOCRHandleOCRHandleOCRHandleocrhandle (input_control)  ocr_knn HOCRKnn, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the k-NN classifier for an OCR task.

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

File name.

File extension: .onc

Result

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

Possible Predecessors

trainf_ocr_class_knntrainf_ocr_class_knnTrainfOcrClassKnnTrainfOcrClassKnnTrainfOcrClassKnntrainf_ocr_class_knn, read_ocr_class_knnread_ocr_class_knnReadOcrClassKnnReadOcrClassKnnReadOcrClassKnnread_ocr_class_knn

See also

create_class_knncreate_class_knnCreateClassKnnCreateClassKnnCreateClassKnncreate_class_knn, read_ocr_class_knnread_ocr_class_knnReadOcrClassKnnReadOcrClassKnnReadOcrClassKnnread_ocr_class_knn

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

OCR/OCV