Table of contents

DSNormalizedImagesUnit

The DSNormalizedImagesUnit class represents an intermediate result unit whose type is normalized images.

Definition

Assembly: DynamsoftDocumentNormalizer.xcframework

  • Objective-C
  • Swift
  1. @interface DSNormalizedImagesUnit: DSIntermediateResultUnit
    
  2. class NormalizedImagesUnit: IntermediateResultUnit
    

Methods

Methods Description
getNormalizedImages Get an array of DSNormalizedImageElement that represent all the normalized images.
getCount Get the number of normalized images.
getNormalizedImage Get the DSNormalizedImageElement at the specified index.
removeAllNormalizedImages Remove all normalized images.
setNormalizedImage Set the DSNormalizedImageElement at the specified index.

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.

getNormalizedImages

Get an array of DSNormalizedImageElement that represent all the normalized images.

  • Objective-C
  • Swift
  1. -(nullable NSArray<DSNormalizedImageElement*>*)getNormalizedImages;
    
  2. func getNormalizedImages() -> [NormalizedImageElement]?
    

Return Value

An array of DSNormalizedImageElement that represent all the normalized images.

getCount

Get the number of normalized images.

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

Return Value

The number of normalized images.

getNormalizedImage

Get the DSNormalizedImageElement at the specified index.

  • Objective-C
  • Swift
  1. -(nullable DSNormalizedImageElement*)getNormalizedImage:(NSInteger)index;
    
  2. func getNormalizedImage(index: Int) -> NormalizedImageElement?
    

Parameters

[in] index: The index of the normalized image.

Return Value

The DSNormalizedImageElement at the specified index.

removeAllNormalizedImages

Remove all normalized images.

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

setNormalizedImage

Set the DSNormalizedImageElement at the specified index.

  • Objective-C
  • Swift
  1. -(NSInteger)setNormalizedImage:(DSNormalizedImageElement*)element
         matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;
    
  2. func setNormalizedImage(element: NormalizedImageElement, matrixToOriginalImage: CGAffineTransform) -> Int
    

Parameters

[in] element: The normalized image to be set.

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

Return Value

Returns the ErrorCode if failed. Otherwise, returns 0.