Class TextSegment.Builder (2.27.0)

public static final class TextSegment.Builder extends GeneratedMessageV3.Builder<TextSegment.Builder> implements TextSegmentOrBuilder

Video segment level annotation results for text detection.

Protobuf type google.cloud.videointelligence.v1p2beta1.TextSegment

Static Methods

getDescriptor()

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

Methods

addAllFrames(Iterable<? extends TextFrame> values)

public TextSegment.Builder addAllFrames(Iterable<? extends TextFrame> values)

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.videointelligence.v1p2beta1.TextFrame>
Returns
TypeDescription
TextSegment.Builder

addFrames(TextFrame value)

public TextSegment.Builder addFrames(TextFrame value)

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Parameter
NameDescription
valueTextFrame
Returns
TypeDescription
TextSegment.Builder

addFrames(TextFrame.Builder builderForValue)

public TextSegment.Builder addFrames(TextFrame.Builder builderForValue)

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Parameter
NameDescription
builderForValueTextFrame.Builder
Returns
TypeDescription
TextSegment.Builder

addFrames(int index, TextFrame value)

public TextSegment.Builder addFrames(int index, TextFrame value)

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Parameters
NameDescription
indexint
valueTextFrame
Returns
TypeDescription
TextSegment.Builder

addFrames(int index, TextFrame.Builder builderForValue)

public TextSegment.Builder addFrames(int index, TextFrame.Builder builderForValue)

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Parameters
NameDescription
indexint
builderForValueTextFrame.Builder
Returns
TypeDescription
TextSegment.Builder

addFramesBuilder()

public TextFrame.Builder addFramesBuilder()

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Returns
TypeDescription
TextFrame.Builder

addFramesBuilder(int index)

public TextFrame.Builder addFramesBuilder(int index)

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
TextFrame.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public TextSegment build()
Returns
TypeDescription
TextSegment

buildPartial()

public TextSegment buildPartial()
Returns
TypeDescription
TextSegment

clear()

public TextSegment.Builder clear()
Returns
TypeDescription
TextSegment.Builder
Overrides

clearConfidence()

public TextSegment.Builder clearConfidence()

Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.

float confidence = 2;

Returns
TypeDescription
TextSegment.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public TextSegment.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
TextSegment.Builder
Overrides

clearFrames()

public TextSegment.Builder clearFrames()

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Returns
TypeDescription
TextSegment.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public TextSegment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
TextSegment.Builder
Overrides

clearSegment()

public TextSegment.Builder clearSegment()

Video segment where a text snippet was detected.

.google.cloud.videointelligence.v1p2beta1.VideoSegment segment = 1;

Returns
TypeDescription
TextSegment.Builder

clone()

public TextSegment.Builder clone()
Returns
TypeDescription
TextSegment.Builder
Overrides

getConfidence()

public float getConfidence()

Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.

float confidence = 2;

Returns
TypeDescription
float

The confidence.

getDefaultInstanceForType()

public TextSegment getDefaultInstanceForType()
Returns
TypeDescription
TextSegment

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFrames(int index)

public TextFrame getFrames(int index)

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
TextFrame

getFramesBuilder(int index)

public TextFrame.Builder getFramesBuilder(int index)

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
TextFrame.Builder

getFramesBuilderList()

public List<TextFrame.Builder> getFramesBuilderList()

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Returns
TypeDescription
List<Builder>

getFramesCount()

public int getFramesCount()

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Returns
TypeDescription
int

getFramesList()

public List<TextFrame> getFramesList()

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Returns
TypeDescription
List<TextFrame>

getFramesOrBuilder(int index)

public TextFrameOrBuilder getFramesOrBuilder(int index)

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
TextFrameOrBuilder

getFramesOrBuilderList()

public List<? extends TextFrameOrBuilder> getFramesOrBuilderList()

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Returns
TypeDescription
List<? extends com.google.cloud.videointelligence.v1p2beta1.TextFrameOrBuilder>

getSegment()

public VideoSegment getSegment()

Video segment where a text snippet was detected.

.google.cloud.videointelligence.v1p2beta1.VideoSegment segment = 1;

Returns
TypeDescription
VideoSegment

The segment.

getSegmentBuilder()

public VideoSegment.Builder getSegmentBuilder()

Video segment where a text snippet was detected.

.google.cloud.videointelligence.v1p2beta1.VideoSegment segment = 1;

Returns
TypeDescription
VideoSegment.Builder

getSegmentOrBuilder()

public VideoSegmentOrBuilder getSegmentOrBuilder()

Video segment where a text snippet was detected.

.google.cloud.videointelligence.v1p2beta1.VideoSegment segment = 1;

Returns
TypeDescription
VideoSegmentOrBuilder

hasSegment()

public boolean hasSegment()

Video segment where a text snippet was detected.

.google.cloud.videointelligence.v1p2beta1.VideoSegment segment = 1;

Returns
TypeDescription
boolean

Whether the segment field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(TextSegment other)

public TextSegment.Builder mergeFrom(TextSegment other)
Parameter
NameDescription
otherTextSegment
Returns
TypeDescription
TextSegment.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TextSegment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSegment.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public TextSegment.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
TextSegment.Builder
Overrides

mergeSegment(VideoSegment value)

public TextSegment.Builder mergeSegment(VideoSegment value)

Video segment where a text snippet was detected.

.google.cloud.videointelligence.v1p2beta1.VideoSegment segment = 1;

Parameter
NameDescription
valueVideoSegment
Returns
TypeDescription
TextSegment.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TextSegment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TextSegment.Builder
Overrides

removeFrames(int index)

public TextSegment.Builder removeFrames(int index)

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
TextSegment.Builder

setConfidence(float value)

public TextSegment.Builder setConfidence(float value)

Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.

float confidence = 2;

Parameter
NameDescription
valuefloat

The confidence to set.

Returns
TypeDescription
TextSegment.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setFrames(int index, TextFrame value)

public TextSegment.Builder setFrames(int index, TextFrame value)

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Parameters
NameDescription
indexint
valueTextFrame
Returns
TypeDescription
TextSegment.Builder

setFrames(int index, TextFrame.Builder builderForValue)

public TextSegment.Builder setFrames(int index, TextFrame.Builder builderForValue)

Information related to the frames where OCR detected text appears.

repeated .google.cloud.videointelligence.v1p2beta1.TextFrame frames = 3;

Parameters
NameDescription
indexint
builderForValueTextFrame.Builder
Returns
TypeDescription
TextSegment.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public TextSegment.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
TextSegment.Builder
Overrides

setSegment(VideoSegment value)

public TextSegment.Builder setSegment(VideoSegment value)

Video segment where a text snippet was detected.

.google.cloud.videointelligence.v1p2beta1.VideoSegment segment = 1;

Parameter
NameDescription
valueVideoSegment
Returns
TypeDescription
TextSegment.Builder

setSegment(VideoSegment.Builder builderForValue)

public TextSegment.Builder setSegment(VideoSegment.Builder builderForValue)

Video segment where a text snippet was detected.

.google.cloud.videointelligence.v1p2beta1.VideoSegment segment = 1;

Parameter
NameDescription
builderForValueVideoSegment.Builder
Returns
TypeDescription
TextSegment.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final TextSegment.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
TextSegment.Builder
Overrides