biggest_common_sector

biggest_common_sector(images)[source]

Biggest common sector of the image stack

This function computes the relative translation between the images with the first image in the stack as the reference image. Then the biggest common sector is cropped from the images. The cropping window moves with the relative translation of the images so that the translation is corrected.

Warping of the images which could be a result of strain is not accounted for. If the warp cant be neglected do not use this method!!

Parameters
images: list or ImageStack

Images represented as np.ndarray. All images must have the same dimensionality! If the width and height of the images is not the same, they are cut to the shape of the smallest image.

Returns
out: list, ImageStack

list or ImageStack with the corrected images.