doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
skimage.transform.swirl(image, center=None, strength=1, radius=100, rotation=0, output_shape=None, order=None, mode='reflect', cval=0, clip=True, preserve_range=False) [source]
Perform a swirl transformation. Parameters
imagendarray
Input image.
center(column, row) tuple or (2,) ndarray, optional
Center coo... | skimage.api.skimage.transform#skimage.transform.swirl |
skimage.transform.warp(image, inverse_map, map_args={}, output_shape=None, order=None, mode='constant', cval=0.0, clip=True, preserve_range=False) [source]
Warp an image according to a given coordinate transformation. Parameters
imagendarray
Input image.
inverse_maptransformation object, callable cr = f(cr, *... | skimage.api.skimage.transform#skimage.transform.warp |
skimage.transform.warp_coords(coord_map, shape, dtype=<class 'numpy.float64'>) [source]
Build the source coordinates for the output of a 2-D image warp. Parameters
coord_mapcallable like GeometricTransform.inverse
Return input coordinates for given output coordinates. Coordinates are in the shape (P, 2), where ... | skimage.api.skimage.transform#skimage.transform.warp_coords |
skimage.transform.warp_polar(image, center=None, *, radius=None, output_shape=None, scaling='linear', multichannel=False, **kwargs) [source]
Remap image to polar or log-polar coordinates space. Parameters
imagendarray
Input image. Only 2-D arrays are accepted by default. If multichannel=True, 3-D arrays are acc... | skimage.api.skimage.transform#skimage.transform.warp_polar |
Tutorials Image Segmentation How to parallelize loops | skimage.user_guide.tutorials |
Module: util
skimage.util.apply_parallel(function, array) Map a function in parallel across an array.
skimage.util.compare_images(image1, image2) Return an image showing the differences between two images.
skimage.util.crop(ar, crop_width[, copy, order]) Crop array ar by crop_width along each dimension.
skimage... | skimage.api.skimage.util |
skimage.util.apply_parallel(function, array, chunks=None, depth=0, mode=None, extra_arguments=(), extra_keywords={}, *, dtype=None, multichannel=False, compute=None) [source]
Map a function in parallel across an array. Split an array into possibly overlapping chunks of a given depth and boundary type, call the given ... | skimage.api.skimage.util#skimage.util.apply_parallel |
skimage.util.compare_images(image1, image2, method='diff', *, n_tiles=(8, 8)) [source]
Return an image showing the differences between two images. New in version 0.16. Parameters
image1, image22-D array
Images to process, must be of the same shape.
methodstring, optional
Method used for the comparison. Va... | skimage.api.skimage.util#skimage.util.compare_images |
skimage.util.crop(ar, crop_width, copy=False, order='K') [source]
Crop array ar by crop_width along each dimension. Parameters
ararray-like of rank N
Input array.
crop_width{sequence, int}
Number of values to remove from the edges of each axis. ((before_1, after_1), … (before_N, after_N)) specifies unique c... | skimage.api.skimage.util#skimage.util.crop |
skimage.util.dtype_limits(image, clip_negative=False) [source]
Return intensity limits, i.e. (min, max) tuple, of the image’s dtype. Parameters
imagendarray
Input image.
clip_negativebool, optional
If True, clip the negative range (i.e. return 0 for min intensity) even if the image dtype allows negative val... | skimage.api.skimage.util#skimage.util.dtype_limits |
skimage.util.img_as_bool(image, force_copy=False) [source]
Convert an image to boolean format. Parameters
imagendarray
Input image.
force_copybool, optional
Force a copy of the data, irrespective of its current dtype. Returns
outndarray of bool (bool_)
Output image. Notes The upper half of the i... | skimage.api.skimage.util#skimage.util.img_as_bool |
skimage.util.img_as_float(image, force_copy=False) [source]
Convert an image to floating point format. This function is similar to img_as_float64, but will not convert lower-precision floating point arrays to float64. Parameters
imagendarray
Input image.
force_copybool, optional
Force a copy of the data, ir... | skimage.api.skimage.util#skimage.util.img_as_float |
skimage.util.img_as_float32(image, force_copy=False) [source]
Convert an image to single-precision (32-bit) floating point format. Parameters
imagendarray
Input image.
force_copybool, optional
Force a copy of the data, irrespective of its current dtype. Returns
outndarray of float32
Output image. ... | skimage.api.skimage.util#skimage.util.img_as_float32 |
skimage.util.img_as_float64(image, force_copy=False) [source]
Convert an image to double-precision (64-bit) floating point format. Parameters
imagendarray
Input image.
force_copybool, optional
Force a copy of the data, irrespective of its current dtype. Returns
outndarray of float64
Output image. ... | skimage.api.skimage.util#skimage.util.img_as_float64 |
skimage.util.img_as_int(image, force_copy=False) [source]
Convert an image to 16-bit signed integer format. Parameters
imagendarray
Input image.
force_copybool, optional
Force a copy of the data, irrespective of its current dtype. Returns
outndarray of int16
Output image. Notes The values are sc... | skimage.api.skimage.util#skimage.util.img_as_int |
skimage.util.img_as_ubyte(image, force_copy=False) [source]
Convert an image to 8-bit unsigned integer format. Parameters
imagendarray
Input image.
force_copybool, optional
Force a copy of the data, irrespective of its current dtype. Returns
outndarray of ubyte (uint8)
Output image. Notes Negati... | skimage.api.skimage.util#skimage.util.img_as_ubyte |
skimage.util.img_as_uint(image, force_copy=False) [source]
Convert an image to 16-bit unsigned integer format. Parameters
imagendarray
Input image.
force_copybool, optional
Force a copy of the data, irrespective of its current dtype. Returns
outndarray of uint16
Output image. Notes Negative inpu... | skimage.api.skimage.util#skimage.util.img_as_uint |
skimage.util.invert(image, signed_float=False) [source]
Invert an image. Invert the intensity range of the input image, so that the dtype maximum is now the dtype minimum, and vice-versa. This operation is slightly different depending on the input dtype: unsigned integers: subtract the image from the dtype maximum s... | skimage.api.skimage.util#skimage.util.invert |
skimage.util.map_array(input_arr, input_vals, output_vals, out=None) [source]
Map values from input array from input_vals to output_vals. Parameters
input_arrarray of int, shape (M[, N][, P][, …])
The input label image.
input_valsarray of int, shape (N,)
The values to map from.
output_valsarray, shape (N,... | skimage.api.skimage.util#skimage.util.map_array |
skimage.util.montage(arr_in, fill='mean', rescale_intensity=False, grid_shape=None, padding_width=0, multichannel=False) [source]
Create a montage of several single- or multichannel images. Create a rectangular montage from an input array representing an ensemble of equally shaped single- (gray) or multichannel (colo... | skimage.api.skimage.util#skimage.util.montage |
skimage.util.pad(array, pad_width, mode='constant', **kwargs) [source]
Pad an array. Parameters
arrayarray_like of rank N
The array to pad.
pad_width{sequence, array_like, int}
Number of values padded to the edges of each axis. ((before_1, after_1), … (before_N, after_N)) unique pad widths for each axis. ((... | skimage.api.skimage.util#skimage.util.pad |
skimage.util.random_noise(image, mode='gaussian', seed=None, clip=True, **kwargs) [source]
Function to add random noise of various types to a floating-point image. Parameters
imagendarray
Input image data. Will be converted to float.
modestr, optional
One of the following strings, selecting the type of nois... | skimage.api.skimage.util#skimage.util.random_noise |
skimage.util.regular_grid(ar_shape, n_points) [source]
Find n_points regularly spaced along ar_shape. The returned points (as slices) should be as close to cubically-spaced as possible. Essentially, the points are spaced by the Nth root of the input array size, where N is the number of dimensions. However, if an arra... | skimage.api.skimage.util#skimage.util.regular_grid |
skimage.util.regular_seeds(ar_shape, n_points, dtype=<class 'int'>) [source]
Return an image with ~`n_points` regularly-spaced nonzero pixels. Parameters
ar_shapetuple of int
The shape of the desired output image.
n_pointsint
The desired number of nonzero points.
dtypenumpy data type, optional
The desir... | skimage.api.skimage.util#skimage.util.regular_seeds |
skimage.util.unique_rows(ar) [source]
Remove repeated rows from a 2D array. In particular, if given an array of coordinates of shape (Npoints, Ndim), it will remove repeated points. Parameters
ar2-D ndarray
The input array. Returns
ar_out2-D ndarray
A copy of the input array with repeated rows removed. ... | skimage.api.skimage.util#skimage.util.unique_rows |
skimage.util.view_as_blocks(arr_in, block_shape) [source]
Block view of the input n-dimensional array (using re-striding). Blocks are non-overlapping views of the input array. Parameters
arr_inndarray
N-d input array.
block_shapetuple
The shape of the block. Each dimension must divide evenly into the corres... | skimage.api.skimage.util#skimage.util.view_as_blocks |
skimage.util.view_as_windows(arr_in, window_shape, step=1) [source]
Rolling window view of the input n-dimensional array. Windows are overlapping views of the input array, with adjacent windows shifted by a single row or column (or an index of a higher dimension). Parameters
arr_inndarray
N-d input array.
win... | skimage.api.skimage.util#skimage.util.view_as_windows |
Module: viewer
skimage.viewer.CollectionViewer(image_collection) Viewer for displaying image collections.
skimage.viewer.ImageViewer(image[, useblit]) Viewer for displaying images.
skimage.viewer.canvastools
skimage.viewer.plugins
skimage.viewer.qt
skimage.viewer.utils
skimage.viewer.viewers
skimag... | skimage.api.skimage.viewer |
Module: viewer.canvastools
skimage.viewer.canvastools.LineTool(manager) Widget for line selection in a plot.
skimage.viewer.canvastools.PaintTool(…[, …]) Widget for painting on top of a plot.
skimage.viewer.canvastools.RectangleTool(manager) Widget for selecting a rectangular region in a plot.
skimage.viewer.ca... | skimage.api.skimage.viewer.canvastools |
class skimage.viewer.canvastools.LineTool(manager, on_move=None, on_release=None, on_enter=None, maxdist=10, line_props=None, handle_props=None, **kwargs) [source]
Bases: skimage.viewer.canvastools.base.CanvasToolBase Widget for line selection in a plot. Parameters
managerViewer or PlotPlugin.
Skimage viewer or... | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.LineTool |
property end_points | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.LineTool.end_points |
property geometry
Geometry information that gets passed to callback functions. | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.LineTool.geometry |
hit_test(event) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.LineTool.hit_test |
on_mouse_press(event) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.LineTool.on_mouse_press |
on_mouse_release(event) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.LineTool.on_mouse_release |
on_move(event) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.LineTool.on_move |
update(x=None, y=None) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.LineTool.update |
__init__(manager, on_move=None, on_release=None, on_enter=None, maxdist=10, line_props=None, handle_props=None, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.LineTool.__init__ |
class skimage.viewer.canvastools.PaintTool(manager, overlay_shape, radius=5, alpha=0.3, on_move=None, on_release=None, on_enter=None, rect_props=None) [source]
Bases: skimage.viewer.canvastools.base.CanvasToolBase Widget for painting on top of a plot. Parameters
managerViewer or PlotPlugin.
Skimage viewer or pl... | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.PaintTool |
property geometry
Geometry information that gets passed to callback functions. | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.PaintTool.geometry |
property label | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.PaintTool.label |
on_key_press(event) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.PaintTool.on_key_press |
on_mouse_press(event) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.PaintTool.on_mouse_press |
on_mouse_release(event) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.PaintTool.on_mouse_release |
on_move(event) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.PaintTool.on_move |
property overlay | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.PaintTool.overlay |
property radius | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.PaintTool.radius |
property shape | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.PaintTool.shape |
update_cursor(x, y) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.PaintTool.update_cursor |
update_overlay(x, y) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.PaintTool.update_overlay |
__init__(manager, overlay_shape, radius=5, alpha=0.3, on_move=None, on_release=None, on_enter=None, rect_props=None) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.PaintTool.__init__ |
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 selectio... | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.RectangleTool |
property corners
Corners of rectangle from lower left, moving clockwise. | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.RectangleTool.corners |
property edge_centers
Midpoint of rectangle edges from left, moving clockwise. | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.RectangleTool.edge_centers |
property extents
Return (xmin, xmax, ymin, ymax). | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.RectangleTool.extents |
property geometry
Geometry information that gets passed to callback functions. | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.RectangleTool.geometry |
on_mouse_press(event) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.RectangleTool.on_mouse_press |
on_mouse_release(event) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.RectangleTool.on_mouse_release |
on_move(event) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.RectangleTool.on_move |
__init__(manager, on_move=None, on_release=None, on_enter=None, maxdist=10, rect_props=None) [source]
Parameters
axAxes
The parent axes for the widget.
onselectfunction
A callback function that is called after a selection is completed. It must have the signature: def onselect(eclick: MouseEvent, erelease: M... | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.RectangleTool.__init__ |
class skimage.viewer.canvastools.ThickLineTool(manager, on_move=None, on_enter=None, on_release=None, on_change=None, maxdist=10, line_props=None, handle_props=None) [source]
Bases: skimage.viewer.canvastools.linetool.LineTool Widget for line selection in a plot. The thickness of the line can be varied using the mous... | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.ThickLineTool |
on_key_press(event) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.ThickLineTool.on_key_press |
on_scroll(event) [source] | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.ThickLineTool.on_scroll |
__init__(manager, on_move=None, on_enter=None, on_release=None, on_change=None, maxdist=10, line_props=None, handle_props=None) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.canvastools#skimage.viewer.canvastools.ThickLineTool.__init__ |
class skimage.viewer.CollectionViewer(image_collection, update_on='move', **kwargs) [source]
Bases: skimage.viewer.viewers.core.ImageViewer Viewer for displaying image collections. Select the displayed frame of the image collection using the slider or with the following keyboard shortcuts: left/right arrows
Previou... | skimage.api.skimage.viewer#skimage.viewer.CollectionViewer |
keyPressEvent(event) [source] | skimage.api.skimage.viewer#skimage.viewer.CollectionViewer.keyPressEvent |
update_index(name, index) [source]
Select image on display using index into image collection. | skimage.api.skimage.viewer#skimage.viewer.CollectionViewer.update_index |
__init__(image_collection, update_on='move', **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer#skimage.viewer.CollectionViewer.__init__ |
class skimage.viewer.ImageViewer(image, useblit=True) [source]
Bases: object Viewer for displaying images. This viewer is a simple container object that holds a Matplotlib axes for showing images. ImageViewer doesn’t subclass the Matplotlib axes (or figure) because of the high probability of name collisions. Subclass... | skimage.api.skimage.viewer#skimage.viewer.ImageViewer |
add_tool(tool) [source] | skimage.api.skimage.viewer#skimage.viewer.ImageViewer.add_tool |
closeEvent(event) [source] | skimage.api.skimage.viewer#skimage.viewer.ImageViewer.closeEvent |
connect_event(event, callback) [source]
Connect callback function to matplotlib event and return id. | skimage.api.skimage.viewer#skimage.viewer.ImageViewer.connect_event |
disconnect_event(callback_id) [source]
Disconnect callback by its id (returned by connect_event). | skimage.api.skimage.viewer#skimage.viewer.ImageViewer.disconnect_event |
dock_areas = {'bottom': None, 'left': None, 'right': None, 'top': None} | skimage.api.skimage.viewer#skimage.viewer.ImageViewer.dock_areas |
property image | skimage.api.skimage.viewer#skimage.viewer.ImageViewer.image |
open_file(filename=None) [source]
Open image file and display in viewer. | skimage.api.skimage.viewer#skimage.viewer.ImageViewer.open_file |
original_image_changed = None | skimage.api.skimage.viewer#skimage.viewer.ImageViewer.original_image_changed |
redraw() [source] | skimage.api.skimage.viewer#skimage.viewer.ImageViewer.redraw |
remove_tool(tool) [source] | skimage.api.skimage.viewer#skimage.viewer.ImageViewer.remove_tool |
reset_image() [source] | skimage.api.skimage.viewer#skimage.viewer.ImageViewer.reset_image |
save_to_file(filename=None) [source]
Save current image to file. The current behavior is not ideal: It saves the image displayed on screen, so all images will be converted to RGB, and the image size is not preserved (resizing the viewer window will alter the size of the saved image). | skimage.api.skimage.viewer#skimage.viewer.ImageViewer.save_to_file |
show(main_window=True) [source]
Show ImageViewer and attached plugins. This behaves much like matplotlib.pyplot.show and QWidget.show. | skimage.api.skimage.viewer#skimage.viewer.ImageViewer.show |
update_image(image) [source]
Update displayed image. This method can be overridden or extended in subclasses and plugins to react to image changes. | skimage.api.skimage.viewer#skimage.viewer.ImageViewer.update_image |
__init__(image, useblit=True) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer#skimage.viewer.ImageViewer.__init__ |
Module: viewer.plugins
skimage.viewer.plugins.CannyPlugin(*args, …) Canny filter plugin to show edges of an image.
skimage.viewer.plugins.ColorHistogram([max_pct])
skimage.viewer.plugins.Crop([maxdist])
skimage.viewer.plugins.LabelPainter([max_radius])
skimage.viewer.plugins.LineProfile([…]) Plugin to comp... | skimage.api.skimage.viewer.plugins |
class skimage.viewer.plugins.CannyPlugin(*args, **kwargs) [source]
Bases: skimage.viewer.plugins.overlayplugin.OverlayPlugin Canny filter plugin to show edges of an image.
__init__(*args, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature.
attach(image_viewer) [source]
Attach th... | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.CannyPlugin |
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example: viewer += Plugin(...)
Also note that attach automatically calls the filter function so that the image matches the filtered value s... | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.CannyPlugin.attach |
name = 'Canny Filter' | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.CannyPlugin.name |
__init__(*args, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.CannyPlugin.__init__ |
class skimage.viewer.plugins.ColorHistogram(max_pct=0.99, **kwargs) [source]
Bases: skimage.viewer.plugins.plotplugin.PlotPlugin
__init__(max_pct=0.99, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature.
ab_selected(extents) [source]
attach(image_viewer) [source]
Attach the ... | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.ColorHistogram |
ab_selected(extents) [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.ColorHistogram.ab_selected |
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example: viewer += Plugin(...)
Also note that attach automatically calls the filter function so that the image matches the filtered value s... | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.ColorHistogram.attach |
help() [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.ColorHistogram.help |
name = 'Color Histogram' | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.ColorHistogram.name |
output() [source]
Return the image mask and the histogram data. Returns
maskarray of bool, same shape as image
The selected pixels.
datadict
The data describing the histogram and the selected region. The dictionary contains: ‘bins’ : array of float The bin boundaries for both a and b channels. ‘hist’ : 2D ... | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.ColorHistogram.output |
__init__(max_pct=0.99, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature. | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.ColorHistogram.__init__ |
class skimage.viewer.plugins.Crop(maxdist=10, **kwargs) [source]
Bases: skimage.viewer.plugins.base.Plugin
__init__(maxdist=10, **kwargs) [source]
Initialize self. See help(type(self)) for accurate signature.
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will a... | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Crop |
attach(image_viewer) [source]
Attach the plugin to an ImageViewer. Note that the ImageViewer will automatically call this method when the plugin is added to the ImageViewer. For example: viewer += Plugin(...)
Also note that attach automatically calls the filter function so that the image matches the filtered value s... | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Crop.attach |
crop(extents) [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Crop.crop |
help() [source] | skimage.api.skimage.viewer.plugins#skimage.viewer.plugins.Crop.help |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.