
Index: olena/ChangeLog from Giovanni Palma <giovanni@lrde.epita.fr> * tests/core/tests/md5_apply: Add file. +2004-03-23 Giovanni Palma <giovanni@lrde.epita.fr> + * tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh0: Add file. * tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh1: Add file. * tests/convol/tests/out_olena_oln_convol_fast_gaussian_hh2: Add file. Index: olena/tests/core/tests/md5_apply --- olena/tests/core/tests/md5_apply Tue, 23 Mar 2004 14:12:19 +0100 palma_g () +++ olena/tests/core/tests/md5_apply Tue, 23 Mar 2004 12:08:01 +0100 palma_g (oln/k/22_md5_apply 644) @@ -0,0 +1,33 @@ +// -*- c++ -*- +#include "data.hh" +#include <oln/utils/md5.hh> + +#include "check.hh" +#include <oln/basics2d.hh> +#include <oln/level/threshold.hh> +#include <ntg/all.hh> +using namespace ntg; + + +int main() +{ +oln::utils::key::value_type data_key[16] = {0x98, 0xf0, 0x2f, 0x75, 0x92, 0x22, 0xbe, 0x3f, 0x36, 0x10, 0x44, 0x1e, 0x53, 0xf3, 0xb9, 0xce}; + +oln::utils::key key(data_key); + + oln::image2d< +int_u8> in = oln::load(rdata("lena256.pgm")); + +int_u8 th = 127; + rgb_8 low = rgb_8(100, 0, 0); + rgb_8 height = rgb_8(0, 200, 255); + oln::image2d<rgb_8> out = apply(oln::level::threshold< +int_u8, rgb_8 >(th, low, height), in); + if (oln::utils::md5(out) == key) + std::cout << "OK" << std::endl; +else + { + std::cout << "FAIL" << std::endl; + return true; + } + } -- Giovanni Palma EPITA - promo 2005 - membre d'EpX - LRDE Mob. : +33 (0)6 60 97 31 74
participants (1)
-
Giovanni Palma