WO2018076211A1 - 基于几何误差优化的图像中二次曲线拟合方法 - Google Patents

基于几何误差优化的图像中二次曲线拟合方法 Download PDF

Info

Publication number
WO2018076211A1
WO2018076211A1 PCT/CN2016/103424 CN2016103424W WO2018076211A1 WO 2018076211 A1 WO2018076211 A1 WO 2018076211A1 CN 2016103424 W CN2016103424 W CN 2016103424W WO 2018076211 A1 WO2018076211 A1 WO 2018076211A1
Authority
WO
WIPO (PCT)
Prior art keywords
quadratic curve
image
coefficient matrix
distance
geometric distance
Prior art date
Application number
PCT/CN2016/103424
Other languages
English (en)
French (fr)
Inventor
吴毅红
Original Assignee
中国科学院自动化研究所
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 中国科学院自动化研究所 filed Critical 中国科学院自动化研究所
Priority to PCT/CN2016/103424 priority Critical patent/WO2018076211A1/zh
Publication of WO2018076211A1 publication Critical patent/WO2018076211A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16ZINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS, NOT OTHERWISE PROVIDED FOR
    • G16Z99/00Subject matter not provided for in other main groups of this subclass

Definitions

  • the invention belongs to the field of computer vision, and particularly relates to a quadratic curve fitting method based on geometric error optimization.
  • the quadratic curve can be seen everywhere in various man-made objects and natural landscapes.
  • Image quadratic curve fitting has been paid attention to in many fields such as computer vision, industrial measurement, and computer graphics.
  • Image quadratic curve fitting has important application value in robot navigation, virtual reality and augmented reality.
  • the perspective camera transforms a scene into an image.
  • a specific quadratic curve in the scene is still a quadratic curve in the projected image, but the quadratic curve in the image may be a circle, an ellipse, a parabola, or even a degenerate straight line.
  • the computer If we don't have a priori knowledge about the scene before detecting a quadratic curve type, it is difficult for the computer to automatically know the exact type of the quadratic curve in the image. Therefore, it is necessary to study the fitting problem of a general quadratic curve (the type of quadratic curve is unknown). After the quadratic curve is fitted, the type of the quadratic curve is recognized, which can be automated and changed easily.
  • the quadratic curve fitting in the present invention refers to a general quadratic curve fitting unless otherwise specified.
  • the fitting effect is based on the algebraic distance method.
  • the objective function is based on the algebraic distance error. Without geometric and physical meaning, it will change with the geometric transformation. Therefore, after the image transformation, the error may become larger.
  • the geometric distance-based method is an orthogonal distance method, but each image point in each iteration needs to solve a quadratic equation about an argument, so it is not only extremely complex but also very sensitive to noise. Later, although the first-order approximation of the Sampson method appeared, the accuracy was not high because it was only an approximate distance.
  • the invention aims to develop a quadratic curve fitting method in a two-dimensional image which can simultaneously satisfy high efficiency and high precision.
  • the present invention proposes a quadratic curve fitting method based on geometric error optimization, which can At the same time, it takes into account the high efficiency and high precision of the quadratic curve fitting in the image.
  • Step 2 calculating a geometric distance d fa (m i , C) from the point m i to the quadratic curve M, where C is a coefficient matrix of the quadratic curve M;
  • Step 3 Perform linear weighted iteration on the geometric distance d fa (m i , C), and obtain a matrix C 1 related to C by using a singular value decomposition method;
  • Step 5 using ⁇ u i1 , ⁇ v i1 and ⁇ i1 as initial values, performing nonlinear optimization on the objective function, obtaining a coefficient matrix C 2 of the quadratic curve M, and generating a specific two in the image according to the coefficient matrix C 2
  • the optimized quadratic curve M 2 of the minor curve M is the optimized quadratic curve M 2 of the minor curve M.
  • the geometric distance d fa (m i , C) is a weighted Sampson distance, and the calculation method is:
  • a, b, c, d, e, and f are the matrix coefficients of the quadratic curve M, respectively.
  • the calculation formula of the shortest geometric distance d(m i , C) is:
  • ⁇ u i and ⁇ v i are minute amounts.
  • the objective function is determined based on the shortest geometric distance d(m i , C) and the constraint function, and the analytical expression of the objective function is:
  • ⁇ i is a scale parameter
  • the constraint function is:
  • the specific method for linearly weighting the geometric distance d fa (m i , C) is:
  • Step 31 calculating a coefficient matrix C (k) related to the quadratic curve M, where k represents the number of iterations;
  • the method for calculating the coefficient matrix C (k) related to the quadratic curve M is:
  • the convergence condition described in step 32 is:
  • V(C) (a b c d e f) T
  • is a preset threshold
  • the analytical expression formula of p i in the constraint function is:
  • the quadratic curve fitting method in the image based on the geometric error optimization proposed by the invention can be directly extended to the fitting of the quadric surface based on the depth image or the three-dimensional point.
  • the method for fitting a quadratic curve in an image based on geometric error optimization proposed by the invention overcomes the defect that the quadratic curve fitting method in the existing image cannot simultaneously take into account high efficiency and high precision, and achieves both the image and the image.
  • the high-efficiency and high-precision ideal effect of the quadratic curve fitting method improves the accuracy of the quadratic curve fitting in the image.
  • 1 is a schematic diagram of a point line L of a point m about a quadratic curve M;
  • FIG. 2 is a schematic diagram of a geometric distance d(m i , p i ) from a point m i to a quadratic curve M;
  • Figure 3 is a schematic view between an outer point and a quadratic curve M
  • FIG. 4 is a schematic flow chart of a quadratic curve fitting method of the present invention.
  • the present invention is directed to the prior art method for fitting a quadratic curve in an image, which cannot simultaneously take into account the problems of high efficiency and high precision, and the present invention proposes a new method for calculating the geometric distance of a point-to-quadratic curve. Based on this, a linear weighted high-efficiency quadratic curve fitting method is designed, and the shortest geometric distance is further approached, which has higher precision.
  • the method of the present invention can be directly extended to the fitting of a quadric surface based on a depth image or a three-dimensional point.
  • the coefficient matrix C of the quadratic curve M is as shown in the expression (1):
  • the Sampson distance is half the distance from the point mi to the polar line L.
  • the distance from the point m to the polar line L is represented by a bold line segment.
  • the distance calculated by the formula (3) is the distance from the point m to the polar line L, d/2 Is the Sampson distance; when there is no noise, m is on the quadratic curve M, and L is the tangent at m, as shown in Fig. 1(b), where the values of equations (3) and (5) are both 0. Since the numerator of equation (5) generally refers to the algebraic distance, the Sampson distance is a weighted algebraic distance.
  • the distance value of the different points m i is calculated by the formula (3), and the square sum is taken, or the distance value of the different points m i is calculated by the formula (5), and the square sum is taken as the cost function of the fitting quadratic curve.
  • the two cost functions differ by a fixed scalar of 4. Therefore, when looking for the minimum value C by optimization, the two cost functions are equivalent.
  • M is a quadratic curve
  • m i is a point
  • the straight line L' passes through m i and is orthogonal to the polar line L, and the intersection of the two straight lines is q i .
  • the Sampson distance is d(m i , q i )/2.
  • the noise at point m i increases, d(m i , q i ) becomes larger and larger, and the error of Sampson distance becomes larger and larger.
  • the noise distribution on the image is not uniform, so the Sampson distance should be given different weight values for the noise of points on different images, but it should not be a fixed 1/2.
  • the present invention proposes a new geometric distance between the m i and M are as shown in Equation (6):
  • p + and p - are the intersections of the straight line L' and the quadratic curve M.
  • d(m i , p i ) can measure the distance between m i and M more accurately than d(m i , q i ).
  • the formula (11) is represented by homogeneous coordinates, and ⁇ 1 and ⁇ 2 are two scale parameters.
  • equation (12) can be obtained:
  • equation (17) is a weighted Sampson distance and a weighted algebraic distance with a clear physical geometric meaning.
  • ⁇ u i , ⁇ v i represents a small amount.
  • ⁇ i is a scale parameter
  • the quadratic curve fitting method in the image based on the geometric error optimization of the present invention is as shown in FIG. 4, and specifically includes:
  • step 2 the geometric distance d fa (m i , C) of the point m i to the quadratic curve M is calculated.
  • the geometric distance d fa (m i , C) is a weighted Sampson distance, which can be obtained by square root of the formula (17).
  • the shortest geometric distance d(m i , C) can be obtained by square root of the formula (21).
  • the objective function is determined based on a shortest geometric distance d(m i , C) and a constraint function, the analytical representation formula of the objective function is the formula (23); the constraint function is the formula (20); The analytical expression formula of p i can be formula (18).
  • Step 3 Perform linear weighted iteration on the geometric distance d fa (m i , C), and obtain a matrix C 1 related to C by using a singular value decomposition method;
  • Step 31 calculating a coefficient matrix C (k) related to the quadratic curve M, where k represents the number of iterations;
  • the method for calculating the coefficient matrix C (k) related to the quadratic curve M in this embodiment is:
  • V(C) (a b c d e f) T
  • is a preset threshold
  • Step 5 using ⁇ u i1 , ⁇ v i1 and ⁇ i1 as initial values, performing nonlinear optimization on the objective function to obtain a coefficient matrix C 2 , and generating an optimization of a specific quadratic curve M in the image according to the coefficient matrix C 2 After the quadratic curve M 2 .
  • it needs to pass Normalized for C 2 , where
  • the nonlinear optimization solution is performed on the objective function, and the formula (23) can be optimized by using a nonlinear numerical optimization formula algorithm, and the nonlinear numerical optimization formula algorithm can be a quasi-Newton method.
  • the invention can also be directly extended to the fitting of the quadric surface, and the specific implementation formula is consistent with the above-mentioned quadratic curve fitting method.
  • the objective function (26) of the quadratic surface is constructed with reference to the objective function (23):
  • the method corresponding to the quadric surface fitting of the formula (17) can be adjusted to the formula (30), which is a formula for calculating the distance from the point to the quadric surface.
  • modules, units and method steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware, computer software or a combination of both, in order to clearly illustrate electronic hardware.
  • Interchangeability with software, the components and steps of the various examples have been generally described in terms of functionality in the above description. These ones Whether the function is implemented in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.

