YPbPr to RGB color space conversion.
The image in YPbPr format. Final dimension denotes channels.
The image in RGB format. Same dimensions as input.
If ypbpr is not at least 2-D with shape (…, 3).
https://en.wikipedia.org/wiki/YPbPr


YUV to RGB color space conversion.
The image in YUV format. Final dimension denotes channels.
The image in RGB format. Same dimensions as input.
If yuv is not at least 2-D with shape (…, 3).
https://en.wikipedia.org/wiki/YUV


Standard test images.
For more images, see
skimage.data.astronaut()
Color image of the astronaut Eileen Collins.
skimage.data.binary_blobs([length, …])
Generate synthetic binary image with several rounded blob-like objects.
skimage.data.brain()
Subset of data from the University of North Carolina Volume Rendering Test Data Set.
skimage.data.brick()
Brick wall.
skimage.data.camera()
Gray-level “camera” image.
skimage.data.cat()
Chelsea the cat.
skimage.data.cell()
Cell floating in saline.
skimage.data.cells3d()
3D fluorescence microscopy image of cells.
skimage.data.checkerboard()
Checkerboard image.
skimage.data.chelsea()
Chelsea the cat.
skimage.data.clock()
Motion blurred clock.
skimage.data.coffee()
Coffee cup.
skimage.data.coins()
Greek coins from Pompeii.
skimage.data.colorwheel()
Color Wheel.
skimage.data.download_all([directory])
Download all datasets for use with scikit-image offline.
skimage.data.eagle()
A golden eagle.
skimage.data.grass()
Grass.
skimage.data.gravel()
Gravel
skimage.data.horse()
Black and white silhouette of a horse.
skimage.data.hubble_deep_field()
Hubble eXtreme Deep Field.
skimage.data.human_mitosis()
Image of human cells undergoing mitosis.
skimage.data.immunohistochemistry()
Immunohistochemical (IHC) staining with hematoxylin counterstaining.
skimage.data.kidney()
Mouse kidney tissue.
skimage.data.lbp_frontal_face_cascade_filename()
Return the path to the XML file containing the weak classifier cascade.
skimage.data.lfw_subset()
Subset of data from the LFW dataset.
skimage.data.lily()
Lily of the valley plant stem.
skimage.data.logo()
Scikit-image logo, a RGBA image.
skimage.data.microaneurysms()
Gray-level “microaneurysms” image.
skimage.data.moon()
Surface of the moon.
skimage.data.page()
Scanned page.
skimage.data.retina()
Human retina.
skimage.data.rocket()
Launch photo of DSCOVR on Falcon 9 by SpaceX.
skimage.data.shepp_logan_phantom()
Shepp Logan Phantom.
skimage.data.skin()
Microscopy image of dermis and epidermis (skin layers).
skimage.data.stereo_motorcycle()
Rectified stereo image pair with ground-truth disparities.
skimage.data.text()
Gray-level “text” image used for corner detection.
Color image of the astronaut Eileen Collins.
Photograph of Eileen Collins, an American astronaut. She was selected as an astronaut in 1992 and first piloted the space shuttle STS-63 in 1995. She retired in 2006 after spending a total of 38 days, 8 hours and 10 minutes in outer space.
This image was downloaded from the NASA Great Images database <https://flic.kr/p/r9qvLn>`__.
No known copyright restrictions, released into the public domain.
Astronaut image.
Flood Fill
Generate synthetic binary image with several rounded blob-like objects.
Linear size of output image.
Typical linear size of blob, as a fraction of length, should be smaller than 1.
Number of dimensions of output image.
Fraction of image pixels covered by the blobs (where the output is 1). Should be in [0, 1].
Seed to initialize the random number generator. If None, a random seed from the operating system is used.
Output binary image
Subset of data from the University of North Carolina Volume Rendering Test Data Set.
The full dataset is available at [1].
The 3D volume consists of 10 layers from the larger volume.
https://graphics.stanford.edu/data/voldata/
Local Histogram Equalization
Rank filters
Brick wall.
A small section of a brick wall.
The original image was downloaded from CC0Textures and licensed under the Creative Commons CC0 License.
A perspective transform was then applied to the image, prior to rotating it by 90 degrees, cropping and scaling it to obtain the final image.
Gray-level “camera” image.
Can be used for segmentation and denoising examples.
Camera image.
No copyright restrictions. CC0 by the photographer (Lav Varshney).
Changed in version 0.18: This image was replaced due to copyright restrictions. For more information, please see [1].
https://github.com/scikit-image/scikit-image/issues/3927
Tinting gray-scale images
Masked Normalized Cross-Correlation
Entropy
GLCM Texture Features
Multi-Otsu Thresholding
Flood Fill
Rank filters
Chelsea the cat.
An example with texture, prominent edges in horizontal and diagonal directions, as well as features of differing scales.
Chelsea image.
No copyright restrictions. CC0 by the photographer (Stefan van der Walt).
Cell floating in saline.
This is a quantitative phase image retrieved from a digital hologram using the Python library qpformat. The image shows a cell with high phase value, above the background phase.
Because of a banding pattern artifact in the background, this image is a good test of thresholding algorithms. The pixel spacing is 0.107 µm.
These data were part of a comparison between several refractive index retrieval techniques for spherical objects as part of [1].
This image is CC0, dedicated to the public domain. You may copy, modify, or distribute it without asking permission.
Image of a cell.
Paul Müller, Mirjam Schürmann, Salvatore Girardo, Gheorghe Cojoc, and Jochen Guck. “Accurate evaluation of size and refractive index for spherical objects in quantitative phase imaging.” Optics Express 26(8): 10729-10743 (2018). DOI:10.1364/OE.26.010729
3D fluorescence microscopy image of cells.
The returned data is a 3D multichannel array with dimensions provided in (z, c, y, x) order. Each voxel has a size of (0.29 0.26 0.26) micrometer. Channel 0 contains cell membranes, channel 1 contains nuclei.
The volumetric images of cells taken with an optical microscope.
The data for this was provided by the Allen Institute for Cell Science.
It has been downsampled by a factor of 4 in the row and column dimensions to reduce computational time.
The microscope reports the following voxel spacing in microns:
3D adaptive histogram equalization
Use rolling-ball algorithm for estimating background intensity
Explore 3D images (of cells)
Checkerboard image.
Checkerboards are often used in image calibration, since the corner-points are easy to locate. Because of the many parallel edges, they also visualise distortions particularly well.
Checkerboard image.
Flood Fill
Chelsea the cat.
An example with texture, prominent edges in horizontal and diagonal directions, as well as features of differing scales.
Chelsea image.
No copyright restrictions. CC0 by the photographer (Stefan van der Walt).
Phase Unwrapping
Flood Fill
Motion blurred clock.
This photograph of a wall clock was taken while moving the camera in an aproximately horizontal direction. It may be used to illustrate inverse filters and deconvolution.
Released into the public domain by the photographer (Stefan van der Walt).
Clock image.
Coffee cup.
This photograph is courtesy of Pikolo Espresso Bar. It contains several elliptical shapes as well as varying texture (smooth porcelain to course wood grain).
Coffee image.
No copyright restrictions. CC0 by the photographer (Rachel Michetti).
Greek coins from Pompeii.
This image shows several coins outlined against a gray background. It is especially useful in, e.g. segmentation tests, where individual objects need to be identified against a background. The background shares enough grey levels with the coins that a simple segmentation is not sufficient.
Coins image.
This image was downloaded from the Brooklyn Museum Collection.
No known copyright restrictions.
Finding local maxima
Measure region properties
Use rolling-ball algorithm for estimating background intensity
Color Wheel.
A colorwheel.
Download all datasets for use with scikit-image offline.
Scikit-image datasets are no longer shipped with the library by default. This allows us to use higher quality datasets, while keeping the library download size small.
This function requires the installation of an optional dependency, pooch, to download the full dataset. Follow installation instruction found at
https://scikit-image.org/docs/stable/install.html
Call this function to download all sample images making them available offline on your machine.
The directory where the dataset should be stored.
If pooch is not install, this error will be raised.
scikit-image will only search for images stored in the default directory. Only specify the directory if you wish to download the images to your own folder for a particular reason. You can access the location of the default data directory by inspecting the variable skimage.data.data_dir.
A golden eagle.
Suitable for examples on segmentation, Hough transforms, and corner detection.
Eagle image.
No copyright restrictions. CC0 by the photographer (Dayane Machado).
Markers for watershed transform
Grass.
Some grass.
The original image was downloaded from DeviantArt and licensed underthe Creative Commons CC0 License.
The downloaded image was cropped to include a region of (512, 512) pixels around the top left corner, converted to grayscale, then to uint8 prior to saving the result in PNG format.
Gravel
Grayscale gravel sample.
The original image was downloaded from CC0Textures and licensed under the Creative Commons CC0 License.
The downloaded image was then rescaled to (1024, 1024), then the top left (512, 512) pixel region was cropped prior to converting the image to grayscale and uint8 data type. The result was saved using the PNG format.
Black and white silhouette of a horse.
This image was downloaded from openclipart
No copyright restrictions. CC0 given by owner (Andreas Preuss (marauder)).
Horse image.
Hubble eXtreme Deep Field.
This photograph contains the Hubble Telescope’s farthest ever view of the universe. It can be useful as an example for multi-scale detection.
Hubble deep field image.
This image was downloaded from HubbleSite.
The image was captured by NASA and may be freely used in the public domain.
Image of human cells undergoing mitosis.
Data of human cells undergoing mitosis taken during the preperation of the manuscript in [1].
Copyright David Root. Licensed under CC-0 [2].
Moffat J, Grueneberg DA, Yang X, Kim SY, Kloepfer AM, Hinkle G, Piqani B, Eisenhaure TM, Luo B, Grenier JK, Carpenter AE, Foo SY, Stewart SA, Stockwell BR, Hacohen N, Hahn WC, Lander ES, Sabatini DM, Root DE (2006) A lentiviral RNAi library for human and mouse genes applied to an arrayed viral high-content screen. Cell, 124(6):1283-98 / :DOI: 10.1016/j.cell.2006.01.040 PMID 16564017
GitHub licensing discussion https://github.com/CellProfiler/examples/issues/41
Segment human cells (in mitosis)
Immunohistochemical (IHC) staining with hematoxylin counterstaining.
This picture shows colonic glands where the IHC expression of FHL2 protein is revealed with DAB. Hematoxylin counterstaining is applied to enhance the negative parts of the tissue.
This image was acquired at the Center for Microscopy And Molecular Imaging (CMMI).
No known copyright restrictions.
Immunohistochemistry image.
Mouse kidney tissue.
This biological tissue on a pre-prepared slide was imaged with confocal fluorescence microscopy (Nikon C1 inverted microscope). Image shape is (16, 512, 512, 3). That is 512x512 pixels in X-Y, 16 image slices in Z, and 3 color channels (emission wavelengths 450nm, 515nm, and 605nm, respectively). Real-space voxel size is 1.24 microns in X-Y, and 1.25 microns in Z. Data type is unsigned 16-bit integers.
Kidney 3D multichannel image.
This image was acquired by Genevieve Buckley at Monasoh Micro Imaging in 2018. License: CC0
Return the path to the XML file containing the weak classifier cascade.
These classifiers were trained using LBP features. The file is part of the OpenCV repository [1].
OpenCV lbpcascade trained files https://github.com/opencv/opencv/tree/master/data/lbpcascades
Subset of data from the LFW dataset.
This database is a subset of the LFW database containing:
The full dataset is available at [2].
100 first images are faces and subsequent 100 are non-faces.
The faces were randomly selected from the LFW dataset and the non-faces were extracted from the background of the same dataset. The cropped ROIs have been resized to a 25 x 25 pixels.
Huang, G., Mattar, M., Lee, H., & Learned-Miller, E. G. (2012). Learning to align from scratch. In Advances in Neural Information Processing Systems (pp. 764-772).
http://vis-www.cs.umass.edu/lfw/
Specific images
Lily of the valley plant stem.
This plant stem on a pre-prepared slide was imaged with confocal fluorescence microscopy (Nikon C1 inverted microscope). Image shape is (922, 922, 4). That is 922x922 pixels in X-Y, with 4 color channels. Real-space voxel size is 1.24 microns in X-Y. Data type is unsigned 16-bit integers.
Lily 2D multichannel image.
This image was acquired by Genevieve Buckley at Monasoh Micro Imaging in 2018. License: CC0
Scikit-image logo, a RGBA image.
Logo image.
Gray-level “microaneurysms” image.
Detail from an image of the retina (green channel). The image is a crop of image 07_dr.JPG from the High-Resolution Fundus (HRF) Image Database: https://www5.cs.fau.de/research/data/fundus-images/
Retina image with lesions.
No copyright restrictions. CC0 given by owner (Andreas Maier).
Budai, A., Bock, R, Maier, A., Hornegger, J., Michelson, G. (2013). Robust Vessel Segmentation in Fundus Images. International Journal of Biomedical Imaging, vol. 2013, 2013. DOI:10.1155/2013/154860
Surface of the moon.
This low-contrast image of the surface of the moon is useful for illustrating histogram equalization and contrast stretching.
Moon image.
Local Histogram Equalization
Scanned page.
This image of printed text is useful for demonstrations requiring uneven background illumination.
Page image.
Use rolling-ball algorithm for estimating background intensity
Rank filters
Human retina.
This image of a retina is useful for demonstrations requiring circular images.
Retina image in RGB.
This image was downloaded from wikimedia. This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
Häggström, Mikael (2014). “Medical gallery of Mikael Häggström 2014”. WikiJournal of Medicine 1 (2). DOI:10.15347/wjm/2014.008. ISSN 2002-4436. Public Domain
Launch photo of DSCOVR on Falcon 9 by SpaceX.
This is the launch photo of Falcon 9 carrying DSCOVR lifted off from SpaceX’s Launch Complex 40 at Cape Canaveral Air Force Station, FL.
Rocket image.
This image was downloaded from SpaceX Photos.
The image was captured by SpaceX and released in the public domain.
Shepp Logan Phantom.
Image of the Shepp-Logan phantom in grayscale.
L. A. Shepp and B. F. Logan, “The Fourier reconstruction of a head section,” in IEEE Transactions on Nuclear Science, vol. 21, no. 3, pp. 21-43, June 1974. DOI:10.1109/TNS.1974.6499235
Microscopy image of dermis and epidermis (skin layers).
Hematoxylin and eosin stained slide at 10x of normal epidermis and dermis with a benign intradermal nevus.
This image requires an Internet connection the first time it is called, and to have the pooch package installed, in order to fetch the image file from the scikit-image datasets repository.
The source of this image is https://en.wikipedia.org/wiki/File:Normal_Epidermis_and_Dermis_with_Intradermal_Nevus_10x.JPG
The image was released in the public domain by its author Kilbad.
Trainable segmentation using local features and random forests
Rectified stereo image pair with ground-truth disparities.
The two images are rectified such that every pixel in the left image has its corresponding pixel on the same scanline in the right image. That means that both images are warped such that they have the same orientation but a horizontal spatial offset (baseline). The ground-truth pixel offset in column direction is specified by the included disparity map.
The two images are part of the Middlebury 2014 stereo benchmark. The dataset was created by Nera Nesic, Porter Westling, Xi Wang, York Kitajima, Greg Krathwohl, and Daniel Scharstein at Middlebury College. A detailed description of the acquisition process can be found in [1].
The images included here are down-sampled versions of the default exposure images in the benchmark. The images are down-sampled by a factor of 4 using the function skimage.transform.downscale_local_mean. The calibration data in the following and the included ground-truth disparity map are valid for the down-sampled images:
Left stereo image.
Right stereo image.
Ground-truth disparity map, where each value describes the offset in column direction between corresponding pixels in the left and the right stereo images. E.g. the corresponding pixel of img_left[10, 10 + disp[10, 10]] is img_right[10, 10]. NaNs denote pixels in the left image that do not have ground-truth.
The original resolution images, images with different exposure and lighting, and ground-truth depth maps can be found at the Middlebury website [2].
D. Scharstein, H. Hirschmueller, Y. Kitajima, G. Krathwohl, N. Nesic, X. Wang, and P. Westling. High-resolution stereo datasets with subpixel-accurate ground truth. In German Conference on Pattern Recognition (GCPR 2014), Muenster, Germany, September 2014.
http://vision.middlebury.edu/stereo/data/scenes2014/
Specific images
Registration using optical flow
Gray-level “text” image used for corner detection.
Text image.
This image was downloaded from Wikipedia <https://en.wikipedia.org/wiki/File:Corner.png>`__.
No known copyright restrictions, released into the public domain.


