Movatterモバイル変換


[0]ホーム

URL:


CN102841486B - Automatic focusing method for digital optical imaging system based on bilateral forecasting intersection - Google Patents

Automatic focusing method for digital optical imaging system based on bilateral forecasting intersection
Download PDF

Info

Publication number
CN102841486B
CN102841486BCN201210323164.9ACN201210323164ACN102841486BCN 102841486 BCN102841486 BCN 102841486BCN 201210323164 ACN201210323164 ACN 201210323164ACN 102841486 BCN102841486 BCN 102841486B
Authority
CN
China
Prior art keywords
evaluation function
optical imaging
imaging system
criteria function
curve
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.)
Active
Application number
CN201210323164.9A
Other languages
Chinese (zh)
Other versions
CN102841486A (en
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.)
Chongqing Future Muxing Information Technology Co.,Ltd.
Original Assignee
Chongqing University
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 Chongqing UniversityfiledCriticalChongqing University
Priority to CN201210323164.9ApriorityCriticalpatent/CN102841486B/en
Publication of CN102841486ApublicationCriticalpatent/CN102841486A/en
Application grantedgrantedCritical
Publication of CN102841486BpublicationCriticalpatent/CN102841486B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Landscapes

Abstract

Translated fromChinese

本发明涉及数字光学成像系统自动调焦方法,包括:对调焦评价函数曲线峰值位置左、右两侧的调焦评价函数曲线分别进行独立采样和预测;计算预测左、右调焦评价函数曲线的交点或预测左、右离散调焦评价函数值序列中相同位置的调焦评价函数值之差的绝对值的最小值位置;控制执行机构移动数字光学成像系统的焦平面到交点或最小值位置(聚焦位置)。本发明在包含峰值位置区域的左、右侧邻域独立采样和预测,能够避免基于曲线拟合的自动调焦方法中将实际不对称的调焦评价函数曲线当作对称曲线带来的原理性误差和快速爬山法在峰值附近可能出现的摆动搜索过程。双侧预测求交自动调焦方法的调焦精度受采样步长的影响小,具有较高的调焦精度和速度。

The invention relates to an automatic focusing method for a digital optical imaging system, comprising: independently sampling and predicting the focusing evaluation function curves on the left and right sides of the peak position of the focusing evaluation function curve; calculating and predicting the left and right focusing evaluation function curves intersection point or the minimum value position of the absolute value of the difference between the focus evaluation function values at the same position in the left and right discrete focus evaluation function value sequences; the control actuator moves the focal plane of the digital optical imaging system to the intersection point or the minimum value position (focus position). The present invention independently samples and predicts the left and right neighborhoods containing the peak position area, and can avoid the principle of using the actual asymmetric focusing evaluation function curve as a symmetrical curve in the automatic focusing method based on curve fitting Error and fast hill-climbing for a possible wiggle search process around the peak. The focusing accuracy of the two-sided predictive intersection automatic focusing method is less affected by the sampling step size, and has higher focusing accuracy and speed.

Description

Translated fromChinese
基于双侧预测求交的数字光学成像系统自动调焦方法Automatic Focusing Method of Digital Optical Imaging System Based on Bilateral Predictive Intersection

技术领域technical field

本发明涉及自动控制技术领域,尤其涉及数字光学成像系统自动调焦方法。The invention relates to the technical field of automatic control, in particular to an automatic focusing method for a digital optical imaging system.

背景技术Background technique

近年来,随着电子技术和计算机技术的发展和进步,特别CCD、CMOS等数字成像器件制造技术的成熟和应用,数字光学成像系统在人类的生活和科学研究中均得到了广泛的应用。在数字光学成像系统的众多技术中,自动调焦方法是影响数字光学成像系统的成像质量和效率的关键技术之一。自动调焦技术一般可分为主动自动调焦法和被动自动调焦法。主动自动调焦法由于需要额外的光路或测距设备,导致系统复杂、成本高。基于图像处理的被动自动调焦方法无需额外设备,利于设备的集成化和微型化,可以大幅度降低设备成本和设备复杂度。因此,基于图像处理的自动调焦方法在数字光学成像系统中得到了广泛的应用。In recent years, with the development and progress of electronic technology and computer technology, especially the maturity and application of digital imaging device manufacturing technologies such as CCD and CMOS, digital optical imaging systems have been widely used in human life and scientific research. Among the many technologies of the digital optical imaging system, the automatic focusing method is one of the key technologies that affect the imaging quality and efficiency of the digital optical imaging system. The auto-focus technology can generally be divided into an active auto-focus method and a passive auto-focus method. The active auto-focus method requires additional optical path or distance measuring equipment, resulting in complex system and high cost. The passive auto-focusing method based on image processing does not require additional equipment, is conducive to the integration and miniaturization of equipment, and can greatly reduce equipment cost and equipment complexity. Therefore, the automatic focusing method based on image processing has been widely used in digital optical imaging systems.

基于图像处理的自动调焦技术主要解决评价图像像素信息的调焦评价函数和搜索聚焦位置的自动调焦方法两个问题。长期以来,由于自动调焦过程的不可预知性,研究者主要侧重于调焦评价函数的研究,而针对自动调焦方法的研究则较少。现有的自动调焦方法可以分为3大类:The automatic focusing technology based on image processing mainly solves two problems of focusing evaluation function for evaluating image pixel information and automatic focusing method for searching focus position. For a long time, due to the unpredictability of the automatic focusing process, researchers mainly focus on the research of the focusing evaluation function, while the research on the automatic focusing method is less. Existing autofocus methods can be divided into three categories:

