Skip to content
Prev 622 / 7420 Next

Need an algorithm to identify spatial clusters

Hi Mark,

What you are looking for is a connected component algorithm.  The algorithm
should receive a binary matrix (i.e. 0's and 1's for fire/no fire) and delineate
isolated groups of pixels following either a 4 or 8 neighbor rule.  Some time
ago I coded a function to do this (I couldn't find a package with this
functionality), and I would be happy to pass it along.  My function wasn't
extremely efficient but worked well enough to process thousand of matrices (each
100x100) in a relatively short time.  Let me know if you need it.

Julian Burgos, PhD
University of Washington
On Tue, 14 Apr 2009, Mark Andersen wrote: