1. Field of the Invention
Embodiments of the present invention generally relate to a method and apparatus for focusing an image of an imaging device utilizing at least one face in the image.
2. Background of the Invention
Automatic focus or autofocus is an important component of imaging devices, such as, a digital camera, camcorders and the like. The purpose of the autofocus is to move the lens to the correct position such that the subject of a photograph is focused. Human faces are often the subject of photographs and face detection components are becoming more common. A typical autofocus determines the subject of the photograph based on finding the best focused object while the lens is moved, but an autofocus system paired with face detection can assume that the subject is the detected face. Autofocus systems with face detection can improve the accuracy of focus with greater knowledge of the subject of the photograph.
The autofocus introduces a delay between the time the image is intended to be taken, i.e. time of actually pressing the exposure button, and the time the image is actually taken after the automatic focus. The amount of time it takes for the autofocus to achieve focus lock is an important metric. Many times, the image actually intended to be captured is not the image actually captured.
Therefore, there is a need for an improved method and apparatus for focusing an image while minimizing the resulting time delay.
Embodiments of the present invention relate to a method and apparatus for focusing an image in an image-capturing device utilizing at least one face in the image. The method includes detecting at least one face in the image, determining the size of the detected at least one face, determining the distance of the at least one face from the image-capturing device, wherein the determination utilizes the size of the detected at least one face, and focusing an image according to the determined distance of the detected at least one face.
So that the manner in which the above recited features of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings. It is to be noted, however, that the appended drawings illustrate only typical embodiments of this invention and are therefore not to be considered limiting of its scope, for the invention may admit to other equally effective embodiments. In this application, a computer readable medium is any medium accessible by a computer for saving, writing, archiving, executing and/or accessing data.
The processor 102 may comprise one or more conventionally available microprocessors. The microprocessor may be an application specific integrated circuit (ASIC). The support circuits 104 are well known circuits used to promote functionality of the processor 102. Such circuits include, but are not limited to, a cache, power supplies, clock circuits, input/output (I/O) circuits and the like. The memory 106 may comprise random access memory, read only memory, removable disk memory, flash memory, and various combinations of these types of memory. The memory 106 is sometimes referred to main memory and may, in part, be used as cache memory or buffer memory. The memory 106 may store an operating system (OS), database software, statistical data and various forms of application software, such as, applications 108 and facial focus module 110.
The applications 108 are any applications that are stored or utilized by the apparatus 100. The facial focus module 110 is utilized to detect a face in an image and utilizing the face area, estimate the distance and size of the face, to automatically obtain an optimal focused image. For example, the facial focus module 110 may be utilized to detect a face, the size of the face, the distance of the face from the camera and then focusing the image accordingly. The facial focus module 110 is better described below.
The facial focus module 110 detects faces in an image in order for the autofocus to reduce the amount of time to achieve focus lock. The facial focus module 110 is also utilized to determine the distance of the subject in the image. The determined distance is necessary for determining the automatic functioning of the strobe flash. The strobe flash is set to ON position when the subject distance is greater than a pre-determined threshold value. This helps in better images in low light conditions. The facial focus module utilizes the face size information to speed up the autofocus (AF) convergence time and as an indicator for the use of strobe flash.
The H3A's autofocus engine is used to analyze the sharpness information in the face detected focus region in real-time, the result of which is then stored to a buffer in the memory. The search algorithm is executed using the sharpness information from the filled autofocus buffer. Feedback is sent to the focus lens for focus motor movement and also to the display for highlighting the focus region used to determine the in-focus position. The auto-focus algorithm may be a software task running on the processor and is executed, for example, by half-pressing shutter button.
Utilizing the facial focus, the autofocus rapidly refines the search around the estimated location to find the best focus position. In another embodiment, the facial focus may also be used to provide more reliable estimates, such as, measuring distances between various features of the detected face (distance between eyes). Using the face size as an indication of object distance, the autofocus search domain can be restricted to search a limited number of positions around the estimated distance denoted by start and end shown in
Autofocus is an important feature in image capture devices such as digital still cameras or camera phones. The purpose of autofocus is to rapidly bring an object of interest into focus by adjusting the focus motor position when the shutter button is half-pressed. In order to develop a complete autofocus solution, appropriate choices need to be made regarding focus region, sharpness function and search algorithm.
The most popular approach to the autofocus feature is based on the widely adopted passive approach, which uses image analysis to extract a measure of sharpness from focus regions within an image. The in-focus position is found by locating the maximum of a sharpness function computed from the captured image at different lens positions. This allows the autofocus to be implemented as a feedback control loop in software.
A high-level overview of a generic autofocus system is shown in
Since human faces have similar sizes, the face size in the image can be a reliable reference for estimating subject distance. Thus utilizing the face detection, size and distance, a smaller time delay is experienced for auto-focusing of an image system. Such a solution may utilize a look-up table approach that maps the subject distance to the face size and, hence, is computationally inexpensive.
While the foregoing is directed to embodiments of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof, and the scope thereof is determined by the claims that follow.