第一类是应用爬山法及其改进方法搜索调焦评价函数曲线峰值位置的方法。Ooi等人(IEEE Transactions on Consumer Electronics,Vol.36,No.3,526-530,1990)用爬山法实现了自动聚焦。He等人(IEEE Transactions onConsumer Electronics,Vol.49,No.2,257-262,2003)在调焦过程中根据当前和上一个调焦评价函数值的差异动态地改变调焦步长提出了一种改进的快速爬山法。Yoon和Park(International Journal of Advanced ManufacturingTechnology,Vol.43,No.3,287-293,2009)采用最大最小差分法和两阶段的搜索算法实现了爬山法,这种方法无需滤波器就可以减小冲击噪声的影响。爬山法最主要的问题是调焦速度慢、峰值附近的搜索可能是一个摆动过程和存在离焦的可能性。The first category is the method of searching the peak position of the focusing evaluation function curve by using the hill-climbing method and its improved method. Ooi et al. (IEEE Transactions on Consumer Electronics, Vol.36, No.3, 526-530, 1990) used the hill climbing method to realize automatic focusing. He et al. (IEEE Transactions on Consumer Electronics, Vol.49, No.2, 257-262, 2003) proposed an improvement to dynamically change the focusing step size according to the difference between the current and the previous focusing evaluation function value during the focusing process. fast climbing method. Yoon and Park (International Journal of Advanced Manufacturing Technology, Vol.43, No.3, 287-293, 2009) used the maximum and minimum difference method and a two-stage search algorithm to realize the hill climbing method, which can reduce the impact noise without a filter Impact. The main problem of the hill-climbing method is that the focus speed is slow, the search near the peak may be a swing process and the possibility of defocusing exists.

第二类是应用二分搜索法和Fibonacci搜索法(Fifth InternationalConference on Image Processing and its Applications,pp.232-235,1995)搜索调焦评价函数曲线峰值位置的方法。二分搜索法和Fibonacci搜索法具有易受噪声干扰、镜头运动距离过长和移动显微镜的执行器往复运动多次引入空回误差等缺点,限制了它们在实际中的应用。The second category is the method of searching for the peak position of the focusing evaluation function curve by using the binary search method and the Fibonacci search method (Fifth International Conference on Image Processing and its Applications, pp. 232-235, 1995). Binary search method and Fibonacci search method have disadvantages such as being susceptible to noise interference, long lens movement distance, and the reciprocating motion of the actuator of the moving microscope, which introduces space-back errors many times, which limits their practical application.

第3类是应用曲线拟合获得调焦评价函数曲线峰值位置的方法。Yazdanfar等人(Optics Express,Vol.16,No.12,8670-8677,2008)提出了一种将2-3幅图像的调焦评价函数值代入经验函数确定聚焦位置的自动调焦方法,该方法将Brenner调焦评价函数和曲线拟合相结合,只需要不超过3幅图像就可以获得聚焦位置。基于曲线拟合的自动调焦方法大多假设非对称的实际调焦评价函数曲线关于峰值位置对称,这将引入原理性误差。The third category is the method of applying curve fitting to obtain the peak position of the focusing evaluation function curve. Yazdanfar et al. (Optics Express, Vol.16, No.12, 8670-8677, 2008) proposed an automatic focusing method that substitutes the focusing evaluation function values of 2-3 images into empirical functions to determine the focus position. The method combines the Brenner focusing evaluation function and curve fitting, and only needs no more than 3 images to obtain the focus position. Most of the automatic focusing methods based on curve fitting assume that the asymmetric actual focusing evaluation function curve is symmetrical about the peak position, which will introduce a principle error.

综上所述,如何提高数字光学成像系统的自动调焦的准确性和效率依然是广泛关注的问题,其中新原理的自动调焦方法是解决问题的关键之一。To sum up, how to improve the accuracy and efficiency of automatic focusing of digital optical imaging systems is still a problem of widespread concern, and the automatic focusing method of new principles is one of the keys to solve the problem.

发明内容Contents of the invention

有鉴于此,本发明的目的是提供一种可提高数字光学成像系统的自动调焦的准确性和效率的基于双侧预测求交的数字光学成像系统自动调焦方法。In view of this, the purpose of the present invention is to provide a digital optical imaging system automatic focusing method based on double-sided predictive intersection that can improve the accuracy and efficiency of the automatic focusing of the digital optical imaging system.

本发明的目的是通过以下技术方案来实现的:基于双侧预测求交的数字光学成像系统自动调焦方法,包括如下步骤:The object of the present invention is achieved through the following technical solutions: the digital optical imaging system automatic focusing method based on bilateral prediction and intersecting comprises the following steps:

1)对调焦评价函数曲线峰值位置左、右两侧的调焦评价函数曲线分别进行独立的采样和预测;1) Independently sample and predict the focusing evaluation function curves on the left and right sides of the peak position of the focusing evaluation function curve;

2)计算预测的左、右调焦评价函数曲线的交点或预测的左、右离散调焦评价函数值序列中相同位置的调焦评价函数值之差的绝对值的最小值位置;2) Calculating the intersection point of the predicted left and right focusing evaluation function curves or the position of the minimum value of the absolute value of the difference between the focusing evaluation function values at the same position in the predicted left and right discrete focusing evaluation function value sequence;

3)控制执行机构移动数字光学成像系统的焦平面到该交点或最小值位置(聚焦位置)。3) Control the actuator to move the focal plane of the digital optical imaging system to the intersection point or minimum position (focus position).

进一步,所述步骤1)具体包括如下步骤:Further, the step 1) specifically includes the following steps:

11)确定包含调焦评价函数曲线峰值位置的区域,将其的左、右侧邻域作为左、右采样区域;11) Determine the area containing the peak position of the focusing evaluation function curve, and use its left and right neighborhoods as left and right sampling areas;

12)在数字光学成像系统的焦平面所在的采样区域内进行图像采样和评价,用获得调焦评价函数值和相应的采样位置构造用于预测的样本点序列;12) Perform image sampling and evaluation in the sampling area where the focal plane of the digital optical imaging system is located, and use the obtained focusing evaluation function value and corresponding sampling position to construct a sample point sequence for prediction;