Color image of the astronaut Eileen Collins.
Photograph of Eileen Collins, an American astronaut. She was selected as an astronaut in 1992 and first piloted the space shuttle STS-63 in 1995. She retired in 2006 after spending a total of 38 days, 8 hours and 10 minutes in outer space.
This image was downloaded from the NASA Great Images database <https://flic.kr/p/r9qvLn>`__.
No known copyright restrictions, released into the public domain.
Astronaut image.


Generate synthetic binary image with several rounded blob-like objects.
Linear size of output image.
Typical linear size of blob, as a fraction of length, should be smaller than 1.
Number of dimensions of output image.
Fraction of image pixels covered by the blobs (where the output is 1). Should be in [0, 1].
Seed to initialize the random number generator. If None, a random seed from the operating system is used.
Output binary image


Subset of data from the University of North Carolina Volume Rendering Test Data Set.
The full dataset is available at [1].
The 3D volume consists of 10 layers from the larger volume.
https://graphics.stanford.edu/data/voldata/


Brick wall.
A small section of a brick wall.
The original image was downloaded from CC0Textures and licensed under the Creative Commons CC0 License.
A perspective transform was then applied to the image, prior to rotating it by 90 degrees, cropping and scaling it to obtain the final image.


Gray-level “camera” image.
Can be used for segmentation and denoising examples.
Camera image.
No copyright restrictions. CC0 by the photographer (Lav Varshney).
Changed in version 0.18: This image was replaced due to copyright restrictions. For more information, please see [1].
https://github.com/scikit-image/scikit-image/issues/3927


