Converts MlImage
to TensorImage
and vice versa.
Public Methods
| static ColorSpaceType | |
| static TensorImage |
Inherited Methods
Public Methods
public static ColorSpaceType createColorSpaceTypeFrom (int imageFormat)
Creatas a ColorSpaceType
from MlImage.ImageFormat
.
Parameters
public static TensorImage createTensorImageFrom ( MlImage mlImage)
Creates a TensorImage
from an MlImage
.
IMPORTANT: The returned TensorImage
shares storage with mlImage
, so do not
modify the contained object in the TensorImage
, as MlImage
expects its
contained data are immutable. Also, callers should use MlImage#getInternal()#acquire()
and MlImage#release()
to avoid the mlImage
being released unexpectedly.
Parameters
Throws
mlImage
is built from an unsupported container.
