diff options
author | Daniil Kazantsev <dkazanc@hotmail.com> | 2018-05-02 10:06:38 +0100 |
---|---|---|
committer | Daniil Kazantsev <dkazanc@hotmail.com> | 2018-05-02 10:06:38 +0100 |
commit | a64fe4d083173cc67dd7585c3160a94ea24bca80 (patch) | |
tree | eca08fbb8f9e1a064cb04ecfd46eb83ff40f74d0 /Wrappers/Python | |
parent | 73965b6b80c49a2867d54e4a42f3069fe35d9cc6 (diff) | |
download | regularization-a64fe4d083173cc67dd7585c3160a94ea24bca80.tar.gz regularization-a64fe4d083173cc67dd7585c3160a94ea24bca80.tar.bz2 regularization-a64fe4d083173cc67dd7585c3160a94ea24bca80.tar.xz regularization-a64fe4d083173cc67dd7585c3160a94ea24bca80.zip |
cyth corr
Diffstat (limited to 'Wrappers/Python')
-rw-r--r-- | Wrappers/Python/src/cpu_regularisers.pyx | 13 | ||||
-rw-r--r-- | Wrappers/Python/src/gpu_regularisers.pyx | 10 |
2 files changed, 11 insertions, 12 deletions
diff --git a/Wrappers/Python/src/cpu_regularisers.pyx b/Wrappers/Python/src/cpu_regularisers.pyx index 21a1a00..7c06c28 100644 --- a/Wrappers/Python/src/cpu_regularisers.pyx +++ b/Wrappers/Python/src/cpu_regularisers.pyx @@ -102,7 +102,7 @@ def TV_FGP_2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, methodTV, nonneg, printM, - dims[0], dims[1], 1) + dims[1],dims[0],1) return outputData @@ -161,7 +161,7 @@ def TV_SB_2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, tolerance_param, methodTV, printM, - dims[0], dims[1], 1) + dims[1],dims[0],1) return outputData @@ -222,7 +222,7 @@ def dTV_FGP_2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, methodTV, nonneg, printM, - dims[0], dims[1], 1) + dims[1], dims[0], 1) return outputData @@ -301,7 +301,7 @@ def NDF_2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, np.zeros([dims[0],dims[1]], dtype='float32') # Run Nonlinear Diffusion iterations for 2D data - Diffusion_CPU_main(&inputData[0,0], &outputData[0,0], regularisation_parameter, edge_parameter, iterationsNumb, time_marching_parameter, penalty_type, dims[0], dims[1], 1) + Diffusion_CPU_main(&inputData[0,0], &outputData[0,0], regularisation_parameter, edge_parameter, iterationsNumb, time_marching_parameter, penalty_type, dims[1], dims[0], 1) return outputData def NDF_3D(np.ndarray[np.float32_t, ndim=3, mode="c"] inputData, @@ -349,7 +349,7 @@ def NDF_INP_2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, np.zeros([dims[0],dims[1]], dtype='float32') # Run Inpaiting by Diffusion iterations for 2D data - Diffusion_Inpaint_CPU_main(&inputData[0,0], &maskData[0,0], &outputData[0,0], regularisation_parameter, edge_parameter, iterationsNumb, time_marching_parameter, penalty_type, dims[0], dims[1], 1) + Diffusion_Inpaint_CPU_main(&inputData[0,0], &maskData[0,0], &outputData[0,0], regularisation_parameter, edge_parameter, iterationsNumb, time_marching_parameter, penalty_type, dims[1], dims[0], 1) return outputData def NDF_INP_3D(np.ndarray[np.float32_t, ndim=3, mode="c"] inputData, @@ -396,7 +396,6 @@ def NVM_INP_2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, # Run Inpaiting by Nonlocal vertical marching method for 2D data NonlocalMarching_Inpaint_main(&inputData[0,0], &maskData[0,0], &outputData[0,0], &maskData_upd[0,0], - SW_increment, iterationsNumb, - dims[0], dims[1], 1) + SW_increment, iterationsNumb,dims[1], dims[0], 1) return (outputData, maskData_upd) diff --git a/Wrappers/Python/src/gpu_regularisers.pyx b/Wrappers/Python/src/gpu_regularisers.pyx index b0775054..7eab5d5 100644 --- a/Wrappers/Python/src/gpu_regularisers.pyx +++ b/Wrappers/Python/src/gpu_regularisers.pyx @@ -157,7 +157,7 @@ def ROFTV2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, regularisation_parameter, iterations , time_marching_parameter, - dims[0], dims[1], 1); + dims[1], dims[0], 1); return outputData @@ -210,7 +210,7 @@ def FGPTV2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, methodTV, nonneg, printM, - dims[0], dims[1], 1); + dims[1], dims[0], 1); return outputData @@ -266,7 +266,7 @@ def SBTV2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, tolerance_param, methodTV, printM, - dims[0], dims[1], 1); + dims[1], dims[0], 1); return outputData @@ -325,7 +325,7 @@ def FGPdTV2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, methodTV, nonneg, printM, - dims[0], dims[1], 1); + dims[1], dims[0], 1); return outputData @@ -381,7 +381,7 @@ def NDF_GPU_2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, # Run Nonlinear Diffusion iterations for 2D data # Running CUDA code here - NonlDiff_GPU_main(&inputData[0,0], &outputData[0,0], regularisation_parameter, edge_parameter, iterationsNumb, time_marching_parameter, penalty_type, dims[0], dims[1], 1) + NonlDiff_GPU_main(&inputData[0,0], &outputData[0,0], regularisation_parameter, edge_parameter, iterationsNumb, time_marching_parameter, penalty_type, dims[1], dims[0], 1) return outputData def NDF_GPU_3D(np.ndarray[np.float32_t, ndim=3, mode="c"] inputData, |