1. A processing system, comprising: a processor; and a memory storing instructions that, when executed by the processor, cause the processing system to compute a transformation operation that aligns a first image to a second image, the processor being configured to: determine a first set of patches for the first image, wherein each of the patches in the first set of patches comprises a portion of the first image; determine a second set of patches for the second image, wherein each of the patches in the second set of patches comprises a portion of the second image; for each of the patches in the first and second sets of patches, compute a value of an attribute of the patch, wherein the attribute is invariant to the transformation operation, and wherein, for a given patch, the attribute includes a rotation-invariant attribute; discard one or more patch pairings of a patch from the first set of patches and a patch from the second set of patches in response to determining that the attributes do not match for the patch pairing, wherein discarding one or more patch pairings comprises: comparing a value of the rotation-invariant attribute of the patch from the first set of patches to a value of the rotation-invariant attribute of the patch from the second set of patches, and discarding the patch pairing in response to determining that the values of the rotation-invariant attributes are not within a tolerance value of one another; for one or more patch pairings that are not discarded, identify a similarity value between the patch from the first set of patches and the patch from the second set of patches in the patch pairing; select a set of candidate pairings based on identifying the patch pairings having a similarity value that satisfies a threshold; for each candidate pairing in the set of candidate pairings, determine a transformation operation to align the patch from the first set of patches and the patch from the second set of patches in the candidate pairing; group the candidate pairings into clusters based on parameters of the transformation operations of the candidate pairings; and perform the transformation operation corresponding to at least one of the clusters to align the first image to the second image.