Issue: Direct Part Marks (DPM) are codes, symbols, and texts that are etched or printed directly onto the surface of a part, which has a different texture from marks printed on paper. They are often inverted on a dark surface.
Solution:
Enable the DPM reading mode and invert the color of the image using GrayscaleTransformationModes
.
JSON Template:
{
"Version": "3.0",
"ImageParameter":
{
"Name": "Test1",
"GrayscaleTransformationModes":[
{
"Mode":"GTM_INVERTED"
}
],
"DPMCodeReadingModes":[
{
"Mode":"DPMCRM_GENERAL"
}
],
"DeblurLevel": 9,
"Timeout": 99999
}
}
Binarized image produced by Dynamsoft Barcode Reader:
Template for Dynamsoft Barcode Reader:
JavaScript Code Snippet to Use the Template:
barcodeReader.initRuntimeSettingsWithString(template);