An image sensor comprising a plurality of pixels each having: detection means for detecting photons, counting means for counting a number of the detected photons and outputting a counted value, storage means for holding the counted value, and outputting the counted value held in the storage means as a first count value each time a predetermined exposure period elapses without resetting the counted value after it is output; the image sensor further comprising: first temporary memory means for storing the first count value when the predetermined exposure period is elapsed for a first time; second temporary memory means for storing the first count value when the predetermined exposure period is elapsed for a second time consecutive to the first time; calculation means for calculating a second count value, which is a count value per unit time, based on the exposure period and based on a difference value between the first count value stored in the second temporary memory means and the first count value stored in the first temporary memory means; and correction means for obtaining a correction coefficient based on the second count value and correcting the difference value for a deterioration in image quality caused by a difference in received light amount per unit time using the correction coefficient, wherein the correction means obtains a larger value as the correction coefficient in a case where the second count value is a first value than in a case where the second count value is a second value which is smaller than the first value. detection means for detecting photons, counting means for counting a number of the detected photons and outputting a counted value, storage means for holding the counted value, and outputting the counted value held in the storage means as a first count value each time a predetermined exposure period elapses without resetting the counted value after it is output; the image sensor further comprising: first temporary memory means for storing the first count value when the predetermined exposure period is elapsed for a first time; second temporary memory means for storing the first count value when the predetermined exposure period is elapsed for a second time consecutive to the first time; calculation means for calculating a second count value, which is a count value per unit time, based on the exposure period and based on a difference value between the first count value stored in the second temporary memory means and the first count value stored in the first temporary memory means; and correction means for obtaining a correction coefficient based on the second count value and correcting the difference value for a deterioration in image quality caused by a difference in received light amount per unit time using the correction coefficient, wherein the correction means obtains a larger value as the correction coefficient in a case where the second count value is a first value than in a case where the second count value is a second value which is smaller than the first value. first temporary memory means for storing the first count value when the predetermined exposure period is elapsed for a first time; second temporary memory means for storing the first count value when the predetermined exposure period is elapsed for a second time consecutive to the first time; calculation means for calculating a second count value, which is a count value per unit time, based on the exposure period and based on a difference value between the first count value stored in the second temporary memory means and the first count value stored in the first temporary memory means; and correction means for obtaining a correction coefficient based on the second count value and correcting the difference value for a deterioration in image quality caused by a difference in received light amount per unit time using the correction coefficient, wherein the correction means obtains a larger value as the correction coefficient in a case where the second count value is a first value than in a case where the second count value is a second value which is smaller than the first value.