Chelsea the cat.
An example with texture, prominent edges in horizontal and diagonal directions, as well as features of differing scales.
Chelsea image.
No copyright restrictions. CC0 by the photographer (Stefan van der Walt).


Cell floating in saline.
This is a quantitative phase image retrieved from a digital hologram using the Python library qpformat. The image shows a cell with high phase value, above the background phase.
Because of a banding pattern artifact in the background, this image is a good test of thresholding algorithms. The pixel spacing is 0.107 µm.
These data were part of a comparison between several refractive index retrieval techniques for spherical objects as part of [1].
This image is CC0, dedicated to the public domain. You may copy, modify, or distribute it without asking permission.
Image of a cell.
Paul Müller, Mirjam Schürmann, Salvatore Girardo, Gheorghe Cojoc, and Jochen Guck. “Accurate evaluation of size and refractive index for spherical objects in quantitative phase imaging.” Optics Express 26(8): 10729-10743 (2018). DOI:10.1364/OE.26.010729


3D fluorescence microscopy image of cells.
The returned data is a 3D multichannel array with dimensions provided in (z, c, y, x) order. Each voxel has a size of (0.29 0.26 0.26) micrometer. Channel 0 contains cell membranes, channel 1 contains nuclei.
The volumetric images of cells taken with an optical microscope.
The data for this was provided by the Allen Institute for Cell Science.
It has been downsampled by a factor of 4 in the row and column dimensions to reduce computational time.
The microscope reports the following voxel spacing in microns:


Checkerboard image.
Checkerboards are often used in image calibration, since the corner-points are easy to locate. Because of the many parallel edges, they also visualise distortions particularly well.
Checkerboard image.


Motion blurred clock.
This photograph of a wall clock was taken while moving the camera in an aproximately horizontal direction. It may be used to illustrate inverse filters and deconvolution.
Released into the public domain by the photographer (Stefan van der Walt).
Clock image.


Coffee cup.
This photograph is courtesy of Pikolo Espresso Bar. It contains several elliptical shapes as well as varying texture (smooth porcelain to course wood grain).
Coffee image.
No copyright restrictions. CC0 by the photographer (Rachel Michetti).


Greek coins from Pompeii.
This image shows several coins outlined against a gray background. It is especially useful in, e.g. segmentation tests, where individual objects need to be identified against a background. The background shares enough grey levels with the coins that a simple segmentation is not sufficient.
Coins image.
This image was downloaded from the Brooklyn Museum Collection.
No known copyright restrictions.


Download all datasets for use with scikit-image offline.
Scikit-image datasets are no longer shipped with the library by default. This allows us to use higher quality datasets, while keeping the library download size small.
This function requires the installation of an optional dependency, pooch, to download the full dataset. Follow installation instruction found at
https://scikit-image.org/docs/stable/install.html
Call this function to download all sample images making them available offline on your machine.
The directory where the dataset should be stored.
If pooch is not install, this error will be raised.
scikit-image will only search for images stored in the default directory. Only specify the directory if you wish to download the images to your own folder for a particular reason. You can access the location of the default data directory by inspecting the variable skimage.data.data_dir.


A golden eagle.
Suitable for examples on segmentation, Hough transforms, and corner detection.
Eagle image.
No copyright restrictions. CC0 by the photographer (Dayane Machado).


Grass.
Some grass.
The original image was downloaded from DeviantArt and licensed underthe Creative Commons CC0 License.
The downloaded image was cropped to include a region of (512, 512) pixels around the top left corner, converted to grayscale, then to uint8 prior to saving the result in PNG format.


Gravel
Grayscale gravel sample.
The original image was downloaded from CC0Textures and licensed under the Creative Commons CC0 License.
The downloaded image was then rescaled to (1024, 1024), then the top left (512, 512) pixel region was cropped prior to converting the image to grayscale and uint8 data type. The result was saved using the PNG format.


Black and white silhouette of a horse.
This image was downloaded from openclipart
No copyright restrictions. CC0 given by owner (Andreas Preuss (marauder)).
Horse image.


Hubble eXtreme Deep Field.
This photograph contains the Hubble Telescope’s farthest ever view of the universe. It can be useful as an example for multi-scale detection.
Hubble deep field image.
This image was downloaded from HubbleSite.
The image was captured by NASA and may be freely used in the public domain.


Image of human cells undergoing mitosis.
Data of human cells undergoing mitosis taken during the preperation of the manuscript in [1].
Copyright David Root. Licensed under CC-0 [2].
Moffat J, Grueneberg DA, Yang X, Kim SY, Kloepfer AM, Hinkle G, Piqani B, Eisenhaure TM, Luo B, Grenier JK, Carpenter AE, Foo SY, Stewart SA, Stockwell BR, Hacohen N, Hahn WC, Lander ES, Sabatini DM, Root DE (2006) A lentiviral RNAi library for human and mouse genes applied to an arrayed viral high-content screen. Cell, 124(6):1283-98 / :DOI: 10.1016/j.cell.2006.01.040 PMID 16564017
GitHub licensing discussion https://github.com/CellProfiler/examples/issues/41


Immunohistochemical (IHC) staining with hematoxylin counterstaining.
This picture shows colonic glands where the IHC expression of FHL2 protein is revealed with DAB. Hematoxylin counterstaining is applied to enhance the negative parts of the tissue.
This image was acquired at the Center for Microscopy And Molecular Imaging (CMMI).
No known copyright restrictions.
Immunohistochemistry image.


Mouse kidney tissue.
This biological tissue on a pre-prepared slide was imaged with confocal fluorescence microscopy (Nikon C1 inverted microscope). Image shape is (16, 512, 512, 3). That is 512x512 pixels in X-Y, 16 image slices in Z, and 3 color channels (emission wavelengths 450nm, 515nm, and 605nm, respectively). Real-space voxel size is 1.24 microns in X-Y, and 1.25 microns in Z. Data type is unsigned 16-bit integers.
Kidney 3D multichannel image.
This image was acquired by Genevieve Buckley at Monasoh Micro Imaging in 2018. License: CC0


Return the path to the XML file containing the weak classifier cascade.
These classifiers were trained using LBP features. The file is part of the OpenCV repository [1].
OpenCV lbpcascade trained files https://github.com/opencv/opencv/tree/master/data/lbpcascades


Subset of data from the LFW dataset.
This database is a subset of the LFW database containing:
The full dataset is available at [2].
100 first images are faces and subsequent 100 are non-faces.
The faces were randomly selected from the LFW dataset and the non-faces were extracted from the background of the same dataset. The cropped ROIs have been resized to a 25 x 25 pixels.
Huang, G., Mattar, M., Lee, H., & Learned-Miller, E. G. (2012). Learning to align from scratch. In Advances in Neural Information Processing Systems (pp. 764-772).
http://vis-www.cs.umass.edu/lfw/


