This page is for Frame
Class. Frame
parameters store the frame data.
Method Name | Type |
---|---|
getData |
byte[] |
getWidth |
int |
getHeight |
int |
getStrides |
int[] |
getFormat |
int |
getFrameId |
int |
isFastFrame |
boolean |
getFastFrameId |
int |
getCropRect |
Rect |
getOrientation |
int |
getOriW |
int |
getOriH |
int |
Get the frame data in byte array.
Java:
Frame frame;
byte[] data = frame.getData();
Kotlin:
var frame: Frame? = null
var data: ByteArray? = frame!!.data
Get the frame width in pixels.
Java:
int width = frame.getWidth();
Kotlin:
var width: Int? = frame!!.width
Get the frame height in pixels.
Java:
int height = frame.getHeight();
Kotlin:
var height: Int? = frame!!.height
Get the frame strides.
Java:
int[] strides = frame.getStrides();
Kotlin:
var strides: IntArray? = frame!!.strides
Get the frame pixel format.
Java:
int format = frame.getFormat();
Kotlin:
var format: Int? = frame!!.format
Get the frame ID.
int frameid = frame.getFrameId();
Kotlin:
var frameid: Int? = frame!!.frameId
Check whether the fast mode is enabled.
Java:
boolean isfastframe = frame.isFastFrame();
Kotlin:
var isfastframe: Boolean? = frame!!.isFastFrame
Get the fast frame (cropped frame) ID.
Java:
int fastframeid = frame.getFastFrameId();
Kotlin:
var fastframeid: Int? = frame!!.fastFrameId
Get the cropped Rect data (Width & height)
Java:
Rect croprect = frame.getCropRect();
Kotlin:
var croprect: Rect? = frame!!.cropRect
Get the orientation (of cropped frame).
Orientation of the frame | Value |
---|---|
Vertical | 1 |
Horizontal | 2 |
Java:
int orientation = frame.getOrientation();
Kotlin:
var orientation: Int? = frame!!.getOrientation
Get the original width of the cropped frame.
Java:
int originalwidth = frame.getOriW();
Kotlin:
var originalwidth: Int? = frame!!.getOriW
Get the original width of the cropped frame.
Java:
int originalheight = frame.getOriH();
Kotlin:
var originalheight: Int? = frame!!.getOriH
version 1.0