[Numpy-discussion] finding connected areas?

Charles R Harris charlesr.harris at gmail.com
Tue Jun 13 00:17:44 CDT 2006


Stephen,

I don't know of a data structure in numpy or scipy that does this. To do
this myself I use a modified union/find (equivalence relation) algorithm
interfaced to python using boost/python. The same algorithm is also useful
for connecting points on the basis of equivalence relations other than
distance. If there is much interest I could make a standard C version
sometime, but the interface needs some thinking about.

Chuck

On 6/12/06, stephen emslie <stephenemslie at gmail.com> wrote:
>
> I have used adaptive thresholding to turn an image into a binary image
> so that I can locate a particularly large bright spot. However, now
> that I have the binary image I need to be able to group connected
> cell's together and determine their relative sizes. Matlab has a
> function called bwlabel (http://tinyurl.com/fcnvd) that labels
> connected objects in a matrix. That seems like a good way to start,
> and I'm sure there is a way for me to do something similar in numpy,
> but how?
>
> Thanks
> Stephen Emslie
>
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20060612/78a3e3fc/attachment-0001.html 


More information about the Numpy-discussion mailing list