Re: morphology.label() bug?
Dec. 22, 2011
6:39 a.m.
On Dec 21, 2:02 pm, Stéfan van der Walt <ste...@sun.ac.za> wrote: ...
I don't like having background == 0, but I'll settle for background == -1 as a default.
Thanks!
Regarding connectedness, both matlab and ndimage have options of 8- connect and 4-connect. ...
That's been added in the patch I proposed.
Thanks!!
Regarding number of labeled regions (not counting the background regions), again matlab and ndimage compute and return it. ...
This is a one-liner: len(np.unique(labels))
Or, len(np.unique(labels)) - 1, if we do not count the background in. I tend to think that is a norm when we consider the background special. Yet who cares if the output does not include the number of regions. Regards, TJ
5348
Age (days ago)
5348
Last active (days ago)
0 comments
1 participants
participants (1)
-
karoyakani