1. A method, comprising: focusing incident light on a pixel array with a lens; capturing a sequence of images with the pixel array; with image processing circuitry, calculating statistical metrics from the captured sequence of images; calculating a motion score based on the statistical metrics; and determining when to refocus the lens based at least partly on the motion score, wherein determining when to refocus the lens based at least partly on the motion score comprises: incrementing a motion count that is indicative of how many images from the sequence of images have a motion score that is greater than a first threshold; in response to identifying that the motion count is greater than a second, motion counter threshold, incrementing a stable count that is indicative of how many images from the sequence of images have a motion score that is less than the first threshold.