diff options
author | algol <dkazanc@hotmail.com> | 2018-05-02 13:11:50 +0100 |
---|---|---|
committer | algol <dkazanc@hotmail.com> | 2018-05-02 13:11:50 +0100 |
commit | 14edd18d07c871c0a355d70e68350a899014dbc7 (patch) | |
tree | 2b6ffc91561a78455931730f9b3a760eebb201ba /Wrappers/Python/src | |
parent | 7066b1122a11bba244777052b24c103e612f7977 (diff) | |
download | regularization-14edd18d07c871c0a355d70e68350a899014dbc7.tar.gz regularization-14edd18d07c871c0a355d70e68350a899014dbc7.tar.bz2 regularization-14edd18d07c871c0a355d70e68350a899014dbc7.tar.xz regularization-14edd18d07c871c0a355d70e68350a899014dbc7.zip |
bugs in NVM fixed
Diffstat (limited to 'Wrappers/Python/src')
-rw-r--r-- | Wrappers/Python/src/cpu_regularisers.pyx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Wrappers/Python/src/cpu_regularisers.pyx b/Wrappers/Python/src/cpu_regularisers.pyx index 7c06c28..732b4cb 100644 --- a/Wrappers/Python/src/cpu_regularisers.pyx +++ b/Wrappers/Python/src/cpu_regularisers.pyx @@ -27,7 +27,6 @@ cdef extern float dTV_FGP_CPU_main(float *Input, float *InputRef, float *Output, cdef extern float Diffusion_Inpaint_CPU_main(float *Input, unsigned char *Mask, float *Output, float lambdaPar, float sigmaPar, int iterationsNumb, float tau, int penaltytype, int dimX, int dimY, int dimZ); cdef extern float NonlocalMarching_Inpaint_main(float *Input, unsigned char *M, float *Output, unsigned char *M_upd, int SW_increment, int iterationsNumb, int dimX, int dimY, int dimZ); - #****************************************************************# #********************** Total-variation ROF *********************# #****************************************************************# @@ -374,14 +373,14 @@ def NDF_INP_3D(np.ndarray[np.float32_t, ndim=3, mode="c"] inputData, #*********************Inpainting WITH****************************# #***************Nonlocal Vertical Marching method****************# #****************************************************************# -def NVM_INPAINT_CPU(inputData, maskData, SW_increment, iterations): +def NVM_INPAINT_CPU(inputData, maskData, SW_increment, iterationsNumb): if inputData.ndim == 2: - return NVM_INP_2D(inputData, maskData, SW_increment, iterations) + return NVM_INP_2D(inputData, maskData, SW_increment, iterationsNumb) elif inputData.ndim == 3: return def NVM_INP_2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, - np.ndarray[np.uint8_t, ndim=2, mode="c"] maskData, + np.ndarray[np.uint8_t, ndim=2, mode="c"] maskData, int SW_increment, int iterationsNumb): cdef long dims[2] @@ -395,7 +394,8 @@ def NVM_INP_2D(np.ndarray[np.float32_t, ndim=2, mode="c"] inputData, np.zeros([dims[0],dims[1]], dtype='uint8') # 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[1], dims[0], 1) + NonlocalMarching_Inpaint_main(&inputData[0,0], &maskData[0,0], &outputData[0,0], + &maskData_upd[0,0], + SW_increment, iterationsNumb, dims[1], dims[0], 1) return (outputData, maskData_upd) |