{"id":947,"library":"scikit-image","title":"scikit-image","description":"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.","status":"active","version":"0.26.0","language":"python","source_language":"en","source_url":"https://github.com/scikit-image/scikit-image","tags":["image processing","computer vision","scientific computing","image analysis","NumPy"],"install":[{"cmd":"pip install scikit-image","lang":"bash","label":"Install core library"},{"cmd":"pip install scikit-image[data]","lang":"bash","label":"Install with example datasets (requires pooch)"},{"cmd":"pip install scikit-image[optional]","lang":"bash","label":"Install with optional scientific packages (e.g., for parallel processing)"}],"dependencies":[{"reason":"Core array manipulation and numerical operations.","package":"numpy","optional":false},{"reason":"Advanced scientific computing, used for various algorithms.","package":"scipy","optional":false},{"reason":"Image file format support (reading/writing).","package":"pillow","optional":false},{"reason":"General-purpose I/O for a wide range of image and video formats.","package":"imageio","optional":false},{"reason":"Graph-based operations.","package":"networkx","optional":false},{"reason":"Reading and writing TIFF files.","package":"tifffile","optional":false},{"reason":"Wavelet transforms.","package":"PyWavelets","optional":false}],"imports":[{"note":"The standard and recommended import alias for scikit-image.","symbol":"skimage","correct":"import skimage as ski"},{"note":"Commonly imported submodule for image input/output operations like imread/imwrite.","symbol":"io","correct":"from skimage import io"},{"note":"Commonly imported submodule for image filtering operations.","symbol":"filters","correct":"from skimage import filters"}],"quickstart":{"code":"import skimage as ski\n\n# Load an example image (e.g., coins dataset)\nimage = ski.data.coins()\n\n# Apply a basic image processing operation, e.g., Otsu thresholding\nthreshold_value = ski.filters.threshold_otsu(image)\nbinary_image = image > threshold_value\n\nprint(f\"Original image shape: {image.shape}\")\nprint(f\"Calculated threshold value: {threshold_value}\")\nprint(f\"Processed (binary) image shape: {binary_image.shape}\")\n","lang":"python","description":"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."},"warnings":[{"fix":"Replace calls to `skimage.morphology.binary_erosion` with `skimage.morphology.erosion`, `binary_dilation` with `dilation`, etc.","message":"The binary versions of morphological operations (`binary_erosion`, `binary_dilation`, `binary_opening`, `binary_closing`) in `skimage.morphology` are deprecated in favor of their non-binary counterparts (`erosion`, `dilation`, `opening`, `closing`). The binary versions were not significantly faster and sometimes slower.","severity":"deprecated","affected_versions":"0.26.0 and later"},{"fix":"Remove `max_cost` and `max_cumulative_cost` arguments. If limiting step cost is desired, use the new `max_step_cost` parameter.","message":"Parameters `max_cost` and `max_cumulative_cost` in `skimage.graph.MCP.find_costs` are deprecated as they previously did nothing. A new parameter `max_step_cost` has been introduced.","severity":"deprecated","affected_versions":"0.26.0 and later"},{"fix":"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.","message":"The `area_threshold` parameter in `skimage.morphology.remove_small_holes` is deprecated in favor of `max_size` for clearer API and behavior. `max_size` removes holes smaller than or equal to its value, while the previous parameter only removed strictly smaller ones.","severity":"deprecated","affected_versions":"0.26.0 and later"},{"fix":"Ensure your Python environment is at least 3.11 (preferably 3.12+). Use a virtual environment to manage Python versions and dependencies.","message":"scikit-image 0.26.0 requires Python 3.11 or newer. Attempting to install with an older Python version will automatically resolve to an older, compatible `scikit-image` version, which may lack recent features and fixes.","severity":"gotcha","affected_versions":"0.26.0 and later (and generally, new major Python versions for each skimage release)"}],"env_vars":null,"search_vec":"'-12':63 '-20':64 '0.26.0':58 '2025':62 'activ':51 'algorithm':36 'analysi':47,72 'built':20 'collect':34 'comprehens':33 'comput':18,67,70 'core':26 'detect':45 'featur':44 'filter':42 'frequent':54 'imag':3,6,15,65,71 'librari':13 'maintain':52 'numpi':22,73 'open':10 'open-sourc':9 'process':16,66 'project':29,49 'provid':31 'python':12,28 'releas':55,60 'scientif':27,69 'scikit':2,5 'scikit-imag':1,4 'scipi':23 'segment':41 'sourc':11 'task':38 'transform':43 'version':57 'vision':19,68","created_at":"2026-03-29T06:09:00.689258+00:00","updated_at":"2026-04-16T21:24:52.975478+00:00","problems":[{"fix":"pip install scikit-image","cause":"The scikit-image library is not installed in your current Python environment.","error":"ModuleNotFoundError: No module named 'skimage'"},{"fix":"First, install `imageio` (`pip install imageio`), then update your import and usage from `from skimage.io import imread` to `from imageio import imread`.","cause":"The `imread` function directly from `skimage.io` is deprecated in recent versions of scikit-image (0.19 onwards) in favor of using the `imageio` library.","error":"UserWarning: `imread` is deprecated in SciKit-Image 0.19 and will be removed in 0.21. Use `imageio.imread` instead."},{"fix":"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.","cause":"A scikit-image function expecting a 2D (grayscale) image received a 3D (color) image, or an image with an unexpected number of dimensions.","error":"ValueError: The input image must be a 2D array."},{"fix":"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()`.","cause":"Pixel values in the image array are outside the expected valid range for their data type (e.g., float images with values outside [0, 1] or integer images outside [0, 255]), often after arithmetic operations without normalization.","error":"RuntimeWarning: Images past the valid range. Set `clip=True` to clip these values before plotting."}],"ecosystem":"pypi","meta_description":null,"install_score":93,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.26.0","cli_name":"","cli_version":null,"type":"library","homepage":"https://scikit-image.org","github":"https://github.com/scikit-image/scikit-image","docs":"https://scikit-image.org/docs/stable","changelog":null,"pypi":"https://pypi.org/project/scikit-image/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","data","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-27","next_check":"2026-07-28","install_tag":"verified"}}