The invention relates to image processing, and more particularly to automatic focusing of images.
When a camera takes a picture, the focusing length of the camera must be adjusted to make an incident light to be focused on a sensor of the camera. The adjusting process of the focus length is referred to as a focusing process. To make an image to have a high accuracy, the focusing process must precisely focus an incident light on a sensor component of the camera. The focusing process therefore must gradually adjust the focus length and is therefore a time-consuming process.
Ordinary digital cameras have an auto focusing function. A general auto focus function gradually moves a position of a lens to adjust a focus length, and then determines whether clarity of an image projected on a sensor meets a criterion. If the clarity of the image does not meet the criterion, the digital camera again adjusts the position of the lens. The auto focusing function moves the lens with a stepping motor, and the moving of the lens requires a long time period, resulting in a long delay period and degrading performance of the auto focusing function. If the delay is shortened, the performance of the auto focusing function is improved. An auto focusing method is therefore required.
The invention provides an image processing system. In one embodiment, the image processing system comprises a first camera, a second camera, and an image processing device. The first camera photographs an area to generate a first image. The second camera takes a picture of the area to generate a second image, wherein a parallax exists between the first image and the second image. The image processing device comprises a depth map generator and an auto focusing module. The auto focusing module adjusts the focus of the first camera and the second camera according to the parallax.
The invention further comprises an automatic focusing method. In one embodiment, an image processing system comprises a first camera, a second camera, and an auto focusing module. First, an area is photographed by the first camera to generate a first image. The area is photographed by the second camera to generate a second image, wherein a parallax exists between the first image and the second image. Focus lengths of the first camera and the second camera are then adjusted by the auto focusing module according to the parallax.
The following description is of the best-contemplated mode of carrying out the invention. This description is made for the purpose of illustrating the general principles of the invention and should not be taken in a limiting sense. The scope of the invention is best determined by reference to the appended claims:
Referring to
The depth map generator 116 generates a depth map according to parallax between the first image and the second image. There is a parallax between the first image and the second image because the first camera 102 has a different position from that of the second camera 104. The depth map generator 116 then converts the parallax between the first image and the second image into parallax information corresponding to each pixel of the joint image, and further converts the parallax information into distance information corresponding to each pixel of the joint image. In one embodiment, the camera 102 is put towards the same direction as that of the camera 104, and the distance between the cameras 102 and 104 is fixed. Because the distance between the cameras 102 and 104 is fixed, there is a difference between the location of a target object in the first image and the location of the target object in the second image, and the difference is referred to as “visual difference” or “parallax”. The depth map generated by the depth map generator 116 therefore comprises parallax between the first image and the second image.
In one embodiment, the depth map generator 116 selects a target object from the first image and the second image, and determines the parallax of the target object according to a difference between locations of the target object in the first image and the second image. Because the parallax of the target object inversely changes with the distance between the target object and the image processing system 100, the depth map generator 116 then estimates the distance between the target object and the image processing system 100 according to the parallax of the target object. The depth map generator 116 then generates a depth map according to the parallax, wherein the depth map comprises a distance between the target object and the image processing system 100 in the area. In one embodiment, the depth map generator 116 further determines values of focus lengths of the cameras 102 and 104 according to the parallax of the target object in the depth map.
The depth map generated by the depth map generator 116 is then sent to the auto focusing module 118. The auto focusing module 118 then adjusts the focus lengths of the cameras 102 and 104 according to parallax information of the depth map; thereby making the image of the target object focused on the sensors of the cameras 102 and 104. In one embodiment, the auto focusing module 118 comprises a stepping motor for adjusting the focus lengths of the cameras 102 and 104. In one embodiment, the auto focusing module 118 generates focusing control signals to adjust the focus lengths of the cameras 102 and 104. Because the auto focusing module 118 has determined the distance between the target object and the image processing system 100, the auto focusing module 118 directly sets the focus lengths of the cameras 102 and 104 according to the distance between the target object and the image processing system 100. The focusing process of the cameras 102 and 104 is therefore rapid without delays, and the performance of the image processing system 100 is therefore improved.
Referring to
Referring to
After the depth map generator 116 estimates the distance of the target object according to the parallax information of the depth map, the auto focusing module 118 adjusts the focus lengths of the cameras 102 and 104 according to the estimated distance (step 210). Ordinarily, the cameras 102 and 104 have a zoom lens to adjust the location of the lens in the cameras 102 and 104 to change the focus lengths thereof. In one embodiment, the depth map generator 116 estimates values of focus lengths according to the estimated distance of the target object, and the auto focusing module 118, and then sends focusing control signals to the cameras 102 and 104 to adjust the focus lengths of the cameras 102 and 104. The image of the target object is therefore directly projected on the sensors of the cameras 102 and 104. Finally, the auto focusing module 118 then finely tunes the focus lengths of the cameras 102 and 104 to make the clarity of the first image and the second image to meet a criterion (step 212).
Referring to
While the invention has been described by way of example and in terms of preferred embodiment, it is to be understood that the invention is not limited thereto. To the contrary, it is intended to cover various modifications and similar arrangements (as would be apparent to those skilled in the art). Therefore, the scope of the appended claims should be accorded the broadest interpretation so as to encompass all such modifications and similar arrangements.
(
(FIG. 3A/