CN102193164A - Focusing method and camera device - Google Patents

Focusing method and camera device Download PDF

Info

Publication number
CN102193164A
CN102193164A CN2010101192320A CN201010119232A CN102193164A CN 102193164 A CN102193164 A CN 102193164A CN 2010101192320 A CN2010101192320 A CN 2010101192320A CN 201010119232 A CN201010119232 A CN 201010119232A CN 102193164 A CN102193164 A CN 102193164A
Authority
CN
China
Prior art keywords
image information
zoom lens
contrast value
distance
focus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2010101192320A
Other languages
Chinese (zh)
Inventor
严志彬
蔡嘉伦
郭力文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Altek Corp
Original Assignee
Altek Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Altek Corp filed Critical Altek Corp
Priority to CN2010101192320A priority Critical patent/CN102193164A/en
Publication of CN102193164A publication Critical patent/CN102193164A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Lens Barrels (AREA)
  • Automatic Focus Adjustment (AREA)

Abstract

本发明提供一种对焦方法及摄像装置。该对焦方法用于具有一变焦镜头的一摄像装置,该方法包括下列步骤:(a)检测该变焦镜头的一起始位置;(b)藉由该变焦镜头撷取该起始位置的影像信息、一第一位置的影像信息以及一第二位置的影像信息;(c)判断该起始位置的影像信息、该第一位置的影像信息以及该第二位置的影像信息之中,何者的影像信息的对比值最高;(d)若该起始位置的影像信息的对比值最高,则藉由该变焦镜头根据该起始位置找出一正确对焦位置;以及(e)若该第一位置的影像信息的对比值最高,则藉由该变焦镜头以相对于该第一位置且以一非等距的对焦距离间隔远离该摄像装置来找出该正确对焦位置。本发明可解决对焦时间过久的缺失。

The present invention provides a focusing method and a camera device. The focusing method is used for a camera device having a zoom lens, and the method comprises the following steps: (a) detecting a starting position of the zoom lens; (b) capturing image information of the starting position, image information of a first position, and image information of a second position by the zoom lens; (c) determining which image information has the highest contrast value among the image information of the starting position, the image information of the first position, and the image information of the second position; (d) if the contrast value of the image information of the starting position is the highest, finding a correct focusing position according to the starting position by the zoom lens; and (e) if the contrast value of the image information of the first position is the highest, finding the correct focusing position by the zoom lens at a distance away from the camera device relative to the first position and at a non-equidistant focusing distance. The present invention can solve the problem of missing the focusing time due to too long.

Description

对焦方法及摄像装置Focusing method and camera device

技术领域technical field

本发明涉及一种对焦方法及摄像装置,特别是一种快速及精确的对焦方法及摄像装置。The invention relates to a focusing method and an imaging device, in particular to a fast and accurate focusing method and an imaging device.

背景技术Background technique

在现有的技术中,相机的S0连续对焦作法是在镜头现在的位置以及稍近和稍远位置分别去计算代表清晰程度的对比值,如果中间位置的对比值最高则认为最清晰的位置在扫瞄的范围内,则采用数学的多项式逼近方法找出最清晰的位置,如果出现在近端或远端则往对比值大的方向移动直到对比值下降,同样采用数学的多项式逼近方法找出最清晰的位置,当找到最清晰的位置后,最清晰位置的对比值会被记录下来以确定场景有没有变化,如果发现变化则重新启动S0连续对焦的程序,如果没有则保持收敛不做动作。In the existing technology, the S0 continuous focusing method of the camera is to calculate the contrast value representing the sharpness at the current position of the lens and the slightly nearer and slightly farther positions. If the contrast value of the middle position is the highest, it is considered that the clearest position is at Within the scanning range, use the mathematical polynomial approximation method to find the clearest position. If it appears at the near or far end, move to the direction where the contrast value is larger until the contrast value decreases. Also use the mathematical polynomial approximation method to find out The clearest position, when the clearest position is found, the contrast value of the clearest position will be recorded to determine whether there is any change in the scene, if there is a change, restart the S0 continuous focusing program, if not, keep converging and do nothing .

然而,以现有的技术无论间距的使用是使用较大的间距或是较小的间距,都有其缺失;较大的间距造成不稳定的晃动感及对焦的精准度会产生问题;较小的间距则会导致慢速的连续对焦,特别是场景由很远处移到非常近端时,由于镜头每一个取样点必须消耗撷取画面帧(frame)的时间,在镜头行程很长的时候,使用较小的间距将消耗许多时间。However, with the existing technology, no matter whether the spacing is used to use a larger spacing or a smaller spacing, there are disadvantages; a larger spacing will cause instability and shaking and focus accuracy will cause problems; If the spacing is too small, it will lead to slow continuous focusing, especially when the scene moves from far away to very close. Since each sampling point of the lens must consume the time of capturing the frame of the picture, when the lens travel is very long , using smaller spacing will consume a lot of time.

因此,有必要提供一种对焦方法及摄像装置,以改善先前技术所存在的缺失。Therefore, it is necessary to provide a focusing method and an imaging device to improve the deficiencies in the prior art.

发明内容Contents of the invention

本发明的主要目的是在提供一种对焦方法及摄像装置,以达到缩减S0连续对焦的时间的效果。The main purpose of the present invention is to provide a focusing method and an imaging device, so as to achieve the effect of shortening the continuous focusing time of S0.

