Tutorials

Tutorials Image Segmentation How to parallelize loops

module-skimage.data

Module: data Standard test images. For more images, see http://sipi.usc.edu/database/database.php skimage.data.astronaut() Colour image of the astronaut Eileen Collins. skimage.data.binary_blobs([length, ...]) Generate synthetic binary image with several rounded blob-like objects. skimage.data.camera() Gray-level “camera” image. skimage.data.checkerboard() Checkerboard image. skimage.data.chelsea() Chelsea the cat. skimage.data.clock() Motion blurred clock. skimage.data.coffee() Coffee

square

square skimage.morphology.square(width, dtype=) [source] Generates a flat, square-shaped structuring element. Every pixel along the perimeter has a chessboard distance no greater than radius (radius=floor(width/2)) pixels. Parameters: width : int The width and height of the square. Returns: selem : ndarray A structuring element consisting only of ones, i.e. every pixel belongs to the neighborhood. Other Parameters: dtype : data-type The data type of the structuring element.

black-tophat

black_tophat skimage.morphology.black_tophat(image, selem=None, *args, **kwargs) [source] Return black top hat of an image. The black top hat of an image is defined as its morphological closing minus the original image. This operation returns the dark spots of the image that are smaller than the structuring element. Note that dark spots in the original image are bright spots after the black top hat. Parameters: image : ndarray Image array. selem : ndarray, optional The neighborhood expre

gradient-percentile

gradient_percentile skimage.filters.rank.gradient_percentile(image, selem, out=None, mask=None, shift_x=False, shift_y=False, p0=0, p1=1) [source] Return local gradient of an image (i.e. local maximum - local minimum). Only greyvalues between percentiles [p0, p1] are considered in the filter. Parameters: image : 2-D array (uint8, uint16) Input image. selem : 2-D array The neighborhood expressed as a 2-D array of 1’s and 0’s. out : 2-D array (same dtype as input) If None, a new array is

vprewitt

vprewitt skimage.filters.vprewitt(*args, **kwargs) [source] Deprecated function. Use skimage.filters.prewitt_v instead. 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 absolute Prewitt edge

star

star skimage.morphology.star(a, dtype=) [source] Generates a star shaped structuring element. Start has 8 vertices and is an overlap of square of size 2*a + 1 with its 45 degree rotated version. The slanted sides are 45 or 135 degrees to the horizontal axis. Parameters: a : int Parameter deciding the size of the star structural element. The side of the square array returned is 2*a + 1 + 2*floor(a / 2). Returns: selem : ndarray The structuring element where elements of the neighborhood

img-as-uint

img_as_uint skimage.util.img_as_uint(image, force_copy=False) [source] Convert an image to 16-bit unsigned integer format. Parameters: image : ndarray Input image. force_copy : bool Force a copy of the data, irrespective of its current dtype. Returns: out : ndarray of uint16 Output image. Notes Negative input values will be clipped. Positive values are scaled between 0 and 65535.

hessian-matrix

hessian_matrix skimage.feature.hessian_matrix(image, sigma=1, mode='constant', cval=0) [source] Compute Hessian matrix. The Hessian matrix is defined as: H = [Hxx Hxy] [Hxy Hyy] which is computed by convolving the image with the second derivatives of the Gaussian kernel in the respective x- and y-directions. Parameters: image : ndarray Input image. sigma : float Standard deviation used for the Gaussian kernel, which is used as weighting function for the auto-correlation matrix. mod

threshold-otsu

threshold_otsu skimage.filters.threshold_otsu(image, nbins=256) [source] Return threshold value based on Otsu’s method. Parameters: image : array Grayscale input image. nbins : int, optional Number of bins used to calculate histogram. This value is ignored for integer arrays. Returns: threshold : float Upper threshold value. All pixels intensities that less or equal of this value assumed as foreground. Notes The input image must be grayscale. References [R206] Wikipedia, http://en.