1. A non-transitory computer-readable storage medium having instructions stored therein, the instructions executable by a processor to cause the processor to perform operations comprising: receiving a target image; receiving a reference image that overlaps the target image; preprocessing the target image, wherein the preprocessing includes: rejecting a target image with a shadow region above a shadow threshold while keeping a target image with a shadow region below the shadow threshold; for each target image kept: providing an uncertainty in a location of the target image relative to the reference image; transforming the target image into an atlas projection to match the reference image; and partitioning the transformed target image into a sub-region; and determining a matching statistic for each sub-region to determine a location for each sub-region relative to the reference image.