components, an Octave code which organizes contiguous nonzero cells into labeled components, for a 1D, 2D, or 3D array. This code has uses in image analysis and percolation simulation.
The information on this web page is distributed under the MIT license.
components is available in a C version and a C++ version and a Fortran77 version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.
bwlabel_test, an Octave code which calls bwlabel(), which is given a matrix, and organizes the nonzero values into labeled components, using 4-way or 8-way connectivity. For Octave, bwlabel() is part of the image() package.