import torch


def from_coord_to_patch(ortho, fps, big_fp):
    """Returns an n batch of the input ortho using fps (footprints)."""
    image_patches = []
    for fp in fps:
        partial_patch = ortho[:, fp.slice_in(big_fp)[0], fp.slice_in(big_fp)[1]]
        image_patches.append(partial_patch)
    image_patches = torch.stack(image_patches, dim=0)
    return image_patches