1. A method of image stabilization, comprising: capturing a first image frame using a first set of gain and integration parameters; defining a first sub-part of the first image frame; determining a first sharpness score for the first sub-part; capturing a second image frame using a second set of gain and integration parameters; determining a second sharpness score for the second image frame based on at least a second sub-part of the second image frame; comparing the second sharpness score to the first sharpness score; and adjusting analog gain and integration time for a next captured image based on the comparison of the second sharpness score to the first sharpness score.