Interface ScanbotBarcodeDetector
-
- All Implemented Interfaces:
public interface ScanbotBarcodeDetectorDetects bar codes and QR codes.
-
-
Method Summary
Modifier and Type Method Description abstract UnitenableBarcodeScan(Boolean barcodeScanEnabled)abstract UnitsetConfig(BarcodeScannerConfig config)Apply configuration to tweak scanning logic. abstract UnitmodifyConfig(Function1<BarcodeScannerConfigBuilder, Unit> mutatingFunc)Modify existing config. abstract BarcodeScanningResultdetectFromNv21(ByteArray nv21, Integer width, Integer height, Integer frameOrientation)Detect barcodes on the nv21 frame. abstract BarcodeScanningResultdetectFromNv21(ByteArray nv21, Integer width, Integer height, Integer frameOrientation, Rect finderRect)Decode the nv21 within the viewfinder rectangle, and time how long it took. abstract BarcodeScanningResultdetectFromNv21(ByteArray nv21, Integer width, Integer height, Integer frameOrientation, Rect finderRect, Boolean isLive)Decode the nv21 within the viewfinder rectangle, and time how long it took. abstract BarcodeScanningResultdetectFromJpeg(ByteArray jpeg, Integer frameOrientation)Detect barcodes on the jpeg image. abstract BarcodeScanningResultdetectFromRgba(ByteArray img, Integer width, Integer height, Integer frameOrientation)Detect barcodes on the RGBA image. abstract BarcodeScanningResultdetectFromBitmap(Bitmap bitmap, Integer frameOrientation)Detect barcodes on the bitmap. -
-
Method Detail
-
enableBarcodeScan
abstract Unit enableBarcodeScan(Boolean barcodeScanEnabled)
- Parameters:
barcodeScanEnabled- iftruebarcode scanning will be enabled,false- will be disabled
-
setConfig
abstract Unit setConfig(BarcodeScannerConfig config)
Apply configuration to tweak scanning logic.
NOTE: this only influences current instance of ScanbotBarcodeDetector!
See default values in BarcodeScannerConfig's documentation.
Java users may benefit from using pre-made builders: BarcodeScannerConfigBuilder, BarcodeScannerAdditionalConfigBuilder
-
modifyConfig
abstract Unit modifyConfig(Function1<BarcodeScannerConfigBuilder, Unit> mutatingFunc)
Modify existing config.
- Parameters:
mutatingFunc- will receive the existing config instance - justcopyit changing the desired parameter.
-
detectFromNv21
abstract BarcodeScanningResult detectFromNv21(ByteArray nv21, Integer width, Integer height, Integer frameOrientation)
Detect barcodes on the nv21 frame.
For efficiency, reuse the same detector object from one decode to the next. The barcode filters list is taken from the current state
- Parameters:
nv21- The YUV preview frame.width- The width of the preview frame.height- The height of the preview frame.frameOrientation- The frame orientation degrees.
-
detectFromNv21
abstract BarcodeScanningResult detectFromNv21(ByteArray nv21, Integer width, Integer height, Integer frameOrientation, Rect finderRect)
Decode the nv21 within the viewfinder rectangle, and time how long it took.
For efficiency, reuse the same reader objects from one decode to the next. The barcode filters list is taken from the current state
- Parameters:
nv21- The YUV preview frame.width- The width of the preview frame.height- The height of the preview frame.frameOrientation- The frame orientation degrees.finderRect- decode area
-
detectFromNv21
abstract BarcodeScanningResult detectFromNv21(ByteArray nv21, Integer width, Integer height, Integer frameOrientation, Rect finderRect, Boolean isLive)
Decode the nv21 within the viewfinder rectangle, and time how long it took.
For efficiency, reuse the same reader objects from one decode to the next. The barcode filters list is taken from the current state
- Parameters:
nv21- The YUV preview frame.width- The width of the preview frame.height- The height of the preview frame.frameOrientation- The frame orientation degrees.finderRect- decode areaisLive- iftrue- will try to detect barcodes in the live mode (e.g.
-
detectFromJpeg
abstract BarcodeScanningResult detectFromJpeg(ByteArray jpeg, Integer frameOrientation)
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.frameOrientation- The frame orientation degrees.
-
detectFromRgba
abstract BarcodeScanningResult detectFromRgba(ByteArray img, Integer width, Integer height, Integer frameOrientation)
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.frameOrientation- The frame orientation degrees.
-
detectFromBitmap
abstract BarcodeScanningResult detectFromBitmap(Bitmap bitmap, Integer frameOrientation)
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.frameOrientation- The frame orientation degrees.
-
-
-
-