Learning a Matrix Code¶
Warning
This library is deprecated, use EasyMatrixCode2 instead.
To search for specific features and speed up your processing, learn a Matrix code model.
Workflow¶
EasyMatrixCode learn workflow.¶
Load the image of the matrix code you want to learn.
Learn the model:
Use the
EMatrixCodeReader::Learn.NET Python method withEMatrixCode::GetContrast.NET Python,EMatrixCode::GetFamily.NET Python,EMatrixCode::GetFlipping.NET Python,EMatrixCode::GetLogicalSize.NET Python parameters.If you need to learn several matrix codes, use
EMatrixCodeReader::LearnMore.NET Python and pass additional sample images.Call
EMatrixCodeReader::Learn.NET Python to replaceEMatrixCodeReader.NET Python parameters (callingEMatrixCodeReader::Learn.NET Python several times does not accumulate results, whileEMatrixCodeReader::LearnMore.NET Python does).
Tune
ESearchParamsType.NET Python to be efficient and either:Read only matrix codes that match a sample matrix code,
Or read only matrix codes that have the same properties (
EMatrixCode::GetContrast.NET Python,EMatrixCode::GetFamily.NET Python,EMatrixCode::GetFlipping.NET Python,EMatrixCode::GetLogicalSize.NET Python) as the learned one,Or disregard a search parameter of the learned matrix code
EMatrixCodeReader::SetLearnMaskElement.NET Python, for example to read only unflipped matrix codes. Just remove the default parameters, then add new ones.
Ask
EMatrixCodeReader.NET Python to decode the supplied image.Display the decoded string using
EMatrixCode::GetDecodedString.NET Python.Save the state of the reader object using
EMatrixCodeReader::Save.NET Python.
Restoring the state of an EMatrixCodeReader¶
To restore the state of an EMatrixCodeReader .NET Python and use it to read a matrix code:
Restore the reader state from the given file using
EMatrixCodeReader::Load.NET Python.Use
EMatrixCodeReader::Read.NET Python to read the image.Display the decoded string using
EMatrixCode::GetDecodedString.NET Python.