Dev Center
Table of contents

How to Filter and Sort Barcode Results

Dynamsoft Barcode Reader SDK is able to read multiple barcodes at once and return results of all the decoded barcodes. However, you may not want all the results. For example, you may need only the results of a specific barcode format, or you may need only the barcodes with a certain text string. The SDK provides the following parameters to help you filter the barcode results by barcode format, confidence, etc and order the results by confidence, position or format. These parameters can work both individually and in combination.

Example

Below is an example illustrating how to filter out QR Code results with confidence higher than 50 and then order the results by position.

  • Update parameters in your JSON template

      {
          "CaptureVisionTemplates": [
              {
                  "Name" : "CV_0",
                  "ImageROIProcessingNameArray": ["TA_0" ]
              }       
          ],
          "TargetROIDefOptions" : [
              {
                  "Name" : "TA_0",
                  "TaskSettingNameArray": [ "BR_0" ]
              }
          ],
          "BarcodeReaderTaskSettingOptions": [
              {
                  "Name" : "BR_0",
                  "BarcodeFormatIds" : ["BF_QR_CODE"],
                  "TextResultOrderModes" : [
                      {
                          "Mode" : "TROM_POSITION"
                      }
                  ],
                  "BarcodeFormatSpecificationNameArray": "FS_0"
              }
          ],
          "BarcodeFormatSpecificationOptions": [
              {
                  "Name" : "FS_0",
                  "MinResultConfidence" : 50
              }
          ]
      }
    
  • Apply the above settings following the article Use Templates for Configuring Parameters.

This page is compatible for:

Is this page helpful?

YesYes NoNo

latest version

  • Latest version
  • Version 10.x
    • Version 10.2.0
    • Version 10.0.21
    • Version 10.0.20
    • Version 10.0.10
    • Version 10.0.0
  • Version 9.x
    • Version 9.6.42
    • Version 9.6.40
    • Version 9.6.33
    • Version 9.6.32
    • Version 9.6.31
    • Version 9.6.30
    • Version 9.6.20
    • Version 9.6.10
    • Version 9.6.0
    • Version 9.4.0
    • Version 9.2.0
    • Version 9.0.0
  • Version 8.x
    • Version 8.8.0
    • Version 8.6.0
    • Version 8.4.0
    • Version 8.2.0
    • Version 8.1.2
    • Version 8.1.0
    • Version 8.0.0
  • Version 7.x
    • Version 7.6.0
    • Version 7.5.0
  • Documentation Homepage
Change +