为达到上述的目的,本发明的对焦方法包括下列步骤:检测变焦镜头的起始位置;藉由变焦镜头撷取起始位置的影像信息、第一位置的影像信息以及第二位置的影像信息;其中第一位置相对于起始位置并远离摄像装置,第二位置相对于起始位置并接近摄像装置;判断起始位置的影像信息、第一位置的影像信息以及第二位置的影像信息之中,何者的影像信息的对比值最高;若起始位置的影像信息的对比值最高,则藉由变焦镜头根据起始位置找出正确对焦位置;若第一位置的影像信息的对比值最高,则藉由变焦镜头以相对于第一位置且以非等距的对焦距离间隔远离摄像装置以找出正确对焦位置;以及若第二位置的影像信息的对比值最高,则藉由变焦镜头以相对于第二位置且以非等距的对焦距离间隔接近摄像装置以找出正确对焦位置。In order to achieve the above-mentioned purpose, the focusing method of the present invention includes the following steps: detecting the initial position of the zoom lens; capturing the image information of the initial position, the image information of the first position and the image information of the second position by the zoom lens; Wherein the first position is relative to the initial position and away from the camera device, and the second position is relative to the initial position and close to the camera device; determine the image information of the initial position, the image information of the first position and the image information of the second position , which image information has the highest contrast value; if the contrast value of the image information at the initial position is the highest, the zoom lens is used to find the correct focus position according to the initial position; if the contrast value of the image information at the first position is the highest, then Using the zoom lens to move away from the camera device at a non-equidistant focus distance relative to the first position to find the correct focus position; The second position approaches the camera device at non-equidistant focus distance intervals to find out the correct focus position.

本发明还提供一种对焦方法,用于具有一变焦镜头的一摄像装置,该方法包括下列步骤:(a)检测该变焦镜头的一起始位置;(b)藉由该变焦镜头撷取该起始位置的影像信息、一第一位置的影像信息以及一第二位置的影像信息;(c)判断该起始位置的影像信息、该第一位置的影像信息以及该第二位置的影像信息之中,何者的影像信息的对比值最高;(d)若该起始位置的影像信息的对比值最高,则藉由该变焦镜头根据该起始位置找出一正确对焦位置;以及(e)若该第一位置的影像信息的对比值最高,则藉由该变焦镜头以相对于该第一位置且以一非等距的对焦距离间隔远离该摄像装置以找出该正确对焦位置。The present invention also provides a focusing method for an imaging device with a zoom lens, the method comprising the following steps: (a) detecting a starting position of the zoom lens; (b) capturing the starting position by the zoom lens image information of the initial position, image information of a first position, and image information of a second position; (c) judging the difference between the image information of the initial position, the image information of the first position, and the image information of the second position Among them, which image information has the highest contrast value; (d) if the contrast value of the image information at the starting position is the highest, find a correct focus position based on the starting position through the zoom lens; and (e) if The contrast value of the image information at the first position is the highest, and the correct focus position is found by using the zoom lens to move away from the camera device at a non-equidistant focus distance relative to the first position.

为达到上述的目的,本发明的摄像装置包括变焦镜头、影像分析模块、对焦距离提供模块以及处理模块;其中变焦镜头用以撷取多个位置的影像信息;影像分析模块用以分析多个位置的影像信息的对比值;对焦距离提供模块用以提供非等距及固定距离的对焦距离间隔;处理模块电性连接变焦镜头、影像分析模块以及对焦距离提供模块;藉此,处理模块控制变焦镜头在进行对焦动作时,变焦镜头先以非等距的对焦距离间隔以撷取多个位置的影像信息,影像分析模块判断当各位置的影像信息的对比值上升后,首先下降的位置的影像信息为概略对焦位置;接着再根据概略对焦位置以等距的对焦距离间隔找出正确对焦位置。In order to achieve the above object, the imaging device of the present invention includes a zoom lens, an image analysis module, a focus distance providing module, and a processing module; wherein the zoom lens is used to capture image information of multiple locations; the image analysis module is used to analyze multiple locations The contrast value of the image information; the focus distance providing module is used to provide non-equidistant and fixed distance focus distance intervals; the processing module is electrically connected to the zoom lens, the image analysis module and the focus distance providing module; thereby, the processing module controls the zoom lens When performing the focusing action, the zoom lens first captures the image information of multiple positions at non-equidistant focusing distance intervals, and the image analysis module determines that when the contrast value of the image information of each position increases, the image information of the position that first decreases is the approximate focus position; and then find the correct focus position at equidistant focus distance intervals according to the approximate focus position.

本发明可解决对焦距离间隔皆为使用固定间距而产生变焦镜头的对焦时间过久的缺失。The present invention can solve the problem that the focusing time of the zoom lens is too long due to the use of a fixed distance between the focusing distances.

附图说明Description of drawings

图1为关于本发明的摄像装置的一实施例的架构示意图。FIG. 1 is a schematic structural diagram of an embodiment of an imaging device of the present invention.

图2为本发明的摄像装置的一实施例的示意图。FIG. 2 is a schematic diagram of an embodiment of the imaging device of the present invention.

图3及图4为关于本发明的对焦方法的一实施例的步骤流程图。FIG. 3 and FIG. 4 are flowcharts of steps related to an embodiment of the focusing method of the present invention.

主要组件符号说明:Description of main component symbols:

摄像装置1                 起始位置P0Camera device 1 Initial position P0

变焦镜头10                第一位置P1Zoom lens 10 First position P1

