oln::topo Namespace Reference

Topological algorithms. More...


Classes

struct  chamfer
class  dmap

Namespaces

namespace  combinatorial_map
 Namespace for combinatorial map.
namespace  inter_pixel
 oln::topo::inter_pixel::interpixel implementation.
namespace  tarjan
 Implementation of tarjan set.

Functions

template<int d10, int d11>
const chamfer< int > & mk_chamfer_3x3 (float coef=1.f)
const chamfer< float > & mk_chamfer_3x3 (float d10, float d11)
template<int d10, int d11, int d21>
const chamfer< int > & mk_chamfer_5x5 (float coef=1.f)
const chamfer< float > & mk_chamfer_5x5 (float d10, float d11, float d21)
const chamfer< int > & chamfer_1_1 ()
const chamfer< int > & chamfer_1_2 ()
const chamfer< int > & chamfer_2_3 ()
const chamfer< int > & chamfer_5_7 ()
const chamfer< int > & chamfer_12_17 ()
const chamfer< int > & chessboard ()
const chamfer< int > & cityblock ()
const chamfer< int > & chamfer_4_6_9 ()
const chamfer< int > & chamfer_5_7_11 ()
const chamfer< int > & chamfer_9_13_20 ()
const chamfer< int > & chamfer_16_23_36 ()
const chamfer< float > & best_set_3x3 ()
const chamfer< float > & best_set_5x5 ()
const chamfer< int > & mchamfer_1_1 ()
const chamfer< int > & mchamfer_1_2 ()
const chamfer< int > & mchamfer_2_3 ()
const chamfer< int > & mchamfer_5_7 ()
const chamfer< int > & mchamfer_12_17 ()
const chamfer< int > & mchessboard ()
const chamfer< int > & mcityblock ()
const chamfer< int > & mchamfer_4_6_9 ()
const chamfer< int > & mchamfer_5_7_11 ()
const chamfer< int > & mchamfer_9_13_20 ()
const chamfer< int > & mchamfer_17_24_38 ()
const chamfer< float > & mbest_set_3x3 ()
const chamfer< float > & mbest_set_5x5 ()
template<class I>
image2d< float > exact_dmap (const abstract::image< I > &input)
 Distance map using the Euclidean distance.
float euclidian_dist2 (const point2d &p1, const point2d &p2)


Detailed Description

Topological algorithms.

Function Documentation

const chamfer< float > & oln::topo::best_set_3x3 (  )  [inline]

Best set 3x3

    ** Example of oln::topo::best_set_3x3() w;
    ** w.delta(): 1
    ** w.coef: 1
    ** w.fwd:
    **  1.3408  0.9481  1.3408
    **  0.9481  .  .
    **  .  .  .
    ** w.bkd:
    **  .  .  .
    **  .  .  0.9481
    **  1.3408  0.9481  1.3408
    ** 

Definition at line 171 of file dmap.hxx.

References mk_chamfer_3x3().

00172     { return mk_chamfer_3x3(0.9481, 1.3408); }

const chamfer< float > & oln::topo::best_set_5x5 (  )  [inline]

Best set 5x5

    ** Example of oln::topo::best_set_5x5() w;
    ** w.delta(): 2
    ** w.coef: 1
    ** w.fwd:
    **  .  2.2044  .  2.2044  .
    **  2.2044  1.406  0.9801  1.406  2.2044
    **  .  0.9801  .  .  .
    **  .  .  .  .  .
    **  .  .  .  .  .
    ** w.bkd:
    **  .  .  .  .  .
    **  .  .  .  .  .
    **  .  .  .  0.9801  .
    **  2.2044  1.406  0.9801  1.406  2.2044
    **  .  2.2044  .  2.2044  .
    ** 

Definition at line 173 of file dmap.hxx.

References mk_chamfer_5x5().

00174     { return mk_chamfer_5x5(0.9801, 1.4060, 2.2044); }

const chamfer< int > & oln::topo::chamfer_12_17 (  )  [inline]

