Properties of specific image processing settings

This section lists properties that belong to specific image processing settings listed in eVRS command string modules. Case is important for all property names.

Page detection

Image processing in eVRS always begins with page detection. Even if deskew to page or content, and crop are not requested, page detection is performed. This is to know where the page is to detect content like punch holes within it; decide whether the page is blank; or to analyze the image only inside the page while determining how better to binarize it. It is recommended to specify the range of scanner background colors in the scanner XML file that contains all the relevant non-defaults for the corresponding parameter settings. The following table describes the properties and the parameter range.

Property Name

Description and Parameter Range

CSkewDetect.white_bkg_threshold

Integer within [0,255] with the default = 128 meaning unknown. For bitonal input images the default = 0, meaning black background.
  • If the value of CSkewDetect.white_bkg_threshold is below 128, the background of the scanner is black, and its gray level can vary between zero and set value.

  • If the value of CSkewDetect.white_bkg_threshold is above 128, the background of the scanner is white, and its gray level can vary between set value and 255.

Note You must specify both minimum and maximum values within the background range in all three color channels: Red, Green and Blue.

CSkewDetect.dark_gray_bkg_threshold

CSkewDetect.bright_gray_bkg_threshold

Integer within [0,255] with the default =128 specifying minimum and maximum possible values of gray level scanner background.

CSkewDetect.dark_red_bkg_threshold

CSkewDetect.bright_red_bkg_threshold

Integer within [0,255] with the default =128 specifying minimum and maximum possible values of red channel in scanner background.

CSkewDetect.dark_green_bkg_threshold

CSkewDetect.bright_green_bkg_threshold

Integer within [0,255] with the default =128 specifying minimum and maximum possible values of green channel in scanner background.

CSkewDetect.dark_blue_bkg_threshold

CSkewDetect.bright_blue_bkg_threshold

Integer within [0,255] with the default =128 specifying minimum and maximum possible values of blue channel in scanner background.

CSkewDetect.gray_stats_error_

sum_thr_white_bkg

CSkewDetect.color_stats_

error_sum_thr_white_bkg

CSkewDetect.gray_stats_

error_sum_thr_black_bkg

CSkewDetect.color_stats_

error_sum_thr_black_bkg

Integers within [0,255]. Defines scanner background color detection sensitivity.

  • Defaults for scanned images:

    CSkewDetect.gray_stats_error_sum_thr_white_bkg=56

    CSkewDetect.color_stats_error_sum_thr_white_bkg=60

    CSkewDetect.gray_stats_error_sum_thr_black_bkg=96

    CSkewDetect.color_stats_error_sum_thr_black_bkg=96

  • Defaults for Mobile (color input only, with local background adjustment):

    CSkewDetect.color_stats_error_sum_thr_white_bkg = 18 CSkewDetect.color_stats_error_sum_thr_black_bkg = 36

Note Some scanners add filler bands to the bottom of scanned images. However, if the scanned page is smaller than the specified paper size, the filler bands are added on other sides as well. If cropping fitting the found page is not happening because it was not requested or was rejected based on page detection confidence, you can preserve or remove the filler bands. Historically in VRS, by default, the filler bands are preserved while in eVRS, they are removed. If it is necessary to mimic the behavior of VRS, set the value of CSkewDetect.keep_filler_if_no_crop.Bool to 1 (TRUE).

DO_NO_PAGE_DETECTION

This keyword indicates that the incoming image is already deskewed and cropped, so no page detection is necessary – the whole image is the page.

Note
  • The difference between DO_NO_PAGE_DETECTION and the absence of DO_SKEW_CORRECTION_PAGE of DO_SKEW_CORRECTION_ALT and DO_CROP_CORRECTION modules is that their absence does not cancel page detection, just disables skew correction and crop correction. Normally page detection is always performed because it is necessary for other operations.
  • Specifying _DoNoPageDetection_ is equivalent to setting the value of the parameter CSkewDetect.page_already_deskewed_and_cropped to 1 (TRUE).

DO_HEALTH_ANALYSIS

Health analysis, if requested, is performed when the image of the Kofax Health Target Sheet is detected. The target sheet has bar codes along the sides to detect the orientation and the type of target sheet scanned. The sheet also includes two wide diagonal lines and a white space in between. The analysis detects image streaks, problems with illumination uniformity, and straightness and stretching of the lines indicating roller wear. The returned data includes parameters indicating the health of each of the three items on a percent of excellence, 100% being the best.

DO_REMOVE_GRAPHIC_LINES

The following parameters control this module:

Property name Description and Parameter range
CFindLines.Direction.Byte Removes the type of lines: horizontal, vertical, or both. Possible values are:

  • DO_HORZ (1),

  • DO_VERT (2),

  • DO_HORZ_AND_VERT (3) (default).

CFindLines.MinLineLength.Int Default = 75. Prorated for 300 DPI
CFindLines.MaxLineThickness.Int Default = 24. Prorated for 300 DPI

DO_GRAY_OUTPUT

Ignores the request to convert the output image to grayscale when the incoming image is binary.

DO_CREATE_INDEX_IMAGE

The index image uses an 8-bit encoding of the content found within the processed image to exchange this information among image processing settings. Beginning with eVRS 2.2, index images are created automatically as necessary. Below eVRS 2.2, it is necessary to explicitly request the creation of the index image.

DO_BINARIZATION and DO_ENHANCED_BINARIZATION

To improve the quality of binary images for documents with low original resolution, it is possible to replace DO_BINARIZATION with DO_ENHANCED_BINARIZATION. This setting helps in creating binary images with resolutions higher than 300 DPI. The binary processed image is created with the requested high resolution, smoother character contours and lower background noise levels. The following table displays the required parameters controlling binarization.

Property Name

Description and Parameter Range

intelligent_contrast_enabled

Boolean. Default = 1 (TRUE).

If set to 0, cancels Auto-Contrast.

CBinarize.Contrast_Slider_Pos.Int

Integer within [1,5].

Default = 3 for scanned images.

Default = 2 for Mobile (see IMAGING_DEVICE_TYPE).

Controls the aggressiveness of Auto-Contrast determination.

intelligent_brightness_enabled

Boolean. Default = 1 (TRUE).

If set to 0, cancels Auto-Brightness.

CBinarize.Do_Adv_Clarity.Bool

Boolean. Default = 1 (TRUE).

If set to 0, cancels Intelligent Cleanup.

CBinarize. Cleanup_Slider_Pos.Int

Integer within [1,5].

Default = 3 for scanned images.

Default = 2 for Mobile (see IMAGING_DEVICE_TYPE).

Controls the aggressiveness of Intelligent Cleanup.

Advanced_Threshold_Dot_Matrix_Image_Enable

Boolean. Default = 0 (FALSE).

If set to 1, this setting enables analysis that can help improve character formation when binarizing images of documents containing dot matrix printing.

For most contemporary documents without any dot-matrix printing, set this property to 0 to save time spent on this analysis.

global_threshold

Integer within [0,255]. Default = 128.

Used if Auto-Brightness is off. Sets the brightness threshold for binarization of flat (non-edge) pixels.

If the gray level of a pixel is below 255 minus this setting, then the pixel becomes black. For example, if global_threshold is set to 100 and if the pixel’s gray level is 155 (255 - global_threshold), then the pixel is converted to black, otherwise it remains white.

edge_threshold

Integer within [0,255]. Default = 128.

Used if Auto-Contrast is off. Sets the contrast threshold for edge strength to be used by the Dynamic Thresholding. Smaller the values more are the edges.

CBinarize.Edge_Aggr.Int

Integer within [0,255]. Default =168.

Used by the Dynamic Thresholding; adjusts the aggressiveness of edge detection when auto-contrast is used.

