Class TextSegment.Builder (2.53.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.v1.TextSegment

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
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.v1.TextFrame frames = 3;

Parameter
Name Description
values Iterable<? extends com.google.cloud.videointelligence.v1.TextFrame>
Returns
Type Description
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.v1.TextFrame frames = 3;

Parameter
Name Description
value TextFrame
Returns
Type Description
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.v1.TextFrame frames = 3;

Parameter
Name Description
builderForValue TextFrame.Builder
Returns
Type Description
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.v1.TextFrame frames = 3;

Parameters
Name Description
index int
value TextFrame
Returns
Type Description
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.v1.TextFrame frames = 3;

Parameters
Name Description
index int
builderForValue TextFrame.Builder
Returns
Type Description
TextSegment.Builder

addFramesBuilder()

public TextFrame.Builder addFramesBuilder()

Information related to the frames where OCR detected text appears.

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

Returns
Type Description
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.v1.TextFrame frames = 3;

Parameter
Name Description
index int
Returns
Type Description
TextFrame.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public TextSegment.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
TextSegment.Builder
Overrides

build()

public TextSegment build()
Returns
Type Description
TextSegment

buildPartial()

public TextSegment buildPartial()
Returns
Type Description
TextSegment

clear()

public TextSegment.Builder clear()
Returns
Type Description
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
Type Description
TextSegment.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public TextSegment.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
TextSegment.Builder
Overrides

clearFrames()

public TextSegment.Builder clearFrames()

Information related to the frames where OCR detected text appears.

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

Returns
Type Description
TextSegment.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public TextSegment.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
TextSegment.Builder
Overrides

clearSegment()

public TextSegment.Builder clearSegment()

Video segment where a text snippet was detected.

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

Returns
Type Description
TextSegment.Builder

clone()

public TextSegment.Builder clone()
Returns
Type Description
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
Type Description
float

The confidence.

getDefaultInstanceForType()

public TextSegment getDefaultInstanceForType()
Returns
Type Description
TextSegment

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFrames(int index)

public TextFrame getFrames(int index)

Information related to the frames where OCR detected text appears.

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

Parameter
Name Description
index int
Returns
Type Description
TextFrame

getFramesBuilder(int index)

public TextFrame.Builder getFramesBuilder(int index)

Information related to the frames where OCR detected text appears.

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

Parameter
Name Description
index int
Returns
Type Description
TextFrame.Builder

getFramesBuilderList()

public List<TextFrame.Builder> getFramesBuilderList()

Information related to the frames where OCR detected text appears.

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

Returns
Type Description
List<Builder>

getFramesCount()

public int getFramesCount()

Information related to the frames where OCR detected text appears.

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

Returns
Type Description
int

getFramesList()

public List<TextFrame> getFramesList()

Information related to the frames where OCR detected text appears.

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

Returns
Type Description
List<TextFrame>

getFramesOrBuilder(int index)

public TextFrameOrBuilder getFramesOrBuilder(int index)

Information related to the frames where OCR detected text appears.

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

Parameter
Name Description
index int
Returns
Type Description
TextFrameOrBuilder

getFramesOrBuilderList()

public List<? extends TextFrameOrBuilder> getFramesOrBuilderList()

Information related to the frames where OCR detected text appears.

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

Returns
Type Description
List<? extends com.google.cloud.videointelligence.v1.TextFrameOrBuilder>

getSegment()

public VideoSegment getSegment()

Video segment where a text snippet was detected.

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

Returns
Type Description
VideoSegment

The segment.

getSegmentBuilder()

public VideoSegment.Builder getSegmentBuilder()

Video segment where a text snippet was detected.

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

Returns
Type Description
VideoSegment.Builder

getSegmentOrBuilder()

public VideoSegmentOrBuilder getSegmentOrBuilder()

Video segment where a text snippet was detected.

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

Returns
Type Description
VideoSegmentOrBuilder

hasSegment()

public boolean hasSegment()

Video segment where a text snippet was detected.

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

Returns
Type Description
boolean

Whether the segment field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(TextSegment other)

public TextSegment.Builder mergeFrom(TextSegment other)
Parameter
Name Description
other TextSegment
Returns
Type Description
TextSegment.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public TextSegment.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
TextSegment.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public TextSegment.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
TextSegment.Builder
Overrides

mergeSegment(VideoSegment value)

public TextSegment.Builder mergeSegment(VideoSegment value)

Video segment where a text snippet was detected.

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

Parameter
Name Description
value VideoSegment
Returns
Type Description
TextSegment.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final TextSegment.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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.v1.TextFrame frames = 3;

Parameter
Name Description
index int
Returns
Type Description
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
Name Description
value float

The confidence to set.

Returns
Type Description
TextSegment.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public TextSegment.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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.v1.TextFrame frames = 3;

Parameters
Name Description
index int
value TextFrame
Returns
Type Description
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.v1.TextFrame frames = 3;

Parameters
Name Description
index int
builderForValue TextFrame.Builder
Returns
Type Description
TextSegment.Builder

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

public TextSegment.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
TextSegment.Builder
Overrides

setSegment(VideoSegment value)

public TextSegment.Builder setSegment(VideoSegment value)

Video segment where a text snippet was detected.

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

Parameter
Name Description
value VideoSegment
Returns
Type Description
TextSegment.Builder

setSegment(VideoSegment.Builder builderForValue)

public TextSegment.Builder setSegment(VideoSegment.Builder builderForValue)

Video segment where a text snippet was detected.

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

Parameter
Name Description
builderForValue VideoSegment.Builder
Returns
Type Description
TextSegment.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final TextSegment.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
TextSegment.Builder
Overrides