
https://svn.lrde.epita.fr/svn/oln/trunk/milena Index: ChangeLog from Roland Levillain <roland@lrde.epita.fr> Exercise mln::line_graph_image more. * tests/core/line_graph_image.cc: Perform additional morphological tests (erosion and dilation on a line graph-based image). line_graph_image.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) Index: tests/core/line_graph_image.cc --- tests/core/line_graph_image.cc (revision 1728) +++ tests/core/line_graph_image.cc (working copy) @@ -118,6 +118,23 @@ } std::cout << std::endl; + /*-------------------------. + | Processing graph images. | + `-------------------------*/ + + line_graph_image<point2d, int> ima_dil = morpho::dilation(ima, win); + // Manual iteration over the domain of IMA_DIL. + mln_piter_(ima_t) p_dil(ima_dil.domain()); + for_all (p_dil) + std::cout << "ima_dil (" << p_dil << ") = " << ima_dil(p_dil) << std::endl; + std::cout << std::endl; + + line_graph_image<point2d, int> ima_ero = morpho::erosion(ima, win); + // Manual iteration over the domain of IMA_ERO. + mln_piter_(ima_t) p_ero(ima_ero.domain()); + for_all (p_ero) + std::cout << "ima_ero (" << p_ero << ") = " << ima_ero(p_ero) << std::endl; + // /* FIXME: When implementing convert::to_line_graph_image, don't // forget to give a second argument defaulting to something like