BarcodeSelectionConfiguration

data class BarcodeSelectionConfiguration(var selectionMethod: BarcodeSelectionMethod = BarcodeSelectionMethod.ALL, var centerCoordX: Double = 0.5, var centerCoordY: Double = 0.5, var centerDistanceTolerance: Double = 0.0) : Parcelable

Configuration for how to select barcode results.

Constructors

Link copied to clipboard
constructor(source: Map<String, Any?>)
constructor(json: JSONObject)
constructor(selectionMethod: BarcodeSelectionMethod = BarcodeSelectionMethod.ALL, centerCoordX: Double = 0.5, centerCoordY: Double = 0.5, centerDistanceTolerance: Double = 0.0)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

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.

Link copied to clipboard

The method used to select barcodes.

Functions

Link copied to clipboard
Link copied to clipboard
fun toJson(config: ToJsonConfiguration = ToJsonConfiguration.default()): JSONObject