:py:mod:`warping.warp` ====================== .. py:module:: warping.warp .. autoapi-nested-parse:: Computes diffeomorphism of 2D images in pytorch Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: warping.warp.scalar_field_modes warping.warp.scalar_field warping.warp.deform warping.warp.remap warping.warp.temperature_range warping.warp.typical_displacement .. py:function:: scalar_field_modes(n, m, dtype=torch.float64, device='cpu') sqrt(1 / Energy per mode) and the modes .. py:function:: scalar_field(n, m, device='cpu') random scalar field of size nxn made of the first m modes .. py:function:: deform(image, T, cut, interp='linear') 1. Sample a displacement field tau: R2 -> R2, using tempertature `T` and cutoff `cut` 2. Apply tau to `image` :param img: square image(s) [..., y, x] :param T: temperature :param cut: high frequency cutoff .. py:function:: remap(a, dx, dy, interp) :param a: Tensor of shape [..., y, x] :param dx: Tensor of shape [y, x] :param dy: Tensor of shape [y, x] :param interp: interpolation method .. py:function:: temperature_range(n, cut) Define the range of allowed temperature for given image size and cut. .. py:function:: typical_displacement(T, cut, n)