Functions > Image Processing > Segmentation > Region Growing
  
Region Growing
reg_grow(M, x_gridsize, y_gridsize, num_regions)—Performs the piecewise-constant energy-based region growing segmentation of M into num_regions regions, using initial grid spaced by x_gridsize along the x-axis and y_gridsize along the y-axis.
This function divides an image into several homogenous connected regions using a region-growing algorithm. Adjacent regions are merged recursively until the image has the desired number of regions. Region-based segmentation is used to group regions in an image that bear homogeneous properties, such as intensity and texture.
The key for region-based segmentations is to select the best criterion for merging or splitting. The algorithm takes a large number of regions and recursively merges adjacent regions based on the homogeneity of the two regions and the boundary length separating the two regions. Regions with similar average intensities separated by short boundaries are more likely to be merged with each other compared to regions differing widely in intensity or regions separated by long boundaries. This region merging procedure stops when the desired number of regions, num_regions, is found.
Arguments
M is an image matrix.
x_gridsize, y_gridsize are integers greater than or equal to 2, and divisors of the image size.
num_regions is an integer greater than or equal to 2.