Lily of the valley plant stem.
This plant stem on a pre-prepared slide was imaged with confocal fluorescence microscopy (Nikon C1 inverted microscope). Image shape is (922, 922, 4). That is 922x922 pixels in X-Y, with 4 color channels. Real-space voxel size is 1.24 microns in X-Y. Data type is unsigned 16-bit integers.
Lily 2D multichannel image.
This image was acquired by Genevieve Buckley at Monasoh Micro Imaging in 2018. License: CC0


Scikit-image logo, a RGBA image.
Logo image.


Gray-level “microaneurysms” image.
Detail from an image of the retina (green channel). The image is a crop of image 07_dr.JPG from the High-Resolution Fundus (HRF) Image Database: https://www5.cs.fau.de/research/data/fundus-images/
Retina image with lesions.
No copyright restrictions. CC0 given by owner (Andreas Maier).
Budai, A., Bock, R, Maier, A., Hornegger, J., Michelson, G. (2013). Robust Vessel Segmentation in Fundus Images. International Journal of Biomedical Imaging, vol. 2013, 2013. DOI:10.1155/2013/154860


Surface of the moon.
This low-contrast image of the surface of the moon is useful for illustrating histogram equalization and contrast stretching.
Moon image.


Scanned page.
This image of printed text is useful for demonstrations requiring uneven background illumination.
Page image.


Human retina.
This image of a retina is useful for demonstrations requiring circular images.
Retina image in RGB.
This image was downloaded from wikimedia. This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
Häggström, Mikael (2014). “Medical gallery of Mikael Häggström 2014”. WikiJournal of Medicine 1 (2). DOI:10.15347/wjm/2014.008. ISSN 2002-4436. Public Domain


Launch photo of DSCOVR on Falcon 9 by SpaceX.
This is the launch photo of Falcon 9 carrying DSCOVR lifted off from SpaceX’s Launch Complex 40 at Cape Canaveral Air Force Station, FL.
Rocket image.
This image was downloaded from SpaceX Photos.
The image was captured by SpaceX and released in the public domain.


Shepp Logan Phantom.
Image of the Shepp-Logan phantom in grayscale.
L. A. Shepp and B. F. Logan, “The Fourier reconstruction of a head section,” in IEEE Transactions on Nuclear Science, vol. 21, no. 3, pp. 21-43, June 1974. DOI:10.1109/TNS.1974.6499235


Microscopy image of dermis and epidermis (skin layers).
Hematoxylin and eosin stained slide at 10x of normal epidermis and dermis with a benign intradermal nevus.
This image requires an Internet connection the first time it is called, and to have the pooch package installed, in order to fetch the image file from the scikit-image datasets repository.
The source of this image is https://en.wikipedia.org/wiki/File:Normal_Epidermis_and_Dermis_with_Intradermal_Nevus_10x.JPG
The image was released in the public domain by its author Kilbad.


Rectified stereo image pair with ground-truth disparities.
The two images are rectified such that every pixel in the left image has its corresponding pixel on the same scanline in the right image. That means that both images are warped such that they have the same orientation but a horizontal spatial offset (baseline). The ground-truth pixel offset in column direction is specified by the included disparity map.
The two images are part of the Middlebury 2014 stereo benchmark. The dataset was created by Nera Nesic, Porter Westling, Xi Wang, York Kitajima, Greg Krathwohl, and Daniel Scharstein at Middlebury College. A detailed description of the acquisition process can be found in [1].
The images included here are down-sampled versions of the default exposure images in the benchmark. The images are down-sampled by a factor of 4 using the function skimage.transform.downscale_local_mean. The calibration data in the following and the included ground-truth disparity map are valid for the down-sampled images:
Left stereo image.
Right stereo image.
Ground-truth disparity map, where each value describes the offset in column direction between corresponding pixels in the left and the right stereo images. E.g. the corresponding pixel of img_left[10, 10 + disp[10, 10]] is img_right[10, 10]. NaNs denote pixels in the left image that do not have ground-truth.
The original resolution images, images with different exposure and lighting, and ground-truth depth maps can be found at the Middlebury website [2].
D. Scharstein, H. Hirschmueller, Y. Kitajima, G. Krathwohl, N. Nesic, X. Wang, and P. Westling. High-resolution stereo datasets with subpixel-accurate ground truth. In German Conference on Pattern Recognition (GCPR 2014), Muenster, Germany, September 2014.
http://vision.middlebury.edu/stereo/data/scenes2014/


Gray-level “text” image used for corner detection.
Text image.
This image was downloaded from Wikipedia <https://en.wikipedia.org/wiki/File:Corner.png>`__.
No known copyright restrictions, released into the public domain.


