Correcting the Error raised for Otsu Threshold

The previous error, `TypeError` did not reflect the test done and would typically be raised while `image` indeed had the correct type.
This commit is contained in:
Martin Zackrisson
2016-05-30 11:13:58 +02:00
parent 292a0bee3c
commit 8b6460b06e
+1 -1
View File
@@ -133,7 +133,7 @@ def threshold_otsu(image, nbins=256):
# Check if the image is multi-colored or not
if image.min() == image.max():
raise TypeError("threshold_otsu is expected to work with images " \
raise ValueError("threshold_otsu is expected to work with images " \
"having more than one color. The input image seems " \
"to have just one color {0}.".format(image.min()))