影像分析模块20            第二位置P2Image analysis module 20 Second position P2

对焦距离提供模块30        第三位置P3Focusing distance providing module 30 Third position P3

算法模块40                第四位置P4Algorithm module 40 The fourth position P4

处理模块50processing module 50

具体实施方式Detailed ways

为让本发明的上述和其他目的、特征和优点能更明显易懂,下文特举出较佳实施例,并配合所附附图,作详细说明如下。In order to make the above and other objects, features and advantages of the present invention more comprehensible, preferred embodiments are listed below and described in detail in conjunction with the accompanying drawings.

以下请先参考图1,关于本发明的摄像装置的一实施例的架构示意图。Please refer to FIG. 1 below, which is a schematic structural diagram of an embodiment of the camera device of the present invention.

如图1所示,本发明的摄像装置1包括变焦镜头10、影像分析模块20、对焦距离提供模块30、算法模块40以及处理模块50;其中变焦镜头10用以撷取多个位置的影像信息;影像分析模块20用以分析多个位置的影像信息的对比值;对焦距离提供模块30用以提供非等距及固定距离的对焦距离间隔;处理模块50电性连接变焦镜头10、影像分析模块20、对焦距离提供模块30以及算法模块40,且处理模块50用以控制上述各装置或模块的工作。As shown in FIG. 1 , the imaging device 1 of the present invention includes a zoom lens 10 , an image analysis module 20 , a focus distance providing module 30 , an algorithm module 40 and a processing module 50 ; wherein the zoom lens 10 is used to capture image information of multiple locations. The image analysis module 20 is used to analyze the contrast value of the image information of multiple positions; the focus distance providing module 30 is used to provide non-equidistant and fixed distance focus distance intervals; the processing module 50 is electrically connected to the zoom lens 10 and the image analysis module 20. The focus distance providing module 30 and the algorithm module 40, and the processing module 50 are used to control the work of the above-mentioned devices or modules.

如图2所示,在本发明的一实施例中,本发明的摄像装置1为数码相机,但本发明不以此为限,举例来说,摄像装置1亦可为数码摄像机、照相手机或具有拍照功能的个人数字助理(personal digital assistant,PDA)或其他具有拍照功能的便携式电子装置等。As shown in Figure 2, in one embodiment of the present invention, the imaging device 1 of the present invention is a digital camera, but the present invention is not limited thereto, for example, the imaging device 1 can also be a digital video camera, a camera phone or A personal digital assistant (PDA) with a camera function or other portable electronic devices with a camera function, etc.

以下即以图1及图2所示的本发明的摄像装置1为例,详细说明本发明的对焦方法的各个步骤,但须注意的是,只要能达到本发明的目的,本发明的方法并不以应用在图1及图2所示的摄像装置1为限。须注意的是,在本发明的一实施例中,摄像装置1使用S0连续对焦模式进行对焦动作,但本发明不以应用于连续对焦模式为限。Hereinafter, taking the imaging device 1 of the present invention shown in Fig. 1 and Fig. 2 as an example, each step of the focusing method of the present invention will be described in detail. It is not limited to be applied to the imaging device 1 shown in FIG. 1 and FIG. 2 . It should be noted that, in an embodiment of the present invention, the imaging device 1 uses the S0 continuous focusing mode to perform the focusing operation, but the present invention is not limited to the continuous focusing mode.

请一并参考图1至图4,关于本发明的对焦方法的一实施例,其中图3及图4为关于本发明的对焦方法的一实施例的步骤流程图。Please refer to FIG. 1 to FIG. 4 , regarding an embodiment of the focusing method of the present invention, wherein FIG. 3 and FIG. 4 are flow charts of the steps of an embodiment of the focusing method of the present invention.

如图3所示,本发明首先进行步骤S701:判断是否存在正确对焦位置及正确对焦位置是否未改变。As shown in FIG. 3 , the present invention first proceeds to step S701 : judging whether there is a correct focus position and whether the correct focus position has not changed.

在本发明的一实施例中,正确对焦位置是指变焦镜头10可撷取一场景的最清晰影像的对焦位置,在本发明的一实施例中,处理模块50在进行连续对焦模式前,判断变焦镜头10是否已取得场景的正确对焦位置。In one embodiment of the present invention, the correct focus position refers to the focus position at which the zoom lens 10 can capture the clearest image of a scene. In one embodiment of the present invention, the processing module 50 determines Whether the zoom lens 10 has acquired the correct focus position of the scene.

若不存在正确对焦位置或因摄像装置1移动或是整个场景改变而使正确对焦位置改变,则进行步骤S702:检测变焦镜头的起始位置。If there is no correct focus position or the correct focus position changes due to the movement of the camera device 1 or the change of the whole scene, go to step S702: detect the initial position of the zoom lens.

如图2所示,在本发明的一实施例中,处理模块50检测变焦镜头10的起始位置P0,其中起始位置P0是指变焦镜头10在未进行连续对焦模式前的位置。As shown in FIG. 2 , in an embodiment of the present invention, the processing module 50 detects the initial position P0 of the zoom lens 10 , where the initial position P0 refers to the position of the zoom lens 10 before the continuous focus mode is performed.

接着进行步骤S703:撷取起始位置的影像信息、第一位置的影像信息以及第二位置的影像信息。Then proceed to step S703: capture the image information of the initial location, the image information of the first location, and the image information of the second location.

