Convert to ubyte dtype explicitly for python 3

This commit is contained in:
Johannes Schönberger
2013-04-28 11:11:30 +02:00
parent 9b069335eb
commit 529d46a67b
5 changed files with 15 additions and 13 deletions
+4 -3
View File
@@ -16,13 +16,14 @@ See Wikipedia_ for more details on the algorithm.
from scipy import ndimage
import matplotlib.pyplot as plt
from skimage.morphology import watershed, disk
from skimage import data
# original data
from skimage.filter import rank
from skimage.util import img_as_ubyte
image = data.camera()
image = img_as_ubyte(data.camera())
# denoise image
denoised = rank.median(image, disk(2))