public ScanbotBarcodeDetector
Detects bar codes and QR codes.
void enableBarcodeScan(boolean barcodeScanEnabled)
barcodeScanEnabled - if true barcode scanning will be enabled, false - will be disabledvoid setConfig(@NotNull
BarcodeScannerConfig config)
Apply configuration to tweak scanning logic.
NOTE: this only influences current instance of interface ScanbotBarcodeDetector!
See default values in class BarcodeScannerConfig's documentation.
Java users may benefit from using pre-made builders: class BarcodeScannerConfigBuilder, class BarcodeScannerAdditionalConfigBuilder
void modifyConfig(@NotNull
kotlin.jvm.functions.Function1<? super io.scanbot.sdk.barcode.entity.BarcodeScannerConfigBuilder,kotlin.Unit> mutatingFunc)
Modify existing config.
mutatingFunc - will receive the existing config instance - just copy it changing the desired parameter.
Java users can benefit from pre-made builders: class BarcodeScannerConfigBuilder, class BarcodeScannerAdditionalConfigBuilder
@Nullable BarcodeScanningResult detectFromNv21(@NotNull kotlin.Array[] nv21, int width, int height, int 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
nv21 - The YUV preview frame.width - The width of the preview frame.height - The height of the preview frame.frameOrientation - The frame orientation degrees.@Nullable BarcodeScanningResult detectFromNv21(@NotNull kotlin.Array[] nv21, int width, int height, int frameOrientation, @Nullable android.graphics.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
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@Nullable BarcodeScanningResult detectFromJpeg(@NotNull kotlin.Array[] jpeg, int width, int height, int 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
jpeg - The jpeg to find barcodes.width - The width of the preview frame.height - The height of the preview frame.frameOrientation - The frame orientation degrees.@Nullable BarcodeScanningResult detectFromRgba(@NotNull kotlin.Array[] img, int width, int height, int 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
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.@Nullable BarcodeScanningResult detectFromBitmap(@NotNull android.graphics.Bitmap bitmap, int 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
bitmap - The Bitmap to find barcodes.frameOrientation - The frame orientation degrees.