public class BarcodeScanner
Performs detection and decoding of barcodes in image.
public BarcodeScanner(@NotNull
BarcodeScannerConfig scannerConfig)
Performs detection and decoding of barcodes in image.
@Synchronized
public void setConfig(@NotNull
BarcodeScannerConfig config)
Set configuration that determines component behavior
@Synchronized @Nullable public BarcodeScannerResult detectAndDecode(@NotNull kotlin.Array[] nv21, int width, int height, int orientation)
Detect barcodes on the nv21 frame.
nv21 - The YUV preview frame.width - The width of the preview frame.height - The height of the preview frame.@Synchronized @Nullable public BarcodeScannerResult detectAndDecodeInArea(@NotNull kotlin.Array[] nv21, @NotNull android.graphics.Rect areaRect, int width, int height, int orientation)
Detect barcodes on the nv21 frame.
nv21 - The YUV preview frame.width - The width of the preview frame.height - The height of the preview frame.orientation - The frame orientation degrees.@Synchronized @Nullable public BarcodeScannerResult detectAndDecodeRgba(@NotNull kotlin.Array[] img, int width, int height, int 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
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.@Synchronized @Nullable public BarcodeScannerResult detectAndDecodeJPEG(@NotNull kotlin.Array[] jpeg, int width, int height, int 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
jpeg - The jpeg to find barcodes.width - The width of the preview frame.height - The height of the preview frame.orientation - The frame orientation degrees.@Synchronized @Nullable public BarcodeScannerResult detectAndDecodeBitmap(@NotNull android.graphics.Bitmap bitmap, int 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
bitmap - The Bitmap to find barcodes.orientation - The frame orientation degrees.protected void finalize()