The below guide concerns the recent WebSDK 6.x release. If you're still using WebSDK 5.x, please go here.
When trying to scan a single barcode in a crowded situation (like when several codes are closed together or you are scanning an object in front of a shelf with other barcodes), there are few settings that can help you tune our scanner in order to avoid unintended barcodes scanning.
Restrict the Active Symbologies
The Scandit Data Capture SDK is capable of reading many different types of barcodes. The type of a barcode is referred to as its symbology.
Whether you are trying to scan a label that presents different symbologies or different products with different types of barcodes, the easiest way to scan the right barcode is to enable only the symbology you are looking for.
You can find more information in the documentation page.
NOTE: each additional enabled symbology requires additional computational resources as the image is searched for more potential barcode types. This will decrease the scanning performance slightly or even heavily.
NOTE: Some symbologies support variable length data content (e.g., Code 128, Code 39, Code 93, ITF). The length of data encoded in variable-length symbologies is measured as the number of symbols. If you have different codes with different numbers of symbols but you need to scan just one, an effective way to avoid unwanted scanning is to adjust the symbol count settings.
More info can be found here.
Restrict the scanning search area
The area which is searched for barcodes is called "Active Scan Area". Any area not covered by the Active Scan Area will not be searched for barcodes.
By restricting the Active Scan Area it's easier to point at the right code among many.
There are different options to restrict the Active scan area, like setting a corner-based area by using RectangularLocationSelection or a circle-based area by using RadiusLocationSelection.
You can find more information on the documentation page.
NOTE: In use-cases where a Scan Area restriction is used to aim at a specific barcode among many - e.g. while still using the Rectangular Viewfinder - it makes sense that the Viewfinder matches the active Scan Area.
NOTE: restricting the Scan Area can significantly improve decoding speed - especially on low-end devices - as we are searching for barcodes in a smaller area and we therefore need to reduce the computational effort needed.
NOTE: Together with a restricted scan area, to give the user an indication of where he should scan, you can use a Laser viewfinder instead of the standard Rectangular viewfinder used by default. More information can be found here.
Use a scan & stop workflow
To minimize the unwanted scanning, a possible workflow could be to:
- Start the scanner in paused mode (camera preview on but capture mode disabled and not scanning).
- Add a button to enable scanning on user tap. When the scanner is active, the button can be grayed out and display “Scanning”.
- When a barcode is scanned, disable scanning by putting the camera in standby mode. This will ensure that you are not scanning any other codes and will save battery.
- To scan again, click on the button button again
You can find more information in the documentation:
- https://docs.scandit.com/data-capture-sdk/web/get-started-barcode.html#disabling-barcode-capture => set `captureMode.isEnabled` to `false` at the beginning and keep it in this state until the scan button is pressed
- https://docs.scandit.com/data-capture-sdk/web/get-started-barcode.html#use-the-built-in-camera => keep `Scandit.FrameSourceState.On` to be able to see the preview from the camera and target the barcode you want to scan before pressing the scan button
- https://docs.scandit.com/data-capture-sdk/web/barcode-capture/api/barcode-capture.html#property-scandit.datacapture.barcode.BarcodeCapture.IsEnabled => `isEnabled` could be used to change the button state / show and hide additional hints to the user
WebSDK 5.x (Legacy)
When trying to scan a single barcode in a crowded situation (like when several codes are closed together or you are scanning an object in front of a shelf with other barcodes), there are few settings that can help you tune our scanner in order to avoid unintended barcodes scanning.
Restrict the Active Symbologies
The Scandit Data Capture SDK is capable of reading many different types of barcodes. The type of a barcode is referred to as its symbology.
Whether you are trying to scan a label that presents different symbologies or different products with different types of barcodes, the easiest way to scan the right barcode is to enable only the symbology you are looking for.
You can find more information in the documentation page
or in the sample.
NOTE: each additional enabled symbology requires additional computational resources as the image is searched for more potential barcode types. This will decrease the scanning performance slightly or even heavily.
NOTE: Some symbologies support variable length data content (e.g., Code 128, Code 39, Code 93, ITF). The length of data encoded in variable-length symbologies is measured as the number of symbols. If you have different codes with different numbers of symbols but you need to scan just one, an effective way to avoid unwanted scanning is to adjust the symbol count settings.
More info can be found here.
Restrict the scanning search area
The area which is searched for barcodes is called "Active Scan Area". Any area not covered by the Active Scan Area will not be searched for barcodes.
By restricting the Active Scan Area it's easier to point at the right code among many. You can set it by using the searchArea property of ScanSettings.
You can find an example usage in our sample.
NOTE: In use-cases where a Scan Area restriction is used to aim at a specific barcode among many - e.g. while still using the Rectangular Viewfinder - it makes sense that the Viewfinder matches the active Scan Area.
NOTE: restricting the Scan Area can significantly improve decoding speed - especially on low-end devices - as we are searching for barcodes in a smaller area and we therefore need to reduce the computational effort needed.
NOTE: Together with a restricted scan area, to give the user an indication of where he should scan, you can use a Laser viewfinder instead of the standard Rectangular viewfinder used by default. More information can be found here: GuiStyle.
Use a scan & stop workflow
To minimize the unwanted scanning, a possible workflow could be to:
- Start the scanner in paused mode (camera preview on but capture mode disabled and not scanning).
- Add a button to enable scanning on user tap. When the scanner is active, the button can be grayed out and display “Scanning”.
- When a barcode is scanned, disable scanning by putting the camera in standby mode. This will ensure that you are not scanning any other codes and will save battery.
- To scan again, click on the button button again
You can find more information in the documentation:
- https://docs.scandit.com/stable/web/classes/BarcodePicker.html#create => set scanningPaused to true in the create method. Scanner can then get activated with the pauseScanning method below
- https://docs.scandit.com/stable/web/classes/BarcodePicker.html#pauseScanning => use with pauseCamera = false to keep the video stream open so that the user can “search” for the code. Then toggle the pauseScanning true/falls on button click
- https://docs.scandit.com/stable/web/classes/BarcodePicker.html#isScanningPaused => isScanningPaused could be used to change the button state / show and hide additional hints to the user
Was this article helpful?







Comments
0 comments
Please sign in to leave a comment.