read_data_code_2d_model — 从文件中读取二维数据码模型并创建新模型。
read_data_code_2d_model( : : FileName : DataCodeHandle)
算子 read_data_code_2d_model reads the 2D data code
model file FileName and creates a new model that is an
identical copy of the saved model.
The parameter DataCodeHandle returns the handle of the new
model.
The model file FileName must be created by the operator
write_data_code_2d_model。The default HALCON file extension for the 2D data code model is 'dcm'.
For an explanation of the concept of the 2D data code reader see the introduction of chapter Identification / Data Code。
此算子返回一个句柄。请注意,即使该句柄被用作特定算子的输入参数,这些算子仍可能改变此句柄类型的实例状态。
FileName (输入控制) filename.read → (string)
Name of the 2D data code model file.
默认值: 'data_code_model.dcm'
File extension:
.dcm
DataCodeHandle (输出控制) datacode_2d → (handle)
Handle of the created 2D data code model.
* This example demonstrates how a model that was saved in an earlier
* session can be used again by reading the model file
* Create a model by reading by reading a data code model file
read_data_code_2d_model ('ecc200_trained_model.dcm', DataCodeHandle)
* Read a symbol image
read_image (Image, 'datacode/ecc200/ecc200_cpu_010')
* Read the symbol in the image
find_data_code_2d (Image, SymbolXLDs, DataCodeHandle, [], [], \
ResultHandles, DecodedDataStrings)
* Clear the model
clear_data_code_2d_model (DataCodeHandle)
算子 read_data_code_2d_model 返回值 2 (
H_MSG_TRUE)
if the named 2D data code file was found and correctly read.否则,将抛出异常。
write_data_code_2d_model,
clear_data_code_2d_model
数据码