|ImageEn, unit imageenproc
Declarationprocedure RemoveIsolatedPixels(NoiseColor: Integer; PixelsCount: Integer; CheckDiagonals: Boolean = true);
Removes all groups of isolated pixels within a black and white image.
|Parameter ||Description |
| NoiseColor || Specifies the "text" color, 0 is black and 1 is white (for example if you have a document where the text is black NoiseColor must be 0, otherwise it must be 1) |
| PixelsCount || Specifies the maximum size of isolated pixel block size to remove (e.g. 1 for single pixels, 2 for a pair of isolated pixels, etc.) |
| CheckDiagonals || If true, diagonal pixels as treated as connected (i.e. pixels that touch diagonally will not be considered isolated) |
- Only works with black & white images (1bit).
- Big PixelCount values may slow down process and cause out of memory exceptions
| ||Demos\ImageEditing\EveryMethod\EveryMethod.dpr |
Example// removes single isolated pixels (black pixels)
// removes groups of two isolated pixels (black pixels)