skimage.draw.bezier_curve(r0, c0, r1, c1, …)
Generate Bezier curve coordinates.
skimage.draw.circle(r, c, radius[, shape])
Generate coordinates of pixels within circle.
skimage.draw.circle_perimeter(r, c, radius)
Generate circle perimeter coordinates.
skimage.draw.circle_perimeter_aa(r, c, radius)
Generate anti-aliased circle perimeter coordinates.
skimage.draw.disk(center, radius, *[, shape])
Generate coordinates of pixels within circle.
skimage.draw.ellipse(r, c, r_radius, c_radius)
Generate coordinates of pixels within ellipse.
skimage.draw.ellipse_perimeter(r, c, …[, …])
Generate ellipse perimeter coordinates.
skimage.draw.ellipsoid(a, b, c[, spacing, …])
Generates ellipsoid with semimajor axes aligned with grid dimensions on grid with specified spacing.
skimage.draw.ellipsoid_stats(a, b, c)
Calculates analytical surface area and volume for ellipsoid with semimajor axes aligned with grid dimensions of specified spacing.
skimage.draw.line(r0, c0, r1, c1)
Generate line pixel coordinates.
skimage.draw.line_aa(r0, c0, r1, c1)
Generate anti-aliased line pixel coordinates.
skimage.draw.line_nd(start, stop, *[, …])
Draw a single-pixel thick line in n dimensions.
skimage.draw.polygon(r, c[, shape])
Generate coordinates of pixels within polygon.
skimage.draw.polygon2mask(image_shape, polygon)
Compute a mask from polygon.
skimage.draw.polygon_perimeter(r, c[, …])
Generate polygon perimeter coordinates.
skimage.draw.random_shapes(image_shape, …)
Generate an image with random shapes, labeled with bounding boxes.
skimage.draw.rectangle(start[, end, extent, …])
Generate coordinates of pixels within a rectangle.
skimage.draw.rectangle_perimeter(start[, …])
Generate coordinates of pixels that are exactly around a rectangle.
skimage.draw.set_color(image, coords, color)
Set pixel color in the image at the given coordinates.
Generate Bezier curve coordinates.
Coordinates of the first control point.
Coordinates of the middle control point.
Coordinates of the last control point.
Middle control point weight, it describes the line tension.
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for curves that exceed the image size. If None, the full extent of the curve is used.
Indices of pixels that belong to the Bezier curve. May be used to directly index into an array, e.g. img[rr, cc] = 1.
The algorithm is the rational quadratic algorithm presented in reference [1].
A Rasterizing Algorithm for Drawing Curves, A. Zingl, 2012 http://members.chello.at/easyfilter/Bresenham.pdf
Generate coordinates of pixels within circle.
Center coordinate of disk.
Radius of disk.
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for disks that exceed the image size. If None, the full extent of the disk is used. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Pixel coordinates of disk. May be used to directly index into an array, e.g. img[rr, cc] = 1.
New in version 0.17: This function is deprecated and will be removed in scikit-image 0.19. Please use the function named disk instead.
Generate circle perimeter coordinates.
Centre coordinate of circle.
Radius of circle.
bresenham : Bresenham method (default) andres : Andres method
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for circles that exceed the image size. If None, the full extent of the circle is used. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Bresenham and Andres’ method: Indices of pixels that belong to the circle perimeter. May be used to directly index into an array, e.g. img[rr, cc] = 1.
Andres method presents the advantage that concentric circles create a disc whereas Bresenham can make holes. There is also less distortions when Andres circles are rotated. Bresenham method is also known as midpoint circle algorithm. Anti-aliased circle generator is available with circle_perimeter_aa.
J.E. Bresenham, “Algorithm for computer control of a digital plotter”, IBM Systems journal, 4 (1965) 25-30.
E. Andres, “Discrete circles, rings and spheres”, Computers & Graphics, 18 (1994) 695-706.
Generate anti-aliased circle perimeter coordinates.
Centre coordinate of circle.
Radius of circle.
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for circles that exceed the image size. If None, the full extent of the circle is used. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Indices of pixels (rr, cc) and intensity values (val). img[rr, cc] = val.
Wu’s method draws anti-aliased circle. This implementation doesn’t use lookup table optimization.
Use the function draw.set_color to apply circle_perimeter_aa results to color images.
X. Wu, “An efficient antialiasing technique”, In ACM SIGGRAPH Computer Graphics, 25 (1991) 143-152.
Generate coordinates of pixels within circle.
Center coordinate of disk.
Radius of disk.
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for disks that exceed the image size. If None, the full extent of the disk is used. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Pixel coordinates of disk. May be used to directly index into an array, e.g. img[rr, cc] = 1.
Generate coordinates of pixels within ellipse.
Centre coordinate of ellipse.
Minor and major semi-axes. (r/r_radius)**2 + (c/c_radius)**2 = 1.
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for ellipses which exceed the image size. By default the full extent of the ellipse are used. Must be at least length 2. Only the first two values are used to determine the extent.
Set the ellipse rotation (rotation) in range (-PI, PI) in contra clock wise direction, so PI/2 degree means swap ellipse axis
Pixel coordinates of ellipse. May be used to directly index into an array, e.g. img[rr, cc] = 1.
The ellipse equation:
Note that the positions of ellipse without specified shape can have also, negative values, as this is correct on the plane. On the other hand using these ellipse positions for an image afterwards may lead to appearing on the other side of image, because image[-1, -1] = image[end-1, end-1]
Masked Normalized Cross-Correlation
Measure region properties
Generate ellipse perimeter coordinates.
Centre coordinate of ellipse.
Minor and major semi-axes. (r/r_radius)**2 + (c/c_radius)**2 = 1.
Major axis orientation in clockwise direction as radians.
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for ellipses that exceed the image size. If None, the full extent of the ellipse is used. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Indices of pixels that belong to the ellipse perimeter. May be used to directly index into an array, e.g. img[rr, cc] = 1.
A Rasterizing Algorithm for Drawing Curves, A. Zingl, 2012 http://members.chello.at/easyfilter/Bresenham.pdf
Note that the positions of ellipse without specified shape can have also, negative values, as this is correct on the plane. On the other hand using these ellipse positions for an image afterwards may lead to appearing on the other side of image, because image[-1, -1] = image[end-1, end-1]
Generates ellipsoid with semimajor axes aligned with grid dimensions on grid with specified spacing.
Length of semimajor axis aligned with x-axis.
Length of semimajor axis aligned with y-axis.
Length of semimajor axis aligned with z-axis.
Spacing in (x, y, z) spatial dimensions.
If True, returns the level set for this ellipsoid (signed level set about zero, with positive denoting interior) as np.float64. False returns a binarized version of said level set.
Ellipsoid centered in a correctly sized array for given spacing. Boolean dtype unless levelset=True, in which case a float array is returned with the level set above 0.0 representing the ellipsoid.
Calculates analytical surface area and volume for ellipsoid with semimajor axes aligned with grid dimensions of specified spacing.
Length of semimajor axis aligned with x-axis.
Length of semimajor axis aligned with y-axis.
Length of semimajor axis aligned with z-axis.
Calculated volume of ellipsoid.
Calculated surface area of ellipsoid.
Generate line pixel coordinates.
Starting position (row, column).
End position (row, column).
Indices of pixels that belong to the line. May be used to directly index into an array, e.g. img[rr, cc] = 1.
Anti-aliased line generator is available with line_aa.
Generate anti-aliased line pixel coordinates.
Starting position (row, column).
End position (row, column).
Indices of pixels (rr, cc) and intensity values (val). img[rr, cc] = val.
A Rasterizing Algorithm for Drawing Curves, A. Zingl, 2012 http://members.chello.at/easyfilter/Bresenham.pdf
Draw a single-pixel thick line in n dimensions.
The line produced will be ndim-connected. That is, two subsequent pixels in the line will be either direct or diagonal neighbours in n dimensions.
The start coordinates of the line.
The end coordinates of the line.
Whether to include the endpoint in the returned line. Defaults to False, which allows for easy drawing of multi-point paths.
Whether to round the coordinates to integer. If True (default), the returned coordinates can be used to directly index into an array. False could be used for e.g. vector drawing.
The coordinates of points on the line.
Generate coordinates of pixels within polygon.
Row coordinates of vertices of polygon.
Column coordinates of vertices of polygon.
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for polygons that exceed the image size. If None, the full extent of the polygon is used. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Pixel coordinates of polygon. May be used to directly index into an array, e.g. img[rr, cc] = 1.
Compute a mask from polygon.
The shape of the mask.
The polygon coordinates of shape (N, 2) where N is the number of points.
The mask that corresponds to the input polygon.
This function does not do any border checking, so that all the vertices need to be within the given shape.
Generate polygon perimeter coordinates.
Row coordinates of vertices of polygon.
Column coordinates of vertices of polygon.
Image shape which is used to determine maximum extents of output pixel coordinates. This is useful for polygons that exceed the image size. If None, the full extents of the polygon is used. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Whether to clip the polygon to the provided shape. If this is set to True, the drawn figure will always be a closed polygon with all edges visible.
Pixel coordinates of polygon. May be used to directly index into an array, e.g. img[rr, cc] = 1.
Generate an image with random shapes, labeled with bounding boxes.
The image is populated with random shapes with random sizes, random locations, and random colors, with or without overlap.
Shapes have random (row, col) starting coordinates and random sizes bounded by min_size and max_size. It can occur that a randomly generated shape will not fit the image at all. In that case, the algorithm will try again with new starting coordinates a certain number of times. However, it also means that some shapes may be skipped altogether. In that case, this function will generate fewer shapes than requested.
The number of rows and columns of the image to generate.
The maximum number of shapes to (attempt to) fit into the shape.
The minimum number of shapes to (attempt to) fit into the shape.
The minimum dimension of each shape to fit into the image.
The maximum dimension of each shape to fit into the image.
If True, the generated image has num_channels color channels, otherwise generates grayscale image.
Number of channels in the generated image. If 1, generate monochrome images, else color images with multiple channels. Ignored if multichannel is set to False.
The name of the shape to generate or None to pick random ones.
The range of values to sample pixel values from. For grayscale images the format is (min, max). For multichannel - ((min, max),) if the ranges are equal across the channels, and ((min_0, max_0), … (min_N, max_N)) if they differ. As the function supports generation of uint8 arrays only, the maximum range is (0, 255). If None, set to (0, 254) for each channel reserving color of intensity = 255 for background.
If True, allow shapes to overlap.
How often to attempt to fit a shape into the image before skipping it.
Seed to initialize the random number generator. If None, a random seed from the operating system is used.
An image with the fitted shapes.
A list of labels, one per shape in the image. Each label is a (category, ((r0, r1), (c0, c1))) tuple specifying the category and bounding box coordinates of the shape.
Generate coordinates of pixels within a rectangle.
Origin point of the rectangle, e.g., ([plane,] row, column).
End point of the rectangle ([plane,] row, column). For a 2D matrix, the slice defined by the rectangle is [start:(end+1)]. Either end or extent must be specified.
The extent (size) of the drawn rectangle. E.g., ([num_planes,] num_rows, num_cols). Either end or extent must be specified. A negative extent is valid, and will result in a rectangle going along the opposite direction. If extent is negative, the start point is not included.
Image shape used to determine the maximum bounds of the output coordinates. This is useful for clipping rectangles that exceed the image size. By default, no clipping is done.
The coordinates of all pixels in the rectangle.
This function can be applied to N-dimensional images, by passing start and end or extent as tuples of length N.
Generate coordinates of pixels that are exactly around a rectangle.
Origin point of the inner rectangle, e.g., (row, column).
End point of the inner rectangle (row, column). For a 2D matrix, the slice defined by inner the rectangle is [start:(end+1)]. Either end or extent must be specified.
The extent (size) of the inner rectangle. E.g., (num_rows, num_cols). Either end or extent must be specified. Negative extents are permitted. See rectangle to better understand how they behave.
Image shape used to determine the maximum bounds of the output coordinates. This is useful for clipping perimeters that exceed the image size. By default, no clipping is done. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Whether to clip the perimeter to the provided shape. If this is set to True, the drawn figure will always be a closed polygon with all edges visible.
The coordinates of all pixels in the rectangle.
Set pixel color in the image at the given coordinates.
Note that this function modifies the color of the image in-place. Coordinates that exceed the shape of the image will be ignored.
Image
Row and column coordinates of pixels to be colored.
Color to be assigned to coordinates in the image.
Alpha values used to blend color with image. 0 is transparent, 1 is opaque.


