Resource Base
Table of contents

DSSimplifiedDocumentNormalizerSettings

The DSSimplifiedDocumentNormalizerSettings class represents a series of simple settings related to the Document Normalizer. Please note that this is not the full list of settings that can be utilized by the Document Normalizer, which you can find on the Dynamsoft Document Normalizer Parameters page.

Definition

Assembly: DynamsoftDocumentNormalizer.xcframework

  • Objective-C
  • Swift
  1. @interface DSSimplifiedDocumentNormalizerSettings: NSObject
    
  2. class SimplifiedDocumentNormalizerSettings: NSObject
    

Attributes

Attributes Type Description
grayscaleTransformationModes *NSArray* \* An array of DSGrayscaleTransformationMode. It controls whether to detect the inverted document boundary.
grayscaleEnhancementModes *NSArray* \* An array of DSGrayscaleEnhancementModes.
colourMode *DSImageColourMode * The grayscale transformation mode. It controls whether to decode the inverted text.
pageSize *CGSize * The page size.
brightness *NSInteger * The brightness.
contrast *NSInteger * The contrast.
maxThreadsInOneTask *NSInteger * The maximum number of threads in one task.
scaleDownThreshold *NSInteger * The scale down threshold.

grayscaleTransformationModes

Defines the grayscale transformation modes with an array of DSGrayscaleTransformationMode items. This parameter is important when working with inverted documents, and must be used in order to locate the inverted document boundary.

  • Objective-C
  • Swift
  1. @property (nonatomic, nullable, copy) NSArray<NSNumber>* grayscaleTransformationModes;
    
  2. var grayscaleTransformationModes: [NSNumber]? { get set }
    

grayscaleEnhancementModes

Defines the grayscale enhancement modes with an array of DSGrayscaleEnhancementModes items. This parameter can be quite powerful in increasing the border detection rate of your application should you experience any trouble in that area. To learn more about the grayscaleEnhancementModes and how they can be used, please visit the main GrayscaleEnhancementModes parameter page.

  • Objective-C
  • Swift
  1. @property (nonatomic, nullable, copy) NSArray<NSNumber>* grayscaleEnhancementModes;
    
  2. var grayscaleEnhancementModes: [NSNumber]? { get set }
    

colourMode

Defines the colour mode (pixel type) of the normalized image with a DSImageColourMode member. By default, the normalized image will output in colour. In order to make the result image grayscale or binary, setting the colourMode to the corresponding pixel type will do the trick.

  • Objective-C
  • Swift
  1. @property (nonatomic, assign) DSImageColourMode colourMode;
    
  2. var colourMode: ImageColourMode { get set }
    

pageSize

Defines the page size of the normalized image with a CGSize object.

  • Objective-C
  • Swift
  1. @property (nonatomic, assign) CGSize pageSize;
    
  2. var pageSize: CGSize { get set }
    

brightness

Defines the brightness of the normalized image result with an integer.

  • Objective-C
  • Swift
  1. @property (nonatomic, assign) NSInteger brightness;
    
  2. var brightness: Int { get set }
    

contrast

Defines the contrast of the normalized image result with an integer.

  • Objective-C
  • Swift
  1. @property (nonatomic, assign) NSInteger contrast;
    
  2. var contrast: Int { get set }
    

maxThreadsInOneTask

Defines the maximum number of threads dedicated to a single task.

  • Objective-C
  • Swift
  1. @property (nonatomic, assign) NSInteger maxThreadsInOneTask;
    
  2. var maxThreadsInOneTask: Int { get set }
    

scaleDownThreshold

If the original image size is quite large, then the scaledownThreshold can be used to shrink the image and speed up the processing. If the shorter edge size is larger than the defined scale down threshold, the library will calculate the required width and height of the image and shrink it to that size before moving forward in the process.

  • Objective-C
  • Swift
  1. @property (nonatomic, assign) NSInteger scaleDownThreshold;
    
  2. var scaleDownThreshold: Int { get set }
    

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