Re: Finding the largest blob in a binary image
- From: "azrael" <jura.grozni@xxxxxxxxx>
- Date: 7 Feb 2007 16:12:58 -0800
im not known to matlab, but if you use anything like c, what's wrong
using recursive asking for the value of 4 neighbours. i have been
doing this, and the speed was ok, even using python. at least it's the
easiest way. no matter if you need the size or the area, this will
work. and if this is still too slow for you, drive it through the
assembler, and you have your speed.
On Jan 30, 7:24 pm, Harris <xgeorg...@xxxxxxxxxxxxx> wrote:
"Leszek L." <lles...@xxxxxxxxxxxxxxxx> wrote innews:epae95$ni2$1@xxxxxxxx:
U ytkownik "Chuck Dillon" <spaml...@xxxxxxxxxxxxx> napisa³ w
wiadomo¶cinews:ep2ogb$v9p$1@xxxxxxxxxxxxxxxxxxxxxxx
Another approach is to do repeated erosions until you find the binary
just prior to loosing all non-zero pixels. Those surviving pixels
are at the heart of the largest blobs. Then do a templated dilation
of the
Yes if your blobs are of a similar shape. But if you have two
rectangular blobs and one is 1x20 pixels while the other is 3*3, then
the second one will survive more erosions, even though it is less than
half the size its competitor (in terms of area).
Good luck,
Leszek.
I think the term "largest" has to be defined first, i.e., if it is in terms of maximum size or in terms of
area. Then, if the blobs are guaranteed to be separated, two projections on X and Y axes would give
two histogram-like cummulative distributions per dimension. From the form and the properties of those
two histograms, distinct the mass center and rough sizes of distinct objects can be identified very fast.
This method (back-projection) has been used successfully in early 3D recostruction s/w in radiology,
although you normally need 5 or more such projections (most commonly in the FFT domain) to get a
usable resolution in the 3D model. However, I believe in this case it should work fine even with only two
projections (X and Y) and no further processing (non-orthogonal projections, no FFT).
--
Harris
.
- Prev by Date: Re: Is it possible to modify Canny edge detection to only estimate rectangles?
- Next by Date: What is the Imagej Roi fileformat
- Previous by thread: Re: Is it possible to modify Canny edge detection to only estimate rectangles?
- Next by thread: Re: Finding the largest blob in a binary image
- Index(es):
Relevant Pages
|