Threshold.alpha_strength

Integer within [0,255]. Default = 128.

Used to mimic VRS4.5 binarization if both auto-contrast and auto-brightness as well as other advanced features of binarization, such as color analysis, are off. Replaces the value of CBinarize.Edge_Aggr.Int in the Dynamic Thresholding.

VRS.Analyze.Color.Enable

Boolean. Default = 0 (FALSE).

If set to 1, enables independent binarization of BLUE, GREEN, and RED channels of a color image with their combination resulting in the final binary image. Takes about triple amount of time than binarization from a grayscale image.

CBinarize.Wei_Blue_To_Gray.Int

CBinarize.Wei_Green_To_Gray.Int

CBinarize.Wei_Red_To_Gray.Int

If color analysis is off, these 3 integer values determine the relative weights of color channels in the conversion of color to gray. The defaults for BLUE, RED, and GREEN are 4, 7 and 5 respectively. The gray value is calculated as:

GRAY=(4*BLUE+7*GREEN+5*RED)/(4+7+5).

Use these values to strengthen or suppress particular colors in the image. For example, to make green text stronger, set CBinarize.Wei_Green_To_Gray.Int to 0, or to suppress red in the background, set CBinarize.Wei_Red_To_Gray.Int to 1 with the other two weights set to 0.

VRS.Ignore.Pictures.Enable

Boolean. Default = 0 (FALSE).

If set to 1, ignores picture areas during estimation of image brightness and contrast for binarization.

DO_ZONE_MASKING

This capability is used to simplify data extraction from a known document type by removing everything other than several specified zones. The information regarding the zones of interest is communicated using _LoadSetting_, or loaded from and external file. For example, the following parameters can be used to extract the driver license number and name of the holder from one of the license types in Arkansas:

<Property Name="CZoneExtract.Enable" Value="1" Comment="DEFAULT   0" />
	<Property Name="CZoneExtract.UseExactBB" Value="1" Comment="DEFAULT   0" />
	<Property Name="CZoneExtract.NumZones" Value="2" />

	######## Zone 0: DLNumber printed in RED
	<Property Name="CZoneExtract.Color.00.Int" Value="3" Comment="RED_ZONE=3"/>
	<Property Name="CZoneExtract.bbX1.00.Int" Value="1151" />
	<Property Name="CZoneExtract.bbY1.00.Int" Value="260" />
	<Property Name="CZoneExtract.bbX2.00.Int" Value="1484" />
	<Property Name="CZoneExtract.bbY2.00.Int" Value="311" />
	<Property Name="CZoneExtract.LineLabels.00.00.String" Value="DLNumber" />

	######## Zone 1: Name printed in Black
	<Property Name="CZoneExtract.bbX1.01.Int" Value="675" />
	<Property Name="CZoneExtract.bbY1.01.Int" Value="361" />
	<Property Name="CZoneExtract.bbX2.01.Int" Value="1600" />
	<Property Name="CZoneExtract.bbY2.01.Int" Value="408" />
	<Property Name="CZoneExtract.LineLabels.01.00.String" Value="Name" />

In this version of eVRS SDK, Zone Masking expects a color or gray image. The outgoing masked image is binarized by default. To change the bitdepth of the outgoing image, you must specify an appropriate value for the CZoneExtract.Bitdepth.int property. For example:

<Property Name="CZoneExtract.Bitdepth.int" Value="2" Comment="Gray" /> or
	<Property Name="CZoneExtract.Bitdepth.int" Value="3" Comment="Color" />

DO_BACKGROUND_SMOOTHING

Performs smoothing of page background for color and grayscale images.

Property Name

Description and Parameter Range

Color.BackgroundBleach.Aggressiveness

Integer within [0,255]. Default = 128.

Controls the sensitivity of background smoothing. Higher values increase the likelihood that a pixel will be determined to be part of the image background or backgrounds if more than one.

Color.BackgroundBleach.Choice

