<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.6944.0">
<TITLE>itkGaussianDerivativeImageFunction, are you correct?</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hi,<BR>
<BR>
After having read the itkGaussianDerivativeImageFunction, I am<BR>
facing some interrogations on basic image processing of convolution stuff, I am starting to wonder whether or<BR>
not my knowledge on the topic is a little "rusty".<BR>
<BR>
Reading the itkGaussianDerivativeImageFunction I couldn't agree with its implementation.<BR>
Okay it seems that it is for 2D images and hat some redundant stuff is present. This has been emphasized in<BR>
an insight journal review:<BR>
<BR>
<A HREF="http://www.insight-journal.org/view_reviews.php?back=publications.php%3Fjournalid%3D4%26order%3Dreviews%26revision_display%3D&pubid=78">http://www.insight-journal.org/view_reviews.php?back=publications.php%3Fjournalid%3D4%26order%3Dreviews%26revision_display%3D&pubid=78</A><BR>
<BR>
I am not commenting these things, but rather the core itself, i.e. how to perform the derivation with<BR>
gaussian. Please find below three links for 3 pics, they are not masterpieces but they help to follow me ( if you read<BR>
this you are doing it :) )<BR>
<BR>
def.jpg: <A HREF="http://moscao.free.fr/PrivateDownloads/def.jpg">http://moscao.free.fr/PrivateDownloads/def.jpg</A><BR>
<BR>
we perform derivation along x on a 2D image. I want to have the value for the green pixel. The def of the derivation<BR>
and the convolution, gives two 1-D convolution kernels, g1(x) and g0(y). The size of<BR>
the 2D kernel is fixed as a 3x3 area in red, so the 2 filters have size of 3 ( we do not discuss here the correctness of<BR>
extents, etc. )<BR>
<BR>
We will so perform a separable convolution with these 2 kernels.<BR>
<BR>
my.jpg: <A HREF="http://moscao.free.fr/PrivateDownloads/my.jpg">http://moscao.free.fr/PrivateDownloads/my.jpg</A><BR>
<BR>
What I am excpecting for conv. I convolve each column in the red area with<BR>
the g0(y) kernel. This give me a row of three elements. Then I convolve this row with g1(x ).<BR>
<BR>
itk.jpg: <A HREF="http://moscao.free.fr/PrivateDownloads/itk.jpg">http://moscao.free.fr/PrivateDownloads/itk.jpg</A><BR>
<BR>
What itk does. It performs a conv with the pixel columm (central col in the<BR>
red area) that gives a new value.<BR>
Then a three elements row is build with in its center the previous computed<BR>
value, and with a and b. a and b are the neighb of green pixel in image.<BR>
This row is then convolved with g1(x).<BR>
<BR>
I cannot figure out how this may produce the same result....!<BR>
<BR>
I will sound as an idiot, but if my implementation is the correct one, and not the itk one,<BR>
I cannot figure out why the separable convolution is faster than the usual one !!!???<BR>
<BR>
It is said everywhere and I have been taught this, that the cost per pixel in normal conv is kernelSize*KernelSize mult. ops instead of KernelSize + KernelSize for separable conv. By taking a simple image and counting the ops in both cases I cannot find this result....<BR>
<BR>
Can somebody enlight me? this is turning me mad for such a classic image processing stuff....<BR>
<BR>
Last pt, but nor relevant here:<BR>
<BR>
In itk code, Truncated kernel of the derivative is not normalized as<BR>
usual, i.e. divide each coeff by sum(k=-1,..,k=1)( k * g1(k) ).<BR>
<BR>
<BR>
Thanks for reading this looooong email and be nice if the answer is so simple.<BR>
<BR>
regards,<BR>
<BR>
Jerome Schmid<BR>
<BR>
<BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>