mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-16 11:27:48 +08:00
Convert to ubyte dtype explicitly for python 3
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user