Resource Base
Table of contents

DSDetectedQuadsUnit

The DSDetectedQuadsUnit class represents an intermediate result unit whose type is detected quads. It is inherited from the DSIntermediateResultUnit class.

Definition

Assembly: DynamsoftDocumentNormalizer.xcframework

  • Objective-C
  • Swift
  1. @interface DSDetectedQuadsUnit : DSIntermediateResultUnit
    
  2. class DetectedQuadsUnit : IntermediateResultUnit
    

Methods

Methods Description
getDetectedQuads Get an array of DSDetectedQuadElement that represent all the detected quadrilaterals.
getCount Get the number of detected quadrilaterals.
getDetectedQuad Get the DSDetectedQuadElement at the specified index.
removeAllDetectedQuads Remove all detected quadrilaterals.
removeDetectedQuad Remove the DSDetectedQuadElement at the specified index.
addDetectedQuad Add a new DSDetectedQuadElement to the unit.
setDetectedQuad Set the DSDetectedQuadElement at the specified index.

getDetectedQuads

Get an array of DSDetectedQuadElement that represent all the detected quadrilaterals.

  • Objective-C
  • Swift
  1. -(nullable NSArray<DSDetectedQuadElement*>*)getDetectedQuads;
    
  2. func getDetectedQuads() -> [DetectedQuadElement]?
    

Return Value

An array of DSDetectedQuadElement that represent all the detected quadrilaterals.

getCount

Get the number of detected quadrilaterals.

  • Objective-C
  • Swift
  1. -(NSInteger)getCount;
    
  2. func getCount() -> Int
    

Return Value

The number of detected quadrilaterals.

getDetectedQuad

Get the DSDetectedQuadElement at the specified index.

  • Objective-C
  • Swift
  1. -(nullable DSDetectedQuadElement*)getDetectedQuad:(NSInteger)index;
    
  2. func getDetectedQuad(index: Int) -> DetectedQuadElement?
    

Parameters

[in] index: The index of the detected quadrilateral.

Return Value

The DSDetectedQuadElement object at the specified index. If the index is out of range, nil will be returned.

removeAllDetectedQuads

Remove all detected quadrilaterals.

  • Objective-C
  • Swift
  1. -(void)removeAllDetectedQuads;
    
  2. func removeAllDetectedQuads()
    

removeDetectedQuad

Remove the DSDetectedQuadElement at the specified index.

  • Objective-C
  • Swift
  1. -(NSInteger)removeDetectedQuad:(NSInteger)index;
    
  2. func removeDetectedQuad(_ index: Int) -> Int
    

Parameters

[in] index: The index of the detected quadrilateral.

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.

addDetectedQuad

Add a new DSDetectedQuadElement to the unit.

  • Objective-C
  • Swift
  1. -(NSInteger)addDetectedQuad:(DSDetectedQuadElement*)element
      matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;
    
  2. func addDetectedQuad(_ element: DetectedQuadElement, matrixToOriginalImage: CGAffineTransform) -> Int
    

Parameters

[in] element: The detected quadrilateral to be added.

[in] matrixToOriginalImage: The matrix to the original image.

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.

setDetectedQuad

Set the DSDetectedQuadElement at the specified index.

  • Objective-C
  • Swift
  1. -(NSInteger)setDetectedQuad:(NSInteger)index
                    element:(DSDetectedQuadElement*)element
      matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;
    
  2. func setDetectedQuad(_ index: Int, element: DetectedQuadElement, matrixToOriginalImage: CGAffineTransform) -> Int
    

Parameters

[in] index: The index of the detected quadrilateral.

[in] element: The detected quadrilateral to be set.

[in] matrixToOriginalImage: The matrix to the original image.

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version
  • Version 2.x
    • Version 2.2.10
    • Version 2.0.20
    • Version 2.0.10
    • Version 2.0.10
  • Version 1.x
    • Version 1.0.30
    • Version 1.0.21
    • Version 1.0.20
    • Version 1.0.12
    • Version 1.0.11
    • Version 1.0.10
    • Version 1.0.0
    • Version 1.0.30
    • Version 1.0.21
    • Version 1.0.20
    • Version 1.0.12
    • Version 1.0.11
    • Version 1.0.10
    • Version 1.0.0
    • Version 1.0.5
    • Version 1.0.4
    • Version 1.0.3
    • Version 1.0.2
    • Version 1.0.1
    • Version 1.0.0
Change +
© 2003–2024 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support