Class TextSegment (2.17.0)

public final class TextSegment extends GeneratedMessageV3 implements TextSegmentOrBuilder

Video segment level annotation results for text detection.

Protobuf type google.cloud.videointelligence.v1p2beta1.TextSegment

Static Fields

CONFIDENCE_FIELD_NUMBER

public static final int CONFIDENCE_FIELD_NUMBER
Field Value
TypeDescription
int

FRAMES_FIELD_NUMBER

public static final int FRAMES_FIELD_NUMBER
Field Value
TypeDescription
int

SEGMENT_FIELD_NUMBER

public static final int SEGMENT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static TextSegment getDefaultInstance()
Returns
TypeDescription
TextSegment

getDescriptor()

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

newBuilder()

public static TextSegment.Builder newBuilder()
Returns
TypeDescription
TextSegment.Builder

newBuilder(TextSegment prototype)

public static TextSegment.Builder newBuilder(TextSegment prototype)
Parameter
NameDescription
prototypeTextSegment
Returns
TypeDescription
TextSegment.Builder

parseDelimitedFrom(InputStream input)

public static TextSegment parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TextSegment
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TextSegment parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSegment
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static TextSegment parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
TextSegment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static TextSegment parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSegment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static TextSegment parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
TextSegment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static TextSegment parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSegment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static TextSegment parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
TextSegment
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static TextSegment parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSegment
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static TextSegment parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
TextSegment
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static TextSegment parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSegment
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static TextSegment parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
TextSegment
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static TextSegment parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
TextSegment
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<TextSegment> parser()
Returns
TypeDescription
Parser<TextSegment>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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

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

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>

getParserForType()

public Parser<TextSegment> getParserForType()
Returns
TypeDescription
Parser<TextSegment>
Overrides

getSegment()

public VideoSegment getSegment()

Video segment where a text snippet was detected.

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

Returns
TypeDescription
VideoSegment

The segment.

getSegmentOrBuilder()

public VideoSegmentOrBuilder getSegmentOrBuilder()

Video segment where a text snippet was detected.

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

Returns
TypeDescription
VideoSegmentOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public TextSegment.Builder newBuilderForType()
Returns
TypeDescription
TextSegment.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected TextSegment.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
TextSegment.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public TextSegment.Builder toBuilder()
Returns
TypeDescription
TextSegment.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException