Yanlış Pozitifler
Yanlış Pozitifler Nasıl Kaldırılır?
Barkod okuma işlemlerinde yanlış pozitifler, karmaşık arka plan desenlerinin barkodlara benzemesi ya da gürültü ve artefaktların yanlışlıkla okuyucunun geçerli barkod olarak tanımladığı istenmeyen işaretler oluşturduğunda ortaya çıkabilir. IronBarcode'un okuma çıktısından yanlış pozitifleri kaldırmak için aşağıdaki adımlar atılabilir:
-
Beklenen Barkod Formatlarını Belirtin: IronBarcode'u yalnızca beklenen barkod formatlarını okuması için yapılandırın. Tam seçenek listesi burada mevcuttur: BarcodeEncoding.
RemoveFalsePositiveÖzelliğini Etkinleştirin: Barkod taraması yaparken, IronBarcode bir görüntüde en çok barkoda benzeyen "aday" bölgelerini arar ve ardından bu bölgeleri çözmeye çalışır. Bu özelliğitrueolarak ayarlarsanız, IronBarcode sadece kodlamasında hata olmayan bölgeleri çözecektir. Varsayılan olarak,RemoveFalsePositivezatentrueolarak ayarlanmıştır.
using IronBarCode;
class BarcodeExample
{
static void Main()
{
// Create a BarcodeReaderOptions object with specific parameters.
BarcodeReaderOptions myOptionsExample = new BarcodeReaderOptions()
{
// Expect and return barcode results for only the Code 39 type.
ExpectBarcodeTypes = IronBarCode.BarcodeEncoding.Code39,
// Enable removal of false positives by setting to true.
RemoveFalsePositive = true
};
// Read the barcode from the specified image file using the given options.
var results = BarcodeReader.Read("barcode.png", myOptionsExample);
// Process the results here, e.g., display them, log them, etc.
}
}
using IronBarCode;
class BarcodeExample
{
static void Main()
{
// Create a BarcodeReaderOptions object with specific parameters.
BarcodeReaderOptions myOptionsExample = new BarcodeReaderOptions()
{
// Expect and return barcode results for only the Code 39 type.
ExpectBarcodeTypes = IronBarCode.BarcodeEncoding.Code39,
// Enable removal of false positives by setting to true.
RemoveFalsePositive = true
};
// Read the barcode from the specified image file using the given options.
var results = BarcodeReader.Read("barcode.png", myOptionsExample);
// Process the results here, e.g., display them, log them, etc.
}
}
Imports IronBarCode
Friend Class BarcodeExample
Shared Sub Main()
' Create a BarcodeReaderOptions object with specific parameters.
Dim myOptionsExample As New BarcodeReaderOptions() With {
.ExpectBarcodeTypes = IronBarCode.BarcodeEncoding.Code39,
.RemoveFalsePositive = True
}
' Read the barcode from the specified image file using the given options.
Dim results = BarcodeReader.Read("barcode.png", myOptionsExample)
' Process the results here, e.g., display them, log them, etc.
End Sub
End Class

