LongLinesUnit Class
The LongLinesUnit class represents an intermediate result unit whose type is long lines. Short line segments that are located in the same line are extended and merged to form a long line segment.
Definition
Package: com.dynamsoft.ddn.intermediate_results
public class LongLinesUnit extends IntermediateResultUnit
Inheritance: IntermediateResultUnit -> LongLinesUnit
Methods
| Method | Description |
|---|---|
getCount |
Gets the count of LineSegment objects in current object. |
getLongLine |
Gets a LineSegment object from current object by specifying a index. |
getLongLines |
Gets all LineSegment objects in current object. |
removeAllLongLines |
Removes all the LongLines in current object. |
removeLongLine |
Removes a LongLine from current object by specifying an index. |
addLongLine |
Adds a LongLine to current object. |
setLongLine |
Sets the LongLine at the specified index. |
getCount
Gets the count of LineSegment objects in current object.
public int getCount()
Return Value
The count of LineSegment objects in current object.
getLongLine
Gets a LineSegment object from current object by specifying a index.
public LineSegment getLongLine(int index)
Parameters
index The index of the LineSegment object.
Return Value
Returns the LineSegment object.
See Also
getLongLines
Gets all LineSegment objects in current object.
public LineSegment[] getLongLines()
Return Value
Returns an array of LineSegment objects.
See Also
removeAllLongLines
Removes all the LongLines in current object.
public void removeAllLongLines()
removeLongLine
Removes a LongLine from current object by specifying an index.
public void removeLongLine(int index) throws DocumentNormalizerException
Parameters
index The index of the LongLine to be removed.
Exceptions
addLongLine
Adds a LongLine to current object.
public void addLongLine(LineSegment line) throws DocumentNormalizerException
public void addLongLine(LineSegment line, double[] matrixToOriginalImage) throws DocumentNormalizerException
Parameters
line The LongLine to be added.
matrixToOriginalImage The matrix to the original image.
Exceptions
See Also
setLongLine
Sets the LongLine at the specified index.
public void setLongLine(int index, LineSegment line) throws DocumentNormalizerException
public void setLongLine(int index, LineSegment line, double[] matrixToOriginalImage) throws DocumentNormalizerException
Parameters
index The index of the LongLine to be set.
line the LongLine to be set.
matrixToOriginalImage The matrix to the original image.
Exceptions