Generate Bezier curve coordinates.
Coordinates of the first control point.
Coordinates of the middle control point.
Coordinates of the last control point.
Middle control point weight, it describes the line tension.
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for curves that exceed the image size. If None, the full extent of the curve is used.
Indices of pixels that belong to the Bezier curve. May be used to directly index into an array, e.g. img[rr, cc] = 1.
The algorithm is the rational quadratic algorithm presented in reference [1].
A Rasterizing Algorithm for Drawing Curves, A. Zingl, 2012 http://members.chello.at/easyfilter/Bresenham.pdf


Generate coordinates of pixels within circle.
Center coordinate of disk.
Radius of disk.
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for disks that exceed the image size. If None, the full extent of the disk is used. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Pixel coordinates of disk. May be used to directly index into an array, e.g. img[rr, cc] = 1.
New in version 0.17: This function is deprecated and will be removed in scikit-image 0.19. Please use the function named disk instead.


Generate circle perimeter coordinates.
Centre coordinate of circle.
Radius of circle.
bresenham : Bresenham method (default) andres : Andres method
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for circles that exceed the image size. If None, the full extent of the circle is used. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Bresenham and Andres’ method: Indices of pixels that belong to the circle perimeter. May be used to directly index into an array, e.g. img[rr, cc] = 1.
Andres method presents the advantage that concentric circles create a disc whereas Bresenham can make holes. There is also less distortions when Andres circles are rotated. Bresenham method is also known as midpoint circle algorithm. Anti-aliased circle generator is available with circle_perimeter_aa.
J.E. Bresenham, “Algorithm for computer control of a digital plotter”, IBM Systems journal, 4 (1965) 25-30.
E. Andres, “Discrete circles, rings and spheres”, Computers & Graphics, 18 (1994) 695-706.


Generate anti-aliased circle perimeter coordinates.
Centre coordinate of circle.
Radius of circle.
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for circles that exceed the image size. If None, the full extent of the circle is used. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Indices of pixels (rr, cc) and intensity values (val). img[rr, cc] = val.
Wu’s method draws anti-aliased circle. This implementation doesn’t use lookup table optimization.
Use the function draw.set_color to apply circle_perimeter_aa results to color images.
X. Wu, “An efficient antialiasing technique”, In ACM SIGGRAPH Computer Graphics, 25 (1991) 143-152.


Generate coordinates of pixels within circle.
Center coordinate of disk.
Radius of disk.
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for disks that exceed the image size. If None, the full extent of the disk is used. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Pixel coordinates of disk. May be used to directly index into an array, e.g. img[rr, cc] = 1.


Generate coordinates of pixels within ellipse.
Centre coordinate of ellipse.
Minor and major semi-axes. (r/r_radius)**2 + (c/c_radius)**2 = 1.
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for ellipses which exceed the image size. By default the full extent of the ellipse are used. Must be at least length 2. Only the first two values are used to determine the extent.
Set the ellipse rotation (rotation) in range (-PI, PI) in contra clock wise direction, so PI/2 degree means swap ellipse axis
Pixel coordinates of ellipse. May be used to directly index into an array, e.g. img[rr, cc] = 1.
The ellipse equation:
Note that the positions of ellipse without specified shape can have also, negative values, as this is correct on the plane. On the other hand using these ellipse positions for an image afterwards may lead to appearing on the other side of image, because image[-1, -1] = image[end-1, end-1]


Generate ellipse perimeter coordinates.
Centre coordinate of ellipse.
Minor and major semi-axes. (r/r_radius)**2 + (c/c_radius)**2 = 1.
Major axis orientation in clockwise direction as radians.
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for ellipses that exceed the image size. If None, the full extent of the ellipse is used. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Indices of pixels that belong to the ellipse perimeter. May be used to directly index into an array, e.g. img[rr, cc] = 1.
A Rasterizing Algorithm for Drawing Curves, A. Zingl, 2012 http://members.chello.at/easyfilter/Bresenham.pdf
Note that the positions of ellipse without specified shape can have also, negative values, as this is correct on the plane. On the other hand using these ellipse positions for an image afterwards may lead to appearing on the other side of image, because image[-1, -1] = image[end-1, end-1]


Generates ellipsoid with semimajor axes aligned with grid dimensions on grid with specified spacing.
Length of semimajor axis aligned with x-axis.
Length of semimajor axis aligned with y-axis.
Length of semimajor axis aligned with z-axis.
Spacing in (x, y, z) spatial dimensions.
If True, returns the level set for this ellipsoid (signed level set about zero, with positive denoting interior) as np.float64. False returns a binarized version of said level set.
Ellipsoid centered in a correctly sized array for given spacing. Boolean dtype unless levelset=True, in which case a float array is returned with the level set above 0.0 representing the ellipsoid.


Calculates analytical surface area and volume for ellipsoid with semimajor axes aligned with grid dimensions of specified spacing.
Length of semimajor axis aligned with x-axis.
Length of semimajor axis aligned with y-axis.
Length of semimajor axis aligned with z-axis.
Calculated volume of ellipsoid.
Calculated surface area of ellipsoid.


Generate line pixel coordinates.
Starting position (row, column).
End position (row, column).
Indices of pixels that belong to the line. May be used to directly index into an array, e.g. img[rr, cc] = 1.
Anti-aliased line generator is available with line_aa.


Generate anti-aliased line pixel coordinates.
Starting position (row, column).
End position (row, column).
Indices of pixels (rr, cc) and intensity values (val). img[rr, cc] = val.
A Rasterizing Algorithm for Drawing Curves, A. Zingl, 2012 http://members.chello.at/easyfilter/Bresenham.pdf


Draw a single-pixel thick line in n dimensions.
The line produced will be ndim-connected. That is, two subsequent pixels in the line will be either direct or diagonal neighbours in n dimensions.
The start coordinates of the line.
The end coordinates of the line.
Whether to include the endpoint in the returned line. Defaults to False, which allows for easy drawing of multi-point paths.
Whether to round the coordinates to integer. If True (default), the returned coordinates can be used to directly index into an array. False could be used for e.g. vector drawing.
The coordinates of points on the line.


Generate coordinates of pixels within polygon.
Row coordinates of vertices of polygon.
Column coordinates of vertices of polygon.
Image shape which is used to determine the maximum extent of output pixel coordinates. This is useful for polygons that exceed the image size. If None, the full extent of the polygon is used. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Pixel coordinates of polygon. May be used to directly index into an array, e.g. img[rr, cc] = 1.


Compute a mask from polygon.
The shape of the mask.
The polygon coordinates of shape (N, 2) where N is the number of points.
The mask that corresponds to the input polygon.
This function does not do any border checking, so that all the vertices need to be within the given shape.


Generate polygon perimeter coordinates.
Row coordinates of vertices of polygon.
Column coordinates of vertices of polygon.
Image shape which is used to determine maximum extents of output pixel coordinates. This is useful for polygons that exceed the image size. If None, the full extents of the polygon is used. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Whether to clip the polygon to the provided shape. If this is set to True, the drawn figure will always be a closed polygon with all edges visible.
Pixel coordinates of polygon. May be used to directly index into an array, e.g. img[rr, cc] = 1.


