Converts MlImage to TensorImage and vice versa.
| static ColorSpaceType |
createColorSpaceTypeFrom(int imageFormat)
Creatas a
ColorSpaceType from MlImage.ImageFormat. |
| static TensorImage |
Creatas a ColorSpaceType from MlImage.ImageFormat.
| imageFormat |
|---|
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.
| mlImage |
|---|
| IllegalArgumentException | if the mlImage is built from an unsupported container.
|
|---|