Commit 3272d151 authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Fix compilation issues.

	* scribo/binarization/local_threshold.hh,
	* scribo/core/central_sites.hh,
	* scribo/debug/save_table_image.hh,
	* scribo/filter/object_groups_with_holes.hh,
	* scribo/fun/v2b/objects_large_filter.hh,
	* scribo/make/influence_zone_graph.hh,
	* scribo/postprocessing/fill_object_holes.hh: Fix namespace
	ambiguities.

	* scribo/toolchain/text_in_doc_preprocess.hh: Fix arguments.

	* scribo/toolchain/internal/text_in_doc_preprocess_functor.hh,
	* scribo/util/integral_sub_sum_sum2_functor.hh: Use namespace mln.

	* scribo/util/compute_sub_domains.hh,
	* scribo/util/integral_sum_sum2_functor.hh,
	* scribo/util/integral_sum_sum2_global_min_functor.hh,
	* src/contest/hdibco-2010/sauvola_ms_hdibco.cc: Add missing
	include.

	* scribo/io/img/save.hh: Use box2d constructor.
parent a3c4e92a
2013-03-07 Guillaume Lazzara <z@lrde.epita.fr>
Fix compilation issues.
* scribo/binarization/local_threshold.hh,
* scribo/core/central_sites.hh,
* scribo/debug/save_table_image.hh,
* scribo/filter/object_groups_with_holes.hh,
* scribo/fun/v2b/objects_large_filter.hh,
* scribo/make/influence_zone_graph.hh,
* scribo/postprocessing/fill_object_holes.hh: Fix namespace
ambiguities.
* scribo/toolchain/text_in_doc_preprocess.hh: Fix arguments.
* scribo/toolchain/internal/text_in_doc_preprocess_functor.hh,
* scribo/util/integral_sub_sum_sum2_functor.hh: Use namespace mln.
* scribo/util/compute_sub_domains.hh,
* scribo/util/integral_sum_sum2_functor.hh,
* scribo/util/integral_sum_sum2_global_min_functor.hh,
* src/contest/hdibco-2010/sauvola_ms_hdibco.cc: Add missing
include.
* scribo/io/img/save.hh: Use box2d constructor.
2013-03-01 Guillaume Lazzara <z@lrde.epita.fr>
Rename point_at_index and index_of_point.
......
// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
// Copyright (C) 2009, 2010, 2011, 2013 EPITA Research and Development
// Laboratory (LRDE)
//
// This file is part of Olena.
......@@ -162,7 +162,7 @@ namespace scribo
trait::image::speed::any,
const Image<I>& input, const Image<T>& threshold)
{
return impl::generic::local_threshold(input, threshold);
return binarization::impl::generic::local_threshold(input, threshold);
}
......@@ -172,7 +172,7 @@ namespace scribo
trait::image::speed::fastest,
const Image<I>& input, const Image<T>& threshold)
{
return impl::local_threshold_fastest(input, threshold);
return binarization::impl::local_threshold_fastest(input, threshold);
}
template <typename I, typename T>
......
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
//
......@@ -60,7 +61,7 @@ namespace scribo
**
*/
template <typename P>
util::couple<P,P>
mln::util::couple<P,P>
central_sites(const box<P>& b, unsigned dim);
......@@ -69,7 +70,7 @@ namespace scribo
template <typename P>
inline
util::couple<P,P>
mln::util::couple<P,P>
central_sites(const box<P>& b, unsigned dim)
{
trace::entering("scribo::central_sites");
......
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
//
......@@ -56,8 +57,8 @@ namespace scribo
template <typename I>
void
save_table_image(const Image<I>& input_,
util::couple<util::array<box<mln_site(I)> >,
util::array<box<mln_site(I)> > > tableboxes,
mln::util::couple<mln::util::array<box<mln_site(I)> >,
mln::util::array<box<mln_site(I)> > > tableboxes,
const value::rgb8& bbox_color,
const std::string& filename);
......@@ -67,8 +68,8 @@ namespace scribo
template <typename S>
void
save_table_image(const Site_Set<S>& input_domain,
util::couple<util::array<box<mln_site(S)> >,
util::array<box<mln_site(S)> > > tableboxes,
mln::util::couple<mln::util::array<box<mln_site(S)> >,
mln::util::array<box<mln_site(S)> > > tableboxes,
const value::rgb8& bg_color,
const value::rgb8& bbox_color,
const std::string& filename);
......@@ -80,8 +81,8 @@ namespace scribo
template <typename I>
void
save_table_image(const Image<I>& input_,
util::couple<util::array<box<mln_site(I)> >,
util::array<box<mln_site(I)> > > tableboxes,
mln::util::couple<mln::util::array<box<mln_site(I)> >,
mln::util::array<box<mln_site(I)> > > tableboxes,
const value::rgb8& bbox_color,
const std::string& filename)
{
......@@ -102,8 +103,8 @@ namespace scribo
template <typename S>
void
save_table_image(const Site_Set<S>& input_domain_,
util::couple<util::array<box<mln_site(S)> >,
util::array<box<mln_site(S)> > > tableboxes,
mln::util::couple<mln::util::array<box<mln_site(S)> >,
mln::util::array<box<mln_site(S)> > > tableboxes,
const value::rgb8& bg_color,
const value::rgb8& bbox_color,
const std::string& filename)
......
// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2010, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
//
......@@ -171,7 +172,7 @@ namespace scribo
// Will store the first background component id associated
// to a group.
util::array<unsigned> bg_comps(
mln::util::array<unsigned> bg_comps(
value::next(components.nelements()), 0);
// Will 'True' if a group has at least two background
......@@ -206,7 +207,7 @@ namespace scribo
// 1st pass
{
util::array<int> dp = positive_offsets_wrt(lbl, nbh);
mln::util::array<int> dp = positive_offsets_wrt(lbl, nbh);
const unsigned n_nbhs = dp.nelements();
mln_bkd_pixter(const L) pxl(lbl); // Backward.
......
// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2010, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
//
......@@ -91,7 +92,7 @@ namespace scribo
mutable mln_value(L) nlabels_;
/// Has already been taken into account.
mutable util::array<bool> marked_;
mutable mln::util::array<bool> marked_;
};
......
......@@ -167,8 +167,8 @@ namespace scribo
mln_precondition(doc.is_valid());
const box2d& ima_domain = doc.image().domain();
box2d domain = make::box2d(ima_domain.pmin() / reduction_factor,
ima_domain.pmax() / reduction_factor);
box2d domain(ima_domain.pmin() / reduction_factor,
ima_domain.pmax() / reduction_factor);
mln::image2d<value::rgb8> output(domain);
data::fill(output, literal::black);
......
// Copyright (C) 2009 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2009, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
//
......@@ -64,7 +65,7 @@ namespace scribo
///
/// \return a region adjacency graph.
template <typename I, typename N, typename V>
util::graph
mln::util::graph
influence_zone_graph(const Image<I>& input_,
const Neighborhood<N>& nbh_,
const V& label_type,
......@@ -74,7 +75,7 @@ namespace scribo
# ifndef MLN_INCLUDE_ONLY
template <typename I, typename N, typename V>
util::graph
mln::util::graph
influence_zone_graph(const Image<I>& input_,
const Neighborhood<N>& nbh_,
const V& label_type,
......@@ -96,7 +97,7 @@ namespace scribo
lbl_t iz = transform::influence_zone_geodesic(lbl, nbh, iz_dmax);
util::graph g
mln::util::graph g
= mln::make::influence_zone_adjacency_graph(
iz | (pw::value(iz) != pw::cst(literal::zero)),
nbh, nlabels);
......
// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2010, 2013 EPITA Research and Development Laboratory (LRDE)
//
// This file is part of Olena.
//
......@@ -173,9 +173,9 @@ namespace scribo
image2d<unsigned> parent, card;
L bboxes_ima;
util::array<unsigned> bg_comps(
mln::util::array<unsigned> bg_comps(
value::next(components.nelements()), 0);
util::array<bool> bg_comps_done(
mln::util::array<bool> bg_comps_done(
value::next(components.nelements()), false);
mln::fun::i2v::array<bool>
......@@ -204,7 +204,7 @@ namespace scribo
// 1st pass
{
util::array<int> dp = positive_offsets_wrt(lbl, nbh);
mln::util::array<int> dp = positive_offsets_wrt(lbl, nbh);
const unsigned n_nbhs = dp.nelements();
mln_bkd_pixter(const L) pxl(lbl); // Backward.
......@@ -338,8 +338,11 @@ namespace scribo
typedef mln_ch_value(I, L) Li;
typedef accu::math::count<mln_site(Li)> A;
typedef util::couple<Li, util::couple<util::array<unsigned>,
util::array<A> > > res_t;
typedef
mln::util::couple<Li,
mln::util::couple<
mln::util::array<unsigned>,
mln::util::array<A> > > res_t;
// Holes card Image
......@@ -349,7 +352,7 @@ namespace scribo
res_t res = labeling::blobs_and_compute(input, c8(), nlabels, A());
util::array<unsigned>& holes_card = res.second().first();
mln::util::array<unsigned>& holes_card = res.second().first();
mln_ch_value(I, unsigned)
holes = data::transform(res.first(), holes_card);
......@@ -363,7 +366,7 @@ namespace scribo
I input_i = logical::not_(input);
res = labeling::blobs_and_compute(input_i, c8(), nlabels, A());
util::array<unsigned>& card = res.second().first();
mln::util::array<unsigned>& card = res.second().first();
for (unsigned i = 1; i < card.size(); ++i)
card(i) = unsigned(round(card(i) * ratio));
......
......@@ -53,6 +53,8 @@ namespace scribo
namespace internal
{
using namespace mln;
/*! \brief Enum of the binarization algorithms available.
Convert: Violently convert from color to binary.
......
......@@ -111,8 +111,14 @@ namespace scribo
*/
template <typename I>
mln_ch_value(I,bool)
text_in_doc_preprocess(const Image<I>& input_, unsigned lambda,
double k2, double k3, double k4, bool enable_fg_bg,
Image<I>& fg, bool enable_deskew, bool verbose);
template <typename I>
mln_ch_value(I,bool)
text_in_doc_preprocess(const Image<I>& input, unsigned lambda,
double K, bool enable_fg_bg, Image<I>& fg,
bool enable_fg_bg, Image<I>& fg,
bool enable_deskew, bool verbose);
......
// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2011, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
//
......@@ -31,6 +32,7 @@
///
# include <mln/core/image/image2d.hh>
# include <mln/util/couple.hh>
namespace scribo
{
......
......@@ -31,6 +31,9 @@
///
///
# include <mln/core/concept/image.hh>
# include <mln/core/site_set/box.hh>
# include <mln/make/box2d.hh>
# include <mln/util/couple.hh>
namespace scribo
......@@ -39,6 +42,8 @@ namespace scribo
namespace util
{
using namespace mln;
template <typename I, typename S = mln_sum(mln_value(I))>
class integral_sub_sum_sum2_functor
{
......
// Copyright (C) 2011 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2011, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
//
......@@ -31,6 +32,7 @@
///
# include <mln/util/couple.hh>
# include <mln/trait/value_.hh>
namespace scribo
{
......
// Copyright (C) 2012 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2012, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
//
......@@ -31,6 +32,7 @@
///
# include <mln/util/couple.hh>
# include <mln/trait/value_.hh>
namespace scribo
{
......
// Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE)
// Copyright (C) 2010, 2013 EPITA Research and Development Laboratory
// (LRDE)
//
// This file is part of Olena.
//
......@@ -76,7 +77,7 @@ int main(int argc, char *argv[])
// Binarize
image2d<bool>
output = scribo::binarization::sauvola_ms(input, 101, 3, 0.4);
output = scribo::binarization::sauvola_ms(input, 101, 3, 0.4, 0.4, 0.4);
output = scribo::preprocessing::denoise_bg(output, c8(), 4);
output = scribo::postprocessing::fill_object_holes(output, 0.01f);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment