summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python/test
diff options
context:
space:
mode:
authoralgol <dkazanc@hotmail.com>2018-03-05 18:12:01 +0000
committeralgol <dkazanc@hotmail.com>2018-03-05 18:12:01 +0000
commit74ff5b5f319b2f7ea3e078c62041ec8a1bb28335 (patch)
tree8254d785c8c482ccb8ff36256dfa0cce0aa278e3 /Wrappers/Python/test
parent8082a76d4dfd9588590bab3fd26eae976b744a94 (diff)
downloadregularization-74ff5b5f319b2f7ea3e078c62041ec8a1bb28335.tar.gz
regularization-74ff5b5f319b2f7ea3e078c62041ec8a1bb28335.tar.bz2
regularization-74ff5b5f319b2f7ea3e078c62041ec8a1bb28335.tar.xz
regularization-74ff5b5f319b2f7ea3e078c62041ec8a1bb28335.zip
Cmake/Cython fixes to compile ROF-FGP
Diffstat (limited to 'Wrappers/Python/test')
-rw-r--r--Wrappers/Python/test/test_cpu_vs_gpu_regularizers.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Wrappers/Python/test/test_cpu_vs_gpu_regularizers.py b/Wrappers/Python/test/test_cpu_vs_gpu_regularizers.py
index 6344021..e162afa 100644
--- a/Wrappers/Python/test/test_cpu_vs_gpu_regularizers.py
+++ b/Wrappers/Python/test/test_cpu_vs_gpu_regularizers.py
@@ -12,7 +12,7 @@ import matplotlib.pyplot as plt
import numpy as np
import os
import timeit
-from ccpi.filters.gpu_regularizers import Diff4thHajiaboli, NML, TV_ROF_GPU
+from ccpi.filters.gpu_regularizers import Diff4thHajiaboli, NML, GPU_ROF_TV
from ccpi.filters.cpu_regularizers_cython import TV_ROF_CPU
###############################################################################
def printParametersToString(pars):
@@ -56,11 +56,11 @@ imgplot = plt.imshow(u0,cmap="gray")
# set parameters
-pars = {'algorithm': ROF_TV , \
+pars = {'algorithm': TV_ROF_CPU , \
'input' : u0,\
'regularization_parameter':0.04,\
'time_marching_parameter': 0.0025,\
- 'number_of_iterations': 600
+ 'number_of_iterations': 1200
}
print ("#################ROF TV CPU#####################")
start_time = timeit.default_timer()
@@ -89,13 +89,14 @@ plt.title('{}'.format('CPU results'))
print ("#################ROF TV GPU#####################")
start_time = timeit.default_timer()
-rof_gpu = TV_ROF_GPU(pars['input'],
+rof_gpu = GPU_ROF_TV(pars['input'],
pars['number_of_iterations'],
pars['time_marching_parameter'],
pars['regularization_parameter'])
rms = rmse(Im, rof_gpu)
pars['rmse'] = rms
+pars['algorithm'] = GPU_ROF_TV
txtstr = printParametersToString(pars)
txtstr += "%s = %.3fs" % ('elapsed time',timeit.default_timer() - start_time)
print (txtstr)