Re: Understanding edge correction with a 2nd order polynomial in Gaussian filter

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: Understanding edge correction with a 2nd order polynomial in Gaussian filter

Michael Schmid
Hi José,

concerning the edge correction of the Gaussian Blur kernel again:

The polynomial used for a smooth transition to zero should be zero at
x=kRadius and have zero derivative there.
So one can write it as
  a^2 * (x-kRadius)^2
(it is easy to verify that this polynomial fulfills these two conditions).

The coefficient 'a' has to be calculated. If you draw the two functions on
paper or plot it, you will easily see that the polynomial should touch the
Gaussian curve in one point; at all other nearby points the Gaussian is
higher than the polynomial.

The point x where the two curves touch is unknown. An easy way to
determine that point x numerically is trying all points x < kRadius. Since
the function value of the Gaussian and the polynomial should be the same
in that point, one can calculate the coefficient 'a' for all these points.
At the point where the two curves should touch each other, 'a' will be a
minimum.

In principle, on should do this for a continuum of points. For simplicity,
in the ImageJ code, this procedure is done only for integer values of x.

As I said, for a better understanding, it is best to plot or draw the
functions.


Michael
________________________________________________________________

On Fri, August 22, 2014 17:16, José  wrote:

> I am still having trouble to understand the edge correction. My doubt is
> well written here.
>
> http://math.stackexchange.com/questions/905967/understanding-edge-correction-with-a-2nd-order-polynomial-in-gaussian-filter
>
> Could you help me understanding that? (you can of course answer here
> rather
> than in stackexchange)
>
> Thanks. José
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html