#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). | |
template<class V> | |
void | compute (const image2d< V > &input, image2d< point_type > &nearest_point_map, float infty) |
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 661 of file dmap.hh.
oln::topo::dmap< T, T2 >::dmap | ( | const image2d_size & | size, | |
const chamfer< T2 > & | ch | |||
) |