
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena ChangeLog: 2007-10-04 Guillaume Duhamel <guillaume.duhamel@lrde.epita.fr> Fix chamfer. * chamfer.hh: Update. --- chamfer.hh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) Index: trunk/milena/sandbox/duhamel/chamfer.hh =================================================================== --- trunk/milena/sandbox/duhamel/chamfer.hh (revision 1243) +++ trunk/milena/sandbox/duhamel/chamfer.hh (revision 1244) @@ -27,6 +27,7 @@ # include <mln/core/image_if_interval.hh> # include <mln/core/dpoint2d.hh> +# include <math.h> namespace mln { @@ -50,7 +51,7 @@ { int ws[] = { 0, d21, 0, d21, 0, d21, d11, d10, d11, d21, - 0, d10, 0, d10, 0, + 0, d10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; @@ -72,13 +73,24 @@ { float ws[] = { 0, d21, 0, d21, 0, d21, d11, d10, d11, d21, - 0, d10, 0, d10, 0, + 0, d10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; return (make::w_window2d(ws)); } + const w_window2d_float + mk_chamfer_exact() + { + float r2 = sqrt(2); + float ws[] = { r2, 1, r2, + 1, 0, 0, + 0, 0, 0 }; + + return (make::w_window2d(ws)); + } + } // end of mln::win_chamfer template <typename I, typename W>
participants (1)
-
Guillaume Duhamel