summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniil Kazantsev <dkazanc@hotmail.com>2018-05-02 11:18:56 +0100
committerDaniil Kazantsev <dkazanc@hotmail.com>2018-05-02 11:18:56 +0100
commit7066b1122a11bba244777052b24c103e612f7977 (patch)
tree8dd3337440ee0209593f1ddc54d126de265bb057
parent985fee04ac1abef2aaa69f282ae6c207e438b4af (diff)
downloadregularization-7066b1122a11bba244777052b24c103e612f7977.tar.gz
regularization-7066b1122a11bba244777052b24c103e612f7977.tar.bz2
regularization-7066b1122a11bba244777052b24c103e612f7977.tar.xz
regularization-7066b1122a11bba244777052b24c103e612f7977.zip
NVM
-rw-r--r--Core/inpainters_CPU/NonlocalMarching_Inpaint_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Core/inpainters_CPU/NonlocalMarching_Inpaint_core.c b/Core/inpainters_CPU/NonlocalMarching_Inpaint_core.c
index d6cdf93..3a846bb 100644
--- a/Core/inpainters_CPU/NonlocalMarching_Inpaint_core.c
+++ b/Core/inpainters_CPU/NonlocalMarching_Inpaint_core.c
@@ -56,7 +56,9 @@ float NonlocalMarching_Inpaint_main(float *Input, unsigned char *M, float *Outpu
if (M[i] == 1) iterations_number++;
}
}
- else iterations_number = iterationsNumb;
+ else iterations_number = (int)(iterationsNumb/dimX);
+ if (iterations_number > dimX) iterations_number = dimX;
+
if (iterations_number == 0) printf("%s \n", "Nothing to inpaint, zero mask!");
else {