Decode Unreadable Barcodes with Custom Scan Parameters

Our advanced algorithms and image enhancement techniques are designed to efficiently handle unreadable barcodes resulting from damage, fading, or poor printing. By intelligently analyzing the barcode's structure and patterns, Dynamsoft Barcode Reader significantly improves barcode readability, ensuring seamless and accurate data capture.

Explore the real-world examples below to see how Dynamsoft can boost your scanning performance and tackle the challenges of difficult-to-read barcodes.

SingleMultiple
OneDQR CodeData MatrixPDF417Aztec CodeMaxiCodeDotCodeGS1 DataBarPostal CodesPatch CodeGS1 Composite Code
Rich textureWith textCleanBlurOut of focusLow light
With perspective DistortionTinyWhite barcode on black backgroundIncomplete (missing a corner or a side)Low contrast from the backgroundDirect part markingTaintedDottedCrumpledCurvedWith glareGood qualityUneven lighting
Minimum quite zoneSmall barcode on a large imageOther
a 2 mm x 2 mm tiny DataMatrix code with dark background
Click to Test Decoding

Tiny Barcode at a Distance

Issue: Reading a small barcode within a large image can be challenging, especially when the barcode is slightly blurred, has small modules, or is affected by background interference. This makes it difficult for a barcode reader to accurately scan the code. In the sample image, a 2 mm x 2 mm DataMatrix code is shown where the camera cannot be positioned too close to the barcode. Solution: The Dynamsoft Barcode Reader SDK offers flexible APIs, enabling developers to build a custom barcode scanner for various usage scenarios such as reading small barcodes at a distance. For this scenario, we recommend the following adjustments: Reduce the blocksize to minimize background interference during binarization and make the modules clearer. Set DeblurModes to null to let the program decide which deblur algorithms to use to enhance clarity for slightly blurred codes. Enable ScaleUpModes to enlarge very small modules for improved readability. { "BarcodeReaderTaskSettingOptions" : [ { "BarcodeColourModes" : null, "BarcodeComplementModes" : [ { "Mode" : "BCM_SKIP" } ], "BarcodeFormatIds" : [ "BF_DEFAULT" ], "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" : 10000 } ], "GlobalParameter" : { "MaxTotalImageDimension" : 0 }, "ImageParameterOptions" : [ { "BaseImageParameterName" : "", "BinarizationModes" : [ { "BinarizationThreshold" : -1, "BlockSizeX" : 5, "BlockSizeY" : 5, "EnableFillBinaryVacancy" : 1, "GrayscaleEnhancementModesIndex" : -1, "Mode" : "BM_LOCAL_BLOCK", "MorphOperation" : "Close", "MorphOperationKernelSizeX" : -1, "MorphOperationKernelSizeY" : -1, "MorphShape" : "Rectangle", "ThresholdCompensation" : 5 } ], "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_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" : 0, "LetterHeightThreshold" : 0, "Mode" : "SUM_LINEAR_INTERPOLATION", "ModuleSizeThreshold" : 4, "TargetLetterHeight" : 0, "TargetModuleSize" : 6 } ], "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" ] } ] } Read this case study to see how Naturalis ARISE, a scientific research consortium, achieved high accuracy and offline capability for reading tiny Data Matrix codes on specimen containers, even through plastic bags, test tubes, and liquids, in remote outdoor locations with the help of Dynamsoft Barcode Reader SDK.

Single
Data Matrix
Blur
White barcode on black background
Small barcode on a large image
Tiny Inverted Glared Blurred DotCode Cigarettes' Package
Click to Test Decoding

Tiny Inverted Glared DotCode