在本发明的一实施例中,藉由变焦镜头10撷取起始位置P0的影像信息、第一位置P1的影像信息及第二位置P2的影像信息,其中第一位置为P1相对于起始位置P0远离摄像装置1的位置,第二位置P2相对于起始位置P0接近摄像装置1的位置。In an embodiment of the present invention, the image information of the initial position P0, the image information of the first position P1 and the image information of the second position P2 are captured by the zoom lens 10, wherein the first position is relative to the initial position of P1. The position P0 is far away from the position of the camera 1 , and the second position P2 is close to the position of the camera 1 relative to the initial position P0 .

接着进行步骤S704:判断起始位置的影像信息、第一位置的影像信息以及第二位置的影像信息之中,何者的影像信息的对比值最高。Then proceed to step S704: determine which image information has the highest contrast value among the image information at the initial location, the image information at the first location, and the image information at the second location.

在本发明的一实施例中,影像分析模块20用以分析起始位置P0的影像信息、第一位置P1的影像信息以及第二位置P2的影像信息之中,何者的影像信息的对比值最高。在本发明的一实施例中,影像分析模块20以对比值代表场景的影像的清晰程度,对比值越高,代表越清晰,但本发明不以此为限。In an embodiment of the present invention, the image analysis module 20 is used to analyze which image information has the highest contrast value among the image information of the initial position P0, the image information of the first position P1 and the image information of the second position P2 . In an embodiment of the present invention, the image analysis module 20 uses a contrast value to represent the sharpness of the image of the scene. The higher the contrast value, the clearer it is, but the present invention is not limited thereto.

如图4所示,若起始位置P0的影像信息的对比值最高,则进行步骤S705:撷取该位置之前的多个相邻位置的影像信息。As shown in FIG. 4 , if the contrast value of the image information at the starting position P0 is the highest, proceed to step S705 : capture the image information of a plurality of adjacent positions before the position.

在本发明的一实施例中,若起始位置P0的影像信息的对比值最高,起始位置P0即为概略对焦位置,则变焦镜头10撷取在起始位置P0的多个相邻位置的影像信息,其中各相邻位置实质上相距固定距离,此固定距离依据变焦镜头10的制造厂商而定,但本发明不以此为限。举例来说,固定距离亦可为使用者自行设定。In an embodiment of the present invention, if the contrast value of the image information at the initial position P0 is the highest, the initial position P0 is the approximate focus position, and the zoom lens 10 captures images of multiple adjacent positions at the initial position P0. In the image information, the adjacent positions are substantially at a fixed distance, and the fixed distance depends on the manufacturer of the zoom lens 10 , but the present invention is not limited thereto. For example, the fixed distance can also be set by the user.

最后进行步骤S706:使用算法计算各相邻位置的影像信息并找出正确对焦位置。Finally, proceed to step S706: use an algorithm to calculate the image information of each adjacent position and find out the correct focus position.

在本发明的一实施例中,算法模块40用以提供算法并计算出正确对焦位置,其中算法包括数学的多项式逼近方法,将各相邻位置的影像信息的距离与对比值代入算法,以得到最清晰的正确对焦位置,由于利用以算法获得最清晰的正确对焦位置已经在相关技术领域中被广泛使用,且并非本发明所要改进的重点所在,故在此不再赘述其详细的计算原理。In an embodiment of the present invention, the algorithm module 40 is used to provide an algorithm and calculate the correct focus position, wherein the algorithm includes a mathematical polynomial approximation method, and the distance and contrast value of the image information of each adjacent position are substituted into the algorithm to obtain The clearest correct focus position, since the use of algorithms to obtain the clearest correct focus position has been widely used in related technical fields, and is not the focus of the present invention, so its detailed calculation principle will not be repeated here.

如图3所示,在本发明的一实施例中,若第一位置P1的影像信息的对比值最高,则进行步骤S707:撷取第三位置的影像信息。As shown in FIG. 3 , in an embodiment of the present invention, if the contrast value of the image information at the first position P1 is the highest, proceed to step S707 : capture the image information at the third position.

如图2所示,在本发明的一实施例中,若第一位置P1的影像信息的对比值最高,则藉由变焦镜头10撷取第三位置P3的影像信息,其中第三位置P3远离摄像装置1,并相对于第一位置P1相距一移动距离。As shown in FIG. 2 , in one embodiment of the present invention, if the contrast value of the image information at the first position P1 is the highest, the image information at the third position P3 is captured by the zoom lens 10, wherein the third position P3 is far away from The camera device 1 is separated from the first position P1 by a moving distance.

接着进行步骤S708:判断第三位置的影像信息的对比值是否下降。Then proceed to step S708: determine whether the contrast value of the image information at the third position has decreased.

在本发明的一实施例中,影像分析模块20用以判断第三位置P3的影像信息的对比值是否比第一位置P1的影像信息的对比值低。In an embodiment of the present invention, the image analysis module 20 is used to determine whether the contrast value of the image information at the third position P3 is lower than the contrast value of the image information at the first position P1.

若第三位置P3的影像信息的对比值下降,则进行步骤S705:撷取该位置之前的多个相邻位置的影像信息。If the contrast value of the image information at the third position P3 decreases, proceed to step S705: capture image information at a plurality of adjacent positions before the position.

