Aspose.Barcode for PHP via Java Generation and Recognition API docs

Inherits BaseJavaClass.

Public Member Functions

 getAllowInvertImage ()
 
 setAllowInvertImage ($value)
 
 getAllowIncorrectBarcodes ()
 
 setAllowIncorrectBarcodes ($value)
 
 getReadTinyBarcodes ()
 
 setReadTinyBarcodes ($value)
 
 getAllowComplexBackground ()
 
 setAllowComplexBackground ($value)
 
 getAllowMedianSmoothing ()
 
 setAllowMedianSmoothing ($value)
 
 getMedianSmoothingWindowSize ()
 
 setMedianSmoothingWindowSize ($value)
 
 getAllowRegularImage ()
 
 setAllowRegularImage ($value)
 
 getAllowDecreasedImage ()
 
 setAllowDecreasedImage ($value)
 
 getAllowWhiteSpotsRemoving ()
 
 setAllowWhiteSpotsRemoving ($value)
 
 getAllowOneDAdditionalScan ()
 
 setAllowOneDAdditionalScan ($value)
 
 getAllowOneDFastBarcodesDetector ()
 
 setAllowOneDFastBarcodesDetector ($value)
 
 getAllowMicroWhiteSpotsRemoving ()
 
 setAllowMicroWhiteSpotsRemoving ($value)
 
 getAllowSaltAndPaperFiltering ()
 
 setAllowSaltAndPaperFiltering ($value)
 
 getAllowDetectScanGap ()
 
 setAllowDetectScanGap ($value)
 
 getAllowDatamatrixIndustrialBarcodes ()
 
 setAllowDatamatrixIndustrialBarcodes ($value)
 
 getAllowQRMicroQrRestoration ()
 
 setAllowQRMicroQrRestoration ($value)
 
 getAllowOneDWipedBarsRestoration ()
 
 setAllowOneDWipedBarsRestoration ($value)
 
 getDetectorSettings ()
 
 setDetectorSettings (BarcodeSvmDetectorSettings $value)
 
 applyAll (QualitySettings $Src)
 

Static Public Member Functions

static getHighPerformance ()
 
static getNormalQuality ()
 
static getHighQualityDetection ()
 
static getMaxQualityDetection ()
 
static getHighQuality ()
 
static getMaxBarCodes ()
 

Detailed Description

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 = new BarCodeReader("test.png", DecodeType::CODE_39_STANDARD, DecodeType::CODE_128); //set high performance mode $reader->setQualitySettings(QualitySettings::getHighPerformance()); foreach($reader->readBarCodes() as $result) print("BarCode CodeText: ".$result->getCodeText()); $reader = new BarCodeReader("test.png", DecodeType::CODE_39_STANDARD, DecodeType::CODE_128); //normal quality mode is set by default foreach($reader->readBarCodes() as $result) print("BarCode CodeText: ".$result->getCodeText()); $reader = new BarCodeReader("test.png", DecodeType::CODE_39_STANDARD, DecodeType::CODE_128); //set high quality mode with low speed recognition $reader->setQualitySettings(QualitySettings::getHighQuality()); foreach($reader->readBarCodes() as $result) print("BarCode CodeText: ".$result->getCodeText()); $reader = new BarCodeReader("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()); foreach($reader->readBarCodes() as $result) print("BarCode CodeText: ".$result->getCodeText()); $reader = new BarCodeReader("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); foreach($reader->readBarCodes() as $result) print("BarCode CodeText: ".$result->getCodeText()); $reader = new BarCodeReader("test.png", DecodeType::CODE_39_STANDARD, DecodeType::CODE_128); //default mode is NormalQuality //set separate options $reader->getQualitySettings()->setAllowMedianSmoothing(true); $reader->getQualitySettings()->setMedianSmoothingWindowSize(5); foreach($reader->readBarCodes() as $result) print("BarCode CodeText: ".$result->getCodeText());

Member Function Documentation

◆ applyAll()

applyAll ( QualitySettings  $Src)

Function apply all values from Src setting to this

Parameters
Srcsource settings

◆ getAllowComplexBackground()

getAllowComplexBackground ( )
final

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.

◆ getAllowDatamatrixIndustrialBarcodes()

getAllowDatamatrixIndustrialBarcodes ( )
final

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.

◆ getAllowDecreasedImage()

getAllowDecreasedImage ( )
final

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 image

◆ getAllowDetectScanGap()

getAllowDetectScanGap ( )
final

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.

◆ getAllowIncorrectBarcodes()

getAllowIncorrectBarcodes ( )
final

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.

◆ getAllowInvertImage()

getAllowInvertImage ( )
final

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.

◆ getAllowMedianSmoothing()

getAllowMedianSmoothing ( )
final

Allows engine to enable median smoothing as additional scan. Mode helps to recognize noised barcodes. Value: Allows engine to enable median smoothing.

◆ getAllowMicroWhiteSpotsRemoving()

getAllowMicroWhiteSpotsRemoving ( )
final

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.

◆ getAllowOneDAdditionalScan()

getAllowOneDAdditionalScan ( )
final

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.

◆ getAllowOneDFastBarcodesDetector()

getAllowOneDFastBarcodesDetector ( )
final

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.

◆ getAllowOneDWipedBarsRestoration()

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.

◆ getAllowQRMicroQrRestoration()

