summaryrefslogtreecommitdiffstats
path: root/Wrappers/Python/ccpi
diff options
context:
space:
mode:
authorDaniil Kazantsev <dkazanc@hotmail.com>2018-05-30 10:08:01 +0100
committerDaniil Kazantsev <dkazanc@hotmail.com>2018-05-30 10:08:01 +0100
commit4992d79f8d10749f8e9c32c6dae33bfddd239fbc (patch)
treed327d19f48c8dd96a52ec4f028947e8227efb204 /Wrappers/Python/ccpi
parent44f1bf583985a173ef8ac7a0ed4aa95dc07f2f7a (diff)
downloadregularization-4992d79f8d10749f8e9c32c6dae33bfddd239fbc.tar.gz
regularization-4992d79f8d10749f8e9c32c6dae33bfddd239fbc.tar.bz2
regularization-4992d79f8d10749f8e9c32c6dae33bfddd239fbc.tar.xz
regularization-4992d79f8d10749f8e9c32c6dae33bfddd239fbc.zip
LLT-ROF model added
Diffstat (limited to 'Wrappers/Python/ccpi')
-rw-r--r--Wrappers/Python/ccpi/filters/regularisers.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/Wrappers/Python/ccpi/filters/regularisers.py b/Wrappers/Python/ccpi/filters/regularisers.py
index 0e435a6..52c7974 100644
--- a/Wrappers/Python/ccpi/filters/regularisers.py
+++ b/Wrappers/Python/ccpi/filters/regularisers.py
@@ -2,8 +2,8 @@
script which assigns a proper device core function based on a flag ('cpu' or 'gpu')
"""
-from ccpi.filters.cpu_regularisers import TV_ROF_CPU, TV_FGP_CPU, TV_SB_CPU, dTV_FGP_CPU, TNV_CPU, NDF_CPU, Diff4th_CPU, TGV_CPU
-from ccpi.filters.gpu_regularisers import TV_ROF_GPU, TV_FGP_GPU, TV_SB_GPU, dTV_FGP_GPU, NDF_GPU, Diff4th_GPU, TGV_GPU
+from ccpi.filters.cpu_regularisers import TV_ROF_CPU, TV_FGP_CPU, TV_SB_CPU, dTV_FGP_CPU, TNV_CPU, NDF_CPU, Diff4th_CPU, TGV_CPU, LLT_ROF_CPU
+from ccpi.filters.gpu_regularisers import TV_ROF_GPU, TV_FGP_GPU, TV_SB_GPU, dTV_FGP_GPU, NDF_GPU, Diff4th_GPU, TGV_GPU, LLT_ROF_GPU
from ccpi.filters.cpu_regularisers import NDF_INPAINT_CPU, NVM_INPAINT_CPU
def ROF_TV(inputData, regularisation_parameter, iterations,
@@ -147,7 +147,15 @@ def TGV(inputData, regularisation_parameter, alpha1, alpha0, iterations,
else:
raise ValueError('Unknown device {0}. Expecting gpu or cpu'\
.format(device))
-
+def LLT_ROF(inputData, regularisation_parameterROF, regularisation_parameterLLT, iterations,
+ time_marching_parameter, device='cpu'):
+ if device == 'cpu':
+ return LLT_ROF_CPU(inputData, regularisation_parameterROF, regularisation_parameterLLT, iterations, time_marching_parameter)
+ elif device == 'gpu':
+ return LLT_ROF_GPU(inputData, regularisation_parameterROF, regularisation_parameterLLT, iterations, time_marching_parameter)
+ else:
+ raise ValueError('Unknown device {0}. Expecting gpu or cpu'\
+ .format(device))
def NDF_INP(inputData, maskData, regularisation_parameter, edge_parameter, iterations,
time_marching_parameter, penalty_type):
return NDF_INPAINT_CPU(inputData, maskData, regularisation_parameter,