更新済み 2024年12月17日
共有:

誤検知

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)
$vbLabelText   $csharpLabel