1. A method of correcting a captured image for lens shading artifacts, comprising: for a given lens determining a function L(x,y) being a lens shading correction function to be applied to images captured by the lens in order to correct for lens shading artifacts; applying a sampling technique to sample the function L(x,y) at selected points; and storing the sampled function L(X,y) in memory.