Skip to content

read_deep_ocrReadDeepOcrReadDeepOcrread_deep_ocrT_read_deep_ocr🔗

Short description🔗

read_deep_ocrReadDeepOcrReadDeepOcrread_deep_ocrT_read_deep_ocr — Read a Deep OCR model from a file.

Signature🔗

read_deep_ocr( filename.read FileName, out deep_ocr DeepOcrHandle )void ReadDeepOcr( const HTuple& FileName, HTuple* DeepOcrHandle )static void HOperatorSet.ReadDeepOcr( HTuple fileName, out HTuple deepOcrHandle )def read_deep_ocr( file_name: str ) -> HHandle

Herror T_read_deep_ocr( const Htuple FileName, Htuple* DeepOcrHandle )

void HDlModelOcr::HDlModelOcr( const HString& FileName )

void HDlModelOcr::HDlModelOcr( const char* FileName )

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

public HDlModelOcr( string fileName )

void HDlModelOcr::ReadDeepOcr( const HString& FileName )

void HDlModelOcr::ReadDeepOcr( const char* FileName )

void HDlModelOcr::ReadDeepOcr( const wchar_t* FileName ) (Windows only)

void HDlModelOcr.ReadDeepOcr( string fileName )

Description🔗

The operator read_deep_ocrReadDeepOcr reads a Deep OCR model. Such models have to be in the HALCON format. As a result, the handle DeepOcrHandledeepOcrHandledeep_ocr_handle is returned.

The model is loaded from the file FileNamefileNamefile_name. This file is thereby searched in the directory $HALCONROOT/dl/ as well as in the currently used directory. The default HALCON file extension for Deep OCR models is '.hdo'.

Please note that the values of runtime specific parameters are not written to file, see write_deep_ocrWriteDeepOcr. As a consequence when reading a model these parameters are initialized with their default value, see get_deep_ocr_paramGetDeepOcrParam.

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*)

Filename

File extension: .hdo

DeepOcrHandledeepOcrHandledeep_ocr_handle (output_control) deep_ocr → (handle)HTuple (HHandle)HDlModelOcr, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the Deep OCR model.

Result🔗

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

Combinations with other operators🔗

Combinations

Possible predecessors

create_deep_ocrCreateDeepOcr

Possible successors

set_deep_ocr_paramSetDeepOcrParam, get_deep_ocr_paramGetDeepOcrParam, apply_deep_ocrApplyDeepOcr

Alternatives

create_deep_ocrCreateDeepOcr

Module🔗

OCR/OCV