Note In this property name, there is a leading blank which is still preserved in the name for backward compatibility.

Integer within [1,3].

  • 1 = Automatic (default): All background pixels are smoothed to the same value representing an average of the detected background color. This value works well when there are only minor variations in the background colors.

  • 2 = White: Main background color changes to white.

  • 3 = Black: Main background color changes to black.

DO_BLANK_PAGE_DETECTION

Detects if the page is blank so that it can be deleted by the application. It is capable of ignoring punch holes, and in Duplex mode, ignoring bleed-through from the opposite side.

Note If eVRS cannot detect the page boundaries within the input image, it is impossible to detect either the presence or the absence of any content within it.

Property Name

Description and Parameter Range

VRS.Ignore.Holes.Enable

Boolean. Default = 0 (FALSE).

If set to 1, ignores hole marks in a page for purposes of blank page detection.

CBlkPage.Min_Count_Edge.Int

CBlkPage.Min_Count_Black.Int

Controls the sensitivity of blank page detection.

The range for Min_Count_Edge is [0, 300]. Default = 75.

The range for Min_Count_Black is [0, 90000]. Default = 450.

These are prorated for DPI linearly for Min_Count_Edge and as a square for Min_Count_Black.

Higher values are more likely to determine the page as blank.

VRS.Blank.Page.Content.Sensitivity

Integer within [0,255]. Default = 128.

Controls the sensitivity of blank page detection.

If set to a non-default value, the two CBlkPage.Min_Count_*.Int settings are adjusted from their values: they become lower for sensitivity greater than 128 and higher for sensitivity smaller than 128.

Higher values are more likely to determine the page as non-blank.

DO_COLOR_DETECTION

With color detection, eVRS evaluates each image and determines whether to process the image as color image or black and white.

Property Name

Description and Parameter Range

ColorDetect.DropBGColorForBitonalFG

Boolean. Default = 0 (FALSE).

If set to 1, ignores the color background of a document that is otherwise black and white. For example, with a black and white document printed on color paper, you may prefer the background color to be ignored when color detection is performed on the document.

ColorDetect.SmallObjEnable

Boolean. Default = 0 (FALSE).

If set to 1, allows detection of small areas of color such as a date stamp or small amounts of highlighter text, so it is not treated as black and white.

ColorDetect.SmallObjAggressiveness

Integer within [0,255]. Default = 128.

Specifies the small color area sensitivity; lower values decrease the likelihood of detecting small amounts of color.

DO_COLOR_DROPOUT

This keyword triggers the analysis of the document determining the color of the main background of the page and also the most numerous of the foreground colors. This is assumed to be the color of the form that should be dropped out. See the following table for the most important modifiable parameters.

Property Name

Description and Parameter Range

CColrDrp.Slider_Pos.Int

Integer within [0,255]. Default = 128.

Larger values increase the sensitivity and result in more expansive dropout.

DO_SKEW_CORRECTION_PAGE and DO_SKEW_CORRECTION_ALT

These keywords trigger detection of content skew. They activate the processing module which corrects the skew of the original image. If the page is chopped by image frame, skew correction performed on scanned images have to fill these missing areas, and in the absence of real data they are filled with median color of image background (the background of the scanner). However, some of the areas of the image resulting from skew correction are still undefined if the angle of skew correction is different from the page skew. For example if page with skewed text is deskewed to content or a corner of the page was chopped by the image frame. By default, this color matches the average color of the scanner background. You can modify and provide the desired color by configuring the following settings:

Property Name

Description and Parameter Range

CSkwCor.Fill_Color_Scanner_Bkg.Bool

Boolean. Default = 1 (TRUE).

If set to 0, uses provided color.

CSkwCor.Fill_Color_Red.Byte

CSkwCor.Fill_Color_Green.Byte

CSkwCor.Fill_Color_Blue.Byte

Integers within [0,255]. Default = 0 (black) for all of them. Used only if CSkwCor.Fill_Color_Scanner_Bkg.Bool is set to FALSE.

