- 3.50.0 (latest)
- 3.49.0
- 3.47.0
- 3.46.0
- 3.45.0
- 3.44.0
- 3.43.0
- 3.42.0
- 3.41.0
- 3.40.0
- 3.39.0
- 3.38.0
- 3.37.0
- 3.35.0
- 3.34.0
- 3.33.0
- 3.32.0
- 3.31.0
- 3.30.0
- 3.29.0
- 3.28.0
- 3.27.0
- 3.26.0
- 3.25.0
- 3.22.0
- 3.21.0
- 3.20.0
- 3.19.0
- 3.18.0
- 3.17.0
- 3.16.0
- 3.15.0
- 3.14.0
- 3.13.0
- 3.12.0
- 3.11.0
- 3.10.0
- 3.9.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.3
- 2.1.4
- 2.0.29
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.v1p2beta1.ImageContext
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > ImageContext.BuilderImplements
ImageContextOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
values | Iterable<String> The languageHints to add. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value | String The languageHints to add. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
value | ByteString The bytes of the languageHints to add. |
Returns | |
---|---|
Type | Description |
ImageContext.Builder | This builder for chaining. |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ImageContext.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
build()
public ImageContext build()
Returns | |
---|---|
Type | Description |
ImageContext |
buildPartial()
public ImageContext buildPartial()
Returns | |
---|---|
Type | Description |
ImageContext |
clear()
public ImageContext.Builder clear()
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
clearCropHintsParams()
public ImageContext.Builder clearCropHintsParams()
Parameters for crop hints annotation request.
.google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4;
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
clearField(Descriptors.FieldDescriptor field)
public ImageContext.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field | FieldDescriptor |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
clearLanguageHints()
public ImageContext.Builder clearLanguageHints()
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 | |
---|---|
Type | Description |
ImageContext.Builder | This builder for chaining. |
clearLatLongRect()
public ImageContext.Builder clearLatLongRect()
Not used.
.google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1;
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public ImageContext.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof | OneofDescriptor |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
clearTextDetectionParams()
public ImageContext.Builder clearTextDetectionParams()
Parameters for text detection and document text detection.
.google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12;
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
clearWebDetectionParams()
public ImageContext.Builder clearWebDetectionParams()
Parameters for web detection.
.google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6;
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
clone()
public ImageContext.Builder clone()
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
getCropHintsParams()
public CropHintsParams getCropHintsParams()
Parameters for crop hints annotation request.
.google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4;
Returns | |
---|---|
Type | Description |
CropHintsParams | The cropHintsParams. |
getCropHintsParamsBuilder()
public CropHintsParams.Builder getCropHintsParamsBuilder()
Parameters for crop hints annotation request.
.google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4;
Returns | |
---|---|
Type | Description |
CropHintsParams.Builder |
getCropHintsParamsOrBuilder()
public CropHintsParamsOrBuilder getCropHintsParamsOrBuilder()
Parameters for crop hints annotation request.
.google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4;
Returns | |
---|---|
Type | Description |
CropHintsParamsOrBuilder |
getDefaultInstanceForType()
public ImageContext getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
ImageContext |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
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 | |
---|---|
Name | Description |
index | int The index of the element to return. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
index | int The index of the value to return. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
ProtocolStringList | A list containing the languageHints. |
getLatLongRect()
public LatLongRect getLatLongRect()
Not used.
.google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1;
Returns | |
---|---|
Type | Description |
LatLongRect | The latLongRect. |
getLatLongRectBuilder()
public LatLongRect.Builder getLatLongRectBuilder()
Not used.
.google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1;
Returns | |
---|---|
Type | Description |
LatLongRect.Builder |
getLatLongRectOrBuilder()
public LatLongRectOrBuilder getLatLongRectOrBuilder()
Not used.
.google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1;
Returns | |
---|---|
Type | Description |
LatLongRectOrBuilder |
getTextDetectionParams()
public TextDetectionParams getTextDetectionParams()
Parameters for text detection and document text detection.
.google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12;
Returns | |
---|---|
Type | Description |
TextDetectionParams | The textDetectionParams. |
getTextDetectionParamsBuilder()
public TextDetectionParams.Builder getTextDetectionParamsBuilder()
Parameters for text detection and document text detection.
.google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12;
Returns | |
---|---|
Type | Description |
TextDetectionParams.Builder |
getTextDetectionParamsOrBuilder()
public TextDetectionParamsOrBuilder getTextDetectionParamsOrBuilder()
Parameters for text detection and document text detection.
.google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12;
Returns | |
---|---|
Type | Description |
TextDetectionParamsOrBuilder |
getWebDetectionParams()
public WebDetectionParams getWebDetectionParams()
Parameters for web detection.
.google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6;
Returns | |
---|---|
Type | Description |
WebDetectionParams | The webDetectionParams. |
getWebDetectionParamsBuilder()
public WebDetectionParams.Builder getWebDetectionParamsBuilder()
Parameters for web detection.
.google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6;
Returns | |
---|---|
Type | Description |
WebDetectionParams.Builder |
getWebDetectionParamsOrBuilder()
public WebDetectionParamsOrBuilder getWebDetectionParamsOrBuilder()
Parameters for web detection.
.google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6;
Returns | |
---|---|
Type | Description |
WebDetectionParamsOrBuilder |
hasCropHintsParams()
public boolean hasCropHintsParams()
Parameters for crop hints annotation request.
.google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4;
Returns | |
---|---|
Type | Description |
boolean | Whether the cropHintsParams field is set. |
hasLatLongRect()
public boolean hasLatLongRect()
Not used.
.google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1;
Returns | |
---|---|
Type | Description |
boolean | Whether the latLongRect field is set. |
hasTextDetectionParams()
public boolean hasTextDetectionParams()
Parameters for text detection and document text detection.
.google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12;
Returns | |
---|---|
Type | Description |
boolean | Whether the textDetectionParams field is set. |
hasWebDetectionParams()
public boolean hasWebDetectionParams()
Parameters for web detection.
.google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6;
Returns | |
---|---|
Type | Description |
boolean | Whether the webDetectionParams field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeCropHintsParams(CropHintsParams value)
public ImageContext.Builder mergeCropHintsParams(CropHintsParams value)
Parameters for crop hints annotation request.
.google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4;
Parameter | |
---|---|
Name | Description |
value | CropHintsParams |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
mergeFrom(ImageContext other)
public ImageContext.Builder mergeFrom(ImageContext other)
Parameter | |
---|---|
Name | Description |
other | ImageContext |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ImageContext.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public ImageContext.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other | Message |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
mergeLatLongRect(LatLongRect value)
public ImageContext.Builder mergeLatLongRect(LatLongRect value)
Not used.
.google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1;
Parameter | |
---|---|
Name | Description |
value | LatLongRect |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
mergeTextDetectionParams(TextDetectionParams value)
public ImageContext.Builder mergeTextDetectionParams(TextDetectionParams value)
Parameters for text detection and document text detection.
.google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12;
Parameter | |
---|---|
Name | Description |
value | TextDetectionParams |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ImageContext.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
mergeWebDetectionParams(WebDetectionParams value)
public ImageContext.Builder mergeWebDetectionParams(WebDetectionParams value)
Parameters for web detection.
.google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6;
Parameter | |
---|---|
Name | Description |
value | WebDetectionParams |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
setCropHintsParams(CropHintsParams value)
public ImageContext.Builder setCropHintsParams(CropHintsParams value)
Parameters for crop hints annotation request.
.google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4;
Parameter | |
---|---|
Name | Description |
value | CropHintsParams |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
setCropHintsParams(CropHintsParams.Builder builderForValue)
public ImageContext.Builder setCropHintsParams(CropHintsParams.Builder builderForValue)
Parameters for crop hints annotation request.
.google.cloud.vision.v1p2beta1.CropHintsParams crop_hints_params = 4;
Parameter | |
---|---|
Name | Description |
builderForValue | CropHintsParams.Builder |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public ImageContext.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
setLanguageHints(int index, String value)
public ImageContext.Builder setLanguageHints(int index, 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;
Parameters | |
---|---|
Name | Description |
index | int The index to set the value at. |
value | String The languageHints to set. |
Returns | |
---|---|
Type | Description |
ImageContext.Builder | This builder for chaining. |
setLatLongRect(LatLongRect value)
public ImageContext.Builder setLatLongRect(LatLongRect value)
Not used.
.google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1;
Parameter | |
---|---|
Name | Description |
value | LatLongRect |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
setLatLongRect(LatLongRect.Builder builderForValue)
public ImageContext.Builder setLatLongRect(LatLongRect.Builder builderForValue)
Not used.
.google.cloud.vision.v1p2beta1.LatLongRect lat_long_rect = 1;
Parameter | |
---|---|
Name | Description |
builderForValue | LatLongRect.Builder |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ImageContext.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
setTextDetectionParams(TextDetectionParams value)
public ImageContext.Builder setTextDetectionParams(TextDetectionParams value)
Parameters for text detection and document text detection.
.google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12;
Parameter | |
---|---|
Name | Description |
value | TextDetectionParams |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
setTextDetectionParams(TextDetectionParams.Builder builderForValue)
public ImageContext.Builder setTextDetectionParams(TextDetectionParams.Builder builderForValue)
Parameters for text detection and document text detection.
.google.cloud.vision.v1p2beta1.TextDetectionParams text_detection_params = 12;
Parameter | |
---|---|
Name | Description |
builderForValue | TextDetectionParams.Builder |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final ImageContext.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
setWebDetectionParams(WebDetectionParams value)
public ImageContext.Builder setWebDetectionParams(WebDetectionParams value)
Parameters for web detection.
.google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6;
Parameter | |
---|---|
Name | Description |
value | WebDetectionParams |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |
setWebDetectionParams(WebDetectionParams.Builder builderForValue)
public ImageContext.Builder setWebDetectionParams(WebDetectionParams.Builder builderForValue)
Parameters for web detection.
.google.cloud.vision.v1p2beta1.WebDetectionParams web_detection_params = 6;
Parameter | |
---|---|
Name | Description |
builderForValue | WebDetectionParams.Builder |
Returns | |
---|---|
Type | Description |
ImageContext.Builder |