M-File Help: igraphseg | View code for igraphseg |
Graph-based image segmentation
L = igraphseg(im, k, min) is a graph-based segmentation of the color image im (HxWx3). L (HxW) is an image where each element is the label assigned to the corresponding pixel in im. k is the scale parameter, and a larger value indicates a preference for larger regions, min is the minimum region size (pixels).
L = igraphseg(im, k, min, sigma) as above and sigma is the width of a Gaussian which is used to initially smooth the image (default 0.5).
[L,nreg] = igraphseg(im, k, min, sigma) as above but nreg is the number of regions found.
im = iread('58060.jpg'); [labels,maxval] = igraphseg(im, 1500, 100, 0.5); idisp(labels)
"Efficient graph-based image segmentation", P. Felzenszwalb and D. Huttenlocher, Int. Journal on Computer Vision, vol. 59, pp. 167–181, Sept. 2004.
Pedro Felzenszwalb, 2006.
© 1990-2012 Peter Corke.