Class ImageContext (2.1.4)

public final class ImageContext extends GeneratedMessageV3 implements ImageContextOrBuilder

Image context and/or feature-specific parameters.

Protobuf type google.cloud.vision.v1p3beta1.ImageContext

Static Fields

CROP_HINTS_PARAMS_FIELD_NUMBER

public static final int CROP_HINTS_PARAMS_FIELD_NUMBER
Field Value
TypeDescription
int

LANGUAGE_HINTS_FIELD_NUMBER

public static final int LANGUAGE_HINTS_FIELD_NUMBER
Field Value
TypeDescription
int

LAT_LONG_RECT_FIELD_NUMBER

public static final int LAT_LONG_RECT_FIELD_NUMBER
Field Value
TypeDescription
int

PRODUCT_SEARCH_PARAMS_FIELD_NUMBER

public static final int PRODUCT_SEARCH_PARAMS_FIELD_NUMBER
Field Value
TypeDescription
int

TEXT_DETECTION_PARAMS_FIELD_NUMBER

public static final int TEXT_DETECTION_PARAMS_FIELD_NUMBER
Field Value
TypeDescription
int

WEB_DETECTION_PARAMS_FIELD_NUMBER

public static final int WEB_DETECTION_PARAMS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ImageContext getDefaultInstance()
Returns
TypeDescription
ImageContext

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static ImageContext.Builder newBuilder()
Returns
TypeDescription
ImageContext.Builder

newBuilder(ImageContext prototype)

public static ImageContext.Builder newBuilder(ImageContext prototype)
Parameter
NameDescription
prototypeImageContext
Returns
TypeDescription
ImageContext.Builder

parseDelimitedFrom(InputStream input)

public static ImageContext parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ImageContext
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ImageContext parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ImageContext
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ImageContext parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ImageContext
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ImageContext parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ImageContext
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ImageContext parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ImageContext
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ImageContext parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ImageContext
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ImageContext parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ImageContext
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ImageContext parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ImageContext
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ImageContext parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ImageContext
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ImageContext parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ImageContext
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ImageContext parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ImageContext
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ImageContext parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ImageContext
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ImageContext> parser()
Returns
TypeDescription
Parser<ImageContext>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getCropHintsParams()

public CropHintsParams getCropHintsParams()

Parameters for crop hints annotation request.

.google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4;

Returns
TypeDescription
CropHintsParams

The cropHintsParams.

getCropHintsParamsOrBuilder()

public CropHintsParamsOrBuilder getCropHintsParamsOrBuilder()

Parameters for crop hints annotation request.

.google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4;

Returns
TypeDescription
CropHintsParamsOrBuilder

getDefaultInstanceForType()

public ImageContext getDefaultInstanceForType()
Returns
TypeDescription
ImageContext

getLanguageHints(int index)

public String getLanguageHints(int index)

List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting language_hints is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the supported languages.

repeated string language_hints = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The languageHints at the given index.

getLanguageHintsBytes(int index)

public ByteString getLanguageHintsBytes(int index)

List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting language_hints is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the supported languages.

repeated string language_hints = 2;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the languageHints at the given index.

getLanguageHintsCount()

public int getLanguageHintsCount()

List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting language_hints is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the supported languages.

repeated string language_hints = 2;

Returns
TypeDescription
int

The count of languageHints.

getLanguageHintsList()

public ProtocolStringList getLanguageHintsList()

List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting language_hints is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the supported languages.

repeated string language_hints = 2;

Returns
TypeDescription
ProtocolStringList

A list containing the languageHints.

getLatLongRect()

public LatLongRect getLatLongRect()

Not used.

.google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1;

Returns
TypeDescription
LatLongRect

The latLongRect.

getLatLongRectOrBuilder()

public LatLongRectOrBuilder getLatLongRectOrBuilder()

Not used.

.google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1;

Returns
TypeDescription
LatLongRectOrBuilder

getParserForType()

public Parser<ImageContext> getParserForType()
Returns
TypeDescription
Parser<ImageContext>
Overrides

getProductSearchParams()

public ProductSearchParams getProductSearchParams()

Parameters for product search.

.google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5;

Returns
TypeDescription
ProductSearchParams

The productSearchParams.

getProductSearchParamsOrBuilder()

public ProductSearchParamsOrBuilder getProductSearchParamsOrBuilder()

Parameters for product search.

.google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5;

Returns
TypeDescription
ProductSearchParamsOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTextDetectionParams()

public TextDetectionParams getTextDetectionParams()

Parameters for text detection and document text detection.

.google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12;

Returns
TypeDescription
TextDetectionParams

The textDetectionParams.

getTextDetectionParamsOrBuilder()

public TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder()

Parameters for text detection and document text detection.

.google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12;

Returns
TypeDescription
TextDetectionParamsOrBuilder

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getWebDetectionParams()

public WebDetectionParams getWebDetectionParams()

Parameters for web detection.

.google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6;

Returns
TypeDescription
WebDetectionParams

The webDetectionParams.

getWebDetectionParamsOrBuilder()

public WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder()

Parameters for web detection.

.google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6;

Returns
TypeDescription
WebDetectionParamsOrBuilder

hasCropHintsParams()

public boolean hasCropHintsParams()

Parameters for crop hints annotation request.

.google.cloud.vision.v1p3beta1.CropHintsParams crop_hints_params = 4;

Returns
TypeDescription
boolean

Whether the cropHintsParams field is set.

hasLatLongRect()

public boolean hasLatLongRect()

Not used.

.google.cloud.vision.v1p3beta1.LatLongRect lat_long_rect = 1;

Returns
TypeDescription
boolean

Whether the latLongRect field is set.

hasProductSearchParams()

public boolean hasProductSearchParams()

Parameters for product search.

.google.cloud.vision.v1p3beta1.ProductSearchParams product_search_params = 5;

Returns
TypeDescription
boolean

Whether the productSearchParams field is set.

hasTextDetectionParams()

public boolean hasTextDetectionParams()

Parameters for text detection and document text detection.

.google.cloud.vision.v1p3beta1.TextDetectionParams text_detection_params = 12;

Returns
TypeDescription
boolean

Whether the textDetectionParams field is set.

hasWebDetectionParams()

public boolean hasWebDetectionParams()

Parameters for web detection.

.google.cloud.vision.v1p3beta1.WebDetectionParams web_detection_params = 6;

Returns
TypeDescription
boolean

Whether the webDetectionParams field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ImageContext.Builder newBuilderForType()
Returns
TypeDescription
ImageContext.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ImageContext.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ImageContext.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ImageContext.Builder toBuilder()
Returns
TypeDescription
ImageContext.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException