FirebaseVisionImageMetadata.Builder
Stay organized with collections
Save and categorize content based on your preferences.
Public Constructor Summary
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Public Methods
Sets height of the image, which must be a positive integer.
Sets rotation of the image, indicating the rotation from the upright
orientation.
Since the camera may deliver images that are rotated (e.g., if the user holds the
device upside down), specifying the rotation with the image indicates how to make the
image upright.
Currently, only
ROTATION_0
,
ROTATION_90
,
ROTATION_180
and
ROTATION_270
are supported.
Sets width of the image, which must be a positive integer.
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 2020-08-08 UTC.
[null,null,["Last updated 2020-08-08 UTC."],[],[],null,["# FirebaseVisionImageMetadata.Builder\n\npublic static class **FirebaseVisionImageMetadata.Builder** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nBuilder class of [FirebaseVisionImageMetadata](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata). \n\n### Public Constructor Summary\n\n|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [FirebaseVisionImageMetadata.Builder](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata.Builder#FirebaseVisionImageMetadata.Builder())() Creates a new builder to build [FirebaseVisionImageMetadata](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata). |\n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [FirebaseVisionImageMetadata](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata) | [build](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata.Builder#build())() Builds an instance of [FirebaseVisionImageMetadata](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata). |\n| [FirebaseVisionImageMetadata.Builder](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata.Builder) | [setFormat](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata.Builder#setFormat(int))(int format) Sets the format of the image stored in [ByteBuffer](//developer.android.com/reference/java/nio/ByteBuffer.html). |\n| [FirebaseVisionImageMetadata.Builder](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata.Builder) | [setHeight](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata.Builder#setHeight(int))(int height) Sets height of the image, which must be a positive integer. |\n| [FirebaseVisionImageMetadata.Builder](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata.Builder) | [setRotation](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata.Builder#setRotation(int))(int rotation) Sets rotation of the image, indicating the rotation from the upright orientation. |\n| [FirebaseVisionImageMetadata.Builder](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata.Builder) | [setWidth](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata.Builder#setWidth(int))(int width) Sets width of the image, which must be a positive integer. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Constructors\n-------------------\n\n#### public **FirebaseVisionImageMetadata.Builder** ()\n\nCreates a new builder to build [FirebaseVisionImageMetadata](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata).\n\nPublic Methods\n--------------\n\n#### public [FirebaseVisionImageMetadata](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata) **build**\n()\n\nBuilds an instance of [FirebaseVisionImageMetadata](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata). \n\n#### public [FirebaseVisionImageMetadata.Builder](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata.Builder) **setFormat** (int format)\n\nSets the format of the image stored in [ByteBuffer](//developer.android.com/reference/java/nio/ByteBuffer.html). It\nmust be one of [FirebaseVisionImageMetadata.ImageFormat](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata.ImageFormat). \n\n#### public [FirebaseVisionImageMetadata.Builder](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata.Builder) **setHeight** (int height)\n\nSets height of the image, which must be a positive integer. \n\n#### public [FirebaseVisionImageMetadata.Builder](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata.Builder) **setRotation** (int rotation)\n\nSets rotation of the image, indicating the rotation from the upright\norientation.\n\nSince the camera may deliver images that are rotated (e.g., if the user holds the\ndevice upside down), specifying the rotation with the image indicates how to make the\nimage upright.\n\nCurrently, only [ROTATION_0](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata#ROTATION_0), [ROTATION_90](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata#ROTATION_90), [ROTATION_180](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata#ROTATION_180) and [ROTATION_270](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata#ROTATION_270) are supported. \n\n#### public [FirebaseVisionImageMetadata.Builder](/docs/reference/android/com/google/firebase/ml/vision/common/FirebaseVisionImageMetadata.Builder) **setWidth** (int width)\n\nSets width of the image, which must be a positive integer."]]