Package io.scanbot.barcodescanner
Class BarcodeScanner
-
- All Implemented Interfaces:
public final class BarcodeScanner extends SelfDisposable
Performs detection and decoding of barcodes in image.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumBarcodeScanner.CoreEngineModeBarcode engine modes supported by Scanbot SDK.
-
Constructor Summary
Constructors Constructor Description BarcodeScanner(BarcodeScannerConfig scannerConfig)
-
Method Summary
Modifier and Type Method Description final UnitsetConfig(BarcodeScannerConfig config)Set configuration that determines component behavior. final BarcodeScannerResultdetectAndDecode(ByteArray nv21, Integer width, Integer height, Integer orientation, Boolean isLive)Detect barcodes on the nv21 frame. final BarcodeScannerResultdetectAndDecodeInArea(ByteArray nv21, Rect areaRect, Integer width, Integer height, Integer orientation, Boolean isLive)Detect barcodes on the nv21 frame. final BarcodeScannerResultdetectAndDecodeRgba(ByteArray img, Integer width, Integer height, Integer orientation)Detect barcodes on the RGBA image. final BarcodeScannerResultdetectAndDecodeJPEG(ByteArray jpeg, Integer orientation)Detect barcodes on the jpeg image. final BarcodeScannerResultdetectAndDecodeBitmap(Bitmap bitmap, Integer orientation)Detect barcodes on the bitmap. -
-
Constructor Detail
-
BarcodeScanner
BarcodeScanner(BarcodeScannerConfig scannerConfig)
-
-
Method Detail
-
setConfig
@Synchronized() final Unit setConfig(BarcodeScannerConfig config)
Set configuration that determines component behavior.
-
detectAndDecode
@Synchronized() final BarcodeScannerResult detectAndDecode(ByteArray nv21, Integer width, Integer height, Integer orientation, Boolean isLive)
Detect barcodes on the nv21 frame.
- Parameters:
nv21- The YUV preview frame.width- The width of the preview frame.height- The height of the preview frame.orientation- The frame orientation degrees.isLive- iftrue- live engine mode will be used.
-
detectAndDecodeInArea
@Synchronized() final BarcodeScannerResult detectAndDecodeInArea(ByteArray nv21, Rect areaRect, Integer width, Integer height, Integer orientation, Boolean isLive)
Detect barcodes on the nv21 frame.
- Parameters:
nv21- The YUV preview frame.width- The width of the preview frame.height- The height of the preview frame.orientation- The frame orientation degrees.
-
detectAndDecodeRgba
@Synchronized() final BarcodeScannerResult detectAndDecodeRgba(ByteArray img, Integer width, Integer height, Integer orientation)
Detect barcodes on the RGBA image.
For efficiency, reuse the same reader objects from one decode to the next. The barcode filters list is taken from the current state.
- Parameters:
img- The byteArray with image to find barcodes.width- The width of the preview frame.height- The height of the preview frame.orientation- The frame orientation degrees.
-
detectAndDecodeJPEG
@Synchronized() final BarcodeScannerResult detectAndDecodeJPEG(ByteArray jpeg, Integer orientation)
Detect barcodes on the jpeg image.
For efficiency, reuse the same reader objects from one decode to the next. The barcode filters list is taken from the current state.
- Parameters:
jpeg- The jpeg to find barcodes.orientation- The frame orientation degrees.
-
detectAndDecodeBitmap
@Synchronized() final BarcodeScannerResult detectAndDecodeBitmap(Bitmap bitmap, Integer orientation)
Detect barcodes on the bitmap.
For efficiency, reuse the same reader objects from one decode to the next. The barcode filters list is taken from the current state.
- Parameters:
bitmap- The Bitmap to find barcodes.orientation- The frame orientation degrees.
-
-
-
-