layout | title | description | keywords | needGenerateH3Content | needAutoGenerateSidebar | noTitleIndex |
---|---|---|---|---|---|---|
default-layout |
DSSimplifiedDocumentNormalizerSettings - Dynamsoft Document Normalizer module iOS Edition API Reference |
The class DSSimplifiedDocumentNormalizerSettings of Dynamsoft Document Normalizer module represents the simplified document normalizer settings. |
document normalizer settings, objective-c, swift |
true |
true |
true |
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]({{ site.parameters }}reference/index.html){:target="_blank"} page.
Assembly: DynamsoftDocumentNormalizer.xcframework
>- Objective-C >- Swift > >1. ```objc @interface DSSimplifiedDocumentNormalizerSettings: NSObject ``` 2. ```swift class SimplifiedDocumentNormalizerSettings: NSObject ```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. |
Defines the grayscale transformation modes with an array of [DSGrayscaleTransformationMode
]({{ site.dcv_enumerations }}core/grayscale-transformation-mode.html?lang=objc,swift) items. This parameter is important when working with inverted documents, and must be used in order to locate the inverted document boundary.
Defines the grayscale enhancement modes with an array of [DSGrayscaleEnhancementModes
]({{ site.dcv_enumerations }}core/grayscale-enhancement-modes.html?lang=objc,swift) 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]({{ site.dcv_parameters }}reference/image-parameter/grayscale-enhancement-modes.html) parameter page.
Defines the colour mode (pixel type) of the normalized image with a [DSImageColourMode
]({{ site.dcv_enumerations }}document-normalizer/image-colour-mode.html?lang=objc,swift) 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.
Defines the page size of the normalized image with a CGSize
{:target="_blank"} object.
Defines the brightness of the normalized image result with an integer.
>- Objective-C >- Swift > >1. ```objc @property (nonatomic, assign) NSInteger brightness; ``` 2. ```swift var brightness: Int { get set } ```Defines the contrast of the normalized image result with an integer.
>- Objective-C >- Swift > >1. ```objc @property (nonatomic, assign) NSInteger contrast; ``` 2. ```swift var contrast: Int { get set } ```Defines the maximum number of threads dedicated to a single task.
>- Objective-C >- Swift > >1. ```objc @property (nonatomic, assign) NSInteger maxThreadsInOneTask; ``` 2. ```swift var maxThreadsInOneTask: Int { get set } ```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.