Partition the image domain into range blocks Ri of size s×s. For each Ri, search the image to find a block Di of size 2s×2s that is very similar to Ri. Select the mapping functions such that H(Di) = Ri for each i.