summaryrefslogtreecommitdiffstats
path: root/src/Python
diff options
context:
space:
mode:
Diffstat (limited to 'src/Python')
-rw-r--r--src/Python/test_regularizers.py66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/Python/test_regularizers.py b/src/Python/test_regularizers.py
index 755804a..5804897 100644
--- a/src/Python/test_regularizers.py
+++ b/src/Python/test_regularizers.py
@@ -163,52 +163,52 @@ imgplot = plt.imshow(reg_output[-1][0])
# # u0 = Im + .03*randn(size(Im)); u0(u0<0) = 0; % adding noise
# # ImDen = PB_Regul_CPU(single(u0), 3, 1, 0.08, 0.05);
-# out2 = Regularizer.PatchBased_Regul(input=u0, regularization_parameter=0.05,
- # searching_window_ratio=3,
- # similarity_window_ratio=1,
- # PB_filtering_parameter=0.08)
-# pars = out2[-2]
-# reg_output.append(out2)
+out2 = Regularizer.PatchBased_Regul(input=u0, regularization_parameter=0.05,
+ searching_window_ratio=3,
+ similarity_window_ratio=1,
+ PB_filtering_parameter=0.08)
+pars = out2[-2]
+reg_output.append(out2)
-# a=fig.add_subplot(2,3,5)
+a=fig.add_subplot(2,3,5)
-# textstr = out2[-1]
+textstr = out2[-1]
-# # these are matplotlib.patch.Patch properties
-# props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
-# # place a text box in upper left in axes coords
-# a.text(0.05, 0.95, textstr, transform=a.transAxes, fontsize=14,
- # verticalalignment='top', bbox=props)
-# imgplot = plt.imshow(reg_output[-1][0])
+# these are matplotlib.patch.Patch properties
+props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
+# place a text box in upper left in axes coords
+a.text(0.05, 0.95, textstr, transform=a.transAxes, fontsize=14,
+ verticalalignment='top', bbox=props)
+imgplot = plt.imshow(reg_output[-1][0])
-# ###################### TGV_PD #########################################
-# # Quick 2D denoising example in Matlab:
-# # Im = double(imread('lena_gray_256.tif'))/255; % loading image
-# # u0 = Im + .03*randn(size(Im)); u0(u0<0) = 0; % adding noise
-# # u = PrimalDual_TGV(single(u0), 0.02, 1.3, 1, 550);
+###################### TGV_PD #########################################
+# Quick 2D denoising example in Matlab:
+# Im = double(imread('lena_gray_256.tif'))/255; % loading image
+# u0 = Im + .03*randn(size(Im)); u0(u0<0) = 0; % adding noise
+# u = PrimalDual_TGV(single(u0), 0.02, 1.3, 1, 550);
-# out2 = Regularizer.TGV_PD(input=u0, regularization_parameter=0.05,
- # first_order_term=1.3,
- # second_order_term=1,
- # number_of_iterations=550)
-# pars = out2[-2]
-# reg_output.append(out2)
+out2 = Regularizer.TGV_PD(input=u0, regularization_parameter=0.05,
+ first_order_term=1.3,
+ second_order_term=1,
+ number_of_iterations=550)
+pars = out2[-2]
+reg_output.append(out2)
-# a=fig.add_subplot(2,3,6)
+a=fig.add_subplot(2,3,6)
-# textstr = out2[-1]
+textstr = out2[-1]
-# # these are matplotlib.patch.Patch properties
-# props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
-# # place a text box in upper left in axes coords
-# a.text(0.05, 0.95, textstr, transform=a.transAxes, fontsize=14,
- # verticalalignment='top', bbox=props)
-# imgplot = plt.imshow(reg_output[-1][0])
+# these are matplotlib.patch.Patch properties
+props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
+# place a text box in upper left in axes coords
+a.text(0.05, 0.95, textstr, transform=a.transAxes, fontsize=14,
+ verticalalignment='top', bbox=props)
+imgplot = plt.imshow(reg_output[-1][0])
plt.show()