An autofocus method for an intra-oral camera modulates the focus of a liquid lens in a cycle that has at least first, second, and third focus positions and obtains an image at each focus position, measuring focus of the obtained image. The position of the liquid lens is adjusted according to the measured focus. Steps of modulating the focus of the liquid lens in the cycle with at least first, second, and third focus positions, and obtaining the image at each focus position and measuring focus of the obtained image are repeated.