https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Ugo Jardonnet <jardonnet(a)lrde.epita.fr>
Really fix binarization testes.
* tests/binarization/threshold.cc (paste): Destination domain must be
big enough.
* tests/binarization/Makefile.am: Fix.
Makefile.am | 2 +-
threshold.cc | 10 ++++++----
2 files changed, 7 insertions(+), 5 deletions(-)
Index: tests/binarization/threshold.cc
--- tests/binarization/threshold.cc (revision 1955)
+++ tests/binarization/threshold.cc (working copy)
@@ -38,25 +38,27 @@
#include "tests/data.hh"
-int main(int argc, char **)
+int main()
{
using namespace mln;
using value::int_u8;
{
image2d<int_u8> lena;
- io::pgm::load(lena, MLN_IMG_DIR "lena.pgm");
+ io::pgm::load(lena, MLN_IMG_DIR "/lena.pgm");
io::pbm::save(binarization::threshold(lena, 50), "out1.pgm");
}
{
image2d<int_u8> l;
- image2d<int> lena;
- io::pgm::load(l, MLN_IMG_DIR "img/lena.pgm");
+ io::pgm::load(l, MLN_IMG_DIR "/lena.pgm");
+
+ image2d<int> lena(l.domain(), 0);
level::paste(l, lena);
io::pbm::save(binarization::threshold(lena, 50), "out2.pgm");
}
+
}
Index: tests/binarization/Makefile.am
--- tests/binarization/Makefile.am (revision 1955)
+++ tests/binarization/Makefile.am (working copy)
@@ -3,7 +3,7 @@
include $(top_srcdir)/milena/tests/tests.mk
check_PROGRAMS = \
- thresholding
+ threshold
threshold_SOURCES = threshold.cc