BarcodeScannerSession Class |
Namespace: Scandit.Recognition
The BarcodeScannerSession type exposes the following members.
Name | Description | |
---|---|---|
Clear | Remove all codes from the scan session. | |
Dispose | Dispose the BarcodeScannerSession. | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetAllRecognizedCodes | Get all recognized codes | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetNewlyLocalizedCodes | Get codes localized but not recognized in the last processed frame. | |
GetNewlyRecognizedCodes | Get codes that were recognized in the last processed frame. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
The barcode scanner session can be obtained at any time from a barcode scanner object by accessing the Session property. The session contains the decoded as well as localized barcodes after the last call to ProcessFrame(ImageDescription, Byte).
The scan session is responsible for determining the list of relevant barcodes by filtering out duplicates. Depending on your app, different duplicate removal is required. For some applications, only one barcode is required. The scanning process is stopped as soon as one code is decoded. For other applications, multiple codes are scanned after another. For example, a scanner at the cash desk may need to scan multiple products. To avoid duplicates, the same barcode should not be scanned in short succession. The same barcode (data, symbology) should not count as a duplicate if encountered again after a few seconds.
By default, if a barcode has the same symbology and data as code that was decoded less than 500ms ago, it is filtered out as a duplicate. The exact filtering behaviour can be changed by setting the "code duplicate filter", and "code caching duration" in BarcodeScannerSettings.