在本发明的一实施例中,若第三位置P3的影像信息的对比值下降,这代表正确对焦位置位于第三位置P3及第一位置P1之间,第三位置P3即为概略对焦位置,则变焦镜头10撷取在第三位置P3之前的多个相邻位置的影像信息,进一步地来说,变焦镜头10撷取在第三位置P3及第一位置P1之间的多个相邻位置的影像信息,其中各相邻位置实质上相距固定距离,此固定距离依据变焦镜头10的制造厂商而定,但本发明不以此为限。In an embodiment of the present invention, if the contrast value of the image information at the third position P3 decreases, it means that the correct in-focus position is located between the third position P3 and the first position P1, and the third position P3 is an approximate in-focus position. Then the zoom lens 10 captures the image information of a plurality of adjacent positions before the third position P3, further speaking, the zoom lens 10 captures the image information of a plurality of adjacent positions between the third position P3 and the first position P1 The image information of the adjacent positions is substantially a fixed distance apart, and the fixed distance depends on the manufacturer of the zoom lens 10, but the present invention is not limited thereto.

在本发明的一实施例中,若第三位置P3的影像信息的对比值升高,则进行步骤S709:将第一位置P1设为起始位置P0,第三位置P3设为第一位置P1,并改变移动距离。In an embodiment of the present invention, if the contrast value of the image information at the third position P3 increases, proceed to step S709: set the first position P1 as the initial position P0, and set the third position P3 as the first position P1 , and change the moving distance.

在本发明的一实施例中,若第三位置P3的影像信息的对比值升高,则代表正确对焦位置位于离第三位置P3的更远处,处理模块50将第一位置P1设为起始位置P0,第三位置P3设为第一位置P1,且新的第三位置P3与新的第一位置P1相距的移动距离增加一等差距离或一等比距离,但本发明不以此为限。在本发明的一实施例中,进行本发明的步骤S709后,接着重复步骤S707。In an embodiment of the present invention, if the contrast value of the image information at the third position P3 increases, it means that the correct focus position is located farther away from the third position P3, and the processing module 50 sets the first position P1 as the starting point. The initial position P0, the third position P3 is set as the first position P1, and the moving distance between the new third position P3 and the new first position P1 is increased by an equal distance or an equal ratio distance, but the present invention does not limit. In an embodiment of the present invention, after step S709 of the present invention is performed, then step S707 is repeated.

在本发明的一实施例中,若第二位置P2的影像信息的对比值最高,则进行步骤S710:撷取第四位置的影像信息。In an embodiment of the present invention, if the contrast value of the image information at the second position P2 is the highest, proceed to step S710: capture the image information at the fourth position.

在本发明的一实施例中,若第二位置P2的影像信息的对比值最高,则藉由变焦镜头10撷取第四位置P4的影像信息,其中第四位置P4接近摄像装置1,并相对于第二位置P2相距一移动距离。In an embodiment of the present invention, if the contrast value of the image information at the second position P2 is the highest, the image information at the fourth position P4 is captured by the zoom lens 10, wherein the fourth position P4 is close to the camera device 1 and relatively There is a movement distance between the second position P2.

接着进行步骤S711:判断第四位置的影像信息的对比值是否下降。Then proceed to step S711 : determine whether the contrast value of the image information at the fourth position decreases.

在本发明的一实施例中,影像分析模块20用以判断第四位置P4的影像信息的对比值是否比第二位置P2的影像信息的对比值低。In an embodiment of the present invention, the image analysis module 20 is used to determine whether the contrast value of the image information at the fourth position P4 is lower than the contrast value of the image information at the second position P2.

若第四位置P4的影像信息的对比值下降,则进行步骤S705:撷取该位置之前的多个相邻位置的影像信息。If the contrast value of the image information at the fourth position P4 decreases, proceed to step S705: capture the image information of a plurality of adjacent positions before the position.

在本发明的一实施例中,若第四位置P4的影像信息的对比值下降,这代表正确对焦位置位于第四位置P4及第二位置P2之间,第四位置P4即为概略对焦位置,则变焦镜头10撷取在第四位置P4之前的多个相邻位置的影像信息,进一步地来说,变焦镜头10撷取在第四位置P4及二位置P2之间的多个相邻位置的影像信息,其中各相邻位置实质上相距固定距离,此固定距离依据变焦镜头10的制造厂商而定,但本发明不以此为限。In an embodiment of the present invention, if the contrast value of the image information at the fourth position P4 decreases, it means that the correct in-focus position is located between the fourth position P4 and the second position P2, and the fourth position P4 is an approximate in-focus position. Then the zoom lens 10 captures image information of a plurality of adjacent positions before the fourth position P4, further speaking, the zoom lens 10 captures image information of a plurality of adjacent positions between the fourth position P4 and the second position P2 In the image information, the adjacent positions are substantially at a fixed distance, and the fixed distance depends on the manufacturer of the zoom lens 10 , but the present invention is not limited thereto.

在本发明的一实施例中,若第四位置P4的影像信息的对比值升高,则进行步骤S712:将第二位置P2设为起始位置P0,第四位置P4设为第二位置P2,并改变移动距离。In one embodiment of the present invention, if the contrast value of the image information at the fourth position P4 increases, proceed to step S712: set the second position P2 as the initial position P0, and set the fourth position P4 as the second position P2 , and change the moving distance.

