com.google.android.odml.image
Stay organized with collections
Save and categorize content based on your preferences.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eMlImage\u003c/code\u003e is a class that wraps image data for on-device machine learning (ODML) purposes, providing a standardized way to represent images for ML tasks.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecom.google.android.odml.image\u003c/code\u003e package includes classes for building and extracting \u003ccode\u003eMlImage\u003c/code\u003e objects from various sources like \u003ccode\u003eBitmap\u003c/code\u003e, \u003ccode\u003eByteBuffer\u003c/code\u003e, and \u003ccode\u003eImage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eYou can describe the format and storage of an \u003ccode\u003eMlImage\u003c/code\u003e using annotations like \u003ccode\u003eMlImage.ImageFormat\u003c/code\u003e and \u003ccode\u003eMlImage.StorageType\u003c/code\u003e for better compatibility with ODML models.\u003c/p\u003e\n"],["\u003cp\u003eUtilities such as \u003ccode\u003eBitmapExtractor\u003c/code\u003e, \u003ccode\u003eByteBufferExtractor\u003c/code\u003e, and \u003ccode\u003eMediaImageExtractor\u003c/code\u003e allow you to access the underlying image data from an \u003ccode\u003eMlImage\u003c/code\u003e object in different formats.\u003c/p\u003e\n"],["\u003cp\u003eLeverage \u003ccode\u003eImageProperties\u003c/code\u003e to store and access metadata about an image, enhancing its usability in ODML workflows.\u003c/p\u003e\n"]]],["The document outlines image handling for on-device machine learning (ODML). Key components include: `MlImage`, which wraps image data; `ImageFormat` and `StorageType`, which define the image's format and container type respectively. Classes like `BitmapExtractor`, `ByteBufferExtractor`, and `MediaImageExtractor` extract data. `BitmapMlImageBuilder`, `ByteBufferMlImageBuilder`, and `MediaMlImageBuilder` build `MlImage` from respective data formats. `ImageProperties` describes image storage, and `MlImage.Internal` offers advanced access to `MlImage`.\n"],null,["# com.google.android.odml.image\n\n### Annotations\n\n|---------------------------------------------------------------------------------------------|-----------------------------------------|\n| [MlImage.ImageFormat](/android/reference/com/google/android/odml/image/MlImage.ImageFormat) | Specifies the image format of an image. |\n| [MlImage.StorageType](/android/reference/com/google/android/odml/image/MlImage.StorageType) | Specifies the image container type. |\n\n### Classes\n\n|-------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [BitmapExtractor](/android/reference/com/google/android/odml/image/BitmapExtractor) | Utility for extracting [Bitmap](//developer.android.com/reference/android/graphics/Bitmap.html) from [MlImage](/android/reference/com/google/android/odml/image/MlImage). |\n| [BitmapMlImageBuilder](/android/reference/com/google/android/odml/image/BitmapMlImageBuilder) | Builds [MlImage](/android/reference/com/google/android/odml/image/MlImage) from [Bitmap](//developer.android.com/reference/android/graphics/Bitmap.html). |\n| [ByteBufferExtractor](/android/reference/com/google/android/odml/image/ByteBufferExtractor) | Utility for extracting [ByteBuffer](//developer.android.com/reference/java/nio/ByteBuffer.html) from [MlImage](/android/reference/com/google/android/odml/image/MlImage). |\n| [ByteBufferMlImageBuilder](/android/reference/com/google/android/odml/image/ByteBufferMlImageBuilder) | Builds a [MlImage](/android/reference/com/google/android/odml/image/MlImage) from a [ByteBuffer](//developer.android.com/reference/java/nio/ByteBuffer.html). |\n| [ImageProperties](/android/reference/com/google/android/odml/image/ImageProperties) | Groups a set of properties to describe how an image is stored. |\n| [MediaImageExtractor](/android/reference/com/google/android/odml/image/MediaImageExtractor) | Utility for extracting [Image](//developer.android.com/reference/android/media/Image.html) from [MlImage](/android/reference/com/google/android/odml/image/MlImage). |\n| [MediaMlImageBuilder](/android/reference/com/google/android/odml/image/MediaMlImageBuilder) | Builds [MlImage](/android/reference/com/google/android/odml/image/MlImage) from [Image](//developer.android.com/reference/android/media/Image.html). |\n| [MlImage](/android/reference/com/google/android/odml/image/MlImage) | Wraps image data for on-device machine learning (ODML) usages. |\n| [MlImage.Internal](/android/reference/com/google/android/odml/image/MlImage.Internal) | Advanced API access for [MlImage](/android/reference/com/google/android/odml/image/MlImage). |"]]