Commit 6e2cefa4 authored by Guillaume Lazzara's avatar Guillaume Lazzara
Browse files

Fix wrong line reconstruction with lines_*_pattern routines.

	* scribo/primitive/extract/lines_h_pattern.hh,
	* scribo/primitive/extract/lines_v_pattern.hh: Here.
parent 4e4b1150
2013-03-06 Guillaume Lazzara <z@lrde.epita.fr>
Fix wrong line reconstruction with lines_*_pattern routines.
* scribo/primitive/extract/lines_h_pattern.hh,
* scribo/primitive/extract/lines_v_pattern.hh: Here.
2013-03-06 Guillaume Lazzara <z@lrde.epita.fr>
Add more tests for lines_*_discontinued routines.
......
// 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.
......@@ -44,7 +44,6 @@
# include <scribo/primitive/internal/rd.hh>
namespace scribo
{
......@@ -106,10 +105,13 @@ namespace scribo
mln_concrete(I) output = lines_pattern(input, length, 1, win);
unsigned hl = length;
if (! (hl % 2))
++hl;
win::rectangle2d w(delta, hl);
mln_concrete(I)
output_dil = morpho::dilation(output,
win::rectangle2d(2 * delta + 1,
length + 2));
output_dil = morpho::dilation(output, w);
output = scribo::primitive::internal::rd(output, input * output_dil);
......
// 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.
......@@ -88,10 +88,13 @@ namespace scribo
mln_concrete(I) output = lines_pattern(input, length, 0, win);
unsigned vl = length;
if (! (vl % 2))
++vl;
win::rectangle2d w(vl, delta);
mln_concrete(I)
output_dil = morpho::dilation(output,
win::rectangle2d(2 * delta + 1,
length + 2));
output_dil = morpho::dilation(output, w);
output = scribo::primitive::internal::rd(output, input * output_dil);
......
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