1. A method for calibrating a projector comprising: receiving by a processing element one or more mapping images; defining by the processing element a non-linear color mapping function, wherein the non-linear color mapping function maps between colors of the mapping images and a color space of the projector; and determining by the processing element a compensation image using the color mapping function, wherein the compensation image corresponds to an input image and takes into account variations in a projection surface onto which the input image is to be projected.