Class TextDetectionParams (3.43.0)

publicfinalclass TextDetectionParamsextendsGeneratedMessageV3implementsTextDetectionParamsOrBuilder

Parameters for text detections. This is used to control TEXT_DETECTION and DOCUMENT_TEXT_DETECTION features.

Protobuf type google.cloud.vision.v1.TextDetectionParams

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

ADVANCED_OCR_OPTIONS_FIELD_NUMBER

publicstaticfinalintADVANCED_OCR_OPTIONS_FIELD_NUMBER
Field Value
Type Description
int

ENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER

publicstaticfinalintENABLE_TEXT_DETECTION_CONFIDENCE_SCORE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticTextDetectionParamsgetDefaultInstance()
Returns
Type Description
TextDetectionParams

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticTextDetectionParams.BuildernewBuilder()
Returns
Type Description
TextDetectionParams.Builder

newBuilder(TextDetectionParams prototype)

publicstaticTextDetectionParams.BuildernewBuilder(TextDetectionParamsprototype)
Parameter
Name Description
prototype TextDetectionParams
Returns
Type Description
TextDetectionParams.Builder

parseDelimitedFrom(InputStream input)

publicstaticTextDetectionParamsparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
TextDetectionParams
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticTextDetectionParamsparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextDetectionParams
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticTextDetectionParamsparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
TextDetectionParams
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticTextDetectionParamsparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextDetectionParams
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticTextDetectionParamsparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
TextDetectionParams
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticTextDetectionParamsparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextDetectionParams
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticTextDetectionParamsparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
TextDetectionParams
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticTextDetectionParamsparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextDetectionParams
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticTextDetectionParamsparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
TextDetectionParams
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticTextDetectionParamsparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextDetectionParams
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticTextDetectionParamsparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
TextDetectionParams
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticTextDetectionParamsparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextDetectionParams
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<TextDetectionParams>parser()
Returns
Type Description
Parser<TextDetectionParams>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAdvancedOcrOptions(int index)

publicStringgetAdvancedOcrOptions(intindex)

A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are:

  • legacy_layout: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.

repeated string advanced_ocr_options = 11;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The advancedOcrOptions at the given index.

getAdvancedOcrOptionsBytes(int index)

publicByteStringgetAdvancedOcrOptionsBytes(intindex)

A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are:

  • legacy_layout: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.

repeated string advanced_ocr_options = 11;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the advancedOcrOptions at the given index.

getAdvancedOcrOptionsCount()

publicintgetAdvancedOcrOptionsCount()

A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are:

  • legacy_layout: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.

repeated string advanced_ocr_options = 11;

Returns
Type Description
int

The count of advancedOcrOptions.

getAdvancedOcrOptionsList()

publicProtocolStringListgetAdvancedOcrOptionsList()

A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are:

  • legacy_layout: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.

repeated string advanced_ocr_options = 11;

Returns
Type Description
ProtocolStringList

A list containing the advancedOcrOptions.

getDefaultInstanceForType()

publicTextDetectionParamsgetDefaultInstanceForType()
Returns
Type Description
TextDetectionParams

getEnableTextDetectionConfidenceScore()

publicbooleangetEnableTextDetectionConfidenceScore()

By default, Cloud Vision API only includes confidence score for DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence score for TEXT_DETECTION as well.

bool enable_text_detection_confidence_score = 9;

Returns
Type Description
boolean

The enableTextDetectionConfidenceScore.

getParserForType()

publicParser<TextDetectionParams>getParserForType()
Returns
Type Description
Parser<TextDetectionParams>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicTextDetectionParams.BuildernewBuilderForType()
Returns
Type Description
TextDetectionParams.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedTextDetectionParams.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
TextDetectionParams.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicTextDetectionParams.BuildertoBuilder()
Returns
Type Description
TextDetectionParams.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

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 2025年11月19日 UTC.