[MINC-users] combining component labelling with size-thresholding

Andrew Janke Andrew Janke <a.janke@gmail.com>
Tue Jun 14 04:40:05 2005


On 10/06/05, Michel Audette <m.audette@aist.go.jp> wrote:
> 
> I would like to use the mincmorph -successive "G" option together with
> mincstats to perform a component labeling of binary data that I have, and to
> retain only the contiguous blobs whose size is greater than some threshold
> T_A. Is there a simple way to do this with the two commands, or do I have to
> write a script that looks at a histogram file produced by mincstats?

Michel,

Sorry about the delay in replying, I'm in Nottingham and a bit out of
touch with the world.

In a way the answer is yes.  In that the output of the group option
numbers the groups in decending order of size.  Thus the group with
the value of 1 is the largest.  So you can very easily specify to keep
the largest 10 groups (using K[0:10]).  however this isn't quite what
you want given that I suspect you want to filter based upon absolute
group size.

I have wanted to do this for a while but I couldn't think of a
non-ambiguous way to add it to the list of options (given that I would
have to store state from a previous operation).  So in the meantime
you will just have to filter the output of mincstats -histogram.


-- 
Andrew Janke      (a.janke@gmail.com || www.cmr.uq.edu.au/~rotor)
Australia->Brisbane     H: +61 7 3390 6332  || M: +61 4 2138 8581