An approach for processing image data is described. The method comprises correcting
a frame of image data received from a detector using existing correction coefficients
that comprise a plurality of offset coefficients corresponding to a plurality of
detector elements. The method also comprises calculating an update parameter for
each detector element using pixel data generated from the correction. The update
parameter for a given detector element is calculated from multiple difference values
determined from a given pixel value of the pixel data and multiple adjacent pixel
values. The given pixel value corresponds to the given detector element. Each difference
value is determined by subtracting one of the multiple adjacent pixel values from
the given pixel value. The method comprises identifying offset coefficients whose
existing values are to remain unchanged based upon the update parameters and changing
existing values of offset coefficients other than those identified to remain unchanged.