Accusoft.ImagXpress13.Net
Binarize Method




A BinarizeMode which determines the mode to use to binarize the image.

An integer value which controls background sensitivity.

Used in BinarizeMode.QuickText mode only.

The range is from 0 to 255.

This value should generally be as high 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.

Setting this value is applicable when the mode parameter is BinarizeMode.QuickText

An integer value which represents the high threshold which controls letter and figure thickness.

Used in BinarizeMode.QuickText mode only.

This value must be between lowThreshold and 255. A suggested value for this parameter is (lowThreshold + 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.

The range is from lowThreshold to 255.

An integer value which represents the orientation of the halftone grid from the horizontal, measured in degrees clockwise.

The range is from 0 to 360.

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

The range is from 1 to 32.

An integer value which represents the shape of the halftone grid.

The range is from -256 to 256. At the extreme 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.

An integer value which represents the local contrast enhancement.

The range is from 0 to 255. Setting this value to 0 and 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 pre-processing operation increases the contrast in each region of the image. When used as a prelude to binarization, usually by setting Mode = QuickText, it increases the sensitivity of the binarization to detail in all regions of the image.

A BinarizeBlur value which determines the type of blur to invoke during the binarize method.
Converts 8-bit and 24-bit images into a 1-bit monochrome or 8-bit grayscale output image, respectively.
Syntax
'Declaration
 
Public Sub Binarize( _
   ByVal mode As BinarizeMode, _
   ByVal lowThreshold As Integer, _
   ByVal highThreshold As Integer, _
   ByVal gridAngle As Integer, _
   ByVal gridPitch As Integer, _
   ByVal eccentricity As Integer, _
   ByVal lceFactor As Integer, _
   ByVal blur As BinarizeBlur _
) 
'Usage
 
Dim instance As Processor
Dim mode As BinarizeMode
Dim lowThreshold As Integer
Dim highThreshold As Integer
Dim gridAngle As Integer
Dim gridPitch As Integer
Dim eccentricity As Integer
Dim lceFactor As Integer
Dim blur As BinarizeBlur
 
instance.Binarize(mode, lowThreshold, highThreshold, gridAngle, gridPitch, eccentricity, lceFactor, blur)
public void Binarize( 
   BinarizeMode mode,
   int lowThreshold,
   int highThreshold,
   int gridAngle,
   int gridPitch,
   int eccentricity,
   int lceFactor,
   BinarizeBlur blur
)
public: void Binarize( 
   BinarizeMode mode,
   int lowThreshold,
   int highThreshold,
   int gridAngle,
   int gridPitch,
   int eccentricity,
   int lceFactor,
   BinarizeBlur blur
) 
public:
void Binarize( 
   BinarizeMode mode,
   int lowThreshold,
   int highThreshold,
   int gridAngle,
   int gridPitch,
   int eccentricity,
   int lceFactor,
   BinarizeBlur blur
) 

Parameters

mode
A BinarizeMode which determines the mode to use to binarize the image.
lowThreshold

An integer value which controls background sensitivity.

Used in BinarizeMode.QuickText mode only.

The range is from 0 to 255.

This value should generally be as high 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.

Setting this value is applicable when the mode parameter is BinarizeMode.QuickText

highThreshold

An integer value which represents the high threshold which controls letter and figure thickness.

Used in BinarizeMode.QuickText mode only.

This value must be between lowThreshold and 255. A suggested value for this parameter is (lowThreshold + 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.

The range is from lowThreshold to 255.

gridAngle

An integer value which represents the orientation of the halftone grid from the horizontal, measured in degrees clockwise.

The range is from 0 to 360.

gridPitch

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

The range is from 1 to 32.

eccentricity

An integer value which represents the shape of the halftone grid.

The range is from -256 to 256. At the extreme 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.

lceFactor

An integer value which represents the local contrast enhancement.

The range is from 0 to 255. Setting this value to 0 and 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 pre-processing operation increases the contrast in each region of the image. When used as a prelude to binarization, usually by setting Mode = QuickText, it increases the sensitivity of the binarization to detail in all regions of the image.

blur
A BinarizeBlur value which determines the type of blur to invoke during the binarize method.
Remarks

Binarize is often done to clean up an image (e.g. in preparation for OCR), or to create an image effect.

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

Important: These are the same properties that AutoBinarize sets.

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.

See Also

Reference

Processor Class
Processor Members

 

 


©2015. Accusoft Corporation. All Rights Reserved.

Send Feedback