dynamsoft-barcode-reader
Advanced tools
Comparing version 10.2.10 to 10.4.20-beta-202409230220
{ | ||
"CaptureVisionTemplates": [ | ||
{ | ||
"Name": "Default" | ||
}, | ||
{ | ||
"Name": "ReadBarcodes_Default", | ||
"ImageROIProcessingNameArray": [ | ||
"roi-read-barcodes" | ||
], | ||
"Timeout": 10000 | ||
}, | ||
{ | ||
"Name": "ReadBarcodes_SpeedFirst", | ||
"ImageROIProcessingNameArray": [ | ||
"roi-read-barcodes-speed-first" | ||
], | ||
"Timeout": 10000 | ||
}, | ||
{ | ||
"Name": "ReadBarcodes_ReadRateFirst", | ||
"ImageROIProcessingNameArray": [ | ||
"roi-read-barcodes-read-rate" | ||
], | ||
"Timeout": 100000 | ||
}, | ||
{ | ||
"Name": "ReadSingleBarcode", | ||
"ImageROIProcessingNameArray": [ | ||
"roi-read-single-barcode" | ||
], | ||
"Timeout": 10000 | ||
}, | ||
{ | ||
"Name": "ReadBarcodes_Balance", | ||
"ImageROIProcessingNameArray": [ | ||
"roi-read-barcodes-balance" | ||
], | ||
"Timeout": 100000 | ||
}, | ||
{ | ||
"Name": "ReadDenseBarcodes", | ||
"ImageROIProcessingNameArray": [ | ||
"roi-read-barcodes-dense" | ||
], | ||
"Timeout": 10000 | ||
}, | ||
{ | ||
"Name": "ReadDistantBarcodes", | ||
"ImageROIProcessingNameArray": [ | ||
"roi-read-barcodes-distant" | ||
], | ||
"Timeout": 10000 | ||
} | ||
], | ||
"TargetROIDefOptions": [ | ||
{ | ||
"Name": "roi-read-barcodes", | ||
"TaskSettingNameArray": [ | ||
"task-read-barcodes" | ||
] | ||
}, | ||
{ | ||
"Name": "roi-read-barcodes-speed-first", | ||
"TaskSettingNameArray": [ | ||
"task-read-barcodes-speed-first" | ||
] | ||
}, | ||
{ | ||
"Name": "roi-read-barcodes-read-rate", | ||
"TaskSettingNameArray": [ | ||
"task-read-barcodes-read-rate" | ||
] | ||
}, | ||
{ | ||
"Name": "roi-read-single-barcode", | ||
"TaskSettingNameArray": [ | ||
"task-read-single-barcode" | ||
] | ||
}, | ||
{ | ||
"Name": "roi-read-barcodes-balance", | ||
"TaskSettingNameArray": [ | ||
"task-read-barcodes-balance" | ||
] | ||
}, | ||
{ | ||
"Name": "roi-read-barcodes-dense", | ||
"TaskSettingNameArray": [ | ||
"task-read-barcodes-dense" | ||
] | ||
}, | ||
{ | ||
"Name": "roi-read-barcodes-distant", | ||
"TaskSettingNameArray": [ | ||
"task-read-barcodes-distant" | ||
] | ||
} | ||
], | ||
"BarcodeFormatSpecificationOptions": [ | ||
{ | ||
"Name": "bfs1", | ||
"BarcodeFormatIds": [ | ||
"BF_PDF417", | ||
"BF_QR_CODE", | ||
"BF_DATAMATRIX", | ||
"BF_AZTEC", | ||
"BF_MICRO_QR", | ||
"BF_MICRO_PDF417", | ||
"BF_DOTCODE" | ||
], | ||
"MirrorMode": "MM_BOTH" | ||
}, | ||
{ | ||
"Name": "bfs2", | ||
"BarcodeFormatIds": [ | ||
"BF_ALL" | ||
], | ||
"MirrorMode": "MM_NORMAL" | ||
}, | ||
{ | ||
"Name": "bfs1-speed-first", | ||
"BaseBarcodeFormatSpecification": "bfs1" | ||
}, | ||
{ | ||
"Name": "bfs2-speed-first", | ||
"BaseBarcodeFormatSpecification": "bfs2" | ||
}, | ||
{ | ||
"Name": "bfs1-read-rate-first", | ||
"BaseBarcodeFormatSpecification": "bfs1" | ||
}, | ||
{ | ||
"Name": "bfs2-read-rate-first", | ||
"BaseBarcodeFormatSpecification": "bfs2" | ||
}, | ||
{ | ||
"Name": "bfs1-single-barcode", | ||
"BaseBarcodeFormatSpecification": "bfs1" | ||
}, | ||
{ | ||
"Name": "bfs2-single-barcode", | ||
"BaseBarcodeFormatSpecification": "bfs2" | ||
}, | ||
{ | ||
"Name": "bfs1-balance", | ||
"BaseBarcodeFormatSpecification": "bfs1" | ||
}, | ||
{ | ||
"Name": "bfs2-balance", | ||
"BaseBarcodeFormatSpecification": "bfs2" | ||
}, | ||
{ | ||
"Name": "bfs1-dense", | ||
"BaseBarcodeFormatSpecification": "bfs1" | ||
}, | ||
{ | ||
"Name": "bfs2-dense", | ||
"BaseBarcodeFormatSpecification": "bfs2" | ||
}, | ||
{ | ||
"Name": "bfs1-distant", | ||
"BaseBarcodeFormatSpecification": "bfs1" | ||
}, | ||
{ | ||
"Name": "bfs2-distant", | ||
"BaseBarcodeFormatSpecification": "bfs2" | ||
} | ||
], | ||
"BarcodeReaderTaskSettingOptions": [ | ||
{ | ||
"Name": "task-read-barcodes", | ||
"ExpectedBarcodesCount" : 1, | ||
"LocalizationModes": [ | ||
{ | ||
"Mode": "LM_SCAN_DIRECTLY", | ||
"ScanDirection": 2 | ||
}, | ||
{ | ||
"Mode": "LM_CONNECTED_BLOCKS" | ||
} | ||
], | ||
"DeblurModes": [ | ||
{ | ||
"Mode": "DM_BASED_ON_LOC_BIN" | ||
}, | ||
{ | ||
"Mode": "DM_THRESHOLD_BINARIZATION" | ||
} | ||
], | ||
"BarcodeFormatSpecificationNameArray": [ | ||
"bfs1", | ||
"bfs2" | ||
], | ||
"SectionImageParameterArray": [ | ||
{ | ||
"Section": "ST_REGION_PREDETECTION", | ||
"ImageParameterName": "ip-read-barcodes" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_LOCALIZATION", | ||
"ImageParameterName": "ip-read-barcodes" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_DECODING", | ||
"ImageParameterName": "ip-read-barcodes" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "task-read-barcodes-speed-first", | ||
"ExpectedBarcodesCount": 0, | ||
"BarcodeFormatIds" : [ "BF_DEFAULT" ], | ||
"LocalizationModes": [ | ||
{ | ||
"Mode": "LM_SCAN_DIRECTLY", | ||
"ScanDirection": 2 | ||
}, | ||
{ | ||
"Mode": "LM_CONNECTED_BLOCKS" | ||
} | ||
], | ||
"DeblurModes": [ | ||
{ | ||
"Mode": "DM_BASED_ON_LOC_BIN" | ||
}, | ||
{ | ||
"Mode": "DM_THRESHOLD_BINARIZATION" | ||
} | ||
], | ||
"BarcodeFormatSpecificationNameArray": [ | ||
"bfs1-speed-first", | ||
"bfs2-speed-first" | ||
], | ||
"SectionImageParameterArray": [ | ||
{ | ||
"Section": "ST_REGION_PREDETECTION", | ||
"ImageParameterName": "ip-read-barcodes-speed-first" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_LOCALIZATION", | ||
"ImageParameterName": "ip-read-barcodes-speed-first" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_DECODING", | ||
"ImageParameterName": "ip-read-barcodes-speed-first" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "task-read-barcodes-read-rate", | ||
"ExpectedBarcodesCount" : 999, | ||
"LocalizationModes": [ | ||
{ | ||
"Mode": "LM_CONNECTED_BLOCKS" | ||
}, | ||
{ | ||
"Mode": "LM_LINES" | ||
}, | ||
{ | ||
"Mode": "LM_STATISTICS" | ||
} | ||
], | ||
"DeblurModes": [ | ||
{ | ||
"Mode": "DM_BASED_ON_LOC_BIN" | ||
}, | ||
{ | ||
"Mode": "DM_THRESHOLD_BINARIZATION" | ||
}, | ||
{ | ||
"Mode": "DM_DIRECT_BINARIZATION" | ||
}, | ||
{ | ||
"Mode": "DM_SMOOTHING" | ||
} | ||
], | ||
"BarcodeFormatSpecificationNameArray": [ | ||
"bfs1-read-rate-first", | ||
"bfs2-read-rate-first" | ||
], | ||
"SectionImageParameterArray": [ | ||
{ | ||
"Section": "ST_REGION_PREDETECTION", | ||
"ImageParameterName": "ip-read-barcodes-read-rate" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_LOCALIZATION", | ||
"ImageParameterName": "ip-read-barcodes-read-rate" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_DECODING", | ||
"ImageParameterName": "ip-read-barcodes-read-rate" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "task-read-single-barcode", | ||
"ExpectedBarcodesCount": 1, | ||
"LocalizationModes": [ | ||
{ | ||
"Mode": "LM_SCAN_DIRECTLY", | ||
"ScanDirection": 2 | ||
}, | ||
{ | ||
"Mode": "LM_CONNECTED_BLOCKS" | ||
} | ||
], | ||
"DeblurModes": [ | ||
{ | ||
"Mode": "DM_BASED_ON_LOC_BIN" | ||
}, | ||
{ | ||
"Mode": "DM_THRESHOLD_BINARIZATION" | ||
} | ||
], | ||
"BarcodeFormatSpecificationNameArray": [ | ||
"bfs1-single-barcode", | ||
"bfs2-single-barcode" | ||
], | ||
"SectionImageParameterArray": [ | ||
{ | ||
"Section": "ST_REGION_PREDETECTION", | ||
"ImageParameterName": "ip-read-single-barcode" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_LOCALIZATION", | ||
"ImageParameterName": "ip-read-single-barcode" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_DECODING", | ||
"ImageParameterName": "ip-read-single-barcode" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "task-read-barcodes-balance", | ||
"ExpectedBarcodesCount" : 999, | ||
"LocalizationModes": [ | ||
{ | ||
"Mode": "LM_CONNECTED_BLOCKS" | ||
}, | ||
{ | ||
"Mode": "LM_SCAN_DIRECTLY" | ||
} | ||
], | ||
"DeblurModes": [ | ||
{ | ||
"Mode": "DM_BASED_ON_LOC_BIN" | ||
}, | ||
{ | ||
"Mode": "DM_THRESHOLD_BINARIZATION" | ||
}, | ||
{ | ||
"Mode": "DM_DIRECT_BINARIZATION" | ||
} | ||
], | ||
"BarcodeFormatSpecificationNameArray": [ | ||
"bfs1-balance", | ||
"bfs2-balance" | ||
], | ||
"SectionImageParameterArray": [ | ||
{ | ||
"Section": "ST_REGION_PREDETECTION", | ||
"ImageParameterName": "ip-read-barcodes-balance" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_LOCALIZATION", | ||
"ImageParameterName": "ip-read-barcodes-balance" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_DECODING", | ||
"ImageParameterName": "ip-read-barcodes-balance" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "task-read-barcodes-dense", | ||
"ExpectedBarcodesCount" : 0, | ||
"LocalizationModes": [ | ||
{ | ||
"Mode": "LM_CONNECTED_BLOCKS" | ||
}, | ||
{ | ||
"Mode": "LM_LINES" | ||
} | ||
], | ||
"DeblurModes": [ | ||
{ | ||
"Mode": "DM_BASED_ON_LOC_BIN" | ||
}, | ||
{ | ||
"Mode": "DM_THRESHOLD_BINARIZATION" | ||
}, | ||
{ | ||
"Mode": "DM_DIRECT_BINARIZATION" | ||
}, | ||
{ | ||
"Mode": "DM_SMOOTHING" | ||
}, | ||
{ | ||
"Mode": "DM_GRAY_EQUALIZATION" | ||
} | ||
], | ||
"BarcodeFormatSpecificationNameArray": [ | ||
"bfs1-dense", | ||
"bfs2-dense" | ||
], | ||
"SectionImageParameterArray": [ | ||
{ | ||
"Section": "ST_REGION_PREDETECTION", | ||
"ImageParameterName": "ip-read-barcodes-dense" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_LOCALIZATION", | ||
"ImageParameterName": "ip-read-barcodes-dense" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_DECODING", | ||
"ImageParameterName": "ip-read-barcodes-dense" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "task-read-barcodes-distant", | ||
"ExpectedBarcodesCount" : 0, | ||
"LocalizationModes": [ | ||
{ | ||
"Mode": "LM_CONNECTED_BLOCKS" | ||
}, | ||
{ | ||
"Mode": "LM_LINES" | ||
} | ||
], | ||
"DeblurModes": [ | ||
{ | ||
"Mode": "DM_BASED_ON_LOC_BIN" | ||
}, | ||
{ | ||
"Mode": "DM_THRESHOLD_BINARIZATION" | ||
}, | ||
{ | ||
"Mode": "DM_DIRECT_BINARIZATION" | ||
} | ||
], | ||
"BarcodeFormatSpecificationNameArray": [ | ||
"bfs1-distant", | ||
"bfs2-distant" | ||
], | ||
"SectionImageParameterArray": [ | ||
{ | ||
"Section": "ST_REGION_PREDETECTION", | ||
"ImageParameterName": "ip-read-barcodes-distant" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_LOCALIZATION", | ||
"ImageParameterName": "ip-read-barcodes-distant" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_DECODING", | ||
"ImageParameterName": "ip-read-barcodes-distant" | ||
} | ||
] | ||
} | ||
], | ||
"ImageParameterOptions": [ | ||
{ | ||
"Name": "ip-read-barcodes", | ||
"TextDetectionMode": { | ||
"Mode": "TTDM_LINE", | ||
"Direction": "UNKNOWN", | ||
"Sensitivity": 3 | ||
}, | ||
"IfEraseTextZone": 1, | ||
"BinarizationModes": [ | ||
{ | ||
"Mode": "BM_LOCAL_BLOCK", | ||
"BlockSizeX": 71, | ||
"BlockSizeY": 71, | ||
"EnableFillBinaryVacancy": 0 | ||
} | ||
], | ||
"GrayscaleTransformationModes" : [ | ||
{ | ||
"Mode": "GTM_ORIGINAL" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "ip-read-barcodes-speed-first", | ||
"TextDetectionMode": { | ||
"Mode": "TTDM_LINE", | ||
"Direction": "UNKNOWN", | ||
"Sensitivity": 3 | ||
}, | ||
"IfEraseTextZone": 1, | ||
"BinarizationModes": [ | ||
{ | ||
"Mode": "BM_LOCAL_BLOCK", | ||
"BlockSizeX": 71, | ||
"BlockSizeY": 71, | ||
"EnableFillBinaryVacancy": 0 | ||
} | ||
], | ||
"GrayscaleTransformationModes": [ | ||
{ | ||
"Mode": "GTM_ORIGINAL" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "ip-read-barcodes-read-rate", | ||
"TextDetectionMode": { | ||
"Mode": "TTDM_LINE", | ||
"Direction": "UNKNOWN", | ||
"Sensitivity": 3 | ||
}, | ||
"IfEraseTextZone": 1, | ||
"BinarizationModes": [ | ||
{ | ||
"Mode": "BM_LOCAL_BLOCK", | ||
"BlockSizeX": 0, | ||
"BlockSizeY": 0, | ||
"EnableFillBinaryVacancy": 1 | ||
} | ||
], | ||
"GrayscaleTransformationModes" : [ | ||
{ | ||
"Mode": "GTM_ORIGINAL" | ||
} | ||
], | ||
"ScaleDownThreshold" : 100000 | ||
}, | ||
{ | ||
"Name": "ip-read-single-barcode", | ||
"TextDetectionMode": { | ||
"Mode": "TTDM_LINE", | ||
"Direction": "UNKNOWN", | ||
"Sensitivity": 3 | ||
}, | ||
"IfEraseTextZone": 1, | ||
"BinarizationModes": [ | ||
{ | ||
"Mode": "BM_LOCAL_BLOCK", | ||
"BlockSizeX": 71, | ||
"BlockSizeY": 71, | ||
"EnableFillBinaryVacancy": 0 | ||
} | ||
], | ||
"GrayscaleTransformationModes": [ | ||
{ | ||
"Mode": "GTM_ORIGINAL" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "ip-read-barcodes-balance", | ||
"TextDetectionMode": { | ||
"Mode": "TTDM_LINE", | ||
"Direction": "UNKNOWN", | ||
"Sensitivity": 3 | ||
}, | ||
"IfEraseTextZone": 1, | ||
"BinarizationModes": [ | ||
{ | ||
"Mode": "BM_LOCAL_BLOCK", | ||
"BlockSizeX": 0, | ||
"BlockSizeY": 0, | ||
"EnableFillBinaryVacancy": 1 | ||
} | ||
], | ||
"GrayscaleTransformationModes" : [ | ||
{ | ||
"Mode": "GTM_ORIGINAL" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "ip-read-barcodes-dense", | ||
"TextDetectionMode": { | ||
"Mode": "TTDM_LINE", | ||
"Direction": "UNKNOWN", | ||
"Sensitivity": 3 | ||
}, | ||
"IfEraseTextZone": 1, | ||
"BinarizationModes": [ | ||
{ | ||
"Mode": "BM_LOCAL_BLOCK", | ||
"BlockSizeX": 0, | ||
"BlockSizeY": 0, | ||
"EnableFillBinaryVacancy": 1 | ||
} | ||
], | ||
"GrayscaleTransformationModes" : [ | ||
{ | ||
"Mode": "GTM_ORIGINAL" | ||
} | ||
], | ||
"ScaleDownThreshold" : 100000 | ||
}, | ||
{ | ||
"Name": "ip-read-barcodes-distant", | ||
"TextDetectionMode": { | ||
"Mode": "TTDM_LINE", | ||
"Direction": "UNKNOWN", | ||
"Sensitivity": 3 | ||
}, | ||
"IfEraseTextZone": 1, | ||
"BinarizationModes": [ | ||
{ | ||
"Mode": "BM_LOCAL_BLOCK", | ||
"BlockSizeX": 0, | ||
"BlockSizeY": 0, | ||
"EnableFillBinaryVacancy": 1 | ||
} | ||
], | ||
"GrayscaleTransformationModes" : [ | ||
{ | ||
"Mode": "GTM_ORIGINAL" | ||
} | ||
], | ||
"ScaleDownThreshold" : 2300 | ||
} | ||
] | ||
"CaptureVisionTemplates": [ | ||
{ | ||
"Name": "Default" | ||
}, | ||
{ | ||
"Name": "ReadBarcodes_Default", | ||
"ImageROIProcessingNameArray": [ | ||
"roi-read-barcodes" | ||
], | ||
"Timeout": 10000 | ||
}, | ||
{ | ||
"Name": "ReadBarcodes_SpeedFirst", | ||
"ImageROIProcessingNameArray": [ | ||
"roi-read-barcodes-speed-first" | ||
], | ||
"Timeout": 10000 | ||
}, | ||
{ | ||
"Name": "ReadBarcodes_ReadRateFirst", | ||
"ImageROIProcessingNameArray": [ | ||
"roi-read-barcodes-read-rate" | ||
], | ||
"Timeout": 100000 | ||
}, | ||
{ | ||
"Name": "ReadSingleBarcode", | ||
"ImageROIProcessingNameArray": [ | ||
"roi-read-single-barcode" | ||
], | ||
"Timeout": 10000 | ||
}, | ||
{ | ||
"Name": "ReadBarcodes_Balance", | ||
"ImageROIProcessingNameArray": [ | ||
"roi-read-barcodes-balance" | ||
], | ||
"Timeout": 100000 | ||
}, | ||
{ | ||
"Name": "ReadDenseBarcodes", | ||
"ImageROIProcessingNameArray": [ | ||
"roi-read-barcodes-dense" | ||
], | ||
"Timeout": 10000 | ||
}, | ||
{ | ||
"Name": "ReadDistantBarcodes", | ||
"ImageROIProcessingNameArray": [ | ||
"roi-read-barcodes-distant" | ||
], | ||
"Timeout": 10000 | ||
} | ||
], | ||
"TargetROIDefOptions": [ | ||
{ | ||
"Name": "roi-read-barcodes", | ||
"TaskSettingNameArray": [ | ||
"task-read-barcodes" | ||
] | ||
}, | ||
{ | ||
"Name": "roi-read-barcodes-speed-first", | ||
"TaskSettingNameArray": [ | ||
"task-read-barcodes-speed-first" | ||
] | ||
}, | ||
{ | ||
"Name": "roi-read-barcodes-read-rate", | ||
"TaskSettingNameArray": [ | ||
"task-read-barcodes-read-rate" | ||
] | ||
}, | ||
{ | ||
"Name": "roi-read-single-barcode", | ||
"TaskSettingNameArray": [ | ||
"task-read-single-barcode" | ||
] | ||
}, | ||
{ | ||
"Name": "roi-read-barcodes-balance", | ||
"TaskSettingNameArray": [ | ||
"task-read-barcodes-balance" | ||
] | ||
}, | ||
{ | ||
"Name": "roi-read-barcodes-dense", | ||
"TaskSettingNameArray": [ | ||
"task-read-barcodes-dense" | ||
] | ||
}, | ||
{ | ||
"Name": "roi-read-barcodes-distant", | ||
"TaskSettingNameArray": [ | ||
"task-read-barcodes-distant" | ||
] | ||
} | ||
], | ||
"BarcodeFormatSpecificationOptions": [ | ||
{ | ||
"Name": "bfs1", | ||
"BarcodeFormatIds": [ | ||
"BF_PDF417", | ||
"BF_QR_CODE", | ||
"BF_DATAMATRIX", | ||
"BF_AZTEC", | ||
"BF_MICRO_QR", | ||
"BF_MICRO_PDF417", | ||
"BF_DOTCODE" | ||
], | ||
"MirrorMode": "MM_BOTH" | ||
}, | ||
{ | ||
"Name": "bfs2", | ||
"BarcodeFormatIds": [ | ||
"BF_ALL" | ||
], | ||
"MirrorMode": "MM_NORMAL" | ||
}, | ||
{ | ||
"Name": "bfs1-speed-first", | ||
"BaseBarcodeFormatSpecification": "bfs1" | ||
}, | ||
{ | ||
"Name": "bfs2-speed-first", | ||
"BaseBarcodeFormatSpecification": "bfs2" | ||
}, | ||
{ | ||
"Name": "bfs1-read-rate-first", | ||
"BaseBarcodeFormatSpecification": "bfs1" | ||
}, | ||
{ | ||
"Name": "bfs2-read-rate-first", | ||
"BaseBarcodeFormatSpecification": "bfs2" | ||
}, | ||
{ | ||
"Name": "bfs1-single-barcode", | ||
"BaseBarcodeFormatSpecification": "bfs1" | ||
}, | ||
{ | ||
"Name": "bfs2-single-barcode", | ||
"BaseBarcodeFormatSpecification": "bfs2" | ||
}, | ||
{ | ||
"Name": "bfs1-balance", | ||
"BaseBarcodeFormatSpecification": "bfs1" | ||
}, | ||
{ | ||
"Name": "bfs2-balance", | ||
"BaseBarcodeFormatSpecification": "bfs2" | ||
}, | ||
{ | ||
"Name": "bfs1-dense", | ||
"BaseBarcodeFormatSpecification": "bfs1" | ||
}, | ||
{ | ||
"Name": "bfs2-dense", | ||
"BaseBarcodeFormatSpecification": "bfs2" | ||
}, | ||
{ | ||
"Name": "bfs1-distant", | ||
"BaseBarcodeFormatSpecification": "bfs1" | ||
}, | ||
{ | ||
"Name": "bfs2-distant", | ||
"BaseBarcodeFormatSpecification": "bfs2" | ||
} | ||
], | ||
"BarcodeReaderTaskSettingOptions": [ | ||
{ | ||
"Name": "task-read-barcodes", | ||
"ExpectedBarcodesCount": 0, | ||
"LocalizationModes": [ | ||
{ | ||
"Mode": "LM_CONNECTED_BLOCKS" | ||
}, | ||
{ | ||
"Mode": "LM_LINES" | ||
} | ||
], | ||
"DeblurModes": [ | ||
{ | ||
"Mode": "DM_BASED_ON_LOC_BIN" | ||
}, | ||
{ | ||
"Mode": "DM_THRESHOLD_BINARIZATION" | ||
} | ||
], | ||
"BarcodeFormatSpecificationNameArray": [ | ||
"bfs1", | ||
"bfs2" | ||
], | ||
"SectionImageParameterArray": [ | ||
{ | ||
"Section": "ST_REGION_PREDETECTION", | ||
"ImageParameterName": "ip-read-barcodes" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_LOCALIZATION", | ||
"ImageParameterName": "ip-read-barcodes" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_DECODING", | ||
"ImageParameterName": "ip-read-barcodes" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "task-read-barcodes-speed-first", | ||
"ExpectedBarcodesCount": 0, | ||
"LocalizationModes": [ | ||
{ | ||
"Mode": "LM_SCAN_DIRECTLY", | ||
"ScanDirection": 2 | ||
}, | ||
{ | ||
"Mode": "LM_CONNECTED_BLOCKS" | ||
} | ||
], | ||
"DeblurModes": [ | ||
{ | ||
"Mode": "DM_BASED_ON_LOC_BIN" | ||
}, | ||
{ | ||
"Mode": "DM_THRESHOLD_BINARIZATION" | ||
}, | ||
{ | ||
"Mode": "DM_DEEP_ANALYSIS" | ||
} | ||
], | ||
"BarcodeFormatSpecificationNameArray": [ | ||
"bfs1-speed-first", | ||
"bfs2-speed-first" | ||
], | ||
"SectionImageParameterArray": [ | ||
{ | ||
"Section": "ST_REGION_PREDETECTION", | ||
"ImageParameterName": "ip-read-barcodes-speed-first" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_LOCALIZATION", | ||
"ImageParameterName": "ip-read-barcodes-speed-first" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_DECODING", | ||
"ImageParameterName": "ip-read-barcodes-speed-first" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "task-read-barcodes-read-rate", | ||
"ExpectedBarcodesCount": 999, | ||
"LocalizationModes": [ | ||
{ | ||
"Mode": "LM_CONNECTED_BLOCKS" | ||
}, | ||
{ | ||
"Mode": "LM_LINES" | ||
}, | ||
{ | ||
"Mode": "LM_STATISTICS" | ||
} | ||
], | ||
"DeblurModes": [ | ||
{ | ||
"Mode": "DM_BASED_ON_LOC_BIN" | ||
}, | ||
{ | ||
"Mode": "DM_THRESHOLD_BINARIZATION" | ||
}, | ||
{ | ||
"Mode": "DM_DIRECT_BINARIZATION" | ||
}, | ||
{ | ||
"Mode": "DM_SMOOTHING" | ||
} | ||
], | ||
"BarcodeFormatSpecificationNameArray": [ | ||
"bfs1-read-rate-first", | ||
"bfs2-read-rate-first" | ||
], | ||
"SectionImageParameterArray": [ | ||
{ | ||
"Section": "ST_REGION_PREDETECTION", | ||
"ImageParameterName": "ip-read-barcodes-read-rate" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_LOCALIZATION", | ||
"ImageParameterName": "ip-read-barcodes-read-rate" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_DECODING", | ||
"ImageParameterName": "ip-read-barcodes-read-rate" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "task-read-single-barcode", | ||
"ExpectedBarcodesCount": 1, | ||
"LocalizationModes": [ | ||
{ | ||
"Mode": "LM_SCAN_DIRECTLY", | ||
"ScanDirection": 2 | ||
}, | ||
{ | ||
"Mode": "LM_CONNECTED_BLOCKS" | ||
} | ||
], | ||
"DeblurModes": [ | ||
{ | ||
"Mode": "DM_BASED_ON_LOC_BIN" | ||
}, | ||
{ | ||
"Mode": "DM_THRESHOLD_BINARIZATION" | ||
}, | ||
{ | ||
"Mode": "DM_DEEP_ANALYSIS" | ||
} | ||
], | ||
"BarcodeFormatSpecificationNameArray": [ | ||
"bfs1-single-barcode", | ||
"bfs2-single-barcode" | ||
], | ||
"SectionImageParameterArray": [ | ||
{ | ||
"Section": "ST_REGION_PREDETECTION", | ||
"ImageParameterName": "ip-read-single-barcode" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_LOCALIZATION", | ||
"ImageParameterName": "ip-read-single-barcode" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_DECODING", | ||
"ImageParameterName": "ip-read-single-barcode" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "task-read-barcodes-balance", | ||
"ExpectedBarcodesCount": 999, | ||
"LocalizationModes": [ | ||
{ | ||
"Mode": "LM_CONNECTED_BLOCKS" | ||
}, | ||
{ | ||
"Mode": "LM_SCAN_DIRECTLY" | ||
} | ||
], | ||
"DeblurModes": [ | ||
{ | ||
"Mode": "DM_BASED_ON_LOC_BIN" | ||
}, | ||
{ | ||
"Mode": "DM_THRESHOLD_BINARIZATION" | ||
}, | ||
{ | ||
"Mode": "DM_DIRECT_BINARIZATION" | ||
} | ||
], | ||
"BarcodeFormatSpecificationNameArray": [ | ||
"bfs1-balance", | ||
"bfs2-balance" | ||
], | ||
"SectionImageParameterArray": [ | ||
{ | ||
"Section": "ST_REGION_PREDETECTION", | ||
"ImageParameterName": "ip-read-barcodes-balance" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_LOCALIZATION", | ||
"ImageParameterName": "ip-read-barcodes-balance" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_DECODING", | ||
"ImageParameterName": "ip-read-barcodes-balance" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "task-read-barcodes-dense", | ||
"ExpectedBarcodesCount": 0, | ||
"LocalizationModes": [ | ||
{ | ||
"Mode": "LM_CONNECTED_BLOCKS" | ||
}, | ||
{ | ||
"Mode": "LM_LINES" | ||
} | ||
], | ||
"DeblurModes": [ | ||
{ | ||
"Mode": "DM_BASED_ON_LOC_BIN" | ||
}, | ||
{ | ||
"Mode": "DM_THRESHOLD_BINARIZATION" | ||
}, | ||
{ | ||
"Mode": "DM_DIRECT_BINARIZATION" | ||
}, | ||
{ | ||
"Mode": "DM_SMOOTHING" | ||
}, | ||
{ | ||
"Mode": "DM_GRAY_EQUALIZATION" | ||
} | ||
], | ||
"BarcodeFormatSpecificationNameArray": [ | ||
"bfs1-dense", | ||
"bfs2-dense" | ||
], | ||
"SectionImageParameterArray": [ | ||
{ | ||
"Section": "ST_REGION_PREDETECTION", | ||
"ImageParameterName": "ip-read-barcodes-dense" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_LOCALIZATION", | ||
"ImageParameterName": "ip-read-barcodes-dense" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_DECODING", | ||
"ImageParameterName": "ip-read-barcodes-dense" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "task-read-barcodes-distant", | ||
"ExpectedBarcodesCount": 0, | ||
"LocalizationModes": [ | ||
{ | ||
"Mode": "LM_CONNECTED_BLOCKS" | ||
}, | ||
{ | ||
"Mode": "LM_LINES" | ||
} | ||
], | ||
"DeblurModes": [ | ||
{ | ||
"Mode": "DM_BASED_ON_LOC_BIN" | ||
}, | ||
{ | ||
"Mode": "DM_THRESHOLD_BINARIZATION" | ||
}, | ||
{ | ||
"Mode": "DM_DIRECT_BINARIZATION" | ||
} | ||
], | ||
"BarcodeFormatSpecificationNameArray": [ | ||
"bfs1-distant", | ||
"bfs2-distant" | ||
], | ||
"SectionImageParameterArray": [ | ||
{ | ||
"Section": "ST_REGION_PREDETECTION", | ||
"ImageParameterName": "ip-read-barcodes-distant" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_LOCALIZATION", | ||
"ImageParameterName": "ip-read-barcodes-distant" | ||
}, | ||
{ | ||
"Section": "ST_BARCODE_DECODING", | ||
"ImageParameterName": "ip-read-barcodes-distant" | ||
} | ||
] | ||
} | ||
], | ||
"ImageParameterOptions": [ | ||
{ | ||
"Name": "ip-read-barcodes", | ||
"TextDetectionMode": { | ||
"Mode": "TTDM_LINE", | ||
"Direction": "UNKNOWN", | ||
"Sensitivity": 3 | ||
}, | ||
"IfEraseTextZone": 1, | ||
"BinarizationModes": [ | ||
{ | ||
"Mode": "BM_LOCAL_BLOCK", | ||
"BlockSizeX": 71, | ||
"BlockSizeY": 71, | ||
"EnableFillBinaryVacancy": 0 | ||
} | ||
], | ||
"GrayscaleTransformationModes": [ | ||
{ | ||
"Mode": "GTM_ORIGINAL" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "ip-read-barcodes-speed-first", | ||
"TextDetectionMode": { | ||
"Mode": "TTDM_LINE", | ||
"Direction": "UNKNOWN", | ||
"Sensitivity": 3 | ||
}, | ||
"IfEraseTextZone": 1, | ||
"BinarizationModes": [ | ||
{ | ||
"Mode": "BM_LOCAL_BLOCK", | ||
"BlockSizeX": 27, | ||
"BlockSizeY": 27, | ||
"EnableFillBinaryVacancy": 1 | ||
} | ||
], | ||
"GrayscaleTransformationModes": [ | ||
{ | ||
"Mode": "GTM_ORIGINAL" | ||
} | ||
], | ||
"ScaleDownThreshold": 2300 | ||
}, | ||
{ | ||
"Name": "ip-read-barcodes-read-rate", | ||
"TextDetectionMode": { | ||
"Mode": "TTDM_LINE", | ||
"Direction": "UNKNOWN", | ||
"Sensitivity": 3 | ||
}, | ||
"IfEraseTextZone": 1, | ||
"BinarizationModes": [ | ||
{ | ||
"Mode": "BM_LOCAL_BLOCK", | ||
"BlockSizeX": 0, | ||
"BlockSizeY": 0, | ||
"EnableFillBinaryVacancy": 1 | ||
} | ||
], | ||
"GrayscaleTransformationModes": [ | ||
{ | ||
"Mode": "GTM_ORIGINAL" | ||
} | ||
], | ||
"ScaleDownThreshold": 100000 | ||
}, | ||
{ | ||
"Name": "ip-read-single-barcode", | ||
"TextDetectionMode": { | ||
"Mode": "TTDM_LINE", | ||
"Direction": "UNKNOWN", | ||
"Sensitivity": 3 | ||
}, | ||
"IfEraseTextZone": 1, | ||
"BinarizationModes": [ | ||
{ | ||
"Mode": "BM_LOCAL_BLOCK", | ||
"BlockSizeX": 27, | ||
"BlockSizeY": 27, | ||
"EnableFillBinaryVacancy": 0 | ||
} | ||
], | ||
"GrayscaleTransformationModes": [ | ||
{ | ||
"Mode": "GTM_ORIGINAL" | ||
} | ||
], | ||
"ScaleDownThreshold": 2300 | ||
}, | ||
{ | ||
"Name": "ip-read-barcodes-balance", | ||
"TextDetectionMode": { | ||
"Mode": "TTDM_LINE", | ||
"Direction": "UNKNOWN", | ||
"Sensitivity": 3 | ||
}, | ||
"IfEraseTextZone": 1, | ||
"BinarizationModes": [ | ||
{ | ||
"Mode": "BM_LOCAL_BLOCK", | ||
"BlockSizeX": 0, | ||
"BlockSizeY": 0, | ||
"EnableFillBinaryVacancy": 1 | ||
} | ||
], | ||
"GrayscaleTransformationModes": [ | ||
{ | ||
"Mode": "GTM_ORIGINAL" | ||
} | ||
] | ||
}, | ||
{ | ||
"Name": "ip-read-barcodes-dense", | ||
"TextDetectionMode": { | ||
"Mode": "TTDM_LINE", | ||
"Direction": "UNKNOWN", | ||
"Sensitivity": 3 | ||
}, | ||
"IfEraseTextZone": 1, | ||
"BinarizationModes": [ | ||
{ | ||
"Mode": "BM_LOCAL_BLOCK", | ||
"BlockSizeX": 0, | ||
"BlockSizeY": 0, | ||
"EnableFillBinaryVacancy": 1 | ||
} | ||
], | ||
"GrayscaleTransformationModes": [ | ||
{ | ||
"Mode": "GTM_ORIGINAL" | ||
} | ||
], | ||
"ScaleDownThreshold": 100000 | ||
}, | ||
{ | ||
"Name": "ip-read-barcodes-distant", | ||
"TextDetectionMode": { | ||
"Mode": "TTDM_LINE", | ||
"Direction": "UNKNOWN", | ||
"Sensitivity": 3 | ||
}, | ||
"IfEraseTextZone": 1, | ||
"BinarizationModes": [ | ||
{ | ||
"Mode": "BM_LOCAL_BLOCK", | ||
"BlockSizeX": 0, | ||
"BlockSizeY": 0, | ||
"EnableFillBinaryVacancy": 1 | ||
} | ||
], | ||
"GrayscaleTransformationModes": [ | ||
{ | ||
"Mode": "GTM_ORIGINAL" | ||
} | ||
], | ||
"ScaleDownThreshold": 2300 | ||
} | ||
] | ||
} |
@@ -7,6 +7,6 @@ /*! | ||
* @author Dynamsoft | ||
* @version 10.2.10 | ||
* @version 10.4.20-beta-202409230220 | ||
* @fileoverview Dynamsoft JavaScript Library for Barcode Reader | ||
* More info on dbr JS: https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/ | ||
*/ | ||
import{engineResourcePaths as _,workerAutoResources as B,mapPackageRegister as A,compareVersion as I,innerVersions as E}from"dynamsoft-core";const T="undefined"==typeof self,D=(()=>{if(!T&&document.currentScript){let _=document.currentScript.src,B=_.indexOf("?");if(-1!=B)_=_.substring(0,B);else{let B=_.indexOf("#");-1!=B&&(_=_.substring(0,B))}return _.substring(0,_.lastIndexOf("/")+1)}return"./"})(),R=_=>{if(null==_&&(_="./"),T);else{let B=document.createElement("a");B.href=_,_=B.href}return _.endsWith("/")||(_+="/"),_};null==_.dbr&&(_.dbr=D),B.dbr={js:!1,wasm:!0,deps:["license","dip"]},A.dbr={};const F="1.2.0";"string"!=typeof _.std&&I(_.std.version,F)<0&&(_.std={version:F,path:R(D+`../../dynamsoft-capture-vision-std@${F}/dist/`)});const O="2.2.10";(!_.dip||"string"!=typeof _.dip&&I(_.dip.version,O)<0)&&(_.dip={version:O,path:R(D+`../../dynamsoft-image-processing@${O}/dist/`)});class C{static getVersion(){const _=E.dbr&&E.dbr.wasm,B=E.dbr&&E.dbr.worker;return`10.2.10(Worker: ${B||"Not Loaded"}, Wasm: ${_||"Not Loaded"})`}}const S="function"==typeof BigInt?{BF_NULL:BigInt(0),BF_ALL:BigInt(0x10000000000000000),BF_DEFAULT:BigInt(4265345023),BF_ONED:BigInt(3147775),BF_GS1_DATABAR:BigInt(260096),BF_CODE_39:BigInt(1),BF_CODE_128:BigInt(2),BF_CODE_93:BigInt(4),BF_CODABAR:BigInt(8),BF_ITF:BigInt(16),BF_EAN_13:BigInt(32),BF_EAN_8:BigInt(64),BF_UPC_A:BigInt(128),BF_UPC_E:BigInt(256),BF_INDUSTRIAL_25:BigInt(512),BF_CODE_39_EXTENDED:BigInt(1024),BF_GS1_DATABAR_OMNIDIRECTIONAL:BigInt(2048),BF_GS1_DATABAR_TRUNCATED:BigInt(4096),BF_GS1_DATABAR_STACKED:BigInt(8192),BF_GS1_DATABAR_STACKED_OMNIDIRECTIONAL:BigInt(16384),BF_GS1_DATABAR_EXPANDED:BigInt(32768),BF_GS1_DATABAR_EXPANDED_STACKED:BigInt(65536),BF_GS1_DATABAR_LIMITED:BigInt(131072),BF_PATCHCODE:BigInt(262144),BF_CODE_32:BigInt(16777216),BF_PDF417:BigInt(33554432),BF_QR_CODE:BigInt(67108864),BF_DATAMATRIX:BigInt(134217728),BF_AZTEC:BigInt(268435456),BF_MAXICODE:BigInt(536870912),BF_MICRO_QR:BigInt(1073741824),BF_MICRO_PDF417:BigInt(524288),BF_GS1_COMPOSITE:BigInt(2147483648),BF_MSI_CODE:BigInt(1048576),BF_CODE_11:BigInt(2097152),BF_TWO_DIGIT_ADD_ON:BigInt(4194304),BF_FIVE_DIGIT_ADD_ON:BigInt(8388608),BF_MATRIX_25:BigInt(68719476736),BF_POSTALCODE:BigInt(0x3f0000000000000),BF_NONSTANDARD_BARCODE:BigInt(4294967296),BF_USPSINTELLIGENTMAIL:BigInt(4503599627370496),BF_POSTNET:BigInt(9007199254740992),BF_PLANET:BigInt(0x40000000000000),BF_AUSTRALIANPOST:BigInt(0x80000000000000),BF_RM4SCC:BigInt(72057594037927940),BF_KIX:BigInt(0x200000000000000),BF_DOTCODE:BigInt(8589934592),BF_PHARMACODE_ONE_TRACK:BigInt(17179869184),BF_PHARMACODE_TWO_TRACK:BigInt(34359738368),BF_PHARMACODE:BigInt(51539607552)}:{BF_NULL:"0x00",BF_ALL:"0xFFFFFFFFFFFFFFFF",BF_DEFAULT:"0xFE3BFFFF",BF_ONED:"0x003007FF",BF_GS1_DATABAR:"0x0003F800",BF_CODE_39:"0x1",BF_CODE_128:"0x2",BF_CODE_93:"0x4",BF_CODABAR:"0x8",BF_ITF:"0x10",BF_EAN_13:"0x20",BF_EAN_8:"0x40",BF_UPC_A:"0x80",BF_UPC_E:"0x100",BF_INDUSTRIAL_25:"0x200",BF_CODE_39_EXTENDED:"0x400",BF_GS1_DATABAR_OMNIDIRECTIONAL:"0x800",BF_GS1_DATABAR_TRUNCATED:"0x1000",BF_GS1_DATABAR_STACKED:"0x2000",BF_GS1_DATABAR_STACKED_OMNIDIRECTIONAL:"0x4000",BF_GS1_DATABAR_EXPANDED:"0x8000",BF_GS1_DATABAR_EXPANDED_STACKED:"0x10000",BF_GS1_DATABAR_LIMITED:"0x20000",BF_PATCHCODE:"0x00040000",BF_CODE_32:"0x01000000",BF_PDF417:"0x02000000",BF_QR_CODE:"0x04000000",BF_DATAMATRIX:"0x08000000",BF_AZTEC:"0x10000000",BF_MAXICODE:"0x20000000",BF_MICRO_QR:"0x40000000",BF_MICRO_PDF417:"0x00080000",BF_GS1_COMPOSITE:"0x80000000",BF_MSI_CODE:"0x100000",BF_CODE_11:"0x200000",BF_TWO_DIGIT_ADD_ON:"0x400000",BF_FIVE_DIGIT_ADD_ON:"0x800000",BF_MATRIX_25:"0x1000000000",BF_POSTALCODE:"0x3F0000000000000",BF_NONSTANDARD_BARCODE:"0x100000000",BF_USPSINTELLIGENTMAIL:"0x10000000000000",BF_POSTNET:"0x20000000000000",BF_PLANET:"0x40000000000000",BF_AUSTRALIANPOST:"0x80000000000000",BF_RM4SCC:"0x100000000000000",BF_KIX:"0x200000000000000",BF_DOTCODE:"0x200000000",BF_PHARMACODE_ONE_TRACK:"0x400000000",BF_PHARMACODE_TWO_TRACK:"0x800000000",BF_PHARMACODE:"0xC00000000"};var t,N,n,i;!function(_){_[_.EBRT_STANDARD_RESULT=0]="EBRT_STANDARD_RESULT",_[_.EBRT_CANDIDATE_RESULT=1]="EBRT_CANDIDATE_RESULT",_[_.EBRT_PARTIAL_RESULT=2]="EBRT_PARTIAL_RESULT"}(t||(t={})),function(_){_[_.QRECL_ERROR_CORRECTION_H=0]="QRECL_ERROR_CORRECTION_H",_[_.QRECL_ERROR_CORRECTION_L=1]="QRECL_ERROR_CORRECTION_L",_[_.QRECL_ERROR_CORRECTION_M=2]="QRECL_ERROR_CORRECTION_M",_[_.QRECL_ERROR_CORRECTION_Q=3]="QRECL_ERROR_CORRECTION_Q"}(N||(N={})),function(_){_[_.LM_AUTO=1]="LM_AUTO",_[_.LM_CONNECTED_BLOCKS=2]="LM_CONNECTED_BLOCKS",_[_.LM_STATISTICS=4]="LM_STATISTICS",_[_.LM_LINES=8]="LM_LINES",_[_.LM_SCAN_DIRECTLY=16]="LM_SCAN_DIRECTLY",_[_.LM_STATISTICS_MARKS=32]="LM_STATISTICS_MARKS",_[_.LM_STATISTICS_POSTAL_CODE=64]="LM_STATISTICS_POSTAL_CODE",_[_.LM_CENTRE=128]="LM_CENTRE",_[_.LM_ONED_FAST_SCAN=256]="LM_ONED_FAST_SCAN",_[_.LM_REV=-2147483648]="LM_REV",_[_.LM_SKIP=0]="LM_SKIP"}(n||(n={})),function(_){_[_.DM_DIRECT_BINARIZATION=1]="DM_DIRECT_BINARIZATION",_[_.DM_THRESHOLD_BINARIZATION=2]="DM_THRESHOLD_BINARIZATION",_[_.DM_GRAY_EQUALIZATION=4]="DM_GRAY_EQUALIZATION",_[_.DM_SMOOTHING=8]="DM_SMOOTHING",_[_.DM_MORPHING=16]="DM_MORPHING",_[_.DM_DEEP_ANALYSIS=32]="DM_DEEP_ANALYSIS",_[_.DM_SHARPENING=64]="DM_SHARPENING",_[_.DM_BASED_ON_LOC_BIN=128]="DM_BASED_ON_LOC_BIN",_[_.DM_SHARPENING_SMOOTHING=256]="DM_SHARPENING_SMOOTHING",_[_.DM_REV=-2147483648]="DM_REV",_[_.DM_SKIP=0]="DM_SKIP"}(i||(i={}));export{C as BarcodeReaderModule,S as EnumBarcodeFormat,i as EnumDeblurMode,t as EnumExtendedBarcodeResultType,n as EnumLocalizationMode,N as EnumQRCodeErrorCorrectionLevel}; | ||
import{autoDiscoveryPaths as _,workerAutoResources as I,mapPackageRegister as B,compareVersion as A,innerVersions as E}from"dynamsoft-core";const R="undefined"==typeof self,T=(()=>{if(!R&&document.currentScript){let _=document.currentScript.src,I=_.indexOf("?");if(-1!=I)_=_.substring(0,I);else{let I=_.indexOf("#");-1!=I&&(_=_.substring(0,I))}return _.substring(0,_.lastIndexOf("/")+1)}return"./"})(),t=_=>{if(null==_&&(_="./"),R);else{let I=document.createElement("a");I.href=_,_=I.href}return _.endsWith("/")||(_+="/"),_};_.dbr={version:"10.4.20-beta-202409230220",path:T},I.dbr={js:!1,wasm:!0,deps:["license","dip"]},B.dbr={};const D="1.4.10";"string"!=typeof _.std&&A(_.std.version,D)<0&&(_.std={version:D,path:t(T+`../../dynamsoft-capture-vision-std@${D}/dist/`)});const n="2.4.20";(!_.dip||"string"!=typeof _.dip&&A(_.dip.version,n)<0)&&(_.dip={version:n,path:t(T+`../../dynamsoft-image-processing@${n}/dist/`)});class O{static getVersion(){const _=E.dbr&&E.dbr.wasm,I=E.dbr&&E.dbr.worker;return`10.4.20-beta-202409230220(Worker: ${I||"Not Loaded"}, Wasm: ${_||"Not Loaded"})`}}const i={BF_NULL:BigInt(0),BF_ALL:BigInt("0xFFFFFFFEFFFFFFFF"),BF_DEFAULT:BigInt(4265345023),BF_ONED:BigInt(3147775),BF_GS1_DATABAR:BigInt(260096),BF_CODE_39:BigInt(1),BF_CODE_128:BigInt(2),BF_CODE_93:BigInt(4),BF_CODABAR:BigInt(8),BF_ITF:BigInt(16),BF_EAN_13:BigInt(32),BF_EAN_8:BigInt(64),BF_UPC_A:BigInt(128),BF_UPC_E:BigInt(256),BF_INDUSTRIAL_25:BigInt(512),BF_CODE_39_EXTENDED:BigInt(1024),BF_GS1_DATABAR_OMNIDIRECTIONAL:BigInt(2048),BF_GS1_DATABAR_TRUNCATED:BigInt(4096),BF_GS1_DATABAR_STACKED:BigInt(8192),BF_GS1_DATABAR_STACKED_OMNIDIRECTIONAL:BigInt(16384),BF_GS1_DATABAR_EXPANDED:BigInt(32768),BF_GS1_DATABAR_EXPANDED_STACKED:BigInt(65536),BF_GS1_DATABAR_LIMITED:BigInt(131072),BF_PATCHCODE:BigInt(262144),BF_CODE_32:BigInt(16777216),BF_PDF417:BigInt(33554432),BF_QR_CODE:BigInt(67108864),BF_DATAMATRIX:BigInt(134217728),BF_AZTEC:BigInt(268435456),BF_MAXICODE:BigInt(536870912),BF_MICRO_QR:BigInt(1073741824),BF_MICRO_PDF417:BigInt(524288),BF_GS1_COMPOSITE:BigInt(2147483648),BF_MSI_CODE:BigInt(1048576),BF_CODE_11:BigInt(2097152),BF_TWO_DIGIT_ADD_ON:BigInt(4194304),BF_FIVE_DIGIT_ADD_ON:BigInt(8388608),BF_MATRIX_25:BigInt(68719476736),BF_POSTALCODE:BigInt(0x3f0000000000000),BF_NONSTANDARD_BARCODE:BigInt(4294967296),BF_USPSINTELLIGENTMAIL:BigInt(4503599627370496),BF_POSTNET:BigInt(9007199254740992),BF_PLANET:BigInt(0x40000000000000),BF_AUSTRALIANPOST:BigInt(0x80000000000000),BF_RM4SCC:BigInt(72057594037927940),BF_KIX:BigInt(0x200000000000000),BF_DOTCODE:BigInt(8589934592),BF_PHARMACODE_ONE_TRACK:BigInt(17179869184),BF_PHARMACODE_TWO_TRACK:BigInt(34359738368),BF_PHARMACODE:BigInt(51539607552)};var C,S,N,L;!function(_){_[_.EBRT_STANDARD_RESULT=0]="EBRT_STANDARD_RESULT",_[_.EBRT_CANDIDATE_RESULT=1]="EBRT_CANDIDATE_RESULT",_[_.EBRT_PARTIAL_RESULT=2]="EBRT_PARTIAL_RESULT"}(C||(C={})),function(_){_[_.QRECL_ERROR_CORRECTION_H=0]="QRECL_ERROR_CORRECTION_H",_[_.QRECL_ERROR_CORRECTION_L=1]="QRECL_ERROR_CORRECTION_L",_[_.QRECL_ERROR_CORRECTION_M=2]="QRECL_ERROR_CORRECTION_M",_[_.QRECL_ERROR_CORRECTION_Q=3]="QRECL_ERROR_CORRECTION_Q"}(S||(S={})),function(_){_[_.LM_AUTO=1]="LM_AUTO",_[_.LM_CONNECTED_BLOCKS=2]="LM_CONNECTED_BLOCKS",_[_.LM_STATISTICS=4]="LM_STATISTICS",_[_.LM_LINES=8]="LM_LINES",_[_.LM_SCAN_DIRECTLY=16]="LM_SCAN_DIRECTLY",_[_.LM_STATISTICS_MARKS=32]="LM_STATISTICS_MARKS",_[_.LM_STATISTICS_POSTAL_CODE=64]="LM_STATISTICS_POSTAL_CODE",_[_.LM_CENTRE=128]="LM_CENTRE",_[_.LM_ONED_FAST_SCAN=256]="LM_ONED_FAST_SCAN",_[_.LM_REV=-2147483648]="LM_REV",_[_.LM_SKIP=0]="LM_SKIP"}(N||(N={})),function(_){_[_.DM_DIRECT_BINARIZATION=1]="DM_DIRECT_BINARIZATION",_[_.DM_THRESHOLD_BINARIZATION=2]="DM_THRESHOLD_BINARIZATION",_[_.DM_GRAY_EQUALIZATION=4]="DM_GRAY_EQUALIZATION",_[_.DM_SMOOTHING=8]="DM_SMOOTHING",_[_.DM_MORPHING=16]="DM_MORPHING",_[_.DM_DEEP_ANALYSIS=32]="DM_DEEP_ANALYSIS",_[_.DM_SHARPENING=64]="DM_SHARPENING",_[_.DM_BASED_ON_LOC_BIN=128]="DM_BASED_ON_LOC_BIN",_[_.DM_SHARPENING_SMOOTHING=256]="DM_SHARPENING_SMOOTHING",_[_.DM_REV=-2147483648]="DM_REV",_[_.DM_SKIP=0]="DM_SKIP"}(L||(L={}));export{O as BarcodeReaderModule,i as EnumBarcodeFormat,L as EnumDeblurMode,C as EnumExtendedBarcodeResultType,N as EnumLocalizationMode,S as EnumQRCodeErrorCorrectionLevel}; |
@@ -7,6 +7,6 @@ /*! | ||
* @author Dynamsoft | ||
* @version 10.2.10 | ||
* @version 10.4.20-beta-202409230220 | ||
* @fileoverview Dynamsoft JavaScript Library for Barcode Reader | ||
* More info on dbr JS: https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/ | ||
*/ | ||
!function(_,B){"object"==typeof exports&&"undefined"!=typeof module?B(exports,require("dynamsoft-core")):"function"==typeof define&&define.amd?define(["exports","dynamsoft-core"],B):B(((_="undefined"!=typeof globalThis?globalThis:_||self).Dynamsoft=_.Dynamsoft||{},_.Dynamsoft.DBR={}),_.Dynamsoft.Core)}(this,(function(_,B){"use strict";const A="undefined"==typeof self,E=(()=>{if(!A&&document.currentScript){let _=document.currentScript.src,B=_.indexOf("?");if(-1!=B)_=_.substring(0,B);else{let B=_.indexOf("#");-1!=B&&(_=_.substring(0,B))}return _.substring(0,_.lastIndexOf("/")+1)}return"./"})(),e=_=>{if(null==_&&(_="./"),A);else{let B=document.createElement("a");B.href=_,_=B.href}return _.endsWith("/")||(_+="/"),_};null==B.engineResourcePaths.dbr&&(B.engineResourcePaths.dbr=E),B.workerAutoResources.dbr={js:!1,wasm:!0,deps:["license","dip"]},B.mapPackageRegister.dbr={};const I="1.2.0";"string"!=typeof B.engineResourcePaths.std&&B.compareVersion(B.engineResourcePaths.std.version,I)<0&&(B.engineResourcePaths.std={version:I,path:e(E+`../../dynamsoft-capture-vision-std@${I}/dist/`)});const n="2.2.10";(!B.engineResourcePaths.dip||"string"!=typeof B.engineResourcePaths.dip&&B.compareVersion(B.engineResourcePaths.dip.version,n)<0)&&(B.engineResourcePaths.dip={version:n,path:e(E+`../../dynamsoft-image-processing@${n}/dist/`)});const R="function"==typeof BigInt?{BF_NULL:BigInt(0),BF_ALL:BigInt(0x10000000000000000),BF_DEFAULT:BigInt(4265345023),BF_ONED:BigInt(3147775),BF_GS1_DATABAR:BigInt(260096),BF_CODE_39:BigInt(1),BF_CODE_128:BigInt(2),BF_CODE_93:BigInt(4),BF_CODABAR:BigInt(8),BF_ITF:BigInt(16),BF_EAN_13:BigInt(32),BF_EAN_8:BigInt(64),BF_UPC_A:BigInt(128),BF_UPC_E:BigInt(256),BF_INDUSTRIAL_25:BigInt(512),BF_CODE_39_EXTENDED:BigInt(1024),BF_GS1_DATABAR_OMNIDIRECTIONAL:BigInt(2048),BF_GS1_DATABAR_TRUNCATED:BigInt(4096),BF_GS1_DATABAR_STACKED:BigInt(8192),BF_GS1_DATABAR_STACKED_OMNIDIRECTIONAL:BigInt(16384),BF_GS1_DATABAR_EXPANDED:BigInt(32768),BF_GS1_DATABAR_EXPANDED_STACKED:BigInt(65536),BF_GS1_DATABAR_LIMITED:BigInt(131072),BF_PATCHCODE:BigInt(262144),BF_CODE_32:BigInt(16777216),BF_PDF417:BigInt(33554432),BF_QR_CODE:BigInt(67108864),BF_DATAMATRIX:BigInt(134217728),BF_AZTEC:BigInt(268435456),BF_MAXICODE:BigInt(536870912),BF_MICRO_QR:BigInt(1073741824),BF_MICRO_PDF417:BigInt(524288),BF_GS1_COMPOSITE:BigInt(2147483648),BF_MSI_CODE:BigInt(1048576),BF_CODE_11:BigInt(2097152),BF_TWO_DIGIT_ADD_ON:BigInt(4194304),BF_FIVE_DIGIT_ADD_ON:BigInt(8388608),BF_MATRIX_25:BigInt(68719476736),BF_POSTALCODE:BigInt(0x3f0000000000000),BF_NONSTANDARD_BARCODE:BigInt(4294967296),BF_USPSINTELLIGENTMAIL:BigInt(4503599627370496),BF_POSTNET:BigInt(9007199254740992),BF_PLANET:BigInt(0x40000000000000),BF_AUSTRALIANPOST:BigInt(0x80000000000000),BF_RM4SCC:BigInt(72057594037927940),BF_KIX:BigInt(0x200000000000000),BF_DOTCODE:BigInt(8589934592),BF_PHARMACODE_ONE_TRACK:BigInt(17179869184),BF_PHARMACODE_TWO_TRACK:BigInt(34359738368),BF_PHARMACODE:BigInt(51539607552)}:{BF_NULL:"0x00",BF_ALL:"0xFFFFFFFFFFFFFFFF",BF_DEFAULT:"0xFE3BFFFF",BF_ONED:"0x003007FF",BF_GS1_DATABAR:"0x0003F800",BF_CODE_39:"0x1",BF_CODE_128:"0x2",BF_CODE_93:"0x4",BF_CODABAR:"0x8",BF_ITF:"0x10",BF_EAN_13:"0x20",BF_EAN_8:"0x40",BF_UPC_A:"0x80",BF_UPC_E:"0x100",BF_INDUSTRIAL_25:"0x200",BF_CODE_39_EXTENDED:"0x400",BF_GS1_DATABAR_OMNIDIRECTIONAL:"0x800",BF_GS1_DATABAR_TRUNCATED:"0x1000",BF_GS1_DATABAR_STACKED:"0x2000",BF_GS1_DATABAR_STACKED_OMNIDIRECTIONAL:"0x4000",BF_GS1_DATABAR_EXPANDED:"0x8000",BF_GS1_DATABAR_EXPANDED_STACKED:"0x10000",BF_GS1_DATABAR_LIMITED:"0x20000",BF_PATCHCODE:"0x00040000",BF_CODE_32:"0x01000000",BF_PDF417:"0x02000000",BF_QR_CODE:"0x04000000",BF_DATAMATRIX:"0x08000000",BF_AZTEC:"0x10000000",BF_MAXICODE:"0x20000000",BF_MICRO_QR:"0x40000000",BF_MICRO_PDF417:"0x00080000",BF_GS1_COMPOSITE:"0x80000000",BF_MSI_CODE:"0x100000",BF_CODE_11:"0x200000",BF_TWO_DIGIT_ADD_ON:"0x400000",BF_FIVE_DIGIT_ADD_ON:"0x800000",BF_MATRIX_25:"0x1000000000",BF_POSTALCODE:"0x3F0000000000000",BF_NONSTANDARD_BARCODE:"0x100000000",BF_USPSINTELLIGENTMAIL:"0x10000000000000",BF_POSTNET:"0x20000000000000",BF_PLANET:"0x40000000000000",BF_AUSTRALIANPOST:"0x80000000000000",BF_RM4SCC:"0x100000000000000",BF_KIX:"0x200000000000000",BF_DOTCODE:"0x200000000",BF_PHARMACODE_ONE_TRACK:"0x400000000",BF_PHARMACODE_TWO_TRACK:"0x800000000",BF_PHARMACODE:"0xC00000000"};var D,T,t,F;_.EnumExtendedBarcodeResultType=void 0,(D=_.EnumExtendedBarcodeResultType||(_.EnumExtendedBarcodeResultType={}))[D.EBRT_STANDARD_RESULT=0]="EBRT_STANDARD_RESULT",D[D.EBRT_CANDIDATE_RESULT=1]="EBRT_CANDIDATE_RESULT",D[D.EBRT_PARTIAL_RESULT=2]="EBRT_PARTIAL_RESULT",_.EnumQRCodeErrorCorrectionLevel=void 0,(T=_.EnumQRCodeErrorCorrectionLevel||(_.EnumQRCodeErrorCorrectionLevel={}))[T.QRECL_ERROR_CORRECTION_H=0]="QRECL_ERROR_CORRECTION_H",T[T.QRECL_ERROR_CORRECTION_L=1]="QRECL_ERROR_CORRECTION_L",T[T.QRECL_ERROR_CORRECTION_M=2]="QRECL_ERROR_CORRECTION_M",T[T.QRECL_ERROR_CORRECTION_Q=3]="QRECL_ERROR_CORRECTION_Q",_.EnumLocalizationMode=void 0,(t=_.EnumLocalizationMode||(_.EnumLocalizationMode={}))[t.LM_AUTO=1]="LM_AUTO",t[t.LM_CONNECTED_BLOCKS=2]="LM_CONNECTED_BLOCKS",t[t.LM_STATISTICS=4]="LM_STATISTICS",t[t.LM_LINES=8]="LM_LINES",t[t.LM_SCAN_DIRECTLY=16]="LM_SCAN_DIRECTLY",t[t.LM_STATISTICS_MARKS=32]="LM_STATISTICS_MARKS",t[t.LM_STATISTICS_POSTAL_CODE=64]="LM_STATISTICS_POSTAL_CODE",t[t.LM_CENTRE=128]="LM_CENTRE",t[t.LM_ONED_FAST_SCAN=256]="LM_ONED_FAST_SCAN",t[t.LM_REV=-2147483648]="LM_REV",t[t.LM_SKIP=0]="LM_SKIP",_.EnumDeblurMode=void 0,(F=_.EnumDeblurMode||(_.EnumDeblurMode={}))[F.DM_DIRECT_BINARIZATION=1]="DM_DIRECT_BINARIZATION",F[F.DM_THRESHOLD_BINARIZATION=2]="DM_THRESHOLD_BINARIZATION",F[F.DM_GRAY_EQUALIZATION=4]="DM_GRAY_EQUALIZATION",F[F.DM_SMOOTHING=8]="DM_SMOOTHING",F[F.DM_MORPHING=16]="DM_MORPHING",F[F.DM_DEEP_ANALYSIS=32]="DM_DEEP_ANALYSIS",F[F.DM_SHARPENING=64]="DM_SHARPENING",F[F.DM_BASED_ON_LOC_BIN=128]="DM_BASED_ON_LOC_BIN",F[F.DM_SHARPENING_SMOOTHING=256]="DM_SHARPENING_SMOOTHING",F[F.DM_REV=-2147483648]="DM_REV",F[F.DM_SKIP=0]="DM_SKIP",_.BarcodeReaderModule=class{static getVersion(){const _=B.innerVersions.dbr&&B.innerVersions.dbr.wasm,A=B.innerVersions.dbr&&B.innerVersions.dbr.worker;return`10.2.10(Worker: ${A||"Not Loaded"}, Wasm: ${_||"Not Loaded"})`}},_.EnumBarcodeFormat=R,Object.defineProperty(_,"__esModule",{value:!0})})); | ||
!function(_,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("dynamsoft-core")):"function"==typeof define&&define.amd?define(["exports","dynamsoft-core"],t):t(((_="undefined"!=typeof globalThis?globalThis:_||self).Dynamsoft=_.Dynamsoft||{},_.Dynamsoft.DBR={}),_.Dynamsoft.Core)}(this,(function(_,t){"use strict";const e="undefined"==typeof self,n=(()=>{if(!e&&document.currentScript){let _=document.currentScript.src,t=_.indexOf("?");if(-1!=t)_=_.substring(0,t);else{let t=_.indexOf("#");-1!=t&&(_=_.substring(0,t))}return _.substring(0,_.lastIndexOf("/")+1)}return"./"})(),I=_=>{if(null==_&&(_="./"),e);else{let t=document.createElement("a");t.href=_,_=t.href}return _.endsWith("/")||(_+="/"),_};t.autoDiscoveryPaths.dbr={version:"10.4.20-beta-202409230220",path:n},t.workerAutoResources.dbr={js:!1,wasm:!0,deps:["license","dip"]},t.mapPackageRegister.dbr={};const E="1.4.10";"string"!=typeof t.autoDiscoveryPaths.std&&t.compareVersion(t.autoDiscoveryPaths.std.version,E)<0&&(t.autoDiscoveryPaths.std={version:E,path:I(n+`../../dynamsoft-capture-vision-std@${E}/dist/`)});const B="2.4.20";(!t.autoDiscoveryPaths.dip||"string"!=typeof t.autoDiscoveryPaths.dip&&t.compareVersion(t.autoDiscoveryPaths.dip.version,B)<0)&&(t.autoDiscoveryPaths.dip={version:B,path:I(n+`../../dynamsoft-image-processing@${B}/dist/`)});const i={BF_NULL:BigInt(0),BF_ALL:BigInt("0xFFFFFFFEFFFFFFFF"),BF_DEFAULT:BigInt(4265345023),BF_ONED:BigInt(3147775),BF_GS1_DATABAR:BigInt(260096),BF_CODE_39:BigInt(1),BF_CODE_128:BigInt(2),BF_CODE_93:BigInt(4),BF_CODABAR:BigInt(8),BF_ITF:BigInt(16),BF_EAN_13:BigInt(32),BF_EAN_8:BigInt(64),BF_UPC_A:BigInt(128),BF_UPC_E:BigInt(256),BF_INDUSTRIAL_25:BigInt(512),BF_CODE_39_EXTENDED:BigInt(1024),BF_GS1_DATABAR_OMNIDIRECTIONAL:BigInt(2048),BF_GS1_DATABAR_TRUNCATED:BigInt(4096),BF_GS1_DATABAR_STACKED:BigInt(8192),BF_GS1_DATABAR_STACKED_OMNIDIRECTIONAL:BigInt(16384),BF_GS1_DATABAR_EXPANDED:BigInt(32768),BF_GS1_DATABAR_EXPANDED_STACKED:BigInt(65536),BF_GS1_DATABAR_LIMITED:BigInt(131072),BF_PATCHCODE:BigInt(262144),BF_CODE_32:BigInt(16777216),BF_PDF417:BigInt(33554432),BF_QR_CODE:BigInt(67108864),BF_DATAMATRIX:BigInt(134217728),BF_AZTEC:BigInt(268435456),BF_MAXICODE:BigInt(536870912),BF_MICRO_QR:BigInt(1073741824),BF_MICRO_PDF417:BigInt(524288),BF_GS1_COMPOSITE:BigInt(2147483648),BF_MSI_CODE:BigInt(1048576),BF_CODE_11:BigInt(2097152),BF_TWO_DIGIT_ADD_ON:BigInt(4194304),BF_FIVE_DIGIT_ADD_ON:BigInt(8388608),BF_MATRIX_25:BigInt(68719476736),BF_POSTALCODE:BigInt(0x3f0000000000000),BF_NONSTANDARD_BARCODE:BigInt(4294967296),BF_USPSINTELLIGENTMAIL:BigInt(4503599627370496),BF_POSTNET:BigInt(9007199254740992),BF_PLANET:BigInt(0x40000000000000),BF_AUSTRALIANPOST:BigInt(0x80000000000000),BF_RM4SCC:BigInt(72057594037927940),BF_KIX:BigInt(0x200000000000000),BF_DOTCODE:BigInt(8589934592),BF_PHARMACODE_ONE_TRACK:BigInt(17179869184),BF_PHARMACODE_TWO_TRACK:BigInt(34359738368),BF_PHARMACODE:BigInt(51539607552)};var R,A,T,D;_.EnumExtendedBarcodeResultType=void 0,(R=_.EnumExtendedBarcodeResultType||(_.EnumExtendedBarcodeResultType={}))[R.EBRT_STANDARD_RESULT=0]="EBRT_STANDARD_RESULT",R[R.EBRT_CANDIDATE_RESULT=1]="EBRT_CANDIDATE_RESULT",R[R.EBRT_PARTIAL_RESULT=2]="EBRT_PARTIAL_RESULT",_.EnumQRCodeErrorCorrectionLevel=void 0,(A=_.EnumQRCodeErrorCorrectionLevel||(_.EnumQRCodeErrorCorrectionLevel={}))[A.QRECL_ERROR_CORRECTION_H=0]="QRECL_ERROR_CORRECTION_H",A[A.QRECL_ERROR_CORRECTION_L=1]="QRECL_ERROR_CORRECTION_L",A[A.QRECL_ERROR_CORRECTION_M=2]="QRECL_ERROR_CORRECTION_M",A[A.QRECL_ERROR_CORRECTION_Q=3]="QRECL_ERROR_CORRECTION_Q",_.EnumLocalizationMode=void 0,(T=_.EnumLocalizationMode||(_.EnumLocalizationMode={}))[T.LM_AUTO=1]="LM_AUTO",T[T.LM_CONNECTED_BLOCKS=2]="LM_CONNECTED_BLOCKS",T[T.LM_STATISTICS=4]="LM_STATISTICS",T[T.LM_LINES=8]="LM_LINES",T[T.LM_SCAN_DIRECTLY=16]="LM_SCAN_DIRECTLY",T[T.LM_STATISTICS_MARKS=32]="LM_STATISTICS_MARKS",T[T.LM_STATISTICS_POSTAL_CODE=64]="LM_STATISTICS_POSTAL_CODE",T[T.LM_CENTRE=128]="LM_CENTRE",T[T.LM_ONED_FAST_SCAN=256]="LM_ONED_FAST_SCAN",T[T.LM_REV=-2147483648]="LM_REV",T[T.LM_SKIP=0]="LM_SKIP",_.EnumDeblurMode=void 0,(D=_.EnumDeblurMode||(_.EnumDeblurMode={}))[D.DM_DIRECT_BINARIZATION=1]="DM_DIRECT_BINARIZATION",D[D.DM_THRESHOLD_BINARIZATION=2]="DM_THRESHOLD_BINARIZATION",D[D.DM_GRAY_EQUALIZATION=4]="DM_GRAY_EQUALIZATION",D[D.DM_SMOOTHING=8]="DM_SMOOTHING",D[D.DM_MORPHING=16]="DM_MORPHING",D[D.DM_DEEP_ANALYSIS=32]="DM_DEEP_ANALYSIS",D[D.DM_SHARPENING=64]="DM_SHARPENING",D[D.DM_BASED_ON_LOC_BIN=128]="DM_BASED_ON_LOC_BIN",D[D.DM_SHARPENING_SMOOTHING=256]="DM_SHARPENING_SMOOTHING",D[D.DM_REV=-2147483648]="DM_REV",D[D.DM_SKIP=0]="DM_SKIP",_.BarcodeReaderModule=class{static getVersion(){const _=t.innerVersions.dbr&&t.innerVersions.dbr.wasm,e=t.innerVersions.dbr&&t.innerVersions.dbr.worker;return`10.4.20-beta-202409230220(Worker: ${e||"Not Loaded"}, Wasm: ${_||"Not Loaded"})`}},_.EnumBarcodeFormat=i})); |
@@ -12,3 +12,3 @@ =================================================================================== | ||
Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler | ||
(C) 1995-2022 Jean-loup Gailly and Mark Adler | ||
@@ -31,4 +31,4 @@ This software is provided 'as-is', without any express or implied | ||
Jean-loup Gailly | ||
Mark Adler | ||
Jean-loup Gailly Mark Adler | ||
jloup@gzip.org madler@alumni.caltech.edu | ||
=================================================================================== | ||
@@ -35,0 +35,0 @@ |
{ | ||
"name": "dynamsoft-barcode-reader", | ||
"version": "10.2.10", | ||
"version": "10.4.20-beta-202409230220", | ||
"description": "Dynamsoft Barcode Reader JS is a recognition SDK which enables you to embed barcode reading functionality in your web, desktop, and mobile applications. With a few lines of JavaScript code, you can develop a robust application to scan a linear barcode, QR Code, DaraMatrix, PDF417, and Aztec Code.", | ||
@@ -22,4 +22,4 @@ "files": [ | ||
"types": { | ||
"require": "./dist/types/dbr.d.cts", | ||
"import": "./dist/types/dbr.d.ts" | ||
"require": "./dist/dbr.d.cts", | ||
"import": "./dist/dbr.d.ts" | ||
}, | ||
@@ -30,3 +30,4 @@ "import": "./dist/dbr.esm.js", | ||
}, | ||
"types": "./dist/types/dbr.d.ts", | ||
"types": "./dist/dbr.d.ts", | ||
"type": "module", | ||
"sideEffects": true, | ||
@@ -43,7 +44,7 @@ "scripts": { | ||
"updateLink:github": "updateLink --source=github", | ||
"makeZip": "makeZip --package=dynamsoft-barcode-reader --version=auto --sampleBranch=_dev --structure=new --otherPkgs=dynamsoft-capture-vision-std dynamsoft-image-processing dynamsoft-core dynamsoft-license dynamsoft-capture-vision-router dynamsoft-utility", | ||
"makeZip_dev": "makeZip --package=dynamsoft-barcode-reader --version=auto --sampleBranch=_dev --structure=new --otherPkgs=@dynamsoft/dynamsoft-capture-vision-std @dynamsoft/dynamsoft-image-processing @dynamsoft/dynamsoft-core @dynamsoft/dynamsoft-license @dynamsoft/dynamsoft-capture-vision-router @dynamsoft/dynamsoft-utility", | ||
"makeZip": "makeZip --package=dynamsoft-barcode-reader --version=auto --sampleBranch=_dev --structure=new --otherPkgs=dynamsoft-capture-vision-std dynamsoft-image-processing dynamsoft-core dynamsoft-license dynamsoft-capture-vision-router dynamsoft-utility dynamsoft-camera-enhancer", | ||
"makeZip_dev": "makeZip --package=dynamsoft-barcode-reader --version=auto --sampleBranch=_dev --structure=new --otherPkgs=@dynamsoft/dynamsoft-capture-vision-std @dynamsoft/dynamsoft-image-processing @dynamsoft/dynamsoft-core @dynamsoft/dynamsoft-license @dynamsoft/dynamsoft-capture-vision-router @dynamsoft/dynamsoft-utility @dynamsoft/dynamsoft-camera-enhancer", | ||
"easyPublish": "npm run update:dev && npm i dynamsoft-core@npm:@dynamsoft/dynamsoft-core@latest && npm run build && npm publish", | ||
"ep-no-core": "npm run update:dev && npm run build && npm publish", | ||
"overridesCore:prod": "npm pkg delete overrides && npm pkg set dependencies.dynamsoft-core=\"^3.2.10\" && npm pkg set devDependencies.dynamsoft-camera-enhancer=\"^4.0.2\" && npm pkg set devDependencies.dynamsoft-capture-vision-router=\"^2.2.10\" && npm pkg set devDependencies.dynamsoft-license=\"^3.2.10\" && npm pkg set devDependencies.dynamsoft-utility=\"^1.2.10\"", | ||
"overridesCore:prod": "npm pkg delete overrides && npm pkg set dependencies.dynamsoft-core=\"^3.4.20\" && npm pkg set devDependencies.dynamsoft-camera-enhancer=\"^4.0.2\" && npm pkg set devDependencies.dynamsoft-capture-vision-router=\"^2.2.10\" && npm pkg set devDependencies.dynamsoft-license=\"^3.2.10\" && npm pkg set devDependencies.dynamsoft-utility=\"^1.2.10\"", | ||
"overridesCore:dev": "npm pkg set overrides.dynamsoft-core=$dynamsoft-core && npm pkg set overrides.dynamsoft-camera-enhancer=$dynamsoft-camera-enhancer && npm pkg set overrides.dynamsoft-capture-vision-router=$dynamsoft-capture-vision-router && npm pkg set overrides.dynamsoft-license=$dynamsoft-license && npm pkg set overrides.dynamsoft-utility=$dynamsoft-utility && npm pkg set dependencies.dynamsoft-core=npm:@dynamsoft/dynamsoft-core@latest && npm pkg set devDependencies.dynamsoft-camera-enhancer=npm:@dynamsoft/dynamsoft-camera-enhancer@latest && npm pkg set devDependencies.dynamsoft-capture-vision-router=npm:@dynamsoft/dynamsoft-capture-vision-router@latest && npm pkg set devDependencies.dynamsoft-license=npm:@dynamsoft/dynamsoft-license@latest && npm pkg set devDependencies.dynamsoft-utility=npm:@dynamsoft/dynamsoft-utility@latest && npm update dynamsoft-core --no-package-lock && npm update dynamsoft-camera-enhancer --no-package-lock && npm update dynamsoft-capture-vision-router --no-package-lock && npm update dynamsoft-license --no-package-lock && npm update dynamsoft-utility --no-package-lock" | ||
@@ -70,3 +71,3 @@ }, | ||
"registry": "https://registry.npmjs.org/", | ||
"tag": "latest" | ||
"tag": "beta" | ||
}, | ||
@@ -96,3 +97,4 @@ "license": "SEE LICENSE IN LICENSE", | ||
"dynamsoft-utility": "^1.2.10", | ||
"rollup": "^2.79.1", | ||
"rollup": "^3.29.4", | ||
"rollup-plugin-dts": "^6.1.0", | ||
"tslib": "^2.6.2", | ||
@@ -102,4 +104,4 @@ "typescript": "^4.9.5" | ||
"dependencies": { | ||
"dynamsoft-core": "^3.2.10" | ||
"dynamsoft-core": "^3.4.20" | ||
} | ||
} |
777
README.md
@@ -1,776 +0,3 @@ | ||
# Barcode Reader for Your Website - User Guide | ||
# Dynamsoft Barcode Reader Module | ||
[Dynamsoft Barcode Reader JavaScript Edition](https://www.dynamsoft.com/barcode-reader/sdk-javascript/) (DBR-JS) is equipped with industry-leading algorithms for exceptional speed, accuracy and read rates in barcode reading. Using its well-designed API, you can turn your web page into a barcode scanner with just a few lines of code. | ||
![version](https://img.shields.io/npm/v/dynamsoft-barcode-reader.svg) | ||
![downloads](https://img.shields.io/npm/dm/dynamsoft-barcode-reader.svg) | ||
![jsdelivr](https://img.shields.io/jsdelivr/npm/hm/dynamsoft-barcode-reader.svg) | ||
![version](https://img.shields.io/npm/v/dynamsoft-javascript-barcode.svg) | ||
![downloads](https://img.shields.io/npm/dm/dynamsoft-javascript-barcode.svg) | ||
![jsdelivr](https://img.shields.io/jsdelivr/npm/hm/dynamsoft-javascript-barcode.svg) | ||
Once the DBR-JS SDK gets integrated into your web page, your users can access a camera via the browser and read barcodes directly from its video input. | ||
In this guide, you will learn step by step on how to integrate the DBR-JS SDK into your website. | ||
<span style="font-size:20px">Table of Contents</span> | ||
- [Barcode Reader for Your Website - User Guide](#barcode-reader-for-your-website---user-guide) | ||
- [Hello World - Simplest Implementation](#hello-world---simplest-implementation) | ||
- [Understand the code](#understand-the-code) | ||
- [About the code](#about-the-code) | ||
- [Run the example](#run-the-example) | ||
- [Building your own page](#building-your-own-page) | ||
- [Include the SDK](#include-the-sdk) | ||
- [Use a public CDN](#use-a-public-cdn) | ||
- [Host the SDK yourself (optional)](#host-the-sdk-yourself-optional) | ||
- [Prepare the SDK](#prepare-the-sdk) | ||
- [Specify the license](#specify-the-license) | ||
- [Specify the location of the "engine" files (optional)](#specify-the-location-of-the-engine-files-optional) | ||
- [Set up and start image processing](#set-up-and-start-image-processing) | ||
- [Preload the module](#preload-the-module) | ||
- [Create a CaptureVisionRouter object](#create-a-capturevisionrouter-object) | ||
- [Connect an image source](#connect-an-image-source) | ||
- [Register a result receiver](#register-a-result-receiver) | ||
- [Start the process](#start-the-process) | ||
- [Customize the process](#customize-the-process) | ||
- [Adjust the preset template settings](#adjust-the-preset-template-settings) | ||
- [Change barcode settings](#change-barcode-settings) | ||
- [Retrieve the original image](#retrieve-the-original-image) | ||
- [Change reading frequency to save power](#change-reading-frequency-to-save-power) | ||
- [Specify a scan region](#specify-a-scan-region) | ||
- [Edit the preset templates directly](#edit-the-preset-templates-directly) | ||
- [Filter the results (Important)](#filter-the-results-important) | ||
- [Option 1: Verify results across multiple frames](#option-1-verify-results-across-multiple-frames) | ||
- [Option 2: Eliminate redundant results detected within a short time frame](#option-2-eliminate-redundant-results-detected-within-a-short-time-frame) | ||
- [Add feedback](#add-feedback) | ||
- [Customize the UI](#customize-the-ui) | ||
- [API Documentation](#api-documentation) | ||
- [System Requirements](#system-requirements) | ||
- [How to Upgrade](#how-to-upgrade) | ||
- [Release Notes](#release-notes) | ||
- [Next Steps](#next-steps) | ||
**Popular Examples** | ||
- Hello World - [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.2.10/hello-world/hello-world.html) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/hello-world/hello-world.html?ver=10.2.10&utm_source=npm) | ||
- Angular App - [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.2.10/hello-world/angular) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/hello-world/angular/dist/hello-world/?ver=10.2.10&utm_source=npm) | ||
- React App - [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.2.10/hello-world/react) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/hello-world/react/build/?ver=10.2.10&utm_source=npm) | ||
- Vue App - [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.2.10/hello-world/vue) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/hello-world/vue/dist/?ver=10.2.10&utm_source=npm) | ||
- PWA App - [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.2.10/hello-world/pwa) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/hello-world/pwa/helloworld-pwa.html?ver=10.2.10&utm_source=npm) | ||
- WebView in Android and iOS - [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/v10.2.10/hello-world/webview) | ||
- Read Driver Licenses - [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.2.10/use-case/read-a-drivers-license.html) \| [Run](https://demo.dynamsoft.com/samples/dbr/js/use-case/read-a-drivers-license.html?ver=10.2.10&utm_source=npm) | ||
- Fill A Form - [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.2.10/use-case/fill-a-form-with-barcode-reading.html) \| [Run](https://demo.dynamsoft.com/samples/dbr/js/use-case/fill-a-form-with-barcode-reading.html?ver=10.2.10&utm_source=npm) | ||
- Show result information on the video - [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.2.10/use-case/show-result-texts-on-the-video.html) \| [Run](https://demo.dynamsoft.com/Samples/DBR/JS/use-case/show-result-texts-on-the-video.html?ver=10.2.10&utm_source=npm) | ||
- Debug Camera and Collect Video Frame - [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.2.10/others/debug) | ||
You can also: | ||
- Try the Official Demo - [Run](https://demo.dynamsoft.com/barcode-reader-js/?ver=10.2.10&utm_source=npm) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-demo/) | ||
- Try Online Examples - [Run](https://demo.dynamsoft.com/Samples/DBR/JS/index.html?ver=10.2.10&utm_source=npm) \| [Github](https://github.com/Dynamsoft/barcode-reader-javascript-samples/tree/v10.2.10/) | ||
## Hello World - Simplest Implementation | ||
Let's start with the "Hello World" example of the DBR-JS SDK which demonstrates how to use the minimum code to enable a web page to read barcodes from a live video stream. | ||
**Basic Requirements** | ||
- Internet connection | ||
- [A supported browser](#system-requirements) | ||
- Camera access | ||
### Understand the code | ||
The complete code of the "Hello World" example is shown below | ||
```html | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<div id="cameraViewContainer" style="width: 100%; height: 60vh"></div> | ||
<textarea id="results" style="width: 100%; min-height: 10vh; font-size: 3vmin; overflow: auto" disabled></textarea> | ||
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader@10.2.10/dist/dbr.bundle.js"></script> | ||
<script> | ||
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"); | ||
Dynamsoft.Core.CoreModule.loadWasm(["dbr"]); | ||
(async () => { | ||
let router = await Dynamsoft.CVR.CaptureVisionRouter.createInstance(); | ||
let view = await Dynamsoft.DCE.CameraView.createInstance(); | ||
let cameraEnhancer = await Dynamsoft.DCE.CameraEnhancer.createInstance(view); | ||
document.querySelector("#cameraViewContainer").append(view.getUIElement()); | ||
router.setInput(cameraEnhancer); | ||
const resultsContainer = document.querySelector("#results"); | ||
router.addResultReceiver({ onDecodedBarcodesReceived: (result) => { | ||
if (result.barcodeResultItems.length > 0) { | ||
resultsContainer.textContent = ''; | ||
for (let item of result.barcodeResultItems) { | ||
resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`; | ||
} | ||
} | ||
}}); | ||
let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter(); | ||
filter.enableResultCrossVerification("barcode", true); | ||
filter.enableResultDeduplication("barcode", true); | ||
await router.addResultFilter(filter); | ||
await cameraEnhancer.open(); | ||
await router.startCapturing("ReadSingleBarcode"); | ||
})(); | ||
</script> | ||
</body> | ||
</html> | ||
``` | ||
<!--TOM: Update the code links--> | ||
<p align="center" style="text-align:center; white-space: normal; "> | ||
<a target="_blank" href="https://github.com/Dynamsoft/barcode-reader-javascript-samples/blob/v10.2.10/hello-world/hello-world.html" title="Code in Github" style="text-decoration:none;"> | ||
<img src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/github.svg" alt="Code in Github" width="20" height="20" style="width:20px;height:20px;"> | ||
</a> | ||
| ||
<a target="_blank" href="https://jsfiddle.net/DynamsoftTeam/csm2f9wb/" title="Run via JSFiddle" style="text-decoration:none;"> | ||
<img src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/jsfiddle.svg" alt="Run via JSFiddle" width="20" height="20" style="width:20px;height:20px;" > | ||
</a> | ||
| ||
<a target="_blank" href="https://demo.dynamsoft.com/Samples/DBR/JS/hello-world/hello-world.html?ver=10.2.10&utm_source=npm" title="Run in Dynamsoft" style="text-decoration:none;"> | ||
<img src="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.0.0/svgs/solid/circle-play.svg" alt="Run in Dynamsoft" width="20" height="20" style="width:20px;height:20px;"> | ||
</a> | ||
</p> | ||
----- | ||
#### About the code | ||
- `Dynamsoft.License.LicenseManager.initLicense()`: This method initializes the license for using the SDK in the application. Note that the string "**DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9**" used in this example points to an online license that requires a network connection to work. Read more on [Specify the license](#specify-the-license). | ||
- `Dynamsoft.Core.CoreModule.loadWasm(["dbr"])`: This is an optional code. Used to load wasm resources in advance, reducing latency between video playing and barcode decoding. | ||
- `Dynamsoft.CVR.CaptureVisionRouter.createInstance()`: This method creates a `CaptureVisionRouter` object `router` which controls the entire process in three steps: | ||
- **Retrieve Images from the Image Source** | ||
- `router` connects to the image source through the [ImageSourceAdapter](https://www.dynamsoft.com/capture-vision/docs/core/architecture/input.html#image-source-adapter?lang=js) interface with the method `setInput()`. | ||
```js | ||
router.setInput(cameraEnhancer); | ||
``` | ||
> The image source in our case is a [CameraEnhancer](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/user-guide/index.html) object created with `Dynamsoft.DCE.CameraEnhancer.createInstance(view)` | ||
- **Coordinate Image-Processing Tasks** | ||
- The coordination happens behind the scenes. `router` starts the process by specifying a preset template "ReadSingleBarcode" in the method `startCapturing()`. | ||
```js | ||
router.startCapturing("ReadSingleBarcode"); | ||
``` | ||
- **Dispatch Results to Listening Objects** | ||
- The processing results are returned through the [CapturedResultReceiver](https://www.dynamsoft.com/capture-vision/docs/core/architecture/output.html#captured-result-receiver?lang=js) interface. The `CapturedResultReceiver` object is registered to `router` via the method `addResultReceiver()`. For more information, please check out [Register a result receiver](#register-a-result-receiver). | ||
```js | ||
router.addResultReceiver({/*The-CapturedResultReceiver-Object"*/}); | ||
``` | ||
- Also note that reading from video is extremely fast and there could be many duplicate results. We can use a [filter](#filter-the-results-important) with result deduplication enabled to filter out the duplicate results. The object is registered to `router` via the method `addResultFilter()`. | ||
```js | ||
router.addResultFilter(filter); | ||
``` | ||
> Read more on [Capture Vision Router](https://www.dynamsoft.com/capture-vision/docs/core/architecture/#capture-vision-router). | ||
### Run the example | ||
You can run the example deployed to [the Dynamsoft Demo Server](https://demo.dynamsoft.com/Samples/DBR/JS/hello-world/hello-world.html?ver=10.2.10&utm_source=npm) or test it with [JSFiddle code editor](https://jsfiddle.net/DynamsoftTeam/pL4e7yrd/). | ||
You will be asked to allow access to your camera, after which the video will be displayed on the page. After that, you can point the camera at a barcode to read it. | ||
When a barcode is decoded, you will see the result text show up under the video and the barcode location will be highlighted in the video feed. | ||
Alternatively, you can test locally by copying and pasting the code shown above into a local file (e.g. "hello-world.html") and opening it in your browser. | ||
*Note*: | ||
If you open the web page as `file:///` or `http://` , the camera may not work correctly because the [MediaDevices: getUserMedia()](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia) method only works in secure contexts (HTTPS), in some or all supporting browsers. | ||
To make sure your web application can access the camera, please configure your web server to support HTTPS. The following links may help. | ||
1. NGINX: [Configuring HTTPS servers](https://nginx.org/en/docs/http/configuring_https_servers.html) | ||
2. IIS: [How to create a Self Signed Certificate in IIS](https://aboutssl.org/how-to-create-a-self-signed-certificate-in-iis/) | ||
3. Tomcat: [Setting Up SSL on Tomcat in 5 minutes](https://dzone.com/articles/setting-ssl-tomcat-5-minutes) | ||
4. Node.js: [npm tls](https://nodejs.org/docs/v0.4.1/api/tls.html) | ||
If the test doesn't go as expected, you can [contact us](https://www.dynamsoft.com/company/contact/?ver=10.2.10&utm_source=npm&product=dbr&package=js). | ||
## Building your own page | ||
### Include the SDK | ||
To utilize the SDK, the initial step involves including the corresponding resource files: | ||
* `core.js` encompasses common classes, interfaces, and enumerations that are shared across all Dynamsoft SDKs. | ||
* `license.js` introduces the `LicenseManager` class, which manages the licensing for all Dynamsoft SDKs. | ||
* `utility.js` encompasses auxiliary classes that are shared among all Dynamsoft SDKs. | ||
* `dbr.js` defines interfaces and enumerations specifically tailored to the barcode reader module. | ||
* `cvr.js` introduces the `CaptureVisionRouter` class, which governs the entire image processing workflow. | ||
* `dce.js` comprises classes that offer camera support and basic user interface functionalities. | ||
For simplification, starting from version 10.2.10, we introduced `dbr.bundle.js`. Including this file is equivalent to incorporating all six packages. | ||
#### Use a public CDN | ||
The simplest way to include the SDK is to use either the [jsDelivr](https://jsdelivr.com/) or [UNPKG](https://unpkg.com/) CDN. The "hello world" example above uses **jsDelivr**. | ||
- jsDelivr | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-core@3.2.10/dist/core.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-license@3.2.10/dist/license.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-utility@1.2.10/dist/utility.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader@10.2.10/dist/dbr.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-router@2.2.10/dist/cvr.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@4.0.2/dist/dce.js"></script> | ||
``` | ||
Or just | ||
```html | ||
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader@10.2.10/dist/dbr.bundle.js"></script> | ||
``` | ||
- UNPKG | ||
```html | ||
<script src="https://unpkg.com/dynamsoft-core@3.2.10/dist/core.js"></script> | ||
<script src="https://unpkg.com/dynamsoft-license@3.2.10/dist/license.js"></script> | ||
<script src="https://unpkg.com/dynamsoft-utility@1.2.10/dist/utility.js"></script> | ||
<script src="https://unpkg.com/dynamsoft-barcode-reader@10.2.10/dist/dbr.js"></script> | ||
<script src="https://unpkg.com/dynamsoft-capture-vision-router@2.2.10/dist/cvr.js"></script> | ||
<script src="https://unpkg.com/dynamsoft-camera-enhancer@4.0.2/dist/dce.js"></script> | ||
``` | ||
Or just | ||
```html | ||
<script src="https://unpkg.com/dynamsoft-barcode-reader@10.2.10/dist/dbr.bundle.js"></script> | ||
``` | ||
In some rare cases (such as some restricted areas), you might not be able to access the CDN. If this happens, you can use the following files for the test. | ||
- https://download2.dynamsoft.com/packages/dynamsoft-core@3.2.10/dist/core.js | ||
- https://download2.dynamsoft.com/packages/dynamsoft-license@3.2.10/dist/license.js | ||
- https://download2.dynamsoft.com/packages/dynamsoft-utility@1.2.10/dist/utility.js | ||
- https://download2.dynamsoft.com/packages/dynamsoft-barcode-reader@10.2.10/dist/dbr.js | ||
- https://download2.dynamsoft.com/packages/dynamsoft-capture-vision-router@2.2.10/dist/cvr.js | ||
- https://download2.dynamsoft.com/packages/dynamsoft-camera-enhancer@4.0.2/dist/dce.js | ||
- or bundle: https://download2.dynamsoft.com/packages/dynamsoft-barcode-reader@10.2.10/dist/dbr.bundle.js | ||
However, please **DO NOT** use `download2.dynamsoft.com` resources in a production application as they are for temporary testing purposes only. Instead, you can try hosting the SDK yourself. | ||
#### Host the SDK yourself (optional) | ||
Besides using the public CDN, you can also download the SDK and host its files on your own server or a commercial CDN before including it in your application. | ||
Options to download the SDK: | ||
- From the website | ||
[Download Dynamsoft Barcode Reader JavaScript Package](https://www.dynamsoft.com/barcode-reader/downloads/?ver=10.2.10&utm_source=npm&product=dbr&package=js) | ||
- yarn | ||
```cmd | ||
yarn add dynamsoft-core@3.2.10 --save | ||
yarn add dynamsoft-license@3.2.10 --save | ||
yarn add dynamsoft-utility@1.2.10 --save | ||
yarn add dynamsoft-barcode-reader@10.2.10 --save | ||
yarn add dynamsoft-capture-vision-router@2.2.10 --save | ||
yarn add dynamsoft-camera-enhancer@4.0.2 --save | ||
yarn add dynamsoft-capture-vision-std@1.2.0 --save | ||
yarn add dynamsoft-image-processing@2.2.10 --save | ||
``` | ||
- npm | ||
```cmd | ||
npm install dynamsoft-core@3.2.10 --save | ||
npm install dynamsoft-license@3.2.10 --save | ||
npm install dynamsoft-utility@1.2.10 --save | ||
npm install dynamsoft-barcode-reader@10.2.10 --save | ||
npm install dynamsoft-capture-vision-router@2.2.10 --save | ||
npm install dynamsoft-camera-enhancer@4.0.2 --save | ||
npm install dynamsoft-capture-vision-std@1.2.0 --save | ||
npm install dynamsoft-image-processing@2.2.10 --save | ||
``` | ||
Depending on how you downloaded the SDK and how you intend to use it, you can typically include it like this | ||
- From the website | ||
```html | ||
<script src="./dynamsoft/distributables/dynamsoft-core@3.2.10/dist/core.js"></script> | ||
<script src="./dynamsoft/distributables/dynamsoft-license@3.2.10/dist/license.js"></script> | ||
<script src="./dynamsoft/distributables/dynamsoft-utility@1.2.10/dist/utility.js"></script> | ||
<script src="./dynamsoft/distributables/dynamsoft-barcode-reader@10.2.10/dist/dbr.js"></script> | ||
<script src="./dynamsoft/distributables/dynamsoft-capture-vision-router@2.2.10/dist/cvr.js"></script> | ||
<script src="./dynamsoft/distributables/dynamsoft-camera-enhancer@4.0.2/dist/dce.js"></script> | ||
``` | ||
Or just | ||
```html | ||
<script src="./dynamsoft/distributables/dynamsoft-barcode-reader@10.2.10/dist/dbr.bundle.js"></script> | ||
``` | ||
- yarn or npm | ||
```html | ||
<script src="/node_modules/dynamsoft-core/dist/core.js"></script> | ||
<script src="/node_modules/dynamsoft-license/dist/license.js"></script> | ||
<script src="/node_modules/dynamsoft-utility/dist/utility.js"></script> | ||
<script src="/node_modules/dynamsoft-barcode-reader/dist/dbr.js"></script> | ||
<script src="/node_modules/dynamsoft-capture-vision-router/dist/cvr.js"></script> | ||
<script src="/node_modules/dynamsoft-camera-enhancer/dist/dce.js"></script> | ||
``` | ||
Or just | ||
```html | ||
<script src="/node_modules/dynamsoft-barcode-reader/dist/dbr.bundle.js"></script> | ||
``` | ||
*Note*: | ||
* Certain legacy web application servers may lack support for the `application/wasm` mimetype for .wasm files. To address this, you have two options: | ||
1. Upgrade your web application server to one that supports the `application/wasm` mimetype. | ||
2. Manually define the mimetype on your server. You can refer to the following resources for guidance: | ||
1. [Apache](https://developer.mozilla.org/en-US/docs/Learn/Server-side/Apache_Configuration_htaccess#media_types_and_character_encodings) | ||
2. [IIS](https://docs.microsoft.com/en-us/iis/configuration/system.webserver/staticcontent/mimemap) | ||
3. [Nginx](https://www.nginx.com/resources/wiki/start/topics/examples/full/#mime-types) | ||
* To work properly, the SDK requires a few engine files, which are relatively large and may take quite a few seconds to download. We recommend that you set a longer cache time for these engine files, to maximize the performance of your web application. | ||
```cmd | ||
Cache-Control: max-age=31536000 | ||
``` | ||
Reference: [Cache-Control](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control). | ||
### Prepare the SDK | ||
Before using the SDK, you need to configure a few things. | ||
#### Specify the license | ||
To enable the SDK's functionality, you must provide a valid license. Utilize the API function initLicense to set your license key. | ||
```javascript | ||
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"); | ||
``` | ||
As previously stated, the key "DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9" serves as a test license valid for 24 hours, applicable to any newly authorized browser. To test the SDK further, you can request a 30-day free trial license via the [customer portal](https://www.dynamsoft.com/customer/license/trialLicense?ver=10.2.10&utm_source=npm&product=dbr&package=js). | ||
> Upon registering a Dynamsoft account and obtaining the SDK package from the official website, Dynamsoft will automatically create a 30-day free trial license and embed the corresponding license key into all the provided SDK samples. | ||
#### Specify the location of the "engine" files (optional) | ||
This is usually only required with frameworks like Angular or React, etc. where the referenced JavaScript files such as `cvr.js`, `dbr.js` are compiled into another file. | ||
The purpose is to tell the SDK where to find the engine files (\*.worker.js, \*.wasm.js and \*.wasm, etc.). The API is called `Dynamsoft.Core.CoreModule.engineResourcePaths`: | ||
```javascript | ||
//The following code uses the jsDelivr CDN, feel free to change it to your own location of these files | ||
Object.assign(Dynamsoft.Core.CoreModule.engineResourcePaths, { | ||
std: "https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-std@1.2.0/dist/", | ||
dip: "https://cdn.jsdelivr.net/npm/dynamsoft-image-processing@2.2.10/dist/", | ||
core: "https://cdn.jsdelivr.net/npm/dynamsoft-core@3.2.10/dist/", | ||
license: "https://cdn.jsdelivr.net/npm/dynamsoft-license@3.2.10/dist/", | ||
cvr: "https://cdn.jsdelivr.net/npm/dynamsoft-capture-vision-router@2.2.10/dist/", | ||
dbr: "https://cdn.jsdelivr.net/npm/dynamsoft-barcode-reader@10.2.10/dist/", | ||
dce: "https://cdn.jsdelivr.net/npm/dynamsoft-camera-enhancer@4.0.2/dist/" | ||
}); | ||
``` | ||
### Set up and start image processing | ||
#### Preload the module | ||
The image processing logic is encapsulated within .wasm library files, and these files may require some time for downloading. To enhance the speed, we advise utilizing the following method to preload the libraries. | ||
```js | ||
// Preload the .wasm files | ||
await Dynamsoft.Core.CoreModule.loadWasm(["dbr"]); | ||
``` | ||
#### Create a CaptureVisionRouter object | ||
To use the SDK, we first create a `CaptureVisionRouter` object. | ||
```javascript | ||
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"); | ||
let router = null; | ||
try { | ||
router = await Dynamsoft.CVR.CaptureVisionRouter.createInstance(); | ||
} catch (ex) { | ||
console.error(ex); | ||
} | ||
``` | ||
*Tip*: | ||
When creating a `CaptureVisionRouter` object within a function which may be called more than once, it's best to use a "helper" variable to avoid double creation such as `pRouter` in the following code: | ||
```javascript | ||
Dynamsoft.License.LicenseManager.initLicense("DLS2eyJvcmdhbml6YXRpb25JRCI6IjIwMDAwMSJ9"); | ||
let pRouter = null; // promise of router | ||
let router = null; | ||
document.getElementById('btn-scan').addEventListener('click', async () => { | ||
try { | ||
router = await (pRouter = pRouter || Dynamsoft.CVR.CaptureVisionRouter.createInstance()); | ||
} catch (ex) { | ||
console.error(ex); | ||
} | ||
}); | ||
``` | ||
#### Connect an image source | ||
The `CaptureVisionRouter` object, denoted as `router`, is responsible for handling images provided by an image source. In our scenario, we aim to detect barcodes directly from a live video stream. To facilitate this, we initialize a `CameraEnhancer` object, identified as `cameraEnhancer`, which is specifically designed to capture image frames from the video feed and subsequently forward them to `router`. | ||
To enable video streaming on the webpage, we create a `CameraView` object referred to as `view`, which is then passed to `cameraEnhancer`, and its content is displayed on the webpage. | ||
```html | ||
<div id="cameraViewContainer" style="width: 100%; height: 100vh"></div> | ||
``` | ||
```javascript | ||
let view = await Dynamsoft.DCE.CameraView.createInstance(); | ||
let cameraEnhancer = await Dynamsoft.DCE.CameraEnhancer.createInstance(view); | ||
document.querySelector("#cameraViewContainer").append(view.getUIElement()); | ||
router.setInput(cameraEnhancer); | ||
``` | ||
#### Register a result receiver | ||
Once the image processing is complete, the results are sent to all the registered `CapturedResultReceiver` objects. Each `CapturedResultReceiver` object may encompass one or multiple callback functions associated with various result types. In our particular case, our focus is on identifying barcodes within the images, so it's sufficient to define the callback function `onDecodedBarcodesReceived`: | ||
```javascript | ||
const resultsContainer = document.querySelector("#results"); | ||
const resultReceiver = new Dynamsoft.CVR.CapturedResultReceiver(); | ||
resultReceiver.onDecodedBarcodesReceived = (result) => { | ||
if (result.barcodeResultItems.length > 0) { | ||
resultsContainer.textContent = ''; | ||
for (let item of result.barcodeResultItems) { | ||
// In this example, the barcode result is shown on the page beneath the video | ||
resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`; | ||
} | ||
} | ||
}; | ||
router.addResultReceiver(resultReceiver); | ||
``` | ||
You can also write code like this. It is the same. | ||
```javascript | ||
const resultsContainer = document.querySelector("#results"); | ||
router.addResultReceiver({ onDecodedBarcodesReceived: (result) => { | ||
if (result.barcodeResultItems.length > 0) { | ||
resultsContainer.textContent = ''; | ||
for (let item of result.barcodeResultItems) { | ||
// In this example, the barcode result is shown on the page beneath the video | ||
resultsContainer.textContent += `${item.formatString}: ${item.text}\n\n`; | ||
} | ||
} | ||
}}); | ||
``` | ||
Check out [CapturedResultReceiver](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/captured-result-receiver.html) for more information. | ||
#### Start the process | ||
With the setup now complete, we can proceed to process the images in two straightforward steps: | ||
1. Initiate the image source to commence image acquisition. In our scenario, we invoke the `open()` method on `cameraEnhancer` to initiate video streaming and simultaneously initiate the collection of images. These collected images will be dispatched to `router` as per its request. | ||
2. Define a preset template to commence image processing. In our case, we utilize the "ReadSingleBarcode" template, specifically tailored for processing images containing a single barcode. | ||
```javascript | ||
await cameraEnhancer.open(); | ||
await router.startCapturing("ReadSingleBarcode"); | ||
``` | ||
*Note*: | ||
* `router` is engineered to consistently request images from the image source. | ||
* Various preset templates are at your disposal for barcode reading: | ||
| Template Name | Function Description | | ||
| ------------------------------ | -------------------------------------------------------------- | | ||
| **ReadBarcodes_Default** | Scans a single barcode. | | ||
| **ReadSingleBarcode** | Quickly scans a single barcode. | | ||
| **ReadBarcodes_SpeedFirst** | Prioritizes speed in scanning multiple barcodes. | | ||
| **ReadBarcodes_ReadRateFirst** | Maximizes the number of barcodes read. | | ||
| **ReadBarcodes_Balance** | Balances speed and quantity in reading multiple barcodes. | | ||
| **ReadDenseBarcodes** | Specialized in reading barcodes with high information density. | | ||
| **ReadDistantBarcodes** | Capable of reading barcodes from extended distances. | | ||
Read more on the [preset CaptureVisionTemplates](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/preset-templates.html). | ||
### Customize the process | ||
#### Adjust the preset template settings | ||
When making adjustments to some basic tasks, we often only need to modify [SimplifiedCaptureVisionSettings](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/capture-vision-router/interfaces/simplified-capture-vision-settings.html). | ||
##### Change barcode settings | ||
The preset templates can be updated to meet different requirements. For example, the following code limits the barcode format to QR code. | ||
```javascript | ||
let settings = await router.getSimplifiedSettings("ReadSingleBarcode"); | ||
settings.barcodeSettings.barcodeFormatIds = | ||
Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE; | ||
await router.updateSettings("ReadSingleBarcode", settings); | ||
await router.startCapturing("ReadSingleBarcode"); | ||
``` | ||
For a list of adjustable barcode settings, check out [SimplifiedBarcodeReaderSettings](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/interfaces/simplified-barcode-reader-settings.html). | ||
##### Retrieve the original image | ||
Additionally, we have the option to modify the template to retrieve the original image containing the barcode. | ||
```javascript | ||
let settings = await router.getSimplifiedSettings("ReadSingleBarcode"); | ||
settings.capturedResultItemTypes |= | ||
Dynamsoft.Core.EnumCapturedResultItemType.CRIT_ORIGINAL_IMAGE; | ||
await router.updateSettings("ReadSingleBarcode", settings); | ||
await router.startCapturing("ReadSingleBarcode"); | ||
``` | ||
Limit the barcode format to QR code, and retrieve the original image containing the barcode, at the same time. | ||
```javascript | ||
let settings = await router.getSimplifiedSettings("ReadSingleBarcode"); | ||
settings.capturedResultItemTypes = | ||
Dynamsoft.DBR.EnumBarcodeFormat.BF_QR_CODE | | ||
Dynamsoft.Core.EnumCapturedResultItemType.CRIT_ORIGINAL_IMAGE; | ||
await router.updateSettings("ReadSingleBarcode", settings); | ||
await router.startCapturing("ReadSingleBarcode"); | ||
``` | ||
Please be aware that it is necessary to update the `CapturedResultReceiver` object to obtain the original image. For instance: | ||
```javascript | ||
resultReceiver.onCapturedResultReceived = (result) => { | ||
let barcodes = result.items.filter((item) => | ||
item.type === Dynamsoft.Core.EnumCapturedResultItemType.CRIT_BARCODE | ||
); | ||
if (barcodes.length > 0) { | ||
let image = result.items.filter( | ||
(item) => | ||
item.type === | ||
Dynamsoft.Core.EnumCapturedResultItemType.CRIT_ORIGINAL_IMAGE | ||
)[0].imageData; | ||
// The image that we found the barcode(s) on. | ||
} | ||
}; | ||
``` | ||
##### Change reading frequency to save power | ||
The SDK is initially configured to process images sequentially without any breaks. Although this setup maximizes performance, it can lead to elevated power consumption, potentially causing the device to overheat. In many cases, it's possible to reduce the reading speed while still satisfying business requirements. The following code snippet illustrates how to adjust the SDK to process an image every 500 milliseconds: | ||
> Please bear in mind that in the following code, if an image's processing time is shorter than 500 milliseconds, the SDK will wait for the full 500 milliseconds before proceeding to process the next image. Conversely, if an image's processing time exceeds 500 milliseconds, the subsequent image will be processed immediately upon completion. | ||
```javascript | ||
let settings = await router.getSimplifiedSettings("ReadSingleBarcode"); | ||
settings.minImageCaptureInterval = 500; | ||
await router.updateSettings("ReadSingleBarcode", settings); | ||
await router.startCapturing("ReadSingleBarcode"); | ||
``` | ||
##### Specify a scan region | ||
You can use the parameter `roi` (region of interest) together with the parameter `roiMeasuredInPercentage` to configure the SDK to only read a specific region on the image frames. For example, the following code limits the reading in the center 25%( = 50% * 50%) of the image frames: | ||
```javascript | ||
let settings = await router.getSimplifiedSettings("ReadSingleBarcode"); | ||
settings.roiMeasuredInPercentage = true; | ||
settings.roi.points = [ | ||
{ x: 25, y: 25 }, | ||
{ x: 75, y: 25 }, | ||
{ x: 75, y: 75 }, | ||
{ x: 25, y: 75 }, | ||
]; | ||
await router.updateSettings("ReadSingleBarcode", settings); | ||
await router.startCapturing("ReadSingleBarcode"); | ||
``` | ||
While the code above accomplishes the task, a more effective approach is to restrict the scan region directly at the image source, as demonstrated in the following code snippet. | ||
> * With the region configured at the image source, the images are cropped right before they are gathered for processing, eliminating the necessity to modify the processing settings further. | ||
> * `cameraEnhancer` elevates interactivity by overlaying a mask on the video, providing a clear delineation of the scanning region. | ||
> * See also: [CameraEnhancer::setScanRegion](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/api-reference/acquisition.html#setscanregion) | ||
```javascript | ||
cameraEnhancer = await Dynamsoft.DCE.CameraEnhancer.createInstance(view); | ||
cameraEnhancer.setScanRegion({ | ||
x: 25, | ||
y: 25, | ||
width: 50, | ||
height: 50, | ||
isMeasuredInPercentage: true, | ||
}); | ||
``` | ||
<!-- | ||
* Specify the maximum time allowed for processing each image | ||
You can set the maximum time allowed for processing a single image with the property `timeout`. | ||
> Please be aware that the SDK will cease processing an image if its processing time exceeds the duration specified by the `timeout` parameter. It should not be confused with the previously discussed parameter, `minImageCaptureInterval`. | ||
```javascript | ||
let settings = await router.getSimplifiedSettings("ReadSingleBarcode"); | ||
settings.timeout = 500; | ||
await router.updateSettings("ReadSingleBarcode", settings); | ||
await router.startCapturing("ReadSingleBarcode"); | ||
``` | ||
--> | ||
#### Edit the preset templates directly | ||
The preset templates have a lot more settings that can be customized to best suit your use case. If you [download the SDK from Dynamsoft website](https://www.dynamsoft.com/barcode-reader/downloads/1000003-confirmation/), you can find the templates under | ||
* "/dynamsoft-barcode-reader-js-10.2.10/dynamsoft/resources/barcode-reader/templates/" | ||
Upon completing the template editing, you can invoke the `initSettings` method and provide it with the template path as an argument. | ||
```javascript | ||
await router.initSettings("PATH-TO-THE-FILE"); //e.g. "https://your-website/ReadSingleBarcode.json") | ||
await router.startCapturing("ReadSingleBarcode"); // Make sure the name matches one of the CaptureVisionTemplates in the | ||
``` | ||
#### Filter the results (Important) | ||
While processing video frames, it's common for the same barcode to be detected multiple times. To enhance the user experience, we can use [MultiFrameResultCrossFilter](https://www.dynamsoft.com/capture-vision/docs/web/programming/javascript/api-reference/utility/multi-frame-result-cross-filter.html) object, having two options currently at our disposal: | ||
##### Option 1: Verify results across multiple frames | ||
```js | ||
let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter(); | ||
filter.enableResultCrossVerification("barcode", true); | ||
await router.addResultFilter(filter); | ||
``` | ||
*Note*: | ||
* `enableResultCrossVerification` was designed to cross-validate the outcomes across various frames in a video streaming scenario, enhancing the reliability of the final results. This validation is particularly crucial for barcodes with limited error correction capabilities, such as 1D codes. | ||
##### Option 2: Eliminate redundant results detected within a short time frame | ||
```js | ||
let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter(); | ||
filter.enableResultDeduplication("barcode", true); | ||
await router.addResultFilter(filter); | ||
``` | ||
*Note*: | ||
* `enableResultDeduplication` was designed to prevent high usage in video streaming scenarios, addressing the repetitive processing of the same code within a short period of time. | ||
Initially, the filter is set to forget a result 3 seconds after it is first received. During this time frame, if an identical result appears, it is ignored. | ||
> It's important to know that in version 9.x or earlier, the occurrence of an identical result would reset the timer, thus reinitiating the 3-second count at that point. However, in version 10.2.10 and later, an identical result no longer resets the timer but is instead disregarded, and the duration count continues uninterrupted. | ||
Under certain circumstances, this duration can be extended with the method `setDuplicateForgetTime()`. | ||
```js | ||
let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter(); | ||
filter.setDuplicateForgetTime(5000); // Extend the duration to 5 seconds. | ||
await router.addResultFilter(filter); | ||
``` | ||
You can also enable both options at the same time: | ||
```js | ||
let filter = new Dynamsoft.Utility.MultiFrameResultCrossFilter(); | ||
filter.enableResultCrossVerification("barcode", true); | ||
filter.enableResultDeduplication("barcode", true); | ||
filter.setDuplicateForgetTime(5000); | ||
await router.addResultFilter(filter); | ||
``` | ||
#### Add feedback | ||
When a barcode is detected within the video stream, its position is immediately displayed within the video. Furthermore, utilizing the "Dynamsoft Camera Enhancer" SDK, we can introduce feedback mechanisms, such as emitting a "beep" sound or triggering a "vibration". | ||
The following code snippet adds a "beep" sound for when a barcode is found: | ||
```js | ||
const resultReceiver = new Dynamsoft.CVR.CapturedResultReceiver(); | ||
resultReceiver.onDecodedBarcodesReceived = (result) => { | ||
if (result.barcodeResultItems.length > 0) { | ||
Dynamsoft.DCE.Feedback.beep(); | ||
} | ||
}; | ||
router.addResultReceiver(resultReceiver); | ||
``` | ||
### Customize the UI | ||
The UI is part of the auxiliary SDK "Dynamsoft Camera Enhancer", read more on how to [customize the UI](https://www.dynamsoft.com/camera-enhancer/docs/web/programming/javascript/user-guide/index.html#customize-the-ui). | ||
## API Documentation | ||
You can check out the detailed documentation about the APIs of the SDK at | ||
[https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=10.2.10](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/?ver=10.2.10). | ||
## System Requirements | ||
DBR requires the following features to work: | ||
- Secure context (HTTPS deployment) | ||
When deploying your application / website for production, make sure to serve it via a secure HTTPS connection. This is required for two reasons | ||
- Access to the camera video stream is only granted in a security context. Most browsers impose this restriction. | ||
> Some browsers like Chrome may grant the access for `http://127.0.0.1` and `http://localhost` or even for pages opened directly from the local disk (`file:///...`). This can be helpful for temporary development and test. | ||
- Dynamsoft License requires a secure context to work. | ||
- `WebAssembly`, `Blob`, `URL`/`createObjectURL`, `Web Workers` | ||
The above four features are required for the SDK to work. | ||
- `MediaDevices`/`getUserMedia` | ||
This API is required for in-browser video streaming. | ||
- `getSettings` | ||
This API inspects the video input which is a `MediaStreamTrack` object about its constrainable properties. | ||
The following table is a list of supported browsers based on the above requirements: | ||
| Browser Name | Version | | ||
| :----------: | :--------------: | | ||
| Chrome | v78+<sup>1</sup> | | ||
| Firefox | v62+<sup>1</sup> | | ||
| Edge | v79+ | | ||
| Safari | v14+ | | ||
<sup>1</sup> devices running iOS needs to be on iOS 14.3+ for camera video streaming to work in Chrome, Firefox or other Apps using webviews. | ||
Apart from the browsers, the operating systems may impose some limitations of their own that could restrict the use of the SDK. Browser compatibility ultimately depends on whether the browser on that particular operating system supports the features listed above. | ||
## How to Upgrade | ||
If you want to upgrade the SDK from an old version to a newer one, please see [how to upgrade](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/upgrade-guide/index.html?ver=10.2.10&utm_source=npm). | ||
## Release Notes | ||
Learn about what are included in each release at [https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/release-notes/index.html](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/release-notes/index.html?ver=10.2.10&utm_source=npm). | ||
## Next Steps | ||
Now that you have got the SDK integrated, you can choose to move forward in the following directions | ||
1. Check out the [Official Samples and Demo](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/samples-demos/index.html?ver=10.2.10) | ||
2. Learn about the [APIs of the SDK](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/api-reference/index.html?ver=10.2.10) | ||
The Dynamsoft Barcode Reader module recognizes and decodes multiple barcode formats such as QR codes, Code 39, Code 128, and Data Matrix, among many others. To learn more, please refer to [Dynamsoft Barcode Reader for Your Website - User Guide](https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/user-guide/index.html). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
1
Yes
3101802
15
13
1072
2
3
Updateddynamsoft-core@^3.4.20