The present invention relates to auto focus. In particular, the present invention relates to an auto focus method that is capable of updating camera parameters based on the analysis of a state, a change of the state or both of the state and the change of the state related to a target window in a camera view.
Auto focus technology has been widely adopted in video camera systems to enable fully automatic focus on a point or region of interest, which can be selected either automatically or manually. Auto focus (hereinafter referred to as AF) is usually performed by half-pressing the shoot button or manually selecting a point or region from a touch screen. AF technology helps to provide accurate focusing on objects of interest quickly without much manual intervention, thus is considered to be a very convenient feature for photographers.
Objects to be photographed or video recorded by a camera may move to any direction in relation to the camera. This relative movement may impose special difficulty for the AF to focus on a target point or region accurately, especially when AF need to be performed continuously. Thus the AF technology has been enhanced to incorporate an object tracking method that tracks an interest region and automatically focus on the selected region from the camera view, which usually contains a portion of predetermined object by a camera operator. From the camera operator's perspective, such a system is capable of continuously tracking an object after half-pressing the shoot button or selecting the object from a touch screen. Picture quality and rate of successful image taking can be significantly improved by incorporating the object tracking method.
In conventional object tracking methods, an object tracking algorithm extracts the target window for the object of interest from the image and calculates the target window for the AF algorithm to control focusing. Then the AF performs scan and search based on the target window information to find the focus peak (or focus position). This process can be slow due to the nature of searching for optimal focus point which usually involves mechanical adjustment in the optical subsystem. It may also fail to track the object when relative movement between object and camera is faster than the focus peak searching process can respond. Fast moving objects can also lead to blurred image, which in turn may result in errors in object tracking and degraded performance of AF. Therefore it is desirable to improve the performance of object tracking methods by providing better information for the AF algorithm to search for focus peak thus reducing the time needed to find focus peak or getting better quality pictures.
One object of the present invention is to provide an AF method to improve the speed or quality of focusing by updating camera parameters based on a state, a state change or both the state and the state change in a target window. A method incorporating an embodiment of the present invention comprises the steps of: receiving an input image formed by an optical subsystem of the camera; selecting a target window corresponding to image content of interest in the input image; determining a state, a change of the state, or both of the state and the change of the state related to the target window; and updating one or more camera parameters based on the state, the change of the state, or both of the state and the change of the state related to the target window.
One aspect of the present invention addresses types of state that can be used for camera focus control. The state can be the size, position, or pose of one or more objects in the target window. The state can also be the behavior or gesture of one or more objects in the target window. The behavior or gesture comprises movement direction, body rotating, turning around and shaking hand. The state can also correspond to the area of one or more regions associated with the target window or associated with one or more objects in the target window. The state can correspond to object motion associated with one or more object in the target window, or the motion field or optical flow associated with the target window. The state can correspond to features extracted from the target window or scales associated with one or more objects in the target window. The state can correspond to the description of the image content of interest derived from the target window, or one or more segmented regions or deformable object contour associated with the target window.
According to one embodiment of the current invention, the state, the state change or both provides search direction and number of focusing steps for AF. If the state, the state change or both indicates that the object(s) in the target window is moving toward the camera, the camera focus is updated toward Macro. On the other hand, if the state, the state change or both indicates that the object(s) in the target window is moving away from the camera, the camera focus is updated toward Infinity. Number of focusing steps can also be determined by the change size associated with the state, the state of change or both.
Traditional object tracking provides information to the AF algorithm to track the target window or a selected region thereof to assist auto focusing. The information usually includes the designated target window only, such as the location and shape of the target window in the image. Based on the information, the AF algorithm performs original scan approaches and searches to find the focus peak in which the best position for focusing is located (focus position). However, the search for focus back and forth may limit the focus speed. In situations when the objects in the target window exhibit rapid change, quality of the image captured may be degraded significantly due to the incapability of tracking objects for AF.
Therefore it is an objective of the present invention to provide an auto focusing method to improve the speed or quality of focusing.
To accomplish the above mentioned objective, an AF method based on the analysis of the image content in a target window to determine a state, a state change or both the state and the state change related to a target window is disclosed, as shown by the flow chart in
By determining a state, a state change or both based on the analysis of the image content in the target window, the relative movement between the object of interest and the camera can be estimated and be used for focusing or adjusting other camera parameters. When the distance between an object of interest and a camera changes, the size of the object in the image becomes bigger or smaller correspondingly. Therefore, the size change of one or more objects in the target window is an indication of the search direction for the next focus peak. Furthermore, the size change of the objects can also be used as an initial guess of the number of steps to search for next focus peak by the AF algorithm.
The image size change trend (to be bigger or smaller) of one or more objects analyzed can be supplied to the AF algorithm to control the camera focus searching direction moving backward to Macro or forward to Infinity. For example, when the size of object 421 in the next image frame 420 is bigger than that of object 411 in image frame 410 as shown in
The determination of the size, the size change or both of one or more objects in a target window can also provide the information for the step size of focusing. The size and the size change of the object reflect the distance and distance change between the object and the camera. Thus the determination or analysis of the size and the size change can provide information for the AF algorithm to estimate the steps for finding focus peak. For example, the size change of object 610 in
Besides object tracking based on the size, the size change or both of one or more objects in the target window, optical flow or motion field associated with the target window or object motion of one or more objects in the target window can also be used to determine a state, a change of state or both of one or more objects. According to one embodiment, image content is analyzed for determining object motion associated with one object, or determining optical flow or motion field associated with the object(s) in the target window or associated with the target window to provide information for focusing. Such as the example shown in
While, in some situations, to determine the state, the state change or both of one or more objects in the target window may incur high computational cost which decelerates focusing speed, to analyze image content with optical flow or motion field may also incur high computational cost or generate wrong results for object tracking In order to speed up focusing speed of a camera in such situations, an embodiment according to the present invention determines a state, a state change or both by analyzing certain features extracted from the target window or scales associated with one or more objects in the target window. By analyzing extracted features or estimating the scale change (such as gradient change, edge change, or texture change, etc.) of one or more objects in the target window, the relative movement between the object of interest and the camera can be estimated for AF. For example shown in
In one embodiment of the present invention, description of the image content of interest derived from the target window is analyzed to determine the state, the state change or both related to the target window for focusing. The description of the image content of the same characteristics can be represented by image attributes, such as color, texture or gradient. The areas in two frames having the same image attributes can be used for AF control. For example, area 911 of frame 910 has the same characteristic as area 921 of next frame 920 and the corresponding area sizes are Al and A2 respectively as shown in
According to one embodiment of the present invention, determining a state, a state change or both can also be based on the analysis of one or more segmented regions or deformable object. The regions or deformable objects in an image can be determined using known segmentation techniques such as region growing (region-based segmentation) or active contour model (also called snake). As shown by the example in
In order to reduce the computational cost, determining a state, a state change or both related to the target window can also be based on one or more selected regions in the target window instead of determination based on the target window. In one embodiment according to the present invention, a selected region in the target window is detected and then a state, a state change of this selected region, or both are determined during object tracking to provide information for focusing.
The present invention may also be embodied in other specific forms without departing from its spirit or essential characteristics. The described examples are to be considered in all respects only as illustrative and not restrictive. The scope of the present invention is therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.