public final class QualitySettings
extends java.lang.Object
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 BarCodeReaderBarCodeReader reader = new BarCodeReader("c:\\test.png", DecodeType.CODE_39_STANDARD, DecodeType.CODE_128); //set high performance mode reader.setQualitySettings(QualitySettings.getHighPerformance()); for(BarCodeResult result : reader.readBarCodes()) System.out.println("BarCode CodeText: " + result.getCodeText()); BarCodeReader reader = new BarCodeReader("c:\\test.png", DecodeType.CODE_39_STANDARD, DecodeType.CODE_128); //normal quality mode is set by default for(BarCodeResult result : reader.readBarCodes()) System.out.println("BarCode CodeText: " + result.getCodeText()); BarCodeReader reader = new BarCodeReader("c:\\test.png", DecodeType.CODE_39_STANDARD, DecodeType.CODE_128); //set high quality mode with low speed recognition reader.setQualitySettings(QualitySettings.getHighQuality()); for(BarCodeResult result : reader.readBarCodes()) System.out.println("BarCode CodeText: " + result.getCodeText()); BarCodeReader reader = new BarCodeReader("c:\\test.png", DecodeType.CODE_39_STANDARD, DecodeType.CODE_128); //set max barcodes mode, which tries to find all possible barcodes, even incorrect. The slowest recognition mode reader.setQualitySettings(QualitySettings.getMaxBarCodes()); for(BarCodeResult result : reader.readBarCodes()) System.out.println("BarCode CodeText: " + result.getCodeText()); BarCodeReader reader = new BarCodeReader("c:\\test.png", DecodeType.CODE_39_STANDARD, DecodeType.CODE_128); //set high performance mode reader.setQualitySettings(QualitySettings.getHighPerformance()); //set separate options reader.getQualitySettings().setAllowMedianSmoothing(true); reader.getQualitySettings().setMedianSmoothingWindowSize(5); for(BarCodeResult result : reader.readBarCodes()) System.out.println("BarCode CodeText: " + result.getCodeText()); BarCodeReader reader = new BarCodeReader("c:\\test.png", DecodeType.CODE_39_STANDARD, DecodeType.CODE_128); //default mode is NormalQuality //set separate options reader.getQualitySettings().setAllowMedianSmoothing(true); reader.getQualitySettings().setMedianSmoothingWindowSize(5); for(BarCodeResult result : reader.readBarCodes()) System.out.println("BarCode CodeText: " + result.getCodeText());
Constructor and Description |
---|
QualitySettings()
QualitySettings constructor
|
QualitySettings(QualitySettings Settings)
QualitySettings copy constructor
|
Modifier and Type | Method and Description |
---|---|
void |
applyAll(QualitySettings Src)
Function apply all values from Src setting to this
|
boolean |
getAllowComplexBackground()
Allows engine to recognize color barcodes on color background as additional scan.
|
boolean |
getAllowDatamatrixIndustrialBarcodes()
Allows engine for Datamatrix to recognize dashed industrial Datamatrix barcodes.
|
boolean |
getAllowDecreasedImage()
Allows engine to recognize decreased image as additional scan.
|
boolean |
getAllowDetectScanGap()
Allows engine to use gap between scans to increase recognition speed.
|
boolean |
getAllowIncorrectBarcodes()
Allows engine to recognize barcodes which has incorrect checksumm or incorrect values.
|
boolean |
getAllowInvertImage()
Allows engine to recognize inverse color image as additional scan.
|
boolean |
getAllowMedianSmoothing()
Allows engine to enable median smoothing as additional scan.
|
boolean |
getAllowMicroWhiteSpotsRemoving()
Allows engine for Postal barcodes to recognize slightly noised images.
|
boolean |
getAllowOneDAdditionalScan()
Allows engine for 1D barcodes to recognize regular image with different params as additional scan.
|
boolean |
getAllowOneDFastBarcodesDetector()
Allows engine for 1D barcodes to quickly recognize high quality barcodes which fill almost whole image.
|
boolean |
getAllowOneDWipedBarsRestoration()
Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern.
|
boolean |
getAllowQRMicroQrRestoration()
Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes.
|
boolean |
getAllowRegularImage()
Allows engine to recognize regular image without any restorations as main scan.
|
boolean |
getAllowSaltAndPaperFiltering()
Allows engine to recognize barcodes with salt and paper noise type.
|
boolean |
getAllowWhiteSpotsRemoving()
Allows engine to recognize image without small white spots as additional scan.
|
BarcodeSvmDetectorSettings |
getDetectorSettings()
Barcode detector settings.
|
static QualitySettings |
getHighPerformance()
HighPerformance recognition quality preset.
|
static QualitySettings |
getHighQuality()
HighQuality recognition quality preset.
|
static QualitySettings |
getHighQualityDetection()
HighQualityDetection recognition quality preset.
|
static QualitySettings |
getMaxBarCodes()
MaxBarCodes recognition quality preset.
|
static QualitySettings |
getMaxQualityDetection()
MaxQualityDetection recognition quality preset.
|
int |
getMedianSmoothingWindowSize()
Window size for median smoothing.
|
static QualitySettings |
getNormalQuality()
NormalQuality recognition quality preset.
|
boolean |
getUseOldBarcodeDetector()
Switches to the old barcode detector.
|
void |
setAllowComplexBackground(boolean value)
Allows engine to recognize color barcodes on color background as additional scan.
|
void |
setAllowDatamatrixIndustrialBarcodes(boolean value)
Allows engine for Datamatrix to recognize dashed industrial Datamatrix barcodes.
|
void |
setAllowDecreasedImage(boolean value)
Allows engine to recognize decreased image as additional scan.
|
void |
setAllowDetectScanGap(boolean value)
Allows engine to use gap between scans to increase recognition speed.
|
void |
setAllowIncorrectBarcodes(boolean value)
Allows engine to recognize barcodes which has incorrect checksumm or incorrect values.
|
void |
setAllowInvertImage(boolean value)
Allows engine to recognize inverse color image as additional scan.
|
void |
setAllowMedianSmoothing(boolean value)
Allows engine to enable median smoothing as additional scan.
|
void |
setAllowMicroWhiteSpotsRemoving(boolean value)
Allows engine for Postal barcodes to recognize slightly noised images.
|
void |
setAllowOneDAdditionalScan(boolean value)
Allows engine for 1D barcodes to recognize regular image with different params as additional scan.
|
void |
setAllowOneDFastBarcodesDetector(boolean value)
Allows engine for 1D barcodes to quickly recognize high quality barcodes which fill almost whole image.
|
void |
setAllowOneDWipedBarsRestoration(boolean value)
Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern.
|
void |
setAllowQRMicroQrRestoration(boolean value)
Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes.
|
void |
setAllowRegularImage(boolean value)
Allows engine to recognize regular image without any restorations as main scan.
|
void |
setAllowSaltAndPaperFiltering(boolean value)
Allows engine to recognize barcodes with salt and paper noise type.
|
void |
setAllowWhiteSpotsRemoving(boolean value)
Allows engine to recognize image without small white spots as additional scan.
|
void |
setDetectorSettings(BarcodeSvmDetectorSettings value)
Barcode detector settings.
|
void |
setMedianSmoothingWindowSize(int value)
Window size for median smoothing.
|
void |
setUseOldBarcodeDetector(boolean value)
Switches to the old barcode detector.
|
public QualitySettings()
QualitySettings constructor
public QualitySettings(QualitySettings Settings)
QualitySettings copy constructor
Settings
- NEED TO IMPLEMENT DOCUMENTATION FOR THIS VALUEpublic static QualitySettings getHighPerformance()
HighPerformance recognition quality preset. High quality barcodes are recognized well in this mode.
BarCodeReader reader = new BarCodeReader("test.png"); reader.setQualitySettings(QualitySettings.getHighPerformance());Value: HighPerformance recognition quality preset.
public static QualitySettings getNormalQuality()
NormalQuality recognition quality preset. Suitable for the most of barcodes
BarCodeReader reader = new BarCodeReader("test.png"); reader.setQualitySettings(QualitySettings.getNormalQuality());Value: NormalQuality recognition quality preset.
public static QualitySettings getHighQualityDetection()
HighQualityDetection recognition quality preset. Same as NormalQuality but with high quality DetectorSettings
BarCodeReader reader = new BarCodeReader("test.png"); reader.setQualitySettings(QualitySettings.getHighQualityDetection());Value: HighQualityDetection recognition quality preset.
public static QualitySettings getMaxQualityDetection()
MaxQualityDetection recognition quality preset. Same as NormalQuality but with highest quality DetectorSettings
.
Allows to detect diagonal and damaged barcodes.
BarCodeReader reader = new BarCodeReader("test.png"); reader.setQualitySettings(QualitySettings.getMaxQualityDetection());Value: MaxQualityDetection recognition quality preset.
public static QualitySettings getHighQuality()
HighQuality recognition quality preset. This preset is developed for low quality barcodes. Allows to detect diagonal and highly damaged barcodes.
BarCodeReader reader = new BarCodeReader("test.png"); reader.setQualitySettings(QualitySettings.getHighQuality());Value: HighQuality recognition quality preset.
public static QualitySettings getMaxBarCodes()
MaxBarCodes recognition quality preset. This preset is developed to recognize all possible barcodes, even incorrect barcodes.
BarCodeReader reader = new BarCodeReader("test.png"); reader.setQualitySettings(QualitySettings.getMaxBarCodes());Value: MaxBarCodes recognition quality preset.
public boolean getAllowInvertImage()
Allows engine to recognize inverse color image as additional scan. Mode can be used when barcode is white on black background.
Value: Allows engine to recognize inverse color image.public void setAllowInvertImage(boolean value)
Allows engine to recognize inverse color image as additional scan. Mode can be used when barcode is white on black background.
Value: Allows engine to recognize inverse color image.public boolean getAllowIncorrectBarcodes()
Allows engine to recognize barcodes which has incorrect checksumm or incorrect values. Mode can be used to recognize damaged barcodes with incorrect text.
Value: Allows engine to recognize incorrect barcodes.public void setAllowIncorrectBarcodes(boolean value)
Allows engine to recognize barcodes which has incorrect checksumm or incorrect values. Mode can be used to recognize damaged barcodes with incorrect text.
Value: Allows engine to recognize incorrect barcodes.public boolean getAllowComplexBackground()
Allows engine to recognize color barcodes on color background as additional scan. Extremely slow mode.
Value: Allows engine to recognize color barcodes on color background.public void setAllowComplexBackground(boolean value)
Allows engine to recognize color barcodes on color background as additional scan. Extremely slow mode.
Value: Allows engine to recognize color barcodes on color background.public boolean getAllowMedianSmoothing()
Allows engine to enable median smoothing as additional scan. Mode helps to recognize noised barcodes.
Value: Allows engine to enable median smoothing.public void setAllowMedianSmoothing(boolean value)
Allows engine to enable median smoothing as additional scan. Mode helps to recognize noised barcodes.
Value: Allows engine to enable median smoothing.public int getMedianSmoothingWindowSize()
Window size for median smoothing. Typical values are 3 or 4. Default value is 3. AllowMedianSmoothing must be set.
Value: Window size for median smoothing.public void setMedianSmoothingWindowSize(int value)
Window size for median smoothing. Typical values are 3 or 4. Default value is 3. AllowMedianSmoothing must be set.
Value: Window size for median smoothing.public boolean getAllowRegularImage()
Allows engine to recognize regular image without any restorations as main scan. Mode to recognize image as is.
Value: Allows to recognize regular image without any restorations.public void setAllowRegularImage(boolean value)
Allows engine to recognize regular image without any restorations as main scan. Mode to recognize image as is.
Value: Allows to recognize regular image without any restorations.public boolean getAllowDecreasedImage()
Allows engine to recognize decreased image as additional scan. Size for decreasing is selected by internal engine algorithms. Mode helps to recognize barcodes which are noised and blurred but captured with high resolution.
Value: Allows engine to recognize decreased imagepublic void setAllowDecreasedImage(boolean value)
Allows engine to recognize decreased image as additional scan. Size for decreasing is selected by internal engine algorithms. Mode helps to recognize barcodes which are noised and blurred but captured with high resolution.
Value: Allows engine to recognize decreased imagepublic boolean getAllowWhiteSpotsRemoving()
Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering.
Value: Allows engine to recognize image without small white spots.public void setAllowWhiteSpotsRemoving(boolean value)
Allows engine to recognize image without small white spots as additional scan. Mode helps to recognize noised image as well as median smoothing filtering.
Value: Allows engine to recognize image without small white spots.public boolean getAllowOneDAdditionalScan()
Allows engine for 1D barcodes to recognize regular image with different params as additional scan. Mode helps to recongize low height 1D barcodes.
Value: Allows engine for 1D barcodes to run additional scan.public void setAllowOneDAdditionalScan(boolean value)
Allows engine for 1D barcodes to recognize regular image with different params as additional scan. Mode helps to recongize low height 1D barcodes.
Value: Allows engine for 1D barcodes to run additional scan.public boolean getUseOldBarcodeDetector()
Switches to the old barcode detector.
Value: Switches to the old barcode detector.public void setUseOldBarcodeDetector(boolean value)
Switches to the old barcode detector.
Value: Switches to the old barcode detector.public boolean getAllowOneDFastBarcodesDetector()
Allows engine for 1D barcodes to quickly recognize high quality barcodes which fill almost whole image. Mode helps to quickly recognize generated barcodes from Internet.
Value: Allows engine for 1D barcodes to quickly recognize high quality barcodes.public void setAllowOneDFastBarcodesDetector(boolean value)
Allows engine for 1D barcodes to quickly recognize high quality barcodes which fill almost whole image. Mode helps to quickly recognize generated barcodes from Internet.
Value: Allows engine for 1D barcodes to quickly recognize high quality barcodes.public boolean getAllowMicroWhiteSpotsRemoving()
Allows engine for Postal barcodes to recognize slightly noised images. Mode helps to recognize sligtly damaged Postal barcodes.
Value: Allows engine for Postal barcodes to recognize slightly noised images.public void setAllowMicroWhiteSpotsRemoving(boolean value)
Allows engine for Postal barcodes to recognize slightly noised images. Mode helps to recognize sligtly damaged Postal barcodes.
Value: Allows engine for Postal barcodes to recognize slightly noised images.public boolean getAllowSaltAndPaperFiltering()
Allows engine to recognize barcodes with salt and paper noise type. Mode can remove small noise with white and black dots.
Value: Allows engine to recognize barcodes with salt and paper noise type.public void setAllowSaltAndPaperFiltering(boolean value)
Allows engine to recognize barcodes with salt and paper noise type. Mode can remove small noise with white and black dots.
Value: Allows engine to recognize barcodes with salt and paper noise type.public boolean getAllowDetectScanGap()
Allows engine to use gap between scans to increase recognition speed. Mode can make recognition problems with low height barcodes.
Value: Allows engine to use gap between scans to increase recognition speed.public void setAllowDetectScanGap(boolean value)
Allows engine to use gap between scans to increase recognition speed. Mode can make recognition problems with low height barcodes.
Value: Allows engine to use gap between scans to increase recognition speed.public boolean getAllowDatamatrixIndustrialBarcodes()
Allows engine for Datamatrix to recognize dashed industrial Datamatrix barcodes. Slow mode which helps only for dashed barcodes which consist from spots.
Value: Allows engine for Datamatrix to recognize dashed industrial barcodes.public void setAllowDatamatrixIndustrialBarcodes(boolean value)
Allows engine for Datamatrix to recognize dashed industrial Datamatrix barcodes. Slow mode which helps only for dashed barcodes which consist from spots.
Value: Allows engine for Datamatrix to recognize dashed industrial barcodes.public boolean getAllowQRMicroQrRestoration()
Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes.
Value: Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes.public void setAllowQRMicroQrRestoration(boolean value)
Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes.
Value: Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes.public boolean getAllowOneDWipedBarsRestoration()
Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern.
Value: Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern.public void setAllowOneDWipedBarsRestoration(boolean value)
Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern.
Value: Allows engine for 1D barcodes to recognize barcodes with single wiped/glued bars in pattern.public BarcodeSvmDetectorSettings getDetectorSettings()
Barcode detector settings.
public void setDetectorSettings(BarcodeSvmDetectorSettings value)
Barcode detector settings.
public void applyAll(QualitySettings Src)
Function apply all values from Src setting to this
Src
- source settings