oln::morpho::fast Namespace Reference

Algorithm enhanced for large structuring elements. More...


Namespaces

namespace  tarjan
 oln::morpho::tarjan implementation.

Functions

template<class I, class N>
oln::mute< I >::ret card_closing (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::card_type< unsigned > >::lambda_type &lambda)
 Perform a cardinal closing.
template<class I, class N>
oln::mute< I >::ret card_opening (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::card_type< unsigned > >::lambda_type &lambda)
 Perform a cardinal opening.
template<class I, class N>
oln::mute< I >::ret integral_closing (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::integral_type< unsigned > >::lambda_type &lambda)
 Perform an integral closing.
template<class I, class N>
oln::mute< I >::ret integral_opening (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::integral_type< unsigned > >::lambda_type &lambda)
 Perform an integral opening.
template<class I, class N>
oln::mute< I >::ret volume_closing (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::volume_type< I > >::lambda_type &lambda, const typename oln::morpho::attr::attr_traits< attr::volume_type< I > >::env_type &env)
 Perform a volume closing.
template<class I, class N>
oln::mute< I >::ret volume_opening (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::volume_type< I > >::lambda_type &lambda, const typename oln::morpho::attr::attr_traits< attr::volume_type< I > >::env_type &env)
 Perform a volume opening.
template<class I, class N>
oln::mute< I >::ret height_opening (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::height_type< unsigned > >::lambda_type &lambda)
 Perform a height closing.
template<class I, class N>
oln::mute< I >::ret height_closing (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::height_type< unsigned > >::lambda_type &lambda)
 Perform a height closing.
template<class I, class N>
oln::mute< I >::ret maxvalue_closing (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::maxvalue_type< unsigned > >::lambda_type &lambda)
 Perform a maxvalue closing.
template<class I, class N>
oln::mute< I >::ret maxvalue_opening (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::maxvalue_type< unsigned > >::lambda_type &lambda)
 Perform a maxvalue opening.
template<class I, class N>
oln::mute< I >::ret minvalue_opening (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::minvalue_type< unsigned > >::lambda_type &lambda)
 Perform a minvalue opening.
template<class I, class N>
oln::mute< I >::ret minvalue_closing (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::minvalue_type< unsigned > >::lambda_type &lambda)
 Perform a minvalue closing.
template<class I, class N>
oln::mute< I >::ret ball_opening (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::ball_type< I > >::lambda_type &lambda)
 Perform a ball opening.
template<class I, class N>
oln::mute< I >::ret ball_closing (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::ball_type< I > >::lambda_type &lambda)
 Perform a ball closing.
template<class I, class N>
oln::mute< I >::ret dist_opening (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::dist_type< I > >::lambda_type &lambda)
 Perform a dist opening.
template<class I, class N>
oln::mute< I >::ret dist_closing (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::dist_type< I > >::lambda_type &lambda)
 Perform a dist closing.
template<class I, class N>
oln::mute< I >::ret cube_closing (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::cube_type< I > >::lambda_type &lambda)
 Perform a cube closing.
template<class I, class N>
oln::mute< I >::ret cube_opening (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::cube_type< I > >::lambda_type &lambda)
 Perform a cube opening.
template<class I, class N>
oln::mute< I >::ret box_closing (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::box_type< I > >::lambda_type &lambda)
 Perform a box closing.
template<class I, class N>
oln::mute< I >::ret box_opening (const abstract::non_vectorial_image< I > &input, const abstract::neighborhood< N > &Ng, const typename oln::morpho::attr::attr_traits< attr::box_type< I > >::lambda_type &lambda)
 Perform a box opening.
template<class I, class E>
oln::mute< I >::ret closing (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Processing closing.
template<class I, class E>
oln::mute< I >::ret dilation (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
template<class I, class E>
oln::mute< I >::ret erosion (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Perform a morphological erosion.
template<class C, class B, class I, class E>
mute< I, typename convoutput<
C, B, typename mlc::exact<
I >::ret::value_type >::ret
>::ret 
beucher_gradient (const convert::abstract::conversion< C, B > &c, const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Process a morphological beucher gradient.
template<class I, class E>
oln::mute< I >::ret beucher_gradient (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Process a morphological beucher gradient.
template<class C, class B, class I, class E>
mute< I, typename convoutput<
C, B, typename mlc::exact<
I >::ret::value_type >::ret
>::ret 
internal_gradient (const convert::abstract::conversion< C, B > &c, const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Process a morphological internal gradient.
template<class I, class E>
oln::mute< I >::ret external_gradient (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Process a morphological internal gradient.
template<class C, class B, class I, class E1, class E2>
mute< I, typename convoutput<
C, B, typename mlc::exact<
I >::ret::value_type >::ret
>::ret 
hit_or_miss (const convert::abstract::conversion< C, B > &c, const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E1 > &se1, const abstract::struct_elt< E2 > &se2)
 Preform a 'hit or miss' transform.
template<class I, class E1, class E2>
oln::mute< I >::ret hit_or_miss (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E1 > &se1, const abstract::struct_elt< E2 > &se2)
 Preform a 'hit or miss' transform.
template<class I, class E1, class E2>
oln::mute< I >::ret hit_or_miss_opening (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E1 > &se1, const abstract::struct_elt< E2 > &se2)
 Perform an hit or miss opening.
template<class I, class E1, class E2>
oln::mute< I >::ret hit_or_miss_opening_bg (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E1 > &se1, const abstract::struct_elt< E2 > &se2)
 Perform an hit or miss opening of background.
template<class I, class E1, class E2>
oln::mute< I >::ret hit_or_miss_closing (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E1 > &se1, const abstract::struct_elt< E2 > &se2)
 Perform an hit or miss closing.
template<class I, class E1, class E2>
oln::mute< I >::ret hit_or_miss_closing_bg (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E1 > &se1, const abstract::struct_elt< E2 > &se2)
 Perform an hit or miss closing of background.
template<class C, class B, class I, class E>
mute< I, typename convoutput<
C, B, typename mlc::exact<
I >::ret::value_type >::ret
>::ret 
laplacian (const convert::abstract::conversion< C, B > &c, const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Compute the laplacian of an image.
template<class DestValue, class I, class E>
mute< I, DestValue >::ret laplacian (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Compute the laplacian of an image.
template<class I, class E>
oln::mute< I >::ret opening (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Perform a morphological opening.
template<class I, class E1, class E2>
oln::mute< I >::ret thickening (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E1 > &se1, const abstract::struct_elt< E2 > &se2)
 Thicken an image.
template<class I, class E1, class E2>
oln::mute< I >::ret thinning (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E1 > &se1, const abstract::struct_elt< E2 > &se2)
 Thin an image.
template<class C, class B, class I, class E>
mute< I, typename convoutput<
C, B, typename mlc::exact<
I >::ret::value_type >::ret
>::ret 
white_top_hat (const convert::abstract::conversion< C, B > &c, const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Compute the white top hat of an image.
template<class I, class E>
oln::mute< I >::ret white_top_hat (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Compute the white top hat of an image.
template<class C, class B, class I, class E>
mute< I, typename convoutput<
C, B, typename mlc::exact<
I >::ret::value_type >::ret
>::ret 
black_top_hat (const convert::abstract::conversion< C, B > &c, const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Compute the black top hat of an image.
template<class I, class E>
oln::mute< I >::ret black_top_hat (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Compute the black top hat of an image.
template<class C, class B, class I, class E>
mute< I, typename convoutput<
C, B, typename mlc::exact<
I >::ret::value_type >::ret
>::ret 
self_complementary_top_hat (const convert::abstract::conversion< C, B > &c, const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Compute the self complementary top hat of an image.
template<class I, class E>
oln::mute< I >::ret self_complementary_top_hat (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Compute the self complementary top hat of an image.
template<class C, class B, class I, class E>
mute< I, typename convoutput<
C, B, typename mlc::exact<
I >::ret::value_type >::ret
>::ret 
top_hat_contrast_op (const convert::abstract::conversion< C, B > &c, const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Top hat contrast operator.
template<class I, class E>
oln::mute< I >::ret top_hat_contrast_op (const abstract::non_vectorial_image< I > &input, const abstract::struct_elt< E > &se)
 Top hat contrast operator.


Detailed Description

Algorithm enhanced for large structuring elements.

Function Documentation

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::ball_closing ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::ball_type< I > >::lambda_type &  lambda 
)

Perform a ball closing.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 #include <iostream>
 int main()
 {
   typedef oln::image2d<ntg::int_u8>    im_type;

   im_type im1(oln::load(IMG_IN "lena128.pgm"));
   im1 = oln::morpho::fast::ball_closing(im1, oln::neighb_c4(), 5);
   oln::save(im1, IMG_OUT "oln_morpho_fast_ball_closing.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_ball_closing.png

Definition at line 551 of file attribute_closing_opening.hh.

00563 {

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::ball_opening ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::ball_type< I > >::lambda_type &  lambda 
)

Perform a ball opening.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 #include <iostream>
 int main()
 {
   typedef oln::image2d<ntg::int_u8>    im_type;

   im_type im1(oln::load(IMG_IN "lena128.pgm"));
   im1 = oln::morpho::fast::ball_opening(im1, oln::neighb_c4(), 5);
   oln::save(im1, IMG_OUT "oln_morpho_fast_ball_opening.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_ball_opening.png

Definition at line 523 of file attribute_closing_opening.hh.

00535 {

template<class I, class E>
oln::mute< I >::ret oln::morpho::fast::beucher_gradient ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Process a morphological beucher gradient.

Parameters:
I Exact type of the input image.
E Exact type of the structuring element.
Returns:
The beucher gradient of the input.
 #include <oln/basics2d.hh>
 #include <oln/morpho/gradient.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"));

   save(oln::morpho::beucher_gradient(im1, oln::win_c8p()),
        IMG_OUT "oln_morpho_beucher_gradient.pbm");
   return  0;
 }

lena128_pgm.png
=>
oln_morpho_beucher_gradient.png

Definition at line 342 of file gradient.hh.

template<class C, class B, class I, class E>
mute<I, typename convoutput<C, B,typename mlc::exact< I >::ret::value_type>::ret>::ret oln::morpho::fast::beucher_gradient ( const convert::abstract::conversion< C, B > &  c,
const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Process a morphological beucher gradient.

Compute the arithmetic difference between the diltation and the erosion of input using se as structural element. Soille, p67.

Definition at line 298 of file gradient.hh.

Referenced by oln::snakes::snake< algorithm >::snake().

template<class I, class E>
oln::mute< I >::ret oln::morpho::fast::black_top_hat ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Compute the black top hat of an image.

Parameters:
I Exact type of the image.
E Exact type of the structuring element.
 #include <oln/basics2d.hh>
 #include <oln/morpho/top_hat.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 "lena256.pgm"));

   oln::save(oln::morpho::fast::black_top_hat(im1,
                                              oln::win_c8p()),
             IMG_OUT "oln_morpho_fast_black_top_hat_overload.pbm");
 }

lena256_pgm.png
=>
oln_morpho_fast_black_top_hat_overload.png

Definition at line 619 of file top_hat.hh.

template<class C, class B, class I, class E>
mute<I, typename convoutput<C, B,typename mlc::exact< I >::ret::value_type>::ret>::ret oln::morpho::fast::black_top_hat ( const convert::abstract::conversion< C, B > &  c,
const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Compute the black top hat of an image.

Compute black top hat of input using se as structuring element. Soille p.105.

 #include <oln/basics2d.hh>
 #include <oln/morpho/top_hat.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 "lena256.pgm"));

   oln::save(oln::morpho::fast::black_top_hat
                        (oln::convert::bound<ntg::int_u8>(),
                       im1,
                       oln::win_c8p()),
             IMG_OUT "oln_morpho_fast_black_top_hat.pbm");
 }

lena256_pgm.png
=>
oln_morpho_fast_black_top_hat.png

Definition at line 577 of file top_hat.hh.

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::box_closing ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::box_type< I > >::lambda_type &  lambda 
)

Perform a box closing.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 #include <iostream>
 int main()
 {
   typedef oln::image2d<ntg::int_u8>    im_type;
   ntg::vec<2, unsigned, mlc::final>    lambda;
   lambda[0] = lambda[1] = 50;
   im_type im1(oln::load(IMG_IN "lena128.pgm"));
   im1 = oln::morpho::fast::box_closing(im1, oln::neighb_c4(), lambda);
   oln::save(im1, IMG_OUT "oln_morpho_fast_box_closing.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_box_closing.png

Definition at line 692 of file attribute_closing_opening.hh.

00704 {

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::box_opening ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::box_type< I > >::lambda_type &  lambda 
)

Perform a box opening.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 #include <iostream>
 int main()
 {
   typedef oln::image2d<ntg::int_u8>    im_type;
   ntg::vec<2, unsigned, mlc::final>    lambda;
   lambda[0] = lambda[1] = 50;
   im_type im1(oln::load(IMG_IN "lena128.pgm"));
   im1 = oln::morpho::fast::box_opening(im1, oln::neighb_c4(), lambda);
   oln::save(im1, IMG_OUT "oln_morpho_fast_box_opening.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_box_opening.png

Definition at line 721 of file attribute_closing_opening.hh.

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::card_closing ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::card_type< unsigned > >::lambda_type &  lambda 
)

Perform a cardinal closing.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.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"));
   im1 = oln::morpho::fast::card_closing(im1, oln::neighb_c4(), 200);
   oln::save(im1, IMG_OUT "oln_morpho_fast_card_closing.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_card_closing.png

Definition at line 189 of file attribute_closing_opening.hh.

00200 {

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::card_opening ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::card_type< unsigned > >::lambda_type &  lambda 
)

Perform a cardinal opening.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.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"));
   im1 = oln::morpho::fast::card_opening(im1, oln::neighb_c4(), 200);
   oln::save(im1, IMG_OUT "oln_morpho_fast_card_opening.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_card_opening.png

Definition at line 216 of file attribute_closing_opening.hh.

00227 {

template<class I, class E>
oln::mute< I >::ret oln::morpho::fast::closing ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Processing closing.

Compute the morphological closing of input using se as structuring element.

Parameters:
I Exact type of the input image.
E Exact type of the structuring element.
 #include <oln/basics2d.hh>
 #include <oln/morpho/closing.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 int main()
 {
   typedef oln::image2d<ntg::bin>       im_type;

   im_type im1(oln::load(IMG_IN "object.pbm"));
   save(oln::morpho::closing(im1, oln::win_c8p()),
        IMG_OUT "oln_morpho_closing.pbm");
   return  0;
 }
object_pbm.png
=>
oln_morpho_closing.png

Definition at line 205 of file closing.hh.

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::cube_closing ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::cube_type< I > >::lambda_type &  lambda 
)

Perform a cube closing.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 #include <iostream>
 int main()
 {
   typedef oln::image2d<ntg::int_u8>    im_type;

   im_type im1(oln::load(IMG_IN "lena128.pgm"));
   im1 = oln::morpho::fast::cube_closing(im1, oln::neighb_c4(), 5);
   oln::save(im1, IMG_OUT "oln_morpho_fast_cube_closing.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_cube_closing.png

Definition at line 635 of file attribute_closing_opening.hh.

00647 {

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::cube_opening ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::cube_type< I > >::lambda_type &  lambda 
)

Perform a cube opening.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 #include <iostream>
 int main()
 {
   typedef oln::image2d<ntg::int_u8>    im_type;

   im_type im1(oln::load(IMG_IN "lena128.pgm"));
   im1 = oln::morpho::fast::cube_opening(im1, oln::neighb_c4(), 5);
   oln::save(im1, IMG_OUT "oln_morpho_fast_cube_opening.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_cube_opening.png

Definition at line 663 of file attribute_closing_opening.hh.

00675 {

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::dist_closing ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::dist_type< I > >::lambda_type &  lambda 
)

Perform a dist closing.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 #include <iostream>
 int main()
 {
   typedef oln::image2d<ntg::int_u8>    im_type;

   im_type im1(oln::load(IMG_IN "lena128.pgm"));
   im1 = oln::morpho::fast::dist_closing(im1, oln::neighb_c4(), 5);
   oln::save(im1, IMG_OUT "oln_morpho_fast_dist_closing.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_dist_closing.png

Definition at line 607 of file attribute_closing_opening.hh.

00619 {

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::dist_opening ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::dist_type< I > >::lambda_type &  lambda 
)

Perform a dist opening.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 #include <iostream>
 int main()
 {
   typedef oln::image2d<ntg::int_u8>    im_type;

   im_type im1(oln::load(IMG_IN "lena128.pgm"));
   im1 = oln::morpho::fast::dist_opening(im1, oln::neighb_c4(), 5);
   oln::save(im1, IMG_OUT "oln_morpho_fast_dist_opening.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_dist_opening.png

Definition at line 579 of file attribute_closing_opening.hh.

00591 {

template<class I, class E>
oln::mute< I >::ret oln::morpho::fast::erosion ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Perform a morphological erosion.

Compute the morphological erosion of input using se as structuring element.

Parameters:
I Exact type of the input image.
E Exact type of the structuring element.
 #include <oln/basics2d.hh>
 #include <oln/morpho/erosion.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 int main()
 {
   typedef oln::image2d<ntg::bin>       im_type;

   im_type im1(oln::load(IMG_IN "object.pbm"));
   save(oln::morpho::fast::erosion(im1, oln::win_c8p()),
        IMG_OUT "oln_morpho_fast_erosion.pbm");
 }

object_pbm.png
=>
oln_morpho_fast_erosion.png

Definition at line 185 of file erosion.hh.

00187       {
00188         return fast_morpho<I, E, utils::histogram_min<oln_value_type(I)> >
00189           (input, se);
00190       }

template<class I, class E>
oln::mute< I >::ret oln::morpho::fast::external_gradient ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Process a morphological internal gradient.

Parameters:
I Exact type of the input image.
E Exact type of the structuring element.
Returns:
The internal gradient of the input.
 #include <oln/basics2d.hh>
 #include <oln/morpho/gradient.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 "lena256.pgm"));

   save(oln::morpho::internal_gradient(im1, oln::win_c8p()),
        IMG_OUT "oln_morpho_internal_gradient.pbm");
   return  0;
 }
 \encode

 \image html lena256_pgm.png
 \image latex lena256_pgm.png
 =>
 \image html oln_morpho_internal_gradient.png
 \image latex oln_morpho_internal_gradient.png
*/
template<class I, class E>
oln_concrete_type(I)
  internal_gradient(const abstract::non_vectorial_image<I>& input, const
                    abstract::struct_elt<E>& se)
{
  return internal_gradient(convert::force<oln_value_type(I)>(), input, se);
}

template<class C, class B, class I, class E>
typename mute<I, typename convoutput<C, B,oln_value_type(I)>::ret>::ret
external_gradient(const convert::abstract::conversion<C, B>& c,
                  const abstract::non_vectorial_image<I>& input,
                  const abstract::struct_elt<E>& se)
{
  return arith::minus(c, dilation(input, se), input);
}


lena256_pgm.png
=>
oln_morpho_external_gradient.png

Definition at line 471 of file gradient.hh.

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::height_closing ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::height_type< unsigned > >::lambda_type &  lambda 
)

Perform a height closing.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 #include <iostream>
 int main()
 {
   typedef oln::image2d<ntg::int_u8>    im_type;

   im_type im1(oln::load(IMG_IN "lena128.pgm"));
   im1 = oln::morpho::fast::height_closing(im1, oln::neighb_c4(), 5);
   oln::save(im1, IMG_OUT "oln_morpho_fast_height_closing.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_height_closing.png

Definition at line 382 of file attribute_closing_opening.hh.

00395 {

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::height_opening ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::height_type< unsigned > >::lambda_type &  lambda 
)

Perform a height closing.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.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"));
   im1 = oln::morpho::fast::height_opening(im1, oln::neighb_c4(), 5);
   oln::save(im1, IMG_OUT "oln_morpho_fast_height_opening.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_height_opening.png

Definition at line 354 of file attribute_closing_opening.hh.

00366 {

template<class I, class E1, class E2>
oln::mute< I >::ret oln::morpho::fast::hit_or_miss ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E1 > &  se1,
const abstract::struct_elt< E2 > &  se2 
)

Preform a 'hit or miss' transform.

Parameters:
I Exact type of the input image.
E1 Exact type of the first structuring element.
E2 Exact type of the second structuring element.
 #include <oln/basics2d.hh>
 #include <oln/morpho/hit_or_miss.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 int main()
 {
   typedef oln::image2d<ntg::bin>       im_type;

   im_type      im1(oln::load(IMG_IN "object.pbm"));

   oln::window2d mywin;
   mywin
    .add(-3,-2).add(-3,-1).add(-3,0).add(-3,1).add(-3,2)
    .add(-2,-1).add(-2,0).add(-2,1)
    .add(-1,0);
   oln::window2d mywin2 = - mywin;

   oln::save(oln::morpho::fast::hit_or_miss(im1, mywin, mywin2),
             IMG_OUT "oln_morpho_fast_hit_or_miss_overload.pbm");
 }

object_pbm.png
=>
oln_morpho_fast_hit_or_miss_overload.png

Definition at line 587 of file hit_or_miss.hh.

template<class C, class B, class I, class E1, class E2>
mute<I, typename convoutput<C, B,typename mlc::exact< I >::ret::value_type>::ret>::ret oln::morpho::fast::hit_or_miss ( const convert::abstract::conversion< C, B > &  c,
const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E1 > &  se1,
const abstract::struct_elt< E2 > &  se2 
)

Preform a 'hit or miss' transform.

Compute the hit_or_miss transform of input by the composite structuring element (se1, se2). Soille p.131.

By definition se1 and se2 must have the same origin, and need to be disjoint. This algorithm has been extended to every data types (although it is not increasing). Beware the result depends upon the image data type if it is not bin.

 #include <oln/basics2d.hh>
 #include <oln/morpho/hit_or_miss.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 int main()
 {
   typedef oln::image2d<ntg::bin>       im_type;

   im_type      im1(oln::load(IMG_IN "object.pbm"));

   oln::window2d mywin;
   mywin
    .add(-3,-2).add(-3,-1).add(-3,0).add(-3,1).add(-3,2)
    .add(-2,-1).add(-2,0).add(-2,1)
    .add(-1,0);
   oln::window2d mywin2 = - mywin;

   oln::save(oln::morpho::fast::hit_or_miss
                (oln::convert::bound<ntg::int_u8>(), im1, mywin, mywin2),
             IMG_OUT "oln_morpho_fast_hit_or_miss.pbm");
 }

object_pbm.png
=>
oln_morpho_fast_hit_or_miss.png

Definition at line 525 of file hit_or_miss.hh.

template<class I, class E1, class E2>
oln::mute< I >::ret oln::morpho::fast::hit_or_miss_closing ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E1 > &  se1,
const abstract::struct_elt< E2 > &  se2 
)

Perform an hit or miss closing.

Compute the hit_or_miss closing of input by the composite structuring element (se1, se2). This is the dual transformation of hit-or-miss opening with respect to set complementation. Soille p.135.

By definition se1 and se2 must have the same origin, and need to be disjoint. This algorithm has been extended to every data types (althought it is not increasing). Beware the result depends upon the image data type if it is not bin.

Parameters:
I Exact type of the input image.
E1 Exact type of the first structuring element.
E2 Exact type of the second structuring element.
 #include <oln/basics2d.hh>
 #include <oln/morpho/hit_or_miss.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 int main()
 {
   typedef oln::image2d<ntg::bin>       im_type;

   im_type      im1(oln::load(IMG_IN "object.pbm"));

   oln::window2d mywin;
   mywin
    .add(-3,-2).add(-3,-1).add(-3,0).add(-3,1).add(-3,2)
    .add(-2,-1).add(-2,0).add(-2,1)
    .add(-1,0);
   oln::window2d mywin2 = - mywin;

   oln::save(oln::morpho::fast::hit_or_miss_closing(im1, mywin, mywin2),
             IMG_OUT "oln_morpho_fast_hit_or_miss_closing.pbm");
 }

object_pbm.png
=>
oln_morpho_fast_hit_or_miss_closing.png

Definition at line 777 of file hit_or_miss.hh.

template<class I, class E1, class E2>
oln::mute< I >::ret oln::morpho::fast::hit_or_miss_closing_bg ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E1 > &  se1,
const abstract::struct_elt< E2 > &  se2 
)

Perform an hit or miss closing of background.

Compute the hit_or_miss closing of the background of input by the composite structuring element (se1, se2). This is the dual transformation of hit-or-miss opening with respect to set complementation. Soille p.135.

By definition se1 and se2 must have the same origin, and need to be disjoint. This algorithm has been extended to every data types (althought it is not increasing). Beware the result depends upon the image data type if it is not bin.

Parameters:
I Exact type of the input image.
E1 Exact type of the first structuring element.
E2 Exact type of the second structuring element.
 #include <oln/basics2d.hh>
 #include <oln/morpho/hit_or_miss.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 int main()
 {
   typedef oln::image2d<ntg::bin>       im_type;

   im_type      im1(oln::load(IMG_IN "object.pbm"));

   oln::window2d mywin;
   mywin
    .add(-3,-2).add(-3,-1).add(-3,0).add(-3,1).add(-3,2)
    .add(-2,-1).add(-2,0).add(-2,1)
    .add(-1,0);
   oln::window2d mywin2 = - mywin;

   oln::save(oln::morpho::fast::hit_or_miss_closing_bg(im1, mywin, mywin2),
             IMG_OUT "oln_morpho_fast_hit_or_miss_closing_bg.pbm");
 }

object_pbm.png
=>
oln_morpho_fast_hit_or_miss_closing_bg.png

Definition at line 840 of file hit_or_miss.hh.

template<class I, class E1, class E2>
oln::mute< I >::ret oln::morpho::fast::hit_or_miss_opening ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E1 > &  se1,
const abstract::struct_elt< E2 > &  se2 
)

Perform an hit or miss opening.

Compute the hit_or_miss opening of input by the composite structuring element (se1, se2). Soille p.134.

By definition se1 and se2 must have the same origin, and need to be disjoint. This algorithm has been extended to every data types (althought it is not increasing). Beware the result depends upon the image data type if it is not bin.

Parameters:
I Exact type of the input image.
E1 Exact type of the first structuring element.
E2 Exact type of the second structuring element.
 #include <oln/basics2d.hh>
 #include <oln/morpho/hit_or_miss.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 int main()
 {
   typedef oln::image2d<ntg::bin>       im_type;

   im_type      im1(oln::load(IMG_IN "object.pbm"));

   oln::window2d mywin;
   mywin
    .add(-3,-2).add(-3,-1).add(-3,0).add(-3,1).add(-3,2)
    .add(-2,-1).add(-2,0).add(-2,1)
    .add(-1,0);
   oln::window2d mywin2 = - mywin;

    oln::save(oln::morpho::fast::hit_or_miss_opening(im1, mywin, mywin2),
              IMG_OUT "oln_morpho_fast_hit_or_miss_opening.pbm");
 }

object_pbm.png
=>
oln_morpho_fast_hit_or_miss_opening.png

Definition at line 651 of file hit_or_miss.hh.

template<class I, class E1, class E2>
oln::mute< I >::ret oln::morpho::fast::hit_or_miss_opening_bg ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E1 > &  se1,
const abstract::struct_elt< E2 > &  se2 
)

Perform an hit or miss opening of background.

Compute the hit_or_miss opening of the background of input by the composite structuring element (se1, se2). Soille p.135.

By definition se1 and se2 must have the same origin, and need to be disjoint. This algorithm has been extended to every data types (although it is not increasing). Beware the result depends upon the image data type if it is not bin.

Parameters:
I Exact type of the input image.
E1 Exact type of the first structuring element.
E2 Exact type of the second structuring element.
 #include <oln/basics2d.hh>
 #include <oln/morpho/hit_or_miss.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 int main()
 {
   typedef oln::image2d<ntg::bin>       im_type;

   im_type      im1(oln::load(IMG_IN "object.pbm"));

   oln::window2d mywin;
   mywin
    .add(-3,-2).add(-3,-1).add(-3,0).add(-3,1).add(-3,2)
    .add(-2,-1).add(-2,0).add(-2,1)
    .add(-1,0);
   oln::window2d mywin2 = - mywin;

   oln::save(oln::morpho::fast::hit_or_miss_opening_bg(im1, mywin, mywin2),
             IMG_OUT "oln_morpho_fast_hit_or_miss_opening_bg.pbm");
 }

object_pbm.png
=>
oln_morpho_fast_hit_or_miss_opening_bg.png

Definition at line 711 of file hit_or_miss.hh.

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::integral_closing ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::integral_type< unsigned > >::lambda_type &  lambda 
)

Perform an integral closing.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.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"));
   im1 = oln::morpho::fast::integral_closing(im1, oln::neighb_c4(), 200);
   oln::save(im1, IMG_OUT "oln_morpho_fast_integral_closing.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_integral_closing.png

Definition at line 243 of file attribute_closing_opening.hh.

00254 {

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::integral_opening ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::integral_type< unsigned > >::lambda_type &  lambda 
)

Perform an integral opening.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.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"));
   im1 = oln::morpho::fast::integral_opening(im1, oln::neighb_c4(), 200);
   oln::save(im1, IMG_OUT "oln_morpho_fast_integral_opening.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_integral_opening.png

Definition at line 270 of file attribute_closing_opening.hh.

00281 {

template<class C, class B, class I, class E>
mute<I, typename convoutput<C, B,typename mlc::exact< I >::ret::value_type>::ret>::ret oln::morpho::fast::internal_gradient ( const convert::abstract::conversion< C, B > &  c,
const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Process a morphological internal gradient.

Returns:
The internal gradient of the input.
Compute the arithmetic difference between the original image input and the erosion of input using se as structural element. Soille, p67.

Definition at line 365 of file gradient.hh.

template<class DestValue, class I, class E>
mute<I, DestValue>::ret oln::morpho::fast::laplacian ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Compute the laplacian of an image.

Compute the laplacian of input using se as structural element.

 #include <oln/basics2d.hh>
 #include <oln/morpho/laplacian.hh>
 #include <oln/convert/stretch.hh>
 #include <ntg/all.hh>
 int main()
 {
   typedef oln::image2d<ntg::int_u8>    im_type;

   im_type      im1(oln::load(IMG_IN "lena256.pgm"));

   oln::image2d<ntg::int_s<10> > i10 =
     oln::morpho::fast::laplacian(oln::convert::bound<ntg::int_s<10> >(),
                                 im1,
                                 oln::win_c8p());

   oln::image2d<ntg::int_s<10> > f10 =
     oln::morpho::fast::laplacian<ntg::int_s<10> >(im1,
                                                  oln::win_c8p());

   oln::save(apply(oln::convert::stretch<ntg::int_u8>(),(f10)),
            IMG_OUT "oln_morpho_fast_laplacian_overload.pgm");
 }

lena256_pgm.png
=>
oln_morpho_fast_laplacian_overload.png

Todo:
FIXME: Not instantiated in swilena (see tools/swilena/generate_morpho_instantiations.py)

Definition at line 285 of file laplacian.hh.

template<class C, class B, class I, class E>
mute<I, typename convoutput<C, B,typename mlc::exact< I >::ret::value_type>::ret>::ret oln::morpho::fast::laplacian ( const convert::abstract::conversion< C, B > &  c,
const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Compute the laplacian of an image.

Compute the laplacian of input using se as structural element.

 #include <oln/basics2d.hh>
 #include <oln/morpho/laplacian.hh>
 #include <oln/convert/stretch.hh>
 #include <ntg/all.hh>
 int main()
 {
   typedef oln::image2d<ntg::int_u8>    im_type;

   im_type      im1(oln::load(IMG_IN "lena256.pgm"));

   oln::image2d<ntg::int_s<10> > i10 =
     oln::morpho::fast::laplacian(oln::convert::bound<ntg::int_s<10> >(),
                                 im1,
                                 oln::win_c8p());

   oln::save(apply(oln::convert::stretch<ntg::int_u8>(), i10),
            IMG_OUT "oln_morpho_fast_laplacian.pgm");
 }

lena256_pgm.png
=>
oln_morpho_fast_laplacian.png

Definition at line 232 of file laplacian.hh.

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::maxvalue_closing ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::maxvalue_type< unsigned > >::lambda_type &  lambda 
)

Perform a maxvalue closing.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 #include <iostream>
 int main()
 {
   typedef oln::image2d<ntg::int_u8>    im_type;

   im_type im1(oln::load(IMG_IN "lena128.pgm"));
   im1 = oln::morpho::fast::maxvalue_closing(im1, oln::neighb_c4(), 5);
   oln::save(im1, IMG_OUT "oln_morpho_fast_maxvalue_closing.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_maxvalue_closing.png

Definition at line 411 of file attribute_closing_opening.hh.

00423 {

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::maxvalue_opening ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::maxvalue_type< unsigned > >::lambda_type &  lambda 
)

Perform a maxvalue opening.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 #include <iostream>
 int main()
 {
   typedef oln::image2d<ntg::int_u8>    im_type;

   im_type im1(oln::load(IMG_IN "lena128.pgm"));
   im1 = oln::morpho::fast::maxvalue_opening(im1, oln::neighb_c4(), 5);
   oln::save(im1, IMG_OUT "oln_morpho_fast_maxvalue_opening.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_maxvalue_opening.png

Definition at line 439 of file attribute_closing_opening.hh.

00451 {

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::minvalue_closing ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::minvalue_type< unsigned > >::lambda_type &  lambda 
)

Perform a minvalue closing.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 #include <iostream>
 int main()
 {
   typedef oln::image2d<ntg::int_u8>    im_type;

   im_type im1(oln::load(IMG_IN "lena128.pgm"));
   im1 = oln::morpho::fast::minvalue_closing(im1, oln::neighb_c4(), 5);
   oln::save(im1, IMG_OUT "oln_morpho_fast_minvalue_closing.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_minvalue_closing.png

Definition at line 495 of file attribute_closing_opening.hh.

00507 {

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::minvalue_opening ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::minvalue_type< unsigned > >::lambda_type &  lambda 
)

Perform a minvalue opening.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 #include <iostream>
 int main()
 {
   typedef oln::image2d<ntg::int_u8>    im_type;

   im_type im1(oln::load(IMG_IN "lena128.pgm"));
   im1 = oln::morpho::fast::minvalue_opening(im1, oln::neighb_c4(), 5);
   oln::save(im1, IMG_OUT "oln_morpho_fast_minvalue_opening.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_minvalue_opening.png

Definition at line 467 of file attribute_closing_opening.hh.

00479 {

template<class I, class E>
oln::mute< I >::ret oln::morpho::fast::opening ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Perform a morphological opening.

Compute the morphological opening of input using se as structuring element.

Parameters:
I Exact type of the input image.
E Exact type of the structuring element.
 #include <oln/basics2d.hh>
 #include <oln/morpho/opening.hh>
 #include <oln/level/compare.hh>
 #include <ntg/all.hh>
 int main()
 {
   typedef oln::image2d<ntg::bin>       im_type;

   im_type      im(oln::load(IMG_IN "object.pbm"));

   oln::save(oln::morpho::fast::opening(im, oln::win_c8p()),
             IMG_OUT "oln_morpho_fast_opening.pbm");
 }

object_pbm.png
=>
oln_morpho_fast_opening.png

Definition at line 174 of file opening.hh.

template<class I, class E>
oln::mute< I >::ret oln::morpho::fast::self_complementary_top_hat ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Compute the self complementary top hat of an image.

 #include <oln/basics2d.hh>
 #include <oln/morpho/top_hat.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 "lena256.pgm"));

   oln::save(oln::morpho::fast::self_complementary_top_hat(im1,
                                                          oln::win_c8p()),
      IMG_OUT "oln_morpho_fast_self_complementary_top_hat_overload.pbm");
 }

lena256_pgm.png
=>
oln_morpho_fast_self_complementary_top_hat_overload.png

Definition at line 709 of file top_hat.hh.

template<class C, class B, class I, class E>
mute<I, typename convoutput<C, B,typename mlc::exact< I >::ret::value_type>::ret>::ret oln::morpho::fast::self_complementary_top_hat ( const convert::abstract::conversion< C, B > &  c,
const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Compute the self complementary top hat of an image.

Compute self complementary top hat of input using se as structuring element. Soille p.106.

 #include <oln/basics2d.hh>
 #include <oln/morpho/top_hat.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 "lena256.pgm"));

   oln::save(oln::morpho::fast::self_complementary_top_hat
                 (oln::convert::bound<ntg::int_u8>(),
                  im1,
                  oln::win_c8p()),
             IMG_OUT "oln_morpho_fast_self_complementary_top_hat.pbm");
 }

lena256_pgm.png
=>
oln_morpho_fast_self_complementary_top_hat.png

Definition at line 669 of file top_hat.hh.

template<class I, class E1, class E2>
oln::mute< I >::ret oln::morpho::fast::thickening ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E1 > &  se1,
const abstract::struct_elt< E2 > &  se2 
)

Thicken an image.

Parameters:
I Exact type of the image.
E1 Exact type of the first structuring element.
E2 Exact type of the second structuring element.
 #include <oln/basics2d.hh>
 #include <oln/morpho/thickening.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 "lena256.pgm"));

   oln::save(oln::morpho::fast::thickening(im1,
                                          oln::win_c8p(),
                                          oln::win_c8p()),
                                          IMG_OUT "oln_morpho_fast_thickening.pbm");
   return  0;
 }

lena256_pgm.png
=>
oln_morpho_fast_thickening.png

Definition at line 194 of file thickening.hh.

template<class I, class E1, class E2>
oln::mute< I >::ret oln::morpho::fast::thinning ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E1 > &  se1,
const abstract::struct_elt< E2 > &  se2 
)

Thin an image.

Parameters:
I Exact type of the image.
E1 Exact type of the first structuring element.
E2 Exact type of the second structuring element.
 #include <oln/basics2d.hh>
 #include <oln/morpho/thinning.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 "lena256.pgm"));

   oln::save(oln::morpho::fast::thinning(im1,
                                          oln::win_c8p(),
                                          oln::win_c8p()),
                                          IMG_OUT "oln_morpho_fast_thinning.pbm");
   return  0;
 }

lena256_pgm.png
=>
oln_morpho_fast_thinning.png

Definition at line 194 of file thinning.hh.

template<class I, class E>
oln::mute< I >::ret oln::morpho::fast::top_hat_contrast_op ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Top hat contrast operator.

Enhance contrast input by adding the white top hat, then subtracting the black top hat to input. Top hats are computed using se as structuring element. Soille p.109.

 #include <oln/basics2d.hh>
 #include <oln/morpho/top_hat.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 "lena256.pgm"));

   oln::save(oln::morpho::fast::top_hat_contrast_op(im1,
                                                    oln::win_c8p()),
             IMG_OUT "oln_morpho_fast_top_hat_contrast_op_overload.pbm");
 }

lena256_pgm.png
=>
oln_morpho_fast_top_hat_contrast_op_overload.png

Definition at line 804 of file top_hat.hh.

template<class C, class B, class I, class E>
mute<I, typename convoutput<C, B,typename mlc::exact< I >::ret::value_type>::ret>::ret oln::morpho::fast::top_hat_contrast_op ( const convert::abstract::conversion< C, B > &  c,
const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Top hat contrast operator.

Enhance contrast input by adding the white top hat, then subtracting the black top hat to input. Top hats are computed using se as structuring element. Soille p.109.

 #include <oln/basics2d.hh>
 #include <oln/morpho/top_hat.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 "lena256.pgm"));

   oln::save(oln::morpho::fast::top_hat_contrast_op
                                (oln::convert::bound<ntg::int_u8>(),
                               im1,
                               oln::win_c8p()),
             IMG_OUT "oln_morpho_fast_top_hat_contrast_op.pbm");
 }

lena256_pgm.png
=>
oln_morpho_fast_top_hat_contrast_op.png

Definition at line 757 of file top_hat.hh.

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::volume_closing ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::volume_type< I > >::lambda_type &  lambda,
const typename oln::morpho::attr::attr_traits< attr::volume_type< I > >::env_type &  env 
)

Perform a volume closing.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.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"));
   oln::morpho::env::OtherImageEnv<im_type>     env(im1);
   im1 = oln::morpho::fast::volume_closing(im1, oln::neighb_c4(), 200, env);
   oln::save(im1, IMG_OUT "oln_morpho_fast_volume_closing.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_volume_closing.png

Definition at line 298 of file attribute_closing_opening.hh.

00310 {

template<class I, class N>
oln::mute< I >::ret oln::morpho::fast::volume_opening ( const abstract::non_vectorial_image< I > &  input,
const abstract::neighborhood< N > &  Ng,
const typename oln::morpho::attr::attr_traits< attr::volume_type< I > >::lambda_type &  lambda,
const typename oln::morpho::attr::attr_traits< attr::volume_type< I > >::env_type &  env 
)

Perform a volume opening.

 #include <oln/basics2d.hh>
 #include <oln/morpho/attribute_closing_opening.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"));
   oln::morpho::env::OtherImageEnv<im_type>     env(im1);
   im1 = oln::morpho::fast::volume_opening(im1, oln::neighb_c4(), 200, env);
   oln::save(im1, IMG_OUT "oln_morpho_fast_volume_opening.ppm");
   return  0;
 }
lena128_pgm.png
=>
oln_morpho_fast_volume_opening.png

Definition at line 327 of file attribute_closing_opening.hh.

00338 {

template<class I, class E>
oln::mute< I >::ret oln::morpho::fast::white_top_hat ( const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Compute the white top hat of an image.

Parameters:
I Exact type of the image.
E Exact type of the structuring element.
 #include <oln/basics2d.hh>
 #include <oln/morpho/top_hat.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 "lena256.pgm"));

   oln::save(oln::morpho::fast::white_top_hat(im1,
                                              oln::win_c8p()),
             IMG_OUT "oln_morpho_fast_white_top_hat_overload.pbm");
 }

lena256_pgm.png
=>
oln_morpho_fast_white_top_hat_overload.png

Definition at line 531 of file top_hat.hh.

template<class C, class B, class I, class E>
mute<I, typename convoutput<C, B,typename mlc::exact< I >::ret::value_type>::ret>::ret oln::morpho::fast::white_top_hat ( const convert::abstract::conversion< C, B > &  c,
const abstract::non_vectorial_image< I > &  input,
const abstract::struct_elt< E > &  se 
)

Compute the white top hat of an image.

Compute white top hat of input using se as structuring element. Soille p.105.

 #include <oln/basics2d.hh>
 #include <oln/morpho/top_hat.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 "lena256.pgm"));

   oln::save(oln::morpho::fast::white_top_hat
                          (oln::convert::bound<ntg::int_u8>(),
                           im1,
                           oln::win_c8p()),
             IMG_OUT "oln_morpho_fast_white_top_hat.pbm");
 }

lena256_pgm.png
=>
oln_morpho_fast_white_top_hat.png

Definition at line 490 of file top_hat.hh.


Generated on Tue Feb 20 20:29:07 2007 for Olena by  doxygen 1.5.1