
Index: olena/ChangeLog from Giovanni Palma <giovanni@lrde.epita.fr> * tests/topo/tests/md5_topo_dmap_hh0: Add file. * tests/topo/tests/md5_topo_tarjan_flat-zone_hh0: Likewise. +2004-03-23 Giovanni Palma <giovanni@lrde.epita.fr> + * tests/morpho/tests/md5_morpho_attribute_closing_opening_hh2: Add file. * tests/morpho/tests/md5_morpho_attribute_closing_opening_hh3: Likewise. * tests/morpho/tests/md5_morpho_attribute_closing_opening_hh4: Likewise. Index: olena/tests/topo/tests/md5_topo_tarjan_flat-zone_hh0 --- olena/tests/topo/tests/md5_topo_tarjan_flat-zone_hh0 Tue, 23 Mar 2004 15:47:49 +0100 palma_g () +++ olena/tests/topo/tests/md5_topo_tarjan_flat-zone_hh0 Tue, 23 Mar 2004 12:29:52 +0100 palma_g (oln/m/12_md5_topo_t 644) @@ -0,0 +1,28 @@ +// -*- c++ -*- +#include "data.hh" +#include <oln/utils/md5.hh> + +#include "check.hh" +#include <oln/basics2d.hh> +#include <oln/topo/tarjan/flat-zone.hh> +#include <oln/convert/stretch.hh> + +int main() +{ +oln::utils::key::value_type data_key[16] = {0x23, 0x57, 0x37, 0xc5, 0xf5, 0xd1, 0x56, 0x6b, 0x6a, 0x2b, 0x6b, 0xe6, 0x59, 0x5b, 0xbb, 0x57}; + +oln::utils::key key(data_key); + + typedef oln::image2d<ntg:: +int_u8> img_type; + img_type in = oln::load(rdata("test-cmap.pgm")); + oln::topo::tarjan::flat_zone<img_type> z(in); + if (oln::utils::md5(oln::convert::stretch_balance<ntg:: +int_u8>(z.label, 0, 255)) == key) + std::cout << "OK" << std::endl; +else + { + std::cout << "FAIL" << std::endl; + return true; + } + } Index: olena/tests/topo/tests/md5_topo_dmap_hh0 --- olena/tests/topo/tests/md5_topo_dmap_hh0 Tue, 23 Mar 2004 15:47:49 +0100 palma_g () +++ olena/tests/topo/tests/md5_topo_dmap_hh0 Tue, 23 Mar 2004 12:29:37 +0100 palma_g (oln/m/13_md5_topo_d 644) @@ -0,0 +1,29 @@ +// -*- c++ -*- +#include "data.hh" +#include <oln/utils/md5.hh> + +#include "check.hh" +#include <oln/basics2d.hh> +#include <oln/topo/dmap.hh> +#include <oln/convert/stretch.hh> + +int main() +{ +oln::utils::key::value_type data_key[16] = {0xd8, 0x5e, 0x6b, 0xc7, 0x80, 0xa6, 0xf5, 0xa2, 0x98, 0x76, 0xb2, 0x90, 0x7c, 0x45, 0x83, 0x57}; + +oln::utils::key key(data_key); + + oln::image2d<ntg::bin> in = oln::load(rdata("face_se.pbm")); + oln::topo::dmap<ntg:: +int_u<16>, +int> m(in.size(), oln::topo::chessboard()); + m.compute(in); + if (oln::utils::md5(oln::convert::stretch_balance<ntg:: +int_u8>(m.imap())) == 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