1. A method, comprising: determining partition center patches for partitions of example image patches taken from example images; forming patch groups that each include similar image patches of an image and a reference image patch that represents the similar image patches in a respective patch group; determining a partition center patch of the partitions that is a nearest neighbor to the reference image patch of a patch group; and allocating the determined partition center patch as the nearest neighbor to the similar image patches in the patch group.