From fe9318c068f6b53beec505b958f241bfa05d74cd Mon Sep 17 00:00:00 2001 From: algol Date: Thu, 25 Jan 2018 11:37:06 +0000 Subject: Should fix #18 of patch-based regularization --- Core/regularizers_CPU/PatchBased_Regul_core.c | 34 +++++---------------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/Core/regularizers_CPU/PatchBased_Regul_core.c b/Core/regularizers_CPU/PatchBased_Regul_core.c index 5ceb5e2..d83cb76 100644 --- a/Core/regularizers_CPU/PatchBased_Regul_core.c +++ b/Core/regularizers_CPU/PatchBased_Regul_core.c @@ -18,7 +18,7 @@ limitations under the License. */ #include "PatchBased_Regul_core.h" -#include + /* C-OMP implementation of patch-based (PB) regularization (2D and 3D cases). * This method finds self-similar patches in data and performs one fixed point iteration to mimimize the PB penalty function * @@ -46,28 +46,11 @@ limitations under the License. */ /*2D version function */ -float PB_FUNC2D(float *Ap, float *Bp, int dimX, int dimY, int padXY, int SearchW, int SimilW, float h, float lambda) +float PB_FUNC2D(float *A, float *B, int dimX, int dimY, int padXY, int SearchW, int SimilW, float h, float lambda) { int i, j, i_n, j_n, i_m, j_m, i_p, j_p, i_l, j_l, i1, j1, i2, j2, i3, j3, i5,j5, count, SimilW_full; float *Eucl_Vec, h2, denh2, normsum, Weight, Weight_norm, value, denom, WeightGlob, t1; - - //float A[dimX*dimY], B[dimX*dimY]; - float *A , *B; - A = (float*) calloc (dimX*dimY,sizeof(float)); - B = (float*) calloc (dimX*dimY,sizeof(float)); - - //fill the structures - int index=0; - for (i=0;i