IN_DespeckleEx

image\bltlrgsq_shg.gif  Editions image\bltlrgsq_shg.gif  Related Functions image\bltlrgsq_shg.gif  Example

The IN_DespeckleEx function cleans up a bilevel raster by filling in white holes in black areas, and by removing clusters of black pixels in white areas. The black or white speckle to remove must be of a specified size or less, and it must fit within a specified region. The result either is placed in a new window or overwrites the original, depending on the overwrite raster flag.

Syntax

IN_DespeckleEx( docwinID, blkSpeckleSize, blkBoundBox, whtSpeckleSize, whtBoundBox, mode, pNewDocwinID )

Input Parameters

Values

Meaning

IN_DOCWIN docwinID

0 | docwinID

active | specific

SHORT blkSpeckleSize

0 to 64009, inclusive

size of the black cluster of connected pixels to remove. Example See Remarks.

SHORT blkBoundBox

0 to 253, inclusive

size of one side of the square within which the black cluster must fit

SHORT whtSpeckleSize

0 to 64009, inclusive

size of the white cluster of connected pixels to fill in. See Remarks.

SHORT whtBoundBox

0 to 253, inclusive

size of one side of the square within which the white cluster must fit

SHORT mode

IN_DESP_BLACK_ONLY (0) black (despeckle) only

IN_DESP_WHITE_ONLY (1) white (hole fill) only

IN_DESP_BLACKWHITE (2) black then white

IN_DESP_WHITEBLACK (3) white then black

 

 

 

 

 

 

Output Parameters

Meaning

IN_DOCWIN_PTR pNewDocwinID

pointer to the new document window. See Remarks.

Remarks

The blkSpeckleSize values cannot be greater than the square of the blkBoundBox size, and the whtSpeckleSize cannot be greater than the square of the whtBoundBox size.

If the overwrite raster flag is set to on, pNewDocwinID is the original objectID. The value is NULL if the function fails.

Release information

Added to Imagenation for Windows in Release 4.30.

As of Release 5.1, also available in Imagenation for UNIX.

See also

Despeckling an image

Improving raster images