TIEVisionImage.removeBorderComponents
Declaration
function removeBorderComponents(connectivity: int32_t = 8): TIEVisionImage; safecall;
Description
Removes every dark component that touches the edge of the image (via Leptonica), such as the black borders of scanned pages and punch holes, so they are not read as characters.
The image is binarized with Otsu first. Returns a new black and white 8-bit gray image. The current image is not changed.
Note: Text that touches the edge of the image is also removed, so do not use this on images cropped tightly around text.
| Parameter | Description |
| connectivity | 4 or 8 |
Example
// Remove dark areas touching the edge of a document (e.g. scanner borders)
ImageEnView1.IEBitmap.AssignIEVisionImage( ImageEnView1.IEBitmap.GetIEVisionImage().removeBorderComponents( 8 ));
ImageEnView1.Update(); // Show changes in our viewer
See Also
◼removeSpeckles
◼prepareForOCR