SimplifiedDocumentNormalizerSettings
The SimplifiedDocumentNormalizerSettings
struct contains settings for document normalization. It is a sub-parameter of SimplifiedCaptureVisionSettings
typedef struct tagSimplifiedDocumentNormalizerSettings
{
GrayscaleTransformationMode grayscaleTransformationModes[8];
GrayscaleEnhancementMode grayscaleEnhancementModes[8];
ImageColourMode colourMode;
int pageSize[2];
int brightness;
int contrast;
int maxThreadsInOneTask;
int scaleDownThreshold;
int minQuadrilateralAreaRatio;
int expectedDocumentsCount;
char reserved[504];
} SimplifiedDocumentNormalizerSettings;
Attributes Summary
Attribute | Type |
---|---|
grayscaleTransformationModes |
GrayscaleTransformationMode[8] |
grayscaleEnhancementModes |
GrayscaleEnhancementMode[8] |
colourMode |
int |
pageSize |
int[2] |
brightness |
int |
contrast |
int |
maxThreadsInOneTask |
int |
scaleDownThreshold |
int |
minQuadrilateralAreaRatio |
int |
expectedDocumentsCount |
int |
reserved |
char[504] |
grayscaleTransformationModes
Set the grayscale transformation modes with an array of enumeration GrayscaleTransformationMode
. View the reference page of GrayscaleTransformationMode
for more detail about grayscale transformation modes.
GrayscaleTransformationMode grayscaleTransformationModes[8];
grayscaleEnhancementModes
Set the grayscale enhancement modes with an array of enumeration GrayscaleEnhancementMode
. View the reference page of GrayscaleEnhancementMode
for more detail about grayscale enhancement modes.
GrayscaleEnhancementMode grayscaleEnhancementModes[8];
colourMode
Set the output image colour mode.
ImageColourMode colourMode;
Value Range
“ICM_BINARY”, “ICM_GRAYSCALE”, “ICM_COLOUR”
Default value
“ICM_COLOUR”
pageSize
Set the page size (width by height in pixels) of the normalized image.
int pageSize[2];
brightness
Set the brightness of the normalized image.
int brightness;
Value Range
[-100,100]
Default value
0
contrast
Set the contrast of the normalized image.
int contrast
Value Range
[-100,100]
Default value
0
maxThreadsInOneTask
Set the maximum available threads count in one document normalization task.
int maxThreadsInOneTask;
Value Range
[1, 256]
Default value
4
Remarks
To keep a balance between speed and quality, the library concurrently runs four different threads by default.
scaleDownThreshold
Sets the threshold for the image shrinking.
int scaleDownThreshold;
Value Range
[512, 0x7fffffff]
Default Value
2300
Remarks
If the shorter edge size is larger than the given threshold value, the library will calculate the required height and width of the barcode image and shrink the image to that size before detection. Otherwise, the library will perform document detection on the original image.
minQuadrilateralAreaRatio
Set the minimum ratio between the target document area and the total image area. Only those exceeding this value will be outputted (measured in percentages).
int minQuadrilateralAreaRatio;
Value Range
[0, 100]
Default Value
0
expectedDocumentsCount
Set the number of documents expected to be detected.
int expectedDocumentsCount;
Value Range
[0, 0x7fffffff]
Default Value
0
reserved
Reserved for future use.
char reserved[504];