Package io.scanbot.barcode
Class JniBarcodeScanner
-
- All Implemented Interfaces:
public final class JniBarcodeScanner extends SelfDisposable
Performs scanning of barcodes in image.
-
-
Field Summary
Fields Modifier and Type Field Description private BarcodeScannerConfiguration
configuration
-
Constructor Summary
Constructors Constructor Description JniBarcodeScanner(BarcodeScannerConfiguration parameters)
-
Method Summary
Modifier and Type Method Description final BarcodeScannerConfiguration
getConfiguration()
final Unit
setConfiguration(BarcodeScannerConfiguration configuration)
final BarcodeScannerResult
scan(ByteArray nv21, Integer width, Integer height, Integer orientation)
Scan barcodes on the nv21 frame. final BarcodeScannerResult
scanInArea(ByteArray nv21, Rect areaRect, Integer width, Integer height, Integer orientation)
Scan barcodes on the nv21 frame. final BarcodeScannerResult
scanFromRgba(ByteArray img, Integer width, Integer height, Integer orientation)
Scan barcodes on the RGBA image. final BarcodeScannerResult
scanFromJpeg(ByteArray jpeg, Integer orientation)
Scan barcodes from the jpeg image. final BarcodeScannerResult
scanFromBitmap(Bitmap bitmap, Integer orientation)
Scan barcodes from the bitmap image.
-
-
-
Constructor Detail
-
JniBarcodeScanner
JniBarcodeScanner(BarcodeScannerConfiguration parameters)
-
-
Method Detail
-
getConfiguration
final BarcodeScannerConfiguration getConfiguration()
-
setConfiguration
final Unit setConfiguration(BarcodeScannerConfiguration configuration)
-
scan
@Synchronized() final BarcodeScannerResult scan(ByteArray nv21, Integer width, Integer height, Integer orientation)
Scan 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.
-
scanInArea
@Synchronized() final BarcodeScannerResult scanInArea(ByteArray nv21, Rect areaRect, Integer width, Integer height, Integer orientation)
Scan 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.
-
scanFromRgba
@Synchronized() final BarcodeScannerResult scanFromRgba(ByteArray img, Integer width, Integer height, Integer orientation)
Scan 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.
-
scanFromJpeg
@Synchronized() final BarcodeScannerResult scanFromJpeg(ByteArray jpeg, Integer orientation)
Scan barcodes from 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.
-
scanFromBitmap
@Synchronized() final BarcodeScannerResult scanFromBitmap(Bitmap bitmap, Integer orientation)
Scan barcodes from the bitmap 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:
bitmap
- The Bitmap to find barcodes.orientation
- The frame orientation degrees.
-
-