scikit-image is an open-source Python library for image processing and computer vision, built on NumPy, SciPy, and other core scientific Python projects. It provides a comprehensive collection of algorithms for tasks such as segmentation, filtering, transformation, feature detection, and analysis. The project is actively maintained, with frequent releases, and version 0.26.0 was released on 2025-12-20.
pip install scikit-imageVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates loading an example grayscale image using `skimage.data.coins()` and applying a common image filtering technique, Otsu thresholding, from `skimage.filters` to convert it into a binary image. The shapes of the original and processed images are printed to confirm the operations.
Replace calls to `skimage.morphology.binary_erosion` with `skimage.morphology.erosion`, `binary_dilation` with `dilation`, etc.
Remove `max_cost` and `max_cumulative_cost` arguments. If limiting step cost is desired, use the new `max_step_cost` parameter.
Update calls to `skimage.morphology.remove_small_holes` by replacing `area_threshold` with `max_size`, adjusting the value if necessary to match the desired behavior.
Ensure your Python environment is at least 3.11 (preferably 3.12+). Use a virtual environment to manage Python versions and dependencies.
pip install scikit-image
First, install `imageio` (`pip install imageio`), then update your import and usage from `from skimage.io import imread` to `from imageio import imread`.
Convert the image to grayscale using `skimage.color.rgb2gray(image)` or select a single channel (e.g., `image[:, :, 0]`) before passing it to the function.
Normalize or clip the image data to the valid range for its `dtype` using `np.clip(image, 0, 1)` for float images, or scikit-image utility functions like `skimage.util.img_as_ubyte()` or `skimage.util.img_as_float()`.