誤報

This article was translated from English: Does it need improvement?
Translated
View the article in English

如何去除誤報?

在條碼讀取中,當複雜的背景圖案看起來像條碼,或者當噪音和雜質創造出本不打算的標記,導致讀取器錯誤地將其視為有效條碼時,就會發生假陽性。 以下步驟可用於從IronBarcode的讀取輸出中去除偽陽性:

  1. 讓 IronBarcode 僅讀取您期望的條碼格式。 以下顯示了完整的選項列表:條碼編碼.

  2. 啟用 RemoveFalsePositive 屬性。 在掃描條碼時,IronBarcode 將在圖片中搜索看起來最可能是條碼的「候選」區域,然後嘗試解碼該區域。 將此設置為 true,IronBarcode 將僅嘗試解碼在其編碼中沒有錯誤的區域。 預設情況下,RemoveFalsePositive 已設定為 true
using IronBarCode;

BarcodeReaderOptions myOptionsExample = new BarcodeReaderOptions()
{
    // Expect and return barcode results for only the Code 39 type.
    ExpectBarcodeTypes = IronBarCode.BarcodeEncoding.Code39,

    // Remove false positives.
    RemoveFalsePositive = true
};

var results = BarcodeReader.Read("barcode.png", myOptionsExample);
using IronBarCode;

BarcodeReaderOptions myOptionsExample = new BarcodeReaderOptions()
{
    // Expect and return barcode results for only the Code 39 type.
    ExpectBarcodeTypes = IronBarCode.BarcodeEncoding.Code39,

    // Remove false positives.
    RemoveFalsePositive = true
};

var results = BarcodeReader.Read("barcode.png", myOptionsExample);
Imports IronBarCode

Private myOptionsExample As New BarcodeReaderOptions() With {
	.ExpectBarcodeTypes = IronBarCode.BarcodeEncoding.Code39,
	.RemoveFalsePositive = True
}

Private results = BarcodeReader.Read("barcode.png", myOptionsExample)
VB   C#