module-skimage.draw

Module: draw skimage.draw.bezier_curve Generate Bezier curve coordinates. skimage.draw.circle(r, c, radius[, shape]) Generate coordinates of pixels within circle. skimage.draw.circle_perimeter Generate circle perimeter coordinates. skimage.draw.circle_perimeter_aa Generate anti-aliased circle perimeter coordinates. skimage.draw.ellipse(r, c, yradius, xradius) Generate coordinates of pixels within ellipse. skimage.draw.ellipse_perimeter Generate ellipse perimeter coordinates. skimage.draw.ell

resize

resize skimage.transform.resize(image, output_shape, order=1, mode='constant', cval=0, clip=True, preserve_range=False) [source] Resize image to match a certain size. Performs interpolation to up-size or down-size images. For down-sampling N-dimensional images by applying the arithmetic sum or mean, see skimage.measure.local_sum and skimage.transform.downscale_local_mean, respectively. Parameters: image : ndarray Input image. output_shape : tuple or ndarray Size of the generated output i

join-segmentations

join_segmentations skimage.segmentation.join_segmentations(s1, s2) [source] Return the join of the two input segmentations. The join J of S1 and S2 is defined as the segmentation in which two voxels are in the same segment if and only if they are in the same segment in both S1 and S2. Parameters: s1, s2 : numpy arrays s1 and s2 are label fields of the same shape. Returns: j : numpy array The join segmentation of s1 and s2. Examples >>> from skimage.segmentation import join_s

prewitt-v

prewitt_v skimage.filters.prewitt_v(image, mask=None) [source] Find the vertical edges of an image using the Prewitt transform. Parameters: image : 2-D array Image to process. mask : 2-D array, optional An optional mask to limit the application to a certain area. Note that pixels surrounding masked regions are also masked to prevent masked regions from affecting the result. Returns: output : 2-D array The Prewitt edge map. Notes We use the following kernel: 1 0 -1 1 0 -1 1

immunohistochemistry

immunohistochemistry skimage.data.immunohistochemistry() [source] 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.

quickshift

quickshift skimage.segmentation.quickshift() Segments image using quickshift clustering in Color-(x,y) space. Produces an oversegmentation of the image using the quickshift mode-seeking algorithm. Parameters: image : (width, height, channels) ndarray Input image. ratio : float, optional, between 0 and 1 (default 1). Balances color-space proximity and image-space proximity. Higher values give more weight to color-space. kernel_size : float, optional (default 5) Width of Gaussian kernel

convex-hull-image

convex_hull_image skimage.morphology.convex_hull_image(image) [source] Compute the convex hull image of a binary image. The convex hull is the set of pixels included in the smallest convex polygon that surround all white pixels in the input image. Parameters: image : (M, N) array Binary input image. This array is cast to bool before processing. Returns: hull : (M, N) array of bool Binary image with pixels in convex hull set to True. References [R296] http://blogs.mathworks.com/steve/

Getting started

Getting started scikit-image is an image processing Python package that works with numpy arrays. The package is imported as skimage: >>> import skimage Most functions of skimage are found within submodules: >>> from skimage import data >>> camera = data.camera() A list of submodules and functions is found on the API reference webpage. Within scikit-image, images are represented as NumPy arrays, for example 2-D arrays for grayscale 2-D images >>> type(camera

I/O Plugin Infrastructure

I/O Plugin Infrastructure A plugin consists of two files, the source and the descriptor .ini. Let’s say we’d like to provide a plugin for imshow using matplotlib. We’ll call our plugin mpl: skimage/io/_plugins/mpl.py skimage/io/_plugins/mpl.ini The name of the .py and .ini files must correspond. Inside the .ini file, we give the plugin meta-data: [mpl] <-- name of the plugin, may be anything description = Matplotlib image I/O plugin provides = imshow <-- a comma-separated list, one or mo

Tutorials

Tutorials Image Segmentation How to parallelize loops