在本发明的一实施例中,若第四位置P4的影像信息的对比值升高,则代表正确对焦位置位于离第四位置P4与摄像装置1之间,处理模块50将第二位置P2设为起始位置P0,第四位置P4设为第二位置P2,且新的第四位置P4与新的第二位置P相距的移动距离增加一等差距离或一等比距离,但本发明不以此为限。在本发明的一实施例中,进行本发明的步骤S712后,接着重复步骤S710。In an embodiment of the present invention, if the contrast value of the image information at the fourth position P4 increases, it means that the correct focus position is located between the fourth position P4 and the camera device 1, and the processing module 50 sets the second position P2 to is the initial position P0, the fourth position P4 is set as the second position P2, and the moving distance between the new fourth position P4 and the new second position P is increased by an equal difference distance or an equal ratio distance, but the present invention does not This is the limit. In an embodiment of the present invention, after step S712 of the present invention is performed, then step S710 is repeated.

藉由本发明的对焦方法及摄像装置,摄像装置先以非等距的对焦距离间隔以撷取多个位置的影像信息,并得到一概略对焦位置,再根据概略对焦位置以等距的对焦距离间隔以找出正确对焦位置;由于非等距的对焦距离间隔以等差距离或等比距离增加,因此可快速找到概略对焦位置,接着再以等距的对焦距离间隔以找到精准的正确对焦位置,可解决在先前技术中,对焦距离间隔皆为使用固定间距而产生变焦镜头的对焦时间过久的缺失。With the focusing method and camera device of the present invention, the camera device first captures image information of multiple positions at intervals of non-equidistant focus distances, and obtains a rough focus position, and then uses equidistant focus distance intervals according to the rough focus positions to find the correct focus position; since the non-equidistant focus distance intervals are increased by equal distances or proportional distances, it is possible to quickly find an approximate focus position, and then use equidistant focus distance intervals to find the precise correct focus position, It can solve the problem that the focus time of the zoom lens is too long in the prior art because the focus distance intervals are all fixed intervals.

综上所陈,本发明无论就目的、手段及功效,处处均显示其迥异于公知技术的特征,恳请审查员明察,早日赐准专利,使嘉惠社会,实感德便。惟应注意的是,上述诸多实施例仅是为了便于说明而举例而已,本发明所要求保护的权利范围自然应当以权利要求书的范围所述为准,而非仅限于上述实施例。To sum up, the present invention, regardless of its purpose, means, and efficacy, shows its characteristics that are completely different from the known technology. I urge the examiner to be aware of it and grant a patent as soon as possible to benefit the society. I really appreciate it. However, it should be noted that the above-mentioned embodiments are examples only for the convenience of description, and the scope of rights claimed in the present invention should naturally be determined by the scope of the claims, rather than limited to the above-mentioned embodiments.

Claims (12)