13)通过获得的样本点序列和该侧的预测模型预测该侧的调焦评价函数曲线或离散的调焦评价函数值序列;13) Predict the focus evaluation function curve or discrete focus evaluation function value sequence of the side through the obtained sample point sequence and the prediction model of the side;

14)将数字光学成像系统的焦平面移动到调焦评价函数曲线峰值位置另一侧的采样区域,在该采样区域内进行图像采样和评价,用获得调焦评价函数值和相应的采样位置构造样本点序列。14) Move the focal plane of the digital optical imaging system to the sampling area on the other side of the peak position of the focusing evaluation function curve, perform image sampling and evaluation in this sampling area, and use the obtained focusing evaluation function value and the corresponding sampling position to construct sequence of sample points.

15)通过获得的样本点序列和该侧的预测模型预测该侧的调焦评价函数曲线或离散的调焦评价函数值序列。15) Predict the focus evaluation function curve or the discrete focus evaluation function value sequence of the side through the obtained sample point sequence and the prediction model of the side.

进一步,若步骤1)中获得的预测数据为调焦评价函数曲线,则步骤2)中计算预测的左、右调焦评价函数曲线的交点,步骤3)中控制执行机构移动数字光学成像系统的焦平面到该交点。Further, if the predicted data obtained in step 1) is the focusing evaluation function curve, then in step 2) calculate the intersection point of the predicted left and right focusing evaluation function curves, and in step 3) control the actuator to move the digital optical imaging system The focal plane to this intersection point.

进一步,若步骤1)中获得的预测数据为离散调焦评价函数值序列,则步骤2)中计算预测的左、右离散调焦评价函数值序列中相同位置的调焦评价函数值之差的绝对值的最小值位置,步骤3)中控制执行机构移动数字光学成像系统的焦平面到该最小值位置。Further, if the predicted data obtained in step 1) is a sequence of discrete focusing evaluation function values, then in step 2), calculate the difference between the value of the focusing evaluation function at the same position in the predicted left and right discrete focusing evaluation function value sequences The position of the minimum value of the absolute value, in step 3), the actuator is controlled to move the focal plane of the digital optical imaging system to the position of the minimum value.

与现有技术相比,本发明的基于双侧预测求交的数字光学成像系统自动调焦方法具有如下优点:Compared with the prior art, the automatic focusing method of the digital optical imaging system based on bilateral prediction and intersection of the present invention has the following advantages:

1.本发明通过在调焦评价函数曲线峰值位置左、右侧分别预测左、右调焦评价函数曲线,避免了函数拟合法中假设非对称的实际调焦评价函数曲线为对称曲线所带来的原理性误差。1. The present invention predicts the left and right focusing evaluation function curves respectively on the left and right sides of the peak position of the focusing evaluation function curve, avoiding the assumption that the asymmetric actual focusing evaluation function curve is a symmetric curve in the function fitting method. principled error.

2.本发明采用计算预测的左、右调焦评价函数曲线的交点确定聚焦位置,避免了快速爬山法中在峰值位置附件可能出现的摆动搜索过程。2. The present invention adopts the intersection point of calculated and predicted left and right focusing evaluation function curves to determine the focus position, which avoids the swing search process that may occur near the peak position in the fast hill climbing method.

3.本发明采用预测值代替实际的调焦评价函数值,能有效减少图像采集和调焦评价函数计算次数,具有较高的调焦效率。3. The present invention uses the predicted value instead of the actual focusing evaluation function value, which can effectively reduce the number of times of image acquisition and focusing evaluation function calculation, and has higher focusing efficiency.

4.本发明采用预测的方法获取数字光学成像系统的聚焦位置,调焦精度受采样步长的影响小,具有高的调焦精度和调焦效率。4. The present invention adopts a prediction method to obtain the focus position of the digital optical imaging system, and the focus precision is less affected by the sampling step length, and has high focus precision and focus efficiency.

5.本发明中可以选用各种调焦评价函数来评价图像像素信息,可以使用具有少数采样点预测多个预测点功能的各种预测方法,两个采样区域内使用的预测方法和采样步长可以不一致,使本发明的方法更灵活,适用范围广泛。5. In the present invention, various focusing evaluation functions can be selected to evaluate the image pixel information, various prediction methods with a small number of sampling points can be used to predict multiple prediction points, and the prediction method and sampling step size used in the two sampling areas It can be inconsistent, so that the method of the present invention is more flexible and has a wide range of applications.

本发明的其他优点、目标和特征在某种程度上将在随后的说明书中进行阐述,并且在某种程度上,基于对下文的考察研究对本领域技术人员而言将是显而易见的,或者可以从本发明的实践中得到教导。本发明的目标和其他优点可以通过下面的说明书和权利要求书来实现和获得。Other advantages, objects and features of the present invention will be set forth in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the investigation and research below, or can be obtained from It is taught in the practice of the present invention. The objects and other advantages of the invention will be realized and attained by the following description and claims.

附图说明Description of drawings

图1是理想的调焦评价函数曲线图;Fig. 1 is ideal focusing evaluation function curve diagram;

图2是基于双侧预测求交的数字光学成像系统自动调焦方法的原理示意图,其中图2(a)是确定左、右采样区域的示意图,图2(b)是在LSA采样和预测的示意图,图2(c)是在RSA采样和预测的示意图,图2(d)是当预测结果是调焦评价函数曲线时预测的左右调焦评价函数的交点的示意图,图2(e)是当预测结果是调焦评价函数值和相应的位置构造的离散点序列时预测的获取系列中最小值对应的位置的示意图;Figure 2 is a schematic diagram of the principle of an automatic focusing method for digital optical imaging systems based on bilateral prediction and intersection, where Figure 2(a) is a schematic diagram of determining the left and right sampling areas, and Figure 2(b) is the sampling and prediction in LSA Schematic diagram, Figure 2(c) is a schematic diagram of sampling and prediction in RSA, Figure 2(d) is a schematic diagram of the intersection point of the predicted left and right focusing evaluation functions when the prediction result is a focusing evaluation function curve, Figure 2(e) is When the predicted result is a sequence of discrete points constructed with focusing merit function values and corresponding positions Schematic diagram of the position corresponding to the minimum value in ;

