[Insight-users] Granulometry filter in ITK?

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Tue Nov 17 13:49:51 EST 2009


Le 17 nov. 09 à 08:23, lynx.abraxas at freenet.de a écrit :

> On 16/11/09 15:58:31, Gaëtan Lehmann wrote:
>>
>> Le 16 nov. 09 ? 15:46, Gaëtan Lehmann a écrit :
>>
>>>
>>> Hi,
>>>
>>> There is no filter ready to use for this task in ITK at this time.
>>> However, I believe that most of the tools needed are there.
>>>
>>> If I get it right, you want to do the local texture analysis used  
>>> page
>>> 322 of Soille's book to segment the two kind of forest. As I
>>> understand it, with a statistics which is the size of the kernel for
>>> the maximum value of the derivative, it can be computed that way:
>>>
>
> Dear Gaëtan,
>
>
> Sadly  I  had to hand in the book, so I'm not sure on what page it  
> was. But it
> was a filter that created two segments  where  each  segment   
> sourrounded  the
> areas  with  similar  granulometry.  I would like to know in 3D  
> where areas of
> higher and lower granulomtetry are. So bascily specifing a  
> neighbourhood and a
> threshold  kernel-size  to  a  granulometry-filter that then gives  
> me a binary
> image.

Soille's transform would let you do that, but if you know a priori  
what are the object sizes in the regions you want to extract, there  
may be more efficient approaches.

> Or if even better a granulometry-filter that yields  a  greyleve   
> image  where
> each  greyleve  corresponds  to  the lokal granulometry in the input  
> image. As
> input  it  would  need  a  (binary?)  input  image  and  a   
> neighbourhood.  By
> thresholding that output I think I would get the filter result  
> describe above.
>

That's exactly what Soille's transform does. There no need to be a  
binary image.
You also have to provide a list of kernels to perform the granulometry  
analysis, or it may be possible to compute it automatically.

>
>> Sorry, obviously, this is not the right check. The difference between
>> M2[i] and M[I] must be compared to the highest derivative seen  
>> before - I
>> should re-read my mails before sending them.
>>
>> Input: I (the input image), KL (the kernel list), N (the  
>> neighbourhood
>> where the statistics is computed)
>> D = domain(I)
>> M = localMean(I)
>> O = newImage(D, 0)
>> H = newImage(D, 0)
>> for k in KL
>>  I = opening(I, k)
>>  M2 = localMean(I, N)
>>  for i in D
>>    d = M[i] - M2[i]
>>    if d > H[i]:
>>      O[i] = size(k)
>>      H[i] = d
>>  M = M2
>> return O
>
> Thanks a lot for the idea how to realize this as a filter.
> I've to think about this a bit more before I understand it.
>
> D = domain(I)    <=> image size in x,  y,  z  or  total  #  of   
> voxel  for  an
> iterator???

That's the image region - the one you get in ITK with image- 
 >GetLargestPossibleRegion()

> M = localMean(I) <=> globalMean(I) ?
>
> Is  there  filter  in  ITK  for  localMean  of  an  image  within  a  
> specified
> neighbourhood?
>

There is BoxMeanImageFilter, or MeanImageFilter

>
> It is said granulometry is fullfilling the sieving axioms. But  if   
> I  get  it
> reight  the  result  of granulometry does not correspond to real  
> live sieving,
> does it? I would think real live sieving of eg. sand would be the  
> granulometry
> of the convex-hull of each particle. Am I seeing that right?
>
> eg. a particle like this:
>
>   X
>   X
> XXXXXXXXXX
>
>
> Would  vanish  with  an opening of kernel size X but it would need a  
> real live
> mesh size of:
>
> X
> X
> X
>
> To fall through a sieve.


Your object won't be removed by the first structuring element, only by  
the last one.

You may be more interested by using other kinds of opening during the  
granulometry analysis, like area opening. That would give information  
about the size of the objects independently of their shape.

Gaëtan

-- 
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  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091117/cfae00e9/attachment.pgp>


More information about the Insight-users mailing list