[R-sig-Geo] enumerate grid clusters/patches with size of contiguous cluster

Andrew Niccolai andrew.niccolai at yale.edu
Wed Mar 12 18:12:23 CET 2008


If you aren't dedicated to an R specific solution, ImageJ is open source and
does this under Analysis/Binary.

-----Original Message-----
From: r-sig-geo-bounces at stat.math.ethz.ch
[mailto:r-sig-geo-bounces at stat.math.ethz.ch] On Behalf Of Murray Richardson
Sent: Wednesday, March 12, 2008 12:59 PM
To: r-sig-geo at stat.math.ethz.ch
Subject: [R-sig-Geo] enumerate grid clusters/patches with size of contiguous
cluster

Hello friends,

I am trying to take a binary input grid of patches (connected cells with 
value = 1), and assign to each non-zero cell the total number of pixels 
comprising the patch to which it belongs. 

So for a connected patch of 27 pixels, all cells belonging to that patch 
will have a value of 27.

Just wondering if anyone has any suggestions.  Maybe a function I don't 
know about yet...

Thanks in advance,

Murray Richardson

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo




More information about the R-sig-Geo mailing list