1. A computer-implemented method for producing a digital image using an image sensor comprised of a pixel array, the method comprising: obtaining, using a processor, a set of coefficients representing a relative measurement between: an affected pixel that is proximate to an auto-focus pixel having a shield element and is optically affected by the shielding element, and an unaffected pixel that is at least one additional pixel away from the auto-focus pixel as compared to the affected pixel; constructing, using the processor, a predictive function based on the set of coefficients wherein the predictive function is constructed by performing a non-linear regression on at least part of the set of coefficients; computing, using the processor, a compensated pixel value for at least one pixel of the image sensor using the predictive function; and creating a digital image, using the image sensor, based in part on the compensated value.