DO_SCANNER_BKG_FILL

This string activates the processing module which fills all image background areas left around the page that are connected to the outside of the image frame with a color or gray level defined by the settings.

Property Name

Description and Parameter Range

CSBkgFil.Fill_Type.Int

This is the most important property. It determines whether the fill color be white, black, median page color, or some predefined color provided by the user.

Integer within [1,4].

Where 1 = WHITE; 2 = BLACK; 3 = PAGE; 4 = PREDEFINED

Default = 3 (PAGE).

CSBkgFil.Fill_Color_Red.Byte

CSBkgFil.Fill_Color_Green.Byte

CSBkgFil.Fill_Color_Blue.Byte

CSBkgFil.Fill_Color_Gray.Byte

Integers within [0,255]. Default = 255 (white) for all of them. Used only if CSBkgFil.Fill_Type.Int is set to PREDEFINED.

Note
  • If the page is chopped by image frame, skew correction performed on scanned images have to fill these missing areas, and in the absence of real data they are filled with median color of image background (the background of the scanner). However, some of the areas of the image resulting from skew correction are still undefined if the angle of skew correction is different from the page skew, for example if page with skewed text is deskewed to content. These outside areas are originally set to black, but if DO_SCANNER_BKG_FILL is set to TRUE they are also filled with image background to match the color that later is replaced by background fill.
  • If the page fills the frame of the scanned image fully and leaves no statistically meaningful background to analyze, the image background values are set to match the middle of the known range of background specified for the scanner in its XML file.

DO_EDGE_CLEANUP

This string activates the processing module which cuts a small frame around the final image in order to clean the fringes of the detected page. By default this frame is 8 pixels thick regardless of image resolution, but can be adjusted and prorated for DPI.

Property Name

Description and Parameter Range

EdgeCleanup.enable

Boolean. Default = 0 (FALSE) for scanner input, 1 (TRUE) for camera input. The following two parameters are irrelevant if this parameter is set to FALSE.

CBrdCrop.Crop_Dist.Int

Integer specifying frame size. Default = 8 pixels.

CBrdCrop.Crop_Dist_Prorate_for_DPI.BOOL

Boolean. Default = 0 (FALSE).

If set to 1 (TRUE) prorates CBrdCrop.Crop_Dist.Int by the ratio of image DPI to 200.

Note
  • Specify both _DoSkewCorrectionPage_ and _DoCropCorrection_ for _DoEdgeCleanup_ to have any effect.
  • If Edge Cleanup is performed, the resulting processed image becomes a little smaller while its resolution stays unchanged. When image dimensions are known, the height and/or width of the final image comes is just under specified values. To keep this discrepancy small, set CBrdCrop.Crop_Dist_Prorate_for_DPI.BOOL to TRUE; then the default 8 pixels is equivalent to 8/200 = 0.04”.

DO_REGION_CLIP

This string activates a branch in the Edge Cleanup processing module which allows the user to clip a region of interest from the processed image. This branch is triggered if the operations string includes the token _DoRegionClip_ followed by the desired x-offset, width, y-offset, and height in pixels and in this order, all separated by blanks. Example: _DoRegionClip_15 350 25 780.

You can achieve the same result by setting the value of the VRS.ManualClip.Enable parameter to 1, and values of VRS.ManualClip.Top, VRS.ManualClip.Width, VRS.ManualClip.Left and VRS.ManualClip.Height parameters to 15, 350, 25 and 780 respectively.

Note
  • Mostly, users decide to specify region clip depending on the resulting processed image, usually after the default border cropping performed by Edge Cleanup. To match the user’s expectations, the region clip parameters are applied from the top-left corner of the inner frame specified by the Edge Cleanup settings.
  • CBrdCrop.Border_Crop_Error_Action.Int - This optional parameter allows the user certain flexibility dealing with erroneous parameter values, such as, specifying a region too big for the processed image. Interpretable values of this parameter are:

    • 0 - Abandon Region Clip if it goes out of image (the default).

    • 1 - Return an error if Region Clip goes out of image.

    • 2 - Adjust Region Clip if necessary to fit within the image.

