Click or drag to resize

DocumentSetDropoutColorWeights Method

This method sets the weights used to calculate the gray-level intensity values from the color components during binarization. By default the value of these weights are (77, 150, 29).

Namespace:  Kofax.OmniPageCSDK.IproPlus
Assembly:  Kofax.OmniPageCSDK.IproPlus (in Kofax.OmniPageCSDK.IproPlus.dll) Version: 1.0.0.0
Syntax
public void SetDropoutColorWeights(
	int Red,
	int Green,
	int Blue
)

Parameters

Red
Type: SystemInt32
Green
Type: SystemInt32
Blue
Type: SystemInt32
Remarks

By setting the weights before preprocessing and binarization, all parts of the image of a defined drop-out color can be removed from the binary image. This is useful for forms that are printed in a particular color. In this way the scanned images of filled forms can be binarized and the BW image will not contain the preprinted text or elements, leaving only the responses (the form data).

For example, using (1, 0, 0) as weights, any red preprinted text can be dropped from the white background. In practice, the best weights can be determined using the DetectDropoutOutColorWeights method of the Page object. To process drop-out color images the CNV_GLOBAL binarization method is recommended. These settings affect only primary image conversion (i.e. conversion during loading, see Conversion property) and the ImagePreprocess method. The WRed, WGreen and WBlue parameters contain the appropriate dropout color weights.

If automatic deskewing is required, it should be called before the BW image is generated, since the deskewing is likely to need text lines that could be removed by applying the drop-out color.

See Also