1. A method of generating a model for image processing, said method comprising: selecting at least one reference image from a plurality of reference images; partitioning the at least one reference image into a plurality of patches; generating a probability distribution for each of the patches; and generating a model of a probability distribution for the at least one reference image using the probability distributions for each of the patches.