GrayscaleTransformationModes
Parameter GrayscaleTransformationModes
are used to control whether or not to invert the color of the grayscale image. Generally, we think of the lighter colors as the background and the darker colors as the target in a grayscale image. However in a few cases it is opposite.
Example
{
"GrayscaleTransformationModes": [
{
"Mode": "GTM_ORIGINAL"
},
{
"Mode": "GTM_INVERTED"
}
]
}
Parameter Summary
Mode Arguments
Parameter GrayscaleTransformationModes
consist of a group of grayscale transformation mode objects. Each grayscale transformation mode object includes a candidate mode and a series of mode arguments. The mode arguments of the grayscale transformation mode object is shown as follow:
Mode Argument Name | Mode Argument Summary |
---|---|
Mode (Required) |
Description Specifies a mode for grayscale transformation. |
Type String |
|
Candidate Mode List GTM_ORIGINAL GTM_INVERTED GTM_AUTO |
Default Setting
If the GrayscaleTransformationModes
is not configured in your template file, the following settings will be used as the default settings.
For Barcode Decoding
{
"GrayscaleTransformationModes":
[
{
"Mode": "GTM_ORIGINAL"
}
]
}
For Label Recognizing
{
"GrayscaleTransformationModes": [
{
"Mode": "GTM_ORIGINAL"
},
{
"Mode": "GTM_INVERTED"
}
]
}
For Document Scanning
{
"GrayscaleTransformationModes":
[
{
"Mode": "GTM_ORIGINAL"
}
]
}
Candidate Modes Introduction
GTM_ORIGINAL
Keeps the original grayscale.
GTM_INVERTED
Transforms the image to inverted grayscale.
GTM_AUTO
Let the library choose automatically for grayscale transformation.