This section covers the Segmentation Methods of the Document Imaging OCX. The result of the segmentation of an image is a same sized image, where all of the pixel values represents a region label. The region labels are numbers starting from 1. The image segmentation algorithms does not return a DIB like filter methods do, because of the large number of possible matrix values (region labels). Image segmentation algorithms returns WORD type matrices containing the output values. The matrices are allocated by the algorithms, and the user should use the implemented release methods to deallocate the memory. Due to the WORD type, the maximum number of the distinguishable regions is 65535. If the number of generatable regions is over than the maximum, the regions labeled above the maximum will generate only one large region.