[Insight-users] region growing from local maxima
Gaetan Lehmann
gaetan.lehmann at jouy.inra.fr
Wed Oct 5 06:57:25 EDT 2005
On Wed, 05 Oct 2005 03:34:05 +0200, Ara.T.Howard <Ara.T.Howard at noaa.gov>
wrote:
>
> i'm working with night-time lights satelite imagery
>
> http://fortytwo.merseine.nu/india_shrunk/india_1995_stable_lights.small.png
>
> although it's hard to tell from that stretch - all of the features have
> considerable 'over-glow' caused by light scattering in the atmousphere.
> i've
> been working with several approaches to 'shrinking' the features that
> boils
> down to finding local maxima and growing them 'downwards' from there.
> ala
>
> http://fortytwo.merseine.nu/india_shrunk/india_1995_stable_lights.small.em.15.png
>
> this is working o.k. but the toolkit i've been using has a
> flaw/bug/feature
> that has become a glass ceiling for me. i'm looking at moving to itk.
> skimming the docs it would seem there is not builtin support for finding
> extrema - but maybe i've missed it, the docs are large! ;-)
>
> has anyone out there used itk to
>
> - local extrema, maxes in particular
local maxima is quite easy to compute for integer types. According to
Soille's book, regional maxima is:
RMax(f) = f - ReconstructionByDilation(f, f-1)
This should be something like that with itk (itype is your image type):
typedef itk::ReconstructionByDilationImageFilter< itype, itype >
ReconsType;
typedef itk::ShiftScaleImageFilter< itype, itype > ShiftType;
typedef itk::SubtractImageFilter< itype, itype, itype > SubtractType;
ShiftType::Pointer shift = ShiftType::New();
shift->SetInput( previousFilter->GetOutput() );
shift->SetShift( -1 );
ReconsType::Pointer recons = ReconsType::New();
recons->SetMaskImage( previousFilter->GetOutput() );
recons->SetMarkerImage( shift->GetOutput() );
// you can choose connectivity. Default is 4-connected (in 2D)
// fully connected = 8-connected in 2D
recons->SetFullyConnected( true );
SubtractType::Pointer subtract = SubtractType::New();
subtract->SetInput1( previousFilter->GetOutput() );
subtract->SetInput2( recons->GetOutput() );
// substract->GetOutput() is a binary image where background have value 0
and local maxima have value = 1
...
I haven't created a filter yet because this definition will not work for
real types.
Another method should be to use a max-tree as the one used to compute
attribute opening... Any volunteers to create code to generate
max(min)-tree ? ;-)
>
> - grow regions from these seeds up to some tolerance (in my case i'm
> using
> percent difference within the total region as a limiter)
>
> i'm also looking at the watershed segmentation method and it's depth
> feature.
>
> and hints or pointers to docs appreciated.
>
> kind regards.
>
> -a
--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66 fax: 01 34 65 29 09
http://voxel.jouy.inra.fr
More information about the Insight-users
mailing list