Table of contents

LineSegmentsUnit

The LineSegmentsUnit class represents a collection of line segments in 2D space. It is a derived class of IntermediateResultUnit.

Definition

Namespace: com.dynamsoft.core.intermediate_results

public class LineSegmentsUnit extends IntermediateResultUnit

Methods

Method Description
getCount Gets the number of line segments in the collection.
getLineSegment Gets the specified line segment from the collection.
getLineSegments Gets all line segments from the collection.
removeAllLineSegments Removes all line segments from the unit.
removeLineSegment Removes the line segment at the specified index.
addLineSegment Adds a line segment to the unit.
setLineSegment Sets the line segment at the specified index.

getCount

Gets the number of line segments in the collection.

int getCount()

Return value

Returns the number of line segments in the collection.

getLineSegment

Gets the specified line segment from the collection.

LineSegment getLineSegment(int index)

Parameters

index The index of the line segment to retrieve.

Return value

Returns the LineSegment object at the specified index.

See Also

LineSegment

getLineSegments

Gets all line segments from the collection.

LineSegment[] getLineSegments()

Return value

Returns all LineSegment objects in the collection.

See Also

LineSegment

removeAllLineSegments

Removes all line segments from the unit.

void removeAllLineSegments()

removeLineSegment

Removes the line segment at the specified index.

void removeLineSegment(int index) throws CoreException

Parameters

index The index of the line segment to remove.

Exception

CoreException

addLineSegment

Adds a line segment to the unit.

void addLineSegment(LineSegment line) throws CoreException
void addLineSegment(LineSegment line, double[] matrixToOriginalImage) throws CoreException

Parameters

line The line segment to add.

matrixToOriginalImage The transform matrix to original image.

Exception

CoreException

See Also

LineSegment

setLineSegment

Sets the line segment at the specified index.

void setLineSegment(int index, LineSegment line) throws CoreException
void setLineSegment(int index, LineSegment line, double[] matrixToOriginalImage) throws CoreException

Parameters

index The index of the line segment to set.

line The line segment to set.

matrixToOriginalImage The transform matrix to original image.

Exception

CoreException

See Also

LineSegment

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article: