From: Charles R H. <cha...@gm...> - 2006-06-13 05:17:47
|
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 <ste...@gm...> 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 > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > |