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

gradient

gradient skimage.filters.rank.gradient(image, selem, out=None, mask=None, shift_x=False, shift_y=False) [source] Return local gradient of an image (i.e. local maximum - local minimum). 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 allocated. mask : ndarray Mask array that defines (>0) area of the image included in the local neighbor

Getting help on using skimage

Getting help on using skimage Besides the user guide, there exist other opportunities to get help on using skimage.

gaussian-filter

gaussian_filter skimage.filters.gaussian_filter(*args, **kwargs) [source] Deprecated function. Use skimage.filters.gaussian instead. Multi-dimensional Gaussian filter Parameters: image : array-like input image (grayscale or color) to filter. sigma : scalar or sequence of scalars standard deviation for Gaussian kernel. The standard deviations of the Gaussian filter are given for each axis as a sequence, or as a single number, in which case it is equal for all axes. output : array, option

geometric-mean

geometric_mean skimage.filters.rank.geometric_mean(image, selem, out=None, mask=None, shift_x=False, shift_y=False) [source] Return local geometric mean of an image. 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 allocated. mask : ndarray Mask array that defines (>0) area of the image included in the local neighborhood. If None, the

gaussian

gaussian skimage.filters.gaussian(image, sigma, output=None, mode='nearest', cval=0, multichannel=None) [source] Multi-dimensional Gaussian filter Parameters: image : array-like input image (grayscale or color) to filter. sigma : scalar or sequence of scalars standard deviation for Gaussian kernel. The standard deviations of the Gaussian filter are given for each axis as a sequence, or as a single number, in which case it is equal for all axes. output : array, optional The output param

gabor-kernel

gabor_kernel skimage.filters.gabor_kernel(frequency, theta=0, bandwidth=1, sigma_x=None, sigma_y=None, n_stds=3, offset=0) [source] Return complex 2D Gabor filter kernel. Gabor kernel is a Gaussian kernel modulated by a complex harmonic function. Harmonic function consists of an imaginary sine function and a real cosine function. Spatial frequency is inversely proportional to the wavelength of the harmonic and to the standard deviation of a Gaussian kernel. The bandwidth is also inversely pr

gabor-filter

gabor_filter skimage.filters.gabor_filter(*args, **kwargs) [source] Deprecated function. Use skimage.filters.gabor instead. Return real and imaginary responses to Gabor filter. The real and imaginary parts of the Gabor filter kernel are applied to the image and the response is returned as a pair of arrays. Gabor filter is a linear filter with a Gaussian kernel which is modulated by a sinusoidal plane wave. Frequency and orientation representations of the Gabor filter are similar to those of

gabor

gabor skimage.filters.gabor(image, frequency, theta=0, bandwidth=1, sigma_x=None, sigma_y=None, n_stds=3, offset=0, mode='reflect', cval=0) [source] Return real and imaginary responses to Gabor filter. The real and imaginary parts of the Gabor filter kernel are applied to the image and the response is returned as a pair of arrays. Gabor filter is a linear filter with a Gaussian kernel which is modulated by a sinusoidal plane wave. Frequency and orientation representations of the Gabor filter

find-contours

find_contours skimage.measure.find_contours(array, level, fully_connected='low', positive_orientation='low') [source] Find iso-valued contours in a 2D array for a given level value. Uses the “marching squares” method to compute a the iso-valued contours of the input 2D array for a particular level value. Array values are linearly interpolated to provide better precision for the output contours. Parameters: array : 2D ndarray of double Input data in which to find contours. level : float V