26 #include <mln/transform/fft.hh>
27 #include <mln/value/int_u8.hh>
28 #include <mln/io/pgm/load.hh>
29 #include <mln/io/pgm/save.hh>
30 #include <mln/opt/at.hh>
31 #include <mln/debug/println.hh>
33 #include <mln/core/image/flat_image.hh>
34 #include <mln/fun/vv2b/le.hh>
35 #include <mln/fun/vv2v/diff_abs.hh>
36 #include <mln/data/transform.hh>
37 #include <mln/test/predicate.hh>
39 #include "tests/data.hh"
41 #define CHECK(Condition) \
43 std::cout << "OK" << std::endl; \
46 std::cout << "FAIL" << std::endl; \
52 using namespace value;
61 fft<double> fourier(im1);
72 std::cout <<
"Test: Image == F-1(F(Image)) ... " << std::flush;
85 out = fourier.transformed_image_log_magn<
int_u8>(1, 100);
92 for (
int row = hlen; row < nrows - hlen; ++row)
93 for (
int col = 0; col <
ncols; ++col)
96 for (
int row = 0; row <
nrows; ++row)
97 for (
int col = hlen; col < ncols - hlen; ++col)
100 fft = fourier.transformed_image_log_magn<
int_u8>(
true);
103 out = fourier.transform_inv<
int_u8>();