Issue: Reading the dot code on a cigarette package can be challenging due to several factors. Firstly, the small size of the code makes it difficult to detect. Additionally, the plastic wrapping on the package creates glare, further complicating the scanning process. The code is often printed in white on a black background, resulting in an inverted appearance. Moreover, the absence of a clear finder pattern hinders the accurate localization of the barcode. Solution: The Dynamsoft Barcode Reader SDK offers flexible APIs, enabling developers to build a custom barcode scanner for various usage scenarios such as reading tiny inverted and glared DotCode. For this scenario, we recommend the following adjustments: Set BinarizationModes to BM_LOCAL_BLOCK to perform adaptive binarization by blocks, effectively reducing the impact of uneven lighting and small module sizes. Set LocalizationModes to LM_STATISTICS_MARKS to localize barcodes by grouping marks specifically designed for DotCode. Configure DeblurModes appropriately to enhance and sharpen blurry images. Set GrayscaleTransformationModes to invert the image, enabling the accurate reading of light barcodes on a dark background. { "CaptureVisionTemplates": [ { "Name": "Default_1", "ImageROIProcessingNameArray": [ "roi_read_dotcode" ], "Timeout": 700, "MaxParallelTasks":0 } ], "TargetROIDefOptions": [ { "Name": "roi_read_dotcode", "TaskSettingNameArray": [ "task_read_dotcode" ] } ], "BarcodeFormatSpecificationOptions": [ { "Name": "format_specification_read_dotcode", "BarcodeFormatIds": [ "BF_DOTCODE" ], "MirrorMode": "MM_BOTH" } ], "BarcodeReaderTaskSettingOptions": [ { "Name": "task_read_dotcode", "ExpectedBarcodesCount" : 1, "BarcodeFormatIds" : [ "BF_DOTCODE" ], "LocalizationModes": [ { "Mode" : "LM_STATISTICS_MARKS" } ], "DeblurModes": [ { "Mode": "DM_BASED_ON_LOC_BIN" }, { "Mode": "DM_THRESHOLD_BINARIZATION" }, { "Mode": "DM_DEEP_ANALYSIS" } ], "BarcodeFormatSpecificationNameArray": [ "format_specification_read_dotcode" ], "SectionImageParameterArray": [ { "Section": "ST_REGION_PREDETECTION", "ImageParameterName": "ip_read_dotcode" }, { "Section": "ST_BARCODE_LOCALIZATION", "ImageParameterName": "ip_read_dotcode" }, { "Section": "ST_BARCODE_DECODING", "ImageParameterName": "ip_read_dotcode" } ] } ], "ImageParameterOptions": [ { "Name": "ip_read_dotcode", "BinarizationModes": [ { "Mode": "BM_LOCAL_BLOCK", "BlockSizeX": 15, "BlockSizeY": 15, "EnableFillBinaryVacancy": 0, "ThresholdCompensation": 10 }, { "Mode": "BM_LOCAL_BLOCK", "BlockSizeX": 21, "BlockSizeY": 21, "EnableFillBinaryVacancy": 0, "ThresholdCompensation": 10, "MorphOperation":"Erode", "MorphOperationKernelSizeX":3, "MorphOperationKernelSizeY":3, "MorphShape":"Ellipse" }, { "Mode": "BM_LOCAL_BLOCK", "BlockSizeX": 35, "BlockSizeY": 35, "EnableFillBinaryVacancy": 0, "ThresholdCompensation": 10, "MorphOperation":"Erode", "MorphOperationKernelSizeX":3, "MorphOperationKernelSizeY":3, "MorphShape":"Ellipse" }, { "Mode": "BM_LOCAL_BLOCK", "BlockSizeX": 45, "BlockSizeY": 45, "EnableFillBinaryVacancy": 0, "ThresholdCompensation": 25, "MorphOperation":"Erode", "MorphOperationKernelSizeX":3, "MorphOperationKernelSizeY":3, "MorphShape":"Ellipse" } ], "GrayscaleEnhancementModes": [ { "Mode": "GEM_GENERAL" } ], "GrayscaleTransformationModes": [ { "Mode": "GTM_INVERTED" }, { "Mode": "GTM_ORIGINAL" } ] } ] }

Single
DotCode
Blur
With glare
Minimum quite zone
qr code in shadow
Click to Test Decoding

Barcode with Shadow

Issue: It’s very common that an image taken may present some shadows. The barcode area with uneven lighting is a very challenging decoding situation that many scanners fail to read. Solution: Dynamsoft Barcode Reader provides an adaptive binarization mode (BM_LOCAL_BLOCK) which caters to different lighting areas in the image in order to successfully decode these challenging barcodes. Image Source: https://boofcv.org/index.php?title=Performance:QrCode { "BarcodeReaderTaskSettingOptions" : [ { "BarcodeColourModes" : null, "BarcodeComplementModes" : [ { "Mode" : "BCM_SKIP" } ], "BarcodeFormatIds" : [ "BF_DEFAULT" ], "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" : 10000 } ], "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 } ], "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
QR Code
Low light
Uneven lighting
Other
Batch Scan Multiple QR Codes
Click to Test Decoding

Batch QR Codes

Issue: When it comes to scanning hundreds of barcodes in an image, Dynamsoft offers many optimization settings to effectively and quickly batch scan QR Codes. Solution: First, set the barcode type to QR code if your image only contains this type of code to reduce decoding time. Next, set the GrayscaleEnhancementModes to eliminate blurriness and set the ThresholdCompensation in BinarizationModes higher to improve the binary image with a dark background. Then, try different localization methods to accurately pinpoint the barcode locations. At last, set the ExpectedBarcodesCount to a large number such as 999 to make sure that the algorithm works really hard to decode as many barcodes as possible. { "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" : 999, "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" : 10000 } ], "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" : 20 } ], "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" ] } ] }

Multiple
QR Code
Blur
Good quality
Other
blurred QR code 1
Click to Test Decoding

Blurry QR Codes and Barcodes

Issue: Blurry QR codes and barcodes pose a significant challenge to effective scanning. The images of the codes may be taken in low resolution or motion. Solution: There are some parameters we can adjust to improve the reading rate. Set DeblurModes to null to let the program decide which deblur algorithms to use to read blurred barcodes. Set the ExpectedBarcodesCount to a higher value like 999 so that it will try all the available image processing methods. Set GrayscaleEnhancementModes to enhance the image. Set ScaleUpModes to scale up modules if their size is too small. { "BarcodeReaderTaskSettingOptions" : [ { "BarcodeColourModes" : null, "BarcodeComplementModes" : [ { "Mode" : "BCM_SKIP" } ], "BarcodeFormatIds" : [ "BF_DEFAULT", "BF_PATCHCODE" ], "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" : 999, "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" : 99999 } ], "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" : 0, "LetterHeightThreshold" : 0, "Mode" : "SUM_LINEAR_INTERPOLATION", "ModuleSizeThreshold" : 4, "TargetLetterHeight" : 0, "TargetModuleSize" : 6 } ], "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" ] } ] } Image Source: https://boofcv.org/index.php?title=Performance:QrCode

Multiple
OneD
Blur
Curved
Other
qr code on a pop can
Click to Test Decoding

Curved QR Code

Issue: When a barcode is wrapped on a cylindrical object such as a pop can, the resulting barcode image is curved. The deformed barcode is very challenging to scan correctly. Solution: Dynamsoft Barcode Reader SDK provides several image processing methods to combat deformation. These helps to scan curved, crumpled, distorted and other types of challenging barcodes. { "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_GENERAL" }, { "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_BROAD_WARP" }, { "BinarizationMode" : { "BinarizationThreshold" : -1, "BlockSizeX" : 30, "BlockSizeY" : 30, "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_DEWRINKLE" } ], "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" : 99999 } ], "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 }, { "Mode" : "GEM_SHARPEN_SMOOTH", "Sensitivity" : -1, "SharpenBlockSizeX" : 3, "SharpenBlockSizeY" : 3, "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
QR Code
Clean
Curved
Other
damaged qr code with marks
Click to Test Decoding

Damaged QR Code

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
QR Code
Clean
Incomplete (missing a corner or a side)
Other
Click to Test Decoding

DataMatrix Code with Red-Striped Background

