AutoSegment method (LEADMrc Control)

C++ Builder Example

Delphi Example

 

Builder Syntax

int AutoSegment(TLEADImage* LEADImg, int nMinWidth, int nMinHeight);

Delphi Syntax

Function AutoSegment(LEADImg: TLEADImage; nMinWidth: L_INT; nMinHeight: L_INT): L_INT;

Overview

Refer to Working with the LEADMrc Control.

Remarks

(Document/Medical only) Automatically segments the given LEADImage's bitmap.

Call this method to segment the bitmap automatically. LEADTOOLS segments the bitmap into blocks nMinWidth wide by nMinHeight long. Segments are assigned a type according to the number of colors they have (those with a few colors become text segments and those with many colors become picture segments). Segments with the same type are combined.

Call the StartSegmentation method before using any of the segmentation methods. When the LEADMrc object is no longer needed, free it by calling the StopSegmentation method.

Set the following properties before calling the AutoSegment method to control the segmentation process:

CombineFactor property

CombineFlags property

ImageType property

Sensitivity property

If the AutoSegment method is called with the ImageType property set to IMAGETYPE_SCANNED (the default value), noise is removed from the image before segmenting it. Set the ImageType property to IMAGETYPE_COMPUTERGENERATED if noise does not need to be removed from the image.

The following properties are used solely by the AutoSegment method:

Sensitivity property

ImageType property

See Also

Elements

BaseBackColor property, BaseForeColor property, CombineFactor property, CombineFlags property, Error property, ErrorMsg property, Grayscale2BitCoder property, Grayscale8BitCoder property, Grayscale8BitQFactor property, ImageType property, MaskCoder property, MRCPagesCount property, PictureCoder property, PictureQFactor property, Sensitivity property, Text2BitCoder property, CombineSegments method, CopySegmentationData method, CreateNewSegment method, DeleteSegment method, EnumSegments method, GetPagesCount method, Load method, LoadSegmentation method, Save method, SaveSegmentation method, SaveT44 method, SetSegmentData method, StartSegmentation method, StopSegmentation method, OnEnumSegments event

Topics

MRC Bitmap Functions: Performing Automatic Segmentation