图3是实施例1的流程示意图;Fig. 3 is the schematic flow sheet of embodiment 1;

图4是本发明实施例1的程序流程示意图,其中图4(a)是主程序流程图,图4(b)是7点爬山法确定包含峰值位置区域的流程图,图4(c)是更新样本点的流程图;Fig. 4 is the program flow schematic diagram of embodiment 1 of the present invention, wherein Fig. 4 (a) is main program flow chart, Fig. 4 (b) is the flow chart that 7-point mountain climbing method determines to include the peak position area, Fig. 4 (c) is Flowchart for updating sample points;

图5是实施例2的流程示意图;Fig. 5 is the schematic flow sheet of embodiment 2;

图6是实施例3的流程示意图;Fig. 6 is the schematic flow sheet of embodiment 3;

图7是实施例4的流程示意图。FIG. 7 is a schematic flow chart of Embodiment 4.

具体实施方式Detailed ways

以下将对本发明的优选实施例进行详细的描述。应当理解,优选实施例仅为了说明本发明,而不是为了限制本发明的保护范围。Preferred embodiments of the present invention will be described in detail below. It should be understood that the preferred embodiments are only for illustrating the present invention, but not for limiting the protection scope of the present invention.

参见图1,从图1所示的一种表征调焦过程的调焦评价函数曲线可知,曲线峰值位置sp和曲线峰值位置邻域最左边位置和最右边位置sl和sr组成的两个区域,[sl sp]和[sp sr],可以当作曲线峰值位置的左、右邻域。因此,峰值位置左、右邻域内的左、右调焦评价函数曲线fl(s)和fr(s)可表示为Referring to Fig. 1, it can be known from a focusing evaluation function curve representing the focusing process shown in Fig. 1 that the peak position sp of the curve and the leftmost position and rightmost position sl and sr in the vicinity of the peak position of the curve are composed of two The regions, [slsp ] and [sp sr ], can be regarded as the left and right neighbors of the peak position of the curve. Therefore, the left and right focusing evaluation function curves fl (s) and fr (s) in the left and right neighborhood of the peak position can be expressed as

ffll((sthe s))==FVFV((sthe s))sthe s∈∈sthe sllsthe sppffrr((sthe s))==FVFV((sthe s))sthe s∈∈sthe sppsthe srr------((11))

式中FV(s)为在采样位置s处的采样图像的调焦评价函数值。根据图1和式(1),调焦评价函数曲线的峰值位置可以看作是左、右两条调焦评价函数曲线fl(s)和fr(s)的交点位置。In the formula, FV(s) is the focusing evaluation function value of the sampled image at the sampling position s. According to Figure 1 and formula (1), the peak position of the focusing evaluation function curve can be regarded as the intersection position of the left and right focusing evaluation function curves fl (s) and fr (s).

针对调焦评价函数曲线的上述特征,本发明提出的双侧预测和求交自动调焦方法确定包含调焦评价函数曲线峰值位置的区域和该区域的左、右邻域,并将这个左、右邻域确定为左、右采样区域(LSA和RSA);根据能表示调焦评价函数曲线峰值位置两侧的曲线发展趋势的预测模型和分别在LSA和RSA内获得的采样图像的调焦评价函数值和相应的采样位置构造的两个样本点序列预测峰值位置左、右侧的调焦评价函数曲线;获得预测的左、右调焦评价函数曲线的交点并控制执行机构移动焦平面到该交点实现自动调焦。For the above-mentioned characteristics of the focusing evaluation function curve, the bilateral prediction and intersection automatic focusing method proposed by the present invention determines the area containing the peak position of the focusing evaluation function curve and the left and right neighbors of the area, and the left, right The right neighborhood is determined as the left and right sampling areas (LSA and RSA); according to the prediction model that can represent the curve development trend on both sides of the peak position of the focus evaluation function curve and the focus evaluation of the sampling images obtained in LSA and RSA respectively The function value and the corresponding sampling position construct two sample point sequences to predict the focusing evaluation function curves on the left and right sides of the peak position; obtain the intersection point of the predicted left and right focusing evaluation function curves and control the actuator to move the focal plane to this The intersection point realizes automatic focusing.

该方法的技术方案是这样实现的:The technical scheme of this method is realized like this:

首先,如图2(a)所示,根据现有的方法获得包含峰值位置的区域(spl spr)和该区域的左、右邻域[sl spl]和[spr sr],将该区域的左、右邻域当作LSA和RSA。First, as shown in Figure 2(a), the region containing the peak position (spl spr ) and its left and right neighbors [sl spl ] and [spr sr ] are obtained according to existing methods , the left and right neighbors of the area are regarded as LSA and RSA.

其次,如图2(b)和图2(c)所示,通过评估分别以一定的采样步长在LSA和RSA内获得的采样图像,获得两个样本点系列S1和Sr,可分别表示为Second, as shown in Fig. 2(b) and Fig. 2(c), by evaluating the sampled images obtained in LSA and RSA respectively with a certain sampling step size, two series of sample points S1 and Sr are obtained, which can be respectively Expressed as

Sl={(sl(1),FVl(1)),(sl(2),FVl(2)),…,(sl(n),FVl(n))}n∈N*    (2)Sl ={(sl (1),FVl (1)),(sl (2),FVl (2)),…,(sl (n),FVl (n))}n∈ N* (2)

Sr={(sr(1),FVr(1)),(sr(2),FVr(2)),…,(sr(m),FVr(m))}m∈N*    (3)Sr ={(sr (1),FVr (1)),(sr (2),FVr (2)),…,(sr (m),FVr (m))}m∈ N* (3)

