Patch Based Models for Image Enhancement