* scribo/core/line_info.hh: Fix invalid extended bboxes.
* src/text_in_doc_preprocess.cc: Do not invert data anymore.
* tests/filter/objects_with_holes.cc: Remove useless arguments.
---
scribo/ChangeLog | 10 ++++++++++
scribo/scribo/core/line_info.hh | 5 +++++
scribo/src/text_in_doc_preprocess.cc | 2 --
scribo/tests/filter/objects_with_holes.cc | 4 +++-
4 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/scribo/ChangeLog b/scribo/ChangeLog
index 7c0ab7c..98c90d6 100644
--- a/scribo/ChangeLog
+++ b/scribo/ChangeLog
@@ -1,5 +1,15 @@
2010-10-25 Guillaume Lazzara <z(a)lrde.epita.fr>
+ Small fixes in Scribo
+
+ * scribo/core/line_info.hh: Fix invalid extended bboxes.
+
+ * src/text_in_doc_preprocess.cc: Do not invert data anymore.
+
+ * tests/filter/objects_with_holes.cc: Remove useless arguments.
+
+2010-10-25 Guillaume Lazzara <z(a)lrde.epita.fr>
+
Add a new test for primitive::link::merge_double_link.
* tests/img/pixels.pbm: New test image.
diff --git a/scribo/scribo/core/line_info.hh b/scribo/scribo/core/line_info.hh
index 99650d7..5328b33 100644
--- a/scribo/scribo/core/line_info.hh
+++ b/scribo/scribo/core/line_info.hh
@@ -672,6 +672,11 @@ namespace scribo
if (D <= 2 && A > 2)
D = A;
+ if (D < 0)
+ D = 0;
+ if (A < 0)
+ A = 0;
+
int delta = delta_of_line();
ebbox_ = mln::make::box2d(meanline_ - A, bbox().pmin().col() - delta,
diff --git a/scribo/src/text_in_doc_preprocess.cc b/scribo/src/text_in_doc_preprocess.cc
index 27ed9ed..fdbb018 100644
--- a/scribo/src/text_in_doc_preprocess.cc
+++ b/scribo/src/text_in_doc_preprocess.cc
@@ -97,7 +97,5 @@ int main(int argc, char* argv[])
std::cout << "Binarizing foreground..." << std::endl;
image2d<bool> input_bin = scribo::binarization::sauvola_ms(input_gl, 101, 3);
- logical::not_inplace(input_bin);
-
mln::io::pbm::save(input_bin, argv[2]);
}
diff --git a/scribo/tests/filter/objects_with_holes.cc
b/scribo/tests/filter/objects_with_holes.cc
index c556513..d50d6d5 100644
--- a/scribo/tests/filter/objects_with_holes.cc
+++ b/scribo/tests/filter/objects_with_holes.cc
@@ -24,6 +24,8 @@
// exception does not however invalidate any other reasons why the
// executable file might be covered by the GNU General Public License.
+// \file
+
#include <mln/core/image/image2d.hh>
#include <mln/core/alias/neighb2d.hh>
#include <mln/io/pbm/load.hh>
@@ -37,7 +39,7 @@
#include "tests/data.hh"
-int main(int argc, char *argv[])
+int main()
{
using namespace mln;
using namespace scribo;
--
1.5.6.5