Chamfer_12_17

    ** Example of oln::topo::chamfer_12_17() w;
    ** w.delta(): 1
    ** w.coef: 12.6684
    ** w.fwd:
    **  17  12  17
    **  12   .   .
    **  .   .   .
    ** w.bkd:
    **  .  .  .
    **  .  .  12
    **  17  12  17
    ** 

Definition at line 152 of file dmap.hxx.

00156 {

const chamfer< int > & oln::topo::chamfer_16_23_36 (  )  [inline]

Chamfer_16_23_36

    ** Example of oln::topo::chamfer_16_23_36() w;
    ** w.delta(): 2
    ** w.coef: 16.3351
    ** w.fwd:
    **  .   36  .   36  .
    **  36  23  16  23  36
    **  .   16  .   .   .
    **  .   .   .   .   .
    **  .   .   .   .   .
    ** w.bkd:
    **  .   .   .   .   .
    **  .   .   .   .   .
    **  .   .   .   16  .
    **  36  23  16  23  36
    **  .   36  .   36  .
    ** 

Definition at line 169 of file dmap.hxx.

00172 { return mk_chamfer_3x3(0.9481, 1.3408); }

const chamfer< int > & oln::topo::chamfer_1_1 (  )  [inline]

Chamfer_1_1

    ** Example of oln::topo::chamfer_1_1() w;
    ** w.delta(): 1
    ** w.coef: 0.9003
    ** w.fwd:
    **  1  1  1
    **  1  .  .
    **  .  .  .
    ** w.bkd:
    **  .  .  .
    **  .  .  1
    **  1  1  1
    ** 

Definition at line 148 of file dmap.hxx.

Referenced by chessboard().

00156 {

const chamfer< int > & oln::topo::chamfer_1_2 (  )  [inline]

Chamfer_1_2

    ** Example of oln::topo::chamfer_1_2() w;
    ** w.delta(): 1
    ** w.coef: 1.2732
    ** w.fwd:
    **  2  1  2
    **  1  .  .
    **  .  .  .
    ** w.bkd:
    **  .  .  .
    **  .  .  1
    **  2  1  2
    ** 

Definition at line 149 of file dmap.hxx.

Referenced by cityblock().

00156 {

const chamfer< int > & oln::topo::chamfer_2_3 (  )  [inline]

Chamfer_2_3

    ** Example of oln::topo::chamfer_2_3() w;
    ** w.delta(): 1
    ** w.coef: 2.1736
    ** w.fwd:
    **  3  2  3
    **  2  .  .
    **  .  .  .
    ** w.bkd:
    **  .  .  .
    **  .  .  2
    **  3  2  3
    ** 

Definition at line 150 of file dmap.hxx.

00156 {

const chamfer< int > & oln::topo::chamfer_4_6_9 (  )  [inline]

Chamfer_4_6_9

    ** Example of oln::topo::chamfer_4_6_9() w;
    ** w.delta(): 2
    ** w.coef: 4.1203
    ** w.fwd:
    **  .  9  .  9  .
    **  9  6  4  6  9
    **  .  4  .  .  .
    **  .  .  .  .  .
    **  .  .  .  .  .
    ** w.bkd:
    **  .  .  .  .  .
    **  .  .  .  .  .
    **  .  .  .  4  .
    **  9  6  4  6  9
    **  .  9  .  9  .
    ** 

Definition at line 166 of file dmap.hxx.

00172 { return mk_chamfer_3x3(0.9481, 1.3408); }

const chamfer< int > & oln::topo::chamfer_5_7 (  )  [inline]

Chamfer_5_7

    ** Example of oln::topo::chamfer_5_7() w;
    ** w.delta(): 1
    ** w.coef: 5.2474
    ** w.fwd:
    **  7  5  7
    **  5  .  .
    **  .  .  .
    ** w.bkd:
    **  .  .  .
    **  .  .  5
    **  7  5  7
    ** 

Definition at line 151 of file dmap.hxx.

00156 {

const chamfer< int > & oln::topo::chamfer_5_7_11 (  )  [inline]

Chamfer_5_7_11

    ** Example of oln::topo::chamfer_5_7_11() w;
    ** w.delta(): 2
    ** w.coef: 5.0206
    ** w.fwd:
    **  .  11  .  11  .
    **  11  7  5  7  11
    **  .  5  .  .  .
    **  .  .  .  .  .
    **  .  .  .  .  .
    ** w.bkd:
    **  .  .  .  .  .
    **  .  .  .  .  .
    **  .  .  .  5  .
    **  11  7  5  7  11
    **  .  11  .  11  .
    ** 

Definition at line 167 of file dmap.hxx.

00172 { return mk_chamfer_3x3(0.9481, 1.3408); }

const chamfer< int > & oln::topo::chamfer_9_13_20 (  )  [inline]

Chamfer_9_13_20

    ** Example of oln::topo::chamfer_9_13_20() w;
    ** w.delta(): 2
    ** w.coef: 9.1409
    ** w.fwd:
    **  .   20  .  20  .
    **  20  13  9  13  20
    **  .   9   .   .  .
    **  .   .   .  .   .
    **  .   .   .  .   .
    ** w.bkd:
    **  .   .   .  .   .
    **  .   .   .  .   .
    **  .   .   .  9   .
    **  20  13  9  13  20
    **  .   20  .  20  .
    ** 

Definition at line 168 of file dmap.hxx.

00172 { return mk_chamfer_3x3(0.9481, 1.3408); }

const chamfer< int > & oln::topo::chessboard (  )  [inline]

Chessboard

    ** Example of oln::topo::chessboard() w;
    ** w.delta(): 1
    ** w.coef: 0.9003
    ** w.fwd:
    **  1  1  1
    **  1  .  .
    **  .  .  .
    ** w.bkd:
    **  .  .  .
    **  .  .  1
    **  1  1  1
    ** 

Definition at line 155 of file dmap.hxx.

References chamfer_1_1().

00156     {
00157       return chamfer_1_1();
00158     }

const chamfer< int > & oln::topo::cityblock (  )  [inline]

Cityblock

    ** Example of oln::topo::cityblock() w;
    ** w.delta(): 1
    ** w.coef: 1.2732
    ** w.fwd:
    **  2  1  2
    **  1  .  .
    **  .  .  .
    ** w.bkd:
    **  .  .  .
    **  .  .  1
    **  2  1  2
    ** 

Definition at line 161 of file dmap.hxx.

References chamfer_1_2().

00162     {
00163       return chamfer_1_2();
00164     }

const chamfer< float > & oln::topo::mk_chamfer_3x3 ( float  d10,
float  d11 
) [inline]

Produce a chamfer mask 3x3

Todo:
FIXME: This highly not thread safe !
    ** Example of oln::topo::mk_chamfer_3x3(1.5, 2.5) w;
    ** w.delta(): 1
    ** w.coef: 1
    ** w.fwd:
    **  2.5  1.5  2.5
    **  1.5   .    .
    **   .    .    .
    ** w.bkd:
    **   .    .    .
    **   .    .   1.5
    **  2.5  1.5  2.5
    ** 

Definition at line 80 of file dmap.hxx.

References mlc::floats_2d, mlc::lbrk, and mlc::x().

00081               : add (?)  , float coef = 1.f
00082     {
00083       static const w_window2d<float> w_win_fwd = ( mlc::floats_2d =
00084                                                  d11, d10, d11, mlc::lbrk,
00085                                                  d10, mlc::x(), 0.f, end );
00086       static const w_window2d<float> w_win_bkd = ( mlc::floats_2d =
00087                                                  0.f, mlc::x(),  d10, mlc::lbrk,
00088                                                  d11, d10,  d11, end );
00089       static const chamfer<float> ch_ =
00090         chamfer<float>(w_win_fwd, w_win_bkd, 1.f);
00091       return ch_;
00092     }

template<int d10, int d11>
const chamfer< int > & oln::topo::mk_chamfer_3x3 ( float  coef = 1.f  )  [inline]

Produce a chamfer mask 3x3

Todo:
FIXME: This highly not thread safe !
    ** Example of oln::topo::mk_chamfer_3x3<1,2>(3) w;
    ** w.delta(): 1
    ** w.coef: 3
    ** w.fwd:
    **  2  1  2
    **  1  .  .
    **  .  .  .
    ** w.bkd:
    **  .  .  .
    **  .  .  1
    **  2  1  2
    ** 

Definition at line 66 of file dmap.hxx.

References mlc::ints_2d, mlc::lbrk, and mlc::x().

Referenced by best_set_3x3(), and mbest_set_3x3().

00067     {
00068       static const w_window2d<int> w_win_fwd = ( mlc::ints_2d =
00069                                                d11,      d10, d11, mlc::lbrk,
00070                                                d10, mlc::x(),   0, end );
00071       static const w_window2d<int> w_win_bkd = ( mlc::ints_2d =
00072                                                  0, mlc::x(),  d10, mlc::lbrk,
00073                                                d11,      d10,  d11, end );
00074       static const chamfer<int> ch_ = chamfer<int>(w_win_fwd, w_win_bkd, coef);
00075       return ch_;
00076     }

const chamfer< float > & oln::topo::mk_chamfer_5x5 ( float  d10,
float  d11,
float  d21 
) [inline]

Chamfer 5x5 using float

See also:
mk_chamfer_5x5

Definition at line 112 of file dmap.hxx.

References mlc::floats_2d, mlc::lbrk, and mlc::x().

00113     {
00114       const float O = 0.f;
00115       static const w_window2d<float> w_win_fwd = ( mlc::floats_2d =
00116                                                  O,   d21,        O, d21,   O, mlc::lbrk,
00117                                                  d21, d11,      d10, d11, d21,
00118                                                  O,   d10, mlc::x(),   O,   O, end );
00119       static const w_window2d<float> w_win_bkd = ( mlc::floats_2d =
00120                                                  O,     O, mlc::x(), d10,   O, mlc::lbrk,
00121                                                  d21, d11,      d10, d11, d21,
00122                                                  O,   d21,        O, d21,   O, end );
00123       static const chamfer<float> ch_ =
00124         chamfer<float>(w_win_fwd, w_win_bkd, 1.f);
00125       return ch_;
00126     }

template<int d10, int d11, int d21>
const chamfer< int > & oln::topo::mk_chamfer_5x5 ( float  coef = 1.f  )  [inline]

Chamfer 5x5

    ** Example of oln::topo::mk_chamfer_5x5<1, 2, 3>(4) w;
    ** w.delta(): 2
    ** w.coef: 4
    ** w.fwd:
    **  .  3  .  3  .
    **  3  2  1  2  3
    **  .  1  .  .  .
    **  .  .  .  .  .
    **  .  .  .  .  .
    ** w.bkd:
    **  .  .  .  .  .
    **  .  .  .  .  .
    **  .  .  .  1  .
    **  3  2  1  2  3
    **  .  3  .  3  .
    ** 

Definition at line 96 of file dmap.hxx.

References mlc::ints_2d, mlc::lbrk, and mlc::x().

Referenced by best_set_5x5(), and mbest_set_5x5().

00097     {
00098       static const w_window2d<int> w_win_fwd = ( mlc::ints_2d =
00099                                                  0, d21,        0, d21,   0, mlc::lbrk,
00100                                                d21, d11,      d10, d11, d21,
00101                                                  0, d10, mlc::x(),   0,   0, end );
00102       static const w_window2d<int> w_win_bkd = ( mlc::ints_2d =
00103                                                  0,   0, mlc::x(), d10,   0, mlc::lbrk,
00104                                                d21, d11,      d10, d11, d21,
00105                                                  0, d21,        0, d21,   0, end );
00106       static const chamfer<int> ch_ = chamfer<int>(w_win_fwd, w_win_bkd, coef);
00107       return ch_;
00108     }


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