Class ImageContext.Builder (2.1.4)

public static final class ImageContext.Builder extends GeneratedMessageV3.Builder<ImageContext.Builder> implements ImageContextOrBuilder

Image context and/or feature-specific parameters.

Protobuf type google.cloud.vision.v1p4beta1.ImageContext

Static Methods

getDescriptor()

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

Methods

addAllLanguageHints(Iterable<String> values)

public ImageContext.Builder addAllLanguageHints(Iterable<String> values)

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
valuesIterable<String>

The languageHints to add.

Returns
TypeDescription
ImageContext.Builder

This builder for chaining.

addLanguageHints(String value)

public ImageContext.Builder addLanguageHints(String value)

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
valueString

The languageHints to add.

Returns
TypeDescription
ImageContext.Builder

This builder for chaining.

addLanguageHintsBytes(ByteString value)

public ImageContext.Builder addLanguageHintsBytes(ByteString value)

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
valueByteString

The bytes of the languageHints to add.

Returns
TypeDescription
ImageContext.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ImageContext.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ImageContext.Builder
Overrides