java.lang.Object | |
↳ | com.google.android.gms.vision.Frame |
Image data with associated metadata
.
A frame is constructed via the builder
class, specifying the image data,
dimensions, and sequencing information (frame ID, timestamp).
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Frame.Builder | Builder for creating a frame instance. | ||||||||||
Frame.Metadata | Frame metadata, describing the image dimensions, rotation, and sequencing information. |
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | ROTATION_0 | ||||||||||
int | ROTATION_180 | ||||||||||
int | ROTATION_270 | ||||||||||
int | ROTATION_90 |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
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 getGrayscaleImageData()
should
be called instead.
Returns | |
---|---|
Bitmap |
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 getBitmap()
if the associated native detection code supports it, since
this would move the grayscale conversion into native code where it will be faster.
Returns | |
---|---|
ByteBuffer |
Returns the metadata associated with the frame.
Returns | |
---|---|
Frame.Metadata |