QualitySettings

BarCodeReader.QualitySettings property

Met QualitySettings kunt u de herkenningskwaliteit en -snelheid handmatig configureren. U kunt QualitySettings snel instellen met ingesloten presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes of u kunt handmatig afzonderlijke opties configureren. De standaardwaarde van QualitySettings is NormalQuality.

public QualitySettings QualitySettings { get; set; }

Eigendoms-waarde

QualitySettings om herkenningskwaliteit en snelheid te configureren.

Voorbeelden

Dit voorbeeld laat zien hoe u QualitySettings gebruikt met BarCodeReader

[C#]
using (BarCodeReader reader = new BarCodeReader(@"c:\test.png", DecodeType.Code39Standard, DecodeType.Code128))
{
   // stel de hoge prestatiemodus in
   reader.QualitySettings = QualitySettings.HighPerformance;
   foreach (BarCodeResult result in reader.ReadBarCodes())
      Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
using (BarCodeReader reader = new BarCodeReader(@"c:\test.png", DecodeType.Code39Standard, DecodeType.Code128))
{
   //normale kwaliteitsmodus is standaard ingesteld
   foreach (BarCodeResult result in reader.ReadBarCodes())
      Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
using (BarCodeReader reader = new BarCodeReader(@"c:\test.png", DecodeType.Code39Standard, DecodeType.Code128))
{
   // stel de hoge prestatiemodus in
   reader.QualitySettings = QualitySettings.HighPerformance;
   // stel aparte opties in
   reader.QualitySettings.AllowMedianSmoothing = true;
   reader.QualitySettings.MedianSmoothingWindowSize = 5;
   foreach (BarCodeResult result in reader.ReadBarCodes())
      Console.WriteLine("BarCode CodeText: " + result.CodeText);
}
[VB.NET]
Using reader As New BarCodeReader("c:\test.png", DecodeType.Code39Standard, DecodeType.Code128)
    'stel de high performance-modus in
    reader.QualitySettings = QualitySettings.HighPerformance
    For Each result As BarCodeResult In reader.ReadBarCodes()
        Console.WriteLine("BarCode Type: " + result.CodeTypeName)
    Next
End Using
Using reader As New BarCodeReader("c:\test.png", DecodeType.Code39Standard, DecodeType.Code128)
    'standaard is de normale kwaliteitsmodus ingesteld
    For Each result As BarCodeResult In reader.ReadBarCodes()
        Console.WriteLine("BarCode Type: " + result.CodeTypeName)
    Next
End Using
Using reader As New BarCodeReader("c:\test.png", DecodeType.Code39Standard, DecodeType.Code128)
   'stel de high performance-modus in
   reader.QualitySettings = QualitySettings.HighPerformance
   'afzonderlijke opties instellen
   reader.QualitySettings.AllowMedianSmoothing = True
   reader.QualitySettings.MedianSmoothingWindowSize = 5
   For Each result As BarCodeResult In reader.ReadBarCodes()
       Console.WriteLine("BarCode Type: " + result.CodeTypeName)
   Next
End Using

Zie ook