Landscapes

  • Image Analysis (AREA)

Abstract

本发明涉及一种基于几何误差优化的图像中二次曲线拟合方法,包括:提取图像中特定二次曲线M的边缘图像的点mi;计算点mi到二次曲线M的几何距离dfa(mi,C);对几何距离dfa(mi,C)进行线性加权迭代,运用奇异值分解方法获得与C相关的矩阵C1;利用基于最短几何距离d(mi,C)构建的目标函数,计算当C=C1时使得目标函数最小化时的微小量Δui,Δvi及尺度参数λi的值,并分别记为Δui1,Δvi1及λi1;以Δui1,Δvi1及λi1为初始值,对所述目标函数进行非线性优化求解,获得二次曲线M的系数矩阵C2,依据系数矩阵C2生成所述图像中特定二次曲线M的优化后的二次曲线M2。本发明实现了同时兼顾图像中二次曲线拟合方法的高效率和高精度的理想效果,且提高了图像中二次曲线拟合的精度。

Description

基于几何误差优化的图像中二次曲线拟合方法 技术领域
本发明属于计算机视觉领域,具体涉及到一种基于几何误差优化的二次曲线拟合方法。
背景技术
在各种人造物体和自然景观中,二次曲线随处可见。图像二次曲线拟合作为许多应用的初步处理步骤,在计算机视觉、工业测量、计算机图形学等领域都受到了重视。图像二次曲线拟合在机器人导航、虚拟现实、增强现实等方面都有很重要的应用价值。
通过透视投影,透视相机将一个场景变换成一幅图像。场景中一条具体的二次曲线在投影的图像中仍然是一条二次曲线,但是,图像中的二次曲线可能是圆,椭圆,抛物线,甚至是一条退化的直线。如果在检测一条二次曲线类型之前,我们没有关于场景的先验知识,那么计算机很难自动得知图像中二次曲线的具体类型。因此,研究一般二次曲线(二次曲线类型未知)的拟合问题是十分有必要的。当二次曲线拟合之后,再对二次曲线的类型进行识别,则可自动化和变的容易。本发明中的二次曲线拟合,如果没有特殊说明,是指一般二次曲线拟合。
二次曲线拟合问题的一种很自然的处理思路是使用线性最小二乘法。但是,在实际任务中,由于遮挡、噪声、模糊等因素,这种方法的精度很难满足我们的要求。因此,出现了多种不同的优化算法以提高二次曲线拟合的精度。目前有基于统计的方法、基于代数距离的方法及基于几何距离的方法三类不同的用来提高提高二次曲线拟合的精度的优化算法。基于统计的方法通常假定图像噪声服从一定的分布,且基 于一阶泰勒级数展开,但由于通常图像的噪声分布很难精确服从假定的分布,且在噪声比较大的时候,泰勒一阶级数逼近失效,所以统计方法只有在噪声较小才能有较好的拟合效果;基于代数距离的方法,所建立的目标函数是基于代数距离误差的,没有几何物理意义,会随着几何变换而变化,因此在图像变换后,误差则可能变得更大;基于几何距离的方法是正交距离的方法,但这种方法每一次迭代中的每一个图像点都需要求解关于一个变元的一个4次方程,因此不仅复杂度极高而且对噪声非常敏感。后来虽然出现了一阶近似的Sampson方法,但由于只是一种近似的距离,因此精度不高。另外,还有一种是基于圆变换的方法,其中优化时,除了优化二次曲线的参数外,每一次迭代中每一个图像点需要另设一个参数,需要求解的参数极多,简化了正交距离的4次方程的求解,但极大的增加了求解的参数个数,因此复杂度很高。综上所述,目前对图像中二次曲线拟合的方法无法同时兼顾高效率和高精度。
本发明旨在开发一种可同时满足效率高、精度高的二维图像中二次曲线拟合方法。
发明内容
为了解决上述技术问题,即目前对图像中二次曲线拟合的方法无法同时兼顾高效率和高精度的问题,本发明提出了一种基于几何误差优化的图像中二次曲线拟合方法,可以同时兼顾图像中二次曲线拟合的高效率和高精度。
本发明提出的一种基于几何误差优化图像中的二次曲线拟合方法,其特征在于,包括如下步骤:
步骤1,提取图像中特定二次曲线M的边缘图像的点mi,其中,mi=(ui vi 1)T,i=1...N;
步骤2,计算点mi到二次曲线M的几何距离dfa(mi,C),其中,C为二次曲线M的系数矩阵;
步骤3,对几何距离dfa(mi,C)进行线性加权迭代,运用奇异值分解方法获得与C相关的矩阵C1
步骤4,利用基于最短几何距离d(mi,C)构建的目标函数,计算当C=C1时使得目标函数最小化时的微小量Δui,Δvi及尺度参数λi的值,并分别记为Δui1,Δvi1及λi1
步骤5,以Δui1,Δvi1及λi1为初始值,对所述目标函数进行非线性优化求解,获得二次曲线M的系数矩阵C2,依据系数矩阵C2生成所述图像中特定二次曲线M的优化后的二次曲线M2
优选的,所述的几何距离dfa(mi,C)为加权的Sampson距离,其计算方法为:
Figure PCTCN2016103424-appb-000001
其中,
Figure PCTCN2016103424-appb-000002
a、b、c、d、e、f分别为二次曲线M的矩阵系数,
Figure PCTCN2016103424-appb-000003
优选的,所述最短几何距离d(mi,C)的计算公式为:
Figure PCTCN2016103424-appb-000004
其中,Δui、Δvi为微小量。
所述的目标函数是基于最短几何距离d(mi,C)和约束函数确定的,目标函数的解析表达公式为:
Figure PCTCN2016103424-appb-000005
其中,
Figure PCTCN2016103424-appb-000006
λi为尺度参数。
所述的约束函数为:
Figure PCTCN2016103424-appb-000007
约束函数中,
Figure PCTCN2016103424-appb-000008
p+、p-为直线L'与二次曲线M的交点,L'为经过点mi并与极线L=Cmi正交的直线。
优选的,对几何距离dfa(mi,C)进行线性加权迭代的具体方法为:
步骤31,计算二次曲线M相关的系数矩阵C(k),k表示迭代次数;
步骤32,重复步骤31,直到收敛满足条件时,记录此时的系数矩阵C(k),并令C1=C(k)
优选的,所述计算二次曲线M相关的系数矩阵C(k)的方法为:
当k=0时,利用奇异值分解方法求解线性系统
Figure PCTCN2016103424-appb-000009
i=1...N,获得系数矩阵C(0)
当k>0时,利用奇异值分解方法求解线性系统
Figure PCTCN2016103424-appb-000010
得到与二次曲线M相关的系数矩阵C(k)
其中
Figure PCTCN2016103424-appb-000011
为令C=C(k-1),并通过如下公式计算得到:
Figure PCTCN2016103424-appb-000012
优选的,步骤32中所述的收敛条件为:
Figure PCTCN2016103424-appb-000013
其中,V(C)=(a b c d e f)T,ε为预设阈值。
优选的,所述的约束函数中pi的解析表达公式为:
Figure PCTCN2016103424-appb-000014
优选的,步骤5中获取系数矩阵C2后,通过
Figure PCTCN2016103424-appb-000015
对C2规范化,其中||C2||F表示C2的F范数。
本发明所提出的一种基于几何误差优化的图像中二次曲线拟合方法可以直接推广到基于深度图像或三维点的二次曲面的拟合上。
本发明提出的一种基于几何误差优化的图像中二次曲线拟合方法,克服了现有图像中二次曲线拟合的方法无法同时兼顾高效率和高精度的缺陷,实现了同时兼顾图像中二次曲线拟合方法的高效率和高精度的理想效果,且提高了图像中二次曲线拟合的精度。
附图说明
图1是点m关于二次曲线M的极线L示意图;
图2是点mi到二次曲线M的几何距离d(mi,pi)示意图;
图3是外点与二次曲线M之间的示意图;
图4是本发明的二次曲线拟合方法流程示意图。
具体实施方式
下面参照附图来描述本发明的优选实施方式。本领域技术人员应当理解的是,这些实施方式仅仅用于解释本发明的技术原理,并非旨在限制本发明的保护范围。
为了更清楚的对本发明技术方案进行说明,下面结合理论推导及本发明的具体实施方式对本发明技术方案进行详细描述。
本发明针对现有技术中对图像中二次曲线拟合的方法无法同时兼顾高效率和高精度的问题而提出,而且本发明提出了一种新的点到二次曲线的几何距离计算方法,基于此设计了一种线性加权的高效二次曲线拟合方法,并进一步逼近最短几何距离,具有更高的精度。本发明方法可以直接推广到基于深度图像或三维点的二次曲面的拟合上。
1、本发明几何距离计算方法的推导
对于含有二次曲线的图像,提取二次曲线M的边缘图像点mi=(ui vi 1)T,i=1...N;
二次曲线M的系数矩阵C如表达式(1)所示:
Figure PCTCN2016103424-appb-000016
在没有噪声的情况下,可以得到:
Figure PCTCN2016103424-appb-000017
i=1...N。
点mi关于二次曲线M的极线L为Cmi,记作Cmi=L=(l1,l2,l3)T。则mi和L之间的距离的计算方法如公式(2)所示:
Figure PCTCN2016103424-appb-000018
其中|·|表示两条竖线之间元素的数值的绝对值。
将L=Cmi代入公式(2),则点mi到极线L的距离可更新为如公式(3)所示的表达式:
Figure PCTCN2016103424-appb-000019
其中,
Figure PCTCN2016103424-appb-000020
G中存在如下关系:a2+d2≥0,(ba-d2)2≥0,det(G)=0。
用来拟合二次曲线的著名的Sampson距离定义如公式(4)所示:
Figure PCTCN2016103424-appb-000021
将求导结果代入公式(4)可得公式(5):
Figure PCTCN2016103424-appb-000022
比较公式(3)和公式(5),知道Sampson距离是点mi到极线L距离的一半。如图1(a)所示,通过粗体线段表示点m到极线L距离,当存在噪声时,通过公式(3)计算的距离为点m到极线L的距离为d,d/2是Sampson距离;当不存在噪声时,m位于二次曲线M上,L是在m处的切线,如图1(b)所示,此时公式(3)和公式(5)的值均为0。由于公式(5)的分子通常是指代数距离,因此,Sampson距离是加权的代数距离。
采用公式(3)计算不同点mi的距离值,并取其平方和,或采用公式(5)计算不同点mi的距离值,并取其平方和作为拟合二次曲线的代价函数。这两个代价函数之间相差一个固定标量4。因此通过优化寻找最小值C时,这两个代价函数是等价的。
如图2所示,M是一条二次曲线,mi是一个点,L=Cmi是极线。直线L'经过mi并且与极线L正交,两直线的交点是qi。Sampson 距离是d(mi,qi)/2。随着点mi处噪声的增加,d(mi,qi)变得越来越大,并且Sampson距离的误差也越来越大。通常情况下,图像上噪声的分布并不均匀,因此对于不同图像上点的噪声,Sampson距离应该被赋予不同的权重值,但不应该是一个固定的1/2。
本发明提出一种新的mi和M之间的几何距离如公式(6)所示:
d(mi,C)=min{d(p+,mi),d(p-,mi)}          (6)
Figure PCTCN2016103424-appb-000023
则d(mi,C)=d(mi,pi);
其中,p+、p-两点为直线L'与二次曲线M的交点。
如图2所示,d(mi,pi)能够比d(mi,qi)更加精确地度量mi和M之间的距离。
为了计算d(mi,C),需要计算pi,pi可以通过公式(7)求解得到:
Figure PCTCN2016103424-appb-000024
直接求解公式(7)并不容易,本发明给出一种十分简洁的方式获得公式(7)的明确解析形式,具体如下:
首先计算qi。L=Cmi可以表示为L=(l1,l2,l3)T。L'与L正交并且经过mi=(ui vi 1)T,qi是直线L和直线L′的交点。所以,可以得到qi的计算公式,如公式(8)所示:
Figure PCTCN2016103424-appb-000025
将结果重写,qi的计算公式可进一步变换为公式(9)。
Figure PCTCN2016103424-appb-000026
其中
Figure PCTCN2016103424-appb-000027
为把矩阵C的最后一行替换为全0行后的矩阵。
由于qi在直线L上,因此
Figure PCTCN2016103424-appb-000028
结合L=Cmi得到公式(10):
Figure PCTCN2016103424-appb-000029
两个解p+、p-与qi、mi共线,因此可得到公式(11):
p±=λ1qi2mi             (11)
其中,公式(11)采用齐次坐标表示,λ12是两个尺度参数。
将公式(11)代入公式(7)的第一个方程并且使用公式(10),可以得到公式(12):
Figure PCTCN2016103424-appb-000030
通常情况下,qi和mi位于二次曲线M的两边。因此,
Figure PCTCN2016103424-appb-000031
求解公式(12)可以得到公式(13):
Figure PCTCN2016103424-appb-000032
注意到mi=(ui vi 1)T的最后一个元素是1,并且在公式(9)中qi的最后一个元素也是1,根据公式(11)将p±进行归一化得公式(14):
Figure PCTCN2016103424-appb-000033
那么p±的最后一个元素也是1。所以,p±到mi的距离的平方按照方公式(15)计算:
Figure PCTCN2016103424-appb-000034
将公式(13)代入公式(15)并且选择较小的一个值,得公式(16):
Figure PCTCN2016103424-appb-000035
将公式(9)中qi的表达公式代入公式(16),可以得到距离表达公式(17):
Figure PCTCN2016103424-appb-000036
其中,
Figure PCTCN2016103424-appb-000037
Figure PCTCN2016103424-appb-000038
并且分母
Figure PCTCN2016103424-appb-000039
不为0。与公式(5)相比,公式(17)是一个加权的Sampson距离,也是一个加权的代数距离,具有明确的物理几何意义。
pi的表示也可以根据公式(18)得到:
Figure PCTCN2016103424-appb-000040
这就是公式(7)的解。并且d2(mi,pi)=d2(mi,C),可得到公式(17)。
令p'i为距离点mi最近的曲线M上的点,可得到公式(19):
p'i=pi+(Δui,Δvi,0)T                 (19)
其中,Δui,Δvi表示微小量。
Figure PCTCN2016103424-appb-000041
Figure PCTCN2016103424-appb-000042
得公式(20):
Figure PCTCN2016103424-appb-000043
将公式(20)左边的表达式表示为CONi
mi和C之间最短距离的平方如公式(21)所示:
Figure PCTCN2016103424-appb-000044
如果(mi TGmi)2<(mi TCmi)(mi TWmi),则认为mi是外点并且删除它们,因为这些点远离二次曲线。图3(a)、图3(b)、图3(c)分别展示了椭圆、双曲线和抛物线下的这一类点,符合这种情况的点均位于黑色区域内。
最终基于最短几何距离的目标函数建立如公式(22)所示:
Figure PCTCN2016103424-appb-000045
将公式(20)、(21)和(17)代入(22)得具体目标函数,如公式(23)所示:
Figure PCTCN2016103424-appb-000046
其中
Figure PCTCN2016103424-appb-000047
λi为尺度参数。
2、结合上述内容,本发明基于几何误差优化的图像中二次曲线拟合方法如图4所示,具体包括:
步骤1,提取图像中特定二次曲线M边缘图像的点mi,其中,mi=(uivi1)T i=1...N;利用RANSAC算法移除外点,再将图像上的点拟合成二次曲线M,二次曲线M的系数矩阵C如公式(1)所示。
步骤2,计算点mi到二次曲线M的几何距离dfa(mi,C)。
所述的几何距离dfa(mi,C)为加权的Sampson距离,可通过公式(17)开平方求得。
所述最短几何距离d(mi,C)可通过公式(21)开平方求得。
所述的目标函数基于最短几何距离d(mi,C)和约束函数确定,所述目标函数的解析表示公式为公式(23);所述的约束函数为公式(20);约束函数中中pi的解析表达公式可以为公式(18)。
步骤3,对几何距离dfa(mi,C)进行线性加权迭代,运用奇异值分解方法获得与C相关的矩阵C1
所述对几何距离dfa(mi,C)进行线性加权迭代的具体方法为:
步骤31,计算二次曲线M相关的系数矩阵C(k),k表示迭代次数;
步骤32,重复执行步骤31,直至满足收敛条件时,记录此时的系数矩阵C(k),并令C1=C(k)
本实施例中计算二次曲线M相关的系数矩阵C(k)的方法为:
当k=0时,利用奇异值分解方法求解线性系统
Figure PCTCN2016103424-appb-000048
i=1...N,获得系数矩阵C(0)
当K>0时,利用奇异值分解方法求解线性系统
Figure PCTCN2016103424-appb-000049
得到与二次曲线M相关的系数矩阵C(k)
其中
Figure PCTCN2016103424-appb-000050
的计算方法为:令C=C(k-1),并通过公式(24)计算得到:
Figure PCTCN2016103424-appb-000051
步骤32中所述的收敛条件如公式(25)所示:
Figure PCTCN2016103424-appb-000052
其中V(C)=(a b c d e f)T,ε为预设阈值。
步骤4,利用基于最短几何距离d(mi,C)构建的目标函数(23),计算当C=C1时使得目标函数最小化时的微小量Δui,Δvi及尺度参数λi的值,并分别记为Δui1,Δvi1及λi1
步骤5,以Δui1,Δvi1及λi1为初始值,对所述目标函数进行非线性优化求解,获得系数矩阵C2,依据系数矩阵C2生成所述图像中特定二次曲线M的优化后的二次曲线M2。本步骤中获取系数矩阵C2后,需要通过
Figure PCTCN2016103424-appb-000053
对C2规范化,其中||C2||F表示C2的F范数。
对所述目标函数进行非线性优化求解,可以为采用非线性数值优化公式算法对公式(23)进行优化,所述非线性数值优化公式算法可以为拟牛顿法。
本发明还可以直接推广到二次曲面的拟合上,具体实施方公式与上述二次曲线拟合方法相一致。
在对二次曲面进行拟合时,参考目标函数(23)构建二次曲面拟合的目标函数(26):
Figure PCTCN2016103424-appb-000054
其中
Figure PCTCN2016103424-appb-000055
mi=(ui vi si 1)T
Figure PCTCN2016103424-appb-000056
公式(24)对应二次曲面拟合的方法可以调整为公式(27);
Figure PCTCN2016103424-appb-000057
公式(18)对应二次曲面拟合的方法可以调整为公式(28):
Figure PCTCN2016103424-appb-000058
公式(19)对应二次曲面拟合的方法可以调整为公式(29):
p'i=pi+(Δui,Δvi,Δsi 0)T          (29)
公式(17)对应二次曲面拟合的方法可以调整为公式(30),该公式为点到二次曲面的距离的计算公式。
Figure PCTCN2016103424-appb-000059
本领域技术人员应该能够意识到,结合本文中所公开的实施例描述的各示例的模块、单元及方法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明电子硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些 功能究竟以电子硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。本领域技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
至此,已经结合附图所示的优选实施方式描述了本发明的技术方案,但是,本领域技术人员容易理解的是,本发明的保护范围显然不局限于这些具体实施方式。在不偏离本发明的原理的前提下,本领域技术人员可以对相关技术特征做出等同的更改或替换,这些更改或替换之后的技术方案都将落入本发明的保护范围之内。

