1. A computing device with an imaging function, comprising: a projection unit, comprising: a projection lens, projecting an image output from the computing device; and a driving unit, mechanically connected to the projection lens for driving the projection lens moving among a plurality of projective positions along an optical axis; an image receiving unit, receiving the images orderly projected at every projective position through the projection lens, and at least a part of each image regarded as a plurality of candidate images that one-by-one correspond to the projective positions; and a processing unit, controlling the projection unit to project the images and the image receiving unit to receive the candidate images, the processing unit comprising: a definition computing unit, executing a program instruction to retrieve the candidate images received by the image receiving unit, and computing definition of the candidate images for acquiring one candidate image with a greatest definition, and deemed a focus image, wherein the projective position with respect to the focus image is a focus position; and a control unit, generating a control signal according to the focus position; wherein, when the driving unit receives the control signal, the projection lens is driven to the focus position according to the control signal.