Index: olena/ChangeLog from Giovanni Palma giovanni@lrde.epita.fr * oln/convol/fast_gaussian.hh: Add reference. * oln/convol/fast_gaussian.hxx: Correct algorithm for tiny sigma.
+2004-03-29 Giovanni Palma giovanni@lrde.epita.fr + * tests/convol/tests/md5_convol_fast_gaussian_hh5: Correct test. * tests/convol/tests/md5_convol_fast_gaussian_hh4: Likewise. * tests/convol/tests/md5_convol_fast_gaussian_hh3: Likewise. Index: olena/oln/convol/fast_gaussian.hh --- olena/oln/convol/fast_gaussian.hh Mon, 29 Mar 2004 15:45:23 +0200 palma_g (oln/26_fast_gauss 1.6.1.6.1.8 640) +++ olena/oln/convol/fast_gaussian.hh Mon, 29 Mar 2004 16:36:57 +0200 palma_g (oln/26_fast_gauss 1.6.1.6.1.8 640) @@ -55,7 +55,8 @@ ** \brief Gaussian filter. ** ** Gaussian filter implementation from "Recursively implementing - ** the gaussian and its derivatives" Deriche 93 INRIA REPORT. + ** the gaussian and its derivatives" Deriche 93 INRIA REPORT + ** (num RR-1893). ** ** \param C Exact type of the conversion object. ** \param B Base type of the conversion object. @@ -80,7 +81,8 @@ ** \brief Derivative gaussian filter. ** ** Gaussian filter implementation from "Recursively implementing - ** the gaussian and its derivatives" Deriche 93 INRIA REPORT. + ** the gaussian and its derivatives" Deriche 93 INRIA REPORT + ** (num RR-1893). ** ** \param C Exact type of the conversion object. ** \param B Base type of the conversion object. @@ -106,7 +108,8 @@ ** \brief Second derivative gaussian filter. ** ** Gaussian filter implementation from "Recursively implementing - ** the gaussian and its derivatives" Deriche 93 INRIA REPORT. + ** the gaussian and its derivatives" Deriche 93 INRIA REPORT + ** (num RR-1893). ** ** \param C Exact type of the conversion object. ** \param B Base type of the conversion object. @@ -135,7 +138,8 @@ ** \brief Gaussian filter with a default conversion. ** ** Gaussian filter implementation from "Recursively implementing - ** the gaussian and its derivatives" Deriche 93 INRIA REPORT. + ** the gaussian and its derivatives" Deriche 93 INRIA REPORT + ** (num RR-1893). ** ** \param I Exact type of the image. ** \param BE Exact type of the behavior. @@ -182,7 +186,8 @@ ** \brief Derivative gaussian filter with a default conversion. ** ** Gaussian filter implementation from "Recursively implementing - ** the gaussian and its derivatives" Deriche 93 INRIA REPORT. + ** the gaussian and its derivatives" Deriche 93 INRIA REPORT + ** (num RR-1893). ** ** \param I Exact type of the image. ** \param BE Exact type of the behavior. @@ -228,7 +233,8 @@ ** \brief Second derivative gaussian filter with a default conversion. ** ** Gaussian filter implementation from "Recursively implementing - ** the gaussian and its derivatives" Deriche 93 INRIA REPORT. + ** the gaussian and its derivatives" Deriche 93 INRIA REPORT + ** (num RR-1893). ** ** \param I Exact type of the image. ** \param BE Exact type of the behavior. @@ -278,7 +284,8 @@ ** default behavior. ** ** Gaussian filter implementation from "Recursively implementing - ** the gaussian and its derivatives" Deriche 93 INRIA REPORT.\n + ** the gaussian and its derivatives" Deriche 93 INRIA REPORT + ** (num RR-1893).\n ** ** \warning The content of the border is the mirror of the ** image. @@ -325,7 +332,8 @@ ** and a default behavior. ** ** Gaussian filter implementation from "Recursively implementing - ** the gaussian and its derivatives" Deriche 93 INRIA REPORT. + ** the gaussian and its derivatives" Deriche 93 INRIA REPORT + ** (num RR-1893). ** ** \warning The content of the border is the mirror of the ** image. @@ -374,7 +382,8 @@ ** conversion and a default behavior. ** ** Gaussian filter implementation from "Recursively implementing - ** the gaussian and its derivatives" Deriche 93 INRIA REPORT. + ** the gaussian and its derivatives" Deriche 93 INRIA REPORT + ** (num RR-1893). ** ** \warning The content of the border is the mirror of the ** image. Index: olena/oln/convol/fast_gaussian.hxx --- olena/oln/convol/fast_gaussian.hxx Mon, 29 Mar 2004 15:45:23 +0200 palma_g (oln/25_fast_gauss 1.7.1.8.1.10 640) +++ olena/oln/convol/fast_gaussian.hxx Mon, 29 Mar 2004 16:33:41 +0200 palma_g (oln/25_fast_gauss 1.7.1.8.1.10 640) @@ -306,6 +306,10 @@ for_all(it) work_img[it] = ntg::cast::forcentg::float_s(in[it]);
+ // On tiny sigma, Derich algorithm doesn't work. + // It is the same thing that to convolve with a Dirac. + if (sigma > 0.006) + { /* FIXME: relation between sigma and the border shouldn't be linear, so when sigma is big enougth, the signal may be parasitized by the non signal values. @@ -313,7 +317,7 @@ behavior.adapt_border(work_img, ntg::cast::round<coord>(5 * sigma));
gaussian_<I::dim>::doit(work_img, coef); - + } /* Convert the result image to the user-requested datatype. FIXME: We are making an unnecessary copy in case the user expects a ntg::float_s image. */