Referring again to FIG. 8, the offset and gain correction stage 104 processes the incoming data 101a on a pixel-by-pixel basis in accordance with the correction data 103b, 103c regardless of whether any such data is identified as originating from a bad pixel.