式中n和m分别是Sl和Sr的样本点数量,(sl(i)FVl(i))和(sr(i)FVr(i))分别表示S1和Sr的第i个样本点,对Sl和Sr而言,i≤n和m,其中sl(i)和FVl(i)表示Sl的第i个样本点的采样位置和调焦评价函数值,sr(i)和FVr(i)表示Sr的第i个样本点的采样位置和调焦评价函数值,N*表示正整数。考虑预测模型形式为where n and m are the number of sample points of Sl and Sr respectively, (sl (i)FVl (i)) and (sr( i)FVr (i)) representthe For the i-th sample point, for Sl and Sr , i≤n and m, where sl (i) and FVl (i) represent the sampling position and focusing evaluation function of the i-th sample point of Sl value, sr (i) and FVr (i) represent the sampling position and focusing evaluation function value of the i-th sample point of Sr , and N* represents a positive integer. Consider the predictive model in the form of

ff^^((sthe s))==ff((sthe s))------((44))

式中f(s)和分别表示预测模型和预测结果。预测结果是预测调焦评价函数曲线或预测的调焦评价函数值和相应的预测位置构造的离散点序列,根据式(4)和采样系列Sl和Sr,计算预测的左、右调焦评价函数曲线或预测的左、右侧的离散点序列其中分别可表示为where f(s) and represent the prediction model and prediction results, respectively. forecast result is the predicted focusing evaluation function curve or the predicted focusing evaluation function value and the discrete point sequence constructed by the corresponding predicted position, according to formula (4) and sampling series Sl and Sr , calculate the predicted left and right focusing evaluation functions curve and or a sequence of discrete points to the left and right of the prediction and in and respectively can be expressed as

ff^^lplp=={{((sthe s^^ll((11)),,FfVV^^ll((11)))),,((sthe s^^ll((22)),,FfVV^^ll((22)))),,......,,((sthe s^^ll((nno)),,FfVV^^ll((hh))))}}hh∈∈NN**------((44))

ff^^rprp=={{((sthe s^^rr((11)),,FfVV^^rr((11)))),,((sthe s^^rr((22)),,FfVV^^rr((22)))),,......,,((sthe s^^rr((mm)),,FfVV^^rr((hh))))}}hh∈∈NN**------((55))

最后,如果预测结果是预测调焦评价函数曲线,那么如图2(d)所示,预测的左、右调焦评价函数曲线的交点满足Finally, if the prediction result is the predicted focusing evaluation function curve, then as shown in Figure 2(d), the intersection of the predicted left and right focusing evaluation function curves satisfies

ff^^ll((sthe s^^pp))--ff^^rr((sthe s^^pp))==00------((66))

交点不仅是调焦评价函数曲线的峰值位置,而且也是数字光学成像设备的聚焦位置。Intersection It is not only the peak position of the focus evaluation function curve, but also the focus position of the digital optical imaging device.

如果预测结果是离散点序列,根据式(4)和(5)构造的新序列可表示为If the prediction result is a sequence of discrete points, the new sequence constructed according to formulas (4) and (5) can be expressed as

Xx^^pp==||FfVV^^ll((ii))--FfVV^^rr((ii))||ii≤≤hh------((77))

如图2(e)所示,序列中最小值对应的位置作为聚焦位置。As shown in Figure 2(e), the sequence The position corresponding to the minimum value is taken as the focus position.

移动数字光学成像系统的焦平面到位置或序列中最小值对应的位置实现自动调焦。Move the focal plane of the digital optical imaging system to position or sequence The position corresponding to the minimum value in the middle is automatically adjusted.

本发明中,左、右采样步长、左、右样本点序列包含的样本点个数和双侧的预测模型均可以不一致。预测模型可以使用趋势外推预测方法和时间序列预测方法,例如灰色预测模型、指数预测模型等。In the present invention, the left and right sampling steps, the number of sample points included in the left and right sample point sequences, and the prediction models on both sides may be inconsistent. Forecasting models can use trend extrapolation forecasting methods and time series forecasting methods, such as gray forecasting models, exponential forecasting models, etc.

实施例1Example 1

参照图3,本实施例的基于双侧预测求交的数字光学成像系统自动调焦方法方法的流程图,包括确定峰值位置的区域(1)、左、右采样区域(2)、获得左侧样本点序列(3)右侧样本点序列(4)、左侧模型参数(5)右侧模型参数(6)、交点位置(7)、移动焦平面到交点位置(8)。为说明本实施例的具体实现,以Variance函数作为调焦评价函数,7点爬山法作为确定包含调焦评价函数曲线峰值位置的区域和左、右采样区域的方法,指数预测模型作为双侧预测模型,最小二乘法作为计算双侧预测模型的模型参数的方法。本实施例的具体实现如下:Referring to Fig. 3, the flow chart of the digital optical imaging system automatic focusing method method method based on bilateral prediction and intersection of the present embodiment includes determining the area (1) of the peak position, the left and right sampling areas (2), and obtaining the left side Sample point sequence (3) Right sample point sequence (4), Left model parameter (5) Right model parameter (6), Intersection position (7), Moving the focal plane to the intersection position (8). In order to illustrate the specific implementation of this embodiment, the Variance function is used as the focusing evaluation function, the 7-point hill-climbing method is used as the method for determining the area containing the peak position of the focusing evaluation function curve and the left and right sampling areas, and the exponential prediction model is used as the bilateral prediction model, least squares as the method for computing model parameters for a two-sided predictive model. The concrete realization of this embodiment is as follows:

在确定左、右采样区域的步骤中,用一定的采样步长和7点爬山法按照调焦方向(从初始采样位置指向调焦评价函数曲线峰值位置的方向)依次获得7个Variance调焦评价函数值和相应的采样位置,得到采样序列S可表示为:In the step of determining the left and right sampling areas, use a certain sampling step and the 7-point hill climbing method to sequentially obtain 7 variance focusing evaluations according to the focusing direction (from the initial sampling position to the peak position of the focusing evaluation function curve) function value and the corresponding sampling position, the sampling sequence S obtained can be expressed as:

