METHOD FOR MEASURING DEPTH OF FIELD OF IMAGE AND IMAGE PICKUP DEVICE AND ELECTRONIC DEVICE USING THE SAME
20170244952 ยท 2017-08-24
Inventors
Cpc classification
H04N23/45
ELECTRICITY
H04N23/57
ELECTRICITY
H04N2013/0081
ELECTRICITY
H04N23/6812
ELECTRICITY
H04N23/58
ELECTRICITY
International classification
Abstract
The present invention provides a method for measuring depth of field of an image, including: (a) picking up a first image at a first position; (b) driving the optical lens to move to a second position in a direction along a non-optical axis, and picking up a second image at the second position; and (c) obtaining depth-of-field data of either the first image or the second image by using a difference between the first image and the second image. In addition, the present invention also provides an image pickup device and an electronic device using the method.
Claims
1. A method for measuring depth of field of an image, used in an image pickup device having an optical lens, wherein the method for measuring depth of field of an image comprises: (a) picking up a first image at a first position; (b) driving the optical lens to move to a second position in a direction along a non-optical axis, and picking up a second image at the second position; and (c) obtaining a depth-of-field data of either the first image or the second image by using a difference between the first image and the second image.
2. The method for measuring depth of field of an image according to claim 1, wherein in the step (c), the difference between the first image and the second image is obtained by computing a peak signal-to-noise ratio (PSNR).
3. The method for measuring depth of field of an image according to claim 1, wherein in the step (c), the difference between the first image and the second image is obtained by using a mean-residual normalized correlation method (ZNCC).
4. The method for measuring depth of field of an image according to claim 1, wherein the first position and the second position are respectively located at two ends of a maximum tracking distance of the optical lens in the direction along the non-optical axis.
5. An image pickup device, comprising: an optical lens; a driving unit, connected to the optical lens, configured to drive the optical lens to move from a first position to a second position in a direction along a non-optical axis; a sensing element, configured to sense a beam that passes through the optical lens and that is transmitted in the sensing element to obtain a first image when the optical lens is located at the first position, and sense a beam that passes through the optical lens and that is transmitted in the sensing element to obtain a second image when the optical lens is located at the second position; and a computing unit, connected to the sensing element, configured to compute a difference between the first image and the second image to obtain a depth-of-field data of either the first image or the second image.
6. The image pickup device according to claim 5, wherein the driving unit is a motor.
7. The image pickup device according to claim 5, wherein the computing unit computes the difference between the first image and the second image by computing a peak signal-to-noise ratio (PSNR).
8. The image pickup device according to claim 5, wherein the computing unit computes the difference between the first image and the second image by using a mean-residual normalized correlation method (ZNCC).
9. The image pickup device according to claim 5, wherein the first position and the second position are respectively located at two ends of a maximum tracking distance of the optical lens in the direction along the non-optical axis.
10. An electronic device, comprising: a housing; and an image pickup device, disposed in the housing, comprising: an optical lens, at least a part of which is exposed out of the housing; a driving unit, connected to the optical lens, configured to drive the optical lens to move from a first position to a second position in a direction along a non-optical axis; a sensing element, configured to sense a beam that passes through the optical lens and that is transmitted in the sensing element to obtain a first image when the optical lens is located at the first position, and sense a beam that passes through the optical lens and that is transmitted in the sensing element to obtain a second image when the optical lens is located at the second position; and a computing unit, connected to the sensing element, configured to compute a difference between the first image and the second image to obtain a depth-of-field data of either the first image or the second image.
11. The electronic device according to claim 10, wherein the driving unit is a motor.
12. The electronic device according to claim 10, wherein the computing unit computes the difference between the first image and the second image by computing a peak signal-to-noise ratio (PSNR).
13. The electronic device according to claim 10, wherein the computing unit computes the difference between the first image and the second image by using a mean-residual normalized correlation method (ZNCC).
14. The electronic device according to claim 10, wherein the first position and the second position are respectively located at two ends of a maximum tracking distance of the optical lens in the direction along the non-optical axis.
15. The electronic device according to claim 10, wherein the electronic device is a mobile phone, a personal digital assistant device, or a wearable device.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0022]
[0023]
[0024]
[0025]
[0026]
[0027]
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
[0028] First, an image pickup device of the present invention is illustrated. Referring to
[0029] How the image pickup device 2 measures a depth of field is described below. Referring to
[0030] Step S1: the sensing element 22 senses a beam L that passes through the optical lens 21 and that is transmitted to the sensing element 22 to obtain a first image when the optical lens 21 is located at a first position P1. Step S2: the driving unit 24 drives the optical lens 21 to move from the first position P1 to a second position P2 in a direction D along a non-optical axis, so that the sensing element 22 senses the beam L that passes through the optical lens 21 and that is transmitted to the sensing element 22 to obtain a second image. In this preferable embodiment, the first position P1 and the second position P2 are respectively located at two ends of a maximum tracking distance 28 of the optical lens in the direction D along the non-optical axis, that is, a left limitation position and a right limitation position shown in
[0031] Step S3: the computing unit 23 computes a difference between the first image and the second image to obtain a depth-of-field data of the first image or the second image. In this preferable embodiment, the difference between the first image and the second image is obtained by computing a peak signal-to-noise ratio (PSNR). The peak signal-to-noise ratio is an objective standard for evaluating a similarity degree of two images and a higher peak signal-to-noise ratio indicates a smaller image phase difference. However, the above is only an embodiment, and the present invention is not limited thereto. For example, the difference between the first image and the second image may be obtained by using a mean-residual normalized correlation method (ZNCC). In addition, how to obtain depth-of-field data of a first image or a second image by using a difference between the first image and the second image and how to obtain the difference between the first image and the second image by using a peak signal-to-noise ratio or by using a mean-residual normalized correlation method are well known by those ordinarily skilled in the art, which are not described in detail again herein.
[0032] In addition, the existing image pickup device 2 generally is provided with an optical image stabilization (OIS) function. That is, a motion sensor (not shown; for example, a gyro) may be disposed in the image pickup device 2, and the driving unit 24 may drive, according to a sensed result by the motion sensor, the optical lens 21 to move, so as to maintain the optical axis 29 to be perpendicular to the sensing element 22, thereby preventing from photographing a fuzzy image. It needs to be specially noted that if the method for measuring depth of field of an image of the present invention is applied to an image pickup device 2 that is originally provided with an optical image stabilization function, the driving unit 24 that is originally disposed in the image pickup device 2 is directly used to drive the optical lens 21 to move from the first position P1 to the second position P2 in the direction D along the non-optical axis in step S2. Therefore, by using the image pickup device 2 that is originally provided with an optical image stabilization function, a function of measuring a depth of field can be provided without additionally disposing a driving unit 24, thereby not increasing the manufacturing cost.
[0033] Referring to
[0034] As can be known from the above, by the method for measuring depth of field of an image and the image pickup device and the electronic device using the same, depth-of-field data can be obtained by using a single optical lens only. Therefore, a manufacturing cost of the image pickup device can be effectively reduced, and meanwhile, a volume of the image pickup device may not be increased by a large margin, which is beneficial to development of an electronic device using an image pickup device in a trend towards light, thin, short and small.
[0035] The above are only the most preferred embodiments of the present invention, and the present invention needs not be limited to the disclosed embodiments. Therefore, all equivalent changes or modifications included within the spirit and scope of the present invention fall within the scope of the claims of the present invention.