Claims (9)

  1. 一种基于几何误差优化的图像中二次曲线拟合方法,其特征在于,包括如下步骤:
    步骤1,提取图像中特定二次曲线M边缘图像的点mi,其中,mi=(ui vi 1)T,i=1...N;
    步骤2,计算点mi到二次曲线M的几何距离dfa(mi,C),其中C为二次曲线M的系数矩阵;
    步骤3,对几何距离dfa(mi,C)进行线性加权迭代,运用奇异值分解方法获得与C相关的矩阵C1
    步骤4,利用基于最短几何距离d(mi,C)构建的目标函数,计算当C=C1时使得目标函数最小化时的微小量Δui,Δvi及尺度参数λi的值,并分别记为Δui1,Δvi1及λi1
    步骤5,以Δui1,Δvi1及λi1为初始值,对所述目标函数进行非线性优化求解,获得系数矩阵C2,依据系数矩阵C2生成所述图像中特定二次曲线M的优化后的二次曲线M2
  2. 根据权利要求1所述的方法,所述的几何距离dfa(mi,C)为加权的Sampson距离,其计算方法为:
    Figure PCTCN2016103424-appb-100001
    其中,
    Figure PCTCN2016103424-appb-100002
    a、b、c、d、e、f分别为二次曲线M的矩阵系数,
    Figure PCTCN2016103424-appb-100003
    Figure PCTCN2016103424-appb-100004
    Figure PCTCN2016103424-appb-100005
  3. 根据权利要求2所述的方法,其特征在于,所述最短几何距离d(mi,C)的计算方法为:
    Figure PCTCN2016103424-appb-100006
    其中,Δui、Δvi为微小量。
  4. 根据权利要求3所述的方法,其特征在于,所述的目标函数基于最短几何距离d(mi,C)和约束函数确定,所述目标函数的解析表示公式为:
    Figure PCTCN2016103424-appb-100007
    其中,
    Figure PCTCN2016103424-appb-100008
    λi为尺度参数;
    所述的约束函数为:
    Figure PCTCN2016103424-appb-100009
    约束函数中,
    Figure PCTCN2016103424-appb-100010
    为直线L'与二次曲线M的交点,L'为经过点mi并与极线L=Cmi正交的直线。
  5. 根据权利要求3所述的方法,其特征在于,所述对几何距离dfa(mi,C)进行线性加权迭代的具体方法为:
    步骤31,计算二次曲线M相关的系数矩阵C(k),k表示迭代次数;
    步骤32,重复执行步骤31,直至满足收敛条件时,记录此时的系数矩阵C(k),并令C1=C(k)
  6. 根据权利要求5所述的方法,其特征在于,所述计算二次曲线M相关的系数矩阵C(k)的方法为:
    当k=0时,利用奇异值分解方法求解线性系统
    Figure PCTCN2016103424-appb-100011
    i=1...N,获得系数矩阵C(0)
    当K>0时,利用奇异值分解方法求解线性系统
    Figure PCTCN2016103424-appb-100012
    得到与二次曲线M相关的系数矩阵C(k)
    其中
    Figure PCTCN2016103424-appb-100013
    为令C=C(k-1),并通过如下公式计算得到:
    Figure PCTCN2016103424-appb-100014
  7. 根据权利要求6所述的方法,其特征在于,步骤32中所述的收敛条件为:
    Figure PCTCN2016103424-appb-100015
    其中V(C)=(a b c d e f)T,ε为预设阈值。
  8. 根据权利要求7所述的方法,其特征在于,所述的约束函数中pi的解析表达公式为:
    Figure PCTCN2016103424-appb-100016
  9. 根据权利要求8所述的方法,其特征在于,步骤5中获取系数矩阵C2后,通过
    Figure PCTCN2016103424-appb-100017
    对C2规范化,其中||C2||F表示C2的F范数。
