REGION_SPLIT Function
Splits homogeneous regions in an image, where the homogeneity is based on the region range.
Usage
result = REGION_SPLIT(image[, threshold])
Input Parameters
imageA 2D or 3D array of any data type except string or complex having homogeneous regions containing an image; image, row or pixel-interleaved images; or a volume.
threshold(optional) A floating-point scalar threshold value used to determine whether or not a pixel belongs to a given region.
(Default: 0.1).
Returned Value
result—A 2D or 3D byte array containing filled regions.
Keywords
Intleave—A scalar string indicating the type of interleaving of 3D image arrays. Valid strings and the corresponding interleaving methods are:
*'pixel'—The input array arrangement is (pxy) for p  pixel-interleaved images of x-by-y.
*'row'—The 3D image array arrangement is (xpy) for p  row-interleaved images of x-by-y.
*'image'—The 3D image array arrangement is (xyp) for p  image-interleaved images of x-by-y.
*'volume'—The input image array is treated as a single entity.
Max_IterSpecifies the maximum number of iterations used to split a region. (Default: 1000)
Discussion
REGION_SPLIT works best on images with separate square or rectangularly shaped regions. It is a recursive algorithm that subdivides the image into smaller and smaller units until either a homogeneous region is left or the maximum number of iterations has been reached.
 
note
Because the algorithm is recursive, Max_Iter should be kept reasonably small to avoid stack overflow problems.
Example
; Find separate regions using splitting technique.
image = IMAGE_READ(!IP_Data + 'objects.tif')
region_image = REGION_SPLIT(image('pixels'), 1.0)
TEK_COLOR
; Display the region image.
TVSCL, region_image
See Also