montage(arr_in, fill='mean', rescale_intensity=False, grid_shape=None, padding_width=0, multichannel=False)
Create a rectangular montage from an input array representing an ensemble of equally shaped single- (gray) or multichannel (color) images.
For example, montage(arr_in)
called with the following :None:None:`arr_in`
+---+---+---+ | 1 | 2 | 3 | +---+---+---+
will return
+---+---+ | 1 | 2 | +---+---+ | 3 | * | +---+---+
where the '*' patch will be determined by the :None:None:`fill`
parameter.
An array representing an ensemble of :None:None:`K`
images of equal shape.
Value to fill the padding areas and/or the extra tiles in the output array. Has to be :None:None:`float`
for single channel collections. For multichannel collections has to be an array-like of shape of number of channels. If mean
, uses the mean value over all images.
Whether to rescale the intensity of each image to [0, 1].
The desired grid shape for the montage :None:None:`(ntiles_row, ntiles_column)`
. The default aspect ratio is square.
The size of the spacing between the tiles and between the tiles and the borders. If non-zero, makes the boundaries of individual images easier to perceive.
If True, the last :None:None:`arr_in`
dimension is threated as a color channel, otherwise as spatial.
Output array with input images glued together (including padding p
).
Create a montage of several single- or multichannel images.
>>> import numpy as npThis example is valid syntax, but we were not able to check execution
... from skimage.util import montage
... arr_in = np.arange(3 * 2 * 2).reshape(3, 2, 2)
... arr_in # doctest: +NORMALIZE_WHITESPACE array([[[ 0, 1], [ 2, 3]], [[ 4, 5], [ 6, 7]], [[ 8, 9], [10, 11]]])
>>> arr_out = montage(arr_in)This example is valid syntax, but we were not able to check execution
... arr_out.shape (4, 4)
>>> arr_out array([[ 0, 1, 4, 5], [ 2, 3, 6, 7], [ 8, 9, 5, 5], [10, 11, 5, 5]])This example is valid syntax, but we were not able to check execution
>>> arr_in.mean() 5.5This example is valid syntax, but we were not able to check execution
>>> arr_out_nonsquare = montage(arr_in, grid_shape=(1, 3))This example is valid syntax, but we were not able to check execution
... arr_out_nonsquare array([[ 0, 1, 4, 5, 8, 9], [ 2, 3, 6, 7, 10, 11]])
>>> arr_out_nonsquare.shape (2, 6)See :
The following pages refer to to this document either explicitly or contain code examples using this.
skimage.util._montage.montage
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them