PCT/CN2016/103424 2016-10-26 2016-10-26 基于几何误差优化的图像中二次曲线拟合方法 WO2018076211A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/103424 WO2018076211A1 (zh) 2016-10-26 2016-10-26 基于几何误差优化的图像中二次曲线拟合方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/103424 WO2018076211A1 (zh) 2016-10-26 2016-10-26 基于几何误差优化的图像中二次曲线拟合方法

Publications (1)

Publication Number Publication Date
WO2018076211A1 true WO2018076211A1 (zh) 2018-05-03

Family

ID=62023019

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/103424 WO2018076211A1 (zh) 2016-10-26 2016-10-26 基于几何误差优化的图像中二次曲线拟合方法

Country Status (1)

Country Link
WO (1) WO2018076211A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984982A (zh) * 2018-09-04 2018-12-11 中南大学 可预设精度的螺旋锥齿轮加工参数反调修正计算方法
CN109785372A (zh) * 2019-01-10 2019-05-21 西安电子科技大学 基于软决策优化的基础矩阵鲁棒估计方法
CN110992254A (zh) * 2019-12-06 2020-04-10 北京工业大学 一种全向图像中二次曲线的拟合方法
CN112085759A (zh) * 2020-09-07 2020-12-15 凌云光技术股份有限公司 一种基于大数据的直线拟合方法及装置
CN112902894A (zh) * 2021-01-26 2021-06-04 西安精雕软件科技有限公司 一种基于迭代法的圆槽口最佳逼近方法及系统

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05269094A (ja) * 1992-03-23 1993-10-19 Toshiba Corp 磁気共鳴診断装置
CN1838149A (zh) * 2005-03-24 2006-09-27 中国科学院自动化研究所 一种实用的基于证据积累的图像曲线粗匹配方法
CN101315698A (zh) * 2008-06-25 2008-12-03 中国人民解放军国防科学技术大学 基于直线特征图像配准中的特征匹配方法
CN102509324A (zh) * 2011-10-31 2012-06-20 浙江工业大学 基于二次曲线拟合的旋转立体视觉旋转轴的确定方法
CN103325130A (zh) * 2013-06-18 2013-09-25 浙江大学 基于t样条的几何迭代图像拟合方法
CN103745079A (zh) * 2013-11-22 2014-04-23 浙江工业大学 一种基于抽象凸估计的曲线拟合方法
CN103487806B (zh) * 2013-08-26 2015-08-19 北京理工大学 一种基于时分复用的多普勒参数二次拟合方法
CN105138720A (zh) * 2015-07-13 2015-12-09 北京环境特性研究所 基于矩阵正交三角化的标定数据曲线拟合方法

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05269094A (ja) * 1992-03-23 1993-10-19 Toshiba Corp 磁気共鳴診断装置
CN1838149A (zh) * 2005-03-24 2006-09-27 中国科学院自动化研究所 一种实用的基于证据积累的图像曲线粗匹配方法
CN101315698A (zh) * 2008-06-25 2008-12-03 中国人民解放军国防科学技术大学 基于直线特征图像配准中的特征匹配方法
CN102509324A (zh) * 2011-10-31 2012-06-20 浙江工业大学 基于二次曲线拟合的旋转立体视觉旋转轴的确定方法
CN103325130A (zh) * 2013-06-18 2013-09-25 浙江大学 基于t样条的几何迭代图像拟合方法
CN103487806B (zh) * 2013-08-26 2015-08-19 北京理工大学 一种基于时分复用的多普勒参数二次拟合方法
CN103745079A (zh) * 2013-11-22 2014-04-23 浙江工业大学 一种基于抽象凸估计的曲线拟合方法
CN105138720A (zh) * 2015-07-13 2015-12-09 北京环境特性研究所 基于矩阵正交三角化的标定数据曲线拟合方法

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108984982A (zh) * 2018-09-04 2018-12-11 中南大学 可预设精度的螺旋锥齿轮加工参数反调修正计算方法
CN108984982B (zh) * 2018-09-04 2023-03-24 中南大学 可预设精度的螺旋锥齿轮加工参数反调修正计算方法
CN109785372A (zh) * 2019-01-10 2019-05-21 西安电子科技大学 基于软决策优化的基础矩阵鲁棒估计方法
CN109785372B (zh) * 2019-01-10 2022-12-23 西安电子科技大学 基于软决策优化的基础矩阵鲁棒估计方法
CN110992254A (zh) * 2019-12-06 2020-04-10 北京工业大学 一种全向图像中二次曲线的拟合方法
CN112085759A (zh) * 2020-09-07 2020-12-15 凌云光技术股份有限公司 一种基于大数据的直线拟合方法及装置
CN112085759B (zh) * 2020-09-07 2023-11-10 凌云光技术股份有限公司 一种基于大数据的直线拟合方法及装置
CN112902894A (zh) * 2021-01-26 2021-06-04 西安精雕软件科技有限公司 一种基于迭代法的圆槽口最佳逼近方法及系统

