Speed is critical for any barcode scanning application – whether you are scanning products in a warehouse with a camera, parts on a production line, or items at the checkout.
VintaSoft Barcode .NET SDK offers an automatic barcode recognition mode that is used by default. The automatic barcode recognition mode is balanced in favor of recognition quality for barcode recognition in any conditions.
Also
VintaSoft Barcode .NET SDK offers a manual barcode recognition mode, which has many specialized settings and allows you to achieve maximum performance and / or barcode recognition quality in each specific situation.
Below we will consider how the deep adjusting of
VintaSoft Barcode .NET SDK settings helps to achieve fast barcode reading in various conditions.
Step 1. Define basic (general) scanning settings
These settings affect the recognition speed of all types of barcodes.
Set barcode types
Set barcode types or barcode subset types:
reader.Settings.ScanBarcodeTypes = BarcodeType.QR | BarcodeType.DataMatrix;
reader.Settings.ScanBarcodeSubsets.Add(BarcodeSymbologySubsets.GS1_128);
Set the expected number of barcodes
Use the
ReaderSettings.ExpectedBarcodes property to set the number of barcodes expected in the image.
Set the recognition mode
The recognition mode makes the most significant contribution to the speed of barcode recognition. VintaSoft Barcode Reader provides four recognition modes used in different situations:
- Automatic (default). This mode does not require configuration and sacrifices speed in favor of recognition quality. The recognition speed will directly depend on the quality of the image with barcodes. This mode is suitable when the parameters of images and barcodes are unknown (changing or uneven lighting, blurring, unknown barcode size, etc).
reader.Settings.AutomaticRecognition = true;
- Iterative. This mode is used when the barcode illumination changes. Set the upper and lower binarization thresholds, the number of iterations. The recognition speed will depend on the correct choice of the number of iterations, as well as the upper and lower binarization thresholds.
reader.Settings.AutomaticRecognition = false;
reader.Settings.ThresholdMode = ThresholdMode.Iterations;
reader.Settings.ThresholdMin = 100;
reader.Settings.ThresholdMax = 600;
reader.Settings.ThresholdIterations = 6;
- Automatic threshold. This mode is used when the illumination of the barcode changes, while the barcode has normal modulation (consists of black and white colors). The recognition speed will be fixed regardless of the image quality.
reader.Settings.AutomaticRecognition = false;
reader.Settings.ThresholdMode = ThresholdMode.Automatic;
- Manual threshold. This mode should be used when the barcode illumination does not change, for example if the camera is installed on a production line. Set the binarization threshold using the ReaderSettings.Threshold property. The recognition speed will be fixed regardless of the image quality.
reader.Settings.AutomaticRecognition = false;
reader.Settings.ThresholdMode = ThresholdMode.Iterations;
reader.Settings.Threshold = 450;
Check the size of the barcode in the image
If your one-dimensional barcodes are of good quality and have a large height, then increase the scanning interval using the property
ReaderSettings.ScanInterval.
Specify the location of the barcode on the image
If you know in which rectangle on the image the barcode may be located, then specify the coordinates of the rectangle using the property
ReaderSettings.ScanRectangle.
Step 2. Advanced Settings.
VintaSoft goes further by providing advanced control over the barcode recognition engine. This gives VintaSoft Barcode Reader a performance advantage that other vendors do not offer, providing unmatched speed in a variety of environments.
Determine the size of the barcode modules
If the image contains a barcode in which a single module is more than 6 pixels, use the
ReaderSettings.ImageScaleFactor property to reduce the image so that the size of a single module is in the range from 3 to 6 pixels. This will significantly speed up the barcode recognition.
Multithreaded processing
VintaSoft Barcode Reader uses multithreaded processing by default. You can change the number of threads used using the property
ReaderSettings.MaximumThreadCount.
Fine-tuning of binarization
VintaSoft Barcode Reader provides two modes of adaptive binarization:
Fast and
HighQuality (default). If the barcode in the images has uniform illumination, then use the fast mode of adaptive binarization:
reader.Settings.AdaptiveBinarizationType = AdaptiveBinarizationType.Fast;
Define scanning settings depending on the type of barcodes being scanned
Step 3: Additional measures for maximum speed
- To limit the time for barcode recognition, use the ReaderSettings.RecognitionTimeout property.
- Create one instance of the BarcodeReader class for recognition and use it multiple times. If recognition of different images is performed in several threads, then use one instance of the BarcodeReader class for each thread.
- Avoid encoding/decoding images if possible. If the image pixel data is in memory (e.g. from a camera), then use the following as the source for image recognition:
- Contact our team of experts for individual recommendations on customization of VintaSoft Barcode Reader for your task.
Bottom Line: Fast Barcode Scanning in Any Conditions
VintaSoft Barcode Reader is designed to work quickly even in challenging conditions - low or uneven lighting, blurry images, busy layouts or distorted images. With deep configuration settings for the barcode scanning process, it allows your applications to:
- Provide instant scanning for a better user experience
- Maintain consistent barcode recognition quality
- Adapt scanning speed to your needs
- Reduce hardware loads, which is important for mobile, embedded or high-performance systems.