diff options
| author | Daniil Kazantsev <dkazanc@hotmail.com> | 2018-07-25 15:42:22 +0100 | 
|---|---|---|
| committer | Daniil Kazantsev <dkazanc@hotmail.com> | 2018-07-25 15:42:22 +0100 | 
| commit | 757c05d18aee1d0a0f6a4c6bef0f9c81fb31743e (patch) | |
| tree | f938f9d58d9882149763b9746f48aef5e1f8f8df | |
| parent | 06695c2e1afceef81395dc56c7bf01ff98c486bb (diff) | |
| download | regularization-757c05d18aee1d0a0f6a4c6bef0f9c81fb31743e.tar.gz regularization-757c05d18aee1d0a0f6a4c6bef0f9c81fb31743e.tar.bz2 regularization-757c05d18aee1d0a0f6a4c6bef0f9c81fb31743e.tar.xz regularization-757c05d18aee1d0a0f6a4c6bef0f9c81fb31743e.zip | |
minor corrections of smoothing parameters for ROF-type methods
| -rw-r--r-- | Core/regularisers_CPU/LLT_ROF_core.c | 2 | ||||
| -rw-r--r-- | Core/regularisers_CPU/ROF_TV_core.c | 2 | ||||
| -rw-r--r-- | Core/regularisers_GPU/LLT_ROF_GPU_core.cu | 2 | ||||
| -rwxr-xr-x | Core/regularisers_GPU/TV_ROF_GPU_core.cu | 10 | 
4 files changed, 8 insertions, 8 deletions
| diff --git a/Core/regularisers_CPU/LLT_ROF_core.c b/Core/regularisers_CPU/LLT_ROF_core.c index 650c0af..1584a29 100644 --- a/Core/regularisers_CPU/LLT_ROF_core.c +++ b/Core/regularisers_CPU/LLT_ROF_core.c @@ -19,7 +19,7 @@ limitations under the License.  #include "LLT_ROF_core.h"  #define EPS_LLT 0.01 -#define EPS_ROF 1.0e-5 +#define EPS_ROF 1.0e-12  #define MAX(x, y) (((x) > (y)) ? (x) : (y))  #define MIN(x, y) (((x) < (y)) ? (x) : (y)) diff --git a/Core/regularisers_CPU/ROF_TV_core.c b/Core/regularisers_CPU/ROF_TV_core.c index 100bf66..fb3bc7c 100644 --- a/Core/regularisers_CPU/ROF_TV_core.c +++ b/Core/regularisers_CPU/ROF_TV_core.c @@ -19,7 +19,7 @@  #include "ROF_TV_core.h" -#define EPS 1.0e-5 +#define EPS 1.0e-12  #define MAX(x, y) (((x) > (y)) ? (x) : (y))  #define MIN(x, y) (((x) < (y)) ? (x) : (y)) diff --git a/Core/regularisers_GPU/LLT_ROF_GPU_core.cu b/Core/regularisers_GPU/LLT_ROF_GPU_core.cu index e71ca12..0228bf0 100644 --- a/Core/regularisers_GPU/LLT_ROF_GPU_core.cu +++ b/Core/regularisers_GPU/LLT_ROF_GPU_core.cu @@ -61,7 +61,7 @@ limitations under the License.  #define EPS_LLT 0.01 -#define EPS_ROF 1.0e-5 +#define EPS_ROF 1.0e-12  #define idivup(a, b) ( ((a)%(b) != 0) ? (a)/(b)+1 : (a)/(b) ) diff --git a/Core/regularisers_GPU/TV_ROF_GPU_core.cu b/Core/regularisers_GPU/TV_ROF_GPU_core.cu index 4610beb..57de63d 100755 --- a/Core/regularisers_GPU/TV_ROF_GPU_core.cu +++ b/Core/regularisers_GPU/TV_ROF_GPU_core.cu @@ -54,7 +54,7 @@ limitations under the License.  #define BLKXSIZE2D 16  #define BLKYSIZE2D 16 -#define EPS 1.0e-5 +#define EPS 1.0e-12  #define idivup(a, b) ( ((a)%(b) != 0) ? (a)/(b)+1 : (a)/(b) ) @@ -91,7 +91,7 @@ __host__ __device__ int sign (float x)                  NOMy_0 = Input[index] - Input[j*N + i2]; /* y- */                  denom1 = NOMx_1*NOMx_1; -                denom2 = 0.5f*(sign((float)NOMy_1) + sign((float)NOMy_0))*(MIN(abs((float)NOMy_1),abs((float)NOMy_0))); +                denom2 = 0.5f*(sign((float)NOMy_1) + sign((float)NOMy_0))*(MIN(abs((float)NOMy_1), abs((float)NOMy_0)));                  denom2 = denom2*denom2;                  T1 = sqrt(denom1 + denom2 + EPS);                  D1[index] = NOMx_1/T1; @@ -106,7 +106,7 @@ __host__ __device__ int sign (float x)  		int i = blockDim.x * blockIdx.x + threadIdx.x;          int j = blockDim.y * blockIdx.y + threadIdx.y; -        int index = i + N*j;         +        int index = i + N*j;          if ((i >= 0) && (i < (N)) && (j >= 0) && (j < (M))) { @@ -121,7 +121,7 @@ __host__ __device__ int sign (float x)                  NOMx_0 = Input[index] - Input[j2*N + i]; /* x- */                  denom1 = NOMy_1*NOMy_1; -                denom2 = 0.5f*(sign((float)NOMx_1) + sign((float)NOMx_0))*(MIN(abs((float)NOMx_1),abs((float)NOMx_0))); +                denom2 = 0.5f*(sign((float)NOMx_1) + sign((float)NOMx_0))*(MIN(abs((float)NOMx_1), abs((float)NOMx_0)));                  denom2 = denom2*denom2;                  T2 = sqrt(denom1 + denom2 + EPS);                  D2[index] = NOMy_1/T2; @@ -321,7 +321,7 @@ extern "C" void TV_ROF_GPU_main(float* Input, float* Output, float lambdaPar, in          CHECK(cudaMemcpy(d_update,Input,N*M*Z*sizeof(float),cudaMemcpyHostToDevice));                if (Z > 1) { -			// TV - 3D case                  +			// TV - 3D case              dim3 dimBlock(BLKXSIZE,BLKYSIZE,BLKZSIZE);              dim3 dimGrid(idivup(N,BLKXSIZE), idivup(M,BLKYSIZE),idivup(Z,BLKXSIZE));             | 
