summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniil Kazantsev <dkazanc@hotmail.com>2019-09-30 09:14:11 +0100
committerDaniil Kazantsev <dkazanc@hotmail.com>2019-09-30 09:14:11 +0100
commit26b13629922e56ae3337fce3df15387d28172681 (patch)
tree2d5c1014ed73df632a3d40102d613bc7571164ac /src
parent979f6cc0326fece2df944402f34c5bb871af092a (diff)
downloadregularization-26b13629922e56ae3337fce3df15387d28172681.tar.gz
regularization-26b13629922e56ae3337fce3df15387d28172681.tar.bz2
regularization-26b13629922e56ae3337fce3df15387d28172681.tar.xz
regularization-26b13629922e56ae3337fce3df15387d28172681.zip
loop init fix
Diffstat (limited to 'src')
-rw-r--r--src/Core/regularisers_CPU/utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Core/regularisers_CPU/utils.c b/src/Core/regularisers_CPU/utils.c
index 3a7ed25..5bb3a5c 100644
--- a/src/Core/regularisers_CPU/utils.c
+++ b/src/Core/regularisers_CPU/utils.c
@@ -119,13 +119,13 @@ float TV_energy3D(float *U, float *U0, float *E_val, float lambda, int type, int
/* Down-Up scaling of 2D images using bilinear interpolation */
float Im_scale2D(float *Input, float *Scaled, int w, int h, int w2, int h2)
{
- int x, y, index;
+ int x, y, index, i, j;
float x_ratio = ((float)(w-1))/w2;
float y_ratio = ((float)(h-1))/h2;
float A, B, C, D, x_diff, y_diff, gray;
#pragma omp parallel for shared (Input, Scaled) private(x, y, index, A, B, C, D, x_diff, y_diff, gray)
- for (int j=0;j<w2;j++) {
- for (int i=0;i<h2;i++) {
+ for (j=0;j<w2;j++) {
+ for (i=0;i<h2;i++) {
x = (int)(x_ratio * j);
y = (int)(y_ratio * i);
x_diff = (x_ratio * j) - x;