Index: olena/ChangeLog
from Giovanni Palma <giovanni(a)lrde.epita.fr>
* olena/tests/level/tests/md5_level_hh0: Add file.
+2004-03-23 Giovanni Palma <giovanni(a)lrde.epita.fr>
+
* olena/tests/level/tests/md5_level_set_level_hh0: Add file.
* olena/tests/level/tests/md5_level_threshold_hh0: Likewise.
Index: olena/tests/level/tests/md5_level_hh0
--- olena/tests/level/tests/md5_level_hh0 Tue, 23 Mar 2004 16:05:35 +0100 palma_g ()
+++ olena/tests/level/tests/md5_level_hh0 Tue, 23 Mar 2004 16:03:28 +0100 palma_g
(oln/m/16_md5_level_ 644)
@@ -0,0 +1,32 @@
+// -*- c++ -*-
+#include "data.hh"
+#include <oln/utils/md5.hh>
+
+#include "check.hh"
+#include <oln/basics2d.hh>
+#include <oln/level/cc.hh>
+#include <ntg/all.hh>
+#include <iostream>
+
+int main()
+{
+ oln::utils::key::value_type data_key[16] = {0x50, 0x24, 0x28, 0x80, 0x6e,
+ 0x54, 0x9b, 0x5a, 0xff, 0x19,
+ 0xf, 0xcd, 0x4b, 0xe0, 0x38,
+ 0x3d};
+ oln::utils::key key(data_key);
+
+ unsigned card;
+ oln::image2d<ntg::bin> light = oln::load(rdata("face_se.pbm"));
+ if (oln::utils::md5(oln::level::frontp_connected_component<ntg::int_u8>
+ (light,
+ oln::neighb_c8(),
+ card)) == key)
+ std::cout << "OK" << std::endl;
+ else
+ {
+ std::cout << "FAIL" << std::endl;
+ return true;
+ }
+ std::cout << card << " connected components" << std::endl;
+}
--
Giovanni Palma
EPITA - promo 2005 - membre d'EpX - LRDE
Mob. : +33 (0)6 60 97 31 74
Show replies by date