Image data with associated
A frame is constructed via the
class, specifying the image data, dimensions, and sequencing information (frame ID,
Nested Class Summary
|class||Frame.Builder||Builder for creating a frame instance.|
|class||Frame.Metadata||Frame metadata, describing the image dimensions, rotation, and sequencing information.|
Public Method Summary
Returns the bitmap which was specified in creating this frame, or null if no bitmap was used to create this frame.
Returns the grayscale version of the frame data, with one byte per pixel.
Returns the metadata associated with the frame.
Inherited Method Summary
public static final int ROTATION_0
public static final int ROTATION_180
public static final int ROTATION_270
public static final int ROTATION_90
public Bitmap getBitmap ()
Returns the bitmap which was specified in creating this frame, or null if no bitmap
was used to create this frame. If the bitmap is not available, then
should be called instead.
public ByteBuffer getGrayscaleImageData ()
Returns the grayscale version of the frame data, with one byte per pixel. Note that the returned byte buffer will be prefixed by the Y channel (i.e., the grayscale image data), but may optionally include additional image data beyond the Y channel (this can be ignored).
If a bitmap was specified when creating this frame, the bitmap is first converted to
a grayscale byte (allocation / copy required). It is recommended that you use the
bitmap directly through
if the associated native detection code supports it, since this would move the
grayscale conversion into native code where it will be faster.