virtual L_INT LBitmap::RakeRemove (bAuto, pRakeRemove, pDstRect, nRectCount, uFlags = 0)
Removes the isolated data rakes from 1-bit black and white images.
Flag that indicates whether to automate the rakes removal. Possible values are:
|TRUE||Automate the rakes removal.|
|FALSE||Do not automate the rakes removal.|
Pointer to the RAKEREMOVE structure that LEADTOOLS uses to perform the rake removal operation.
Pointer to an array of Windows RECT structure specifying the areas where the rakes are in the image. If the parameter is passed as NULL, the function will look for rakes in the entire image.
Number of rectangles specified which equals to the number of rakes in an image or more if one rectangle contains more than one rake. If the parameter pDstRect is passed as NULL this parameter should be passed as 0.
Reserved for future use. Must be 0.
|SUCCESS||The function was successful.|
|< 1||An error occurred. Refer to Return Codes.|
A rake is a horizontal line with vertical partitioning lines pointing upwards attached to it. Rakes are used to contain data (digits or characters) filled individually and separated by the spaces created by the partitioning vertical lines.
A typical rake looks like the following:
(Document) This function removes data rakes from scanned text documents. If the rakes pass through text, the pRakeRemove parameter can be configured to remove or preserve the text. The behavior of this function can be further modified by using its callback.
If a region is selected, only the selected region will be changed. If no region is selected, the whole image will be processed.
For rake structures that are inside or part of tables, the user can select the rake structure and the rake structure only- via region (preferably a rectangular region) and call the function on that region.
This function works only on 1-bit black and white images.
This function does not support 32-bit grayscale images. It returns the error code ERROR_GRAY32_UNSUPPORTED if a 32-bit grayscale image is passed to this function.
This function does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this function.
This example removes rakes that are at least 50 pixels in length
and no more than 3 pixels in width
The rakes can have gaps up to one pixel in length.
The callback member function is used to show the length of each removed rake
The callback member function does NOT receive a Windows region.
class LRakeRemoveBitmap : public LBitmap
virtual L_INT RakeRemoveCallBack(L_INT32 iLength
L_INT LRakeRemoveBitmap::RakeRemoveCallBack(L_INT32 iLength)
L_INT LBitmap__RakeRemoveExample(LBitmapWindow *pBitmapWindow)
L_BOOL bAuto = FALSE;
rr.nMinLength = 50;
rr.nMaxWidth = 3;
rr.nMinWallHeight = 10;
rr.nMaxWallPercent = 25;
rr.nMaxMidteethLength = 20;
rr.nMaxSideteethLength = 25;
rr.nGaps = 1;
rr.nVariance = 2;
rr.nTeethSpacing = 5;
pBitmapWindow->RakeRemove( bAuto, &rr, NULL, 0, 0);
Medical Web Viewer .NET
.NET, Java, Android, and iOS/macOS Assemblies
C API/C++ Class Libraries