nabu.misc.padding module¶
- nabu.misc.padding.pad_interpolate(im, padded_img_shape_vh, translation_vh=None, padding_mode='reflect')[source]¶
This function produces a centered padded image and , optionally if translation_vh is set, performs a Fourier shift of the whole image. In case of translation, the image is first padded to a larger extent, that encompasses the final padded with plus a translation margin, and then translated, and final recut to the required padded width. The values are translated: if a feature appear at x in the original image it will appear at pad+translation+x in the final image.
- Parameters:
im (np.ndaray) – the input image
translation_vh (a sequence of two float) – the vertical and horizontal shifts