bwlabel_test, a MATLAB code which calls bwlabel(), which is a built-in MATLAB function, which is given a binary matrix, and organizes the 1 values into labeled clusters, using 4-way or 8-way connectivity.
The computer code and data files described and made available on this web page are distributed under the MIT license
bwlabel_test is available in a MATLAB version.
image_components, a MATLAB code which seeks the connected nonzero or nonblack components of an image or an integer array.
percolation_simulation, a MATLAB code which simulates a percolation system. A rectangular region is decomposed into a grid of MxN squares. Each square may be porous or solid. We are interested in a path of porous squares connecting the top and bottom, or the left and right boundaries. The original MATLAB code was written by Ian Cooper.