S={(s(1),FV(1)),(s(2),FV(2)),…,(s(i),FV(i)),…,(s(7),FV(7))}  i=1,2,…,7  (8)S={(s(1),FV(1)),(s(2),FV(2)),...,(s(i),FV(i)),...,(s(7),FV (7))} i=1,2,...,7 (8)

判断序列S中的FV(4)是否是序列中所有调焦评价函数值的最大值并且两个序列(FV(3),FV(2),FV(1))和(FV(5),FV(6),FV(7))是否均为单调递减序列。如有一个条件不满足,按调焦方向增加一个调焦评价函数值和相应采样位置,更新采样序列S,直到满足序列S中FV(4)是最大值且两个序列(FV(3),FV(2),FV(1))和(FV(5),FV(6),FV(7))均为单调递减序列,确定包含调焦评价函数曲线峰值位置的区域是(s(3)s(5)),实现本实施例中的(1)。Determine whether FV(4) in sequence S is the maximum value of all focusing evaluation function values in the sequence and the two sequences (FV(3), FV(2), FV(1)) and (FV(5), FV (6), FV(7)) are all monotonically decreasing sequences. If one of the conditions is not satisfied, add a focusing evaluation function value and corresponding sampling position according to the focusing direction, and update the sampling sequence S until the FV(4) in the sequence S is the maximum value and the two sequences (FV(3), FV(2), FV(1)) and (FV(5), FV(6), FV(7)) are monotonically decreasing sequences, and the area containing the peak position of the focusing evaluation function curve is determined to be (s(3) s(5)), realize (1) in this embodiment.

包含调焦评价函数曲线峰值位置的区域的左、右邻域分别为[s(1)s(3)]和[s(5)s(7)],将这个左、右邻域当作左、右采样区域,实现本实施例中的(2)。The left and right neighborhoods of the area containing the peak position of the focusing evaluation function curve are [s(1)s(3)] and [s(5)s(7)] respectively, and this left and right neighborhood is regarded as the left , the right sampling area to realize (2) in this embodiment.

将序列((s(1)FV(1)),(s(2)FV(2)),(s(3)FV(3)))和((s(5)FV(5)),(s(6)FV(6)),(s(7)FV(7)))分别当作左侧和右侧样本点序列,实现本实施例中的(3)和(4)。Combine the sequences ((s(1)FV(1)),(s(2)FV(2)),(s(3)FV(3))) and ((s(5)FV(5)),( s(6)FV(6)), (s(7)FV(7))) are respectively regarded as the left and right sample point sequences to realize (3) and (4) in this embodiment.

指数预测模型可表示为The exponential forecasting model can be expressed as

f(s)=aebs    (9)f(s)=aebs (9)

式中a和b是需要计算的模型参数,s是采样位置,f(s)是在采样位置s处获得的调焦评价函数值。为利用最小二乘法确定模型参数a和b,式(9)可表示为where a and b are the model parameters to be calculated, s is the sampling position, and f(s) is the focusing evaluation function value obtained at the sampling position s. In order to determine the model parameters a and b using the least squares method, formula (9) can be expressed as

lnlnff^^((sthe s))==lnlnaa++bsbs------((1010))

将样本点序列代入式(10),可得Substituting the sequence of sample points into formula (10), we can get

lnFV(i)=lna+bs(i)    (11)lnFV(i)=lna+bs(i) (11)

用最小二乘法求解指数预测模型参数lna和b的等式可表示为Using the least squares method to solve the equations of the exponential forecasting model parameters lna and b can be expressed as

lnlnaabb==((BBTTBB))--11BBTTYYNN------((1212))

式中B=......1s(i)......,YN=...ln(FV(i))....通过分别将左侧和右侧样本点序列代入式(10)并根据式(12),获得左侧指数预测模型参数(lna1 bol)和右侧指数预测模型参数(lnar br),实现本实施例中的(5)和(6)。In the formula B = . . . . . . 1 the s ( i ) . . . . . . , Y N = . . . ln ( FV ( i ) ) . . . . By respectively substituting the left and right sample point sequences into Equation (10) and according to Equation (12), the parameters of the left exponential prediction model (lna1 bol) and the right exponential prediction model parameters (lnar br ) are obtained to realize this (5) and (6) in the examples.

预测的左、右调焦评价函数组可表示为The predicted left and right focusing evaluation function group can be expressed as

lnlnff^^ll((sthe s))==lnlnaall++bbllsthe slnlnff^^rr((sthe s))==lnlnaarr++bbrrsthe s------((1313))

因此,预测的左、右调焦评价函数曲线的交点可表示为Therefore, the intersection point of the predicted left and right focusing evaluation function curves can be expressed as

sthe s^^pp==lnlnaall--lnlnaarrbbrr--bbll------((1414))

通过上式计算预测的左右指数预测模型的交点实现本实施例中的(7)。The intersection point of the predicted left and right index prediction models is calculated by the above formula to realize (7) in this embodiment.

通过移动数字光学成像系统的焦平面到预测的左右指数预测模型的交点位置完成自动聚焦实现本实施例中的(8)。(8) in this embodiment is realized by moving the focal plane of the digital optical imaging system to the predicted intersection position of the left and right index prediction models to complete automatic focusing.

图4是本实施例的软件流程图。Fig. 4 is a software flow chart of this embodiment.

具体实施例2:Specific embodiment 2:

参照图5,本实施例的双侧预测求交自动调焦方法的实现模块图包括包含峰值位置的区域(1)、左、右采样区域(2)、左侧样本点序列(3)、右侧样本点序列(4)、左侧离散点序列(9)、右侧离散点序列(10)、序列中最小值对应的位置(11)和移动焦平面到最小值位置(12)。本实施例与实施例1的不同之处在于本实施例中的(9)和(10)均是计算预测的离散点序列而非实施例1中的计算预测模型的模型参数(5)和(6),本实施例与实施例1的不同之处还在于本实施例中需要获得的是序列中最小值位置(11)而非实施例1中的左右预测结果的预测的左、右调焦评价函数曲线的交点位置(7)。本实施例与实施例1的不同之处还在于本实施例移动焦平面到最小值位置(12)而非实施例1中交点位置(8)。Referring to Fig. 5, the implementation block diagram of the bilateral predictive intersecting auto-focusing method of the present embodiment includes the area (1) including the peak position, the left and right sampling areas (2), the left sample point sequence (3), the right Side sample point sequence (4), left discrete point sequence (9), right discrete point sequence (10), sequence The position corresponding to the minimum value in (11) and move the focal plane to the minimum value position (12). The difference between this embodiment and embodiment 1 is that (9) and (10) in this embodiment are all the discrete point sequences of calculation prediction rather than the model parameters (5) and ( 6), the difference between this embodiment and embodiment 1 is that what needs to be obtained in this embodiment is the sequence The minimum value position (11) is not the intersection position (7) of the predicted left and right focusing evaluation function curves of the left and right prediction results in Embodiment 1. The difference between this embodiment and Embodiment 1 is that this embodiment moves the focal plane to the minimum position (12) instead of the intersection point position (8) in Embodiment 1.

具体实施例3:Specific embodiment 3:

参照图6,本实施例的双侧预测求交自动调焦方法的实现模块图包括包含峰值位置的区域(1)、左、右采样区域(2)、左侧样本点序列(3)、左侧模型参数(5)、右侧样本点序列(4)、右侧模型参数(6)、交点位置(7)和移动焦平面到交点位置(8)。本实施例与实施例1的不同之处在于本实施例在确定左、右采样区域(2)后。不能从在确定包含峰值位置的区域(1)和确定左、右采样区域(2)过程中获得的数据直接得到左、右侧样本点序列,而是需要分别在左、右采样区域去采样才能获得左、右侧样本点数据。Referring to Fig. 6, the implementation block diagram of the bilateral predictive intersecting auto-focusing method of this embodiment includes an area (1) including a peak position, a left and right sampling area (2), a left sample point sequence (3), a left Side model parameters (5), right sample point sequence (4), right model parameters (6), intersection position (7) and moving the focal plane to the intersection position (8). The difference between this embodiment and Embodiment 1 is that in this embodiment, after the left and right sampling areas (2) are determined. It is not possible to directly obtain the left and right sample point sequences from the data obtained in the process of determining the area containing the peak position (1) and determining the left and right sampling areas (2), but it is necessary to sample in the left and right sampling areas respectively. Get the left and right sample point data.

具体实施例4:Specific embodiment 4:

参照图7,本实施例的双侧预测求交自动调焦方法的实现模块图包括包含峰值位置的区域(1)、左、右采样区域(2)、左侧样本点序列(3)、左侧离散点序列(9),右侧样本点序列(4),右侧离散点序列(10),序列中最小值对应的位置(11)和移动焦平面到最小值位置(12)。本实施例与实施例1的不同之处在于本实施例中在确定左、右采样区域(2)后。不能从在确定包含峰值位置的区域(1)和确定左、右采样区域(2)过程中获得的数据直接得到左、右侧样本点序列,而是需要分别在左、右采样区域采样获得左、右侧样本点数据。本实施例与实施例1的不同之处在于本实施例中的(9)和(10)均是计算预测的离散点序列而非实施例1中的计算预测模型的模型参数(5)和(6),本实施例与实施例1的不同之处还在于本实施例中需要获得的是序列中最小值位置(11)而非实施例1中的左右预测结果的预测的左、右调焦评价函数曲线的交点位置(7)。本实施例与实施例1的不同之处还在于本实施例移动焦平面到最小值位置(12)而非实施例1中交点位置(8)。Referring to FIG. 7 , the implementation block diagram of the bilateral predictive intersection auto-focusing method of this embodiment includes a region (1) including a peak position, a left and right sampling region (2), a left sample point sequence (3), a left Side discrete point sequence (9), right sample point sequence (4), right discrete point sequence (10), sequence The position corresponding to the minimum value in (11) and move the focal plane to the minimum value position (12). The difference between this embodiment and Embodiment 1 is that in this embodiment, after the left and right sampling areas (2) are determined. The left and right sample point sequences cannot be directly obtained from the data obtained in the process of determining the area containing the peak position (1) and determining the left and right sampling areas (2), but it is necessary to sample in the left and right sampling areas to obtain the left , right sample point data. The difference between this embodiment and embodiment 1 is that (9) and (10) in this embodiment are all the discrete point sequences of calculation prediction rather than the model parameters (5) and ( 6), the difference between this embodiment and embodiment 1 is that what needs to be obtained in this embodiment is the sequence The minimum value position (11) is not the intersection position (7) of the predicted left and right focusing evaluation function curves of the left and right prediction results in Embodiment 1. The difference between this embodiment and Embodiment 1 is that this embodiment moves the focal plane to the minimum position (12) instead of the intersection point position (8) in Embodiment 1.

最后说明的是,以上实施例仅用以说明本发明的技术方案而非限制,尽管参照较佳实施例对本发明进行了详细说明,本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或者等同替换,而不脱离本技术方案的宗旨和范围,其均应涵盖在本发明的权利要求范围当中。Finally, it is noted that the above embodiments are only used to illustrate the technical solutions of the present invention without limitation. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be carried out Modifications or equivalent replacements, without departing from the spirit and scope of the technical solution, should be included in the scope of the claims of the present invention.

Claims (3)

CN201210323164.9A2012-09-032012-09-03Automatic focusing method for digital optical imaging system based on bilateral forecasting intersectionActiveCN102841486B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201210323164.9ACN102841486B (en)2012-09-032012-09-03Automatic focusing method for digital optical imaging system based on bilateral forecasting intersection

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201210323164.9ACN102841486B (en)2012-09-032012-09-03Automatic focusing method for digital optical imaging system based on bilateral forecasting intersection

