An endoscope system includes: a light source an image sensor having pixels, each performing photoelectric conversion on received light to output an electric signal, and the image sensor imaging a subject to generate image data of the subject a difference calculation unit that calculates, for each pixel, difference data between a dark image and a dark reference image, the dark image being output from the image sensor during lights-out time when the light source is turned off, and the dark reference image having been preliminarily obtained by averaging dark images generated by the image sensor a detection unit that detects in the difference data a pixel whose pixel value is a threshold or more, as a blinking defective pixel in the image sensor and a correction unit that corrects the electric signal output from the blinking defective pixel, using electric signals output from neighboring pixels of the blinking defective pixel.