---
milena/ChangeLog | 4 +
milena/mln/world/k1/neighb2d.hh | 143 +++++++++++++++++++++++++++++++++++++++
2 files changed, 147 insertions(+), 0 deletions(-)
create mode 100644 milena/mln/world/k1/neighb2d.hh
diff --git a/milena/ChangeLog b/milena/ChangeLog
index d778238..6d98f7d 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,5 +1,9 @@
2012-09-27 Guillaume Lazzara <z(a)lrde.epita.fr>
+ * mln/world/k1/neighb2d.hh: New neighborhoods.
+
+2012-09-27 Guillaume Lazzara <z(a)lrde.epita.fr>
+
More routines working on images immersed in K1.
* mln/core/concept/function.hh: Add Function_vvvv2v concept.
diff --git a/milena/mln/world/k1/neighb2d.hh b/milena/mln/world/k1/neighb2d.hh
new file mode 100644
index 0000000..7681af1
--- /dev/null
+++ b/milena/mln/world/k1/neighb2d.hh
@@ -0,0 +1,143 @@
+// Copyright (C) 2012 EPITA Research and Development Laboratory (LRDE)
+//
+// This file is part of Olena.
+//
+// Olena is free software: you can redistribute it and/or modify it under
+// the terms of the GNU General Public License as published by the Free
+// Software Foundation, version 2 of the License.
+//
+// Olena is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Olena. If not, see <http://www.gnu.org/licenses/>.
+//
+// As a special exception, you may use this file as part of a free
+// software project without restriction. Specifically, if other files
+// instantiate templates or use macros or inline functions from this
+// file, or you compile this file and link it with other files to produce
+// an executable, this file does not by itself cause the resulting
+// executable to be covered by the GNU General Public License. This
+// exception does not however invalidate any other reasons why the
+// executable file might be covered by the GNU General Public License.
+
+/// \file
+///
+/// \brief 2D neighborhood working in K1.
+
+#ifndef MLN_WORLD_K1_NEIGHB2D_HH
+# define MLN_WORLD_K1_NEIGHB2D_HH
+
+# include <mln/core/alias/point2d.hh>
+# include <mln/core/alias/neighb2d.hh>
+# include <mln/win/multiple.hh>
+# include <mln/make/double_neighb2d.hh>
+
+namespace mln
+{
+
+ namespace world
+ {
+
+ namespace k1
+ {
+
+ /*! \brief 2 faces to 1 faces neighborhood.
+
+ \verbatim
+ -
+ |x|
+ -
+ \endverbatim
+ */
+ const neighb2d& 2to1_faces();
+
+
+ /*! \brief 1 faces to 2 faces neighborhood.
+
+ \verbatim
+ o
+ oxo or x
+ o
+ \endverbatim
+
+ */
+ const dbl_neighb2d& 1to2_faces();
+
+
+ /*! \brief 1 faces to 1 faces neighborhood.
+
+ \verbatim
+ |
+ - - | |
+ x or - -
+ - - | |
+ |
+ \endverbatim
+ */
+ const dbl_neighb2d& 1to1_faces()
+
+
+# ifndef MLN_INCLUDE_ONLY
+
+ namespace internal
+ {
+
+ inline
+ bool is_row_odd(const point2d& p)
+ {
+ return p.row() % 2;
+ }
+
+ }
+
+ typedef neighb< win::multiple<window2d, bool(*)(const point2d&)> > dbl_neighb2d;
+
+
+ const neighb2d& 2to1_faces()
+ {
+ return c4();
+ }
+
+ const dbl_neighb2d& 1to2_faces()
+ {
+ static bool 1face_h[] = { 0, 1, 0,
+ 0, 0, 0,
+ 0, 1, 0 };
+ static bool 1face_v[] = { 0, 0, 0,
+ 1, 0, 1,
+ 0, 0, 0 };
+ static dbl_neighb2d nbh = make::double_neighb2d(internal::is_row_odd, e2p_h, e2p_v);
+ return nbh;
+ }
+
+
+ const dbl_neighb2d& 1to1_faces()
+ {
+ static bool e2e_h[] = { 0, 0, 1, 0, 0,
+ 0, 1, 0, 1, 0,
+ 0, 0, 0, 0, 0,
+ 0, 1, 0, 1, 0,
+ 0, 0, 1, 0, 0 };
+ static bool e2e_v[] = { 0, 0, 0, 0, 0,
+ 0, 1, 0, 1, 0,
+ 1, 0, 0, 0, 1,
+ 0, 1, 0, 1, 0,
+ 0, 0, 0, 0, 0 };
+ static dbl_neighb2d nbh = make::double_neighb2d(internal::is_row_odd, e2e_h, e2e_v);
+ return nbh;
+ }
+
+
+
+# endif // ! MLN_INCLUDE_ONLY
+
+ } // end of namespace mln::world::k1
+
+ } // end of namespace mln::world
+
+} // end of namespace mln
+
+#endif // ! MLN_WORLD_K1_NEIGHB2D_HH
--
1.7.2.5
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Olena, a generic and efficient image processing platform".
The branch unstable/scribo has been updated
via f46deddccad811cc836aca7917a6cfbd6a5d12cc (commit)
via 6412c07f5e375f1bc8a22ae3d42288e601b3471d (commit)
via ba481b8ad2a28420b170e8e5f8a4890b2f6bd9cf (commit)
via 2ac2f4b257f2c7cdf521a100c047a828b39f39f4 (commit)
from 39c49007646f0a4b5ca021af14ee039220865935 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
No new revisions were added by this update.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
scribo/ChangeLog | 16 ++++++++++++++++
scribo/demo/viewer/main.cc | 14 --------------
scribo/scribo/text/recognition.hh | 21 ++++++++++++++++++++-
4 files changed, 41 insertions(+), 15 deletions(-)
hooks/post-receive
--
Olena, a generic and efficient image processing platform