A computer readable recoding media storing at least one non-transitory program, wherein a method for controlling an exposure level of a frame, which is applied to an image sensor, is performed if the program is execute, wherein the image sensor comprises a pixel array, an amplifier and a digital gain unit, wherein the pixel array generates a first light sensing signal from a first frame according to a first integration time, where the amplifier amplifies the first light sensing signal according to a first analog gain, and the digital gain unit amplifies a digital light sensing signal generated according to the first light sensing signal according to a first digital gain, wherein the method comprises:
- (a) computing a desired exposure level for a second frame following the first frame, and determining a second integration time for the pixel array via the desired exposure level, and computing a desired total gain for the second frame via comparing the desired exposure level with the first integration time, and determining a second analog gain for the amplifier and a second digital gain for the digital gain unit via the desired total gain;
- (b) applying the second analog gain to the amplifier to amplify at least one second light sensing signal from the second frame, applying the second digital gain to the digital gain unit to amplify at least one digital light sensing signal generated from the second light sensing signal, wherein the pixel array generates the second light sensing signal according to the first integration time;
- (c) computing a desired exposure level for a third frame following the second frame for N frames, and computing a desired total gain for the third frame via comparing the desired exposure level with the second integration time, and determining a third analog gain and a third digital gain via the desired total gain;
- and
- (d) applying the third analog gain to the amplifier to amplify at least one third light sensing signal from the third frame, applying the third digital gain to the digital gain unit to amplify at least one digital light sensing signal generated from the third light sensing signal, and applying the second integration time to the pixel array to generate the third light sensing signal from the third frame;
- wherein the N is a positive integer.