oln::convol Namespace Reference

Algorithms related to convolution. More...


Namespaces

namespace  fast
 Convolution algorithms.
namespace  internal
namespace  slow
 Convolution algorithms.

Functions

template<class I, unsigned Size, typename SE, typename Sum>
oln::mute< I >::ret nagao_generalized (const oln::abstract::image< I > &in, const internal::se_array< Size, SE > &sa)
template<class I>
oln::mute< I >::ret nagao (const oln::abstract::non_vectorial_image_with_dim< 2, I > &in)
template<class I>
oln::mute< I >::ret nagao (const oln::abstract::vectorial_image_with_dim< 2, I > &in)


Detailed Description

Algorithms related to convolution.

Function Documentation

template<class I>
oln::mute< I >::ret oln::convol::nagao ( const oln::abstract::vectorial_image_with_dim< 2, I > &  in  )  [inline]

Standard Nagao filter 5x5.

Apply the 5*5 nagao filter on a vectorial image.

 #include <oln/convol/nagao.hh>
 #include <oln/basics2d.hh>
 #include <ntg/all.hh>
 int main()
 {
    oln::image2d<ntg::rgb_8> imc = oln::load(IMG_IN  "lena.ppm");
    oln::save(oln::convol::nagao(imc), IMG_OUT "oln_convol_nagao.ppm");
 }
lena_ppm.png
=>
oln_convol_nagao.png

Definition at line 196 of file nagao.hxx.

References oln::convol::internal::mk_nagao_windows_5x5().

00197     {
00198       typedef ntg::rgb_8::float_vec_type float_vec_type;
00199       return nagao_generalized<I, 9, window2d, float_vec_type>
00200         (in, internal::mk_nagao_windows_5x5());
00201     }

template<class I>
oln::mute< I >::ret oln::convol::nagao ( const oln::abstract::non_vectorial_image_with_dim< 2, I > &  in  )  [inline]

Standard Nagao filter 5x5.

Apply the 5*5 nagao filter on a non vectorial image.

 #include <oln/convol/nagao.hh>
 #include <oln/basics2d.hh>
 #include <ntg/all.hh>
 int main()
 {
   oln::image2d<ntg::int_u8> imc = oln::load(IMG_IN  "lena256.pgm");
   oln::save(oln::convol::nagao(imc),
            IMG_OUT "oln_convol_nagao_256.pgm");
 }
lena256_pgm.png
=>
oln_convol_nagao_256.png

Definition at line 168 of file nagao.hxx.

References oln::convol::internal::mk_nagao_windows_5x5().

00169     {
00170       return nagao_generalized<I, 9, window2d, ntg::float_s>
00171         (in, internal::mk_nagao_windows_5x5());
00172     }

template<class I, unsigned Size, typename SE, typename Sum>
oln::mute< I >::ret oln::convol::nagao_generalized ( const oln::abstract::image< I > &  in,
const internal::se_array< Size, SE > &  sa 
) [inline]

A Nagao filter generalized.

Each point in the input corresponds to the mean of the window in which has the smallest variance.

Parameters:
in Input image.
sa array of structuring elements.
See also:
oln::convol::nagao

Definition at line 133 of file nagao.hxx.

00135     {
00136       ntg_compare_nb_comp(Sum, oln_value_type(I))::ensure();
00137       in.border_adapt_width(sa.delta());
00138       oln_concrete_type(I) out(in.size());
00139       oln_iter_type(I) it(out);
00140       for_all(it)
00141       out[it] = internal::mean_of_smaller_variance<I, SE, Size, Sum>
00142         (in, it, sa);
00143       return out;
00144     }


Generated on Tue Feb 20 20:26:59 2007 for Olena by  doxygen 1.5.1