URL:
https://svn.lrde.epita.fr/svn/oln/trunk/milena
ChangeLog:
2008-01-02 Guillaume Duhamel <guillaume.duhamel(a)lrde.epita.fr>
Fix and update morpho and util tests.
* tests/util/tree_fast_to_image.cc,
* tests/util/tree_to_image.cc,
* tests/morpho/contrast.cc,
* tests/morpho/dilation.cc,
* tests/morpho/dilation_max_h.cc,
* tests/morpho/erosion.cc,
* tests/morpho/erosion_min_h.cc,
* tests/morpho/gradient.cc,
* tests/morpho/hit_or_miss.cc,
* tests/morpho/laplacian.cc,
* tests/morpho/opening_area.cc,
* tests/morpho/thinning.cc: Fix path of images and update brief.
---
morpho/contrast.cc | 4 ++--
morpho/dilation.cc | 4 ++--
morpho/dilation_max_h.cc | 4 ++--
morpho/erosion.cc | 4 ++--
morpho/erosion_min_h.cc | 4 ++--
morpho/gradient.cc | 4 ++--
morpho/hit_or_miss.cc | 4 ++--
morpho/laplacian.cc | 4 ++--
morpho/opening_area.cc | 4 ++--
morpho/thinning.cc | 4 ++--
util/tree_fast_to_image.cc | 1 +
util/tree_to_image.cc | 15 ++++++++-------
12 files changed, 29 insertions(+), 27 deletions(-)
Index: trunk/milena/tests/util/tree_fast_to_image.cc
===================================================================
--- trunk/milena/tests/util/tree_fast_to_image.cc (revision 1627)
+++ trunk/milena/tests/util/tree_fast_to_image.cc (revision 1628)
@@ -131,6 +131,7 @@
};
+ debug::printl (output);
image2d<int_u8> ref (make::image2d(vs));
mln_assertion(ref == output);
}
Index: trunk/milena/tests/util/tree_to_image.cc
===================================================================
--- trunk/milena/tests/util/tree_to_image.cc (revision 1627)
+++ trunk/milena/tests/util/tree_to_image.cc (revision 1628)
@@ -113,6 +113,7 @@
int_u8 vs[16][16] = {
+
{110, 110, 110, 110, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
{110, 110, 110, 110, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
{110, 110, 110, 110, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
@@ -121,14 +122,14 @@
{ 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
{ 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
{ 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
- {180, 180, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
- {180, 180, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
- {180, 180, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
- {180, 180, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
- {180, 180, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
+ {180, 180, 252, 252, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
+ {180, 180, 252, 252, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
+ {180, 180, 252, 252, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
+ {180, 180, 252, 252, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
+ {180, 180, 252, 252, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
{180, 180, 210, 210, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
- { 0, 0, 210, 210, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
- { 0, 0, 0, 0, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0}
+ {252, 252, 210, 210, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0},
+ {252, 252, 252, 252, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 0, 0}
};
Index: trunk/milena/tests/morpho/contrast.cc
===================================================================
--- trunk/milena/tests/morpho/contrast.cc (revision 1627)
+++ trunk/milena/tests/morpho/contrast.cc (revision 1628)
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/morpho_contrast.cc
+/*! \file tests/morpho/contrast.cc
*
* \brief Test on mln::morpho::contrast.
*/
@@ -51,7 +51,7 @@
border::thickness = 2;
image2d<int_u8> lena;
- io::pgm::load(lena, "../img/lena.pgm");
+ io::pgm::load(lena, "../../img/lena.pgm");
image2d<int_u8> out = morpho::contrast(lena, rect);
io::pgm::save(out, "out.pgm");
Index: trunk/milena/tests/morpho/gradient.cc
===================================================================
--- trunk/milena/tests/morpho/gradient.cc (revision 1627)
+++ trunk/milena/tests/morpho/gradient.cc (revision 1628)
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/morpho_gradient.cc
+/*! \file tests/morpho/gradient.cc
*
* \brief Test on mln::morpho::gradient.
*/
@@ -50,7 +50,7 @@
border::thickness = 2;
image2d<int_u8> lena;
- io::pgm::load(lena, "../img/tiny.pgm");
+ io::pgm::load(lena, "../../img/tiny.pgm");
io::pgm::save( morpho::gradient(lena, rect),
"out.pgm" );
Index: trunk/milena/tests/morpho/erosion.cc
===================================================================
--- trunk/milena/tests/morpho/erosion.cc (revision 1627)
+++ trunk/milena/tests/morpho/erosion.cc (revision 1628)
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/morpho_erosion.cc
+/*! \file tests/morpho/erosion.cc
*
* \brief Test on mln::morpho::erosion.
*/
@@ -75,7 +75,7 @@
// 25 66 15
image2d<int_u8> lena;
- io::pgm::load(lena, "../img/lena.pgm");
+ io::pgm::load(lena, "../../img/lena.pgm");
// trace::quiet = false;
Index: trunk/milena/tests/morpho/thinning.cc
===================================================================
--- trunk/milena/tests/morpho/thinning.cc (revision 1627)
+++ trunk/milena/tests/morpho/thinning.cc (revision 1628)
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/morpho_thinning.cc
+/*! \file tests/morpho/thinning.cc
*
* \brief Test on mln::morpho::thinning.
*/
@@ -63,7 +63,7 @@
{
image2d<bool> pic;
- io::pbm::load(pic, "../img/picasso.pbm");
+ io::pbm::load(pic, "../../img/picasso.pbm");
io::pbm::save(morpho::thinning(pic, win_fg, win_bg), "out.pbm" );
}
// {
Index: trunk/milena/tests/morpho/hit_or_miss.cc
===================================================================
--- trunk/milena/tests/morpho/hit_or_miss.cc (revision 1627)
+++ trunk/milena/tests/morpho/hit_or_miss.cc (revision 1628)
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/morpho_hit_or_miss.cc
+/*! \file tests/morpho/hit_or_miss.cc
*
* \brief Test on mln::morpho::hit_or_miss.
*/
@@ -76,7 +76,7 @@
border::thickness = 2;
image2d<bool> pic;
- io::pbm::load(pic, "../img/picasso.pbm");
+ io::pbm::load(pic, "../../img/picasso.pbm");
image2d<bool> out = morpho::hit_or_miss(pic, win_hit, win_miss);
io::pbm::save(out, "out.pbm");
Index: trunk/milena/tests/morpho/dilation_max_h.cc
===================================================================
--- trunk/milena/tests/morpho/dilation_max_h.cc (revision 1627)
+++ trunk/milena/tests/morpho/dilation_max_h.cc (revision 1628)
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/morpho_dilation_max_h.cc
+/*! \file tests/morpho/dilation_max_h.cc
*
* \brief Test on mln::morpho::dilatation_fast.
*/
@@ -53,7 +53,7 @@
border::thickness = 66;
image2d<int_u8> lena;
- io::pgm::load(lena, "../img/lena.pgm");
+ io::pgm::load(lena, "../../img/lena.pgm");
{
p_array<point2d> vec = convert::to_p_array(rec, point2d::origin);
Index: trunk/milena/tests/morpho/dilation.cc
===================================================================
--- trunk/milena/tests/morpho/dilation.cc (revision 1627)
+++ trunk/milena/tests/morpho/dilation.cc (revision 1628)
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/morpho_dilation.cc
+/*! \file tests/morpho/dilation.cc
*
* \brief Test on mln::morpho::dilation.
*/
@@ -61,7 +61,7 @@
border::thickness = 66;
image2d<int_u8> lena;
- io::pgm::load(lena, "../img/lena.pgm");
+ io::pgm::load(lena, "../../img/lena.pgm");
// {
// image2d<int_u8> out(lena.domain());
Index: trunk/milena/tests/morpho/laplacian.cc
===================================================================
--- trunk/milena/tests/morpho/laplacian.cc (revision 1627)
+++ trunk/milena/tests/morpho/laplacian.cc (revision 1628)
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/morpho_laplacian.cc
+/*! \file tests/morpho/laplacian.cc
*
* \brief Test on mln::morpho::laplacian.
*/
@@ -54,7 +54,7 @@
border::thickness = 2;
image2d<int_u8> tiny;
- io::pgm::load(tiny, "../img/tiny.pgm");
+ io::pgm::load(tiny, "../../img/tiny.pgm");
image2d<int> lap(tiny.domain());
morpho::laplacian(tiny, rect, lap);
Index: trunk/milena/tests/morpho/opening_area.cc
===================================================================
--- trunk/milena/tests/morpho/opening_area.cc (revision 1627)
+++ trunk/milena/tests/morpho/opening_area.cc (revision 1628)
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/morpho_opening_area.cc
+/*! \file tests/morpho/opening_area.cc
*
* \brief Test on mln::morpho::opening_area.
*/
@@ -47,7 +47,7 @@
using value::int_u8;
image2d<int_u8> lena;
- io::pgm::load(lena, "../img/lena.pgm");
+ io::pgm::load(lena, "../../img/lena.pgm");
image2d<int_u8> out(lena.domain());
morpho::opening_area(lena, c4(), 510, out);
Index: trunk/milena/tests/morpho/erosion_min_h.cc
===================================================================
--- trunk/milena/tests/morpho/erosion_min_h.cc (revision 1627)
+++ trunk/milena/tests/morpho/erosion_min_h.cc (revision 1628)
@@ -25,7 +25,7 @@
// reasons why the executable file might be covered by the GNU General
// Public License.
-/*! \file tests/morpho_erosion_min_h.cc
+/*! \file tests/morpho/erosion_min_h.cc
*
* \brief Test on mln::morpho::erosion_fast
*/
@@ -53,7 +53,7 @@
border::thickness = 66;
image2d<int_u8> lena;
- io::pgm::load(lena, "../img/lena.pgm");
+ io::pgm::load(lena, "../../img/lena.pgm");
{
p_array<point2d> vec = convert::to_p_array(rec, point2d::origin);