Fix inconsistencies in examples and many more improvements

This commit is contained in:
Johannes Schönberger
2013-04-27 16:47:33 +02:00
parent 41007b417b
commit d0ee6ade61
40 changed files with 138 additions and 132 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
'''
"""
===========================
Structural similarity index
===========================
@@ -20,12 +20,13 @@ but with very different mean structural similarity indices.
Transactions on Image Processing, vol. 13, no. 4, pp. 600-612,
Apr. 2004.
'''
"""
import numpy as np
import matplotlib.pyplot as plt
from skimage import data, color, io, exposure, img_as_float
from skimage.measure import structural_similarity as ssim
import numpy as np
img = img_as_float(data.camera())
rows, cols = img.shape
@@ -39,7 +40,6 @@ def mse(x, y):
img_noise = img + noise
img_const = img + abs(noise)
import matplotlib.pyplot as plt
f, (ax0, ax1, ax2) = plt.subplots(1, 3)
mse_none = mse(img, img)