Class BarcodeScannerConfiguration

java.lang.Object
io.scanbot.sdk.barcode.BarcodeScannerConfiguration

public class BarcodeScannerConfiguration extends Object
Configuration for the barcode scanner.
  • Constructor Details

    • BarcodeScannerConfiguration

      public BarcodeScannerConfiguration(List<BarcodeFormatConfigurationBase> barcodeFormatConfigurations, List<BarcodeDocumentFormat> extractedDocumentFormats, boolean onlyAcceptDocuments, boolean returnBarcodeImage, Accelerator accelerator, BarcodeAccumulationConfiguration accumulationConfig, BarcodeSelectionConfiguration selectionConfig, boolean optimizedForOverlays, double directAcceptanceAreaFraction, BarcodeScannerEngineMode engineMode, ProcessingMode processingMode)
      Constructs BarcodeScannerConfiguration with the given params.
      Parameters:
      barcodeFormatConfigurations - Options for barcode decoding.
      extractedDocumentFormats - List of document formats to be extracted. Barcodes that decode to one of the extracted document formats will have extractedDocument field in BarcodeItem populated with the parsed document. By default all supported barcode document formats are accepted. If empty, no barcodes will be parsed into documents. To only accept the document formats listed in extractedDocumentFormats, the property onlyAcceptDocuments must be true.
      onlyAcceptDocuments - If true and extractedDocumentFormats is not empty, then barcodes that don't decode to one of the extracted document formats will be ignored. Default is `false`.
      returnBarcodeImage - If true, the barcode image will be returned in the BarcodeItem. Default is `false`.
      accelerator - Accelerator to use for running machine learning models. Is applied only for live mode scanning.
      accumulationConfig - Configuration to accumulate barcodes across multiple frames in live mode.
      selectionConfig - Configuration used to select barcodes.
      optimizedForOverlays - If true, the quads of linear (1D) barcodes will be further refined to more closely match the barcode's outline in the input image. This will also produce stabler barcode outlines across frames for use cases such as AR. Default is `false`.
      directAcceptanceAreaFraction - In single-shot mode, if the combined area of detected barcodes exceeds this fraction of the input image, the scanner returns the result immediately. Further scanning is skipped, even if more barcodes may be present. This can be used to accelerate scanning when barcode sizes are known in advance. To disable this behaviour, the value must be set to 1.0. Default is `0.8`.
      engineMode - The engine mode for barcode scanning. Default is `NEXT_GEN`.
      processingMode - Scanners typically can produce better results from a single image if they are allowed to spend a longer time analyzing it. On the other hand, scanners can produce even better results if they can analyze multiple images of the same subject and cross-check and combine the results. The processing mode tells the scanner whether to optimize for single or multiple images of a subject. Default is `AUTO`.
    • BarcodeScannerConfiguration

      public BarcodeScannerConfiguration()
      Constructs BarcodeScannerConfiguration with default parameters.
  • Method Details

    • getBarcodeFormatConfigurations

      public List<BarcodeFormatConfigurationBase> getBarcodeFormatConfigurations()
      Getter for barcodeFormatConfigurations field. See constructor documentation for more information about the field.
      Returns:
      barcodeFormatConfigurations
    • setBarcodeFormatConfigurations

      public void setBarcodeFormatConfigurations(List<BarcodeFormatConfigurationBase> barcodeFormatConfigurations)
      Setter for barcodeFormatConfigurations field. See constructor documentation for more information about the field.
      Parameters:
      barcodeFormatConfigurations - Value to set.
    • getExtractedDocumentFormats

      public List<BarcodeDocumentFormat> getExtractedDocumentFormats()
      Getter for extractedDocumentFormats field. See constructor documentation for more information about the field.
      Returns:
      extractedDocumentFormats
    • setExtractedDocumentFormats

      public void setExtractedDocumentFormats(List<BarcodeDocumentFormat> extractedDocumentFormats)
      Setter for extractedDocumentFormats field. See constructor documentation for more information about the field.
      Parameters:
      extractedDocumentFormats - Value to set.
    • getOnlyAcceptDocuments

      public boolean getOnlyAcceptDocuments()
      Getter for onlyAcceptDocuments field. See constructor documentation for more information about the field.
      Returns:
      onlyAcceptDocuments
    • setOnlyAcceptDocuments

      public void setOnlyAcceptDocuments(boolean onlyAcceptDocuments)
      Setter for onlyAcceptDocuments field. See constructor documentation for more information about the field.
      Parameters:
      onlyAcceptDocuments - Value to set.
    • getReturnBarcodeImage

      public boolean getReturnBarcodeImage()
      Getter for returnBarcodeImage field. See constructor documentation for more information about the field.
      Returns:
      returnBarcodeImage
    • setReturnBarcodeImage

      public void setReturnBarcodeImage(boolean returnBarcodeImage)
      Setter for returnBarcodeImage field. See constructor documentation for more information about the field.
      Parameters:
      returnBarcodeImage - Value to set.
    • getAccelerator

      public Accelerator getAccelerator()
      Getter for accelerator field. See constructor documentation for more information about the field.
      Returns:
      accelerator
    • setAccelerator

      public void setAccelerator(Accelerator accelerator)
      Setter for accelerator field. See constructor documentation for more information about the field.
      Parameters:
      accelerator - Value to set.
    • getAccumulationConfig

      public BarcodeAccumulationConfiguration getAccumulationConfig()
      Getter for accumulationConfig field. See constructor documentation for more information about the field.
      Returns:
      accumulationConfig
    • setAccumulationConfig

      public void setAccumulationConfig(BarcodeAccumulationConfiguration accumulationConfig)
      Setter for accumulationConfig field. See constructor documentation for more information about the field.
      Parameters:
      accumulationConfig - Value to set.
    • getSelectionConfig

      public BarcodeSelectionConfiguration getSelectionConfig()
      Getter for selectionConfig field. See constructor documentation for more information about the field.
      Returns:
      selectionConfig
    • setSelectionConfig

      public void setSelectionConfig(BarcodeSelectionConfiguration selectionConfig)
      Setter for selectionConfig field. See constructor documentation for more information about the field.
      Parameters:
      selectionConfig - Value to set.
    • getOptimizedForOverlays

      public boolean getOptimizedForOverlays()
      Getter for optimizedForOverlays field. See constructor documentation for more information about the field.
      Returns:
      optimizedForOverlays
    • setOptimizedForOverlays

      public void setOptimizedForOverlays(boolean optimizedForOverlays)
      Setter for optimizedForOverlays field. See constructor documentation for more information about the field.
      Parameters:
      optimizedForOverlays - Value to set.
    • getDirectAcceptanceAreaFraction

      public double getDirectAcceptanceAreaFraction()
      Getter for directAcceptanceAreaFraction field. See constructor documentation for more information about the field.
      Returns:
      directAcceptanceAreaFraction
    • setDirectAcceptanceAreaFraction

      public void setDirectAcceptanceAreaFraction(double directAcceptanceAreaFraction)
      Setter for directAcceptanceAreaFraction field. See constructor documentation for more information about the field.
      Parameters:
      directAcceptanceAreaFraction - Value to set.
    • getEngineMode

      public BarcodeScannerEngineMode getEngineMode()
      Getter for engineMode field. See constructor documentation for more information about the field.
      Returns:
      engineMode
    • setEngineMode

      public void setEngineMode(BarcodeScannerEngineMode engineMode)
      Setter for engineMode field. See constructor documentation for more information about the field.
      Parameters:
      engineMode - Value to set.
    • getProcessingMode

      public ProcessingMode getProcessingMode()
      Getter for processingMode field. See constructor documentation for more information about the field.
      Returns:
      processingMode
    • setProcessingMode

      public void setProcessingMode(ProcessingMode processingMode)
      Setter for processingMode field. See constructor documentation for more information about the field.
      Parameters:
      processingMode - Value to set.