olena-2.0-41-g28a4ed0 Add: out error variable to inpaint()

--- milena/mln/inpainting/inpaint.hh | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/milena/mln/inpainting/inpaint.hh b/milena/mln/inpainting/inpaint.hh index d5e89c7..ff58e75 100644 --- a/milena/mln/inpainting/inpaint.hh +++ b/milena/mln/inpainting/inpaint.hh @@ -39,7 +39,8 @@ namespace mln I<T> inpaint(const Image<I<T> >& src_, const Image<I<bool> >& mask_, F inpaint_method, - unsigned inpaint_radius); + unsigned inpaint_radius, + double* out_error = NULL); /* * Implem @@ -49,7 +50,8 @@ namespace mln I<T> inpaint(const Image<I<T> >& inpaint_src_, const Image<I<bool> >& inpaint_mask_, F inpaint_method, - unsigned inpaint_radius) + unsigned inpaint_radius, + double* out_error) { const I<T>& inpaint_src = exact(inpaint_src_); const I<bool>& inpaint_mask = exact(inpaint_mask_); @@ -139,6 +141,9 @@ namespace mln new_src, new_mask); + if (out_error) + *out_error = color_error; + std::cout << std::setprecision(6) << std::fixed << t << "\t\t" << (1 - color_error) * 100 << "\t\t" -- 1.7.2.5

On 07/01/2013 16:34, Coddy Levi wrote:
diff --git a/milena/mln/inpainting/inpaint.hh b/milena/mln/inpainting/inpaint.hh index d5e89c7..ff58e75 100644 --- a/milena/mln/inpainting/inpaint.hh +++ b/milena/mln/inpainting/inpaint.hh @@ -39,7 +39,8 @@ namespace mln I<T> inpaint(const Image<I<T> >& src_, const Image<I<bool> >& mask_, F inpaint_method, - unsigned inpaint_radius); + unsigned inpaint_radius, + double* out_error = NULL);
In C++, the literal null pointer constant is `0' (C++98/03) or `nullptr' (C++11), not `NULL' (which is a C construct).
participants (2)
-
Coddy Levi
-
Roland Levillain