Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Olena
olena
Commits
5963d6b5
Commit
5963d6b5
authored
Mar 05, 2013
by
Guillaume Lazzara
Browse files
scribo/primitive/extract/lines_discontinued.hh: Fix invalid line reconstruction.
parent
f0c488c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
scribo/ChangeLog
View file @
5963d6b5
2013-03-05 Guillaume Lazzara <z@lrde.epita.fr>
* scribo/primitive/extract/lines_discontinued.hh: Fix invalid line
reconstruction.
2013-03-05 Guillaume Lazzara <z@lrde.epita.fr>
* scribo/subsampling/bilinear.hh: Update documentation.
...
...
scribo/scribo/primitive/extract/lines_discontinued.hh
View file @
5963d6b5
// Copyright (C) 2009, 2010 EPITA Research and Development
Laboratory
// (LRDE)
// Copyright (C) 2009, 2010
, 2013
EPITA Research and Development
//
Laboratory
(LRDE)
//
// This file is part of Olena.
//
...
...
@@ -68,6 +68,8 @@ namespace scribo
* \param[in] rank_k Rank used for filtering.
*
* \return An image in which lines are labeled.
*
* \pre win.length() > 2 * (rank_k + 1)
*/
template
<
typename
I
,
typename
N
,
typename
V
,
typename
W
>
component_set
<
mln_ch_value
(
I
,
V
)
>
...
...
@@ -98,6 +100,8 @@ namespace scribo
mln_precondition
(
exact
(
nbh
).
is_valid
());
mln_precondition
(
exact
(
win
).
is_valid
());
mln_precondition
(
win
.
length
()
>
2
*
(
rank_k
+
1
));
(
void
)
input
;
(
void
)
nbh
;
(
void
)
win
;
...
...
@@ -124,11 +128,11 @@ namespace scribo
const
N
&
nbh
=
exact
(
nbh_
);
const
W
&
win
=
exact
(
win_
);
int
dil
;
if
(
!
(
rank_k
%
2
))
dil
=
win
.
length
()
/
2
+
2
*
rank_k
+
2
;
else
dil
=
win
.
length
()
/
2
+
2
*
rank_k
+
3
;
int
dil
=
win
.
length
()
-
2
*
(
rank_k
+
1
)
;
mln_assertion
(
dil
>
0
);
if
(
!
(
dil
%
2
))
// Make sure the window have an odd size.
dil
+
=
1
;
mln_ch_value
(
I
,
bool
)
filter
=
morpho
::
dilation
(
morpho
::
rank_filter
(
input
,
win
,
rank_k
),
W
(
dil
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment