Image processing in Python
scikit-image is an image processing toolbox built on SciPy that includes algorithms for segmentation, geometric transformations, color space manipulation, analysis, filtering, morphology, feature detection, and more.
For more information, examples, and documentation, please visit our website: https://scikit-image.org
With this release, many of the functions in skimage.measure
now support anisotropic images with different voxel spacings.
Many performance improvements were made, such as support for footprint decomposition in skimage.morphology
Four new gallery examples were added to the documentation, including the new interactive example "Track solidification of a metallic alloy".
This release completes the transition to a more flexible channel_axis
parameter for indicating multi-channel images, and includes several other deprecations that make the API more consistent and expressive.
Finally, in preparation for the removal of distutils
in the upcoming Python 3.12 release, we replaced our build system with meson
and a static pyproject.toml
specification.
This release supports Python 3.8--3.11.
skimage.morphology
. By decomposing a footprint into several smaller ones, morphological operations can potentially be sped up. The decomposed footprint can be generated with the new decomposition
parameter of the functions rectangle
, diamond
, disk
, cube
, octahedron
, ball
, and octagon
in skimage.morphology
. The footprint
parameter of the functions binary_erosion
, binary_dilation
, binary_opening
, binary_closing
, erosion
, dilation
, opening
, closing
, white_tophat
, and black_tophat
in skimage.morphology
now accepts a sequence of 2-element tuples (footprint_i, num_iter_i)
where each entry, i
, of the sequence contains a footprint and the number of times it should be iteratively applied. This is the form produced by the footprint decompositions mentioned above (#5482, #6151).spacing
of the following functions in skimage.measure
: regionprops
, regionprops_table
, moments
, moments_central
, moments_normalized
, centroid
, inertia_tensor
, and inertia_tensor_eigvals
. Voxel spacing is taken into account for the following existing properties in skimage.measure.regionprops
: area
, area_bbox
, centroid
, area_convex
, extent
, feret_diameter_max
, area_filled
, inertia_tensor
, moments
, moments_central
, moments_hu
, moments_normalized
, perimeter
, perimeter_crofton
, solidity
, moments_weighted_central
, and moments_weighted_hu
. The new properties num_pixels
and coords_scaled
are available as well. See the respective docstrings for more details (#6296).isotropic_closing
, isotropic_dilation
, isotropic_erosion
, and isotropic_opening
in skimage.morphology
. These functions return the same results as their non-isotropic counterparts but perform faster for large circular structuring elements (#6492).pearson_corr_coeff
, manders_coloc_coeff
, manders_overlap_coeff
and intersection_coeff
to skimage.measure
(#6189).skimage.metrics.hausdorff_distance
via the new parameter method
. The MHD can be more robust against outliers than the directed Hausdorff Distance (HD) (#5581).skimage.data.protein_transport
and skimage.data.nickel_solidification
(#6087).use_gaussian_derivatives
to skimage.feature.hessian_matrix
which allows the computation of the Hessian matrix by convolving with Gaussian derivatives (#6149).squared_butterworth
and npad
to skimage.filters.butterworth
, which support traditional or squared filtering and edge padding, respectively (#6251).skimage.io.ImageCollection
from a load_pattern
with an arbitrary sequence as long as a matching load_func
is provided (#6276).alpha
to skimage.metrics.adapted_rand_error
allowing control over the weight given to precision and recall (#6472).binarize
to skimage.measure.grid_points_in_poly
to optionally return labels that tell whether a pixel is inside, outside, or on the border of the polygon (#6515).include_borders
to skimage.measure.convex_hull_image
to optionally exclude vertices or edges from the final hull mask (#6515).offsets
to skimage.measure.regionprops
that optionally allows specifying the coordinates of the origin and affects the properties coords_scaled
and coords
(#3706).disambiguate
to skimage.registration.phase_cross_correlation
to optionally disambiguate periodic shifts (#6617).skimage.filters.farid
(Farid & Simoncelli filter) (#6257).skimage.restoration.wiener
(#6454).rotation
and translation
in skimage.transform.EuclideanTransform
as well as for skimage.transform.SimilarityTransform.scale
(#6367).skimage.morphology.flood_fill
(#6236).AffineTransform
, EssentialMatrixTransform
, EuclideanTransform
, FundamentalMatrixTransform
, GeometricTransform
, PiecewiseAffineTransform
, PolynomialTransform
, ProjectiveTransform
, SimilarityTransform
, estimate_transform
, and matrix_transform
in skimage.transform
(#6270).skimage.feature.canny
by porting a part of its implementation to Cython (#6387).skimage.feature.hessian_matrix_eigvals
and 2D skimage.feature.structure_tensor_eigenvalues
(#6441).skimage.measure.moments_central
by avoiding redundant computations (#6188).skimage.io
by loading the matplotlib plugin only when required (#6550).skimage.measure.ransac
which decrease the number of iterations (#6046).skimage.exposure.match_histograms
. (#6209, #6354).meijering
, sato
, frangi
, and hessian
in skimage.filters
(#6509).blob_dog
, blob_log
, and blob_doh
in skimage.feature
(#6597).skimage.morphology.reconstruction
which allows to operate the function with higher precision or on larger arrays. Previously, int32 was used. (#6342).skimage.filters.rank_order
which allows to operate the function with higher precision or on larger arrays. Previously, the returned labels
and original_values
were always of type uint32. (#6342).skimage.filters.meijering
, skimage.filters.sato
, skimage.filters.frangi
, and skimage.filters.hessian
to match the published algorithms more closely. This change is backward incompatible and will lead to different output values compared to the previous implementation. The Hessian matrix calculation is now done more accurately. The filters will now be correctly set to zero whenever one of the Hessian eigenvalues has a sign which is incompatible with a ridge of the desired polarity. The gamma constant of the Frangi filter is now set adaptively based on the maximum Hessian norm (#6446).skimage.future.graph
to skimage.graph
. This affects cut_threshold
, cut_normalized
, merge_hierarchical
, rag_mean_color
, RAG
, show_rag
, and rag_boundary
(#6674).False
in skimage.measure.LineModelND.estimate
instead of raising an error if the model is under-determined (#6453).False
in skimage.measure.CircleModel.estimate
instead of warning if the model is under-determined (#6453).skimage.filters.inverse
to skimage.filters.inverse_filter
. skimage.filters.inverse
is deprecated and will be removed in the next release (#6418, #6701).numpy>=1.20
(#6565).scipy>=1.8
(#6564).networkx>=2.8
(#6564).pillow>=9.0.1
(#6402).setuptools 67
(#6754).matplotlib>=3.3
(#6383).skimage.feature.local_binary_pattern
. Applying the function to floating-point images may give unexpected results when small numerical differences between adjacent pixels are present (#6272).skimage.registration.phase_cross_correlation
returns only the shift vector. Starting with the next release this function will always return a tuple of three (shift vector, error, phase difference). Use return_error="always"
to silence this warning and switch to this new behavior (#6543).skimage.metrics.structural_similarity
, if data_range
is not specified in case of floating point data (#6612).skimage.filters.gaussian
and a warning is emitted if the parameter channel_axis
is not set explicitly (#6583).skimage.viewer
which was scheduled for removal in the postponed version 1.0 (#6160).indices
from skimage.feature.peak_local_max
(#6161).skimage.feature.structure_tensor_eigvals
(it was replaced by skimage.feature.structure_tensor_eigenvalues
) and change the default parameter value in skimage.feature.structure_tensor
to order="rc"
(#6162).array
in favor of image
from skimage.measure.find_contours
(#6163).skivi
console script (#6164).method='_lorensen'
in skimage.measure.marching_cubes
(#6230).multichannel
; use channel_axis
instead. This affects skimage.draw.random_shapes
, skimage.exposure.match_histograms
, skimage.feature.multiscale_basic_features
, skimage.feature.hog
, skimage.feature.difference_of_gaussians
, skimage.filters.unsharp_mask
, and skimage.metrics.structural_similarity
. In skimage.restoration
, this affects cycle_spin
, denoise_bilateral
, denoise_tv_bregman
, denoise_tv_chambolle
, denoise_wavelet
, estimate_sigma
, inpaint_biharmonic
, and denoise_nl_means
. In skimage.segmentation
, this affects felzenszwalb
, random_walker
, and slic
. In skimage.transform
, this affects rescale
, warp_polar
, pyramid_reduce
, pyramid_expand
, pyramid_gaussian
, and pyramid_laplacian
. In skimage.util
, this affects montage
and apply_parallel
(#6583).selem
; use footprint
instead. In skimage.filters
, this affects median
, autolevel_percentile
, gradient_percentile
, mean_percentile
, subtract_mean_percentile
, enhance_contrast_percentile
, percentile
, pop_percentile
, sum_percentile
, threshold_percentile
, mean_bilateral
, pop_bilateral
, sum_bilateral
, autolevel
, equalize
, gradient
, maximum
, mean
, geometric_mean
, subtract_mean
, median
, minimum
, modal
, enhance_contrast
, pop
, sum
, threshold
, noise_filter
, entropy
, otsu
, windowed_histogram
, and majority
. In skimage.morphology
, this affects flood_fill
, flood
, binary_erosion
, binary_dilation
, binary_opening
, binary_closing
, h_maxima
, h_minima
, local_maxima
, local_minima
, erosion
, dilation
, opening
, closing
, white_tophat
, black_tophat
, and reconstruction
(#6583).max_iter
from skimage.filters.threshold_minimum
, skimage.morphology.thin
, and skimage.segmentation.chan_vese
; use max_num_iter
instead (#6583).max_iterations
from skimage.segmentation.active_contour
; use max_num_iter
instead (#6583).input
from skimage.measure.label
; use label_image
instead (#6583).coordinates
from skimage.measure.regionprops
and skimage.segmentation.active_contour
(#6583).neighbourhood
from skimage.measure.perimeter
; use neighborhood
instead (#6583).height
and width
from skimage.morphology.rectangle
; use ncols
and nrows
instead (#6583).in_place
from skimage.morphology.remove_small_objects
, skimage.morphology.remove_small_holes
, and skimage.segmentation.clear_border
; use out
instead (#6583).iterations
from skimage.restoration.richardson_lucy
, skimage.segmentation.morphological_chan_vese
, and skimage.segmentation.morphological_geodesic_active_contour
; use num_iter
instead (#6583)."min_iter"
and "max_iter"
in skimage.restoration.unsupervised_wiener
's parameter user_params
; use "min_num_iter"
and "max_num_iter"
instead (#6583).greycomatrix
and greycoprops
from skimage.feature
(#6583).skimage.morphology.grey
and skimage.morphology.greyreconstruct
; use skimage.morphology
instead (#6583).skimage.morphology.selem
; use skimage.morphology.footprints
instead (#6583).skimage.future.graph.ncut
(it was replaced by skimage.graph.cut_normalized
) (#6685).skimage.exposure.adjust_gamma
(#6285).skimage.draw.rectangle
to int
even if the input coordinates use float
. This fix ensures that the output can be used for indexing similar to other draw functions (#6501).skimage.feature.peak_local_max
if the peak value is smaller 0 (#6502).skimage.transform.resize
by default when using nearest neighbor interpolation (order == 0
) with an integer input data type (#6503).skimage.segmentation.slic
. Previously, the mask was ignored when rescaling the image to make choice of compactness insensitive to the image values. The new behavior makes it possible to mask values such as numpy.nan
or numpy.infinity
. Additionally, raise an error if the input image
has two dimensions and a channel_axis
is specified - indicating that the image is multi-channel (#6525).exclude_border
in skimage.feature.blog_dog
and skimage.feature.blob_log
(#6533).skimage.segmentation.random_walker
if no seeds are provided as positive values in the parameter labels
(#6562).skimage.measure.regionprops
when the required intensity_image
is unavailable (#6584).skimage.feature.ORB.detect_and_extract
by breaking early if the octave image is too small (#6590).skimage.restoration.inpaint_biharmonic
for images with Fortran-ordered memory layout (#6263).skimage.filters.gaussian
(this behavior is deprecated, see new deprecations) (#6583).skimage.color.lab2rgb
(#6616).skimage.feature.hessian_matrix
and raise an error if order='xy'
is requested for images with more than 2 dimensions (#6624).skimage.filters.rank
that did not mention that 2D images are also supported (#6666).skimage.graph.RAG.merge_nodes
(#6692).heappush
function (#6727).Cascade.detect_multi_scale
(#6728).skimage.filters.butterworth
(#6251)..github/SUPPORT.md
) to help users from GitHub find appropriate support resources (#6171, #6575).CITATION.bib
to repository to help with citing scikit-image (#6195).dev.py
(#6600).weights
term and rewrite docstrings of skimage.restoration.denoise_tv_bregman
and skimage.restoration.denoise_tv_chambolle
(#6544).skimage.io.MultiImage
more precisely in its docstring (#6290, #6292).watershed_line
parameter will not catch borders between adjacent marker regions in skimage.segmentation.watershed
(#6280).skimage.morphology.skeletonize
accepts an image
of any input type (#6322).skimage.data
(#6298, #6300, #6301).balance
in the docstring example of skimage.restoration.wiener
for a less blurry result (#6265).skimage.io.imread
and skimage.io.imsave
(#6361).skimage.filters.threshold_multiotsu
if the discretized image cannot be thresholded (#6375).grey*
to skimage.feature.graymatrix
and skimage.feature.graycoprops
in the release 0.19 (#6420).skimage.metricts.structural_similarity
(#6595).imshow
in gallery example "Measure fluorescence intensity at the nuclear envelope" (#6599).scikit-image[data]
and pooch in INSTALL.rst
(#6619).lab2xyz
, rgb2lab
, lab2lch
, and lch2lab
in skimage.color
(#6688, #6697, #6719).skimage.feature.local_binary_pattern
(#6736).skimage.measure.marching_cubes
in gallery example "Marching Cubes" (#6377).connectivity
parameter in the docstring of skimage.morphology.flood
(#6534).skimage.metrics.hausdorff_distance
(#6203).skimage.measure.moments_hu
(#6016).skimage.util.random_noise
(#6532).skimage.filters.sobel
(#6474).skimage.morphology.footprint_from_sequence
in the public API documentation (#6555).skimage.exposure.rescale_intensity
(#6582).git://
connection protocol and remove references to it (#6201, #6283).doc/source/user_guide/getting_help.rst
(#6575).api_changes.rst
with release_dev.rst
(#6495).skimage.measure.regionprops
(#6545).skimage.morphology.isotropic_
functions (#6628).plot_thresholding.py
(#6644).plot_equalize
(#6650).plot_rank_filters
(#6652).in plot_log_gamma.py
(#6655).skimage.data.coffee
(#6740).skimage.graph.merge_nodes
(#6741).skimage.metrics.variation_of_information
(#6768).cnp.float32_t
and cnp.float64_t
over float
and double
in Cython code (#6303).skimage/measure/mc_meta
folder into tools/precompute/
folder to avoid its unnecessary distribution to users (#6294).getLutNames
in tools/precompute/mc_meta/createluts.py
(#6294).'python_to_notebook'
in doc/ext/notebook_doc.py
(#6307).skimage.measure.tests.test_moments
(#6323).skimage.morphology.skeletonize
and update code style and tests (#6327)._probabilistic_hough_line
(#6373).skimage.measure._regionprops
(#6389).loadtxt
of NumPy 1.23 with skimage/feature/orb_descriptor_positions.txt
(#6400).doc.*
from package install (#6428).vertices
with simplices
in skimage.transform._geometric
(#6430).skimage.filters.sato
(#6434).TODO.txt
(#6442).skimage.feature._canny
(#6457).with open(...) as f
instead of f = open(...)
(#6458).broadcast_to
instead of as_strided
to generate broadcasted arrays (#6476).moving_image
in docstring of skimage.registration._optical_flow._tvl1
(#6480).pyplot.get_cmap
instead of deprecated cm.get_cmap
in skimage.future.graph.show_rag
for compatibility with matplotlib 3.3 to 3.6 (#6483, #6490).plot_euler_number.py
for maplotlib 3.6 compatibility (#6522).license_file
to license_files
in setup.cfg
(#6529).FUNDING.yml
in preference of org version (#6553).tifffile.imwrite
defaults and avoid test warnings (#6460).networkx.to_scipy_sparse_array
(#6564).pyproject.toml
to support Python 3.11 and to fix 32-bit pinned packages on Windows (#6519).pyproject.toml
(#6634).>=0.11.0
(#6627).skimage.color.lab2xyz
(#6613).check: true
for run_command
in skimage/meson.build
(#6606).dev.py
and setup commands (#6600).dev.py
commands into sections (#6629).skimage.transform.resize
(#6669).gtk_plugin.ini
(#6686).skimage/__init__.py
in skimage/meson.build
(#6723).uintptr_t
to calculate new heap ptr positions (#6734).setuptools
65.6+ (#6751).setup.cfg
, use pyproject.toml
instead (#6758).pyproject.toml
to use meson-python>=0.13.0rc0
(#6759).morphology.local_maxima
(#3255).skimage.morphology.reconstruction
(#6342).actions/stale
to label "dormant" issues and PRs (#6506, #6546, #6552).tools/github/before_install.sh
(#6379).benchmarks.yaml
workflow (#6520).azure-pipelines.yml
(#6626).tools/github/before_install.sh
wheels workflow (#6718).skimage._shared._warnings.expected_warnings
(#6733).We're happy to announce the release of scikit-image v0.19.3!
scikit-image is an image processing toolbox for SciPy that includes algorithms for segmentation, geometric transformations, color space manipulation, analysis, filtering, morphology, feature detection, and more.
For more information, examples, and documentation, please visit our website:
skimage.restoration.cycle_spin
(now defaults to single channel again)tifffile
release.skimage.future.manual_polygon_segmentation
to work with Matplotlib 3.5.skimage.io.imread
to avoid warnings when using imageio
>=2.16.2.test_tifffile_kwarg_passthrough
) (#6357)We're happy to announce the release of scikit-image v0.19.2! This is primarily a bug fix release, although there is one new gallery example related to detection of fluorescence at the nuclear envelope of mammalian cells.
enforce_connectivity=True
and start_label > 0
) (gh-6246)We're happy to announce the release of scikit-image v0.19.1!
This is a small bug fix release that resolves a couple of backwards compatibility issues and a couple of issues with the wheels on PyPI. Specifically, MacOS wheels for Apple M1 (arm64) on PyPI were broken in 0.19.0, but should now be repaired. The arm64 wheels are for MacOs >= 12 only. Wheel sizes are also greatly reduced relative to 0.19.0 by stripping debug symbols from the binaries and making sure that Cython-generated source files are not bundled in the wheels.
channel_axis
parameter in transform functions) (gh-6100)