DSLongLinesUnit
The DSLongLinesUnit class represents an intermediate result unit whose type is long lines. Line segments that are located in the same line are extended and merged to form a long line.
Definition
Assembly: DynamsoftCaptureVisionBundle.xcframework
- Objective-C
- Swift
@interface DSLongLinesUnit: DSIntermediateResultUnitclass LongLinesUnit: IntermediateResultUnit
Methods
| Methods | Description |
|---|---|
getLongLines |
Get an array of DSLineSegment as the long lines. |
getCount |
Get the number of long lines. |
getLongLine |
Get a long line. |
removeAllLongLines |
Remove all long lines. |
removeLongLine |
Remove a long line. |
addLongLine |
Add a long line. |
setLongLine |
Set a long line. |
The following methods are inherited from class DSIntermediateResultUnit.
| Method | Description |
|---|---|
getHashId |
Returns the hash ID of the unit. |
getOriginalImageHashId |
Returns the hash ID of the original image. |
getOriginalImageTag |
Returns the image tag of the original image. |
getType |
Returns the type of the intermediate result unit. |
getTransformMatrix |
Returns the transformation matrix via DSTransformMatrixType. |
clone |
Creates a copy of the intermediate result unit. |
replace |
Replaces the content of the intermediate result unit. |
getLongLines
Get an array of DSLineSegment as the long lines.
- Objective-C
- Swift
-(nullable NSArray<DSLineSegment*>*)getLongLines;func getLongLines() -> [LineSegment]?
Return Value
The array of DSLineSegment as the long lines.
getCount
Get the number of long lines.
- Objective-C
- Swift
-(NSInteger)getCount;func getCount() -> Int
Return Value
The number of long lines.
getLongLine
Get the long line at the specified index.
- Objective-C
- Swift
-(nullable DSLineSegment*)getLongLine:(NSInteger)index;func getLongLine(_ index: Int) -> LineSegment?
Parameters
[in] index: The index of the long line.
Return Value
A DSLineSegment object as the long line at the specified index.
removeAllLongLines
Remove all long lines.
- Objective-C
- Swift
-(void)removeAllLongLines;func removeAllLongLines()
removeLongLine
Remove the long line at the specified index.
- Objective-C
- Swift
-(NSInteger)removeLongLine:(NSInteger)index;func removeLongLine(_ index: Int) -> Int
Parameters
The index of the long line to be removed.
Return Value
Returns the ErrorCode if failed. Otherwise, returns 0.
addLongLine
Add a long line.
- Objective-C
- Swift
-(NSInteger)addLongLine:(DSLineSegment*)line matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;func addLongLine(_ line: LineSegment, matrixToOriginalImage: CGAffineTransform) -> Int
Parameters
[in] line: The long line to be added.
[in] matrixToOriginalImage: The transformation matrix of the original image.
Return Value
Returns the ErrorCode if failed. Otherwise, returns 0.
setLongLine
Set the long line at the specified index.
- Objective-C
- Swift
-(NSInteger)setLongLine:(NSInteger)index line:(DSLineSegment*)line matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;func setLongLine(_ index: Int, line: LineSegment, matrixToOriginalImage: CGAffineTransform) -> Int
Parameters
[in] index: The index of the long line.
[in] line: The long line to be set.
[in] matrixToOriginalImage: The transformation matrix of the original image.
Return Value
Returns the ErrorCode if failed. Otherwise, returns 0.