Systems and methods are disclosed for automatically selecting a focus range in cameras. In an exemplary embodiment, firmware may be provided in the camera for analyzing a scene being photographed. The camera may be used to take a focus-frame, e.g., an image capture having a predetermined region size, subsampling, and/or binning attributes for focus analysis. Then firmware analyzes the focus-flame data in a first focus range. If the focus-frame data in the first focus range does not indicate there are any targets in a second focus range, the focus-frame data in the first focus range is used to auto-focus the camera. If, however, the focus-fame data in the first focus range indicates that there may be at least one target in the second focus range, the firmware then analyzes focus-frame data in the second focus range. The focus-frame data in the second focus range may then be used to auto-focus the camera.
In exemplary embodiments, the firmware may determine whether to proceed to the second focus range based only on analyzing focus-frame data from the first focus range. Focus-frame data does not need to be gathered and analyzed in the second focus range if analyzing the focus-frame data in the first focus range indicates that there are no targets in the second focus range. Accordingly, the firmware may speed up the time it takes to auto-focus the camera by only analyzing focus-frame data in the second focus range on an as-needed basis.
Exemplary camera system 100 may include a lens 120 positioned to focus light 130 reflected from one or more objects 140 in a scene 145 onto an image sensor 150 when a shutter 155 is open (e.g., for image exposure). It is noted that a separate image sensor (not shown) may also be provide, e.g., dedicated to focus operations. Exemplary lens 120 may be any suitable lens which focuses light 130 reflected from the scene 145 onto image sensor 150.
Exemplary image sensor 150 may be implemented as a plurality of photosensitive cells, each of which builds-up or accumulates an electrical charge in response to exposure to light. The accumulated electrical charge for any given pixel is proportional to the intensity and duration of the light exposure. Exemplary image sensor 150 may include, but is not limited to, a charge-coupled device (CCD), or a complementary metal oxide semiconductor (CMOS) sensor.
Camera system 100 may also include focus-frame logic 160. In digital cameras, the focus-frame logic 160 receives electrical signals from the image sensor 150 representative of the light 130 captured by the image sensor 150 during exposure to generate a digital focus-frame of the scene 145.
Using a focus-frame enables the camera system to perform various processes (e.g., auto-exposure, auto-focus, image stabilizing, detecting white balance, etc.). The focus-frame(s) may be one or more of the focus-frames already being implemented by the camera for focusing, auto-exposure, pre-flash calculations, and/or the focus-frame(s) may be obtained specifically for displaying to the user.
Camera system 100 may also include auto-focus logic 170. Auto-focus logic 170 may receive the focus-frame data from focus-frame logic 160 and perform various calculations or processes on the focus-frame data. Exemplary auto-focus logic 170 may implement processes for automatically selecting a focus range for auto-focus operations, such as described in more detail below.
Auto-focus logic 170 may receive input from other sources in addition to the focus-frame logic 160. For example, camera settings data 180 may also be provided as input to the auto-focus logic 170. Output from the auto-focus logic 170 may be used by one or more other program code modules in the auto-focus logic 170 and/or by auto-focus mechanisms (e.g., actuator drives 190 for moving the lens 120 into focus).
Before continuing, it is noted that shutters, image sensors, and other devices, such as those illustrated in
It is also noted that the camera system 100 shown and described above with reference to
In this example, the auto-focus operations begin by retrieving focus data 260 from the first focus range 230. The camera lens may be moved to a first lens position in the first focus range 230 for taking a focus-frame, and the focus-frame may be searched for number of edges (or other focus metrics). The camera lens may then be moved to another lens position for taking another focus-frame, and so forth. The focus data 260 is then compiled and analyzed to identify a lens position corresponding to an area of high contrast. For example, the peak 265 illustrated graphically in
In this example, no focus data from the second focus range 240 extends into the first focus range 240. Accordingly, auto-focus operations do not need to continue to retrieve focus data from the second focus range 240, and the lens position 270 corresponding to the peak 265 may be used to focus the camera 200 on the target 210.
Before continuing, it should be understood that the focus data 260 is illustrated graphically in
It is noted that the first focus range 230 may be the so-called “normal” focus range (e.g., beyond about 0.5 meters of the camera lens), and the second focus range 240 may be the so-called “macro” focus range (e.g., within about 0.5 meters of the camera lens). However, the systems and methods described herein are not limited to any particular definition of the first and second focus ranges.
It is also noted that the systems and methods described herein are not limited to use with any particular number of focus ranges. In other embodiments, the systems and methods may also be implemented with three or more focus ranges. For example, focus data may be retrieved for a focus range which is determined to be the typical focus range. A typical focus range may be based on the habits of a majority of camera users, or the habits of particular sub-sets of users (e.g., those who use their cameras primarily indoors, or those who use their cameras primarily outdoors). The typical focus range may also be based on the habits of a particular camera user determined over time as the camera is used. In any event, focus data may then be retrieved for one or more adjacent focus range if focus data extends from this typical focus range into one or more of the adjacent focus ranges.
In this example, the auto-focus operations begin by retrieving focus data 360 from the first focus range 330, as described above with reference to
The tail of the focus data curve 380 may extend substantially further from the center of the peak 385 than illustrated so that even when a peak occurs at the far left end of the second focus range 340 (e.g., an object is very close to the camera), the tail of the focus peak will still extend into the first focus range 330. There are various filtering techniques that can be used on the focus data that are common to those practiced in the art to control the width of the peak and the amount of the extent of the tail.
In this example, the auto-focus operations begin by retrieving focus data 460 from the first focus range 430, as described above with reference to
Experimental data suggests that when there is a suitable target in the second focus range 440, the user intends to focus on this target even if there are other objects that may be suitable targets in the first focus range 430. Therefore, in an exemplary embodiment, the lens position 470 corresponding to the peak 485 may be used to focus the camera 400 on the target 415 even if there is another peak 465 in the first focus range 430.
In other embodiments, however, the lens position 470 corresponding to the peak 485 may be used to focus the camera 400 on the target 415 only if the focus data 480 in the second focus range 440 is substantially better than the focus data 460 in the first focus range 430. For example, focus data 480 from the second focus range 440 may be unacceptable for focusing the camera lens.
Although the terms “substantially better” and “unacceptable” are relative terms, the definition of these terms can be readily defined by those having ordinary skill in the camera arts based at least in part on various design considerations and/or the expectations of the user(s). These definitions may then be implemented in the firmware, for example, as a threshold. That is, the focus data 480 from the second focus range 440 may be unacceptable (or the focus data 460 from the first focus range 430 may be substantially better) if the threshold is satisfied. For purposes of illustration, the threshold may be defined as a minimum peak height and/or peak width. Other suitable metrics may also be used for defining a threshold value, as will be readily appreciated by those having ordinary skill in the art after becoming familiar with the teachings herein.
In operation 510, focus data is received for different lens positions in a first focus range. For example, the camera lens may be moved to a first lens position in the first focus range for taking a focus-frame, and the focus-frame may be searched for number of edges (or other focus metrics). The camera lens may then be moved to another lens position for taking another focus-frame, and so forth. In operation 520, the focus data is analyzed from the first focus range for focus data from a second focus range extending into the first focus range.
In operation 530, a determination is made whether to analyze focus data from the second focus range. For example, focus data may be analyzed from the second focus range only if analyzing the focus data in the first focus range indicates that there is evidence of a target in the second focus range. There may be a target in the second focus range if focus data in the second focus range extends into the first focus range.
If no focus data extends into the first focus range from the second focus range, it is assumed that that there are no targets in the second focus range and the camera lens may be auto-focused using focus data in the first focus range in operation 540. In an exemplary embodiment, no focus data is retrieved from the second focus range to speed up the auto-focus operations.
If focus data from the second focus range extends into the first focus range, in operation 550 focus data is then received for different lens positions in the second focus range. In operation 560, the camera lens may be auto-focused using focus data in the second focus range. In an exemplary embodiment, focus data from the first focus range may instead be used for the auto-focus operations if focus data from the second focus range is unacceptable for focusing the camera lens. For example, focus data from the first focus range may be used if the focus data from the second focus range does not meet a predetermined threshold (e.g., minimum peak height).
The operations shown and described with reference to
It is noted that the exemplary embodiments shown and described are provided for purposes of illustration and are not intended to be limiting. Still other embodiments are also contemplated for automatically selecting a focus range in cameras.