1.一种对焦方法,用于具有一变焦镜头的一摄像装置,该方法包括下列步骤:1. A focusing method for a camera with a zoom lens, the method comprising the following steps: (a)检测该变焦镜头的一起始位置;(a) detecting a starting position of the zoom lens; (b)藉由该变焦镜头撷取该起始位置的影像信息、一第一位置的影像信息以及一第二位置的影像信息;(b) capturing the image information of the starting position, the image information of a first position and the image information of a second position by the zoom lens; (c)判断该起始位置的影像信息、该第一位置的影像信息以及该第二位置的影像信息之中,何者的影像信息的对比值最高;(c) judging which image information has the highest contrast value among the image information at the initial location, the image information at the first location, and the image information at the second location; (d)若该起始位置的影像信息的对比值最高,则藉由该变焦镜头根据该起始位置找出一正确对焦位置;以及(d) If the contrast value of the image information at the starting position is the highest, then find a correct focus position based on the starting position through the zoom lens; and (e)若该第一位置的影像信息的对比值最高,则藉由该变焦镜头以相对于该第一位置且以一非等距的对焦距离间隔远离该摄像装置来找出该正确对焦位置。(e) If the contrast value of the image information at the first position is the highest, the correct focus position is found by using the zoom lens to move away from the camera device at a non-equidistant focus distance relative to the first position . 2.如权利要求1所述的对焦方法,其中在步骤(b)中,该第一位置相对于该起始位置远离该摄像装置,且该第二位置相对于该起始位置接近该摄像装置。2. The focusing method according to claim 1, wherein in step (b), the first position is far away from the imaging device relative to the initial position, and the second position is close to the imaging device relative to the initial position . 3.如权利要求1所述的对焦方法,其中步骤(e)还包括下列步骤:3. focusing method as claimed in claim 1, wherein step (e) also comprises the following steps: (f)若该第一位置的影像信息的对比值最高,则藉由该变焦镜头撷取一第三位置的影像信息,其中该第三位置远离该摄像装置,并相对于该第一位置相距一移动距离;(f) If the contrast value of the image information at the first position is the highest, capture image information at a third position through the zoom lens, wherein the third position is far away from the camera device and is far away from the first position a moving distance; (g)判断该第三位置的影像信息的对比值是否下降;(g) judging whether the contrast value of the image information at the third position has decreased; (h)若该第三位置的影像信息的对比值下降,则根据该第三位置找出该正确对焦位置;以及(h) If the contrast value of the image information at the third position decreases, then find the correct focus position according to the third position; and (i)若该第三位置的影像信息的对比值升高,则将该第一位置设为该起始位置,该第三位置设为该第一位置,并重复步骤(f),其中该移动距离增加一等差距离或一等比距离。(i) If the contrast value of the image information at the third position increases, set the first position as the initial position, set the third position as the first position, and repeat step (f), wherein the The movement distance is increased by one scale distance or one scale distance. 4.如权利要求1所述的对焦方法,其中步骤(c)之后,还包括步骤(j):若该第二位置的影像信息的对比值最高,则藉由该变焦镜头以相对于该第二位置且以该非等距的对焦距离间隔接近该摄像装置来找出该正确对焦位置。4. The focusing method according to claim 1, wherein after the step (c), further comprising a step (j): if the contrast value of the image information at the second position is the highest, using the zoom lens with respect to the second position Two positions are approached to the camera device at the non-equidistant focus distance interval to find the correct focus position. 5.如权利要求4所述的对焦方法,其中步骤(j)还包括下列步骤:5. focusing method as claimed in claim 4, wherein step (j) also comprises the following steps: (k)若该第二位置的影像信息的对比值最高,则藉由该变焦镜头撷取一第四位置的影像信息,其中该第四位置接近该摄像装置,并相对于该第二位置相距该移动距离;(k) If the contrast value of the image information at the second position is the highest, capture image information at a fourth position by the zoom lens, wherein the fourth position is close to the camera device and is far away from the second position the distance traveled; (l)判断该第四位置的影像信息的对比值是否下降;(l) judging whether the contrast value of the image information at the fourth position has decreased; (m)若该第四位置的影像信息的对比值下降,则根据该第四位置找出该正确对焦位置;以及(m) If the contrast value of the image information at the fourth position decreases, then find the correct focus position according to the fourth position; and (n)若该第三位置的影像信息的对比值升高,则将该第二位置设为该起始位置,该第四位置设为该第二位置,并重复步骤(k),其中该移动距离增加该等差距离或该等比距离。 (n) If the contrast value of the image information at the third position increases, set the second position as the initial position, set the fourth position as the second position, and repeat step (k), wherein the The movement distance is increased by the geometric difference distance or the geometric ratio distance. the 6.如权利要求3所述的对焦方法,其中步骤(h)还包括下列步骤:6. focusing method as claimed in claim 3, wherein step (h) also comprises the following steps: (o)藉由该变焦镜头撷取该第三位置之前的多个相邻位置的影像信息,其中各相邻位置实质上相距一固定距离;(o) capturing image information of a plurality of adjacent locations before the third location by the zoom lens, wherein each adjacent location is substantially a fixed distance apart; (p)使用一算法计算各相邻位置的影像信息并找出该正确对焦位置。(p) Using an algorithm to calculate the image information of each adjacent position and find out the correct focus position. 7.如权利要求5所述的对焦方法,其中步骤(m)还包括下列步骤:7. focusing method as claimed in claim 5, wherein step (m) also comprises the following steps: (q)藉由该变焦镜头撷取该第四位置之前的该多个相邻位置的影像信息,其中各相邻位置实质上相距该固定距离;以及(q) capturing image information of the plurality of adjacent locations before the fourth location by the zoom lens, wherein each adjacent location is substantially apart from the fixed distance; and (r)使用该算法计算各相邻位置的影像信息并找出该正确对焦位置。(r) Using the algorithm to calculate the image information of each adjacent position and find out the correct focus position. 8.如权利要求3所述的对焦方法,其中在步骤(a)前,还包括下列步骤:8. focusing method as claimed in claim 3, wherein before step (a), also comprise the following steps: (s)判断是否存在该正确对焦位置及该正确对焦位置是否未改变;以及(s) determining whether the correct focus position exists and whether the correct focus position has not changed; and (t)若不存在该正确对焦位置或该正确对焦位置改变,则进行步骤(a)。(t) If the correct focus position does not exist or the correct focus position changes, go to step (a). 9.如权利要求1所述的对焦方法,其中该方法用于一S0连续对焦模式。9. The focusing method as claimed in claim 1, wherein the method is used in an S0 continuous focusing mode. 10.一种摄像装置,包括:10. A camera device, comprising: 一变焦镜头,用以撷取多个位置的影像信息;a zoom lens for capturing image information of multiple positions; 一影像分析模块,用以分析该多个位置的影像信息的对比值;An image analysis module, used to analyze the comparison value of the image information of the multiple locations; 一对焦距离提供模块,用以提供一非等距及一固定距离的对焦距离间隔;以及A focus distance providing module, used for providing a non-equidistant and a fixed focus distance interval; and 一处理模块,电性连接该变焦镜头、该影像分析模块以及该对焦距离提供模块;A processing module, electrically connected to the zoom lens, the image analysis module and the focus distance providing module; 藉此,该处理模块控制该变焦镜头在进行一对焦动作时,该变焦镜头先以该非等距的对焦距离间隔以撷取多个位置的影像信息,该影像分析模块判断当各位置的影像信息的对比值上升后,首先下降的该位置的影像信息为一概略对焦位置;接着再根据该概略对焦位置以该等距的对焦距离间隔找出一正确对焦位置。Thereby, the processing module controls the zoom lens to perform a focusing action, the zoom lens first captures image information of multiple positions at intervals of the non-equidistant focusing distance, and the image analysis module judges when the images of each position After the contrast value of the information increases, the image information of the position that first decreases is a rough focus position; then a correct focus position is found at the equidistant focus distance interval according to the rough focus position. 11.如权利要求10所述的摄像装置,其中该摄像装置还包括:11. The imaging device of claim 10, wherein the imaging device further comprises: 一算法模块,电性连接该处理模块,该算法模块用以提供一算法并计算出一正确对焦位置;An algorithm module, electrically connected to the processing module, the algorithm module is used to provide an algorithm and calculate a correct focus position; 其中,该变焦镜头撷取该概略对焦位置之前的多个相邻位置的影像信息,其中各相邻位置实质上相距该固定距离,藉此,该处理模块控制该算法模块并根据该算法及各相邻位置的影像信息并找出该正确对焦位置。Wherein, the zoom lens captures image information of a plurality of adjacent positions before the rough focus position, wherein each adjacent position is substantially apart from the fixed distance, whereby the processing module controls the algorithm module and according to the algorithm and each Image information of adjacent positions and find out the correct focus position. 12.如权利要求10所述的摄像装置,其中该摄像装置使用一S0连续对焦模式。 12. The camera device as claimed in claim 10, wherein the camera device uses an S0 continuous focusing mode. the
CN2010101192320A 2010-03-08 2010-03-08 Focusing method and camera device Pending CN102193164A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2010101192320A CN102193164A (en) 2010-03-08 2010-03-08 Focusing method and camera device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2010101192320A CN102193164A (en) 2010-03-08 2010-03-08 Focusing method and camera device