Generate an image with random shapes, labeled with bounding boxes.
The image is populated with random shapes with random sizes, random locations, and random colors, with or without overlap.
Shapes have random (row, col) starting coordinates and random sizes bounded by min_size and max_size. It can occur that a randomly generated shape will not fit the image at all. In that case, the algorithm will try again with new starting coordinates a certain number of times. However, it also means that some shapes may be skipped altogether. In that case, this function will generate fewer shapes than requested.
The number of rows and columns of the image to generate.
The maximum number of shapes to (attempt to) fit into the shape.
The minimum number of shapes to (attempt to) fit into the shape.
The minimum dimension of each shape to fit into the image.
The maximum dimension of each shape to fit into the image.
If True, the generated image has num_channels color channels, otherwise generates grayscale image.
Number of channels in the generated image. If 1, generate monochrome images, else color images with multiple channels. Ignored if multichannel is set to False.
The name of the shape to generate or None to pick random ones.
The range of values to sample pixel values from. For grayscale images the format is (min, max). For multichannel - ((min, max),) if the ranges are equal across the channels, and ((min_0, max_0), … (min_N, max_N)) if they differ. As the function supports generation of uint8 arrays only, the maximum range is (0, 255). If None, set to (0, 254) for each channel reserving color of intensity = 255 for background.
If True, allow shapes to overlap.
How often to attempt to fit a shape into the image before skipping it.
Seed to initialize the random number generator. If None, a random seed from the operating system is used.
An image with the fitted shapes.
A list of labels, one per shape in the image. Each label is a (category, ((r0, r1), (c0, c1))) tuple specifying the category and bounding box coordinates of the shape.


Generate coordinates of pixels within a rectangle.
Origin point of the rectangle, e.g., ([plane,] row, column).
End point of the rectangle ([plane,] row, column). For a 2D matrix, the slice defined by the rectangle is [start:(end+1)]. Either end or extent must be specified.
The extent (size) of the drawn rectangle. E.g., ([num_planes,] num_rows, num_cols). Either end or extent must be specified. A negative extent is valid, and will result in a rectangle going along the opposite direction. If extent is negative, the start point is not included.
Image shape used to determine the maximum bounds of the output coordinates. This is useful for clipping rectangles that exceed the image size. By default, no clipping is done.
The coordinates of all pixels in the rectangle.
This function can be applied to N-dimensional images, by passing start and end or extent as tuples of length N.


Generate coordinates of pixels that are exactly around a rectangle.
Origin point of the inner rectangle, e.g., (row, column).
End point of the inner rectangle (row, column). For a 2D matrix, the slice defined by inner the rectangle is [start:(end+1)]. Either end or extent must be specified.
The extent (size) of the inner rectangle. E.g., (num_rows, num_cols). Either end or extent must be specified. Negative extents are permitted. See rectangle to better understand how they behave.
Image shape used to determine the maximum bounds of the output coordinates. This is useful for clipping perimeters that exceed the image size. By default, no clipping is done. Must be at least length 2. Only the first two values are used to determine the extent of the input image.
Whether to clip the perimeter to the provided shape. If this is set to True, the drawn figure will always be a closed polygon with all edges visible.
The coordinates of all pixels in the rectangle.


Set pixel color in the image at the given coordinates.
Note that this function modifies the color of the image in-place. Coordinates that exceed the shape of the image will be ignored.
Image
Row and column coordinates of pixels to be colored.
Color to be assigned to coordinates in the image.
Alpha values used to blend color with image. 0 is transparent, 1 is opaque.


Return intensity limits, i.e. (min, max) tuple, of the image’s dtype.
Input image.
If True, clip the negative range (i.e. return 0 for min intensity) even if the image dtype allows negative values.
Lower and upper intensity limits.


skimage.exposure.adjust_gamma(image[, …])
Performs Gamma Correction on the input image.
skimage.exposure.adjust_log(image[, gain, inv])
Performs Logarithmic correction on the input image.
skimage.exposure.adjust_sigmoid(image[, …])
Performs Sigmoid Correction on the input image.
skimage.exposure.cumulative_distribution(image)
Return cumulative distribution function (cdf) for the given image.
skimage.exposure.equalize_adapthist(image[, …])
Contrast Limited Adaptive Histogram Equalization (CLAHE).
skimage.exposure.equalize_hist(image[, …])
Return image after histogram equalization.
skimage.exposure.histogram(image[, nbins, …])
Return histogram of image.
skimage.exposure.is_low_contrast(image[, …])
Determine if an image is low contrast.
skimage.exposure.match_histograms(image, …)
Adjust an image so that its cumulative histogram matches that of another.
skimage.exposure.rescale_intensity(image[, …])
Return image after stretching or shrinking its intensity levels.
Performs Gamma Correction on the input image.
Also known as Power Law Transform. This function transforms the input image pixelwise according to the equation O = I**gamma after scaling each pixel to the range 0 to 1.
Input image.
Non negative real number. Default value is 1.
The constant multiplier. Default value is 1.
Gamma corrected output image.
See also
For gamma greater than 1, the histogram will shift towards left and the output image will be darker than the input image.
For gamma less than 1, the histogram will shift towards right and the output image will be brighter than the input image.
https://en.wikipedia.org/wiki/Gamma_correction
Explore 3D images (of cells)
Performs Logarithmic correction on the input image.
This function transforms the input image pixelwise according to the equation O = gain*log(1 + I) after scaling each pixel to the range 0 to 1. For inverse logarithmic correction, the equation is O = gain*(2**I - 1).
Input image.
The constant multiplier. Default value is 1.
If True, it performs inverse logarithmic correction, else correction will be logarithmic. Defaults to False.
Logarithm corrected output image.
See also
http://www.ece.ucsb.edu/Faculty/Manjunath/courses/ece178W03/EnhancePart1.pdf
Performs Sigmoid Correction on the input image.
Also known as Contrast Adjustment. This function transforms the input image pixelwise according to the equation O = 1/(1 + exp*(gain*(cutoff - I))) after scaling each pixel to the range 0 to 1.
Input image.
Cutoff of the sigmoid function that shifts the characteristic curve in horizontal direction. Default value is 0.5.
The constant multiplier in exponential’s power of sigmoid function. Default value is 10.
If True, returns the negative sigmoid correction. Defaults to False.
Sigmoid corrected output image.
See also
Gustav J. Braun, “Image Lightness Rescaling Using Sigmoidal Contrast Enhancement Functions”, http://www.cis.rit.edu/fairchild/PDFs/PAP07.pdf
Return cumulative distribution function (cdf) for the given image.
Image array.
Number of bins for image histogram.
Values of cumulative distribution function.
Centers of bins.
See also
https://en.wikipedia.org/wiki/Cumulative_distribution_function
Local Histogram Equalization
Explore 3D images (of cells)
Contrast Limited Adaptive Histogram Equalization (CLAHE).
An algorithm for local contrast enhancement, that uses histograms computed over different tile regions of the image. Local details can therefore be enhanced even in regions that are darker or lighter than most of the image.
Input image.
Defines the shape of contextual regions used in the algorithm. If iterable is passed, it must have the same number of elements as image.ndim (without color channel). If integer, it is broadcasted to each image dimension. By default, kernel_size is 1/8 of image height by 1/8 of its width.
Clipping limit, normalized between 0 and 1 (higher values give more contrast).
Number of gray bins for histogram (“data range”).
Equalized image with float64 dtype.
See also
Changed in version 0.17: The values returned by this function are slightly shifted upwards because of an internal change in rounding behavior.
http://tog.acm.org/resources/GraphicsGems/
https://en.wikipedia.org/wiki/CLAHE#CLAHE
3D adaptive histogram equalization
Return image after histogram equalization.
Image array.
Number of bins for image histogram. Note: this argument is ignored for integer images, for which each integer is its own bin.
Array of same shape as image. Only points at which mask == True are used for the equalization, which is applied to the whole image.
Image array after histogram equalization.
This function is adapted from [1] with the author’s permission.
http://www.janeriksolem.net/histogram-equalization-with-python-and.html
https://en.wikipedia.org/wiki/Histogram_equalization
Local Histogram Equalization
3D adaptive histogram equalization
Explore 3D images (of cells)
Rank filters
Return histogram of image.
Unlike numpy.histogram, this function returns the centers of bins and does not rebin integer arrays. For integer arrays, each integer value has its own bin, which improves speed and intensity-resolution.
The histogram is computed on the flattened image: for color images, the function should be used separately on each channel to obtain a histogram for each color channel.
Input image.
Number of bins used to calculate histogram. This value is ignored for integer arrays.
‘image’ (default) determines the range from the input image. ‘dtype’ determines the range from the expected range of the images of that data type.
If True, normalize the histogram by the sum of its values.
The values of the histogram.
The values at the center of the bins.
See also
Rank filters
Determine if an image is low contrast.
The image under test.
The low contrast fraction threshold. An image is considered low- contrast when its range of brightness spans less than this fraction of its data type’s full range. [1]
Disregard values below this percentile when computing image contrast.
Disregard values above this percentile when computing image contrast.
The contrast determination method. Right now the only available option is “linear”.
True when the image is determined to be low contrast.
https://scikit-image.org/docs/dev/user_guide/data_types.html
Adjust an image so that its cumulative histogram matches that of another.
The adjustment is applied separately for each channel.
Input image. Can be gray-scale or in color.
Image to match histogram of. Must have the same number of channels as image.
Apply the matching separately for each channel.
Transformed input image.
Thrown when the number of channels in the input image and the reference differ.
http://paulbourke.net/miscellaneous/equalisation/
Return image after stretching or shrinking its intensity levels.
The desired intensity range of the input and output, in_range and out_range respectively, are used to stretch or shrink the intensity range of the input image. See examples below.
Image array.
Min and max intensity values of input and output image. The possible values for this parameter are enumerated below.
Use image min/max as the intensity range.
Use min/max of the image’s dtype as the intensity range.
Use intensity range based on desired dtype. Must be valid key in DTYPE_RANGE.
Use range_values as explicit min/max intensities.
Image array after rescaling its intensity. This image is the same dtype as the input image.
See also
Changed in version 0.17: The dtype of the output array has changed to match the output dtype, or float if the output range is specified by a pair of floats.
By default, the min/max intensities of the input image are stretched to the limits allowed by the image’s dtype, since in_range defaults to ‘image’ and out_range defaults to ‘dtype’:
It’s easy to accidentally convert an image dtype from uint8 to float:
Use rescale_intensity to rescale to the proper range for float dtypes:
To maintain the low contrast of the original, use the in_range parameter:
If the min/max value of in_range is more/less than the min/max image intensity, then the intensity levels are clipped:
If you have an image with signed integers but want to rescale the image to just the positive range, use the out_range parameter. In that case, the output dtype will be float:
To get the desired range with a specific dtype, use .astype():
If the input image is constant, the output will be clipped directly to the output range: >>> image = np.array([130, 130, 130], dtype=np.int32) >>> rescale_intensity(image, out_range=(0, 127)).astype(np.int32) array([127, 127, 127], dtype=int32)
Phase Unwrapping
Explore 3D images (of cells)
Rank filters