Color/Grayscale brightness adjustment

Property Name

Description and Parameter Range

CColorAdj.Enable

Boolean. Default = 0 (FALSE).

If set to 1 (TRUE) activates this module.

CColorAdj.Slider_Pos.Int

Integer within [0,100]. Default = 45. Darkens or brightens the color or grayscale images. The neutral value is 36. Larger values produce brighter images; lower values produce darker images.

FINAL IMAGE AND ITS PARAMETERS

The FINAL_IMAGE_SMALLER_PIXEL_DIM, FINAL_IMAGE_LARGER_PIXEL_DIM, and/or FINAL_IMAGE_DPI strings trigger a new module that allows the user to differentiate the final image from the processed image. This module works at the very end of image processing chain in eVRS and affects both sides of an image if scanned in duplex.

This functionality is useful in scenarios such as the following:

  • In a case when the resolution of the image necessary for reliable processing and extraction of metadata is higher than the one sufficient for archival or desired for transmission from a device.

  • If the final image is used as an input to another application with precise requirements for its height or width in pixels.

The overall logic guiding the internal behavior of this module is as follows:

  1. The module is activated if at least one of the parameters (FINAL_IMAGE_SMALLER_PIXEL_DIM, FINAL_IMAGE_LARGER_PIXEL_DIM, or FINAL_IMAGE_DPI) is specified and is different from the corresponding parameter of the processed image.

  2. Once a parameter is specified, this module determines the coefficient of the proportional scaling of the processed image. For example, if the processed image is in landscape and its width, height and resolution are 2009 pixels, 1237 pixels and 400 DPI respectively, and the value of FINAL_IMAGE_LARGER_PIXEL_DIM is 1000, then the scaling coefficient is the ratio of 1000 over 2009 resulting in 0.49776. The final image turns out to be 1000 pixel width, 615 pixel height, and 199 DPI.

  3. If both FINAL_IMAGE_SMALLER_PIXEL_DIM and FINAL_IMAGE_LARGER_PIXEL_DIM are specified, the horizontal and vertical scaling are done separately, and with potentially different coefficients. In the example above, if additionally the specified value of FINAL_IMAGE_ SMALLER _PIXEL_DIM is 600, then the horizontal scaling coefficient is the ratio of 1000 over 2009 resulting in 0.49776 and the vertical scaling coefficient is the ratio of 600 over 1237 resulting in 0.48504. The final image turns out to be 1000 pixel width, 600 pixel height, 199 horizontal DPI and 194 vertical DPI.

  4. If the value of FINAL_IMAGE_DPI is specified in addition to one or both pixel dimensions, the scaling is based on pixel dimension(s) as described above, but both horizontal and vertical DPI values are set to the specified value. In the example above, if additionally the specified value of FINAL_IMAGE_DPI is 200, then both horizontal and vertical DPI values (calculated as 199 and 194 respectively) are replaced by 200.

Note The flexibility of this module can have unintended confidences, for example, the difference between the specified value of the final DPI and the values calculated based on pixel dimensions can be huge, probably, because it allows independent horizontal and vertical scaling and does not prevent corresponding coefficients from becoming very different from each other.

IMAGING_DEVICE_TYPE

The keyword IMAGING_DEVICE_TYPE (actual string: _DeviceType_) followed by an integer 2, as in _DeviceType_2 can be used with PC-based systems to set the best processing environment for camera images. This mode activates DPI estimation, rectangularization, correction for illumination, the use of auto-contrast, auto-brightness, and Intelligent cleanup during binarization, and a number of other settings to produce an optimal resulting image. If processing a scanner image, use _DeviceType_0. This setting is included by default.