Auto-Segmentation

Calling the LSegment::MrcSegmentBitmap function will perform automatic segmentation using the LEADTOOLS MRC engine. LEADTOOLS segments the bitmap, classifying the segments as background, text, grayscale or picture. Use the SEGMENTATIONOPTIONS structure to control the segmentation process.

It is also possible to use the LSegment::MrcSegmentBitmapExt function to perform automatic segmentation.

To enumerate the segments, call LSegment::MrcEnumSegments. This function provides the segment coordinates, types and their IDs. To modify a segment type or its coordinates, use the LSegment::MrcSetSegmentData function. This function will update only one segment’s data each time it is called. To delete a segment, call the LSegment::MrcDeleteSegment function. To combine two segments, call the LSegment::MrcCombineSegments function. To copy the segmentation handle and data, call the LSegment::MrcCopySegmentationHandle function.

Save the segmentation handle and data to a file by calling the LSegment::MrcSaveSegmentation function. To load the saved segmentation handle and data from a file, call the LSegment::MrcLoadSegmentation function.