Similar Documents

Publication Publication Date Title
WO2018076211A1 (zh) 基于几何误差优化的图像中二次曲线拟合方法
Usenko et al. The double sphere camera model
CN107301654B (zh) 一种多传感器的高精度即时定位与建图方法
US20160379375A1 (en) Camera Tracking Method and Apparatus
WO2022188094A1 (zh) 一种点云匹配方法及装置、导航方法及设备、定位方法、激光雷达
Lindstrom Triangulation made easy
WO2019029099A1 (zh) 基于图像梯度联合优化的双目视觉里程计算方法
US9639942B2 (en) Information processing apparatus, information processing method, and storage medium
US11514607B2 (en) 3-dimensional reconstruction method, 3-dimensional reconstruction device, and storage medium
Buch et al. Prediction of ICP pose uncertainties using Monte Carlo simulation with synthetic depth images
Quiroga et al. Local/global scene flow estimation
CN109523595A (zh) 一种建筑工程直线棱角间距视觉测量方法
Lowe et al. Complementary perception for handheld slam
Zhou et al. An efficient planar bundle adjustment algorithm
WO2018192004A1 (zh) 一种基于函数迭代积分的刚体姿态解算方法
CN113393577B (zh) 一种倾斜摄影地形重建方法
CN114013449A (zh) 针对自动驾驶车辆的数据处理方法、装置和自动驾驶车辆
Zhou et al. Semi-dense visual odometry for RGB-D cameras using approximate nearest neighbour fields
Yu et al. Edge-based visual-inertial odometry
Ge et al. Binocular vision calibration and 3D re-construction with an orthogonal learning neural network
Cerveri et al. Combined evolution strategies for dynamic calibration of video-based measurement systems
Zhang et al. An invariant-ekf vins algorithm for improving consistency
CN106570864B (zh) 基于几何误差优化的图像中二次曲线拟合方法
CN108764161B (zh) 基于极坐标系的破解稀疏阵引发的病态奇异性的遥感影像处理方法和装置
CN109754412B (zh) 目标跟踪方法、目标跟踪装置及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16919736

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16919736

Country of ref document: EP

Kind code of ref document: A1