diff options
author | algol <dkazanc@hotmail.com> | 2018-04-12 11:56:54 +0100 |
---|---|---|
committer | algol <dkazanc@hotmail.com> | 2018-04-12 11:56:54 +0100 |
commit | 22f6e22cbe6db04c6bbe8d259ce761e3748d7102 (patch) | |
tree | 225dcf0db9dc7e0f0fc5fc001a7efb14c19658f8 /Wrappers/Python/src | |
parent | 58f5ce047b063d53906e38047b6ae744ccdbd4eb (diff) | |
download | regularization-22f6e22cbe6db04c6bbe8d259ce761e3748d7102.tar.gz regularization-22f6e22cbe6db04c6bbe8d259ce761e3748d7102.tar.bz2 regularization-22f6e22cbe6db04c6bbe8d259ce761e3748d7102.tar.xz regularization-22f6e22cbe6db04c6bbe8d259ce761e3748d7102.zip |
dTV some bugs in cython
Diffstat (limited to 'Wrappers/Python/src')
-rw-r--r-- | Wrappers/Python/src/cpu_regularisers.pyx | 2 | ||||
-rw-r--r-- | Wrappers/Python/src/gpu_regularisers.pyx | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/Wrappers/Python/src/cpu_regularisers.pyx b/Wrappers/Python/src/cpu_regularisers.pyx index 8f9185a..1661375 100644 --- a/Wrappers/Python/src/cpu_regularisers.pyx +++ b/Wrappers/Python/src/cpu_regularisers.pyx @@ -156,8 +156,8 @@ def dTV_FGP_2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, dTV_FGP_CPU_main(&inputData[0,0], &refdata[0,0], &outputData[0,0], regularisation_parameter, iterationsNumb, tolerance_param, - methodTV, eta_const, + methodTV, nonneg, printM, dims[0], dims[1], 1) diff --git a/Wrappers/Python/src/gpu_regularisers.pyx b/Wrappers/Python/src/gpu_regularisers.pyx index 4a14f69..18efdcd 100644 --- a/Wrappers/Python/src/gpu_regularisers.pyx +++ b/Wrappers/Python/src/gpu_regularisers.pyx @@ -20,7 +20,7 @@ cimport numpy as np cdef extern void TV_ROF_GPU_main(float* Input, float* Output, float lambdaPar, int iter, float tau, int N, int M, int Z); cdef extern void TV_FGP_GPU_main(float *Input, float *Output, float lambdaPar, int iter, float epsil, int methodTV, int nonneg, int printM, int N, int M, int Z); -cdef extern void dTV_FGP_CPU_main(float *Input, float *InputRef, float *Output, float lambdaPar, int iterationsNumb, float epsil, float eta, int methodTV, int nonneg, int printM, int N, int M, int Z); +cdef extern void dTV_FGP_GPU_main(float *Input, float *InputRef, float *Output, float lambdaPar, int iterationsNumb, float epsil, float eta, int methodTV, int nonneg, int printM, int N, int M, int Z); # Total-variation Rudin-Osher-Fatemi (ROF) def TV_ROF_GPU(inputData, @@ -187,8 +187,7 @@ def FGPTV3D(np.ndarray[np.float32_t, ndim=3, mode="c"] inputData, np.zeros([dims[0],dims[1],dims[2]], dtype='float32') # Running CUDA code here - TV_FGP_GPU_main( - &inputData[0,0,0], &outputData[0,0,0], + TV_FGP_GPU_main(&inputData[0,0,0], &outputData[0,0,0], regularisation_parameter , iterations, tolerance_param, @@ -204,7 +203,7 @@ def FGPTV3D(np.ndarray[np.float32_t, ndim=3, mode="c"] inputData, #****************************************************************# #******** Directional TV Fast-Gradient-Projection (FGP)*********# def FGPdTV2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, - np.ndarray[np.float32_t, ndim=3, mode="c"] refdata, + np.ndarray[np.float32_t, ndim=2, mode="c"] refdata, float regularisation_parameter, int iterations, float tolerance_param, |