Namespaces | |
namespace | internal |
Functions | |
template<class I, class I2, class N> | |
oln::mute< I >::ret | minima_imposition (const abstract::non_vectorial_image< I > &input, const abstract::non_vectorial_image< I2 > &minima_map, const abstract::neighborhood< N > &Ng) |
Perform a minima imposition. | |
template<class I, class N> | |
mute< I, ntg::bin >::ret | regional_minima (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng) |
Extract regional minima. | |
template<class I1, class I2, class N> | |
oln::mute< I1 >::ret | geodesic_dilation (const abstract::non_vectorial_image< I1 > &marker, const abstract::non_vectorial_image< I2 > &mask, const abstract::neighborhood< N > &Ng) |
Processing a geodesic dilation. | |
template<class I1, class I2, class N> | |
oln::mute< I1 >::ret | geodesic_erosion (const abstract::non_vectorial_image< I1 > &marker, const abstract::non_vectorial_image< I2 > &mask, const abstract::neighborhood< N > &Ng) |
Processing a geodesic erosion. | |
template<class I1, class I2, class N> | |
oln::mute< I1 >::ret | geodesic_reconstruction_dilation (const abstract::non_vectorial_image< I1 > &marker, const abstract::non_vectorial_image< I2 > &mask, const abstract::neighborhood< N > &Ng) |
Perform a geodesic reconstruction dilation. | |
template<class I1, class I2, class N> | |
oln::mute< I1 >::ret | geodesic_reconstruction_erosion (const abstract::non_vectorial_image< I1 > &marker, const abstract::non_vectorial_image< I2 > &mask, const abstract::neighborhood< N > &Ng) |
Perform a geodesic reconstruction erosion. |
oln::mute< I1 >::ret oln::morpho::sure::geodesic_dilation | ( | const abstract::non_vectorial_image< I1 > & | marker, | |
const abstract::non_vectorial_image< I2 > & | mask, | |||
const abstract::neighborhood< N > & | Ng | |||
) |
Processing a geodesic dilation.
I1 | Exact type of image marker. | |
I2 | Exact type of image mask. | |
N | Exact type of neighborhood. |
#include <oln/basics2d.hh> #include <oln/morpho/opening.hh> #include <oln/morpho/geodesic_dilation.hh> #include <oln/level/compare.hh> #include <ntg/all.hh> int main() { typedef oln::image2d<ntg::int_u8> im_type; im_type im1(oln::load(IMG_IN "lena128.pgm")); im_type im2 = oln::morpho::opening(im1, oln::win_c4p()); save(oln::morpho::sure::geodesic_dilation(im2, im1, oln::neighb_c4()), IMG_OUT "oln_morpho_sure_geodesic_dilation.pbm"); return 0; }
Definition at line 151 of file geodesic_dilation.hh.
References mlc::eq< i, j >::ensure(), oln::level::is_greater_or_equal(), oln::morpho::max(), and oln::convert::ng_to_cse().
Referenced by geodesic_reconstruction_dilation().
00154 { 00155 mlc::eq<I1::dim, I2::dim>::ensure(); 00156 mlc::eq<I1::dim, N::dim>::ensure(); 00157 precondition(marker.size() == mask.size()); 00158 precondition(level::is_greater_or_equal(mask, marker)); 00159 00160 oln_concrete_type(I1) output(marker.size()); 00161 marker.border_adapt_copy(Ng.delta()); 00162 oln_iter_type(I1) p(marker); 00163 for_all (p) 00164 output[p] = std::min(morpho::max(marker, p, convert::ng_to_cse(Ng)), mask[p]); 00165 return output; 00166 }
oln::mute< I1 >::ret oln::morpho::sure::geodesic_erosion | ( | const abstract::non_vectorial_image< I1 > & | marker, | |
const abstract::non_vectorial_image< I2 > & | mask, | |||
const abstract::neighborhood< N > & | Ng | |||
) |
Processing a geodesic erosion.
I1 | Exact type of image marker. | |
I2 | Exact type of image mask. | |
N | Exact type of neighborhood. |
#include <oln/basics2d.hh> #include <oln/morpho/opening.hh> #include <oln/morpho/geodesic_erosion.hh> #include <oln/level/compare.hh> #include <ntg/all.hh> int main() { typedef oln::image2d<ntg::int_u8> im_type; im_type im1(oln::load(IMG_IN "lena128.pgm")); im_type im2 = oln::morpho::opening(im1, oln::win_c4p()); save(oln::morpho::sure::geodesic_erosion(im1, im2, oln::neighb_c4()), IMG_OUT "oln_morpho_sure_geodesic_erosion.pbm"); return 0; }
Definition at line 151 of file geodesic_erosion.hh.
References mlc::eq< i, j >::ensure(), oln::level::is_greater_or_equal(), oln::morpho::min(), and oln::convert::ng_to_cse().
Referenced by geodesic_reconstruction_erosion().
00154 { 00155 mlc::eq<I1::dim, I2::dim>::ensure(); 00156 mlc::eq<I1::dim, N::dim>::ensure(); 00157 precondition(marker.size() == mask.size()); 00158 precondition(level::is_greater_or_equal(marker, mask)); 00159 00160 oln_concrete_type(I1) output(marker.size()); 00161 marker.border_adapt_copy(Ng.delta()); 00162 oln_iter_type(I1) p(marker); 00163 for_all (p) 00164 output[p] = ntg::max(morpho::min(marker, p, convert::ng_to_cse(Ng)), mask[p]); 00165 return output; 00166 }
oln::mute< I1 >::ret oln::morpho::sure::geodesic_reconstruction_dilation | ( | const abstract::non_vectorial_image< I1 > & | marker, | |
const abstract::non_vectorial_image< I2 > & | mask, | |||
const abstract::neighborhood< N > & | Ng | |||
) |
Perform a geodesic reconstruction dilation.
Compute the reconstruction by dilation of marker with respect to the mask mask image using se as structuring element. Soille p.160. This is the simplest algorithm: iteration is performed until stability.
I1 | Exact type of image marker. | |
I2 | Exact type of image mask. | |
N | Exact type of neighborhood. |
#include <oln/basics2d.hh> #include <oln/morpho/opening.hh> #include <oln/morpho/reconstruction.hh> #include <oln/level/compare.hh> #include <ntg/all.hh> int main() { typedef oln::image2d<ntg::int_u8> im_type; im_type im1(oln::load(IMG_IN "lena128.pgm")); im_type im2 = oln::morpho::opening(im1, oln::win_c4p()); oln::save(oln::morpho::sure::geodesic_reconstruction_dilation(im2, im1, oln::neighb_c4()), IMG_OUT "oln_morpho_sure_geodesic_reconstruction_dilation.pbm"); return 0; }
Definition at line 96 of file reconstruction.hh.
References mlc::eq< i, j >::ensure(), geodesic_dilation(), oln::level::is_equal(), and oln::level::is_greater_or_equal().
00099 { 00100 mlc::eq<I1::dim, I2::dim>::ensure(); 00101 mlc::eq<I1::dim, N::dim>::ensure(); 00102 precondition(marker.size() == mask.size()); 00103 precondition(level::is_greater_or_equal(mask, marker)); 00104 oln_concrete_type(I1) output = marker.clone(); 00105 bool non_stability = true; 00106 while (non_stability) 00107 { 00108 oln_concrete_type(I1) work = geodesic_dilation(output, mask, Ng); 00109 non_stability = !(level::is_equal(work, output)); 00110 output = work; 00111 } 00112 return output; 00113 }
oln::mute< I1 >::ret oln::morpho::sure::geodesic_reconstruction_erosion | ( | const abstract::non_vectorial_image< I1 > & | marker, | |
const abstract::non_vectorial_image< I2 > & | mask, | |||
const abstract::neighborhood< N > & | Ng | |||
) |
Perform a geodesic reconstruction erosion.
Compute the reconstruction by erosion of marker with respect to the mask image using se as structuring element. Soille p.160. This is the simplest algorithm: iteration is performed until stability.
I1 | Exact type of image marker. | |
I2 | Exact type of image mask. | |
N | Exact type of neighborhood. |
#include <oln/basics2d.hh> #include <oln/morpho/opening.hh> #include <oln/morpho/reconstruction.hh> #include <oln/level/compare.hh> #include <ntg/all.hh> int main() { typedef oln::image2d<ntg::int_u8> im_type; im_type im1(oln::load(IMG_IN "lena128.pgm")); im_type im2 = oln::morpho::opening(im1, oln::win_c4p()); oln::save(oln::morpho::sure::geodesic_reconstruction_erosion(im1, im2, oln::neighb_c4()), IMG_OUT "oln_morpho_sure_geodesic_reconstruction_erosion.pbm"); return 0; }
Definition at line 389 of file reconstruction.hh.
References mlc::eq< i, j >::ensure(), geodesic_erosion(), oln::level::is_equal(), and oln::level::is_greater_or_equal().
00392 { 00393 mlc::eq<I1::dim, I2::dim>::ensure(); 00394 mlc::eq<I1::dim, N::dim>::ensure(); 00395 precondition(marker.size() == mask.size()); 00396 precondition(level::is_greater_or_equal(marker, mask)); 00397 oln_concrete_type(I1) output = marker.clone(); 00398 bool non_stability = true; 00399 while (non_stability) 00400 { 00401 oln_concrete_type(I1) work = geodesic_erosion(output, mask, Ng); 00402 non_stability = !(level::is_equal(work, output)); 00403 output = work; 00404 } 00405 return output; 00406 }
oln::mute< I >::ret oln::morpho::sure::minima_imposition | ( | const abstract::non_vectorial_image< I > & | input, | |
const abstract::non_vectorial_image< I2 > & | minima_map, | |||
const abstract::neighborhood< N > & | Ng | |||
) |
Perform a minima imposition.
Impose minima defined by minima_map on input using Ng as neighborhood. minima_map must be a bin image (true for a minimum, false for a non minimum). Soille p.172.
I | Exact type of the first image. | |
I2 | Exact type of the second image. | |
N | Exact type of the neighborhood. |
#include <oln/basics2d.hh> #include <oln/morpho/extrema.hh> #include <ntg/all.hh> #include <iostream> int main() { typedef oln::image2d<ntg::int_u8> im_type; typedef oln::image2d<ntg::bin> bin_im_type; im_type light(oln::load(IMG_IN "lena.pgm")); bin_im_type minima(oln::load(IMG_IN "map.pbm")); oln::save(oln::morpho::sequential::minima_imposition(light, minima, oln::neighb_c4()), IMG_OUT "oln_morpho_sequential_minima_imposition.pgm"); }
Definition at line 165 of file extrema.hh.
mute<I, ntg::bin>::ret oln::morpho::sure::regional_minima | ( | const abstract::non_vectorial_image< I > & | input, | |
const abstract::neighborhood< N > & | Ng | |||
) |
Extract regional minima.
I | Exact type of input image. | |
Exact | type of neighborhood. |
#include <oln/basics2d.hh> #include <oln/morpho/extrema.hh> #include <ntg/all.hh> #include <iostream> int main() { typedef oln::image2d<ntg::int_u8> im_type; im_type im(oln::load(IMG_IN "lena.pgm")); oln::save(oln::morpho::sequential::regional_minima(im, oln::neighb_c4()), IMG_OUT "oln_morpho_sequential_regional_minima.pgm"); }
Definition at line 217 of file extrema.hh.