Issue: Barcodes printed on a textured background are more difficult to decode. For example, the barcodes in the sample image are printed on a red-striped backgroud, which affects the binarization result. Solution: We can increase the weight of the red channel during the binarization process to reduce the impact of the red stripes. { "BarcodeReaderTaskSettingOptions" : [ { "BarcodeColourModes" : null, "BarcodeComplementModes" : [ { "Mode" : "BCM_SKIP" } ], "BarcodeFormatIds" : [ "BF_DEFAULT" ], "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" : 2, "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" : 3500 } ], "GlobalParameter" : { "MaxTotalImageDimension" : 0 }, "ImageParameterOptions" : [ { "BaseImageParameterName" : "", "BinarizationModes" : [ { "BinarizationThreshold" : -1, "BlockSizeX" : 30, "BlockSizeY" : 30, "EnableFillBinaryVacancy" : 1, "GrayscaleEnhancementModesIndex" : -1, "Mode" : "BM_LOCAL_BLOCK", "MorphOperation" : "Close", "MorphOperationKernelSizeX" : -1, "MorphOperationKernelSizeY" : -1, "MorphShape" : "Rectangle", "ThresholdCompensation" : 10 } ], "ColourConversionModes" : [ { "BlueChannelWeight" : 0, "GreenChannelWeight" : 0, "Mode" : "CICM_GENERAL", "RedChannelWeight" : 1000, "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_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" ] } ] }

Multiple
Data Matrix
Clean
Tainted
Other
large high version qr code printed on paper
Click to Test Decoding

High Version QR Code

Issue: The higher the QR code version, the more data modules there are and the more challenging it is to read such dense QR codes. Solution: Dynamsoft Barcode Reader uses a special algorithm optimized for reading a dense QR code. Set the appropriate ScaleUpModes, which determines the process for scaling up an image for detecting barcodes with a small module size. { "BarcodeReaderTaskSettingOptions" : [ { "BarcodeColourModes" : null, "BarcodeComplementModes" : [ { "Mode" : "BCM_SKIP" } ], "BarcodeFormatIds" : [ "BF_QR_CODE" ], "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" : 5000 } ], "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 } ], "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" : 99999, "ScaleUpModes" : [ { "AcuteAngleWithXThreshold" : 0, "LetterHeightThreshold" : 0, "Mode" : "SUM_LINEAR_INTERPOLATION", "ModuleSizeThreshold" : 4, "TargetLetterHeight" : 0, "TargetModuleSize" : 6 } ], "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
QR Code
Clean
Good quality
Other
scan inverted DPM code
Click to Test Decoding

Inverted DPM Codes

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. { "BarcodeReaderTaskSettingOptions" : [ { "BarcodeColourModes" : null, "BarcodeComplementModes" : [ { "Mode" : "BCM_SKIP" } ], "BarcodeFormatIds" : [ "BF_DEFAULT" ], "BaseBarcodeReaderTaskSettingName" : "", "DPMCodeReadingModes" : [ { "BarcodeFormat" : "BF_DATAMATRIX", "Mode" : "DPMCRM_GENERAL" } ], "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" : 99999 } ], "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 } ], "GrayscaleTransformationModes" : [ { "Mode" : "GTM_INVERTED" } ], "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
Data Matrix
Clean
Direct part marking
Other
scan qr code from screen
Click to Test Decoding

Scan Barcode from Screen

Issue: When you scan a barcode from a screen on a monitor, a TV or a mobile phone, the image contains roughly parallel dark and light bands superimposed, called the moiré pattern. The interfering pattern makes decoding the barcode very challenging. Solution: Dynamsoft Barcode Reader SDK provides an image processing step to remove the moiré texture and would quickly decode the barcode. It can be configured through TextureDetectionModes. { "BarcodeReaderTaskSettingOptions" : [ { "BarcodeColourModes" : null, "BarcodeComplementModes" : [ { "Mode" : "BCM_SKIP" } ], "BarcodeFormatIds" : [ "BF_DEFAULT" ], "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" : 10000 } ], "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 } ], "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
QR Code
Rich texture
Good quality
Other
vin code39 barcode
Click to Test Decoding

Code39 with Zero Margin

Issue: Vehicle Identification Number (VIN) is sometimes accompanied with a code 39 barcode underneath. The placement is usually very tight and close to the series of digits resulting in a barcode with zero upper and lower margin. Many barcode scanners fail to read such barcodes. Solution: Dynamsoft offers many barcode localization methods catering to different usage scenarios. The Lines localization method localizes barcodes by searching for groups of lines. This is optimized for 1D and PDF417 barcodes which is suitable for identifying barcodes with little margin. { "BarcodeReaderTaskSettingOptions" : [ { "BarcodeColourModes" : null, "BarcodeComplementModes" : [ { "Mode" : "BCM_SKIP" } ], "BarcodeFormatIds" : [ "BF_DEFAULT" ], "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_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" : 99999 } ], "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 } ], "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" ] } ] } Image Source: https://universe.roboflow.com/kirill-sergeev/vin-detection/

Single
OneD
With text
Good quality
Minimum quite zone