Patent 7493035 was granted and assigned to Compal Electronics on February, 2009 by the United States Patent and Trademark Office.
A method for focusing by using a pre-flash is provided. The method includes the following steps. First, the image sensor captures a first image of the object, wherein the average brightness of the first image is calculated to be Y0. Next, the image sensor captures a second image of the object with the aid of a first pre-flash having a first energy, wherein the average brightness of the second image is calculated to be Y1. Afterwards, the image sensor captures a third image of the object with the aid of a second pre-flash having a second energy, wherein the average brightness of the third image is calculated to be Y2. Then, the distance D to the object is calculated according to the brightness Y0 and the difference ΔY between Y1 and Y2. Finally, the image sensor adjusts the focus according to the distance D.