Class BarcodeSelectionConfiguration

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

public class BarcodeSelectionConfiguration extends Object
Configuration for how to select barcode results.
  • Constructor Details

    • BarcodeSelectionConfiguration

      public BarcodeSelectionConfiguration(BarcodeSelectionMethod selectionMethod, double centerCoordX, double centerCoordY, double centerDistanceTolerance)
      Constructs BarcodeSelectionConfiguration with the given params.
      Parameters:
      selectionMethod - The method used to select barcodes. Default is `ALL`.
      centerCoordX - The normalized x‑coordinate of the image center, expressed in the range [0,1]. Only used when selectionMethod is CENTER or CENTER_CLOSEST. The default is the center of the image, but can be set to other coordinates for use cases where the center of the frame may not be the point of interest. Default is `0.5`.
      centerCoordY - The normalized y‑coordinate of the image center, expressed in the range [0,1]. Only used when selectionMethod is CENTER or CENTER_CLOSEST. The default is the center of the image, but can be set to other coordinates for use cases where the center of the frame may not be the point of interest. Default is `0.5`.
      centerDistanceTolerance - The maximum allowed distance from centerCoord at which a barcode may still be selected when selectionMethod is CENTER. If multiple barcodes are within the tolerance, the closest one will be selected. The value is expressed in terms of the image size, where 1.0 means the maximum distance which is equal to the diagonal of the image. The default value is 0, which means that barcodes must touch the center of the frame to be selected. Increasing this value can help with selecting barcodes that are close to the center but not touching it. Default is `0`.
    • BarcodeSelectionConfiguration

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

    • getSelectionMethod

      public BarcodeSelectionMethod getSelectionMethod()
      Getter for selectionMethod field. See constructor documentation for more information about the field.
      Returns:
      selectionMethod
    • setSelectionMethod

      public void setSelectionMethod(BarcodeSelectionMethod selectionMethod)
      Setter for selectionMethod field. See constructor documentation for more information about the field.
      Parameters:
      selectionMethod - Value to set.
    • getCenterCoordX

      public double getCenterCoordX()
      Getter for centerCoordX field. See constructor documentation for more information about the field.
      Returns:
      centerCoordX
    • setCenterCoordX

      public void setCenterCoordX(double centerCoordX)
      Setter for centerCoordX field. See constructor documentation for more information about the field.
      Parameters:
      centerCoordX - Value to set.
    • getCenterCoordY

      public double getCenterCoordY()
      Getter for centerCoordY field. See constructor documentation for more information about the field.
      Returns:
      centerCoordY
    • setCenterCoordY

      public void setCenterCoordY(double centerCoordY)
      Setter for centerCoordY field. See constructor documentation for more information about the field.
      Parameters:
      centerCoordY - Value to set.
    • getCenterDistanceTolerance

      public double getCenterDistanceTolerance()
      Getter for centerDistanceTolerance field. See constructor documentation for more information about the field.
      Returns:
      centerDistanceTolerance
    • setCenterDistanceTolerance

      public void setCenterDistanceTolerance(double centerDistanceTolerance)
      Setter for centerDistanceTolerance field. See constructor documentation for more information about the field.
      Parameters:
      centerDistanceTolerance - Value to set.