Olena-patches
Threads by month
- ----- 2025 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- 9625 discussions
* core/internal/link_functor_base.hh,
* debug/save_object_diff.hh,
* make/text.hh,
* primitive/internal/update_link_array.hh,
* primitive/link/internal/anchors_3.hh,
* primitive/link/internal/link_ms_dmax_base.hh,
* primitive/link/internal/link_ms_dmax_ratio_base.hh,
* src/pbm_lines_in_doc.cc: Remove.
---
scribo/ChangeLog | 13 +
scribo/core/internal/link_functor_base.hh | 119 --------
scribo/debug/save_object_diff.hh | 98 -------
scribo/make/text.hh | 180 ------------
scribo/primitive/internal/update_link_array.hh | 105 -------
scribo/primitive/link/internal/anchors_3.hh | 147 ----------
.../primitive/link/internal/link_ms_dmax_base.hh | 164 -----------
.../link/internal/link_ms_dmax_ratio_base.hh | 170 -----------
scribo/src/pbm_lines_in_doc.cc | 299 --------------------
9 files changed, 13 insertions(+), 1282 deletions(-)
delete mode 100644 scribo/core/internal/link_functor_base.hh
delete mode 100644 scribo/debug/save_object_diff.hh
delete mode 100644 scribo/make/text.hh
delete mode 100644 scribo/primitive/internal/update_link_array.hh
delete mode 100644 scribo/primitive/link/internal/anchors_3.hh
delete mode 100644 scribo/primitive/link/internal/link_ms_dmax_base.hh
delete mode 100644 scribo/primitive/link/internal/link_ms_dmax_ratio_base.hh
delete mode 100644 scribo/src/pbm_lines_in_doc.cc
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index cef5ea4..3b441f7 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,18 @@
2010-08-09 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Remove deprecated files.
+
+ * core/internal/link_functor_base.hh,
+ * debug/save_object_diff.hh,
+ * make/text.hh,
+ * primitive/internal/update_link_array.hh,
+ * primitive/link/internal/anchors_3.hh,
+ * primitive/link/internal/link_ms_dmax_base.hh,
+ * primitive/link/internal/link_ms_dmax_ratio_base.hh,
+ * src/pbm_lines_in_doc.cc: Remove.
+
+2010-08-09 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Fix many tests in Scribo.
* all.hh,
diff --git a/scribo/core/internal/link_functor_base.hh b/scribo/core/internal/link_functor_base.hh
deleted file mode 100644
index addba06..0000000
--- a/scribo/core/internal/link_functor_base.hh
+++ /dev/null
@@ -1,119 +0,0 @@
-// Copyright (C) 2009 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.
-
-#ifndef SCRIBO_PRIMITIVE_LINK_INTERNAL_LINK_FUNCTOR_BASE_HH
-# define SCRIBO_PRIMITIVE_LINK_INTERNAL_LINK_FUNCTOR_BASE_HH
-
-/// \file
-///
-/// Base class for link functors.
-
-# include <mln/core/concept/image.hh>
-
-# include <mln/math/abs.hh>
-
-# include <mln/util/array.hh>
-# include <mln/util/couple.hh>
-
-# include <scribo/core/concept/link_functor.hh>
-
-# include <scribo/core/object_image.hh>
-# include <scribo/core/object_links.hh>
-
-# include <scribo/primitive/internal/init_link_array.hh>
-
-
-namespace scribo
-{
-
- namespace internal
- {
-
- /// \brief Base class for link functors.
- template <typename L, typename E>
- class link_functor_base : public Link_Functor<E>
- {
- public:
-
- typedef L support;
-
- link_functor_base(const object_image(L)& objects);
-
- const object_links<L>& links() const;
-
- unsigned link(unsigned object) const;
- const object_image(L)& objects() const;
-
- protected:
- object_links<L> links_;
- const object_image(L) objects_;
- };
-
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <typename L, typename E>
- inline
- link_functor_base<L,E>::link_functor_base(const object_image(L)& objects)
- : links_(objects, static_cast<unsigned>(objects.nlabels()) + 1),
- objects_(objects)
- {
- primitive::internal::init_link_array(links_);
- }
-
- template <typename L, typename E>
- inline
- const object_links<L>&
- link_functor_base<L,E>::links() const
- {
- return links_;
- }
-
- template <typename L, typename E>
- inline
- unsigned
- link_functor_base<L,E>::link(unsigned object) const
- {
- return links_[object];
- }
-
- template <typename L, typename E>
- inline
- const object_image(L)&
- link_functor_base<L,E>::objects() const
- {
- return objects_;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
- } // end of namespace scribo::internal
-
-} // end of namespace scribo
-
-
-#endif // ! SCRIBO_PRIMITIVE_LINK_INTERNAL_LINK_FUNCTOR_BASE_HH
diff --git a/scribo/debug/save_object_diff.hh b/scribo/debug/save_object_diff.hh
deleted file mode 100644
index e4f49f4..0000000
--- a/scribo/debug/save_object_diff.hh
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (C) 2009 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.
-
-#ifndef SCRIBO_DEBUG_SAVE_OBJECT_DIFF_HH
-# define SCRIBO_DEBUG_SAVE_OBJECT_DIFF_HH
-
-/// \file
-///
-/// Show the difference between two object images.
-
-# include <mln/core/image/image2d.hh>
-# include <mln/core/concept/image.hh>
-# include <mln/data/fill.hh>
-# include <mln/labeling/colorize.hh>
-# include <mln/value/rgb8.hh>
-# include <mln/io/ppm/save.hh>
-# include <mln/literal/black.hh>
-# include <mln/literal/colors.hh>
-# include <mln/pw/all.hh>
-# include <mln/core/image/dmorph/image_if.hh>
-
-# include <scribo/core/macros.hh>
-# include <scribo/core/object_image.hh>
-
-namespace scribo
-{
-
- namespace debug
- {
-
- using namespace mln;
-
- /*! \brief Show the difference between two object images.
-
- \param[in] lbl An object image.
- \param[in] lbl_2 Another object image.
- \param[in] filename The output filename.
-
- */
- template <typename L, typename L2>
- void
- save_object_diff(const object_image(L)& lbl, const object_image(L2)& lbl_2,
- const std::string& filename);
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- template <typename L, typename L2>
- void
- save_object_diff(const object_image(L)& lbl, const object_image(L2)& lbl_2,
- const std::string& filename)
- {
- image2d<value::rgb8> output;
- initialize(output, lbl_2);
-
- data::fill(output, literal::black);
-
- for_all_components(i, lbl.bboxes())
- data::fill(((output | lbl.bbox(i)).rw() | (pw::value(lbl) == i)).rw(), literal::red);
-
- for_all_components(i, lbl_2.bboxes())
- data::fill(((output | lbl_2.bbox(i)).rw() | (pw::value(lbl_2) == i)).rw(), literal::green);
-
- io::ppm::save(output, filename);
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
- } // end of namespace scribo::debug
-
-} // end of namespace scribo
-
-#endif // ! SCRIBO_DEBUG_SAVE_OBJECT_DIFF_HH
diff --git a/scribo/make/text.hh b/scribo/make/text.hh
deleted file mode 100644
index 6d10ef3..0000000
--- a/scribo/make/text.hh
+++ /dev/null
@@ -1,180 +0,0 @@
-// Copyright (C) 2009 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.
-
-#ifndef SCRIBO_MAKE_TEXT_HH
-# define SCRIBO_MAKE_TEXT_HH
-
-/// \file
-///
-/// Construct a util::text.
-
-# include <mln/core/concept/image.hh>
-# include <mln/core/concept/neighborhood.hh>
-# include <mln/core/site_set/box.hh>
-# include <mln/fun/i2v/array.hh>
-# include <mln/labeling/blobs.hh>
-# include <mln/labeling/compute.hh>
-# include <mln/labeling/relabel.hh>
-# include <mln/util/array.hh>
-# include <mln/make/relabelfun.hh>
-
-# include <scribo/core/macros.hh>
-# include <scribo/util/text.hh>
-
-
-namespace scribo
-{
-
- namespace make
- {
-
-
- /// Construct a util::text
- ///
- /// \param[in] bboxes Text component bounding boxes.
- /// \param[in] lbl Associated label image.
- /// \param[in] nbboxes The number of bounding boxes.
- ///
- /// \return A util::text.
- template <typename L>
- scribo::util::text<L>
- text(const mln::util::array<box<mln_site(L)> >& bboxes,
- const Image<L>& lbl,
- mln_value(L)& nbboxes);
-
- /// Construct a util::text
- ///
- /// \param[in] input_ A binary image.
- /// \param[in] nbh_ A neighborhood to be used with labeling algorithms.
- /// \param[in] nbboxes The number of bounding boxes.
- ///
- /// \return A util::text.
- template <typename I, typename N, typename V>
- scribo::util::text<mln_ch_value(I,V)>
- text(const Image<I>& input_, const Neighborhood<N>& nbh_,
- V& nbboxes);
-
-
- /// Construct a new util::text from another one.
- ///
- /// \param[in] text A text structure.
- /// \param[in] f_ A function v2v or v2b. It will be used to regroup text
- /// components.
- ///
- /// \return a new util::text.
- //
- template <typename L, typename F>
- scribo::util::text<L>
- text(const scribo::util::text<L>& text,
- const Function<F>& f_);
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <typename L>
- scribo::util::text<L>
- text(const mln::util::array<box<mln_site(L)> >& bboxes,
- const Image<L>& lbl,
- mln_value(L)& nbboxes)
- {
- trace::entering("scribo::make::text");
-
- mln_precondition(exact(lbl).is_valid());
-
- scribo::util::text<L> result = scribo::util::text<L>(bboxes, lbl,
- nbboxes);
-
- trace::exiting("scribo::make::text");
- return result;
- }
-
-
-
- template <typename I, typename N, typename V>
- scribo::util::text<mln_ch_value(I,V)>
- text(const Image<I>& input_, const Neighborhood<N>& nbh_,
- V& nbboxes)
- {
- trace::entering("scribo::make::text");
-
- const I& input = exact(input_);
- const N& nbh = exact(nbh_);
-
- mln_precondition(input.is_valid());
- mln_precondition(nbh.is_valid());
-
- typedef mln::util::array< box<mln_site(I)> > boxes_t;
-
- mln_ch_value(I,V) lbl = labeling::blobs(input, nbh, nbboxes);
-
- boxes_t cboxes = labeling::compute(accu::meta::shape::bbox(), lbl, nbboxes);
-
- trace::exiting("scribo::make::text");
- return make::text(cboxes, lbl, nbboxes);
- }
-
-
- template <typename L, typename F>
- scribo::util::text<L>
- text(const scribo::util::text<L>& text,
- const Function<F>& f_)
- {
- trace::entering("scribo::make::text");
-
- mln_precondition(text.is_valid());
- const F& f = exact(f_);
-
- mln_value(L) new_nbboxes;
- mln::fun::i2v::array<mln_value(L)> fv2v
- = mln::make::relabelfun(f, text.nbboxes(), new_nbboxes);
-
- L lbl = labeling::relabel(text.label_image(), text.nbboxes(), fv2v);
-
- mln::util::array< accu::shape::bbox<mln_site(L)> > tboxes(new_nbboxes.next());
- mln::util::array< accu::center<mln_site(L)> > tcenters(new_nbboxes.next());
- for_all_comps(i, text.bboxes())
- {
- tboxes[fv2v(i)].take(text.bbox(i));
- tcenters[fv2v(i)].take(text.mass_center(i));
- }
-
- scribo::util::text<L> new_text;
- new_text.nbboxes() = new_nbboxes;
- new_text.label_image() = lbl;
- convert::from_to(tboxes, new_text.bboxes());
- convert::from_to(tcenters, new_text.mass_centers());
-
- trace::exiting("scribo::make::text");
- return new_text;
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace scribo::make
-
-} // end of namespace scribo
-
-#endif // ! SCRIBO_MAKE_TEXT_HH
diff --git a/scribo/primitive/internal/update_link_array.hh b/scribo/primitive/internal/update_link_array.hh
deleted file mode 100644
index f7fdf44..0000000
--- a/scribo/primitive/internal/update_link_array.hh
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (C) 2009 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.
-
-#ifndef SCRIBO_PRIMITIVE_INTERNAL_UPDATE_LINK_ARRAY_HH
-# define SCRIBO_PRIMITIVE_INTERNAL_UPDATE_LINK_ARRAY_HH
-
-/// \file
-///
-/// Update a lookup table if a neighbor is found on the right of
-/// the current bbox.
-///
-/// \todo To be deleted.
-
-# include <mln/core/concept/image.hh>
-# include <mln/util/array.hh>
-# include <mln/math/abs.hh>
-
-
-namespace scribo
-{
-
- namespace primitive
- {
-
- namespace internal
- {
-
- using namespace mln;
-
-
- /// Update the lookup table \p link_array if a neighbor is found
- /// on the right of the current bbox.
- ///
- /// \param[in] lbl A label image.
- /// \param[in] link_array Links of bounding boxes.
- /// \param[in] p A site of \p lbl.
- /// \param[in] c A site of \p lbl.
- //
- template <typename I>
- bool
- update_link_array(const Image<I>& lbl,
- mln::util::array<unsigned>& link_array,
- const mln_site(I)& p, const mln_site(I)& c,
- unsigned i, float dmax);
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <typename I>
- inline
- bool
- update_link_array(const Image<I>& lbl_,
- mln::util::array<unsigned>& link_array,
- const mln_site(I)& p, const mln_site(I)& c,
- unsigned i, float dmax)
- {
- const I& lbl = exact(lbl_);
-
- mlc_is_a(mln_value(I), mln::value::Symbolic)::check();
- mln_assertion(lbl.is_valid());
-
- if (lbl.domain().has(p) // Not outside image domain
- && lbl(p) != literal::zero // Not the background
- && lbl(p) != i // Not the current component
- && static_cast<float>((math::abs(p.col() - c.col()))) < dmax // Not too far
- && link_array[lbl(p)] != i) // Not creating a loop
- {
- link_array[i] = lbl(p);
- return true;
- }
-
- return false;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace scribo::primitive::internal
-
- } // end of namespace scribo::text
-
-} // end of namespace scribo
-
-
-#endif // ! SCRIBO_PRIMITIVE_INTERNAL_UPDATE_LINK_ARRAY_HH
diff --git a/scribo/primitive/link/internal/anchors_3.hh b/scribo/primitive/link/internal/anchors_3.hh
deleted file mode 100644
index 3be9658..0000000
--- a/scribo/primitive/link/internal/anchors_3.hh
+++ /dev/null
@@ -1,147 +0,0 @@
-// Copyright (C) 2009 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.
-
-#ifndef SCRIBO_PRIMITIVE_LINK_INTERNAL_ANCHORS_3_HH
-# define SCRIBO_PRIMITIVE_LINK_INTERNAL_ANCHORS_3_HH
-
-/// \file
-///
-/// Routine providing 3 anchors for neighbor seeking.
-
-# include <mln/math/min.hh>
-# include <mln/util/array.hh>
-
-# include <scribo/core/object_image.hh>
-
-
-namespace scribo
-{
-
- namespace primitive
- {
-
- namespace link
- {
-
- namespace internal
- {
-
- /*! \brief Return the proper anchor used to find a neighbor.
-
- This routine provides up to 3 different anchors.
-
- \param[in] objects An object image.
- \param[in] mass_centers Object mass centers.
- \param[in] current_object An object id.
- \param[in] anchor The expected anchor.
-
- Anchor can take one of the following values:
- - 0, top anchor.
- - 1, center anchor. It is the mass center.
- - 2, bottom anchor.
-
-
- Top and bottom anchors are respectively computed from the
- bbox pmin and the bbox pmax, P.
-
- Then the output anchor coordinates are computed as follows:
-
- out.col = bbox.center.col
-
- if object height, h, is lower than 30.
- out.row = P.row + min(2, (h + 1) / 2 - 1)
- else
- out.row = P.row - min(10, h /10)
-
- */
- template <typename L, typename P>
- mln_site(L)
- anchors_3(const object_image(L)& objects,
- const mln::util::array<P>& mass_centers,
- unsigned current_object, unsigned anchor);
-
-
-# ifndef MLN_INCLUDE_ONLY
-
- template <typename L, typename P>
- mln_site(L)
- anchors_3(const object_image(L)& objects,
- const mln::util::array<P>& mass_centers,
- unsigned current_object, unsigned anchor)
- {
- unsigned h = objects.bbox(current_object).pmax().row()
- - objects.bbox(current_object).pmin().row();
-
- mln_site(L) sp = objects.bbox(current_object).center();
- mln::def::coord r;
-
- switch (anchor)
- {
- // Top
- case 0:
- if (h < 30)
- r = objects.bbox(current_object).pmin().row()
- + mln::math::min(2u, (h + 1) / 2 - 1);
- else
- r = objects.bbox(current_object).pmin().row()
- - mln::math::min(10u, h /10);
- break;
-
-
- // Center
- case 1:
- return mass_centers(current_object);
-
-
- // Bottom
- case 2:
- if (h < 30)
- r = objects.bbox(current_object).pmax().row()
- + mln::math::min(2u, (h + 1) / 2 - 1);
- else
- r = objects.bbox(current_object).pmax().row()
- - mln::math::min(10u, h /10);
- break;
-
- default:
- mln::trace::warning("Non handled anchor");
- mln_assertion(anchor > 2);
- }
-
- sp.row() = r;
- return sp;
- }
-
-# endif // ! MLN_INCLUDE_ONLY
-
- } // end of namespace scribo::primitive::link::internal
-
- } // end of namespace scribo::primitive::link
-
- } // end of namespace scribo::primitive
-
-} // end of namespace scribo
-
-#endif // ! SCRIBO_PRIMITIVE_LINK_INTERNAL_ANCHORS_3_HH
diff --git a/scribo/primitive/link/internal/link_ms_dmax_base.hh b/scribo/primitive/link/internal/link_ms_dmax_base.hh
deleted file mode 100644
index edb0941..0000000
--- a/scribo/primitive/link/internal/link_ms_dmax_base.hh
+++ /dev/null
@@ -1,164 +0,0 @@
-// Copyright (C) 2009 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.
-
-#ifndef SCRIBO_PRIMITIVE_LINK_INTERNAL_LINK_MS_DMAX_HH_
-# define SCRIBO_PRIMITIVE_LINK_INTERNAL_LINK_MS_DMAX_HH_
-
-/// \file
-///
-/// Base class for link functors using mass centers and a given max
-/// distance.
-
-
-# include <mln/accu/center.hh>
-# include <mln/labeling/compute.hh>
-# include <mln/math/abs.hh>
-# include <mln/util/array.hh>
-
-# include <scribo/core/macros.hh>
-# include <scribo/core/object_image.hh>
-# include <scribo/core/object_links.hh>
-
-# include <scribo/primitive/link/internal/find_link.hh>
-# include <scribo/primitive/link/internal/link_functor_base.hh>
-
-# include <scribo/primitive/link/compute.hh>
-
-
-namespace scribo
-{
-
- namespace primitive
- {
-
- namespace link
- {
-
- namespace internal
- {
-
- /// \brief Base class for link functors using mass centers and
- /// a given max distance.
- //
- template <typename L, typename E>
- class link_ms_dmax_base
- : public link_functor_base<L, E>
- {
- typedef link_functor_base<L,E> super_;
- typedef mln_result(accu::center<mln_psite(L)>) ms_t;
-
- public:
-
- typedef mln_site(L) P;
-
-
- link_ms_dmax_base(const object_image(L)& objects,
- unsigned neighb_max_distance,
- anchor::Direction direction);
-
- bool verify_link_criterion_(unsigned current_object,
- const P& start_point, const P& p) const;
-
- mln_site(L) start_point_(unsigned current_object,
- unsigned anchor);
-
- void start_processing_object_(unsigned current_object);
-
- private:
- float dmax_;
- float neighb_max_distance_;
- anchor::Direction direction_;
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- template <typename L, typename E>
- inline
- link_ms_dmax_base<L, E>::link_ms_dmax_base(
- const object_image(L)& objects,
- unsigned neighb_max_distance,
- anchor::Direction direction)
-
- : super_(objects),
- dmax_(0),
- neighb_max_distance_(neighb_max_distance),
- direction_(direction)
- {
- }
-
-
- template <typename L, typename E>
- inline
- bool
- link_ms_dmax_base<L, E>::verify_link_criterion_(unsigned current_object,
- const P& start_point,
- const P& p) const
- {
- (void) current_object;
-
- float dist = math::abs(p[direction_] - start_point[direction_]);
- return dist <= dmax_; // Not too far
- }
-
-
- template <typename L, typename E>
- inline
- mln_site(L)
- link_ms_dmax_base<L, E>::start_point_(unsigned current_object,
- unsigned anchor)
- {
- (void) anchor;
- return this->objects_.mass_center(current_object);
- }
-
-
- template <typename L, typename E>
- inline
- void
- link_ms_dmax_base<L, E>::start_processing_object_(
- unsigned current_object)
- {
- float
- midcol = (this->objects_.bbox(current_object).pmax()[direction_]
- - this->objects_.bbox(current_object).pmin()[direction_]) / 2;
- dmax_ = midcol + neighb_max_distance_;
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
- } // end of namespace scribo::primitive::link::internal
-
- } // end of namespace scribo::primitive::link
-
- } // end of namespace scribo::primitive
-
-} // end of namespace scribo
-
-
-#endif // SCRIBO_PRIMITIVE_LINK_INTERNAL_LINK_MS_DMAX_HH_
diff --git a/scribo/primitive/link/internal/link_ms_dmax_ratio_base.hh b/scribo/primitive/link/internal/link_ms_dmax_ratio_base.hh
deleted file mode 100644
index 915296d..0000000
--- a/scribo/primitive/link/internal/link_ms_dmax_ratio_base.hh
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright (C) 2009 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.
-
-#ifndef SCRIBO_PRIMITIVE_LINK_INTERNAL_LINK_MS_DMAX_RATIO_BASE_HH_
-# define SCRIBO_PRIMITIVE_LINK_INTERNAL_LINK_MS_DMAX_RATIO_BASE_HH_
-
-/// \file
-///
-/// \brief Base class for link functors using mass centers and a
-/// proportional max distance.
-
-
-# include <mln/accu/center.hh>
-# include <mln/labeling/compute.hh>
-# include <mln/math/abs.hh>
-# include <mln/math/max.hh>
-# include <mln/util/array.hh>
-
-# include <scribo/core/macros.hh>
-# include <scribo/core/object_image.hh>
-# include <scribo/core/object_links.hh>
-
-# include <scribo/primitive/link/internal/find_link.hh>
-# include <scribo/primitive/link/internal/link_functor_base.hh>
-
-# include <scribo/primitive/link/compute.hh>
-
-
-namespace scribo
-{
-
- namespace primitive
- {
-
- namespace link
- {
-
- namespace internal
- {
-
- /// \brief Base class for link functors using mass centers and
- /// a proportional max distance.
- //
- template <typename L, typename E>
- class link_ms_dmax_ratio_base
- : public link_functor_base<L, E>
- {
- typedef link_functor_base<L,E> super_;
- typedef mln_result(accu::center<mln_psite(L)>) ms_t;
-
- public:
-
- typedef mln_site(L) P;
-
-
- link_ms_dmax_ratio_base(const object_image(L)& objects,
- float dmax_ratio,
- anchor::Direction direction);
-
-
-
- bool verify_link_criterion_(unsigned current_object,
- const P& start_point, const P& p) const;
-
- mln_site(L) start_point_(unsigned current_object,
- unsigned anchor);
-
- void start_processing_object_(unsigned current_object);
-
- private:
- float dmax_ratio_;
- float dmax_;
- anchor::Direction direction_;
- };
-
-
-# ifndef MLN_INCLUDE_ONLY
-
-
- template <typename L, typename E>
- inline
- link_ms_dmax_ratio_base<L, E>::link_ms_dmax_ratio_base(
- const object_image(L)& objects,
- float dmax_ratio,
- anchor::Direction direction)
-
- : super_(objects),
- dmax_ratio_(dmax_ratio),
- dmax_(0),
- direction_(direction)
- {
- }
-
- template <typename L, typename E>
- inline
- bool
- link_ms_dmax_ratio_base<L, E>::verify_link_criterion_(
- unsigned current_object,
- const P& start_point,
- const P& p) const
- {
- mln_assertion(dmax_ != 0);
- (void) current_object;
-
- float dist = math::abs(p[direction_] - start_point[direction_]);
- return dist <= dmax_; // Not too far
- }
-
-
- template <typename L, typename E>
- inline
- mln_site(L)
- link_ms_dmax_ratio_base<L, E>::start_point_(unsigned current_object,
- unsigned anchor)
- {
- (void) anchor;
- return this->objects_.mass_center(current_object);
- }
-
-
- template <typename L, typename E>
- inline
- void
- link_ms_dmax_ratio_base<L, E>::start_processing_object_(
- unsigned current_object)
- {
- float
- w = this->objects_.bbox(current_object).width();
-// h = (this->objects_.bbox(current_object).pmax().row()
-// - this->objects_.bbox(current_object).pmin().row());
-// dmax_ = (w / 2.0f) + (dmax_ratio_ * math::max(w, h));
- dmax_ = (w / 2.0f) + (dmax_ratio_ * w);
- }
-
-
-# endif // ! MLN_INCLUDE_ONLY
-
-
- } // end of namespace scribo::primitive::link::internal
-
- } // end of namespace scribo::primitive::link
-
- } // end of namespace scribo::primitive
-
-} // end of namespace scribo
-
-
-#endif // SCRIBO_PRIMITIVE_LINK_INTERNAL_LINK_MS_DMAX_RATIO_BASE_HH_
diff --git a/scribo/src/pbm_lines_in_doc.cc b/scribo/src/pbm_lines_in_doc.cc
deleted file mode 100644
index 8363b61..0000000
--- a/scribo/src/pbm_lines_in_doc.cc
+++ /dev/null
@@ -1,299 +0,0 @@
-// Copyright (C) 2009 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.
-
-
-#include <libgen.h>
-#include <iostream>
-#include <fstream>
-
-#include <mln/core/image/image2d.hh>
-#include <mln/core/alias/neighb2d.hh>
-
-#include <mln/logical/not.hh>
-
-#include <mln/labeling/colorize.hh>
-
-#include <mln/io/pbm/all.hh>
-#include <mln/io/ppm/save.hh>
-#include <mln/io/dump/save.hh>
-
-#include <mln/math/min.hh>
-
-#include <mln/literal/colors.hh>
-#include <mln/value/rgb8.hh>
-#include <mln/value/label_16.hh>
-
-#include <mln/draw/box.hh>
-
-#include <mln/extension/adjust.hh>
-
-#include <scribo/table/erase.hh>
-
-#include <scribo/draw/bounding_boxes.hh>
-
-#include <scribo/primitive/extract/objects.hh>
-#include <scribo/primitive/extract/lines_h_discontinued.hh>
-#include <scribo/primitive/extract/lines_v_discontinued.hh>
-
-#include <scribo/primitive/link/merge_double_link.hh>
-#include <scribo/primitive/link/with_single_left_link_dmax_ratio.hh>
-#include <scribo/primitive/link/with_single_right_link_dmax_ratio.hh>
-
-#include <scribo/primitive/group/apply.hh>
-#include <scribo/primitive/group/from_double_link.hh>
-#include <scribo/primitive/group/from_single_link.hh>
-
-#include <scribo/filter/object_links_bottom_aligned.hh>
-#include <scribo/filter/object_links_bbox_h_ratio.hh>
-#include <scribo/filter/object_links_bbox_overlap.hh>
-
-#include <scribo/filter/objects_large.hh>
-#include <scribo/filter/objects_small.hh>
-#include <scribo/filter/objects_thin.hh>
-#include <scribo/filter/objects_thick.hh>
-
-#include <scribo/filter/object_groups_small.hh>
-
-#include <scribo/debug/decision_image.hh>
-#include <scribo/debug/save_bboxes_image.hh>
-#include <scribo/debug/save_bboxes_image.hh>
-#include <scribo/debug/save_linked_bboxes_image.hh>
-
-#include <scribo/debug/usage.hh>
-
-#include <scribo/make/debug_filename.hh>
-
-
-const char *args_desc[][2] =
-{
- { "input.pbm", "A binary image. 'False' for objects, 'True'\
-for the background." },
- { "out.ppm", "Show the text found in the input." },
- { "object_label.dump", "Object labeled image." },
- { "line_label.dump", "Text lines labeled image." },
- { "bbox_100p.txt", "Text file containing pmin and pmax of text line bounding boxes." },
- { "bbox_50p.txt", "Text file containing pmin and pmax of text line bounding boxes." },
- { "output_dir", "Output directory for debug image" },
- {0, 0}
-};
-
-
-int main(int argc, char* argv[])
-{
- using namespace scribo;
- using namespace mln;
-
- if (argc != 7 && argc != 8)
- return scribo::debug::usage(argv,
- "Find text lines in a document",
- "input.pbm out.ppm object_label.dump line_label.dump bbox_100p.txt bbox_50p.txt [output_dir]",
- args_desc,
- "Debug outputs. The recognized text is printed in the standard output.");
-
- if (argc == 8)
- scribo::make::internal::debug_filename_prefix = argv[7];
-
- trace::entering("main");
-
-
- bool enable_debug = (argc == 5);
-
- image2d<bool> input;
- io::pbm::load(input, argv[1]);
-
- typedef image2d<value::label_16> L;
-
- /// Finding objects.
- std::cout << "Finding objects..." << std::endl;
- value::label_16 nobjects;
- object_image(L)
- objects = scribo::primitive::extract::objects(input,
- c8(),
- nobjects);
-
-
- /// First filtering.
- std::cout << "Filtering objects..." << std::endl;
- object_image(L) filtered_objects
- = scribo::filter::objects_small(objects, 6);
-
-
- filtered_objects
- = scribo::filter::objects_large(filtered_objects,
- math::min(input.ncols(), input.nrows())
- * math::min(input.ncols(), input.nrows()) / 5);
-
-
-
- /// Linking potential objects
- std::cout << "Linking objects..." << std::endl;
- object_links<L> left_link
- = primitive::link::with_single_left_link_dmax_ratio(filtered_objects);
- object_links<L> right_link
- = primitive::link::with_single_right_link_dmax_ratio(filtered_objects);
-
-
-#ifndef NOUT
- if (enable_debug)
- {
- std::cerr << "BEFORE - nobjects = " << nobjects << std::endl;
- scribo::debug::save_linked_bboxes_image(input,
- filtered_objects,
- left_link, right_link,
- literal::red, literal::cyan,
- literal::yellow,
- literal::green,
- scribo::make::debug_filename("links.ppm"));
- }
-#endif
-
-
- // Validating left and right links.
- object_links<L>
- merged_links = primitive::link::merge_double_link(filtered_objects,
- left_link,
- right_link);
-
-
-
-
- // Remove links if bboxes have too different sizes.
- object_links<L> hratio_filtered_links
- = filter::object_links_bbox_h_ratio(filtered_objects,
- merged_links,
- 2.0f);
-
-
-
-
-#ifndef NOUT
- if (enable_debug)
- {
- image2d<value::rgb8>
- hratio_decision_image = scribo::debug::decision_image(input,
- merged_links,
- hratio_filtered_links);
- io::ppm::save(hratio_decision_image,
- scribo::make::debug_filename("hratio_links_decision_image.ppm"));
- }
-#endif
-
-
-
-
- //Remove links if bboxes overlap too much.
- object_links<L> overlap_filtered_links
- = filter::object_links_bbox_overlap(filtered_objects,
- hratio_filtered_links,
- 0.8f);
-
-
-
-
-#ifndef NOUT
- if (enable_debug)
- {
- image2d<value::rgb8> overlap_decision_image
- = scribo::debug::decision_image(input,
- hratio_filtered_links,
- overlap_filtered_links);
- io::ppm::save(overlap_decision_image,
- scribo::make::debug_filename("overlap_links_decision_image.ppm"));
- }
-#endif
-
-
-
-
- object_groups<L>
- groups = primitive::group::from_single_link(filtered_objects,
- overlap_filtered_links);
-
-
- std::cout << "Grouping objects..." << std::endl;
- object_image(L)
- grouped_objects = primitive::group::apply(filtered_objects, groups);
-
-
-
- std::cout << "Saving line bboxes..." << std::endl;
-
- // 100p bboxes
- {
- std::ofstream out;
- out.open(argv[5], std::ios_base::trunc);
-
- if (! out)
- {
- std::cout << "Can't create output file!" << std::endl;
- return 1;
- }
-
- for_all_ncomponents(i, grouped_objects.nlabels())
- {
- out << grouped_objects.bbox(i).pmin().row() << " "
- << grouped_objects.bbox(i).pmin().col()
- << " "
- << grouped_objects.bbox(i).pmax().row() << " "
- << grouped_objects.bbox(i).pmax().col()
- << std::endl;
- }
- out.close();
-
- }
-
- // 50p bboxes
- {
- std::ofstream out;
- out.open(argv[6], std::ios_base::trunc);
-
- if (! out)
- {
- std::cout << "Can't create output file!" << std::endl;
- return 1;
- }
-
- for_all_ncomponents(i, grouped_objects.nlabels())
- {
- out << grouped_objects.bbox(i).pmin().row() / 2 << " "
- << grouped_objects.bbox(i).pmin().col() / 2
- << " "
- << grouped_objects.bbox(i).pmax().row() / 2 << " "
- << grouped_objects.bbox(i).pmax().col() / 2
- << std::endl;
- }
- out.close();
-
- }
-
- scribo::debug::save_bboxes_image(input, grouped_objects.bboxes(),
- literal::red,
- argv[2]);
-
- io::dump::save(filtered_objects, argv[3]);
- io::dump::save(grouped_objects, argv[4]);
-
- trace::exiting("main");
-}
--
1.5.6.5
1
0
* mln/accu/internal/base.hh,
* mln/accu/math/sum.hh: Aesthetic changes.
* mln/data/paste_without_localization.hh: Add a missing include.
* mln/geom/rotate.hh: Add a new overload taking a box as argument.
---
milena/ChangeLog | 11 +++
milena/mln/accu/internal/base.hh | 4 +-
milena/mln/accu/math/sum.hh | 3 +-
milena/mln/data/paste_without_localization.hh | 1 +
milena/mln/geom/rotate.hh | 93 +++++++++++++++++++++----
5 files changed, 96 insertions(+), 16 deletions(-)
diff --git a/milena/ChangeLog b/milena/ChangeLog
index 710cfc9..15a205c 100644
--- a/milena/ChangeLog
+++ b/milena/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-09 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Small changes in Milena.
+
+ * mln/accu/internal/base.hh,
+ * mln/accu/math/sum.hh: Aesthetic changes.
+
+ * mln/data/paste_without_localization.hh: Add a missing include.
+
+ * mln/geom/rotate.hh: Add a new overload taking a box as argument.
+
2010-08-04 Guillaume Lazzara <z(a)lrde.epita.fr>
Replace deduced type 'point' by 'site'.
diff --git a/milena/mln/accu/internal/base.hh b/milena/mln/accu/internal/base.hh
index 8c03cc3..a554a11 100644
--- a/milena/mln/accu/internal/base.hh
+++ b/milena/mln/accu/internal/base.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -33,7 +34,6 @@
# include <mln/core/concept/accumulator.hh>
-
namespace mln
{
diff --git a/milena/mln/accu/math/sum.hh b/milena/mln/accu/math/sum.hh
index c7e3e47..a77e2a2 100644
--- a/milena/mln/accu/math/sum.hh
+++ b/milena/mln/accu/math/sum.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2007, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2007, 2008, 2009 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
diff --git a/milena/mln/data/paste_without_localization.hh b/milena/mln/data/paste_without_localization.hh
index 1aad2fe..667e7f1 100644
--- a/milena/mln/data/paste_without_localization.hh
+++ b/milena/mln/data/paste_without_localization.hh
@@ -35,6 +35,7 @@
# include <mln/core/concept/image.hh>
# include <mln/core/box_runstart_piter.hh>
+# include <mln/border/get.hh>
namespace mln
{
diff --git a/milena/mln/geom/rotate.hh b/milena/mln/geom/rotate.hh
index 0d42943..1ba8cb1 100644
--- a/milena/mln/geom/rotate.hh
+++ b/milena/mln/geom/rotate.hh
@@ -72,7 +72,8 @@ namespace mln
/// of the domain before the rotation.
/// \param[in] output_domain The domain of the output image. An
/// invalid domain, causes the routine
- /// to use the rotated input_ domain.
+ /// to use a domain large enough to
+ /// display the whole original image.
///
/// \return An image with the same domain as \p input.
//
@@ -95,6 +96,24 @@ namespace mln
rotate(const Image<I>& input, double angle);
+ /// Rotate a box.
+ ///
+ /// FIXME: the return type may be too generic and may lead to
+ /// invalid covariance.
+ //
+ template <typename B>
+ B
+ rotate(const Box<B>& box_, double angle, const mln_site(B)& ref);
+
+ /// \overload
+ ///
+ /// The rotation center \p ref is set to box.pcenter().
+ //
+ template <typename B>
+ B
+ rotate(const Box<B>& box, double angle);
+
+
# ifndef MLN_INCLUDE_ONLY
@@ -112,6 +131,8 @@ namespace mln
// Do not check that output_domain_ is valid. If it is not,
// further in this routine, we define a default domain.
+ typedef mln_site(I) P;
+ mln_precondition(P::dim == 2);
mln_precondition(input.is_valid());
mln_precondition(angle >= -360.0f && angle <= 360.0f);
// mlc_converts_to(mln_exact(Ext), mln_value(I))::check();
@@ -138,26 +159,16 @@ namespace mln
S b = output_domain;
// Automatically adjusting the output domain if needed.
if (!output_domain.is_valid())
- {
- accu::shape::bbox<mln_site(I)> accu;
-
- typedef mln_site(I) P;
- accu.take(P(comp_transf(input.domain().pmin().to_vec())));
- accu.take(P(comp_transf(input.domain().pmax().to_vec())));
-
- b = accu.to_result();
- }
+ b = rotate(input.domain(), angle);
typedef
- typename mln::internal::extension_type<const I, mln_exact(Ext)>::result ext_t;
+ typename mln::internal::extension_type<const I, mln_exact(Ext)>::result ext_t;
typedef
tr_image<mln_box(I), ext_t, comp_transf_t> tr_t;
tr_t tr = transposed_image(b, ext_t(input, extension), comp_transf);
- typedef mln_site(I) P;
- P rpmin = P(rot(input.domain().pmin().to_vec()));
mln_concrete(I) output;
initialize(output, tr);
@@ -189,6 +200,62 @@ namespace mln
}
+ template <typename B>
+ B
+ rotate(const Box<B>& box_, double angle, const mln_site(B)& ref)
+ {
+ trace::entering("geom::rotate");
+
+ const B& box = exact(box_);
+
+ typedef mln_site(B) P;
+ mln_precondition(P::dim == 2);
+ mln_precondition(box.is_valid());
+ mln_precondition(angle >= -360.0f && angle <= 360.0f);
+
+ typedef fun::x2x::translation<2,double> trans_t;
+ trans_t
+ t(-1 * ref.to_vec()),
+ t_1(ref.to_vec());
+
+ typedef fun::x2x::rotation<2,double> rot_t;
+ rot_t rot(math::pi * angle / 180.f, literal::origin);
+
+ typedef
+ fun::x2x::composed<trans_t, fun::x2x::composed<rot_t, trans_t> >
+ comp_transf_t;
+
+ comp_transf_t comp_transf = compose(t_1, compose(rot, t));
+
+ accu::shape::bbox<P> accu;
+
+ P
+ top_right(box.pmin().row(),
+ box.pmax().col()),
+ bot_left(box.pmax().row(),
+ box.pmin().col());
+
+ accu.take(P(comp_transf(box.pmin().to_vec())));
+ accu.take(P(comp_transf(top_right.to_vec())));
+ accu.take(P(comp_transf(bot_left.to_vec())));
+ accu.take(P(comp_transf(box.pmax().to_vec())));
+
+ B output = accu.to_result();
+
+ trace::exiting("geom::rotate");
+ return output;
+ }
+
+
+ template <typename B>
+ B
+ rotate(const Box<B>& box, double angle)
+ {
+ return rotate(box, angle, exact(box).pcenter());
+ }
+
+
+
# endif // ! MLN_INCLUDE_ONLY
--
1.5.6.5
1
0
* all.hh,
* binarization/all.hh,
* binarization/internal/first_pass_functor.hh,
* convert/from_qimage.hh,
* core/tag/component.hh,
* core/tag/line.hh,
* debug/links_decision_image.hh,
* debug/mean_and_base_lines_image.hh,
* filter/object_groups_with_holes.hh,
* io/xml/save.hh,
* make/all.hh,
* postprocessing/all.hh,
* postprocessing/fill_object_holes.hh,
* preprocessing/all.hh,
* preprocessing/crop_without_localization.hh,
* preprocessing/denoise_bg.hh,
* preprocessing/denoise_fg.hh,
* preprocessing/deskew.hh,
* preprocessing/deskew_crop.hh,
* preprocessing/split_bg_fg.hh,
* primitive/extract/all.hh,
* primitive/extract/lines_h_single.hh,
* primitive/extract/lines_pattern.hh,
* primitive/extract/lines_v_single.hh,
* primitive/group/all.hh,
* primitive/internal/all.hh,
* primitive/internal/is_link_valid.hh,
* primitive/link/all.hh,
* primitive/link/internal/compute_anchor.hh,
* primitive/link/internal/dmax_functor_base.hh,
* primitive/regroup/from_single_left_link.hh,
* primitive/remove/separators.hh,
* subsampling/bilinear.hh,
* text/merging.hh,
* toolchain/nepomuk/text_extraction.hh,
* upsampling/eagle.hh: Add missing headers in order to fix
unit-tests.
* tests/Makefile.am: Disable "table" directory's tests.
* tests/core/Makefile.am: Remove object_image test.
* tests/core/object_image.cc: Remove. Deprecated.
* tests/filter/objects_with_holes.cc,
* tests/filter/small_and_large_bboxes.cc: Write a real test.
* tests/unit_test/Makefile.am: Add specific flags for unit-tests
using tesseract and image magick.
---
scribo/ChangeLog | 54 +++++++++++++++
scribo/all.hh | 8 ++-
.../{core/def/lbl_type.hh => binarization/all.hh} | 29 +++++---
scribo/binarization/internal/first_pass_functor.hh | 8 ++-
scribo/convert/from_qimage.hh | 1 +
scribo/core/tag/component.hh | 5 +-
scribo/core/tag/line.hh | 5 +-
scribo/debug/links_decision_image.hh | 2 +
scribo/debug/mean_and_base_lines_image.hh | 4 +-
scribo/filter/object_groups_with_holes.hh | 10 ++-
scribo/io/xml/save.hh | 30 +++++----
scribo/make/all.hh | 4 +-
.../def/lbl_type.hh => postprocessing/all.hh} | 22 +++---
scribo/postprocessing/fill_object_holes.hh | 9 ++-
scribo/preprocessing/all.hh | 21 +++++-
scribo/preprocessing/crop_without_localization.hh | 6 +-
scribo/preprocessing/denoise_bg.hh | 5 +-
scribo/preprocessing/denoise_fg.hh | 25 ++-----
scribo/preprocessing/deskew.hh | 2 +
scribo/preprocessing/deskew_crop.hh | 2 +-
scribo/preprocessing/split_bg_fg.hh | 3 +-
scribo/primitive/extract/all.hh | 4 +-
scribo/primitive/extract/lines_h_single.hh | 2 +-
scribo/primitive/extract/lines_pattern.hh | 4 +-
scribo/primitive/extract/lines_v_single.hh | 2 +
scribo/primitive/group/all.hh | 5 +-
scribo/primitive/internal/all.hh | 8 +-
scribo/primitive/internal/is_link_valid.hh | 8 +-
scribo/primitive/link/all.hh | 7 +-
scribo/primitive/link/internal/compute_anchor.hh | 7 ++-
.../primitive/link/internal/dmax_functor_base.hh | 2 +
scribo/primitive/regroup/from_single_left_link.hh | 4 +
scribo/primitive/remove/separators.hh | 2 +
scribo/subsampling/bilinear.hh | 5 ++
scribo/tests/Makefile.am | 5 +-
scribo/tests/core/Makefile.am | 8 +--
scribo/tests/core/object_image.cc | 72 --------------------
scribo/tests/filter/objects_with_holes.cc | 67 +++++++++++-------
scribo/tests/filter/small_and_large_bboxes.cc | 62 +++++------------
scribo/tests/unit_test/Makefile.am | 32 +++++++++
scribo/text/merging.hh | 2 +-
scribo/toolchain/nepomuk/text_extraction.hh | 3 +
scribo/upsampling/eagle.hh | 4 +
43 files changed, 324 insertions(+), 246 deletions(-)
copy scribo/{core/def/lbl_type.hh => binarization/all.hh} (67%)
copy scribo/{core/def/lbl_type.hh => postprocessing/all.hh} (79%)
delete mode 100644 scribo/tests/core/object_image.cc
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 08477d4..cef5ea4 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,3 +1,57 @@
+2010-08-09 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix many tests in Scribo.
+
+ * all.hh,
+ * binarization/all.hh,
+ * binarization/internal/first_pass_functor.hh,
+ * convert/from_qimage.hh,
+ * core/tag/component.hh,
+ * core/tag/line.hh,
+ * debug/links_decision_image.hh,
+ * debug/mean_and_base_lines_image.hh,
+ * filter/object_groups_with_holes.hh,
+ * io/xml/save.hh,
+ * make/all.hh,
+ * postprocessing/all.hh,
+ * postprocessing/fill_object_holes.hh,
+ * preprocessing/all.hh,
+ * preprocessing/crop_without_localization.hh,
+ * preprocessing/denoise_bg.hh,
+ * preprocessing/denoise_fg.hh,
+ * preprocessing/deskew.hh,
+ * preprocessing/deskew_crop.hh,
+ * preprocessing/split_bg_fg.hh,
+ * primitive/extract/all.hh,
+ * primitive/extract/lines_h_single.hh,
+ * primitive/extract/lines_pattern.hh,
+ * primitive/extract/lines_v_single.hh,
+ * primitive/group/all.hh,
+ * primitive/internal/all.hh,
+ * primitive/internal/is_link_valid.hh,
+ * primitive/link/all.hh,
+ * primitive/link/internal/compute_anchor.hh,
+ * primitive/link/internal/dmax_functor_base.hh,
+ * primitive/regroup/from_single_left_link.hh,
+ * primitive/remove/separators.hh,
+ * subsampling/bilinear.hh,
+ * text/merging.hh,
+ * toolchain/nepomuk/text_extraction.hh,
+ * upsampling/eagle.hh: Add missing headers in order to fix
+ unit-tests.
+
+ * tests/Makefile.am: Disable "table" directory's tests.
+
+ * tests/core/Makefile.am: Remove object_image test.
+
+ * tests/core/object_image.cc: Remove. Deprecated.
+
+ * tests/filter/objects_with_holes.cc,
+ * tests/filter/small_and_large_bboxes.cc: Write a real test.
+
+ * tests/unit_test/Makefile.am: Add specific flags for unit-tests
+ using tesseract and image magick.
+
2010-07-21 Roland Levillain <roland(a)lrde.epita.fr>
Have Tesseract-related parts of Scribo compile again.
diff --git a/scribo/all.hh b/scribo/all.hh
index 4debad0..c9805d3 100644
--- a/scribo/all.hh
+++ b/scribo/all.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -37,15 +38,16 @@ namespace scribo
} // end of namespace scribo
+# include <scribo/binarization/all.hh>
# include <scribo/core/all.hh>
# include <scribo/debug/all.hh>
# include <scribo/draw/all.hh>
# include <scribo/filter/all.hh>
# include <scribo/make/all.hh>
+# include <scribo/postprocessing/all.hh>
# include <scribo/preprocessing/all.hh>
# include <scribo/primitive/all.hh>
-# include <scribo/table/all.hh>
+//# include <scribo/table/all.hh>
# include <scribo/text/all.hh>
-# include <scribo/util/all.hh>
#endif // ! SCRIBO_ALL_HH
diff --git a/scribo/core/def/lbl_type.hh b/scribo/binarization/all.hh
similarity index 67%
copy from scribo/core/def/lbl_type.hh
copy to scribo/binarization/all.hh
index 6434bbe..6f40505 100644
--- a/scribo/core/def/lbl_type.hh
+++ b/scribo/binarization/all.hh
@@ -23,26 +23,33 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
-#ifndef SCRIBO_CORE_LBL_TYPE_HH
-# define SCRIBO_CORE_LBL_TYPE_HH
+#ifndef SCRIBO_BINARIZATION_ALL_HH
+# define SCRIBO_BINARIZATION_ALL_HH
/// \file
///
-/// Global type definition for labels.
-
-# include <mln/value/label.hh>
-
+/// Include all headers located in scribo/binarization.
namespace scribo
{
- namespace def
+ /// Namespace of binarization routines.
+ namespace binarization
{
- typedef mln::value::label<30u> lbl_type;
-
- } // end of namespace scribo::def
+ } // end of namespace scribo::binarization
} // end of namespace scribo
-#endif // ! SCRIBO_CORE_DEF_HH
+
+# include <scribo/binarization/global_threshold.hh>
+# include <scribo/binarization/global_threshold_auto.hh>
+
+# include <scribo/binarization/local_threshold.hh>
+
+# include <scribo/binarization/sauvola.hh>
+# include <scribo/binarization/sauvola_ms.hh>
+# include <scribo/binarization/sauvola_ms_split.hh>
+# include <scribo/binarization/sauvola_threshold_image.hh>
+
+#endif // ! SCRIBO_BINARIZATION_ALL_HH
diff --git a/scribo/binarization/internal/first_pass_functor.hh b/scribo/binarization/internal/first_pass_functor.hh
index 4d47d94..96c7cfb 100644
--- a/scribo/binarization/internal/first_pass_functor.hh
+++ b/scribo/binarization/internal/first_pass_functor.hh
@@ -26,7 +26,11 @@
#ifndef SCRIBO_BINARIZATION_INTERNAL_FIRST_PASS_FUNCTOR_HH
# define SCRIBO_BINARIZATION_INTERNAL_FIRST_PASS_FUNCTOR_HH
+# include <mln/core/image/image2d.hh>
+# include <mln/core/alias/neighb2d.hh>
+# include <mln/extension/fill.hh>
# include <mln/value/int_u8.hh>
+# include <mln/data/fill.hh>
# include <scribo/binarization/sauvola_threshold_image.hh>
@@ -95,7 +99,7 @@ namespace scribo
initialize(debug_k_l, input);
# endif // ! SCRIBO_SAUVOLA_DEBUG
- extension::fill(msk, false);
+ mln::extension::fill(msk, false);
initialize(card, input);
data::fill(card, 1);
@@ -153,8 +157,6 @@ namespace scribo
void finalize()
{
mln_assertion(! pxl.is_valid());
-
-// std::cout << std::endl << " ------- " << std::endl;
}
};
diff --git a/scribo/convert/from_qimage.hh b/scribo/convert/from_qimage.hh
index b297c2f..353e1ba 100644
--- a/scribo/convert/from_qimage.hh
+++ b/scribo/convert/from_qimage.hh
@@ -35,6 +35,7 @@
# include <QtGui/QImage>
+# include <mln/core/image/image2d.hh>
# include <mln/value/qt/rgb32.hh>
# if QT_VERSION < 0x040000
diff --git a/scribo/core/tag/component.hh b/scribo/core/tag/component.hh
index 3c061b3..5ed51fa 100644
--- a/scribo/core/tag/component.hh
+++ b/scribo/core/tag/component.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -26,6 +27,8 @@
#ifndef SCRIBO_CORE_TAG_COMPONENT_HH
# define SCRIBO_CORE_TAG_COMPONENT_HH
+# include <iostream>
+
/// \file
///
/// \brief Component tags.
diff --git a/scribo/core/tag/line.hh b/scribo/core/tag/line.hh
index f571188..ccb8cd1 100644
--- a/scribo/core/tag/line.hh
+++ b/scribo/core/tag/line.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -26,6 +27,8 @@
#ifndef SCRIBO_CORE_TAG_LINE_HH
# define SCRIBO_CORE_TAG_LINE_HH
+# include <iostream>
+
/// \file
///
/// \brief Line tags.
diff --git a/scribo/debug/links_decision_image.hh b/scribo/debug/links_decision_image.hh
index 944d17e..387cd7f 100644
--- a/scribo/debug/links_decision_image.hh
+++ b/scribo/debug/links_decision_image.hh
@@ -35,6 +35,8 @@
# include <mln/data/convert.hh>
# include <mln/value/rgb8.hh>
# include <mln/literal/colors.hh>
+# include <mln/draw/box.hh>
+# include <mln/draw/line.hh>
# include <scribo/core/object_links.hh>
diff --git a/scribo/debug/mean_and_base_lines_image.hh b/scribo/debug/mean_and_base_lines_image.hh
index 16a9aad..56055c9 100644
--- a/scribo/debug/mean_and_base_lines_image.hh
+++ b/scribo/debug/mean_and_base_lines_image.hh
@@ -37,6 +37,7 @@
# include <mln/literal/colors.hh>
# include <mln/draw/box.hh>
+# include <mln/draw/line.hh>
# include <mln/draw/dashed_line.hh>
# include <scribo/core/line_set.hh>
@@ -96,7 +97,8 @@ namespace scribo
trace::entering("scribo::debug::mean_and_base_lines_image");
mln_precondition(exact(input).is_valid());
- image2d<value::rgb8> output = data::convert(value::rgb8(), input);
+ mln_ch_value(I, value::rgb8)
+ output = data::convert(value::rgb8(), input);
for_all_lines(l, lines)
{
diff --git a/scribo/filter/object_groups_with_holes.hh b/scribo/filter/object_groups_with_holes.hh
index 28cd928..e833092 100644
--- a/scribo/filter/object_groups_with_holes.hh
+++ b/scribo/filter/object_groups_with_holes.hh
@@ -33,6 +33,7 @@
# include <sstream>
+# include <mln/core/image/image2d.hh>
# include <mln/core/concept/image.hh>
# include <mln/core/alias/neighb2d.hh>
# include <mln/core/routine/extend.hh>
@@ -42,6 +43,7 @@
# include <mln/geom/nrows.hh>
# include <mln/extension/duplicate.hh>
+# include <mln/extension/adjust_fill.hh>
# include <mln/draw/box_plain.hh>
# include <mln/util/array.hh>
@@ -50,8 +52,12 @@
# include <mln/fun/i2v/array.hh>
+
# include <scribo/core/macros.hh>
# include <scribo/core/component_set.hh>
+# include <scribo/core/object_groups.hh>
+
+# include <scribo/primitive/group/apply.hh>
namespace scribo
@@ -98,7 +104,7 @@ namespace scribo
typedef mln_dpsite(P) D;
const L& lbl = components.labeled_image();
- extension::adjust_fill(lbl, 1, 0);
+ mln::extension::adjust_fill(lbl, 1, 0);
mln_concrete(L) output;
initialize(output, lbl);
@@ -160,7 +166,7 @@ namespace scribo
neighb2d nbh = c8();
- image2d<unsigned> parent, card;
+ mln_ch_value(L,unsigned) parent, card;
L bboxes_ima;
// Will store the first background component id associated
diff --git a/scribo/io/xml/save.hh b/scribo/io/xml/save.hh
index 1d5cd6c..f13396f 100644
--- a/scribo/io/xml/save.hh
+++ b/scribo/io/xml/save.hh
@@ -30,8 +30,12 @@
///
/// \brief Save text line information as XML.
-#include <fstream>
-#include <sstream>
+# include <fstream>
+# include <sstream>
+
+# include <map>
+
+# include <scribo/core/line_set.hh>
namespace scribo
{
@@ -66,8 +70,8 @@ namespace scribo
namespace internal
{
- std::string&
- html_markups_replace(std::string& input,
+ std::string&
+ html_markups_replace(std::string& input,
std::map<char, std::string>& map)
{
for (unsigned i = 0; i < input.size(); ++i)
@@ -83,7 +87,7 @@ namespace scribo
}
} // end of namespace scribo::io::xml::internal
-
+
template <typename L>
void
save(const std::string& input_name,
@@ -114,7 +118,7 @@ namespace scribo
{
file << "<pcGts xmlns=\"http://schema.primaresearch.org/PAGE/gts/pagecontent/2009-03-16\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://schema.primaresearch.org/PAGE/gts/pagecontent/2009-03-16 http://schema.primaresearch.org/PAGE/gts/pagecontent/2009-03-16/pagecontent…" pcGtsId=\"" << input_name << "\">" << std::endl;
}
-
+
file << " <PcMetadata>" << std::endl;
file << " <PcCreator>LRDE</PcCreator>" << std::endl;
file << " <PcCreated/>" << std::endl;
@@ -190,20 +194,20 @@ namespace scribo
<< " <point x=\"" << lines(l).bbox().pmin().col()
<< "\" y=\"" << lines(l).bbox().pmax().row() << "\"/>"
<< std::endl
- << " </coords>" << std::endl;
-
+ << " </coords>" << std::endl;
+
if (lines(l).has_text())
{
std::string tmp = lines(l).text();
tmp = internal::html_markups_replace(tmp, html_map);
-
+
file << " <line text=\""
<< tmp
<< "\">" << std::endl;
}
else
file << " <line>" << std::endl;
-
+
file << " <coords>" << std::endl
<< " <point x=\"" << lines(l).bbox().pmin().col()
<< "\" y=\"" << lines(l).bbox().pmin().row() << "\"/>"
@@ -218,12 +222,12 @@ namespace scribo
<< "\" y=\"" << lines(l).bbox().pmax().row() << "\"/>"
<< std::endl
<< " </coords>" << std::endl;
-
+
file << " </line>" << std::endl;
- file << " </paragraph>" << std::endl;
+ file << " </paragraph>" << std::endl;
}
-
+
file << " </text_region>" << std::endl;
}
}
diff --git a/scribo/make/all.hh b/scribo/make/all.hh
index 8fb3ca0..71888e8 100644
--- a/scribo/make/all.hh
+++ b/scribo/make/all.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -42,7 +43,6 @@ namespace scribo
} // end of namespace scribo
# include <scribo/make/influence_zone_graph.hh>
-# include <scribo/make/text.hh>
# include <scribo/make/debug_filename.hh>
diff --git a/scribo/core/def/lbl_type.hh b/scribo/postprocessing/all.hh
similarity index 79%
copy from scribo/core/def/lbl_type.hh
copy to scribo/postprocessing/all.hh
index 6434bbe..4a2ca4d 100644
--- a/scribo/core/def/lbl_type.hh
+++ b/scribo/postprocessing/all.hh
@@ -23,26 +23,26 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
-#ifndef SCRIBO_CORE_LBL_TYPE_HH
-# define SCRIBO_CORE_LBL_TYPE_HH
+#ifndef SCRIBO_POSTPROCESSING_ALL_HH
+# define SCRIBO_POSTPROCESSING_ALL_HH
/// \file
///
-/// Global type definition for labels.
-
-# include <mln/value/label.hh>
-
+/// Include all headers located in scribo/postprocessing.
namespace scribo
{
- namespace def
+ /// Namespace of postprocessing routines.
+ namespace postprocessing
{
- typedef mln::value::label<30u> lbl_type;
-
- } // end of namespace scribo::def
+ } // end of namespace scribo::postprocessing
} // end of namespace scribo
-#endif // ! SCRIBO_CORE_DEF_HH
+
+# include <scribo/postprocessing/fill_object_holes.hh>
+
+
+#endif // ! SCRIBO_POSTPROCESSING_ALL_HH
diff --git a/scribo/postprocessing/fill_object_holes.hh b/scribo/postprocessing/fill_object_holes.hh
index 7dc53eb..43c02ab 100644
--- a/scribo/postprocessing/fill_object_holes.hh
+++ b/scribo/postprocessing/fill_object_holes.hh
@@ -36,7 +36,7 @@
# include <sstream>
-# include <mln/core/concept/image.hh>
+# include <mln/core/image/image2d.hh>
# include <mln/core/alias/neighb2d.hh>
# include <mln/core/routine/extend.hh>
# include <mln/core/image/dmorph/extended.hh>
@@ -160,7 +160,7 @@ namespace scribo
inline
object_groups<L>
fill_object_holes(const object_groups<L>& groups,
- unsigned min_size)
+ unsigned min_size)
{
trace::entering("scribo::postprocessing::impl::generic::fill_object_holes");
@@ -178,7 +178,7 @@ namespace scribo
util::array<bool> bg_comps_done(
static_cast<unsigned>(components.nelements()) + 1, false);
- fun::i2v::array<bool>
+ mln::fun::i2v::array<bool>
to_keep(static_cast<unsigned>(components.nelements()) + 1,
false);
@@ -328,10 +328,11 @@ namespace scribo
{
trace::entering("scribo::postprocessing::fill_object_holes");
+ const I& input = exact(input_);
+
mln_precondition(input.is_valid());
mlc_is(mln_value(I), bool)::check();
- const I& input = exact(input_);
mln_concrete(I) output = duplicate(input);
typedef value::int_u16 L;
diff --git a/scribo/preprocessing/all.hh b/scribo/preprocessing/all.hh
index 93974cf..6f13e07 100644
--- a/scribo/preprocessing/all.hh
+++ b/scribo/preprocessing/all.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -41,6 +42,22 @@ namespace scribo
} // end of namespace scribo
-# include <scribo/preprocessing/unskew.hh>
+
+# include <scribo/preprocessing/crop.hh>
+# include <scribo/preprocessing/crop_without_localization.hh>
+
+# include <scribo/preprocessing/denoise.hh>
+# include <scribo/preprocessing/denoise_fg.hh>
+# include <scribo/preprocessing/denoise_bg.hh>
+
+# include <scribo/preprocessing/homogeneous_contrast.hh>
+
+# include <scribo/preprocessing/rotate_90.hh>
+
+# include <scribo/preprocessing/split_bg_fg.hh>
+
+# include <scribo/preprocessing/deskew.hh>
+# include <scribo/preprocessing/deskew_crop.hh>
+
#endif // ! SCRIBO_PREPROCESSING_ALL_HH
diff --git a/scribo/preprocessing/crop_without_localization.hh b/scribo/preprocessing/crop_without_localization.hh
index 18c5ee7..7346aee 100644
--- a/scribo/preprocessing/crop_without_localization.hh
+++ b/scribo/preprocessing/crop_without_localization.hh
@@ -55,7 +55,8 @@ namespace scribo
*/
template <typename I>
mln_concrete(I)
- crop_without_localization(const Image<I>& input, const mln_box(I)& domain);
+ crop_without_localization(const Image<I>& input,
+ const mln_box(I)& domain);
# ifndef MLN_INCLUDE_ONLY
@@ -63,7 +64,8 @@ namespace scribo
template <typename I>
mln_concrete(I)
- crop_without_localization(const Image<I>& input, const mln_box(I)& domain)
+ crop_without_localization(const Image<I>& input,
+ const mln_box(I)& domain)
{
trace::entering("scribo::preprocessing::crop_without_localization");
mln_assertion(exact(input).is_valid());
diff --git a/scribo/preprocessing/denoise_bg.hh b/scribo/preprocessing/denoise_bg.hh
index 14837bb..8ad2d45 100644
--- a/scribo/preprocessing/denoise_bg.hh
+++ b/scribo/preprocessing/denoise_bg.hh
@@ -30,7 +30,7 @@
///
/// Denoise image background.
-# include <mln/core/concept/image.hh>
+# include <mln/core/image/image2d.hh>
# include <mln/core/concept/neighborhood.hh>
# include <mln/core/concept/function.hh>
# include <mln/data/transform.hh>
@@ -113,6 +113,9 @@ namespace scribo
namespace preprocessing
{
+ using namespace mln;
+
+
template <typename I, typename N>
mln_concrete(I)
denoise_bg(const Image<I>& input_, const Neighborhood<N>& nbh_,
diff --git a/scribo/preprocessing/denoise_fg.hh b/scribo/preprocessing/denoise_fg.hh
index 5909164..9701d06 100644
--- a/scribo/preprocessing/denoise_fg.hh
+++ b/scribo/preprocessing/denoise_fg.hh
@@ -30,10 +30,9 @@
///
/// Denoise image foreground.
-# include <mln/core/concept/image.hh>
+# include <mln/core/image/image2d.hh>
# include <mln/core/concept/neighborhood.hh>
# include <mln/core/concept/function.hh>
-# include <mln/data/transform.hh>
# include <mln/accu/math/count.hh>
@@ -42,8 +41,10 @@
# include <mln/util/array.hh>
# include <mln/fun/i2v/array.hh>
-# include <mln/labeling/foreground.hh>
+# include <mln/data/transform.hh>
+
# include <mln/labeling/compute.hh>
+# include <mln/labeling/foreground.hh>
# include <scribo/fun/v2b/label_to_bool.hh>
@@ -73,20 +74,9 @@ namespace scribo
unsigned min_card);
- } // end of namespace scribo::preprocessing
-
-} // end of namespace mln
-
-
# ifndef MLN_INCLUDE_ONLY
-namespace scribo
-{
-
- namespace preprocessing
- {
-
template <typename I, typename N>
mln_concrete(I)
denoise_fg(const Image<I>& input_, const Neighborhood<N>& nbh_,
@@ -99,7 +89,6 @@ namespace scribo
mlc_equal(mln_value(I), bool)::check();
mln_precondition(input.is_valid());
- // FIXME:
unsigned nlabels;
image2d<unsigned> lbl = labeling::foreground(input, nbh, nlabels);
@@ -120,12 +109,10 @@ namespace scribo
return output;
}
+# endif // ! MLN_INCLUDE_ONLY
} // end of namespace scribo::preprocessing
-} // end of namespace mln
-
-
-# endif // ! MLN_INCLUDE_ONLY
+} // end of namespace scribo
# endif // SCRIBO_PREPROCESSING_DENOISE_FG_HH
diff --git a/scribo/preprocessing/deskew.hh b/scribo/preprocessing/deskew.hh
index 27d38a1..81331a7 100644
--- a/scribo/preprocessing/deskew.hh
+++ b/scribo/preprocessing/deskew.hh
@@ -34,9 +34,11 @@
# include <queue>
+
# include <mln/core/image/image2d.hh>
# include <mln/math/pi.hh>
# include <mln/geom/rotate.hh>
+# include <mln/value/int_u8.hh>
# define PI 3.1415926535897932384
diff --git a/scribo/preprocessing/deskew_crop.hh b/scribo/preprocessing/deskew_crop.hh
index 3b15cb1..988e803 100644
--- a/scribo/preprocessing/deskew_crop.hh
+++ b/scribo/preprocessing/deskew_crop.hh
@@ -138,7 +138,7 @@ namespace scribo
// }
-// } // end of namespace scribo::preprocessing::internal
+ } // end of namespace scribo::preprocessing::internal
// Facade
diff --git a/scribo/preprocessing/split_bg_fg.hh b/scribo/preprocessing/split_bg_fg.hh
index 1ad056a..5094f32 100644
--- a/scribo/preprocessing/split_bg_fg.hh
+++ b/scribo/preprocessing/split_bg_fg.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
diff --git a/scribo/primitive/extract/all.hh b/scribo/primitive/extract/all.hh
index 5ccb83b..de759e1 100644
--- a/scribo/primitive/extract/all.hh
+++ b/scribo/primitive/extract/all.hh
@@ -50,7 +50,7 @@ namespace scribo
} // end of namespace scribo
# include <scribo/primitive/extract/lines_pattern.hh>
-# include <scribo/primitive/extract/canvas.hh>
+//# include <scribo/primitive/extract/canvas.hh>
# include <scribo/primitive/extract/lines_h_thick.hh>
# include <scribo/primitive/extract/lines_h_single.hh>
# include <scribo/primitive/extract/lines_v_single.hh>
@@ -60,7 +60,7 @@ namespace scribo
# include <scribo/primitive/extract/lines_v_discontinued.hh>
# include <scribo/primitive/extract/lines_h_pattern.hh>
# include <scribo/primitive/extract/components.hh>
-# include <scribo/primitive/extract/cells.hh>
+//# include <scribo/primitive/extract/cells.hh>
# include <scribo/primitive/extract/lines_thick.hh>
# include <scribo/primitive/extract/lines_h_discontinued.hh>
# include <scribo/primitive/extract/lines_v_pattern.hh>
diff --git a/scribo/primitive/extract/lines_h_single.hh b/scribo/primitive/extract/lines_h_single.hh
index ad6b794..1bff2f4 100644
--- a/scribo/primitive/extract/lines_h_single.hh
+++ b/scribo/primitive/extract/lines_h_single.hh
@@ -33,8 +33,8 @@
# include <mln/core/concept/image.hh>
# include <mln/core/concept/neighborhood.hh>
-# include <mln/win/hline2d.hh>
+# include <scribo/core/component_set.hh>
# include <scribo/primitive/extract/components.hh>
diff --git a/scribo/primitive/extract/lines_pattern.hh b/scribo/primitive/extract/lines_pattern.hh
index 5f9950a..bc23012 100644
--- a/scribo/primitive/extract/lines_pattern.hh
+++ b/scribo/primitive/extract/lines_pattern.hh
@@ -34,11 +34,13 @@
/// \todo Make a more generic canvas.
# include <mln/core/concept/image.hh>
-# include <mln/core/alias/window2d.hh>
+# include <mln/core/concept/window.hh>
# include <mln/core/routine/duplicate.hh>
# include <mln/extension/adjust_fill.hh>
+# include <mln/geom/ncols.hh>
+
# include <mln/accu/transform_line.hh>
# include <mln/accu/count_value.hh>
diff --git a/scribo/primitive/extract/lines_v_single.hh b/scribo/primitive/extract/lines_v_single.hh
index c67dfca..67b9f9d 100644
--- a/scribo/primitive/extract/lines_v_single.hh
+++ b/scribo/primitive/extract/lines_v_single.hh
@@ -35,6 +35,8 @@
# include <mln/core/concept/neighborhood.hh>
# include <mln/win/hline2d.hh>
+# include <scribo/core/component_set.hh>
+# include <scribo/primitive/extract/components.hh>
namespace scribo
{
diff --git a/scribo/primitive/group/all.hh b/scribo/primitive/group/all.hh
index 75f0685..b9ad5d3 100644
--- a/scribo/primitive/group/all.hh
+++ b/scribo/primitive/group/all.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -50,7 +51,7 @@ namespace scribo
# include <scribo/primitive/group/apply.hh>
# include <scribo/primitive/group/from_double_link.hh>
-# include <scribo/primitive/group/from_graph.hh>
+//# include <scribo/primitive/group/from_graph.hh>
# include <scribo/primitive/group/from_single_link.hh>
diff --git a/scribo/primitive/internal/all.hh b/scribo/primitive/internal/all.hh
index 26f5d5b..1e190d0 100644
--- a/scribo/primitive/internal/all.hh
+++ b/scribo/primitive/internal/all.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -49,9 +50,8 @@ namespace scribo
# include <scribo/primitive/internal/is_link_valid.hh>
# include <scribo/primitive/internal/find_root.hh>
-# include <scribo/primitive/internal/find_graph_link.hh>
-# include <scribo/primitive/internal/update_graph_link.hh>
-# include <scribo/primitive/internal/update_link_array.hh>
+//# include <scribo/primitive/internal/find_graph_link.hh>
+//# include <scribo/primitive/internal/update_graph_link.hh>
#endif // ! SCRIBO_PRIMITIVE_INTERNAL_ALL_HH
diff --git a/scribo/primitive/internal/is_link_valid.hh b/scribo/primitive/internal/is_link_valid.hh
index 5510699..b18e55c 100644
--- a/scribo/primitive/internal/is_link_valid.hh
+++ b/scribo/primitive/internal/is_link_valid.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -29,12 +30,11 @@
/// \file
///
/// Validate a link from two different links.
-///
-/// \todo To be deleted ?.
-# include <mln/util/array.hh>
# include <mln/util/couple.hh>
+# include <scribo/core/object_links.hh>
+
namespace scribo
{
diff --git a/scribo/primitive/link/all.hh b/scribo/primitive/link/all.hh
index 7313adb..dbce148 100644
--- a/scribo/primitive/link/all.hh
+++ b/scribo/primitive/link/all.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -49,9 +50,9 @@ namespace scribo
-# include <scribo/primitive/link/with_several_graphes.hh>
+//# include <scribo/primitive/link/with_several_graphes.hh>
# include <scribo/primitive/link/with_several_right_links.hh>
-# include <scribo/primitive/link/with_graph.hh>
+//# include <scribo/primitive/link/with_graph.hh>
# include <scribo/primitive/link/with_single_left_link.hh>
# include <scribo/primitive/link/with_several_left_links.hh>
# include <scribo/primitive/link/with_single_right_link.hh>
diff --git a/scribo/primitive/link/internal/compute_anchor.hh b/scribo/primitive/link/internal/compute_anchor.hh
index b1ca77d..1c52b91 100644
--- a/scribo/primitive/link/internal/compute_anchor.hh
+++ b/scribo/primitive/link/internal/compute_anchor.hh
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -31,7 +32,9 @@
/// Routine providing anchors for neighbor seeking.
# include <mln/math/min.hh>
-# include <mln/util/array.hh>
+
+# include <scribo/core/tag/anchor.hh>
+# include <scribo/core/component_set.hh>
namespace scribo
diff --git a/scribo/primitive/link/internal/dmax_functor_base.hh b/scribo/primitive/link/internal/dmax_functor_base.hh
index 8ff3f10..67a8db4 100644
--- a/scribo/primitive/link/internal/dmax_functor_base.hh
+++ b/scribo/primitive/link/internal/dmax_functor_base.hh
@@ -48,6 +48,8 @@ namespace scribo
namespace internal
{
+ using namespace mln;
+
/// \brief Base class for dmax functors.
template <typename E>
diff --git a/scribo/primitive/regroup/from_single_left_link.hh b/scribo/primitive/regroup/from_single_left_link.hh
index c90e35c..adb5b06 100644
--- a/scribo/primitive/regroup/from_single_left_link.hh
+++ b/scribo/primitive/regroup/from_single_left_link.hh
@@ -45,7 +45,11 @@
# include <scribo/core/macros.hh>
# include <scribo/core/component_set.hh>
# include <scribo/core/object_links.hh>
+# include <scribo/core/object_groups.hh>
+# include <scribo/primitive/group/apply.hh>
+# include <scribo/primitive/group/from_single_link.hh>
+# include <scribo/primitive/link/with_single_left_link.hh>
# include <scribo/primitive/link/internal/find_link.hh>
# include <scribo/primitive/link/internal/link_single_dmax_base.hh>
diff --git a/scribo/primitive/remove/separators.hh b/scribo/primitive/remove/separators.hh
index 11e9fee..23d5fd1 100644
--- a/scribo/primitive/remove/separators.hh
+++ b/scribo/primitive/remove/separators.hh
@@ -39,6 +39,8 @@
# include <mln/data/fill.hh>
+# include <mln/border/resize.hh>
+
namespace scribo
{
diff --git a/scribo/subsampling/bilinear.hh b/scribo/subsampling/bilinear.hh
index 534865a..b3d77ee 100644
--- a/scribo/subsampling/bilinear.hh
+++ b/scribo/subsampling/bilinear.hh
@@ -31,6 +31,10 @@
/// Bilinear subsampling.
# include <mln/core/concept/image.hh>
+# include <mln/core/alias/box2d.hh>
+# include <mln/geom/max_col.hh>
+# include <mln/geom/max_row.hh>
+
# include <mln/opt/at.hh>
@@ -40,6 +44,7 @@ namespace scribo
namespace subsampling
{
+ using namespace mln;
template <typename I>
mln_concrete(I)
diff --git a/scribo/tests/Makefile.am b/scribo/tests/Makefile.am
index 4214e37..a6ed969 100644
--- a/scribo/tests/Makefile.am
+++ b/scribo/tests/Makefile.am
@@ -21,11 +21,14 @@ SUBDIRS = \
core \
filter \
preprocessing \
- table \
text \
toolchain \
unit_test
+# Disabled directories:
+#
+# table
+
# Regen files recursively.
include $(top_srcdir)/build-aux/regen-recursive.mk
REGEN_SUBDIRS += unit_test
diff --git a/scribo/tests/core/Makefile.am b/scribo/tests/core/Makefile.am
index a7773ec..cf1c528 100644
--- a/scribo/tests/core/Makefile.am
+++ b/scribo/tests/core/Makefile.am
@@ -1,4 +1,5 @@
-# Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE).
+# Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+# (LRDE).
#
# This file is part of Olena.
#
@@ -19,9 +20,6 @@
include $(top_srcdir)/scribo/tests/tests.mk
-check_PROGRAMS = \
- object_image
-
-object_image_SOURCES = object_image.cc
+check_PROGRAMS =
TESTS = $(check_PROGRAMS)
diff --git a/scribo/tests/core/object_image.cc b/scribo/tests/core/object_image.cc
deleted file mode 100644
index 9ac6152..0000000
--- a/scribo/tests/core/object_image.cc
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (C) 2009 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.
-
-#include <iostream>
-
-#include <mln/core/image/image2d.hh>
-#include <mln/make/image.hh>
-#include <mln/fun/i2v/array.hh>
-
-#include <scribo/core/object_image.hh>
-
-#include <mln/debug/println.hh>
-
-int main(int argc, char* argv[])
-{
- using namespace mln;
-
- unsigned data[4][4] = { {1, 0, 0, 0},
- {0, 0, 2, 0},
- {3, 0, 0, 0},
- {0, 0, 4, 0} };
-
- typedef image2d<unsigned> I;
- I ima = make::image(data);
-
- object_image(I) lbl(ima, 4);
-
- fun::i2v::array<unsigned> f(5);
- f(0) = 0;
- f(1) = 1;
- f(2) = 4;
- f(3) = 3;
- f(4) = 4;
-
- // { {1, 0, 0, 0},
- // {0, 0, 2, 0},
- // {3, 0, 0, 0},
- // {0, 0, 2, 0} };
- lbl.relabel(f);
-
-
- mln_assertion(lbl.bbox(1) == make::box2d(0, 0, 0,0));
- mln_assertion(lbl.mass_center(1) == point2d(0,0));
-
- mln_assertion(lbl.bbox(2) == make::box2d(1, 2, 3,2));
- mln_assertion(lbl.mass_center(2) == point2d(2,2));
-
- mln_assertion(lbl.bbox(3) == make::box2d(2, 0, 2,0));
- mln_assertion(lbl.mass_center(3) == point2d(2,0));
-}
diff --git a/scribo/tests/filter/objects_with_holes.cc b/scribo/tests/filter/objects_with_holes.cc
index 5396962..ca852a9 100644
--- a/scribo/tests/filter/objects_with_holes.cc
+++ b/scribo/tests/filter/objects_with_holes.cc
@@ -1,49 +1,62 @@
+// Copyright (C) 2009, 2010 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.
+
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/io/pbm/load.hh>
#include <mln/value/label_8.hh>
-
-#include <mln/util/timer.hh>
-#include <mln/labeling/background.hh>
#include <mln/value/label_32.hh>
#include <mln/data/convert.hh>
#include <mln/data/wrap.hh>
-#include <mln/debug/println.hh>
-
-
-
#include <scribo/filter/objects_with_holes.hh>
-#include <scribo/primitive/extract/objects.hh>
+#include <scribo/primitive/extract/components.hh>
+
+#include <scribo/tests/data.hh>
int main(int argc, char *argv[])
{
using namespace mln;
+ using namespace scribo;
- if (argc != 2)
- return 1;
+ std::string img = SCRIBO_IMG_DIR "/text_to_group_and_clean.pbm";
image2d<bool> input;
- io::pbm::load(input, argv[1]);
+ io::pbm::load(input, img.c_str());
value::label_16 nlabels;
- typedef object_image(image2d<value::label_16>) O;
- O objects = scribo::primitive::extract::objects(input, c8(), nlabels);
-
- util::timer timer;
- timer.start();
+ typedef component_set<image2d<value::label_16> > O;
+ O comps = scribo::primitive::extract::components(input, c8(), nlabels);
+ O filtered_comps = scribo::filter::objects_with_holes(comps, 2, 1);
- value::label_16 nbglabels;
- image2d<bool> bin = data::convert(bool(), objects);
- image2d<value::label_16> lbl_bg = labeling::background(bin, c8(), nbglabels);
- float t_ = timer;
- std::cout << t_ << std::endl;
+ unsigned valid_comps = 0;
+ for_all_comps(c, filtered_comps)
+ if (filtered_comps(c).is_valid())
+ ++valid_comps;
- timer.restart();
- O out = scribo::filter::objects_with_holes(objects, 2, 1);
-// debug::println(out);
+ mln_assertion(valid_comps == 8u);
- t_ = timer;
- std::cout << t_ << std::endl;
- io::pgm::save(data::wrap(value::label_8(), out), "out.pgm");
}
diff --git a/scribo/tests/filter/small_and_large_bboxes.cc b/scribo/tests/filter/small_and_large_bboxes.cc
index 0b10cfe..adae46f 100644
--- a/scribo/tests/filter/small_and_large_bboxes.cc
+++ b/scribo/tests/filter/small_and_large_bboxes.cc
@@ -1,4 +1,5 @@
-// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
+// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
+// (LRDE)
//
// This file is part of Olena.
//
@@ -34,12 +35,11 @@
#include <scribo/core/object_image.hh>
-#include <scribo/primitive/extract/objects.hh>
+#include <scribo/primitive/extract/components.hh>
#include <scribo/primitive/group/apply.hh>
-#include <scribo/primitive/link/with_graph.hh>
-#include <scribo/primitive/group/from_graph.hh>
+#include <scribo/primitive/link/with_single_left_link.hh>
+#include <scribo/primitive/group/from_single_link.hh>
#include <scribo/filter/objects_small.hh>
-#include <scribo/util/text.hh>
#include <scribo/make/debug_filename.hh>
#include <scribo/debug/save_bboxes_image.hh>
@@ -47,64 +47,40 @@
#include <scribo/tests/data.hh>
-int usage(const char *name)
-{
- std::cout << "Usage: " << name << " <input.pbm> " << std::endl;
- return 1;
-}
-
int main(int argc, char* argv[])
{
using namespace scribo;
using namespace mln;
- std::string img;
- if (argc < 2)
- {
- usage(argv[0]);
- img = SCRIBO_IMG_DIR "/text_to_group_and_clean.pbm";
- }
- else
- img = argv[1];
-
- scribo::make::internal::debug_filename_prefix = argv[0];
+ std::string img = SCRIBO_IMG_DIR "/text_to_group_and_clean.pbm";
image2d<bool> input;
io::pbm::load(input, img.c_str());
value::label_16 nbboxes;
typedef image2d<value::label_16> L;
- typedef object_image(L) text_t;
- text_t text = primitive::extract::objects(input, c8(), nbboxes);
+ component_set<L>
+ text = primitive::extract::components(input, c8(), nbboxes);
- mln::util::graph g = primitive::link::with_graph(text, 30);
+ object_links<L> links = primitive::link::with_single_left_link(text, 30);
mln_assertion(nbboxes == 12u);
-// std::cout << "BEFORE - nbboxes = " << nbboxes << std::endl;
-// scribo::debug::save_linked_bboxes_image(input,
-// text, g,
-// literal::red, literal::cyan,
-// "test_graph_left_linked.ppm");
- object_groups<L> groups = primitive::group::from_graph(text, g);
+ object_groups<L> groups = primitive::group::from_single_link(links);
- text_t grouped_text = primitive::group::apply(text, groups);
-// std::cout << "AFTER - nbboxes = " << grouped_text.nbboxes().next() << std::endl;
-//
-// scribo::debug::save_bboxes_image(input, grouped_text.bboxes(),
-// literal::red,
-// "test_graph_grouped_text.ppm");
+ component_set<L> grouped_comps = primitive::group::apply(groups);
- mln_assertion(grouped_text.nlabels() == 6u);
+ mln_assertion(grouped_comps.nelements() == 6u);
- text_t
- filtered_text = scribo::filter::objects_small(grouped_text, 20);
+ component_set<L>
+ filtered_comps = scribo::filter::components_small(grouped_comps, 20);
- mln_assertion(filtered_text.nlabels() == 2u);
+ unsigned valid_comps = 0;
+ for_all_comps(c, filtered_comps)
+ if (filtered_comps(c).is_valid())
+ ++valid_comps;
-// scribo::debug::save_bboxes_image(input, filtered_text.bboxes(),
-// literal::red,
-// "test_graph_filtered_text.ppm");
+ mln_assertion(valid_comps == 2u);
}
diff --git a/scribo/tests/unit_test/Makefile.am b/scribo/tests/unit_test/Makefile.am
index 8b3e47f..255babf 100644
--- a/scribo/tests/unit_test/Makefile.am
+++ b/scribo/tests/unit_test/Makefile.am
@@ -42,6 +42,38 @@ $(srcdir)/unit-tests.mk: build_unit_test.sh disabled_tests
include $(srcdir)/unit-tests.mk
+
+#FIXME: how to handle that automaticaly during the unit test list
+#generation?
+scribo_convert_from_qimage_CPPFLAGS=\
+ $(QT_CPPFLAGS) $(AM_CPPFLAGS) -I$(srcdir)
+scribo_convert_from_qimage_CXXFLAGS=\
+ $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+scribo_convert_from_qimage_LDFLAGS=\
+ $(QT_LDFLAGS) $(LDFLAGS)
+scribo_convert_from_qimage_LDADD=\
+ $(QT_LIBS) $(LDADD)
+
+scribo_toolchain_nepomuk_text_extraction_CPPFLAGS=\
+ $(QT_CPPFLAGS) $(TESSERACT_CPPFLAGS) $(TIFF_CPPFLAGS) \
+ $(AM_CPPFLAGS) -I$(srcdir)
+scribo_toolchain_nepomuk_text_extraction_CXXFLAGS=\
+ $(QT_CXXFLAGS) $(AM_CXXFLAGS)
+scribo_toolchain_nepomuk_text_extraction_LDFLAGS=\
+ $(QT_LDFLAGS) $(TESSERACT_LDFLAGS) $(TIFF_LDFLAGS) \
+ $(LDFLAGS)
+scribo_toolchain_nepomuk_text_extraction_LDADD=\
+ $(QT_LIBS) $(LDADD)
+
+scribo_text_recognition_CPPFLAGS=\
+ $(TESSERACT_CPPFLAGS) $(TIFF_CPPFLAGS) \
+ $(AM_CPPFLAGS) -I$(srcdir)
+scribo_text_recognition_LDFLAGS=\
+ $(TESSERACT_LDFLAGS) $(TIFF_LDFLAGS) \
+ $(LDFLAGS)
+
+
+
MAINTAINERCLEANFILES = $(srcdir)/scribo_*.cc
TESTS = $(check_PROGRAMS)
diff --git a/scribo/text/merging.hh b/scribo/text/merging.hh
index c7ad3b3..36d41c2 100644
--- a/scribo/text/merging.hh
+++ b/scribo/text/merging.hh
@@ -57,7 +57,7 @@
#include <mln/data/wrap.hh>
#include <mln/util/timer.hh>
-#include <text/look_like_text_lines.hh>
+#include <scribo/text/look_like_text_lines.hh>
namespace scribo
diff --git a/scribo/toolchain/nepomuk/text_extraction.hh b/scribo/toolchain/nepomuk/text_extraction.hh
index ed486f5..b3136be 100644
--- a/scribo/toolchain/nepomuk/text_extraction.hh
+++ b/scribo/toolchain/nepomuk/text_extraction.hh
@@ -32,8 +32,11 @@
/// Extract text from a document.
+# include <QtCore/QSet>
# include <QtCore/QString>
# include <QtCore/QStringList>
+# include <QtCore/QTextStream>
+# include <QtCore/QTextCodec>
# include <QtGui/QImage>
# include <mln/core/image/image2d.hh>
diff --git a/scribo/upsampling/eagle.hh b/scribo/upsampling/eagle.hh
index eab1989..6652156 100644
--- a/scribo/upsampling/eagle.hh
+++ b/scribo/upsampling/eagle.hh
@@ -32,6 +32,10 @@
# include <mln/core/concept/image.hh>
# include <mln/core/def/coord.hh>
+# include <mln/geom/min_row.hh>
+# include <mln/geom/min_col.hh>
+# include <mln/geom/max_row.hh>
+# include <mln/geom/max_col.hh>
# include <mln/opt/at.hh>
# include <mln/make/box2d.hh>
--
1.5.6.5
1
0
06 Aug '10
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 exp/scribo-arthur has been updated
via 50621ae105a7b5c3ac3deeccbfeb443c84109266 (commit)
from d60f47f325bafaf2a006b127885934910c741b88 (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 -----------------------------------------------------------------
50621ae Open Document bug warning.
-----------------------------------------------------------------------
Summary of changes:
scribo/sandbox/ChangeLog | 8 ++++++++
scribo/sandbox/arthur/xml_transform/README | 24 +++++++++++++-----------
scribo/sandbox/arthur/xml_transform/main.cc | 9 +++++----
3 files changed, 26 insertions(+), 15 deletions(-)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0
06 Aug '10
* arthur/xml_transform/README
* arthur/xml_transform/main.cc
* arthur/xml_transform/TODO: New.
---
scribo/sandbox/ChangeLog | 8 ++++++++
scribo/sandbox/arthur/xml_transform/README | 24 +++++++++++++-----------
scribo/sandbox/arthur/xml_transform/main.cc | 9 +++++----
3 files changed, 26 insertions(+), 15 deletions(-)
diff --git a/scribo/sandbox/ChangeLog b/scribo/sandbox/ChangeLog
index d8ce704..80366c0 100644
--- a/scribo/sandbox/ChangeLog
+++ b/scribo/sandbox/ChangeLog
@@ -1,5 +1,13 @@
2010-08-06 Arthur Crepin-Leblond <crepin(a)lrde.epita.fr>
+ Open Document bug warning.
+
+ * arthur/xml_transform/README
+ * arthur/xml_transform/main.cc
+ * arthur/xml_transform/TODO: New.
+
+2010-08-06 Arthur Crepin-Leblond <crepin(a)lrde.epita.fr>
+
Fix man error.
* arthur/xml_transform/README
diff --git a/scribo/sandbox/arthur/xml_transform/README b/scribo/sandbox/arthur/xml_transform/README
index 33c4dd3..c594992 100644
--- a/scribo/sandbox/arthur/xml_transform/README
+++ b/scribo/sandbox/arthur/xml_transform/README
@@ -3,34 +3,36 @@ OPTIONS:
HTML output:
--html input.xml image output.html Creates HTML file, images are embedded inside in base 64 format.
- --html-base64 input.xml output.html Same as --html but input is a XML file with images encoded in base 64 inside.
- --html-full input.xml image output_dir Creates HTML file without converting images in base 64. Images + HTML file are placed in output_dir.
+ --html-base64 input.xml output.html Same as --html but input is a XML file with images encoded in base 64 inside.
+ --html-full input.xml image output_dir Creates HTML file without converting images in base 64. Images + HTML file are placed in output_dir.
PDF output:
--pdf input.xml image output.pdf Creates PDF file, images are embedded inside in base 64 format.
- --pdf-base64 input.xml output.pdf Same as --pdf but input is a XML file with images encoded in base 64 inside.
+ --pdf-base64 input.xml output.pdf Same as --pdf but input is a XML file with images encoded in base 64 inside.
SVG output (experimental, may not work with all files):
- --svg input.xml image output.svg Creates SVG file, images are embedded inside in base 64 format.
- --svg-base64 input.xml output.svg Same as --svg but input is a XML file with images encoded in base 64 inside.
+ --svg input.xml image output.svg Creates SVG file, images are embedded inside in base 64 format.
+ --svg-base64 input.xml output.svg Same as --svg but input is a XML file with images encoded in base 64 inside.
OpenDocument output:
- --oo-doc input.xml image output.odt Creates Open Document Writer (odt) file.
+ --oo-doc input.xml image output.odt Creates Open Document Writer (odt) file.
+ This is experimental, Open Office will warn you and ask you to repair the file which is corrupted, click on repair.
Base 64 operations:
- --to-base64 input.xml image output.xml Creates a container XML file. It will contain regions which are cropped and converted in base 64.
- --to-base64-no-crop input.xml image output.xml Same as --to-base64 but only the full picture will be converted, regions are not cropped
- --from-base64 input.xml output_dir Decodes a XML file which has been encoded in base 64, regions will be converted into png files and saved in output_dir.
+ --to-base64 input.xml image output.xmlc Creates a container XML file. It will contain regions which are cropped and converted in base 64.
+ --to-base64-no-crop input.xml image output.xmlc Same as --to-base64 but only the full picture will be converted, regions are not cropped
+ --from-base64 input.xml output_dir Decodes a XML file which has been encoded in base 64, regions will be converted into png files and saved in output_dir.
Requirements:
PDF : fop >= 0.95
HTML : xsltproc
SVG : trunk version of fop
-OpenDocument : ooconvert (included)
+OpenDocument : ooconvert (included) and OpenOffice >= 3.xx
+
BUILD:
-Chnage the environment variable QMAKE_CXXFLAGS in xml_transfrom.pro then
+Change the environment variable QMAKE_CXXFLAGS in xml_transfrom.pro then
mkdir _build
cd _build
diff --git a/scribo/sandbox/arthur/xml_transform/main.cc b/scribo/sandbox/arthur/xml_transform/main.cc
index d35e80d..2de4c0d 100644
--- a/scribo/sandbox/arthur/xml_transform/main.cc
+++ b/scribo/sandbox/arthur/xml_transform/main.cc
@@ -34,13 +34,14 @@ int main(int argc, char **argv)
"OpenDocument output:\n"
"\t\033[01m--oo-doc\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.odt\033[00m"
- "\t\t\tCreates Open Document Writer (odt) file.\n\n"
+ "\t\t\tCreates Open Document Writer (odt) file.\n"
+ "\tThis is experimental, Open Office will warn you and ask you to repair the file which is corrupted, click on repair.\n\n"
"Base 64 operations:\n"
- "\t\033[01m--to-base64\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xml\033[00m"
+ "\t\033[01m--to-base64\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xmlc\033[00m"
"\t\t\tCreates a container XML file. It will contain regions which are cropped and converted in base 64.\n"
- "\t\033[01m--to-base64-no-crop\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xml\033[00m"
+ "\t\033[01m--to-base64-no-crop\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xmlc\033[00m"
"\t\tSame as --to-base64 but only the full picture will be converted, regions are not cropped\n"
"\t\033[01m--from-base64\033[00m \033[04minput.xml\033[00m \033[04moutput_dir\033[00m"
@@ -50,7 +51,7 @@ int main(int argc, char **argv)
"PDF : fop >= 0.95\n"
"HTML : xsltproc\n"
"SVG : trunk version of fop\n"
- "OpenDocument : ooconvert (included)";
+ "OpenDocument : ooconvert (included) and OpenOffice >= 3.xx";
if (argc > 4)
{
std::string html = "--html";
--
1.5.6.5
1
0
06 Aug '10
* arthur/xml_transform/README
* arthur/xml_transform/main.cc
* arthur/xml_transform/TODO: New.
---
scribo/sandbox/ChangeLog | 8 ++++++++
scribo/sandbox/arthur/xml_transform/README | 24 +++++++++++++-----------
scribo/sandbox/arthur/xml_transform/main.cc | 9 +++++----
3 files changed, 26 insertions(+), 15 deletions(-)
diff --git a/scribo/sandbox/ChangeLog b/scribo/sandbox/ChangeLog
index d8ce704..80366c0 100644
--- a/scribo/sandbox/ChangeLog
+++ b/scribo/sandbox/ChangeLog
@@ -1,5 +1,13 @@
2010-08-06 Arthur Crepin-Leblond <crepin(a)lrde.epita.fr>
+ Open Document bug warning.
+
+ * arthur/xml_transform/README
+ * arthur/xml_transform/main.cc
+ * arthur/xml_transform/TODO: New.
+
+2010-08-06 Arthur Crepin-Leblond <crepin(a)lrde.epita.fr>
+
Fix man error.
* arthur/xml_transform/README
diff --git a/scribo/sandbox/arthur/xml_transform/README b/scribo/sandbox/arthur/xml_transform/README
index 33c4dd3..c594992 100644
--- a/scribo/sandbox/arthur/xml_transform/README
+++ b/scribo/sandbox/arthur/xml_transform/README
@@ -3,34 +3,36 @@ OPTIONS:
HTML output:
--html input.xml image output.html Creates HTML file, images are embedded inside in base 64 format.
- --html-base64 input.xml output.html Same as --html but input is a XML file with images encoded in base 64 inside.
- --html-full input.xml image output_dir Creates HTML file without converting images in base 64. Images + HTML file are placed in output_dir.
+ --html-base64 input.xml output.html Same as --html but input is a XML file with images encoded in base 64 inside.
+ --html-full input.xml image output_dir Creates HTML file without converting images in base 64. Images + HTML file are placed in output_dir.
PDF output:
--pdf input.xml image output.pdf Creates PDF file, images are embedded inside in base 64 format.
- --pdf-base64 input.xml output.pdf Same as --pdf but input is a XML file with images encoded in base 64 inside.
+ --pdf-base64 input.xml output.pdf Same as --pdf but input is a XML file with images encoded in base 64 inside.
SVG output (experimental, may not work with all files):
- --svg input.xml image output.svg Creates SVG file, images are embedded inside in base 64 format.
- --svg-base64 input.xml output.svg Same as --svg but input is a XML file with images encoded in base 64 inside.
+ --svg input.xml image output.svg Creates SVG file, images are embedded inside in base 64 format.
+ --svg-base64 input.xml output.svg Same as --svg but input is a XML file with images encoded in base 64 inside.
OpenDocument output:
- --oo-doc input.xml image output.odt Creates Open Document Writer (odt) file.
+ --oo-doc input.xml image output.odt Creates Open Document Writer (odt) file.
+ This is experimental, Open Office will warn you and ask you to repair the file which is corrupted, click on repair.
Base 64 operations:
- --to-base64 input.xml image output.xml Creates a container XML file. It will contain regions which are cropped and converted in base 64.
- --to-base64-no-crop input.xml image output.xml Same as --to-base64 but only the full picture will be converted, regions are not cropped
- --from-base64 input.xml output_dir Decodes a XML file which has been encoded in base 64, regions will be converted into png files and saved in output_dir.
+ --to-base64 input.xml image output.xmlc Creates a container XML file. It will contain regions which are cropped and converted in base 64.
+ --to-base64-no-crop input.xml image output.xmlc Same as --to-base64 but only the full picture will be converted, regions are not cropped
+ --from-base64 input.xml output_dir Decodes a XML file which has been encoded in base 64, regions will be converted into png files and saved in output_dir.
Requirements:
PDF : fop >= 0.95
HTML : xsltproc
SVG : trunk version of fop
-OpenDocument : ooconvert (included)
+OpenDocument : ooconvert (included) and OpenOffice >= 3.xx
+
BUILD:
-Chnage the environment variable QMAKE_CXXFLAGS in xml_transfrom.pro then
+Change the environment variable QMAKE_CXXFLAGS in xml_transfrom.pro then
mkdir _build
cd _build
diff --git a/scribo/sandbox/arthur/xml_transform/main.cc b/scribo/sandbox/arthur/xml_transform/main.cc
index d35e80d..2de4c0d 100644
--- a/scribo/sandbox/arthur/xml_transform/main.cc
+++ b/scribo/sandbox/arthur/xml_transform/main.cc
@@ -34,13 +34,14 @@ int main(int argc, char **argv)
"OpenDocument output:\n"
"\t\033[01m--oo-doc\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.odt\033[00m"
- "\t\t\tCreates Open Document Writer (odt) file.\n\n"
+ "\t\t\tCreates Open Document Writer (odt) file.\n"
+ "\tThis is experimental, Open Office will warn you and ask you to repair the file which is corrupted, click on repair.\n\n"
"Base 64 operations:\n"
- "\t\033[01m--to-base64\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xml\033[00m"
+ "\t\033[01m--to-base64\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xmlc\033[00m"
"\t\t\tCreates a container XML file. It will contain regions which are cropped and converted in base 64.\n"
- "\t\033[01m--to-base64-no-crop\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xml\033[00m"
+ "\t\033[01m--to-base64-no-crop\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xmlc\033[00m"
"\t\tSame as --to-base64 but only the full picture will be converted, regions are not cropped\n"
"\t\033[01m--from-base64\033[00m \033[04minput.xml\033[00m \033[04moutput_dir\033[00m"
@@ -50,7 +51,7 @@ int main(int argc, char **argv)
"PDF : fop >= 0.95\n"
"HTML : xsltproc\n"
"SVG : trunk version of fop\n"
- "OpenDocument : ooconvert (included)";
+ "OpenDocument : ooconvert (included) and OpenOffice >= 3.xx";
if (argc > 4)
{
std::string html = "--html";
--
1.5.6.5
1
0
06 Aug '10
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 exp/scribo-arthur has been updated
via d60f47f325bafaf2a006b127885934910c741b88 (commit)
from 737cd5321b92e297a502477b0fd50fa2cce94378 (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 -----------------------------------------------------------------
d60f47f Fix man error.
-----------------------------------------------------------------------
Summary of changes:
scribo/sandbox/ChangeLog | 7 +++++++
scribo/sandbox/arthur/xml_transform/README | 2 +-
scribo/sandbox/arthur/xml_transform/main.cc | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0
* arthur/xml_transform/README
* arthur/xml_transform/main.cc
---
scribo/sandbox/ChangeLog | 7 +++++++
scribo/sandbox/arthur/xml_transform/README | 2 +-
scribo/sandbox/arthur/xml_transform/main.cc | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/scribo/sandbox/ChangeLog b/scribo/sandbox/ChangeLog
index 6c102ef..d8ce704 100644
--- a/scribo/sandbox/ChangeLog
+++ b/scribo/sandbox/ChangeLog
@@ -1,5 +1,12 @@
2010-08-06 Arthur Crepin-Leblond <crepin(a)lrde.epita.fr>
+ Fix man error.
+
+ * arthur/xml_transform/README
+ * arthur/xml_transform/main.cc
+
+2010-08-06 Arthur Crepin-Leblond <crepin(a)lrde.epita.fr>
+
Delete two build files.
* arthur/xml_transform/_build/common.o,
diff --git a/scribo/sandbox/arthur/xml_transform/README b/scribo/sandbox/arthur/xml_transform/README
index 1733535..33c4dd3 100644
--- a/scribo/sandbox/arthur/xml_transform/README
+++ b/scribo/sandbox/arthur/xml_transform/README
@@ -19,7 +19,7 @@ OpenDocument output:
Base 64 operations:
--to-base64 input.xml image output.xml Creates a container XML file. It will contain regions which are cropped and converted in base 64.
- --to-base64-no-crop input.xml mage output.xml Same as --to-base64 but only the full picture will be converted, regions are not cropped
+ --to-base64-no-crop input.xml image output.xml Same as --to-base64 but only the full picture will be converted, regions are not cropped
--from-base64 input.xml output_dir Decodes a XML file which has been encoded in base 64, regions will be converted into png files and saved in output_dir.
Requirements:
diff --git a/scribo/sandbox/arthur/xml_transform/main.cc b/scribo/sandbox/arthur/xml_transform/main.cc
index 2270d2e..d35e80d 100644
--- a/scribo/sandbox/arthur/xml_transform/main.cc
+++ b/scribo/sandbox/arthur/xml_transform/main.cc
@@ -40,7 +40,7 @@ int main(int argc, char **argv)
"\t\033[01m--to-base64\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xml\033[00m"
"\t\t\tCreates a container XML file. It will contain regions which are cropped and converted in base 64.\n"
- "\t\033[01m--to-base64-no-crop\033[00m \033[04minput.xml\033[00m \033[04image\033[00m \033[04moutput.xml\033[00m"
+ "\t\033[01m--to-base64-no-crop\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xml\033[00m"
"\t\tSame as --to-base64 but only the full picture will be converted, regions are not cropped\n"
"\t\033[01m--from-base64\033[00m \033[04minput.xml\033[00m \033[04moutput_dir\033[00m"
--
1.5.6.5
1
0
* arthur/xml_transform/README
* arthur/xml_transform/main.cc
---
scribo/sandbox/ChangeLog | 7 +++++++
scribo/sandbox/arthur/xml_transform/README | 2 +-
scribo/sandbox/arthur/xml_transform/main.cc | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/scribo/sandbox/ChangeLog b/scribo/sandbox/ChangeLog
index 6c102ef..d8ce704 100644
--- a/scribo/sandbox/ChangeLog
+++ b/scribo/sandbox/ChangeLog
@@ -1,5 +1,12 @@
2010-08-06 Arthur Crepin-Leblond <crepin(a)lrde.epita.fr>
+ Fix man error.
+
+ * arthur/xml_transform/README
+ * arthur/xml_transform/main.cc
+
+2010-08-06 Arthur Crepin-Leblond <crepin(a)lrde.epita.fr>
+
Delete two build files.
* arthur/xml_transform/_build/common.o,
diff --git a/scribo/sandbox/arthur/xml_transform/README b/scribo/sandbox/arthur/xml_transform/README
index 1733535..33c4dd3 100644
--- a/scribo/sandbox/arthur/xml_transform/README
+++ b/scribo/sandbox/arthur/xml_transform/README
@@ -19,7 +19,7 @@ OpenDocument output:
Base 64 operations:
--to-base64 input.xml image output.xml Creates a container XML file. It will contain regions which are cropped and converted in base 64.
- --to-base64-no-crop input.xml mage output.xml Same as --to-base64 but only the full picture will be converted, regions are not cropped
+ --to-base64-no-crop input.xml image output.xml Same as --to-base64 but only the full picture will be converted, regions are not cropped
--from-base64 input.xml output_dir Decodes a XML file which has been encoded in base 64, regions will be converted into png files and saved in output_dir.
Requirements:
diff --git a/scribo/sandbox/arthur/xml_transform/main.cc b/scribo/sandbox/arthur/xml_transform/main.cc
index 2270d2e..d35e80d 100644
--- a/scribo/sandbox/arthur/xml_transform/main.cc
+++ b/scribo/sandbox/arthur/xml_transform/main.cc
@@ -40,7 +40,7 @@ int main(int argc, char **argv)
"\t\033[01m--to-base64\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xml\033[00m"
"\t\t\tCreates a container XML file. It will contain regions which are cropped and converted in base 64.\n"
- "\t\033[01m--to-base64-no-crop\033[00m \033[04minput.xml\033[00m \033[04image\033[00m \033[04moutput.xml\033[00m"
+ "\t\033[01m--to-base64-no-crop\033[00m \033[04minput.xml\033[00m \033[04mimage\033[00m \033[04moutput.xml\033[00m"
"\t\tSame as --to-base64 but only the full picture will be converted, regions are not cropped\n"
"\t\033[01m--from-base64\033[00m \033[04minput.xml\033[00m \033[04moutput_dir\033[00m"
--
1.5.6.5
1
0
06 Aug '10
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 exp/scribo-arthur has been updated
via 737cd5321b92e297a502477b0fd50fa2cce94378 (commit)
from 6fe07efbd51c2caf601ba4037510c840515f9cf4 (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 -----------------------------------------------------------------
737cd53 Add arrows shortcuts.
-----------------------------------------------------------------------
Summary of changes:
scribo/ChangeLog | 6 ++++++
scribo/demo/viewer/browser_widget.cc | 2 ++
2 files changed, 8 insertions(+), 0 deletions(-)
hooks/post-receive
--
Olena, a generic and efficient image processing platform
1
0