summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2017-10-11 15:11:00 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2017-10-11 15:48:34 +0100
commitc8693f530e95e140a3fba85fc65d879b51b79e6d (patch)
tree2ce9ff23960d07f07c74dcccb603355d77a1351f
parent9c974a26c0fc8060008745796fbe9f7ef5c250eb (diff)
downloadregularization-c8693f530e95e140a3fba85fc65d879b51b79e6d.tar.gz
regularization-c8693f530e95e140a3fba85fc65d879b51b79e6d.tar.bz2
regularization-c8693f530e95e140a3fba85fc65d879b51b79e6d.tar.xz
regularization-c8693f530e95e140a3fba85fc65d879b51b79e6d.zip
table with regularizers output
-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()