register.stack

Stack warped images.

supreme.register.stack.with_transform
supreme.register.stack.mask_roi
supreme.register.stack.corners

with_transform

supreme.register.stack.with_transform(images, matrices, weights=None, order=1, oshape=None, save_tiff=False, method='interpolate')

Stack images after performing coordinate transformations.

Parameters:

images : list of ndarray

Images to be stacked.

matrices : list of (3,3) ndarray

Coordinate transformation matrices.

weights : list of float

Weight of each input image. By default, all images are weighted equally. The merging algorithm takes into account whether images overlap.

order : int

Order of the interpolant used by the scaling algorithm. Linear, by default.

oshape : tuple of int

Output shape. If not specified, the output shape is auto determined to include all images.

save_tiff : bool

Whether to save copies of the warped images. False by default.

method : {‘interpolate’, ‘polygon’}

Use standard interpolation (default) or polygon interpolation. Note: Polygon interpolation is currently disabled.

Notes

For each image, a 3x3 coordinate transformation matrix, A, must be given. Each coordinate, c = [x,y,1]^T, in the source image is then translated to its position in the destination image, d = A*c.

After warping the images, they are combined according to the given weights. Note that the overlap of frames is taken into account. For example, in areas where only one image occurs, the pixels of that image will carry a weight of one, whereas in other areas it may be less, depending on the overlap of other images.

mask_roi

supreme.register.stack.mask_roi(rows, cols, bounds)

corners

supreme.register.stack.corners(dims)
Return the corner coordinates for a matrix of the given dimensions.