---
scribo/ChangeLog | 4 ++++
scribo/scribo/filter/object_groups_size_ratio.hh | 18 +++++++++---------
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 0c785fc..0235162 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,9 @@
2011-04-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+ * scribo/filter/object_groups_size_ratio.hh: Fix compilation.
+
+2011-04-06 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Rename few routines.
* scribo/estim/object_groups_v_thickness.hh,
diff --git a/scribo/scribo/filter/object_groups_size_ratio.hh
b/scribo/scribo/filter/object_groups_size_ratio.hh
index fa59e7f..01676c4 100644
--- a/scribo/scribo/filter/object_groups_size_ratio.hh
+++ b/scribo/scribo/filter/object_groups_size_ratio.hh
@@ -1,5 +1,5 @@
-// Copyright (C) 2009, 2010 EPITA Research and Development Laboratory
-// (LRDE)
+// Copyright (C) 2009, 2010, 2011 EPITA Research and Development
+// Laboratory (LRDE)
//
// This file is part of Olena.
//
@@ -70,22 +70,22 @@ namespace scribo
// Counting the number of objects per group with a size ratio >
// max_ratio.
mln::util::array<unsigned>
- group_size(groups.size(), 0),
- invalid_object_in_group(groups.size(), 0);
+ group_size(groups.nelements(), 0),
+ invalid_object_in_group(groups.nelements(), 0);
for_all_comps(i, comps)
{
- if ((comps(i).bbox().nrows() / comps(i).bbox().ncols())
+ if ((comps(i).bbox().height() / comps(i).bbox().width())
= max_size_ratio)
-
++invalid_object_in_group[groups[i]];
+ ++invalid_object_in_group(groups(i));
- ++group_size[groups[i]];
+ ++group_size(groups(i));
}
object_groups<L> output(groups);
output(0) = 0;
- for (unsigned i = 1; i < output.size(); ++i)
- if ((invalid_object_in_group[groups[i]] /
static_cast<float>(group_size[groups[i]])) >= max_invalid_ratio_per_group
+ for (unsigned i = 1; i < output.nelements(); ++i)
+ if ((invalid_object_in_group(groups(i)) /
static_cast<float>(group_size(groups(i)))) >= max_invalid_ratio_per_group
|| !comps(i).is_valid())
output(i) = 0;
--
1.5.6.5