Skip to main content

Detection on the Image | Flutter Barcode Scanner

The Scanbot SDK efficiently analyzes a still image to identify and extract information from any barcodes present. Once detected, the scanner returns the barcode data in the result.

Processing the image

With the Scanbot SDK, you can detect barcodes from a still image, such as a JPG from the Photo Library or another source. The image should be provided as a file URI.

Single image barcode detection

To detect barcodes from a single image:

Uri file = ...;
List<BarcodeFormat> barcodeFormats = ...;
BarcodeAdditionalParameters? additionalParameters = ...;
List<BarcodeDocumentFormat> acceptedDocumentFormats = ...;

var result = ScanbotSdk.detectBarcodesOnImage(
file,
barcodeFormats: barcodeFormats,
additionalParameters: additionalParameters,
acceptedDocumentFormats: acceptedDocumentFormats
);
  • Result: result.barcodeItems - A list of recognized barcodes as items of BarcodeItem type.

For a complete list of parameters and detailed descriptions, refer to the API documentation.

Multiple images barcode detection

To detect barcodes from multiple images:

List<Uri> files = ...
List<BarcodeFormat> barcodeFormats = ...
BarcodeAdditionalParameters? additionalParameters = ...
List<BarcodeDocumentFormat> acceptedDocumentFormats = ...

var result = ScanbotSdk.detectBarcodesOnImages(
files,
barcodeFormats: barcodeFormats,
additionalParameters: additionalParameters,
acceptedDocumentFormats: acceptedDocumentFormats
);
  • Result: result.barcodeItems - A list of recognized barcodes as items of BarcodeItem type.

For a complete list of parameters and detailed descriptions, refer to the API documentation.

BarcodeAdditionalParameters

A class that contains additional parameters for barcodes detection and filtering.

Want to scan longer than one minute?

Generate a free trial license to test the Scanbot SDK thoroughly.

Get your free Trial License

What do you think of this documentation?