Inherits _MwWrapper.
QualitySettings allows to configure recognition quality and speed manually.
You can quickly set up QualitySettings by embedded presets: HighPerformance, NormalQuality, HighQuality, MaxBarCodes or you can manually configure separate options. Default value of QualitySettings is NormalQuality. This sample shows how to use QualitySettings with BarCodeReader
reader = BarCodeReader(image_path, [DecodeType.CODE_39, DecodeType.CODE_128])
reader.quality_settings = QualitySettings.high_performance()
for result in reader.read_barcodes():
print("BarCode CodeText:", result.code_text)
reader = BarCodeReader(image_path, [DecodeType.CODE_39, DecodeType.CODE_128])
for result in reader.read_barcodes():
print("BarCode CodeText:", result.code_text)
reader = BarCodeReader(image_path, [DecodeType.CODE_39, DecodeType.CODE_128])
for result in reader.read_barcodes():
print("BarCode CodeText:", result.code_text)
reader = BarCodeReader(image_path, [DecodeType.CODE_39, DecodeType.CODE_128])
reader.quality_settings = QualitySettings.max_quality()
for result in reader.read_barcodes():
print("BarCode CodeText:", result.code_text)
reader = BarCodeReader(image_path, [DecodeType.CODE_39, DecodeType.CODE_128])
reader.quality_settings = QualitySettings.high_performance()
quality_settings = reader.quality_settings
quality_settings.allow_incorrect_barcodes = True
for result in reader.read_barcodes():
print("BarCode CodeText:", result.code_text)