getAllowQRMicroQrRestoration ( )
final

Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes. Value: Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes.

◆ getAllowRegularImage()

getAllowRegularImage ( )
final

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.

◆ getAllowSaltAndPaperFiltering()

getAllowSaltAndPaperFiltering ( )
final

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.

◆ getAllowWhiteSpotsRemoving()

getAllowWhiteSpotsRemoving ( )
final

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.

◆ getDetectorSettings()

getDetectorSettings ( )

Barcode detector settings.

◆ getHighPerformance()

static getHighPerformance ( )
static

HighPerformance recognition quality preset. High quality barcodes are recognized well in this mode.

$reader = new BarCodeReader("test.png"); $reader->setQualitySettings(QualitySettings::getHighPerformance());

Value: HighPerformance recognition quality preset.

◆ getHighQuality()

static getHighQuality ( )
static

HighQuality recognition quality preset. This preset is developed for low quality barcodes.

$reader = new BarCodeReader("test.png"); $reader->setQualitySettings(QualitySettings::getHighQuality());

Value: HighQuality recognition quality preset.

◆ getHighQualityDetection()

static getHighQualityDetection ( )
static

HighQualityDetection recognition quality preset. Same as NormalQuality but with high quality DetectorSettings

$reader = new BarCodeReader("test.png"); $reader->setQualitySettings(QualitySettings::getHighQualityDetection()); *

Value: HighQualityDetection recognition quality preset.

◆ getMaxBarCodes()

static getMaxBarCodes ( )
static

MaxBarCodes recognition quality preset. This preset is developed to recognize all possible barcodes, even incorrect barcodes.

$reader = new BarCodeReader("test.png"); $reader->setQualitySettings(QualitySettings::getMaxBarCodes());

Value: MaxBarCodes recognition quality preset.

◆ getMaxQualityDetection()

static getMaxQualityDetection ( )
static

MaxQualityDetection recognition quality preset. Same as NormalQuality but with highest quality DetectorSettings. Allows to detect diagonal and damaged barcodes.

$reader = new BarCodeReader("test.png"); $reader->setQualitySettings(QualitySettings::getMaxQualityDetection());

Value: MaxQualityDetection recognition quality preset.

◆ getMedianSmoothingWindowSize()

getMedianSmoothingWindowSize ( )
final

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.

◆ getNormalQuality()

static getNormalQuality ( )
static

NormalQuality recognition quality preset. Suitable for the most of barcodes

$reader = new BarCodeReader("test.png"); $reader->setQualitySettings(QualitySettings::getNormalQuality());

Value: NormalQuality recognition quality preset.

◆ getReadTinyBarcodes()

getReadTinyBarcodes ( )

Allows engine to recognize tiny barcodes on large images. Ignored if AllowIncorrectBarcodes is set to True. Default value: False.

Returns
If True, allows engine to recognize tiny barcodes on large images.

◆ setAllowComplexBackground()

setAllowComplexBackground (   $value)
final

Allows engine to recognize color barcodes on color background as additional scan. Extremely slow mode. Value:v Allows engine to recognize color barcodes on color background.

◆ setAllowDatamatrixIndustrialBarcodes()

setAllowDatamatrixIndustrialBarcodes (   $value)
final

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.

◆ setAllowDecreasedImage()

setAllowDecreasedImage (   $value)
final

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 image

◆ setAllowDetectScanGap()

setAllowDetectScanGap (   $value)
final

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.

◆ setAllowIncorrectBarcodes()

setAllowIncorrectBarcodes (   $value)
final

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.

◆ setAllowInvertImage()

setAllowInvertImage (   $value)
final

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.

◆ setAllowMedianSmoothing()

setAllowMedianSmoothing (   $value)
final

Allows engine to enable median smoothing as additional scan. Mode helps to recognize noised barcodes. Value: Allows engine to enable median smoothing.

◆ setAllowMicroWhiteSpotsRemoving()

setAllowMicroWhiteSpotsRemoving (   $value)
final

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.

◆ setAllowOneDAdditionalScan()

setAllowOneDAdditionalScan (   $value)
final

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.

◆ setAllowOneDFastBarcodesDetector()

setAllowOneDFastBarcodesDetector (   $value)
final

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.

◆ setAllowOneDWipedBarsRestoration()

setAllowOneDWipedBarsRestoration (   $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.

◆ setAllowQRMicroQrRestoration()

setAllowQRMicroQrRestoration (   $value)
final

Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes. Value: Allows engine for QR/MicroQR to recognize damaged MicroQR barcodes.

◆ setAllowRegularImage()

setAllowRegularImage (   $value)
final

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.

◆ setAllowSaltAndPaperFiltering()

setAllowSaltAndPaperFiltering (   $value)
final

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.

◆ setAllowWhiteSpotsRemoving()

setAllowWhiteSpotsRemoving (   $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.

◆ setDetectorSettings()

setDetectorSettings ( BarcodeSvmDetectorSettings  $value)

Barcode detector settings.

◆ setMedianSmoothingWindowSize()

setMedianSmoothingWindowSize (   $value)
final

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.

◆ setReadTinyBarcodes()

setReadTinyBarcodes (   $value)

Allows engine to recognize tiny barcodes on large images. Ignored if AllowIncorrectBarcodes is set to True. Default value: False.

Parameters
valueIf True, allows engine to recognize tiny barcodes on large images.