1. A method in an electronic device for correcting color shading artifacts in a captured image, the method comprising: receiving image data comprising the captured image and scene statistics, the scene statistics comprising a downsampled version of the captured image; accessing a reference table, wherein the reference table comprises shading correction data calibrated under a typical illumination; correcting color shading in the scene statistics using the reference table; estimating color shading in the corrected scene statistics; updating the reference table based on the estimated color shading; and correcting color shading in the captured image using the updated reference table.