VerifyBarcodeMethod Property (ReaderSettings)
Gets or sets method that verifies the information about barcode found by barcode reader.
Method that verifies the information about barcode found by barcode reader executes every time when the "barcode" is found by the barcode reader.
Application can analyze information about found barcode and change Confidence if this is necessary.
Method that verifies the information about barcode found can be used in automatic or iteration recognition mode and increase quality of recognition.
This example shows how to remove barcodes with ReadingQuality reading quality <0.2.
''' <summary>
''' Verifies the barcode during the barcode recognition process.
''' </summary>
Private Shared Sub VerifyBarcodeMethod(reader As BarcodeReader, barcodeInfo As IBarcodeInfo)
If barcodeInfo.ReadingQuality < 0.2 Then
barcodeInfo.Confidence = 0
End If
End Sub
' ...
' reader.Settings.VerifyBarcodeMethod = VerifyBarcodeMethod;
' ...
/// <summary>
/// Verifies the barcode during the barcode recognition process.
/// </summary>
static void VerifyBarcodeMethod(BarcodeReader reader, IBarcodeInfo barcodeInfo)
{
if (barcodeInfo.ReadingQuality < 0.2)
barcodeInfo.Confidence = 0;
}
// ...
// reader.Settings.VerifyBarcodeMethod = VerifyBarcodeMethod;
// ...
Target Platforms: .NET 7, .NET 6; .NET 5; .NET Core 3.1; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5