Decode Unreadable Barcodes with Dynamsoft Barcode Reader's Custom Scan Parameters


Loading image...
Binarized image produced by Dynamsoft Barcode Reader:
JSON Template (help):
{
BarcodeReaderTaskSettingOptions
:
[
0
:
{
BarcodeColourModes
:
null
BarcodeComplementModes
:
[
0
:
{
Mode
:
BCM_SKIP
}
]
BarcodeFormatIds
:
[
0
:
BF_QR_CODE
1
:
BF_MICRO_QR
]
BaseBarcodeReaderTaskSettingName
:
DPMCodeReadingModes
:
[
0
:
{
BarcodeFormat
:
BF_DATAMATRIX
Mode
:
DPMCRM_SKIP
}
]
DeblurModes
:
null
DeformationResistingModes
:
[
0
:
{
BinarizationMode
:
{
BinarizationThreshold
:
-1
BlockSizeX
:
0
BlockSizeY
:
0
EnableFillBinaryVacancy
:
1
GrayscaleEnhancementModesIndex
:
-1
Mode
:
BM_LOCAL_BLOCK
MorphOperation
:
Close
MorphOperationKernelSizeX
:
-1
MorphOperationKernelSizeY
:
-1
MorphShape
:
Rectangle
ThresholdCompensation
:
10
}
GrayscaleEnhancementMode
:
{
Mode
:
GEM_AUTO
Sensitivity
:
-1
SharpenBlockSizeX
:
-1
SharpenBlockSizeY
:
-1
SmoothBlockSizeX
:
-1
SmoothBlockSizeY
:
-1
}
Level
:
5
Mode
:
DRM_SKIP
}
]
ExpectedBarcodesCount
:
0
LocalizationModes
:
[
0
:
{
ConfidenceThreshold
:
60
IsOneDStacked
:
0
Mode
:
LM_CONNECTED_BLOCKS
ModuleSize
:
0
ScanDirection
:
0
ScanStride
:
0
}
1
:
{
ConfidenceThreshold
:
60
IsOneDStacked
:
0
Mode
:
LM_SCAN_DIRECTLY
ModuleSize
:
0
ScanDirection
:
0
ScanStride
:
0
}
2
:
{
ConfidenceThreshold
:
60
IsOneDStacked
:
0
Mode
:
LM_STATISTICS
ModuleSize
:
0
ScanDirection
:
0
ScanStride
:
0
}
3
:
{
ConfidenceThreshold
:
60
IsOneDStacked
:
0
Mode
:
LM_LINES
ModuleSize
:
0
ScanDirection
:
0
ScanStride
:
0
}
]
MaxThreadsInOneTask
:
4
Name
:
BR_1
ReturnBarcodeZoneClarity
:
0
SectionImageParameterArray
:
[
0
:
{
ContinueWhenPartialResultsGenerated
:
1
ImageParameterName
:
IP_1
Section
:
ST_REGION_PREDETECTION
}
1
:
{
ContinueWhenPartialResultsGenerated
:
1
ImageParameterName
:
IP_1
Section
:
ST_BARCODE_LOCALIZATION
}
2
:
{
ContinueWhenPartialResultsGenerated
:
1
ImageParameterName
:
IP_Decode
Section
:
ST_BARCODE_DECODING
}
]
StartSection
:
ST_REGION_PREDETECTION
TerminateSetting
:
{
Section
:
ST_NULL
Stage
:
IRUT_NULL
}
TextResultOrderModes
:
[
0
:
{
Mode
:
TROM_CONFIDENCE
}
1
:
{
Mode
:
TROM_POSITION
}
2
:
{
Mode
:
TROM_FORMAT
}
]
}
]
CaptureVisionTemplates
:
[
0
:
{
ImageROIProcessingNameArray
:
[
0
:
roi_default
]
ImageSource
:
MaxParallelTasks
:
4
MinImageCaptureInterval
:
0
Name
:
Default_1
OutputOriginalImage
:
0
SemanticProcessingNameArray
:
null
Timeout
:
100000
}
]
GlobalParameter
:
{
MaxTotalImageDimension
:
0
}
ImageParameterOptions
:
[
0
:
{
BaseImageParameterName
:
BinarizationModes
:
[
0
:
{
BinarizationThreshold
:
-1
BlockSizeX
:
0
BlockSizeY
:
0
EnableFillBinaryVacancy
:
1
GrayscaleEnhancementModesIndex
:
-1
Mode
:
BM_LOCAL_BLOCK
MorphOperation
:
Close
MorphOperationKernelSizeX
:
-1
MorphOperationKernelSizeY
:
-1
MorphShape
:
Rectangle
ThresholdCompensation
:
10
}
]
ColourConversionModes
:
[
0
:
{
BlueChannelWeight
:
-1
GreenChannelWeight
:
-1
Mode
:
CICM_GENERAL
RedChannelWeight
:
-1
ReferChannel
:
H_CHANNEL
}
]
GrayscaleEnhancementModes
:
[
0
:
{
Mode
:
GEM_GENERAL
Sensitivity
:
-1
SharpenBlockSizeX
:
-1
SharpenBlockSizeY
:
-1
SmoothBlockSizeX
:
-1
SmoothBlockSizeY
:
-1
}
1
:
{
Mode
:
GEM_GRAY_EQUALIZE
Sensitivity
:
5
SharpenBlockSizeX
:
-1
SharpenBlockSizeY
:
-1
SmoothBlockSizeX
:
-1
SmoothBlockSizeY
:
-1
}
2
:
{
Mode
:
GEM_GRAY_SMOOTH
Sensitivity
:
-1
SharpenBlockSizeX
:
-1
SharpenBlockSizeY
:
-1
SmoothBlockSizeX
:
3
SmoothBlockSizeY
:
3
}
]
GrayscaleTransformationModes
:
[
0
:
{
Mode
:
GTM_ORIGINAL
}
]
IfEraseTextZone
:
1
Name
:
IP_1
RegionPredetectionModes
:
[
0
:
{
AspectRatioRange
:
[]
FindAccurateBoundary
:
0
ForeAndBackgroundColours
:
[]
HeightRange
:
[]
ImageParameterName
:
MeasuredByPercentage
:
1
MinImageDimension
:
262144
Mode
:
RPM_GENERAL
RelativeRegions
:
[]
Sensitivity
:
1
SpatialIndexBlockSize
:
5
WidthRange
:
[]
}
]
ScaleDownThreshold
:
2300
ScaleUpModes
:
[
0
:
{
AcuteAngleWithXThreshold
:
-1
LetterHeightThreshold
:
0
Mode
:
SUM_AUTO
ModuleSizeThreshold
:
0
TargetLetterHeight
:
0
TargetModuleSize
:
0
}
]
TextDetectionMode
:
{
CharHeightRange
:
[
0
:
1
1
:
1000
2
:
1
]
Direction
:
UNKNOWN
MaxSpacingInALine
:
-1
Mode
:
TTDM_LINE
Sensitivity
:
3
StringLengthRange
:
null
}
TextureDetectionModes
:
[
0
:
{
Mode
:
TDM_GENERAL_WIDTH_CONCENTRATION
Sensitivity
:
5
}
]
}
1
:
{
BaseImageParameterName
:
BinarizationModes
:
[
0
:
{
BinarizationThreshold
:
-1
BlockSizeX
:
0
BlockSizeY
:
0
EnableFillBinaryVacancy
:
1
GrayscaleEnhancementModesIndex
:
-1
Mode
:
BM_LOCAL_BLOCK
MorphOperation
:
Close
MorphOperationKernelSizeX
:
-1
MorphOperationKernelSizeY
:
-1
MorphShape
:
Rectangle
ThresholdCompensation
:
10
}
]
ColourConversionModes
:
[
0
:
{
BlueChannelWeight
:
-1
GreenChannelWeight
:
-1
Mode
:
CICM_GENERAL
RedChannelWeight
:
-1
ReferChannel
:
H_CHANNEL
}
]
GrayscaleEnhancementModes
:
[
0
:
{
Mode
:
GEM_GENERAL
Sensitivity
:
-1
SharpenBlockSizeX
:
-1
SharpenBlockSizeY
:
-1
SmoothBlockSizeX
:
-1
SmoothBlockSizeY
:
-1
}
]
GrayscaleTransformationModes
:
[
0
:
{
Mode
:
GTM_ORIGINAL
}
]
IfEraseTextZone
:
1
Name
:
IP_Decode
RegionPredetectionModes
:
[
0
:
{
AspectRatioRange
:
[]
FindAccurateBoundary
:
0
ForeAndBackgroundColours
:
[]
HeightRange
:
[]
ImageParameterName
:
MeasuredByPercentage
:
1
MinImageDimension
:
262144
Mode
:
RPM_GENERAL
RelativeRegions
:
[]
Sensitivity
:
1
SpatialIndexBlockSize
:
5
WidthRange
:
[]
}
]
ScaleDownThreshold
:
99999
ScaleUpModes
:
[
0
:
{
AcuteAngleWithXThreshold
:
-1
LetterHeightThreshold
:
0
Mode
:
SUM_AUTO
ModuleSizeThreshold
:
0
TargetLetterHeight
:
0
TargetModuleSize
:
0
}
]
TextDetectionMode
:
{
CharHeightRange
:
[
0
:
1
1
:
1000
2
:
1
]
Direction
:
UNKNOWN
MaxSpacingInALine
:
-1
Mode
:
TTDM_LINE
Sensitivity
:
3
StringLengthRange
:
null
}
TextureDetectionModes
:
[
0
:
{
Mode
:
TDM_GENERAL_WIDTH_CONCENTRATION
Sensitivity
:
5
}
]
}
]
TargetROIDefOptions
:
[
0
:
{
BaseTargetROIDefName
:
Location
:
{
Offset
:
{
FirstPoint
:
[
0
:
0
1
:
0
2
:
1
3
:
1
]
FourthPoint
:
[
0
:
0
1
:
100
2
:
1
3
:
1
]
MeasuredByPercentage
:
1
ReferenceObjectOriginIndex
:
0
ReferenceObjectType
:
ROT_ATOMIC_OBJECT
ReferenceXAxis
:
{
AxisType
:
AT_MIDPOINT_EDGE
EdgeIndex
:
0
LengthReference
:
LR_X
RotationAngle
:
90
}
ReferenceYAxis
:
{
AxisType
:
AT_MIDPOINT_EDGE
EdgeIndex
:
1
LengthReference
:
LR_Y
RotationAngle
:
90
}
SecondPoint
:
[
0
:
100
1
:
0
2
:
1
3
:
1
]
ThirdPoint
:
[
0
:
100
1
:
100
2
:
1
3
:
1
]
}
}
Name
:
roi_default
PauseFlag
:
0
TaskSettingNameArray
:
[
0
:
BR_1
]
}
]
}
Issue: Often you might find that a barcode is damaged, for example, scratched, marked up, or incomplete with missing corners, etc.
Solution: We can try different localization methods to identify the location of the barcode that is severely damaged and then use our proprietary algorithm to complete the QR Code to improve the decoding rate.
{ "BarcodeReaderTaskSettingOptions" : [ { "BarcodeColourModes" : null, "BarcodeComplementModes" : [ { "Mode" : "BCM_SKIP" } ], "BarcodeFormatIds" : [ "BF_QR_CODE", "BF_MICRO_QR" ], "BaseBarcodeReaderTaskSettingName" : "", "DPMCodeReadingModes" : [ { "BarcodeFormat" : "BF_DATAMATRIX", "Mode" : "DPMCRM_SKIP" } ], "DeblurModes" : null, "DeformationResistingModes" : [ { "BinarizationMode" : { "BinarizationThreshold" : -1, "BlockSizeX" : 0, "BlockSizeY" : 0, "EnableFillBinaryVacancy" : 1, "GrayscaleEnhancementModesIndex" : -1, "Mode" : "BM_LOCAL_BLOCK", "MorphOperation" : "Close", "MorphOperationKernelSizeX" : -1, "MorphOperationKernelSizeY" : -1, "MorphShape" : "Rectangle", "ThresholdCompensation" : 10 }, "GrayscaleEnhancementMode" : { "Mode" : "GEM_AUTO", "Sensitivity" : -1, "SharpenBlockSizeX" : -1, "SharpenBlockSizeY" : -1, "SmoothBlockSizeX" : -1, "SmoothBlockSizeY" : -1 }, "Level" : 5, "Mode" : "DRM_SKIP" } ], "ExpectedBarcodesCount" : 0, "LocalizationModes" : [ { "ConfidenceThreshold" : 60, "IsOneDStacked" : 0, "Mode" : "LM_CONNECTED_BLOCKS", "ModuleSize" : 0, "ScanDirection" : 0, "ScanStride" : 0 }, { "ConfidenceThreshold" : 60, "IsOneDStacked" : 0, "Mode" : "LM_SCAN_DIRECTLY", "ModuleSize" : 0, "ScanDirection" : 0, "ScanStride" : 0 }, { "ConfidenceThreshold" : 60, "IsOneDStacked" : 0, "Mode" : "LM_STATISTICS", "ModuleSize" : 0, "ScanDirection" : 0, "ScanStride" : 0 }, { "ConfidenceThreshold" : 60, "IsOneDStacked" : 0, "Mode" : "LM_LINES", "ModuleSize" : 0, "ScanDirection" : 0, "ScanStride" : 0 } ], "MaxThreadsInOneTask" : 4, "Name" : "BR_1", "ReturnBarcodeZoneClarity" : 0, "SectionImageParameterArray" : [ { "ContinueWhenPartialResultsGenerated" : 1, "ImageParameterName" : "IP_1", "Section" : "ST_REGION_PREDETECTION" }, { "ContinueWhenPartialResultsGenerated" : 1, "ImageParameterName" : "IP_1", "Section" : "ST_BARCODE_LOCALIZATION" }, { "ContinueWhenPartialResultsGenerated" : 1, "ImageParameterName" : "IP_Decode", "Section" : "ST_BARCODE_DECODING" } ], "StartSection" : "ST_REGION_PREDETECTION", "TerminateSetting" : { "Section" : "ST_NULL", "Stage" : "IRUT_NULL" }, "TextResultOrderModes" : [ { "Mode" : "TROM_CONFIDENCE" }, { "Mode" : "TROM_POSITION" }, { "Mode" : "TROM_FORMAT" } ] } ], "CaptureVisionTemplates" : [ { "ImageROIProcessingNameArray" : [ "roi_default" ], "ImageSource" : "", "MaxParallelTasks" : 4, "MinImageCaptureInterval" : 0, "Name" : "Default_1", "OutputOriginalImage" : 0, "SemanticProcessingNameArray" : null, "Timeout" : 100000 } ], "GlobalParameter" : { "MaxTotalImageDimension" : 0 }, "ImageParameterOptions" : [ { "BaseImageParameterName" : "", "BinarizationModes" : [ { "BinarizationThreshold" : -1, "BlockSizeX" : 0, "BlockSizeY" : 0, "EnableFillBinaryVacancy" : 1, "GrayscaleEnhancementModesIndex" : -1, "Mode" : "BM_LOCAL_BLOCK", "MorphOperation" : "Close", "MorphOperationKernelSizeX" : -1, "MorphOperationKernelSizeY" : -1, "MorphShape" : "Rectangle", "ThresholdCompensation" : 10 } ], "ColourConversionModes" : [ { "BlueChannelWeight" : -1, "GreenChannelWeight" : -1, "Mode" : "CICM_GENERAL", "RedChannelWeight" : -1, "ReferChannel" : "H_CHANNEL" } ], "GrayscaleEnhancementModes" : [ { "Mode" : "GEM_GENERAL", "Sensitivity" : -1, "SharpenBlockSizeX" : -1, "SharpenBlockSizeY" : -1, "SmoothBlockSizeX" : -1, "SmoothBlockSizeY" : -1 }, { "Mode" : "GEM_GRAY_EQUALIZE", "Sensitivity" : 5, "SharpenBlockSizeX" : -1, "SharpenBlockSizeY" : -1, "SmoothBlockSizeX" : -1, "SmoothBlockSizeY" : -1 }, { "Mode" : "GEM_GRAY_SMOOTH", "Sensitivity" : -1, "SharpenBlockSizeX" : -1, "SharpenBlockSizeY" : -1, "SmoothBlockSizeX" : 3, "SmoothBlockSizeY" : 3 } ], "GrayscaleTransformationModes" : [ { "Mode" : "GTM_ORIGINAL" } ], "IfEraseTextZone" : 1, "Name" : "IP_1", "RegionPredetectionModes" : [ { "AspectRatioRange" : "[]", "FindAccurateBoundary" : 0, "ForeAndBackgroundColours" : "[]", "HeightRange" : "[]", "ImageParameterName" : "", "MeasuredByPercentage" : 1, "MinImageDimension" : 262144, "Mode" : "RPM_GENERAL", "RelativeRegions" : "[]", "Sensitivity" : 1, "SpatialIndexBlockSize" : 5, "WidthRange" : "[]" } ], "ScaleDownThreshold" : 2300, "ScaleUpModes" : [ { "AcuteAngleWithXThreshold" : -1, "LetterHeightThreshold" : 0, "Mode" : "SUM_AUTO", "ModuleSizeThreshold" : 0, "TargetLetterHeight" : 0, "TargetModuleSize" : 0 } ], "TextDetectionMode" : { "CharHeightRange" : [ 1, 1000, 1 ], "Direction" : "UNKNOWN", "MaxSpacingInALine" : -1, "Mode" : "TTDM_LINE", "Sensitivity" : 3, "StringLengthRange" : null }, "TextureDetectionModes" : [ { "Mode" : "TDM_GENERAL_WIDTH_CONCENTRATION", "Sensitivity" : 5 } ] }, { "BaseImageParameterName" : "", "BinarizationModes" : [ { "BinarizationThreshold" : -1, "BlockSizeX" : 0, "BlockSizeY" : 0, "EnableFillBinaryVacancy" : 1, "GrayscaleEnhancementModesIndex" : -1, "Mode" : "BM_LOCAL_BLOCK", "MorphOperation" : "Close", "MorphOperationKernelSizeX" : -1, "MorphOperationKernelSizeY" : -1, "MorphShape" : "Rectangle", "ThresholdCompensation" : 10 } ], "ColourConversionModes" : [ { "BlueChannelWeight" : -1, "GreenChannelWeight" : -1, "Mode" : "CICM_GENERAL", "RedChannelWeight" : -1, "ReferChannel" : "H_CHANNEL" } ], "GrayscaleEnhancementModes" : [ { "Mode" : "GEM_GENERAL", "Sensitivity" : -1, "SharpenBlockSizeX" : -1, "SharpenBlockSizeY" : -1, "SmoothBlockSizeX" : -1, "SmoothBlockSizeY" : -1 } ], "GrayscaleTransformationModes" : [ { "Mode" : "GTM_ORIGINAL" } ], "IfEraseTextZone" : 1, "Name" : "IP_Decode", "RegionPredetectionModes" : [ { "AspectRatioRange" : "[]", "FindAccurateBoundary" : 0, "ForeAndBackgroundColours" : "[]", "HeightRange" : "[]", "ImageParameterName" : "", "MeasuredByPercentage" : 1, "MinImageDimension" : 262144, "Mode" : "RPM_GENERAL", "RelativeRegions" : "[]", "Sensitivity" : 1, "SpatialIndexBlockSize" : 5, "WidthRange" : "[]" } ], "ScaleDownThreshold" : 99999, "ScaleUpModes" : [ { "AcuteAngleWithXThreshold" : -1, "LetterHeightThreshold" : 0, "Mode" : "SUM_AUTO", "ModuleSizeThreshold" : 0, "TargetLetterHeight" : 0, "TargetModuleSize" : 0 } ], "TextDetectionMode" : { "CharHeightRange" : [ 1, 1000, 1 ], "Direction" : "UNKNOWN", "MaxSpacingInALine" : -1, "Mode" : "TTDM_LINE", "Sensitivity" : 3, "StringLengthRange" : null }, "TextureDetectionModes" : [ { "Mode" : "TDM_GENERAL_WIDTH_CONCENTRATION", "Sensitivity" : 5 } ] } ], "TargetROIDefOptions" : [ { "BaseTargetROIDefName" : "", "Location" : { "Offset" : { "FirstPoint" : [ 0, 0, 1, 1 ], "FourthPoint" : [ 0, 100, 1, 1 ], "MeasuredByPercentage" : 1, "ReferenceObjectOriginIndex" : 0, "ReferenceObjectType" : "ROT_ATOMIC_OBJECT", "ReferenceXAxis" : { "AxisType" : "AT_MIDPOINT_EDGE", "EdgeIndex" : 0, "LengthReference" : "LR_X", "RotationAngle" : 90 }, "ReferenceYAxis" : { "AxisType" : "AT_MIDPOINT_EDGE", "EdgeIndex" : 1, "LengthReference" : "LR_Y", "RotationAngle" : 90 }, "SecondPoint" : [ 100, 0, 1, 1 ], "ThirdPoint" : [ 100, 100, 1, 1 ] } }, "Name" : "roi_default", "PauseFlag" : 0, "TaskSettingNameArray" : [ "BR_1" ] } ] }
Single
Clean
Incomplete (missing a corner or a side)
Other
QR Code