oln::topo Namespace Reference

Topological algorithms. More...


Classes

struct  chamfer
class  dmap

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 170 of file dmap.hxx.

References mk_chamfer_3x3().

00171     { 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 172 of file dmap.hxx.

References mk_chamfer_5x5().

00173     { 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 151 of file dmap.hxx.

00155 {

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 168 of file dmap.hxx.

00171 { 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 147 of file dmap.hxx.

Referenced by chessboard().

00155 {

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 148 of file dmap.hxx.

Referenced by cityblock().

00155 {

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 149 of file dmap.hxx.

00155 {

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 165 of file dmap.hxx.

00171 { 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 150 of file dmap.hxx.

00155 {

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 166 of file dmap.hxx.

00171 { 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 167 of file dmap.hxx.

00171 { 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 154 of file dmap.hxx.

References chamfer_1_1().

00155     {
00156       return chamfer_1_1();
00157     }

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 160 of file dmap.hxx.

References chamfer_1_2().

00161     {
00162       return chamfer_1_2();
00163     }

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 79 of file dmap.hxx.

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

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 65 of file dmap.hxx.

Referenced by best_set_3x3().

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

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 111 of file dmap.hxx.

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

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 95 of file dmap.hxx.

Referenced by best_set_5x5().

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


Generated on Thu Apr 15 20:17:06 2004 for Olena by doxygen 1.3.6-20040222