write_data_code_2d_model — 将二维数据码模型写入文件。
write_data_code_2d_model( : : DataCodeHandle, FileName : )
算子 write_data_code_2d_model writes a 2D data code
model, which was created by create_data_code_2d_model, into
a file with the name FileName.
This facilitates creating an identical copy of the saved model in a
later session with the operator read_data_code_2d_model。The default HALCON file extension for the 2D data code model is 'dcm'.
The handle of the model to write is passed in DataCodeHandle。
For an explanation of the concept of the 2D data code reader see the introduction of chapter Identification / Data Code。
DataCodeHandle (输入控制) datacode_2d → (handle)
Handle of the 2D data code model.
FileName (输入控制) filename.write → (string)
Name of the 2D data code model file.
默认值: 'data_code_model.dcm'
File extension:
.dcm
* This example demonstrates how a trained model can be saved for
* a future session
* Create a model for reading Data matrix ECC 200 codes
create_data_code_2d_model ('Data Matrix ECC 200', [], [], DataCodeHandle)
* Read a training image
read_image (Image, 'datacode/ecc200/ecc200_cpu_007')
* Train the model with the symbol in the image
find_data_code_2d (Image, SymbolXLDs, DataCodeHandle, 'train', 'all', \
ResultHandles, DecodedDataStrings)
* Write the model into a file
write_data_code_2d_model (DataCodeHandle, 'ecc200_trained_model.dcm')
* Clear the model
clear_data_code_2d_model (DataCodeHandle)
算子 write_data_code_2d_model 返回值 2 (
H_MSG_TRUE)
if the passed handle is valid and if the model can be written into
the named file.否则,将抛出异常。
set_data_code_2d_param,
find_data_code_2d
create_data_code_2d_model,
set_data_code_2d_param,
find_data_code_2d
数据码