
* tests/transform/fft.cc: Fix the path to the input image. * tests/transform/Makefile.am (check_PROGRAMS) [HAVE_FFTW3]: Add fft. (fft_SOURCES, fft_CPPFLAGS, fft_LDFLAGS) [HAVE_FFTW3]: New. (MOSTLYCLEANFILES): New. --- milena/ChangeLog | 10 ++++++++++ milena/tests/transform/Makefile.am | 22 ++++++++++++++++++++-- milena/tests/transform/fft.cc | 6 ++++-- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/milena/ChangeLog b/milena/ChangeLog index 8bc21f5..fc060d8 100644 --- a/milena/ChangeLog +++ b/milena/ChangeLog @@ -1,5 +1,15 @@ 2012-10-09 Roland Levillain <roland@lrde.epita.fr> + Exercise the Fast Fourier Transform. + + * tests/transform/fft.cc: Fix the path to the input image. + * tests/transform/Makefile.am + (check_PROGRAMS) [HAVE_FFTW3]: Add fft. + (fft_SOURCES, fft_CPPFLAGS, fft_LDFLAGS) [HAVE_FFTW3]: New. + (MOSTLYCLEANFILES): New. + +2012-10-09 Roland Levillain <roland@lrde.epita.fr> + Fix the Fast Fourier Transform. * mln/transform/fft.hh diff --git a/milena/tests/transform/Makefile.am b/milena/tests/transform/Makefile.am index 40de7f1..b266926 100644 --- a/milena/tests/transform/Makefile.am +++ b/milena/tests/transform/Makefile.am @@ -1,5 +1,5 @@ -# Copyright (C) 2008, 2009, 2010 EPITA Research and Development -# Laboratory (LRDE) +# Copyright (C) 2008, 2009, 2010, 2012 EPITA Research and Development +# Laboratory (LRDE). # # This file is part of Olena. # @@ -28,4 +28,22 @@ check_PROGRAMS = \ influence_zone_geodesic_saturated + +if HAVE_FFTW3 + +check_PROGRAMS += fft +fft_SOURCES = fft.cc +fft_CPPFLAGS = $(AM_CPPFLAGS) $(FFTW3_CPPFLAGS) +fft_LDFLAGS = $(AM_LDFLAGS) $(FFTW3_LDFLAGS) + +endif HAVE_FFTW3 + + TESTS = $(check_PROGRAMS) + +MOSTLYCLEANFILES = \ + fft.pgm \ + fft_copy.pgm \ + fft_low_pass.pgm \ + fft_trans_clipped.pgm \ + fft_trans_log.pgm diff --git a/milena/tests/transform/fft.cc b/milena/tests/transform/fft.cc index d7f7e63..bf7b8b9 100644 --- a/milena/tests/transform/fft.cc +++ b/milena/tests/transform/fft.cc @@ -1,5 +1,5 @@ // -*- c++ -*- -// Copyright (C) 2004 EPITA Research and Development Laboratory +// Copyright (C) 2004, 2012 EPITA Research and Development Laboratory // // This file is part of the Milena Library. This library is free // software; you can redistribute it and/or modify it under the terms @@ -33,6 +33,8 @@ #include <mln/opt/at.hh> #include <mln/debug/println.hh> +#include "tests/data.hh" + #define CHECK(Condition) \ if (Condition) \ std::cout << "OK" << std::endl; \ @@ -51,7 +53,7 @@ int main () int status = 0; image2d<int_u8> im1; - io::pgm::load(im1, "lena.pgm"); + io::pgm::load(im1, MLN_IMG_DIR "/lena.pgm"); fft<double> fourier(im1); -- 1.7.10.4