#include <dmap.hh>
Collaboration diagram for oln::topo::dmap< T, T2 >:
Public Types | |
typedef image2d< ntg::bin >::point_type | point_type |
Public Member Functions | |
dmap (const image2d_size &size, const chamfer< T2 > &ch) | |
template<class V> void | compute (const image2d< V > &input, float infty=0.f) |
Compute the distance map. | |
template<class V> void | compute (const image2d< V > &input, image2d< point2d > &nearest_point_map, float infty=0.f) |
Compute the distance map. | |
const image2d< T > & | imap () const |
Return the distance map of type T. | |
image2d< float > | to_image () const |
Return the distance map divided by the Chamfer coefficient. | |
const T & | operator[] (const point_type &p) const |
Distance of a point p. | |
const T & | operator() (coord row, coord col) const |
Distance of a point2d(row, col). |
T | Type of the distance. |
T2 | Type of the chamfer distance. |
#include <oln/basics2d.hh> #include <oln/topo/dmap.hh> #include <oln/convert/stretch.hh> int main() { oln::image2d<ntg::bin> in = oln::load(IMG_IN "face_se.pbm"); oln::topo::dmap<ntg::int_u<16>, int> m(in.size(), oln::topo::chessboard()); m.compute(in); save(oln::convert::stretch_balance<ntg::int_u8>(m.imap()), IMG_OUT "oln_topo_dmap.pgm"); }
Definition at line 660 of file dmap.hh.
|
Constructor.
Definition at line 203 of file dmap.hxx.
00204 :
00205 imap_(size),
00206 ch_(ch)
00207 {
00208 // FIXME: if T is float then precondition(ch.coef == 1.f)
00209 }
|