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
@interface DSSimplifiedDocumentNormalizerSettings: NSObject
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. |
minQuadrilateralAreaRatio |
int | The minimum ratio between the target document area and the total image area. Only those exceeding this value will be output (measured in percentages). |
expectedDocumentsCount |
int | The number of documents expected to be detected. |
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
@property (nonatomic, nullable, copy) NSArray<NSNumber>* grayscaleTransformationModes;
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
@property (nonatomic, nullable, copy) NSArray<NSNumber>* grayscaleEnhancementModes;
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
@property (nonatomic, assign) DSImageColourMode colourMode;
var colourMode: ImageColourMode { get set }
pageSize
Defines the page size of the normalized image with a CGSize
object.
- Objective-C
- Swift
@property (nonatomic, assign) CGSize pageSize;
var pageSize: CGSize { get set }
brightness
Defines the brightness of the normalized image result with an integer.
- Objective-C
- Swift
@property (nonatomic, assign) NSInteger brightness;
var brightness: Int { get set }
contrast
Defines the contrast of the normalized image result with an integer.
- Objective-C
- Swift
@property (nonatomic, assign) NSInteger contrast;
var contrast: Int { get set }
maxThreadsInOneTask
Defines the maximum number of threads dedicated to a single task.
- Objective-C
- Swift
@property (nonatomic, assign) NSInteger maxThreadsInOneTask;
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
@property (nonatomic, assign) NSInteger scaleDownThreshold;
var scaleDownThreshold: Int { get set }
minQuadrilateralAreaRatio
The minimum ratio between the target document area and the total image area. Only those exceeding this value will be output (measured in percentages).
- Objective-C
- Swift
@property (nonatomic, assign) NSInteger MinQuadrilateralAreaRatio;
var minQuadrilateralAreaRatio: Int { get set }
expectedDocumentsCount
The number of documents expected to be detected.
- Objective-C
- Swift
@property (nonatomic, assign) NSInteger expectedDocumentsCount;
var expectedDocumentsCount: Int { get set }