Patent ID: 7679655

Claim:
An image-data processing apparatus that sequentially executes flicker correction on each frame of image data as a correction target frame, the image data being acquired through imaging by an imaging device, the image-data processing apparatus comprising: a threshold generator configured to generate a threshold for pixel data; an integrator configured to extract pixel data of a selected range in each frame of the image data on the basis of the threshold generated by the threshold generator, the pixel data in the selected range having either values greater than or equal to the threshold or values less than or equal to the threshold, and to integrate values of the extracted pixel data; a storage unit configured to store integrated values of a plurality of frames, the integrated values being obtained by the integrator; an average calculator configured to calculate an average value of the image data on the basis of the integrated values of the plurality of frames, the integrated values being stored in the storage unit; a gain calculator configured to divide the average value calculated by the average calculator by an integrated value associated with the correction target frame among the integrated values of the plurality of frames, the integrated values being stored in the storage unit, thereby calculating a reference correction gain for the correction target frame; a comparator configured to check whether individual pieces of pixel data in the correction target frame are pixel data in the selected range on the basis of the threshold generated by the threshold generator; a correction-gain output unit configured to output a correction gain based on the reference correction gain calculated by the gain calculator, on the basis of a result of checking by the comparator, in association with each of the pieces of pixel data in the selected range of the correction target frame; and a corrector configured to correct each of the pieces of pixel data in the selected range among the pieces of pixel data in the correction target frame on the basis of the correction gain output from the correction-gain output unit.