Package com.digimarc.dms.readers.image


package com.digimarc.dms.readers.image

This package contains classes for detecting Digimarc Barcode, traditional 1D barcodes, and QR codes. Detection can be performed asynchronously by using the VideoCaptureReader class. It is tailored to read frames from a streaming environment, such as a camera preview, providing performance management to maintain the device's frame rate.

Synchronous detection can be performed by using the ImageReader class.

Note that image readers manage device performance by skipping frames. Use caution when disabling performance management, as unmanaged readers are not throttled, so they read everything that they are given, which makes it possible to overload the processor. This may cause problems, for example, if an unmanaged reader is used in combination with an AudioCaptureReader. Processor overload may cause audio packet loss within the AudioCaptureReader, causing reads to be delayed or missed entirely.


Delegating images to a reader

VideoCaptureReader contains sample code for setting up a CameraHelper, which provides easy integration with the camera API. Alternatively, applications can use their own image source. The VideoCaptureReader supports image data in ImageFormat.NV21 and ImageFormat.YUV_420_888. Image data must be wrapped in an ImageData object. The ImageData class provides a convenience method, ImageData.attachToImage(android.media.Image), for wrapping an image returned from the Camera2 API. Detection of bitmap images is supported exclusively by the ImageReader class with the ImageReader.processBitmap(android.graphics.Bitmap) function. Bitmaps must be in Bitmap.Config.ARGB_8888 format.