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.
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.
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 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/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?