explicitly suggest using multichannel in compute_ssim error message

This commit is contained in:
Gregory R. Lee
2016-03-11 10:11:46 -05:00
parent 16fbf6737a
commit 068663b7fe
+3 -1
View File
@@ -139,7 +139,9 @@ def compare_ssim(X, Y, win_size=None, gradient=False,
win_size = 7 # backwards compatibility
if np.any((np.asarray(X.shape) - win_size) < 0):
raise ValueError("win_size exceeds image extent")
raise ValueError(
"win_size exceeds image extent. If the input is a multichannel "
"(color) image, set multichannel=True.")
if not (win_size % 2 == 1):
raise ValueError('Window size must be odd.')