A system for performing ambient light image correction, the system comprising: a light source configured to provide pulsed illumination to an object; a rolling shutter imaging unit configured to capture, while the object is illuminated by the pulsed illumination from the light source, a plurality of images of the object at an exposure time shorter than the wave period of the pulsed illumination, such that each of the plurality of captured images comprises a plurality of bright bands and dark bands, wherein a bright band corresponds to a high state of the pulsed illumination and a dark band corresponds to a low state of the pulsed illumination; wherein the pulse frequency of the illumination provided by the light source is not a multiple integral of the frame rate at which the plurality of images are captured by the rolling shutter imaging unit, and wherein the system further comprises a control unit configured to: generate a first composite image comprising a plurality of bright bands from the plurality of captured images, by combining sections from the plurality of captured images which correspond to bright bands; generate a second composite image comprising a plurality of dark bands from the plurality of captured images, by combining sections from the plurality of captured images which correspond to dark bands; and generate an ambient light corrected image based on a difference in pixel information between the first composite image and the second composite image. a light source configured to provide pulsed illumination to an object; a rolling shutter imaging unit configured to capture, while the object is illuminated by the pulsed illumination from the light source, a plurality of images of the object at an exposure time shorter than the wave period of the pulsed illumination, such that each of the plurality of captured images comprises a plurality of bright bands and dark bands, wherein a bright band corresponds to a high state of the pulsed illumination and a dark band corresponds to a low state of the pulsed illumination; wherein the pulse frequency of the illumination provided by the light source is not a multiple integral of the frame rate at which the plurality of images are captured by the rolling shutter imaging unit, and wherein the system further comprises a control unit configured to: generate a first composite image comprising a plurality of bright bands from the plurality of captured images, by combining sections from the plurality of captured images which correspond to bright bands; generate a second composite image comprising a plurality of dark bands from the plurality of captured images, by combining sections from the plurality of captured images which correspond to dark bands; and generate an ambient light corrected image based on a difference in pixel information between the first composite image and the second composite image. generate a first composite image comprising a plurality of bright bands from the plurality of captured images, by combining sections from the plurality of captured images which correspond to bright bands; generate a second composite image comprising a plurality of dark bands from the plurality of captured images, by combining sections from the plurality of captured images which correspond to dark bands; and generate an ambient light corrected image based on a difference in pixel information between the first composite image and the second composite image. <EOS>