---
.../Makefile.am | 12 +++++-----
.../linear/lap.cc => apps/bench/gradient-lena.cc} | 24 +++++++++++++------
2 files changed, 22 insertions(+), 14 deletions(-)
copy milena/apps/{constrained-connectivity => bench}/Makefile.am (72%)
copy milena/{tests/linear/lap.cc => apps/bench/gradient-lena.cc} (82%)
diff --git a/milena/apps/constrained-connectivity/Makefile.am
b/milena/apps/bench/Makefile.am
similarity index 72%
copy from milena/apps/constrained-connectivity/Makefile.am
copy to milena/apps/bench/Makefile.am
index 84a6ed2..707f457 100644
--- a/milena/apps/constrained-connectivity/Makefile.am
+++ b/milena/apps/bench/Makefile.am
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE).
+# Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE).
#
# This file is part of Olena.
#
@@ -20,10 +20,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/milena -I$(top_builddir)/milena
APPS_CXXFLAGS = @APPS_CXXFLAGS@
AM_CXXFLAGS = $(APPS_CXXFLAGS)
-noinst_PROGRAMS = constrained-connectivity
-constrained_connectivity_SOURCES = constrained-connectivity.cc
+noinst_PROGRAMS = \
+ gradient-lena
-TESTS = test-constrained-connectivity
+gradient_lena_SOURCES = gradient-lena.cc
-# The sample image form Pierre Soille's PAMI 2008 article.
-EXTRA_DIST = soille.pgm
+MOSTLYCLEANFILES = \
+ gradient-lena-out.pgm
diff --git a/milena/tests/linear/lap.cc b/milena/apps/bench/gradient-lena.cc
similarity index 82%
copy from milena/tests/linear/lap.cc
copy to milena/apps/bench/gradient-lena.cc
index 2c0a2c7..f3f5d62 100644
--- a/milena/tests/linear/lap.cc
+++ b/milena/apps/bench/gradient-lena.cc
@@ -24,16 +24,20 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
+#include <iostream>
+
#include <mln/core/image/image2d.hh>
-#include <mln/value/int_u8.hh>
+#include <mln/core/alias/window2d.hh>
+
#include <mln/io/pgm/load.hh>
#include <mln/io/pgm/save.hh>
-#include <mln/border/thickness.hh>
-#include <mln/linear/lap.hh>
-#include <mln/data/stretch.hh>
+#include <mln/value/int_u8.hh>
+#include <mln/morpho/gradient.hh>
-#include "tests/data.hh"
+#include <mln/util/timer.hh>
+
+#include "apps/data.hh"
int main()
@@ -42,10 +46,14 @@ int main()
using value::int_u8;
border::thickness = 1;
-
image2d<int_u8> lena;
io::pgm::load(lena, MLN_IMG_DIR "/lena.pgm");
- io::pgm::save(data::stretch(int_u8(), linear::lap_4(lena)),
- "lap-out.pgm");
+ util::timer t;
+ t.start();
+ image2d<int_u8> g = morpho::gradient(lena, win_c4p());
+ t.stop();
+ std::cout << t.read() << std::endl;
+
+ io::pgm::save(g, "gradient-lena-out.pgm");
}
--
1.7.2.5
Show replies by date