Accusoft ImagXpress 13
Binarize Method
An enumBinarizeMode value which determines the mode to use to binarize the image.

An integer value that controls background sensitivity.

This value should generally be as high a value as possible without exceeding the brightness of any part of the background.

Black noise appearing in the background can generally be eliminated by lowering this value.

Valid range is 0 to 255.

Setting this value is applicable when the enumeration eIPBinMode = BIN_MODE_QUICK_TEXT (0) only.

An integer value that controls letter and figure thickness.

A suggested value for this parameter is (lIPBinLowThreshold + 255)/2.

Letters and figures that render too thick can generally be improved by lowering this value.

Letters and figures that render too thin can generally be improved by raising this value and/or lIPBinLowThreshold.

Valid range is lIPBinLowThreshold to 255.

Setting this value is applicable when the enumeration eIPBinMode = BIN_MODE_QUICK_TEXT (0) only.

An integer value that evaluates to the orientation of the halftone grid from the horizontal, measured in degrees clockwise.

Valid range is 0 to 360.

Setting this value is applicable when the enumeration eIPBinMode = BIN_MODE_PHOTO_HALFTONE (1) only.

An integer value that evaluates to the distance from the center of a black dot in the halftone grid to the nearest white dot, measured in pixels.

Valid range is 1 to 32.

Setting this value is applicable when the enumeration eIPBinMode = BIN_MODE_PHOTO_HALFTONE (1) only.

An integer value that evaluates to the shape of the halftone grid.

Valid range is -256 to 256.

At the extreme range values, -256 and 256, the grid becomes linear.

At the midpoint, 0, the grid consists of circles/squares.

Intermediate values give intermediately shaped elliptical grid dots.

Setting this value is applicable when the enumeration eIPBinMode = BIN_MODE_PHOTO_HALFTONE (1) only.

An integer value that evaluates to local contrast enhancement.

Valid range is 0 to 255.

Setting lIPBinLCEFactor = 0 means local contrast is not performed.

Values from 1 to 255 control the sensitivity of local contrast enhancement to faint features; lower values yield less sensitivity.

This preprocessing operation increases the contrast in each region of the image.

When used as a prelude to binarization, usually by setting eIPBinMode = Quick_Text (0), it increases the sensitivity of the binarization to detail in all regions of the image.

enumBinarizeBlur enumeration used to determine what type of blur functionality to invoke during the Binarize method.
Description
Converts 8-bit and 24-bit images into a 1-bit monochrome or 8-bit grayscale output image, respectively.
Syntax
Visual Basic
Public Sub Binarize( _
   ByVal eIPBinMode As enumBinarizeMode, _
   ByVal lIPBinLowThreshold As Long, _
   ByVal lIPBinHighThreshold As Long, _
   ByVal lIPBinGridAngle As Long, _
   ByVal lIPBinGridPitch As Long, _
   ByVal lIPBinEccentricity As Long, _
   ByVal lIPBinLCEFactor As Long, _
   ByVal lIPBinBlur As enumBinarizeBlur _
) 
Parameters
eIPBinMode
ValueDescription
BIN_MODE_GRAYThe goal of this mode is to generate an 8-bit grayscale image from the input. Useful for scaling to gray before another Binarize call with more options.
BIN_MODE_PHOTO_HALFTONEThe goal of this mode is to generate a 1-bit image from color or grayscale photographic-type images, reproducing the shades of gray in the image by black and white dots of various sizes. The angle and pitch of the halftone grid are controllable.
BIN_MODE_QUICK_TEXTQuickText mode is to produce a clean 1-bit image for viewing and storage. This is generally used for document type images consisting of dark text and lines on a white or gray background. The result of the operation is to replace the text and lines in the image by black and the background by white. The controlling parameters for QuickText mode are: IPbinLowThreshold, IPbinHighThreshold, IPbinLCEFactor and IPbinBlur.
An enumBinarizeMode value which determines the mode to use to binarize the image.
lIPBinLowThreshold

An integer value that controls background sensitivity.

This value should generally be as high a value as possible without exceeding the brightness of any part of the background.

Black noise appearing in the background can generally be eliminated by lowering this value.

Valid range is 0 to 255.

Setting this value is applicable when the enumeration eIPBinMode = BIN_MODE_QUICK_TEXT (0) only.

lIPBinHighThreshold

An integer value that controls letter and figure thickness.

A suggested value for this parameter is (lIPBinLowThreshold + 255)/2.

Letters and figures that render too thick can generally be improved by lowering this value.

Letters and figures that render too thin can generally be improved by raising this value and/or lIPBinLowThreshold.

Valid range is lIPBinLowThreshold to 255.

Setting this value is applicable when the enumeration eIPBinMode = BIN_MODE_QUICK_TEXT (0) only.

lIPBinGridAngle

An integer value that evaluates to the orientation of the halftone grid from the horizontal, measured in degrees clockwise.

Valid range is 0 to 360.

Setting this value is applicable when the enumeration eIPBinMode = BIN_MODE_PHOTO_HALFTONE (1) only.

lIPBinGridPitch

An integer value that evaluates to the distance from the center of a black dot in the halftone grid to the nearest white dot, measured in pixels.

Valid range is 1 to 32.

Setting this value is applicable when the enumeration eIPBinMode = BIN_MODE_PHOTO_HALFTONE (1) only.

lIPBinEccentricity

An integer value that evaluates to the shape of the halftone grid.

Valid range is -256 to 256.

At the extreme range values, -256 and 256, the grid becomes linear.

At the midpoint, 0, the grid consists of circles/squares.

Intermediate values give intermediately shaped elliptical grid dots.

Setting this value is applicable when the enumeration eIPBinMode = BIN_MODE_PHOTO_HALFTONE (1) only.

lIPBinLCEFactor

An integer value that evaluates to local contrast enhancement.

Valid range is 0 to 255.

Setting lIPBinLCEFactor = 0 means local contrast is not performed.

Values from 1 to 255 control the sensitivity of local contrast enhancement to faint features; lower values yield less sensitivity.

This preprocessing operation increases the contrast in each region of the image.

When used as a prelude to binarization, usually by setting eIPBinMode = Quick_Text (0), it increases the sensitivity of the binarization to detail in all regions of the image.

lIPBinBlur
ValueDescription
BIN_BLUR_GAUSSIANBlur image before local contrast enhancement/binarize.
BIN_BLUR_NONEDo not blur.
BIN_BLUR_SMARTRemove dither-like artifacts introduced into many images already binarized to 1-bit by other software or hardware operations.
enumBinarizeBlur enumeration used to determine what type of blur functionality to invoke during the Binarize method.
Remarks

For 1-bit output, this method modifies the color palette associated with the image, setting it to two colors, with black as color 0 and white as color 1.

This method sets the following properties with the values it used to binarize the image:

Note: These are the same properties that the AutoBinarize method sets.

See Also

ImagXpress Object  | ImagXpress Members  | AutoBinarize Method  | Binarization  | Document Image Processing  | Image Processing

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback