Patent ID: 8491127

Claim:
An auto-focusing projector, comprising: a projection lens, a driver device, a storage system, and an image capturing device; and one or more programs stored in the storage system and executable by at least one microprocessor, the one or more programs comprising: an initialization module operable to set an interval step for adjusting a focus of the projection lens according to a focusing range of the projection lens, read a predefined picture from the storage system, and control the projection lens to project the predefined picture on a projection area; an image analysis module operable to capture an image of the predefined picture from the projection area using the image capturing device when the projection lens moves at every interval step, calculate a contrast of each of the images, analyze the contrast of each of the images to determine an optimal image from all the images, and determine a current position of the projection lens having the optimal image as an optimal focus of the projection lens; and an focus adjustment module operable to drive the driver device to control the projection lens to move within the focusing range at every interval step, and control the projection lens to focus at the optimal focus of the projection lens; wherein the optimal image is determined by steps of: (a) controlling the image capturing device to capture a first image of the predefined picture from the projection area when the projection lens locates at an initial position of the focusing range, and calculating a first contrast of the first image; (b) controlling the image capturing device to capture a second image of the predefined picture from the projection area when the projection lens moves by one interval step, and calculating a second contrast of the second image; (c) determining whether the second contrast of the second image is greater than the first contrast of the first image; (d) saving the second image as the first image and regarding the second contrast as the first contrast, upon the condition that the second contrast of the second image is greater than the first contrast of the first image; (e) repeating step (b) to step (d) until the second contrast of the second image is not greater than the first contrast of the first image; and (f) determining an image having the maximum contrast as the optimal image.