Index: olena/ChangeLog
from Giovanni Palma <giovanni(a)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.
* tests/convol/tests/md5_convol_fast_gaussian_hh2: Likewise.
* tests/convol/tests/md5_convol_fast_gaussian_hh1: Likewise.
* tests/convol/tests/md5_convol_fast_gaussian_hh0: Likewise.
* oln/convol/fast_gaussian.hh: Add comments.
* oln/convol/fast_gaussian.hxx: Likewise.
Index: olena/oln/convol/fast_gaussian.hh
--- olena/oln/convol/fast_gaussian.hh Fri, 19 Mar 2004 14:01:37 +0100 palma_g
(oln/26_fast_gauss 1.6.1.6.1.7 600)
+++ olena/oln/convol/fast_gaussian.hh Mon, 29 Mar 2004 15:22:05 +0200 palma_g
(oln/26_fast_gauss 1.6.1.6.1.7 640)
@@ -67,6 +67,8 @@
** \arg sigma Value of sigma when computing the gaussian.
** \arg behavior Object to know how to work on borders.
**
+ ** \warning If sigma is big enough, the result may differ a
+ ** little bit with the -O3 flag of g++.
*/
template <class C, class B, class I, class BE>
typename mute<I, typename convoutput<C, B,
oln_value_type(I)>::ret>::ret
@@ -90,6 +92,9 @@
** \arg sigma Value of sigma when computing the gaussian.
** \arg behavior Object to know how to work on borders.
**
+ ** \warning If sigma is big enough, the result may differ a
+ ** little bit with the -O3 flag of g++.
+ **
*/
template <class C, class B, class I, class BE>
typename mute<I, typename convoutput<C, B,
oln_value_type(I)>::ret>::ret
@@ -113,6 +118,9 @@
** \arg sigma Value of sigma when computing the gaussian.
** \arg behavior Object to know how to work on borders.
**
+ ** \warning If sigma is big enough, the result may differ a
+ ** little bit with the -O3 flag of g++.
+ **
*/
template <class C, class B, class I, class BE>
typename mute<I, typename convoutput<C, B,
oln_value_type(I)>::ret>::ret
@@ -159,6 +167,9 @@
** =>
** \image html oln_convol_fast_gaussian.png
** \image latex oln_convol_fast_gaussian.png
+ **
+ ** \warning If sigma is big enough, the result may differ a
+ ** little bit with the -O3 flag of g++.
*/
template <class I, class BE> inline
oln_concrete_type(I)
@@ -191,7 +202,7 @@
**
** im_type im1(oln::load(IMG_IN "lena256.pgm"));
**
- ** oln::save(oln::convol::fast::gaussian(im1, 2,
+ ** oln::save(oln::convol::fast::gaussian_derivative(im1, 2,
**
oln::value_behavior<oln_value_type_(im_type)>(0)),
** IMG_OUT "oln_convol_fast_gaussian_derivative.pbm");
** return 0;
@@ -204,7 +215,8 @@
** \image html oln_convol_fast_gaussian_derivative.png
** \image latex oln_convol_fast_gaussian_derivative.png
**
- ** \todo FIXME: Make the example use the good function.
+ ** \warning If sigma is big enough, the result may differ a
+ ** little bit with the -O3 flag of g++.
*/
template <class I, class BE> inline
oln_concrete_type(I)
@@ -236,7 +248,7 @@
**
** im_type im1(oln::load(IMG_IN "lena256.pgm"));
**
- ** oln::save(oln::convol::fast::gaussian(im1, 2,
+ ** oln::save(oln::convol::fast::gaussian_second_derivative(im1, 2,
**
oln::value_behavior<oln_value_type_(im_type)>(0)),
** IMG_OUT
"oln_convol_fast_gaussian_second_derivative.pbm");
** return 0;
@@ -249,7 +261,8 @@
** \image html oln_convol_fast_gaussian_second_derivative.png
** \image latex oln_convol_fast_gaussian_second_derivative.png
**
- ** \todo FIXME: Make the example use the good function.
+ ** \warning If sigma is big enough, the result may differ a
+ ** little bit with the -O3 flag of g++.
*/
template <class I, class BE> inline
oln_concrete_type(I)
@@ -297,6 +310,9 @@
** =>
** \image html oln_convol_fast_gaussian_default.png
** \image latex oln_convol_fast_gaussian_default.png
+ **
+ ** \warning If sigma is big enough, the result may differ a
+ ** little bit with the -O3 flag of g++.
*/
template <class I> inline
oln_concrete_type(I)
@@ -332,7 +348,7 @@
**
** im_type im1(oln::load(IMG_IN "lena256.pgm"));
**
- ** oln::save(oln::convol::fast::gaussian(im1, 2),
+ ** oln::save(oln::convol::fast::gaussian_derivative(im1, 2),
** IMG_OUT
"oln_convol_fast_gaussian_derivative_default.pbm");
** return 0;
** }
@@ -344,7 +360,8 @@
** \image html oln_convol_fast_gaussian_derivative_default.png
** \image latex oln_convol_fast_gaussian_derivative_default.png
**
- ** \todo FIXME: Make the example use the good function.
+ ** \warning If sigma is big enough, the result may differ a
+ ** little bit with the -O3 flag of g++.
*/
template <class I> inline
oln_concrete_type(I)
@@ -380,7 +397,7 @@
**
** im_type im1(oln::load(IMG_IN "lena256.pgm"));
**
- ** oln::save(oln::convol::fast::gaussian(im1, 2),
+ ** oln::save(oln::convol::fast::gaussian_second_derivative(im1, 2),
** IMG_OUT
"oln_convol_fast_gaussian_second_derivative_default.pbm");
** return 0;
** }
@@ -392,7 +409,8 @@
** \image html oln_convol_fast_gaussian_second_derivative_default.png
** \image latex oln_convol_fast_gaussian_second_derivative_default.png
**
- ** \todo FIXME: Make the example use the good function.
+ ** \warning If sigma is big enough, the result may differ a
+ ** little bit with the -O3 flag of g++.
*/
template <class I> inline
oln_concrete_type(I)
Index: olena/oln/convol/fast_gaussian.hxx
--- olena/oln/convol/fast_gaussian.hxx Mon, 15 Mar 2004 17:40:54 +0100 van-vl_n
(oln/25_fast_gauss 1.7.1.8.1.9 600)
+++ olena/oln/convol/fast_gaussian.hxx Mon, 29 Mar 2004 15:26:31 +0200 palma_g
(oln/25_fast_gauss 1.7.1.8.1.9 640)
@@ -104,7 +104,6 @@
- c.d[1]*tmp1[2] - c.d[2]*tmp1[1]
- c.d[3]*tmp1[0];
-
oln_point_type(I) current(start + d + d + d + d);
for (coord i = 4; i < len; ++i)
{
@@ -170,7 +169,16 @@
struct gaussian_ {};
- // Gaussian filter for 1D images
+ /*! Gaussian filter for 1D images
+ **
+ ** gaussian_ specialization for 1D images.
+ **
+ ** \param I Exact type of the image.
+ ** \param F Type of coefficients.
+ **
+ ** \arg img Image to process.
+ ** \arg coef Coefficients to use.
+ */
template<>
struct gaussian_<1>
{
@@ -189,7 +197,16 @@
};
- // Gaussian filter for 2D images
+ /*! Gaussian filter for 2D images
+ **
+ ** gaussian_ specialization for 2D images.
+ **
+ ** \param I Exact type of the image.
+ ** \param F Type of coefficients.
+ **
+ ** \arg img Image to process.
+ ** \arg coef Coefficients to use.
+ */
template<>
struct gaussian_<2>
{
@@ -215,7 +232,16 @@
}
};
- // Gaussian filter for 3D images
+ /*! Gaussian filter for 3D images
+ **
+ ** gaussian_ specialization for 3D images.
+ **
+ ** \param I Exact type of the image.
+ ** \param F Type of coefficients.
+ **
+ ** \arg img Image to process.
+ ** \arg coef Coefficients to use.
+ */
template<>
struct gaussian_<3>
{
Index: olena/tests/convol/tests/md5_convol_fast_gaussian_hh5
--- olena/tests/convol/tests/md5_convol_fast_gaussian_hh5 Tue, 23 Mar 2004 14:27:20 +0100
palma_g (oln/k/23_md5_convol 1.1 600)
+++ olena/tests/convol/tests/md5_convol_fast_gaussian_hh5 Mon, 29 Mar 2004 15:33:06 +0200
palma_g (oln/k/23_md5_convol 1.1 644)
@@ -10,17 +10,17 @@
int main()
{
- oln::utils::key::value_type data_key[16] = {0x70, 0x53, 0xa8, 0x84, 0x81,
- 0x4, 0xbc, 0x30, 0x71, 0x23,
- 0x78, 0xba, 0xed, 0x6, 0xc6,
- 0x9e};
+ oln::utils::key::value_type data_key[16] = {0xfc, 0xd6, 0xbc, 0xb5, 0x6c,
+ 0x16, 0x89, 0xfc, 0xef, 0x28,
+ 0xb5, 0x7c, 0x22, 0x47, 0x5b,
+ 0xad};
oln::utils::key key(data_key);
typedef oln::image2d<ntg::int_u8> im_type;
im_type im1(oln::load(rdata("lena256.pgm")));
- if (oln::utils::md5(oln::convol::fast::gaussian(im1, 2)) == key)
+ if (oln::utils::md5(oln::convol::fast::gaussian_second_derivative(im1, 0.5)) == key)
std::cout << "OK" << std::endl;
else
{
Index: olena/tests/convol/tests/md5_convol_fast_gaussian_hh4
--- olena/tests/convol/tests/md5_convol_fast_gaussian_hh4 Tue, 23 Mar 2004 14:27:20 +0100
palma_g (oln/k/24_md5_convol 1.1 600)
+++ olena/tests/convol/tests/md5_convol_fast_gaussian_hh4 Mon, 29 Mar 2004 15:32:39 +0200
palma_g (oln/k/24_md5_convol 1.1 644)
@@ -10,14 +10,17 @@
int main()
{
-oln::utils::key::value_type data_key[16] = {0x56, 0x10, 0x9f, 0xa9, 0xec, 0x89, 0x99,
0x14, 0x42, 0x4a, 0xcf, 0x42, 0xa9, 0xa2, 0xe3, 0xf4};
+ oln::utils::key::value_type data_key[16] = {0x4d, 0xbc, 0xd, 0x2, 0x73,
+ 0x93, 0xf4, 0x6, 0xbc, 0x5c,
+ 0x55, 0xac, 0x6, 0xb, 0x67,
+ 0x9};
oln::utils::key key(data_key);
- typedef oln::image2d<ntg::
-int_u8> im_type;
+ typedef oln::image2d<ntg::int_u8> im_type;
im_type im1(oln::load(rdata("lena256.pgm")));
- if (oln::utils::md5(oln::convol::fast::gaussian(im1, 2)) == key)
+
+ if (oln::utils::md5(oln::convol::fast::gaussian_derivative(im1, 0.5)) == key)
std::cout << "OK" << std::endl;
else
{
Index: olena/tests/convol/tests/md5_convol_fast_gaussian_hh3
--- olena/tests/convol/tests/md5_convol_fast_gaussian_hh3 Tue, 23 Mar 2004 14:27:20 +0100
palma_g (oln/k/25_md5_convol 1.1 600)
+++ olena/tests/convol/tests/md5_convol_fast_gaussian_hh3 Mon, 29 Mar 2004 15:32:05 +0200
palma_g (oln/k/25_md5_convol 1.1 644)
@@ -10,14 +10,16 @@
int main()
{
-oln::utils::key::value_type data_key[16] = {0x56, 0x10, 0x9f, 0xa9, 0xec, 0x89, 0x99,
0x14, 0x42, 0x4a, 0xcf, 0x42, 0xa9, 0xa2, 0xe3, 0xf4};
-
+ oln::utils::key::value_type data_key[16] = {0xf5, 0x37, 0xe0, 0xad, 0x5f,
+ 0xcc, 0x7f, 0x44, 0x32, 0x53,
+ 0x2a, 0x37, 0x80, 0x38, 0x3f,
+ 0xbb};
oln::utils::key key(data_key);
- typedef oln::image2d<ntg::
-int_u8> im_type;
+ typedef oln::image2d<ntg::int_u8> im_type;
im_type im1(oln::load(rdata("lena256.pgm")));
- if (oln::utils::md5(oln::convol::fast::gaussian(im1, 2)) == key)
+
+ if (oln::utils::md5(oln::convol::fast::gaussian(im1, 0.5)) == key)
std::cout << "OK" << std::endl;
else
{
Index: olena/tests/convol/tests/md5_convol_fast_gaussian_hh2
--- olena/tests/convol/tests/md5_convol_fast_gaussian_hh2 Tue, 23 Mar 2004 14:27:20 +0100
palma_g (oln/k/26_md5_convol 1.1 600)
+++ olena/tests/convol/tests/md5_convol_fast_gaussian_hh2 Mon, 29 Mar 2004 15:31:37 +0200
palma_g (oln/k/26_md5_convol 1.1 644)
@@ -10,14 +10,20 @@
int main()
{
-oln::utils::key::value_type data_key[16] = {0xc, 0xec, 0xc0, 0x4c, 0xf4, 0xd1, 0xab,
0xef, 0x1c, 0xd3, 0x9c, 0xa7, 0x4d, 0xd7, 0x28, 0x92};
+ oln::utils::key::value_type data_key[16] = {0xfc, 0xd6, 0xbc, 0xb5, 0x6c,
+ 0x16, 0x89, 0xfc, 0xef, 0x28,
+ 0xb5, 0x7c, 0x22, 0x47, 0x5b,
+ 0xad};
oln::utils::key key(data_key);
- typedef oln::image2d<ntg::
-int_u8> im_type;
+ typedef oln::image2d<ntg::int_u8> im_type;
im_type im1(oln::load(rdata("lena256.pgm")));
- if (oln::utils::md5(oln::convol::fast::gaussian(im1, 2,
oln::value_behavior<oln_value_type_(im_type)>(0))) == key)
+
+ if (oln::utils::md5(oln::convol::fast::gaussian_second_derivative(im1,
+ 0.5,
+ oln::value_behavior<oln_value_type_(im_type)>(0)))
+ == key)
std::cout << "OK" << std::endl;
else
{
Index: olena/tests/convol/tests/md5_convol_fast_gaussian_hh1
--- olena/tests/convol/tests/md5_convol_fast_gaussian_hh1 Tue, 23 Mar 2004 14:27:20 +0100
palma_g (oln/k/27_md5_convol 1.1 600)
+++ olena/tests/convol/tests/md5_convol_fast_gaussian_hh1 Mon, 29 Mar 2004 15:31:03 +0200
palma_g (oln/k/27_md5_convol 1.1 644)
@@ -10,19 +10,26 @@
int main()
{
-oln::utils::key::value_type data_key[16] = {0xc, 0xec, 0xc0, 0x4c, 0xf4, 0xd1, 0xab,
0xef, 0x1c, 0xd3, 0x9c, 0xa7, 0x4d, 0xd7, 0x28, 0x92};
+ oln::utils::key::value_type data_key[16] = {0x0, 0x8f, 0x63, 0xff, 0xca,
+ 0xae, 0xb5, 0xdb, 0x32, 0xf5,
+ 0x38, 0xfd, 0x13, 0x11, 0x67,
+ 0x9c};
oln::utils::key key(data_key);
- typedef oln::image2d<ntg::
-int_u8> im_type;
+ typedef oln::image2d<ntg::int_u8> im_type;
im_type im1(oln::load(rdata("lena256.pgm")));
- if (oln::utils::md5(oln::convol::fast::gaussian(im1, 2,
oln::value_behavior<oln_value_type_(im_type)>(0))) == key)
+
+ if (oln::utils::md5(oln::convol::fast::gaussian_derivative(im1,
+ 0.5,
+ oln::value_behavior<oln_value_type_(im_type)>(0)))
+ == key)
std::cout << "OK" << std::endl;
else
{
std::cout << "FAIL" << std::endl;
return true;
}
+
return 0;
}
Index: olena/tests/convol/tests/md5_convol_fast_gaussian_hh0
--- olena/tests/convol/tests/md5_convol_fast_gaussian_hh0 Tue, 23 Mar 2004 14:27:20 +0100
palma_g (oln/k/28_md5_convol 1.1 600)
+++ olena/tests/convol/tests/md5_convol_fast_gaussian_hh0 Mon, 29 Mar 2004 15:33:16 +0200
palma_g (oln/k/28_md5_convol 1.1 644)
@@ -10,14 +10,20 @@
int main()
{
-oln::utils::key::value_type data_key[16] = {0xc, 0xec, 0xc0, 0x4c, 0xf4, 0xd1, 0xab,
0xef, 0x1c, 0xd3, 0x9c, 0xa7, 0x4d, 0xd7, 0x28, 0x92};
+ oln::utils::key::value_type data_key[16] = {0xcd, 0x87, 0xa8, 0x95, 0xa3,
+ 0x44, 0x2f, 0x0, 0xc4, 0x39,
+ 0x30, 0x77, 0x67, 0xa8, 0xb7,
+ 0x36};
oln::utils::key key(data_key);
- typedef oln::image2d<ntg::
-int_u8> im_type;
+ typedef oln::image2d<ntg::int_u8> im_type;
im_type im1(oln::load(rdata("lena256.pgm")));
- if (oln::utils::md5(oln::convol::fast::gaussian(im1, 2,
oln::value_behavior<oln_value_type_(im_type)>(0))) == key)
+
+ if (oln::utils::md5(oln::convol::fast::gaussian(im1,
+ 0.5,
+ oln::value_behavior<oln_value_type_(im_type)>(0)))
+ == key)
std::cout << "OK" << std::endl;
else
{
--
Giovanni Palma
EPITA - promo 2005 - membre d'EpX - LRDE
Mob. : +33 (0)6 60 97 31 74