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 contrast of the candidate images to determine definition of each of the candidate images for acquiring one candidate image whose definition is better than the definition of other candidate images, 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; wherein the definition computing unit selects a first image, a second image and a third image from the retrieved candidate images, and computes the definition of each selected image, wherein the projective position related to the second image is between the projective position of the first image and the projective position of the third image, and confirms whether the position of the focus image is between the projective position of the first image and the projective position of the third image according to the computation of the definition.