Performs Gamma Correction on the input image.
Also known as Power Law Transform. This function transforms the input image pixelwise according to the equation O = I**gamma after scaling each pixel to the range 0 to 1.
Input image.
Non negative real number. Default value is 1.
The constant multiplier. Default value is 1.
Gamma corrected output image.
See also
For gamma greater than 1, the histogram will shift towards left and the output image will be darker than the input image.
For gamma less than 1, the histogram will shift towards right and the output image will be brighter than the input image.
https://en.wikipedia.org/wiki/Gamma_correction


Performs Logarithmic correction on the input image.
This function transforms the input image pixelwise according to the equation O = gain*log(1 + I) after scaling each pixel to the range 0 to 1. For inverse logarithmic correction, the equation is O = gain*(2**I - 1).
Input image.
The constant multiplier. Default value is 1.
If True, it performs inverse logarithmic correction, else correction will be logarithmic. Defaults to False.
Logarithm corrected output image.
See also
http://www.ece.ucsb.edu/Faculty/Manjunath/courses/ece178W03/EnhancePart1.pdf


Performs Sigmoid Correction on the input image.
Also known as Contrast Adjustment. This function transforms the input image pixelwise according to the equation O = 1/(1 + exp*(gain*(cutoff - I))) after scaling each pixel to the range 0 to 1.
Input image.
Cutoff of the sigmoid function that shifts the characteristic curve in horizontal direction. Default value is 0.5.
The constant multiplier in exponential’s power of sigmoid function. Default value is 10.
If True, returns the negative sigmoid correction. Defaults to False.
Sigmoid corrected output image.
See also
Gustav J. Braun, “Image Lightness Rescaling Using Sigmoidal Contrast Enhancement Functions”, http://www.cis.rit.edu/fairchild/PDFs/PAP07.pdf


Return cumulative distribution function (cdf) for the given image.
Image array.
Number of bins for image histogram.
Values of cumulative distribution function.
Centers of bins.
See also
https://en.wikipedia.org/wiki/Cumulative_distribution_function


Contrast Limited Adaptive Histogram Equalization (CLAHE).
An algorithm for local contrast enhancement, that uses histograms computed over different tile regions of the image. Local details can therefore be enhanced even in regions that are darker or lighter than most of the image.
Input image.
Defines the shape of contextual regions used in the algorithm. If iterable is passed, it must have the same number of elements as image.ndim (without color channel). If integer, it is broadcasted to each image dimension. By default, kernel_size is 1/8 of image height by 1/8 of its width.
Clipping limit, normalized between 0 and 1 (higher values give more contrast).
Number of gray bins for histogram (“data range”).
Equalized image with float64 dtype.
See also
Changed in version 0.17: The values returned by this function are slightly shifted upwards because of an internal change in rounding behavior.
http://tog.acm.org/resources/GraphicsGems/
https://en.wikipedia.org/wiki/CLAHE#CLAHE


Return image after histogram equalization.
Image array.
Number of bins for image histogram. Note: this argument is ignored for integer images, for which each integer is its own bin.
Array of same shape as image. Only points at which mask == True are used for the equalization, which is applied to the whole image.
Image array after histogram equalization.
This function is adapted from [1] with the author’s permission.
http://www.janeriksolem.net/histogram-equalization-with-python-and.html
https://en.wikipedia.org/wiki/Histogram_equalization


Return histogram of image.
Unlike numpy.histogram, this function returns the centers of bins and does not rebin integer arrays. For integer arrays, each integer value has its own bin, which improves speed and intensity-resolution.
The histogram is computed on the flattened image: for color images, the function should be used separately on each channel to obtain a histogram for each color channel.
Input image.
Number of bins used to calculate histogram. This value is ignored for integer arrays.
‘image’ (default) determines the range from the input image. ‘dtype’ determines the range from the expected range of the images of that data type.
If True, normalize the histogram by the sum of its values.
The values of the histogram.
The values at the center of the bins.
See also


Determine if an image is low contrast.
The image under test.
The low contrast fraction threshold. An image is considered low- contrast when its range of brightness spans less than this fraction of its data type’s full range. [1]
Disregard values below this percentile when computing image contrast.
Disregard values above this percentile when computing image contrast.
The contrast determination method. Right now the only available option is “linear”.
True when the image is determined to be low contrast.
https://scikit-image.org/docs/dev/user_guide/data_types.html


Adjust an image so that its cumulative histogram matches that of another.
The adjustment is applied separately for each channel.
Input image. Can be gray-scale or in color.
Image to match histogram of. Must have the same number of channels as image.
Apply the matching separately for each channel.
Transformed input image.
Thrown when the number of channels in the input image and the reference differ.
http://paulbourke.net/miscellaneous/equalisation/


Return image after stretching or shrinking its intensity levels.
The desired intensity range of the input and output, in_range and out_range respectively, are used to stretch or shrink the intensity range of the input image. See examples below.
Image array.
Min and max intensity values of input and output image. The possible values for this parameter are enumerated below.
Use image min/max as the intensity range.
Use min/max of the image’s dtype as the intensity range.
Use intensity range based on desired dtype. Must be valid key in DTYPE_RANGE.
Use range_values as explicit min/max intensities.
Image array after rescaling its intensity. This image is the same dtype as the input image.
See also
Changed in version 0.17: The dtype of the output array has changed to match the output dtype, or float if the output range is specified by a pair of floats.
By default, the min/max intensities of the input image are stretched to the limits allowed by the image’s dtype, since in_range defaults to ‘image’ and out_range defaults to ‘dtype’:
It’s easy to accidentally convert an image dtype from uint8 to float:
Use rescale_intensity to rescale to the proper range for float dtypes:
To maintain the low contrast of the original, use the in_range parameter:
If the min/max value of in_range is more/less than the min/max image intensity, then the intensity levels are clipped:
If you have an image with signed integers but want to rescale the image to just the positive range, use the out_range parameter. In that case, the output dtype will be float:
To get the desired range with a specific dtype, use .astype():
If the input image is constant, the output will be clipped directly to the output range: >>> image = np.array([130, 130, 130], dtype=np.int32) >>> rescale_intensity(image, out_range=(0, 127)).astype(np.int32) array([127, 127, 127], dtype=int32)