Publications (1)

Publication Number Publication Date
CN102193164A true CN102193164A (en) 2011-09-21

Family

ID=44601551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2010101192320A Pending CN102193164A (en) 2010-03-08 2010-03-08 Focusing method and camera device

Country Status (1)

Country Link
CN (1) CN102193164A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105450919A (en) * 2014-07-18 2016-03-30 联想(北京)有限公司 Image acquisition method and image acquisition device
CN105959533A (en) * 2016-04-27 2016-09-21 维沃移动通信有限公司 Focusing method and mobile terminal
CN107783250A (en) * 2016-08-26 2018-03-09 昆山丘钛微电子科技有限公司 Picture pick-up device quick focusing method with automatic focusing function
CN112367442A (en) * 2020-10-29 2021-02-12 维沃移动通信有限公司 Camera lens assembly and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1667481A (en) * 2004-03-08 2005-09-14 普立尔科技股份有限公司 The Fast Focusing Method of Digital Camera
CN101000447A (en) * 2006-01-09 2007-07-18 建兴电子科技股份有限公司 Focusing method of moving a lens to an optimal lens position when photographing a target
CN101089719A (en) * 2006-06-13 2007-12-19 普立尔科技股份有限公司 Focusing method of image capture device
CN101470246A (en) * 2007-12-27 2009-07-01 深圳富泰宏精密工业有限公司 Automatic focusing system and method for projector

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1667481A (en) * 2004-03-08 2005-09-14 普立尔科技股份有限公司 The Fast Focusing Method of Digital Camera
CN101000447A (en) * 2006-01-09 2007-07-18 建兴电子科技股份有限公司 Focusing method of moving a lens to an optimal lens position when photographing a target
CN101089719A (en) * 2006-06-13 2007-12-19 普立尔科技股份有限公司 Focusing method of image capture device
CN101470246A (en) * 2007-12-27 2009-07-01 深圳富泰宏精密工业有限公司 Automatic focusing system and method for projector

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105450919A (en) * 2014-07-18 2016-03-30 联想(北京)有限公司 Image acquisition method and image acquisition device
CN105450919B (en) * 2014-07-18 2019-01-15 联想(北京)有限公司 A kind of image-pickup method and image collecting device
CN105959533A (en) * 2016-04-27 2016-09-21 维沃移动通信有限公司 Focusing method and mobile terminal
CN105959533B (en) * 2016-04-27 2018-11-30 维沃移动通信有限公司 A kind of focusing method and mobile terminal
CN107783250A (en) * 2016-08-26 2018-03-09 昆山丘钛微电子科技有限公司 Picture pick-up device quick focusing method with automatic focusing function
CN112367442A (en) * 2020-10-29 2021-02-12 维沃移动通信有限公司 Camera lens assembly and electronic equipment

Similar Documents

Publication Publication Date Title
CN105659580B (en) A kind of Atomatic focusing method, device and electronic equipment
CN113508420B (en) Object tracking device, object tracking method and storage medium
CN102959586B (en) Depth estimation device and depth estimation method
US20150043826A1 (en) Image processing apparatus, image processing method, and program
JP5483953B2 (en) Focus adjustment device, focus adjustment method and program
CN107787463B (en) The capture of optimization focusing storehouse
JP2012123296A (en) Electronic device
CN106845454B (en) A kind of method of image output feedback
CN103595920A (en) Image collection equipment and auxiliary focusing method and device in zooming process
CN105744151B (en) Face detection method, face detection apparatus, and image pickup apparatus
JP2010251916A (en) Sound data processing device and program
CN105847660A (en) Dynamic zoom method, device and intelligent device
CN107025666A (en) Single-camera-based depth detection method, device, and electronic device
JP5968379B2 (en) Image processing apparatus and control method thereof
CN102193164A (en) Focusing method and camera device
JP2016123044A (en) Subject tracking device, and control method and program therefor
TWI392852B (en) Portable electric device using auto focus for distance measurement and distance measuring method using the same
WO2016184152A1 (en) Measuring method and apparatus, mobile terminal and storage medium
CN104460184B (en) Method and facility for focusing in shooting device
CN110647792B (en) Information processing equipment, control method and storage medium
TWI424247B (en) Focus method and photographic device using the method
CN107045724B (en) Markov judgment method for object moving direction under low resolution
KR102350926B1 (en) Method to control Auto Focus
TWI626602B (en) Image capture and correction method
CN104836997B (en) Method for increasing detection range of image acquisition system and related image acquisition system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20110921