doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
skimage.measure.approximate_polygon(coords, tolerance) [source] Approximate a polygonal chain with the specified tolerance. It is based on the Douglas-Peucker algorithm. Note that the approximated polygon is always within the convex hull of the original polygon. Parameters coords(N, 2) array Coordinate array. ...
skimage.api.skimage.measure#skimage.measure.approximate_polygon
skimage.measure.block_reduce(image, block_size, func=<function sum>, cval=0, func_kwargs=None) [source] Downsample image by applying function func to local blocks. This function is useful for max and mean pooling, for example. Parameters imagendarray N-dimensional input image. block_sizearray_like Array con...
skimage.api.skimage.measure#skimage.measure.block_reduce
class skimage.measure.CircleModel [source] Bases: skimage.measure.fit.BaseModel Total least squares estimator for 2D circles. The functional model of the circle is: r**2 = (x - xc)**2 + (y - yc)**2 This estimator minimizes the squared distances from all points to the circle: min{ sum((r - sqrt((x_i - xc)**2 + (y_i -...
skimage.api.skimage.measure#skimage.measure.CircleModel
estimate(data) [source] Estimate circle model from data using total least squares. Parameters data(N, 2) array N points with (x, y) coordinates, respectively. Returns successbool True, if model estimation succeeds.
skimage.api.skimage.measure#skimage.measure.CircleModel.estimate
predict_xy(t, params=None) [source] Predict x- and y-coordinates using the estimated model. Parameters tarray Angles in circle in radians. Angles start to count from positive x-axis to positive y-axis in a right-handed system. params(3, ) array, optional Optional custom parameter set. Returns xy(…, 2)...
skimage.api.skimage.measure#skimage.measure.CircleModel.predict_xy
residuals(data) [source] Determine residuals of data to model. For each point the shortest distance to the circle is returned. Parameters data(N, 2) array N points with (x, y) coordinates, respectively. Returns residuals(N, ) array Residual for each data point.
skimage.api.skimage.measure#skimage.measure.CircleModel.residuals
__init__() [source] Initialize self. See help(type(self)) for accurate signature.
skimage.api.skimage.measure#skimage.measure.CircleModel.__init__
class skimage.measure.EllipseModel [source] Bases: skimage.measure.fit.BaseModel Total least squares estimator for 2D ellipses. The functional model of the ellipse is: xt = xc + a*cos(theta)*cos(t) - b*sin(theta)*sin(t) yt = yc + a*sin(theta)*cos(t) + b*cos(theta)*sin(t) d = sqrt((x - xt)**2 + (y - yt)**2) where (xt...
skimage.api.skimage.measure#skimage.measure.EllipseModel
estimate(data) [source] Estimate circle model from data using total least squares. Parameters data(N, 2) array N points with (x, y) coordinates, respectively. Returns successbool True, if model estimation succeeds. References 1 Halir, R.; Flusser, J. “Numerically stable direct least squares fitt...
skimage.api.skimage.measure#skimage.measure.EllipseModel.estimate
predict_xy(t, params=None) [source] Predict x- and y-coordinates using the estimated model. Parameters tarray Angles in circle in radians. Angles start to count from positive x-axis to positive y-axis in a right-handed system. params(5, ) array, optional Optional custom parameter set. Returns xy(…, 2)...
skimage.api.skimage.measure#skimage.measure.EllipseModel.predict_xy
residuals(data) [source] Determine residuals of data to model. For each point the shortest distance to the ellipse is returned. Parameters data(N, 2) array N points with (x, y) coordinates, respectively. Returns residuals(N, ) array Residual for each data point.
skimage.api.skimage.measure#skimage.measure.EllipseModel.residuals
__init__() [source] Initialize self. See help(type(self)) for accurate signature.
skimage.api.skimage.measure#skimage.measure.EllipseModel.__init__
skimage.measure.euler_number(image, connectivity=None) [source] Calculate the Euler characteristic in binary image. For 2D objects, the Euler number is the number of objects minus the number of holes. For 3D objects, the Euler number is obtained as the number of objects plus the number of holes, minus the number of t...
skimage.api.skimage.measure#skimage.measure.euler_number
skimage.measure.find_contours(image, level=None, fully_connected='low', positive_orientation='low', *, mask=None) [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 v...
skimage.api.skimage.measure#skimage.measure.find_contours
skimage.measure.grid_points_in_poly(shape, verts) [source] Test whether points on a specified grid are inside a polygon. For each (r, c) coordinate on a grid, i.e. (0, 0), (0, 1) etc., test whether that point lies inside a polygon. Parameters shapetuple (M, N) Shape of the grid. verts(V, 2) array Specify th...
skimage.api.skimage.measure#skimage.measure.grid_points_in_poly
skimage.measure.inertia_tensor(image, mu=None) [source] Compute the inertia tensor of the input image. Parameters imagearray The input image. muarray, optional The pre-computed central moments of image. The inertia tensor computation requires the central moments of the image. If an application requires both...
skimage.api.skimage.measure#skimage.measure.inertia_tensor
skimage.measure.inertia_tensor_eigvals(image, mu=None, T=None) [source] Compute the eigenvalues of the inertia tensor of the image. The inertia tensor measures covariance of the image intensity along the image axes. (See inertia_tensor.) The relative magnitude of the eigenvalues of the tensor is thus a measure of the...
skimage.api.skimage.measure#skimage.measure.inertia_tensor_eigvals
skimage.measure.label(input, background=None, return_num=False, connectivity=None) [source] Label connected regions of an integer array. Two pixels are connected when they are neighbors and have the same value. In 2D, they can be neighbors either in a 1- or 2-connected sense. The value refers to the maximum number of...
skimage.api.skimage.measure#skimage.measure.label
class skimage.measure.LineModelND [source] Bases: skimage.measure.fit.BaseModel Total least squares estimator for N-dimensional lines. In contrast to ordinary least squares line estimation, this estimator minimizes the orthogonal distances of points to the estimated line. Lines are defined by a point (origin) and a u...
skimage.api.skimage.measure#skimage.measure.LineModelND
estimate(data) [source] Estimate line model from data. This minimizes the sum of shortest (orthogonal) distances from the given data points to the estimated line. Parameters data(N, dim) array N points in a space of dimensionality dim >= 2. Returns successbool True, if model estimation succeeds.
skimage.api.skimage.measure#skimage.measure.LineModelND.estimate
predict(x, axis=0, params=None) [source] Predict intersection of the estimated line model with a hyperplane orthogonal to a given axis. Parameters x(n, 1) array Coordinates along an axis. axisint Axis orthogonal to the hyperplane intersecting the line. params(2, ) array, optional Optional custom paramet...
skimage.api.skimage.measure#skimage.measure.LineModelND.predict
predict_x(y, params=None) [source] Predict x-coordinates for 2D lines using the estimated model. Alias for: predict(y, axis=1)[:, 0] Parameters yarray y-coordinates. params(2, ) array, optional Optional custom parameter set in the form (origin, direction). Returns xarray Predicted x-coordinates.
skimage.api.skimage.measure#skimage.measure.LineModelND.predict_x
predict_y(x, params=None) [source] Predict y-coordinates for 2D lines using the estimated model. Alias for: predict(x, axis=0)[:, 1] Parameters xarray x-coordinates. params(2, ) array, optional Optional custom parameter set in the form (origin, direction). Returns yarray Predicted y-coordinates.
skimage.api.skimage.measure#skimage.measure.LineModelND.predict_y
residuals(data, params=None) [source] Determine residuals of data to model. For each point, the shortest (orthogonal) distance to the line is returned. It is obtained by projecting the data onto the line. Parameters data(N, dim) array N points in a space of dimension dim. params(2, ) array, optional Optiona...
skimage.api.skimage.measure#skimage.measure.LineModelND.residuals
__init__() [source] Initialize self. See help(type(self)) for accurate signature.
skimage.api.skimage.measure#skimage.measure.LineModelND.__init__
skimage.measure.marching_cubes(volume, level=None, *, spacing=(1.0, 1.0, 1.0), gradient_direction='descent', step_size=1, allow_degenerate=True, method='lewiner', mask=None) [source] Marching cubes algorithm to find surfaces in 3d volumetric data. In contrast with Lorensen et al. approach [2], Lewiner et al. algorith...
skimage.api.skimage.measure#skimage.measure.marching_cubes
skimage.measure.marching_cubes_classic(volume, level=None, spacing=(1.0, 1.0, 1.0), gradient_direction='descent') [source] Classic marching cubes algorithm to find surfaces in 3d volumetric data. Note that the marching_cubes() algorithm is recommended over this algorithm, because it’s faster and produces better resul...
skimage.api.skimage.measure#skimage.measure.marching_cubes_classic
skimage.measure.marching_cubes_lewiner(volume, level=None, spacing=(1.0, 1.0, 1.0), gradient_direction='descent', step_size=1, allow_degenerate=True, use_classic=False, mask=None) [source] Lewiner marching cubes algorithm to find surfaces in 3d volumetric data. In contrast to marching_cubes_classic(), this algorithm ...
skimage.api.skimage.measure#skimage.measure.marching_cubes_lewiner
skimage.measure.mesh_surface_area(verts, faces) [source] Compute surface area, given vertices & triangular faces Parameters verts(V, 3) array of floats Array containing (x, y, z) coordinates for V unique mesh vertices. faces(F, 3) array of ints List of length-3 lists of integers, referencing vertex coordina...
skimage.api.skimage.measure#skimage.measure.mesh_surface_area
skimage.measure.moments(image, order=3) [source] Calculate all raw image moments up to a certain order. The following properties can be calculated from raw image moments: Area as: M[0, 0]. Centroid as: {M[1, 0] / M[0, 0], M[0, 1] / M[0, 0]}. Note that raw moments are neither translation, scale nor rotation inva...
skimage.api.skimage.measure#skimage.measure.moments
skimage.measure.moments_central(image, center=None, order=3, **kwargs) [source] Calculate all central image moments up to a certain order. The center coordinates (cr, cc) can be calculated from the raw moments as: {M[1, 0] / M[0, 0], M[0, 1] / M[0, 0]}. Note that central moments are translation invariant but not scal...
skimage.api.skimage.measure#skimage.measure.moments_central
skimage.measure.moments_coords(coords, order=3) [source] Calculate all raw image moments up to a certain order. The following properties can be calculated from raw image moments: Area as: M[0, 0]. Centroid as: {M[1, 0] / M[0, 0], M[0, 1] / M[0, 0]}. Note that raw moments are neither translation, scale nor rotat...
skimage.api.skimage.measure#skimage.measure.moments_coords
skimage.measure.moments_coords_central(coords, center=None, order=3) [source] Calculate all central image moments up to a certain order. The following properties can be calculated from raw image moments: Area as: M[0, 0]. Centroid as: {M[1, 0] / M[0, 0], M[0, 1] / M[0, 0]}. Note that raw moments are neither tra...
skimage.api.skimage.measure#skimage.measure.moments_coords_central
skimage.measure.moments_hu(nu) [source] Calculate Hu’s set of image moments (2D-only). Note that this set of moments is proofed to be translation, scale and rotation invariant. Parameters nu(M, M) array Normalized central image moments, where M must be >= 4. Returns nu(7,) array Hu’s set of image moment...
skimage.api.skimage.measure#skimage.measure.moments_hu
skimage.measure.moments_normalized(mu, order=3) [source] Calculate all normalized central image moments up to a certain order. Note that normalized central moments are translation and scale invariant but not rotation invariant. Parameters mu(M,[ …,] M) array Central image moments, where M must be greater than o...
skimage.api.skimage.measure#skimage.measure.moments_normalized
skimage.measure.perimeter(image, neighbourhood=4) [source] Calculate total perimeter of all objects in binary image. Parameters image(N, M) ndarray 2D binary image. neighbourhood4 or 8, optional Neighborhood connectivity for border pixel determination. It is used to compute the contour. A higher neighbourho...
skimage.api.skimage.measure#skimage.measure.perimeter
skimage.measure.perimeter_crofton(image, directions=4) [source] Calculate total Crofton perimeter of all objects in binary image. Parameters image(N, M) ndarray 2D image. If image is not binary, all values strictly greater than zero are considered as the object. directions2 or 4, optional Number of directio...
skimage.api.skimage.measure#skimage.measure.perimeter_crofton
skimage.measure.points_in_poly(points, verts) [source] Test whether points lie inside a polygon. Parameters points(N, 2) array Input points, (x, y). verts(M, 2) array Vertices of the polygon, sorted either clockwise or anti-clockwise. The first point may (but does not need to be) duplicated. Returns m...
skimage.api.skimage.measure#skimage.measure.points_in_poly
skimage.measure.profile_line(image, src, dst, linewidth=1, order=None, mode=None, cval=0.0, *, reduce_func=<function mean>) [source] Return the intensity profile of an image measured along a scan line. Parameters imagendarray, shape (M, N[, C]) The image, either grayscale (2D array) or multichannel (3D array, w...
skimage.api.skimage.measure#skimage.measure.profile_line
skimage.measure.ransac(data, model_class, min_samples, residual_threshold, is_data_valid=None, is_model_valid=None, max_trials=100, stop_sample_num=inf, stop_residuals_sum=0, stop_probability=1, random_state=None, initial_inliers=None) [source] Fit a model to data with the RANSAC (random sample consensus) algorithm. ...
skimage.api.skimage.measure#skimage.measure.ransac
skimage.measure.regionprops(label_image, intensity_image=None, cache=True, coordinates=None, *, extra_properties=None) [source] Measure properties of labeled image regions. Parameters label_image(M, N[, P]) ndarray Labeled input image. Labels with value 0 are ignored. Changed in version 0.14.1: Previously, lab...
skimage.api.skimage.measure#skimage.measure.regionprops
skimage.measure.regionprops_table(label_image, intensity_image=None, properties=('label', 'bbox'), *, cache=True, separator='-', extra_properties=None) [source] Compute image properties and return them as a pandas-compatible table. The table is a dictionary mapping column names to value arrays. See Notes section belo...
skimage.api.skimage.measure#skimage.measure.regionprops_table
skimage.measure.shannon_entropy(image, base=2) [source] Calculate the Shannon entropy of an image. The Shannon entropy is defined as S = -sum(pk * log(pk)), where pk are frequency/probability of pixels of value k. Parameters image(N, M) ndarray Grayscale input image. basefloat, optional The logarithmic base...
skimage.api.skimage.measure#skimage.measure.shannon_entropy
skimage.measure.subdivide_polygon(coords, degree=2, preserve_ends=False) [source] Subdivision of polygonal curves using B-Splines. Note that the resulting curve is always within the convex hull of the original polygon. Circular polygons stay closed after subdivision. Parameters coords(N, 2) array Coordinate arr...
skimage.api.skimage.measure#skimage.measure.subdivide_polygon
Module: metrics skimage.metrics.adapted_rand_error([…]) Compute Adapted Rand error as defined by the SNEMI3D contest. skimage.metrics.contingency_table(im_true, …) Return the contingency table for all regions in matched segmentations. skimage.metrics.hausdorff_distance(image0, …) Calculate the Hausdorff distance ...
skimage.api.skimage.metrics
skimage.metrics.adapted_rand_error(image_true=None, image_test=None, *, table=None, ignore_labels=(0, )) [source] Compute Adapted Rand error as defined by the SNEMI3D contest. [1] Parameters image_truendarray of int Ground-truth label image, same shape as im_test. image_testndarray of int Test image. tabl...
skimage.api.skimage.metrics#skimage.metrics.adapted_rand_error
skimage.metrics.contingency_table(im_true, im_test, *, ignore_labels=None, normalize=False) [source] Return the contingency table for all regions in matched segmentations. Parameters im_truendarray of int Ground-truth label image, same shape as im_test. im_testndarray of int Test image. ignore_labelsseque...
skimage.api.skimage.metrics#skimage.metrics.contingency_table
skimage.metrics.hausdorff_distance(image0, image1) [source] Calculate the Hausdorff distance between nonzero elements of given images. The Hausdorff distance [1] is the maximum distance between any point on image0 and its nearest point on image1, and vice-versa. Parameters image0, image1ndarray Arrays where Tru...
skimage.api.skimage.metrics#skimage.metrics.hausdorff_distance
skimage.metrics.mean_squared_error(image0, image1) [source] Compute the mean-squared error between two images. Parameters image0, image1ndarray Images. Any dimensionality, must have same shape. Returns msefloat The mean-squared error (MSE) metric. Notes Changed in version 0.16: This function was re...
skimage.api.skimage.metrics#skimage.metrics.mean_squared_error
skimage.metrics.normalized_root_mse(image_true, image_test, *, normalization='euclidean') [source] Compute the normalized root mean-squared error (NRMSE) between two images. Parameters image_truendarray Ground-truth image, same shape as im_test. image_testndarray Test image. normalization{‘euclidean’, ‘mi...
skimage.api.skimage.metrics#skimage.metrics.normalized_root_mse
skimage.metrics.peak_signal_noise_ratio(image_true, image_test, *, data_range=None) [source] Compute the peak signal to noise ratio (PSNR) for an image. Parameters image_truendarray Ground-truth image, same shape as im_test. image_testndarray Test image. data_rangeint, optional The data range of the inp...
skimage.api.skimage.metrics#skimage.metrics.peak_signal_noise_ratio
skimage.metrics.structural_similarity(im1, im2, *, win_size=None, gradient=False, data_range=None, multichannel=False, gaussian_weights=False, full=False, **kwargs) [source] Compute the mean structural similarity index between two images. Parameters im1, im2ndarray Images. Any dimensionality with same shape. ...
skimage.api.skimage.metrics#skimage.metrics.structural_similarity
skimage.metrics.variation_of_information(image0=None, image1=None, *, table=None, ignore_labels=()) [source] Return symmetric conditional entropies associated with the VI. [1] The variation of information is defined as VI(X,Y) = H(X|Y) + H(Y|X). If X is the ground-truth segmentation, then H(X|Y) can be interpreted as...
skimage.api.skimage.metrics#skimage.metrics.variation_of_information
Module: morphology skimage.morphology.area_closing(image[, …]) Perform an area closing of the image. skimage.morphology.area_opening(image[, …]) Perform an area opening of the image. skimage.morphology.ball(radius[, dtype]) Generates a ball-shaped structuring element. skimage.morphology.binary_closing(image[, …...
skimage.api.skimage.morphology
skimage.morphology.area_closing(image, area_threshold=64, connectivity=1, parent=None, tree_traverser=None) [source] Perform an area closing of the image. Area closing removes all dark structures of an image with a surface smaller than area_threshold. The output image is larger than or equal to the input image for ev...
skimage.api.skimage.morphology#skimage.morphology.area_closing
skimage.morphology.area_opening(image, area_threshold=64, connectivity=1, parent=None, tree_traverser=None) [source] Perform an area opening of the image. Area opening removes all bright structures of an image with a surface smaller than area_threshold. The output image is thus the largest image smaller than the inpu...
skimage.api.skimage.morphology#skimage.morphology.area_opening
skimage.morphology.ball(radius, dtype=<class 'numpy.uint8'>) [source] Generates a ball-shaped structuring element. This is the 3D equivalent of a disk. A pixel is within the neighborhood if the Euclidean distance between it and the origin is no greater than radius. Parameters radiusint The radius of the ball-sh...
skimage.api.skimage.morphology#skimage.morphology.ball
skimage.morphology.binary_closing(image, selem=None, out=None) [source] Return fast binary morphological closing of an image. This function returns the same result as greyscale closing but performs faster for binary images. The morphological closing on an image is defined as a dilation followed by an erosion. Closing...
skimage.api.skimage.morphology#skimage.morphology.binary_closing
skimage.morphology.binary_dilation(image, selem=None, out=None) [source] Return fast binary morphological dilation of an image. This function returns the same result as greyscale dilation but performs faster for binary images. Morphological dilation sets a pixel at (i,j) to the maximum over all pixels in the neighbor...
skimage.api.skimage.morphology#skimage.morphology.binary_dilation
skimage.morphology.binary_erosion(image, selem=None, out=None) [source] Return fast binary morphological erosion of an image. This function returns the same result as greyscale erosion but performs faster for binary images. Morphological erosion sets a pixel at (i,j) to the minimum over all pixels in the neighborhood...
skimage.api.skimage.morphology#skimage.morphology.binary_erosion
skimage.morphology.binary_opening(image, selem=None, out=None) [source] Return fast binary morphological opening of an image. This function returns the same result as greyscale opening but performs faster for binary images. The morphological opening on an image is defined as an erosion followed by a dilation. Opening...
skimage.api.skimage.morphology#skimage.morphology.binary_opening
skimage.morphology.black_tophat(image, selem=None, out=None) [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...
skimage.api.skimage.morphology#skimage.morphology.black_tophat
skimage.morphology.closing(image, selem=None, out=None) [source] Return greyscale morphological closing of an image. The morphological closing on an image is defined as a dilation followed by an erosion. Closing can remove small dark spots (i.e. “pepper”) and connect small bright cracks. This tends to “close” up (dar...
skimage.api.skimage.morphology#skimage.morphology.closing
skimage.morphology.convex_hull_image(image, offset_coordinates=True, tolerance=1e-10) [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 imagearray Binary input image...
skimage.api.skimage.morphology#skimage.morphology.convex_hull_image
skimage.morphology.convex_hull_object(image, *, connectivity=2) [source] Compute the convex hull image of individual objects in 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) ndarray Binary in...
skimage.api.skimage.morphology#skimage.morphology.convex_hull_object
skimage.morphology.cube(width, dtype=<class 'numpy.uint8'>) [source] Generates a cube-shaped structuring element. This is the 3D equivalent of a square. Every pixel along the perimeter has a chessboard distance no greater than radius (radius=floor(width/2)) pixels. Parameters widthint The width, height and dept...
skimage.api.skimage.morphology#skimage.morphology.cube
skimage.morphology.diameter_closing(image, diameter_threshold=8, connectivity=1, parent=None, tree_traverser=None) [source] Perform a diameter closing of the image. Diameter closing removes all dark structures of an image with maximal extension smaller than diameter_threshold. The maximal extension is defined as the ...
skimage.api.skimage.morphology#skimage.morphology.diameter_closing
skimage.morphology.diameter_opening(image, diameter_threshold=8, connectivity=1, parent=None, tree_traverser=None) [source] Perform a diameter opening of the image. Diameter opening removes all bright structures of an image with maximal extension smaller than diameter_threshold. The maximal extension is defined as th...
skimage.api.skimage.morphology#skimage.morphology.diameter_opening
skimage.morphology.diamond(radius, dtype=<class 'numpy.uint8'>) [source] Generates a flat, diamond-shaped structuring element. A pixel is part of the neighborhood (i.e. labeled 1) if the city block/Manhattan distance between it and the center of the neighborhood is no greater than radius. Parameters radiusint T...
skimage.api.skimage.morphology#skimage.morphology.diamond
skimage.morphology.dilation(image, selem=None, out=None, shift_x=False, shift_y=False) [source] Return greyscale morphological dilation of an image. Morphological dilation sets a pixel at (i,j) to the maximum over all pixels in the neighborhood centered at (i,j). Dilation enlarges bright regions and shrinks dark regi...
skimage.api.skimage.morphology#skimage.morphology.dilation
skimage.morphology.disk(radius, dtype=<class 'numpy.uint8'>) [source] Generates a flat, disk-shaped structuring element. A pixel is within the neighborhood if the Euclidean distance between it and the origin is no greater than radius. Parameters radiusint The radius of the disk-shaped structuring element. Re...
skimage.api.skimage.morphology#skimage.morphology.disk
skimage.morphology.erosion(image, selem=None, out=None, shift_x=False, shift_y=False) [source] Return greyscale morphological erosion of an image. Morphological erosion sets a pixel at (i,j) to the minimum over all pixels in the neighborhood centered at (i,j). Erosion shrinks bright regions and enlarges dark regions....
skimage.api.skimage.morphology#skimage.morphology.erosion
skimage.morphology.flood(image, seed_point, *, selem=None, connectivity=None, tolerance=None) [source] Mask corresponding to a flood fill. Starting at a specific seed_point, connected points equal or within tolerance of the seed value are found. Parameters imagendarray An n-dimensional array. seed_pointtuple ...
skimage.api.skimage.morphology#skimage.morphology.flood
skimage.morphology.flood_fill(image, seed_point, new_value, *, selem=None, connectivity=None, tolerance=None, in_place=False, inplace=None) [source] Perform flood filling on an image. Starting at a specific seed_point, connected points equal or within tolerance of the seed value are found, then set to new_value. Par...
skimage.api.skimage.morphology#skimage.morphology.flood_fill
skimage.morphology.h_maxima(image, h, selem=None) [source] Determine all maxima of the image with height >= h. The local maxima are defined as connected sets of pixels with equal grey level strictly greater than the grey level of all pixels in direct neighborhood of the set. A local maximum M of height h is a local m...
skimage.api.skimage.morphology#skimage.morphology.h_maxima
skimage.morphology.h_minima(image, h, selem=None) [source] Determine all minima of the image with depth >= h. The local minima are defined as connected sets of pixels with equal grey level strictly smaller than the grey levels of all pixels in direct neighborhood of the set. A local minimum M of depth h is a local mi...
skimage.api.skimage.morphology#skimage.morphology.h_minima
skimage.morphology.label(input, background=None, return_num=False, connectivity=None) [source] Label connected regions of an integer array. Two pixels are connected when they are neighbors and have the same value. In 2D, they can be neighbors either in a 1- or 2-connected sense. The value refers to the maximum number...
skimage.api.skimage.morphology#skimage.morphology.label
skimage.morphology.local_maxima(image, selem=None, connectivity=None, indices=False, allow_borders=True) [source] Find local maxima of n-dimensional array. The local maxima are defined as connected sets of pixels with equal gray level (plateaus) strictly greater than the gray levels of all pixels in the neighborhood....
skimage.api.skimage.morphology#skimage.morphology.local_maxima
skimage.morphology.local_minima(image, selem=None, connectivity=None, indices=False, allow_borders=True) [source] Find local minima of n-dimensional array. The local minima are defined as connected sets of pixels with equal gray level (plateaus) strictly smaller than the gray levels of all pixels in the neighborhood....
skimage.api.skimage.morphology#skimage.morphology.local_minima
skimage.morphology.max_tree(image, connectivity=1) [source] Build the max tree from an image. Component trees represent the hierarchical structure of the connected components resulting from sequential thresholding operations applied to an image. A connected component at one level is parent of a component at a higher ...
skimage.api.skimage.morphology#skimage.morphology.max_tree
skimage.morphology.max_tree_local_maxima(image, connectivity=1, parent=None, tree_traverser=None) [source] Determine all local maxima of the image. The local maxima are defined as connected sets of pixels with equal gray level strictly greater than the gray levels of all pixels in direct neighborhood of the set. The ...
skimage.api.skimage.morphology#skimage.morphology.max_tree_local_maxima
skimage.morphology.medial_axis(image, mask=None, return_distance=False) [source] Compute the medial axis transform of a binary image Parameters imagebinary ndarray, shape (M, N) The image of the shape to be skeletonized. maskbinary ndarray, shape (M, N), optional If a mask is given, only those elements in i...
skimage.api.skimage.morphology#skimage.morphology.medial_axis
skimage.morphology.octagon(m, n, dtype=<class 'numpy.uint8'>) [source] Generates an octagon shaped structuring element. For a given size of (m) horizontal and vertical sides and a given (n) height or width of slanted sides octagon is generated. The slanted sides are 45 or 135 degrees to the horizontal axis and hence ...
skimage.api.skimage.morphology#skimage.morphology.octagon
skimage.morphology.octahedron(radius, dtype=<class 'numpy.uint8'>) [source] Generates a octahedron-shaped structuring element. This is the 3D equivalent of a diamond. A pixel is part of the neighborhood (i.e. labeled 1) if the city block/Manhattan distance between it and the center of the neighborhood is no greater t...
skimage.api.skimage.morphology#skimage.morphology.octahedron
skimage.morphology.opening(image, selem=None, out=None) [source] Return greyscale morphological opening of an image. The morphological opening on an image is defined as an erosion followed by a dilation. Opening can remove small bright spots (i.e. “salt”) and connect small dark cracks. This tends to “open” up (dark) ...
skimage.api.skimage.morphology#skimage.morphology.opening
skimage.morphology.reconstruction(seed, mask, method='dilation', selem=None, offset=None) [source] Perform a morphological reconstruction of an image. Morphological reconstruction by dilation is similar to basic morphological dilation: high-intensity values will replace nearby low-intensity values. The basic dilation...
skimage.api.skimage.morphology#skimage.morphology.reconstruction
skimage.morphology.rectangle(nrows, ncols, dtype=<class 'numpy.uint8'>) [source] Generates a flat, rectangular-shaped structuring element. Every pixel in the rectangle generated for a given width and given height belongs to the neighborhood. Parameters nrowsint The number of rows of the rectangle. ncolsint ...
skimage.api.skimage.morphology#skimage.morphology.rectangle
skimage.morphology.remove_small_holes(ar, area_threshold=64, connectivity=1, in_place=False) [source] Remove contiguous holes smaller than the specified size. Parameters arndarray (arbitrary shape, int or bool type) The array containing the connected components of interest. area_thresholdint, optional (defaul...
skimage.api.skimage.morphology#skimage.morphology.remove_small_holes
skimage.morphology.remove_small_objects(ar, min_size=64, connectivity=1, in_place=False) [source] Remove objects smaller than the specified size. Expects ar to be an array with labeled objects, and removes objects smaller than min_size. If ar is bool, the image is first labeled. This leads to potentially different be...
skimage.api.skimage.morphology#skimage.morphology.remove_small_objects
skimage.morphology.skeletonize(image, *, method=None) [source] Compute the skeleton of a binary image. Thinning is used to reduce each connected component in a binary image to a single-pixel wide skeleton. Parameters imagendarray, 2D or 3D A binary image containing the objects to be skeletonized. Zeros represen...
skimage.api.skimage.morphology#skimage.morphology.skeletonize
skimage.morphology.skeletonize_3d(image) [source] Compute the skeleton of a binary image. Thinning is used to reduce each connected component in a binary image to a single-pixel wide skeleton. Parameters imagendarray, 2D or 3D A binary image containing the objects to be skeletonized. Zeros represent background,...
skimage.api.skimage.morphology#skimage.morphology.skeletonize_3d
skimage.morphology.square(width, dtype=<class 'numpy.uint8'>) [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 widthint The width and height of the square. Returns selem...
skimage.api.skimage.morphology#skimage.morphology.square
skimage.morphology.star(a, dtype=<class 'numpy.uint8'>) [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 aint Parameter deciding th...
skimage.api.skimage.morphology#skimage.morphology.star
skimage.morphology.thin(image, max_iter=None) [source] Perform morphological thinning of a binary image. Parameters imagebinary (M, N) ndarray The image to be thinned. max_iterint, number of iterations, optional Regardless of the value of this parameter, the thinned image is returned immediately if an itera...
skimage.api.skimage.morphology#skimage.morphology.thin
skimage.morphology.watershed(image, markers=None, connectivity=1, offset=None, mask=None, compactness=0, watershed_line=False) [source] Deprecated function. Use skimage.segmentation.watershed instead. Find watershed basins in image flooded from given markers. Parameters imagendarray (2-D, 3-D, …) of integers Da...
skimage.api.skimage.morphology#skimage.morphology.watershed
skimage.morphology.white_tophat(image, selem=None, out=None) [source] Return white top hat of an image. The white top hat of an image is defined as the image minus its morphological opening. This operation returns the bright spots of the image that are smaller than the structuring element. Parameters imagendarray...
skimage.api.skimage.morphology#skimage.morphology.white_tophat
Module: registration skimage.registration.optical_flow_ilk(…[, …]) Coarse to fine optical flow estimator. skimage.registration.optical_flow_tvl1(…) Coarse to fine optical flow estimator. skimage.registration.phase_cross_correlation(…) Efficient subpixel image translation registration by cross-correlation. optic...
skimage.api.skimage.registration
skimage.registration.optical_flow_ilk(reference_image, moving_image, *, radius=7, num_warp=10, gaussian=False, prefilter=False, dtype=<class 'numpy.float32'>) [source] Coarse to fine optical flow estimator. The iterative Lucas-Kanade (iLK) solver is applied at each level of the image pyramid. iLK [1] is a fast and ro...
skimage.api.skimage.registration#skimage.registration.optical_flow_ilk
skimage.registration.optical_flow_tvl1(reference_image, moving_image, *, attachment=15, tightness=0.3, num_warp=5, num_iter=10, tol=0.0001, prefilter=False, dtype=<class 'numpy.float32'>) [source] Coarse to fine optical flow estimator. The TV-L1 solver is applied at each level of the image pyramid. TV-L1 is a popular...
skimage.api.skimage.registration#skimage.registration.optical_flow_tvl1
skimage.registration.phase_cross_correlation(reference_image, moving_image, *, upsample_factor=1, space='real', return_error=True, reference_mask=None, moving_mask=None, overlap_ratio=0.3) [source] Efficient subpixel image translation registration by cross-correlation. This code gives the same precision as the FFT up...
skimage.api.skimage.registration#skimage.registration.phase_cross_correlation