diff options
author | algol <dkazanc@hotmail.com> | 2018-04-17 13:05:17 +0100 |
---|---|---|
committer | algol <dkazanc@hotmail.com> | 2018-04-17 13:05:17 +0100 |
commit | ec9b5742e243c60f2f7d31f38cd3d561c3ae3394 (patch) | |
tree | 530f73d52c3142b023673f2041ac451bfcab576b /Wrappers/Python/demos | |
parent | d0a33e4f941539ba44a071cfab75d7bf9543990f (diff) | |
download | regularization-ec9b5742e243c60f2f7d31f38cd3d561c3ae3394.tar.gz regularization-ec9b5742e243c60f2f7d31f38cd3d561c3ae3394.tar.bz2 regularization-ec9b5742e243c60f2f7d31f38cd3d561c3ae3394.tar.xz regularization-ec9b5742e243c60f2f7d31f38cd3d561c3ae3394.zip |
TNV demos
Diffstat (limited to 'Wrappers/Python/demos')
-rw-r--r-- | Wrappers/Python/demos/demo_cpu_regularisers.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Wrappers/Python/demos/demo_cpu_regularisers.py b/Wrappers/Python/demos/demo_cpu_regularisers.py index e74fa58..7443b83 100644 --- a/Wrappers/Python/demos/demo_cpu_regularisers.py +++ b/Wrappers/Python/demos/demo_cpu_regularisers.py @@ -247,7 +247,7 @@ print ("__________Total nuclear Variation__________") print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%") ## plot -fig = plt.figure(4) +fig = plt.figure(5) plt.suptitle('Performance of TNV regulariser using the CPU') a=fig.add_subplot(1,2,1) a.set_title('Noisy Image') @@ -258,7 +258,7 @@ N = 512 noisyVol = np.zeros((channelsNo,N,N),dtype='float32') idealVol = np.zeros((channelsNo,N,N),dtype='float32') -for i in range (slices): +for i in range (channelsNo): noisyVol[i,:,:] = Im + np.random.normal(loc = 0 , scale = perc * Im , size = np.shape(Im)) idealVol[i,:,:] = Im @@ -321,7 +321,7 @@ print ("_______________ROF-TV (3D)_________________") print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%") ## plot -fig = plt.figure(5) +fig = plt.figure(6) plt.suptitle('Performance of ROF-TV regulariser using the CPU') a=fig.add_subplot(1,2,1) a.set_title('Noisy 15th slice of a volume') @@ -361,7 +361,7 @@ print ("_______________FGP-TV (3D)__________________") print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%") ## plot -fig = plt.figure(6) +fig = plt.figure(7) plt.suptitle('Performance of FGP-TV regulariser using the CPU') a=fig.add_subplot(1,2,1) a.set_title('Noisy Image') @@ -410,7 +410,7 @@ print ("_______________SB-TV (3D)_________________") print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%") ## plot -fig = plt.figure(7) +fig = plt.figure(8) plt.suptitle('Performance of SB-TV regulariser using the CPU') a=fig.add_subplot(1,2,1) a.set_title('Noisy Image') @@ -457,7 +457,7 @@ print ("_______________FGP-dTV (3D)__________________") print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%") ## plot -fig = plt.figure(8) +fig = plt.figure(9) plt.suptitle('Performance of FGP-dTV regulariser using the CPU') a=fig.add_subplot(1,2,1) a.set_title('Noisy Image') |