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
pylene
Commits
e658cd92
Commit
e658cd92
authored
Feb 06, 2015
by
Edwin Carlinet
Browse files
Add area opening entry.
* mln/morpho/algebraic_filter.hpp: Area opening alg.
parent
d46e2e70
Changes
1
Hide whitespace changes
Inline
Side-by-side
mln/morpho/algebraic_filter.hpp
View file @
e658cd92
...
@@ -11,6 +11,11 @@ namespace mln
...
@@ -11,6 +11,11 @@ namespace mln
namespace
morpho
namespace
morpho
{
{
/// \brief Compute the area algebraic closing of an image.
/// \param ima The input image
/// \param nbh The neighborhood
/// \param area The grain size
/// \param cmp A strict total ordering on values
template
<
class
I
,
class
N
,
class
Compare
=
std
::
less
<
mln_value
(
I
)>
>
template
<
class
I
,
class
N
,
class
Compare
=
std
::
less
<
mln_value
(
I
)>
>
mln_concrete
(
I
)
mln_concrete
(
I
)
area_closing
(
const
Image
<
I
>&
ima
,
area_closing
(
const
Image
<
I
>&
ima
,
...
@@ -18,6 +23,16 @@ namespace mln
...
@@ -18,6 +23,16 @@ namespace mln
unsigned
area
,
unsigned
area
,
Compare
cmp
=
Compare
());
Compare
cmp
=
Compare
());
/// \brief Compute the area algebraic opening of an image.
/// \param ima The input image
/// \param nbh The neighborhood
/// \param area The grain size
template
<
class
I
,
class
N
>
mln_concrete
(
I
)
area_opening
(
const
Image
<
I
>&
ima
,
const
Neighborhood
<
N
>&
nbh
,
unsigned
area
);
/******************************/
/******************************/
...
@@ -75,6 +90,19 @@ namespace mln
...
@@ -75,6 +90,19 @@ namespace mln
return
out
;
return
out
;
}
}
template
<
class
I
,
class
N
>
mln_concrete
(
I
)
area_opening
(
const
Image
<
I
>&
ima_
,
const
Neighborhood
<
N
>&
nbh
,
unsigned
area
)
{
mln_entering
(
"mln::morpho::area_opening"
);
mln_concrete
(
I
)
out
=
area_closing
(
exact
(
ima_
),
exact
(
nbh
),
area
,
std
::
greater
<
mln_value
(
I
)
>
());
mln_exiting
();
return
out
;
}
}
}
}
}
...
...
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