TIEVisionImage.getLineMask
Declaration
function getLineMask(directions: TIEVisionLineDirections = ievLinesBoth; minLength: int32_t = 0; maxThickness: int32_t = 0): TIEVisionImage; safecall;
Description
Returns an 8-bit gray mask of the straight horizontal and vertical lines of a document image (such as form and table lines and underlines): 255 (white) for line pixels and 0 (black) elsewhere.
The parameters are the same as
removeLines. The current image is not changed.
The mask can be used to find the cells of a table (e.g. with
findContours), or to show which lines
removeLines would remove.
Demo
| Demos\ImageEditing\EveryMethod\EveryMethod.dpr |
Example
// Show the lines of a form
img := ImageEnView1.IEBitmap.GetIEVisionImage().getLineMask();
ImageEnView1.IEBitmap.AssignIEVisionImage( img );
ImageEnView1.Update();
See Also
◼removeLines