Yanlış Pozitifler
Yanlış Pozitifler Nasıl Kaldırılır?
Barkod okuma sırasında, karmaşık arka plan desenlerinin barkodları andırması veya parazit ve objeler yanlışlıkla geçerli barkodlar olarak işaretlenmesi nedeniyle yanlış pozitifler ortaya çıkabilir. IronBarcode'un okuma çıktısındaki yanlış pozitifleri kaldırmak için şu adımlar izlenebilir:
-
Beklenen Barkod Formatlarını Belirtin: IronBarcode'u yalnızca beklediğiniz barkod formatlarını okumak için yapılandırın. Tam seçenek listesi burada mevcuttur: Barkod Kodlaması.
RemoveFalsePositiveÖzelliğini Etkinleştirin: Barkod taraması yaparken, IronBarcode bir görüntüdeki BarCode'a en çok benzeyen "aday" bölgeleri arar, ardından bu bölgeleri çözmeye çalışır. Bu özelliğitrueolarak ayarlayarak, IronBarcode yalnızca kodlamasında hata olmayan bölgeleri kod çö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