Publications (2)

Publication NumberPublication Date
CN102841486A CN102841486A (en)2012-12-26
CN102841486Btrue CN102841486B (en)2015-05-13

Family

ID=47368985

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201210323164.9AActiveCN102841486B (en)2012-09-032012-09-03Automatic focusing method for digital optical imaging system based on bilateral forecasting intersection

Country Status (1)

CountryLink
CN (1)CN102841486B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103399397B (en)*2013-07-192015-11-18香港应用科技研究院有限公司 Predictive Focusing for Image Scanning Systems
CN113163122B (en)*2021-04-302023-05-16珠海广浩捷科技股份有限公司Focusing method

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1487352A (en)*2002-08-212004-04-07������������ʽ����Focus regulating method and camera
CN101571660A (en)*2008-04-282009-11-04鸿富锦精密工业(深圳)有限公司Digital camera and automatic focusing method thereof
CN101729780A (en)*2009-10-132010-06-09河南平原光电有限公司Automatic focusing method of optical imaging system
CN101995640A (en)*2010-09-302011-03-30镇江中信科技开发有限公司Coarse adjustment and fine adjustment combined rapid interpolation focus exploration algorithm

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
JP2007121580A (en)*2005-10-272007-05-17Renesas Technology CorpAutomatic focusing device
JP4997043B2 (en)*2007-09-272012-08-08富士フイルム株式会社 Imaging apparatus, method and program
JP5020865B2 (en)*2008-03-122012-09-05キヤノン株式会社 IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND IMAGING DEVICE CONTROL PROGRAM
JP2010271600A (en)*2009-05-222010-12-02Sanyo Electric Co LtdElectronic camera
JP2011090143A (en)*2009-10-222011-05-06Nikon CorpFocal point detecting device and camera

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN1487352A (en)*2002-08-212004-04-07������������ʽ����Focus regulating method and camera
CN101571660A (en)*2008-04-282009-11-04鸿富锦精密工业(深圳)有限公司Digital camera and automatic focusing method thereof
CN101729780A (en)*2009-10-132010-06-09河南平原光电有限公司Automatic focusing method of optical imaging system
CN101995640A (en)*2010-09-302011-03-30镇江中信科技开发有限公司Coarse adjustment and fine adjustment combined rapid interpolation focus exploration algorithm

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Bilateral prediction and intersection calculation autofocus method for automated microscopy;Z.M. WU et al.;《Journal of Microscopy》;20121231;第248卷(第3期);第271-280页*
一种用于数码视频相机的实时自动聚焦算法;盛云等;《光电工程》;20080831;第35卷(第08期);第139-144页*
基于阈值的调焦方向判断方法;王代华 等;《仪器仪表学报》;20100831;第31卷(第8期);第1813-1818页*

Also Published As

Publication numberPublication date
CN102841486A (en)2012-12-26

Similar Documents

PublicationPublication DateTitle
CN111062951B (en) A Knowledge Distillation Method Based on Intra-Class Feature Difference for Semantic Segmentation
CN104079827B (en)A kind of optical field imaging weighs focusing method automatically
CN103595920B (en) Image acquisition equipment, method and device for assisting focusing during zooming
CN105652429B (en)A kind of microscopic cell glass slide scanning auto focusing method based on machine learning
CN110111366A (en)A kind of end-to-end light stream estimation method based on multistage loss amount
CN109936696B (en)Optical fiber end face automatic focusing method based on neural network and related device
CN118574002A (en)Switching method and device for double-lens moving camera and computer equipment
CN105049723B (en)Atomatic focusing method based on defocusing amount difference qualitative analysis
CN113095335B (en)Image recognition method based on category consistency deep learning
CN113747041A (en)Camera focusing method and focusing method based on recurrent neural network
CN115086516A (en)Camera system automatic focusing method based on deep learning model
Zhang et al.Automatic focusing method of microscopes based on image processing
CN102841486B (en)Automatic focusing method for digital optical imaging system based on bilateral forecasting intersection
CN107329233A (en)A kind of droplet type PCR instrument Atomatic focusing method based on neutral net
CN109903252A (en) Image processing method and device, electronic device and storage medium
CN113875228B (en)Video frame inserting method and device and computer readable storage medium
CN115314635B (en)Model training method and device for defocus determination
CN111385466A (en) Autofocus method, device, device and storage medium
Ren et al.Triplane-smoothed video dehazing with clip-enhanced generalization
CN103529544A (en)Nano membrane thickness measuring instrument capable of automatically positioning and focusing
CN103841327B (en)Four-dimensional light field decoding preprocessing method based on original image
CN103257533B (en)Automatic focusing method of photoetching machine
CN115797860B (en) Super real-time crowd counting method based on stem network-encoder-decoder architecture
Park et al.Fast and accurate auto focusing algorithm based on two defocused images using discrete cosine transform
CN116095474B (en) AI-based mobile focusing method and device

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
C14Grant of patent or utility model
GR01Patent grant
TR01Transfer of patent right
TR01Transfer of patent right

Effective date of registration:20250425

Address after:6-1, No.10 Baishulin, Shapingba District, Chongqing 400038

Patentee after:Wang Daihua

Country or region after:China

Address before:400030 No. 174 Sha Jie street, Shapingba District, Chongqing

Patentee before:Chongqing University

Country or region before:China

TR01Transfer of patent right
TR01Transfer of patent right

Effective date of registration:20250606

Address after:401332 Chongqing Shapingba District Chongqing High-tech Zone Xiyong Street Xiyong Avenue 36, Building 2, Phase III of the R&D Building, Building 6, 6th Floor, Room 6-91

Patentee after:Chongqing Future Muxing Information Technology Co.,Ltd.

Country or region after:China

Address before:6-1, No.10 Baishulin, Shapingba District, Chongqing 400038

Patentee before:Wang Daihua

Country or region before:China


[8]ページ先頭

©2009-2025 Movatter.jp