checkbox

CheckBox class skimage.viewer.widgets.CheckBox(name, value=False, alignment='center', ptype='kwarg', callback=None) [source] Bases: skimage.viewer.widgets.core.BaseWidget CheckBox widget Parameters: name : str Name of CheckBox parameter. If this parameter is passed as a keyword argument, it must match the name of that keyword argument (spaces are replaced with underscores). In addition, this name is displayed as the name of the CheckBox. value: {False, True}, optional Initial state of th

gray2rgb

gray2rgb skimage.color.gray2rgb(image, alpha=None) [source] Create an RGB representation of a gray-level image. Parameters: image : array_like Input image of shape (M, N [, P]). alpha : bool, optional Ensure that the output image has an alpha layer. If None, alpha layers are passed through but not created. Returns: rgb : ndarray RGB image of shape (M, N, [, P], 3). Raises: ValueError If the input is not a 2- or 3-dimensional image.

rectangletool

RectangleTool class skimage.viewer.canvastools.RectangleTool(manager, on_move=None, on_release=None, on_enter=None, maxdist=10, rect_props=None) [source] Bases: skimage.viewer.canvastools.base.CanvasToolBase, matplotlib.widgets.RectangleSelector Widget for selecting a rectangular region in a plot. After making the desired selection, press “Enter” to accept the selection and call the on_enter callback function. Parameters: manager : Viewer or PlotPlugin. Skimage viewer or plot plugin object

img-as-bool

img_as_bool skimage.util.img_as_bool(image, force_copy=False) [source] Convert an image to boolean format. Parameters: image : ndarray Input image. force_copy : bool Force a copy of the data, irrespective of its current dtype. Returns: out : ndarray of bool (bool_) Output image. Notes The upper half of the input dtype’s positive range is True, and the lower half is False. All negative values (if present) are False.

wiener

wiener skimage.filters.wiener(data, impulse_response=None, filter_params={}, K=0.25, predefined_filter=None) [source] Minimum Mean Square Error (Wiener) inverse filter. Parameters: data : (M,N) ndarray Input data. K : float or (M,N) ndarray Ratio between power spectrum of noise and undegraded image. impulse_response : callable f(r, c, **filter_params) Impulse response of the filter. See LPIFilter2D.__init__. filter_params : dict Additional keyword parameters to the impulse_response f

adjust-sigmoid

adjust_sigmoid skimage.exposure.adjust_sigmoid(image, cutoff=0.5, gain=10, inv=False) [source] 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. Parameters: image : ndarray Input image. cutoff : float Cutoff of the sigmoid function that shifts the characteristic curve in horizontal direction. Defaul

piecewiseaffinetransform

PiecewiseAffineTransform class skimage.transform.PiecewiseAffineTransform [source] Bases: skimage.transform._geometric.GeometricTransform 2D piecewise affine transformation. Control points are used to define the mapping. The transform is based on a Delaunay triangulation of the points to form a mesh. Each triangle is used to find a local affine transform. Attributes affines (list of AffineTransform objects) Affine transformations for each triangle in the mesh. inverse_affines (list of Affine

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

threshold-li

threshold_li skimage.filters.threshold_li(image) [source] Return threshold value based on adaptation of Li’s Minimum Cross Entropy method. Parameters: image : array Input image. Returns: threshold : float Upper threshold value. All pixels intensities more than this value are assumed to be foreground. References [R202] Li C.H. and Lee C.K. (1993) “Minimum Cross Entropy Thresholding” Pattern Recognition, 26(4): 617-625 [R203] Li C.H. and Tam P.K.S. (1998) “An Iterative Algorithm for Mi

adjust-gamma

adjust_gamma skimage.exposure.adjust_gamma(image, gamma=1, gain=1) [source] 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. Parameters: image : ndarray Input image. gamma : float Non negative real number. Default value is 1. gain : float The constant multiplier. Default value is 1. Returns: out : ndarray Gamma corre