< Back
Tiny Inverted Glared DotCode

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

Loading image...

Binarized image produced by Dynamsoft Barcode Reader:

JSON Template (help):

{
CaptureVisionTemplates
:
[
1 item  
0
:
{
Name
:
Default_1
ImageROIProcessingNameArray
:
[
1 item  
0
:
roi_read_dotcode
Timeout
:
700
MaxParallelTasks
:
0
TargetROIDefOptions
:
[
1 item  
0
:
{
Name
:
roi_read_dotcode
TaskSettingNameArray
:
[
1 item  
0
:
task_read_dotcode
BarcodeFormatSpecificationOptions
:
[
1 item  
0
:
{
Name
:
format_specification_read_dotcode
BarcodeFormatIds
:
[
1 item  
0
:
BF_DOTCODE
MirrorMode
:
MM_BOTH
BarcodeReaderTaskSettingOptions
:
[
1 item  
0
:
{
Name
:
task_read_dotcode
ExpectedBarcodesCount
:
1
BarcodeFormatIds
:
[
1 item  
0
:
BF_DOTCODE
LocalizationModes
:
[
1 item  
0
:
{
Mode
:
LM_STATISTICS_MARKS
DeblurModes
:
[
3 items  
0
:
{
Mode
:
DM_BASED_ON_LOC_BIN
1
:
{
Mode
:
DM_THRESHOLD_BINARIZATION
2
:
{
Mode
:
DM_DEEP_ANALYSIS
BarcodeFormatSpecificationNameArray
:
[
1 item  
0
:
format_specification_read_dotcode
SectionImageParameterArray
:
[
3 items  
0
:
{
Section
:
ST_REGION_PREDETECTION
ImageParameterName
:
ip_read_dotcode
1
:
{
Section
:
ST_BARCODE_LOCALIZATION
ImageParameterName
:
ip_read_dotcode
2
:
{
Section
:
ST_BARCODE_DECODING
ImageParameterName
:
ip_read_dotcode
ImageParameterOptions
:
[
1 item  
0
:
{
Name
:
ip_read_dotcode
BinarizationModes
:
[
4 items  
0
:
{
Mode
:
BM_LOCAL_BLOCK
BlockSizeX
:
15
BlockSizeY
:
15
EnableFillBinaryVacancy
:
0
ThresholdCompensation
:
10
1
:
{
Mode
:
BM_LOCAL_BLOCK
BlockSizeX
:
21
BlockSizeY
:
21
EnableFillBinaryVacancy
:
0
ThresholdCompensation
:
10
MorphOperation
:
Erode
MorphOperationKernelSizeX
:
3
MorphOperationKernelSizeY
:
3
MorphShape
:
Ellipse
2
:
{
Mode
:
BM_LOCAL_BLOCK
BlockSizeX
:
35
BlockSizeY
:
35
EnableFillBinaryVacancy
:
0
ThresholdCompensation
:
10
MorphOperation
:
Erode
MorphOperationKernelSizeX
:
3
MorphOperationKernelSizeY
:
3
MorphShape
:
Ellipse
3
:
{
Mode
:
BM_LOCAL_BLOCK
BlockSizeX
:
45
BlockSizeY
:
45
EnableFillBinaryVacancy
:
0
ThresholdCompensation
:
25
MorphOperation
:
Erode
MorphOperationKernelSizeX
:
3
MorphOperationKernelSizeY
:
3
MorphShape
:
Ellipse
GrayscaleEnhancementModes
:
[
1 item  
0
:
{
Mode
:
GEM_GENERAL
GrayscaleTransformationModes
:
[
2 items  
0
:
{
Mode
:
GTM_INVERTED
1
:
{
Mode
:
GTM_ORIGINAL

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.
Single
Blur
With glare
Minimum quite zone
DotCode

Download Our Free Barcode Test Sheet

Curious about how our Dynamsoft Barcode Scanner SDK works in real-world applications? Download our free Barcode Test Sheet, a comprehensive PDF packed with different types of barcodes, batched barcodes or even damaged codes ready to be scanned. Explore the real-world examples to see how Dynamsoft can boost your scanning performance and tackle the challenges of difficult-to-read barcodes.

Barcode Test Sheet
barcode-test-sheet-illus.png