Re: A derivative of a Gaussian
- From: "DrBZU" <drbzu@xxxxxxxxxxx>
- Date: 13 Jun 2006 14:41:54 -0700
Hi Shlomo
Dont use the Sobel - it is a numerical approximation to a derivative
and not the same as the analytical function. It wont work very well
for small gaussian sigma or higher order derivatives.
I used the Hermite Polynomial to generate 2D Gaussians all the time
during my PhD.
I will e-mail you a bunch of functions from my old MATLAB work - dont
ask me anything about them because I honestly wont remember!
Jason
Shlomo wrote:
Hi All,
I am investigating the canny edge detector and at the moment I am
experimenting with the derivative of a Gaussian (the first step in the
canny edge detection is convolving with a derivative of a Gaussian) and
have several questions that I hope you could help me with. I understand
that it is possible to derive the derivative of a Gaussian by a
recursive calculation using the Hermite polynomials. As I only need
the first derivative I thought about the following two options:
Option A: generate Gaussian kernels with different kernel size and
different variance in MATLAB and save them in memory.
Follow this operation with a convolution with a Sobel operator to
approximate first order differentiation
I am not sure if this is the standard way of doing that, any comments
would be welcomed.
Option B: derive the first derivative of a 2D Gaussian analytically,
generate a kernel in MATLAB and save that into memory.
Would this be better, I mean if we have the actual function why use an
approximation using a Sobel operator?
2-I am not sure my analytic derivation of the 2D Gaussian derivative is
correct (though I am sure about the 1D derivative), can anyone shed
some light on that?
In MATLAB I used the following process for generating a Kernel:
1- I obtained a 5x5 kernel with sigma=1
0.0030 0.0133 0.0219 0.0133 0.0030
0.0133 0.0596 0.0983 0.0596 0.0133
0.0219 0.0983 0.1621 0.0983 0.0219
0.0133 0.0596 0.0983 0.0596 0.0133
0.0030 0.0133 0.0219 0.0133 0.0030
2- I found the reciprocal of the smallest value (in this case 1/
.002969 =333) and multiplied the matrix by that value and rounding off
to the nearest integer.
The number 342 is the sum of all the elements in the matrix and serves
as a normalization factor.
1 5 8 5 1
5 20 33 20 5
8 33 54 33 8 x (1/342)
5 20 33 20 5
1 5 8 5 1
Is this the standard algorithm for generating a good Gaussian kernel? I
can measure the MSE and see how good it is but I want to know about
others experience.
Should I follow the same method for generating a derivative of a
Gaussian kernel?
Thanks you all for the help.
Shlomo Kashani
M.Sc Student, Digital Signal Processing
University of London
.
- Follow-Ups:
- Re: A derivative of a Gaussian
- From: Shlomo
- Re: A derivative of a Gaussian
- References:
- A derivative of a Gaussian
- From: Shlomo
- A derivative of a Gaussian
- Prev by Date: Re: A derivative of a Gaussian
- Next by Date: Re: A derivative of a Gaussian
- Previous by thread: Re: A derivative of a Gaussian
- Next by thread: Re: A derivative of a Gaussian
- Index(es):
Relevant Pages
|
Loading