DSCandidateQuadEdgesUnit
The DSCandidateQuadEdgesUnit class represents an intermediate result unit whose type is candidate quad edges.
Definition
Assembly: DynamsoftCaptureVisionBundle.xcframework
- Objective-C
- Swift
@interface DSCandidateQuadEdgesUnit: DSIntermediateResultUnitclass CandidateQuadEdgesUnit: IntermediateResultUnit
Methods
| Methods | Description |
|---|---|
getCandidateQuadEdges |
Get an array of edges. It includes all edges that candidate quadrilaterals assembling. |
getCount |
Get the number of edges. |
getCandidateQuadEdge |
Get an edge. |
removeAllCandidateQuadEdges |
Remove all edges. |
removeCandidateQuadEdge |
Remove an edge. |
addCandidateQuadEdge |
Add an edge. |
setCandidateQuadEdge |
Set an edge. |
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. |
getCandidateQuadEdges
Get an array of edges. It includes all edges that candidate quadrilaterals assembling.
- Objective-C
- Swift
-(nullable NSArray<DSEdge *> *)getCandidateQuadEdges;func getCandidateQuadEdges() -> [DSEdge]?
Return Value
Returns an array of edges.
getCount
Get the number of edges.
- Objective-C
- Swift
-(NSInteger)getCount;func getCount() -> NSInteger
Return Value
Returns the number of edges.
getCandidateQuadEdge
Get the DSEdge object at the specified index.
- Objective-C
- Swift
-(nullable DSEdge *)getCandidateQuadEdge:(NSInteger)index;func getCandidateQuadEdge(_ index: Int) -> DSEdge?
Parameters
[in] index: The index of the edge.
Return Value
Returns the DSEdge object as the specified edge.
removeAllCandidateQuadEdges
Remove all edges.
- Objective-C
- Swift
-(void)removeAllCandidateQuadEdges;func removeAllCandidateQuadEdges()
removeCandidateQuadEdge
Remove the DSEdge object at the specified index.
- Objective-C
- Swift
-(NSInteger)removeCandidateQuadEdge:(NSInteger)index;func removeCandidateQuadEdge(_ index: Int) -> NSInteger
Parameters
[in] index: The index of the edge.
Return Value
Returns the ErrorCode if failed. Otherwise, returns 0.
addCandidateQuadEdge
Add an edge.
- Objective-C
- Swift
-(NSInteger)addCandidateQuadEdge:(DSEdge *)edge matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;func addCandidateQuadEdge(_ edge: DSEdge, matrixToOriginalImage: CGAffineTransform) -> NSInteger
Parameters
[in] edge: The edge to be added.
[in] matrixToOriginalImage: The matrix to the original image.
Return Value
Returns the ErrorCode if failed. Otherwise, returns 0.
setCandidateQuadEdge
Set the DSEdge object at the specified index.
- Objective-C
- Swift
-(NSInteger)setCandidateQuadEdge:(NSInteger)index edge:(DSEdge *)edge matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;func setCandidateQuadEdge(_ index: Int, edge: DSEdge, matrixToOriginalImage: CGAffineTransform) -> NSInteger
Parameters
[in] index: The index of the edge.
[in] edge: The edge to be set.
[in] matrixToOriginalImage: The matrix to the original image.
Return Value
Returns the ErrorCode if failed. Otherwise, returns 0.