CN110111388A - Three-dimension object pose parameter estimation method and visual apparatus - Google Patents
Three-dimension object pose parameter estimation method and visual apparatus Download PDFInfo
- Publication number
- CN110111388A CN110111388A CN201910389377.3A CN201910389377A CN110111388A CN 110111388 A CN110111388 A CN 110111388A CN 201910389377 A CN201910389377 A CN 201910389377A CN 110111388 A CN110111388 A CN 110111388A
- Authority
- CN
- China
- Prior art keywords
- straight line
- image
- pose
- dimensional object
- dimensional
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
- G06T2207/10012—Stereo images
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
本申请涉及一种三维物体位姿参数估计方法及视觉设备,其中视觉设备可执行该方法,该方法包括:获取基于三维物体的前一帧图像确定的位姿参数,作为确定当前帧图像对应位姿参数的初始位姿参数;基于初始位姿参数将三维物体的三维空间直线段投影至二维图像平面上,得到三维空间直线段的在二维图像平面上的投影直线段;确定投影直线段在二维图像平面上最接近的图像直线段,并确定投影直线段与最接近的图像直线段之间的距离误差;判断距离误差是否满足预设条件;如果不满足,基于距离误差确定新的位姿参数,并将新的位姿参数作为初始位姿参数;如果满足,将初始位姿参数作为当前帧图像的位姿参数。本申请实现了对纹理较少的物体的位姿参数估计。
The present application relates to a method for estimating pose parameters of a three-dimensional object and a visual device, wherein the visual device can execute the method, and the method includes: acquiring pose parameters determined based on the previous frame image of the three-dimensional object as a method for determining the corresponding position of the current frame image The initial pose parameters of the attitude parameters; based on the initial pose parameters, the three-dimensional space straight line segment of the three-dimensional object is projected onto the two-dimensional image plane, and the projected straight line segment of the three-dimensional space straight line segment on the two-dimensional image plane is obtained; the projected straight line segment is determined The closest image straight segment on the two-dimensional image plane, and determine the distance error between the projected straight segment and the closest image straight segment; judge whether the distance error satisfies the preset condition; if not, determine a new one based on the distance error Pose parameters, and use the new pose parameters as the initial pose parameters; if satisfied, use the initial pose parameters as the pose parameters of the current frame image. This application realizes the estimation of pose parameters for objects with less texture.
Description
技术领域technical field
本申请涉及视觉设备领域,尤其涉及一种三维物体位姿参数估计方法及视觉设备。The present application relates to the field of visual equipment, in particular to a method for estimating pose parameters of a three-dimensional object and a visual equipment.
背景技术Background technique
对于纹理稀少的三维物体的位姿估计,点特征稀少影响位姿估计准确度,相对稳定的直线特征有利于位姿估计。采用直线特征进行位姿估计的核心问题是二维与三维直线特征匹配,由于三维直线可用的描述信息太少,难以直接完成二维与三维直线特征匹配。一般是利用已知二维与三维直线对应关系的参考帧,简化为二维与二维图像直线特征匹配。For the pose estimation of 3D objects with sparse textures, sparse point features affect the accuracy of pose estimation, and relatively stable straight line features are beneficial to pose estimation. The core problem of using straight line features for pose estimation is the matching of 2D and 3D straight line features. Since there is too little description information available for 3D straight lines, it is difficult to directly complete the matching of 2D and 3D straight line features. Generally, the reference frame of the known two-dimensional and three-dimensional straight line correspondence is used to simplify the feature matching of two-dimensional and two-dimensional image straight lines.
目前,直线特征匹配主要关注二维与二维图像直线特征匹配,应用于三维重建、运动恢复结构、即时定位与地图构建方面,并取得一定成效。直线特征匹配可分为特征描述方法、点线不变性方法和线线结合方法。特征描述方法利用直线特征邻域的灰度信息构造特征向量来表征该直线,通过比较特征向量相似性来判断是否为匹配直线;点线不变性方法依赖匹配点,利用共面点线的不变性约束来判断是否为匹配直线;线线结合方法利用不同直线间的约束关系来判断是否为匹配直线。At present, line feature matching mainly focuses on the line feature matching of 2D and 2D images, and has been applied to 3D reconstruction, motion recovery structure, real-time positioning and map construction, and has achieved certain results. Line feature matching can be divided into feature description method, point-line invariance method and line-line combination method. The feature description method uses the gray information of the line feature neighborhood to construct a feature vector to characterize the line, and judges whether it is a matching line by comparing the similarity of the feature vectors; the point-line invariance method relies on matching points, and uses the invariance of coplanar point lines Constraints are used to judge whether it is a matching straight line; the line-line combination method uses the constraint relationship between different straight lines to judge whether it is a matching straight line.
利用图像与参考帧的二维与二维直线特征匹配,间接实现二维与三维直线特征匹配。一是需要线下标注好二维与三维对应关系的参考帧,数量多且繁琐;二是需要准确提取图像直线特征,但噪声、模糊等因素会影响直线特征的完整性。Using the two-dimensional and two-dimensional linear feature matching of the image and the reference frame, the two-dimensional and three-dimensional linear feature matching is indirectly realized. One is that the number of reference frames that need to mark the corresponding relationship between 2D and 3D offline is large and cumbersome; the other is that the linear features of the image need to be accurately extracted, but noise, blur and other factors will affect the integrity of the linear features.
从以上分析可以看出,间接匹配方法实现纹理稀少物体的姿态估计,依赖历史图像标注参考帧,且线下标注工作量大。From the above analysis, it can be seen that the indirect matching method realizes the pose estimation of texture-sparse objects, relies on historical images to label reference frames, and has a large workload for offline labeling.
发明内容Contents of the invention
为了解决上述技术问题或者至少部分地解决上述技术问题,本申请提供了一种三维物体位姿参数估计方法及视觉设备。In order to solve the above technical problems or at least partly solve the above technical problems, the present application provides a method for estimating pose parameters of a three-dimensional object and a visual device.
第一方面,本申请提供了一种三维物体位姿参数估计方法,包括:获取基于三维物体的前一帧图像确定的上述三维物体的位姿参数,作为确定上述三维物体的当前帧图像对应位姿参数的初始位姿参数;基于上述初始位姿参数将上述三维物体的三维空间直线段投影至上述当前帧图像的二维图像平面之上,得到上述三维空间直线段的在上述二维图像平面上的投影直线段;确定上述投影直线段在上述二维图像平面上最接近的图像直线段,并确定上述投影直线段与上述最接近的图像直线段之间的距离误差;判断上述距离误差是否满足预设条件;如果不满足上述预设条件,基于上述距离误差确定新的位姿参数,并将上述新的位姿参数作为上述初始位姿参数;如果满足上述预设条件,将上述初始位姿参数作为上述三维物体的上述当前帧图像的位姿参数。In the first aspect, the present application provides a method for estimating pose parameters of a three-dimensional object, including: obtaining the pose parameters of the above-mentioned three-dimensional object determined based on the previous frame image of the three-dimensional object, as the corresponding position of the current frame image of the above-mentioned three-dimensional object The initial pose parameters of the pose parameters; based on the above-mentioned initial pose parameters, project the three-dimensional space straight line segment of the above-mentioned three-dimensional object onto the two-dimensional image plane of the above-mentioned current frame image, and obtain the above-mentioned three-dimensional space straight line segment on the above-mentioned two-dimensional image plane The projected straight line segment on the above-mentioned projected straight line segment; determine the closest image straight line segment of the above-mentioned projected straight line segment on the above-mentioned two-dimensional image plane, and determine the distance error between the above-mentioned projected straight line segment and the above-mentioned closest image straight line segment; judge whether the above-mentioned distance error is Satisfy the preset conditions; if the above preset conditions are not met, determine new pose parameters based on the above distance error, and use the above new pose parameters as the above initial pose parameters; if the above preset conditions are met, set the above initial pose parameters The pose parameter is used as the pose parameter of the above-mentioned current frame image of the above-mentioned three-dimensional object.
在一些实施例中,基于上述初始位姿参数将上述三维物体的三维空间直线段投影至上述当前帧图像的二维图像平面之上,得到上述三维空间直线段的在上述二维图像平面上的投影直线段之前,还包括:确定上述当前帧图像的视线与上述三维空间直线段所在平面的夹角大小,基于上述夹角大小判断上述三维空间直线段的投影可见性并去除被遮挡的三维空间直线段。In some embodiments, based on the above initial pose parameters, the 3D straight line segment of the 3D object is projected onto the 2D image plane of the current frame image to obtain the 3D straight line segment on the 2D image plane Before projecting the straight segment, it also includes: determining the angle between the line of sight of the current frame image and the plane where the straight segment in the three-dimensional space is located, judging the projection visibility of the straight segment in the three-dimensional space based on the angle, and removing the blocked three-dimensional space straight line.
在一些实施例中,确定上述投影直线段在上述二维图像平面上最接近的图像直线段,并确定上述投影直线段与上述最接近的图像直线段之间的距离误差,包括:在上述投影直线段上采样得到多个控制点;确定上述投影直线段的垂直方向;在上述多个控制点中每个控制点处的预设搜索范围沿上述垂直方向双向搜索,将最大似然比值的像素点作为候选对应点,得到多个候选对应点;确定上述多个候选对应点与投影直线段的距离误差。In some embodiments, determining the closest image straight segment of the projected straight segment on the two-dimensional image plane, and determining the distance error between the projected straight segment and the closest image straight segment, includes: A plurality of control points are obtained by sampling the straight line segment; the vertical direction of the above-mentioned projected straight line segment is determined; the preset search range at each control point among the above-mentioned multiple control points is searched bidirectionally along the above-mentioned vertical direction, and the pixel of the maximum likelihood ratio is point as a candidate corresponding point to obtain a plurality of candidate corresponding points; determine the distance error between the plurality of candidate corresponding points and the projected straight line segment.
在一些实施例中,基于上述距离误差确定新的位姿参数,包括:利用李代数空间表征上述初始位姿参数;根据上述距离误差确定位姿增量;基于上述位姿增量确定新的位姿参数。In some embodiments, determining new pose parameters based on the above-mentioned distance error includes: using Lie algebraic space to characterize the above-mentioned initial pose parameters; determining a pose increment according to the above-mentioned distance error; determining a new pose parameter based on the above-mentioned pose increment Attitude parameters.
在一些实施例中,根据上述距离误差确定位姿增量,包括:根据上述距离误差,采用鲁棒估计确定位姿增量。基于上述位姿增量确定新的位姿参数,包括:通过指数映射确定在欧式空间的旋转增量和平移增量,基于上述旋转增量和上述平移增量确定新的旋转矩阵和新的平移向量。In some embodiments, determining the pose increment according to the distance error includes: using robust estimation to determine the pose increment according to the distance error. Determine the new pose parameters based on the above pose increments, including: determine the rotation increment and translation increment in Euclidean space through exponential mapping, and determine the new rotation matrix and new translation based on the above rotation increments and the above translation increments vector.
第二方面,本申请提供了一种三维物体位姿参数估计方法,包括:获取上述三维物体的初始帧图像;提取上述初始帧图像中该三维物体的图像几何特征;将提取的图像几何特征与上述三维物体的参考特征库匹配,得到上述提取的图像几何特征对应的三维空间坐标,其中,上述参考特征库包含从上述三维物体的多个视角下的图像中提取的图像几何特征与三维空间坐标之间的对应关系;基于上述三维物体的三维模型以及上述提取的图像几何特征对应的二维图像坐标和三维空间坐标,使用N点透视方法确定上述三维物体的初始位姿参数;基于上述初始位姿参数将上述三维物体的三维空间直线段投影至上述初始帧图像的二维图像平面之上,得到上述三维空间直线段的在上述二维图像平面上的投影直线段;确定上述投影直线段在上述二维图像平面上最接近的图像直线段,并确定上述投影直线段与上述最接近的图像直线段之间的距离误差;判断上述距离误差是否满足预设条件;如果不满足上述预设条件,基于上述距离误差确定新的位姿参数,并将上述新的位姿参数作为上述初始位姿参数;如果满足上述预设条件,将上述初始位姿参数作为上述三维物体的位姿参数。In a second aspect, the present application provides a method for estimating pose parameters of a three-dimensional object, including: acquiring an initial frame image of the above-mentioned three-dimensional object; extracting image geometric features of the three-dimensional object in the above initial frame image; combining the extracted image geometric features with Matching the reference feature library of the above-mentioned three-dimensional object to obtain the three-dimensional space coordinates corresponding to the extracted image geometric features, wherein the above-mentioned reference feature library includes image geometric features and three-dimensional space coordinates extracted from images under multiple viewing angles of the above-mentioned three-dimensional object The corresponding relationship between; based on the three-dimensional model of the above-mentioned three-dimensional object and the two-dimensional image coordinates and three-dimensional space coordinates corresponding to the above-mentioned extracted image geometric features, use the N-point perspective method to determine the initial pose parameters of the above-mentioned three-dimensional object; based on the above-mentioned initial position Attitude parameters project the three-dimensional space straight line segment of the above-mentioned three-dimensional object onto the two-dimensional image plane of the above-mentioned initial frame image, and obtain the projected straight line segment of the above-mentioned three-dimensional space straight line segment on the above-mentioned two-dimensional image plane; determine the above-mentioned projected straight line segment in The closest image straight line segment on the above-mentioned two-dimensional image plane, and determine the distance error between the above-mentioned projection straight line segment and the above-mentioned nearest image straight line segment; judge whether the above-mentioned distance error satisfies the preset condition; if the above-mentioned preset condition is not satisfied , determining a new pose parameter based on the above-mentioned distance error, and using the above-mentioned new pose parameter as the above-mentioned initial pose parameter; if the above-mentioned preset condition is satisfied, using the above-mentioned initial pose parameter as the pose parameter of the above-mentioned three-dimensional object.
在一些实施例中,上述图像几何特征为上述三维物体的关键角点特征和/或直线特征。In some embodiments, the image geometric features are key corner features and/or straight line features of the three-dimensional object.
在一些实施例中,提取上述初始帧图像中三维物体的图像几何特征,包括:在上述初始帧图像上提取上述三维物体的关键角点和/或直线段;基于提取的关键角点和/或直线段的局部灰度确定上述提取的关键角点和/或直线段的特征向量。In some embodiments, extracting the image geometric features of the three-dimensional object in the initial frame image includes: extracting key corner points and/or straight line segments of the above-mentioned three-dimensional object on the initial frame image; based on the extracted key corner points and/or The local grayscale of the straight line segment determines the above extracted key corner points and/or feature vectors of the straight line segment.
在一些实施例中,基于上述初始位姿参数将上述三维物体的三维空间直线段投影至上述初始帧图像的二维图像平面之上,得到上述三维空间直线段的在上述二维图像平面上的投影直线段之前,还包括:确定上述初始帧图像的视线与上述三维空间直线段所在平面的夹角大小,基于上述夹角大小判断上述三维空间直线段的投影可见性并去除被遮挡的三维空间直线段。In some embodiments, based on the initial pose parameters, the 3D straight line segment of the 3D object is projected onto the 2D image plane of the initial frame image to obtain the 3D straight line segment on the 2D image plane Before projecting the straight segment, it also includes: determining the angle between the line of sight of the initial frame image and the plane where the straight segment in the three-dimensional space is located, judging the projection visibility of the straight segment in the three-dimensional space based on the angle, and removing the blocked three-dimensional space straight line.
在一些实施例中,确定上述投影直线段在上述二维图像平面上最接近的图像直线段,并确定上述投影直线段与上述最接近的图像直线段之间的距离误差,包括:在上述投影直线段上采样得到多个控制点;确定上述投影直线段的垂直方向;在上述多个控制点中每个控制点处的预设搜索范围沿上述垂直方向双向搜索,将最大似然比值的像素点作为候选对应点,得到多个候选对应点;确定上述多个候选对应点与投影直线段的距离误差。In some embodiments, determining the closest image straight segment of the projected straight segment on the two-dimensional image plane, and determining the distance error between the projected straight segment and the closest image straight segment, includes: A plurality of control points are obtained by sampling the straight line segment; the vertical direction of the above-mentioned projected straight line segment is determined; the preset search range at each control point among the above-mentioned multiple control points is searched bidirectionally along the above-mentioned vertical direction, and the pixel of the maximum likelihood ratio is point as a candidate corresponding point to obtain a plurality of candidate corresponding points; determine the distance error between the plurality of candidate corresponding points and the projected straight line segment.
在一些实施例中,基于上述距离误差确定新的位姿参数,包括:利用李代数空间表征上述初始位姿参数;根据上述距离误差确定位姿增量;基于上述位姿增量确定新的位姿参数。In some embodiments, determining new pose parameters based on the above-mentioned distance error includes: using Lie algebraic space to characterize the above-mentioned initial pose parameters; determining a pose increment according to the above-mentioned distance error; determining a new pose parameter based on the above-mentioned pose increment Attitude parameters.
在一些实施例中,根据上述距离误差确定位姿增量,包括:根据上述距离误差,采用鲁棒估计确定位姿增量。基于上述位姿增量确定新的位姿参数,包括:通过指数映射确定在欧式空间的旋转增量和平移增量,基于上述旋转增量和上述平移增量确定新的旋转矩阵和新的平移向量。In some embodiments, determining the pose increment according to the distance error includes: using robust estimation to determine the pose increment according to the distance error. Determine the new pose parameters based on the above pose increments, including: determine the rotation increment and translation increment in Euclidean space through exponential mapping, and determine the new rotation matrix and new translation based on the above rotation increments and the above translation increments vector.
第三方面,本申请提供了一种视觉设备,该视觉设备包括:存储器、处理器及存储在上述存储器上并可在上述处理器上运行的计算机程序;上述计算机程序被上述处理器执行时实现本申请任意的三维物体位姿参数估计方法的步骤。In a third aspect, the present application provides a visual device, which includes: a memory, a processor, and a computer program stored on the memory and operable on the processor; when the computer program is executed by the processor, the Steps in any method for estimating pose parameters of a three-dimensional object in the present application.
第四方面,本申请提供了一种计算机可读存储介质,上述计算机可读存储介质上存储有三维物体位姿参数估计程序,上述三维物体位姿参数估计程序被处理器执行时实现本申请任意的三维物体位姿参数估计方法的步骤。In a fourth aspect, the present application provides a computer-readable storage medium. The above-mentioned computer-readable storage medium stores a three-dimensional object pose parameter estimation program. When the above-mentioned three-dimensional object pose parameter estimation program is executed by a processor, any The steps of the three-dimensional object pose parameter estimation method.
本申请实施例提供的上述技术方案与现有技术相比具有如下优点:Compared with the prior art, the above-mentioned technical solutions provided by the embodiments of the present application have the following advantages:
本申请实施例提供的该方法,通过迭代投影确定三维物体的位姿参数,避免了依赖大量的历史图像标注,并且高效且准确的实现了纹理稀少的三维物体的位姿参数估计。特征匹配与位姿参数估计交替迭代进行,能够去除外点影响,同时获取匹配结果与位姿参数估计结果。The method provided by the embodiment of the present application determines the pose parameters of a three-dimensional object through iterative projection, avoids relying on a large number of historical image annotations, and efficiently and accurately realizes pose parameter estimation of a three-dimensional object with sparse texture. Feature matching and pose parameter estimation are performed alternately and iteratively, which can remove the influence of outliers and obtain matching results and pose parameter estimation results at the same time.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本发明的实施例,并与说明书一起用于解释本发明的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description serve to explain the principles of the invention.
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, In other words, other drawings can also be obtained from these drawings without paying creative labor.
图1为本申请实施例提供的视觉设备一种实施方式的硬件结构示意图;FIG. 1 is a schematic diagram of the hardware structure of an implementation of a visual device provided in the embodiment of the present application;
图2为本申请实施例提供的三维物体位姿参数估计方法一种实施方式的流程图;FIG. 2 is a flow chart of an implementation of a method for estimating pose parameters of a three-dimensional object provided in an embodiment of the present application;
图3为本申请实施例提供的距离误差确定过程一种实施方式的流程图;FIG. 3 is a flow chart of an embodiment of the distance error determination process provided by the embodiment of the present application;
图4为本申请实施例提供的基于距离误差确定新的位姿参数一种实施方式的流程图;FIG. 4 is a flow chart of an embodiment of determining new pose parameters based on distance errors provided by the embodiment of the present application;
图5为本申请实施例提供的三维物体位姿参数估计方法另一种实施方式的流程图;FIG. 5 is a flow chart of another implementation of the method for estimating the pose parameters of a three-dimensional object provided in the embodiment of the present application;
图6为本申请实施例提供的参考特征库建立方法一种实施方式的流程图;FIG. 6 is a flow chart of an implementation of a method for establishing a reference feature library provided in an embodiment of the present application;
图7为本申请实施例提供的三维空间直线段的投影可见性判断的示意图;FIG. 7 is a schematic diagram of projection visibility judgment of a straight line segment in a three-dimensional space provided by an embodiment of the present application;
图8为本申请实施例提供的投影直线段局部搜索的示意图;FIG. 8 is a schematic diagram of a local search for a projected straight line segment provided by an embodiment of the present application;
图9为本申请实施例提供的候选对应点与投影直线段之间距离的示意图;FIG. 9 is a schematic diagram of the distance between candidate corresponding points and projected straight line segments provided by the embodiment of the present application;
图10为本申请实施例提供的立方体用于初始化的参考帧图像;FIG. 10 is a reference frame image used for initialization of the cube provided by the embodiment of the present application;
图11为本申请实施例提供的初始化匹配的示意图;FIG. 11 is a schematic diagram of initialization matching provided by the embodiment of the present application;
图12为本申请实施例提供的非初始帧图像匹配与位姿估计结果;以及Figure 12 is the non-initial frame image matching and pose estimation results provided by the embodiment of the present application; and
图13为本申请实施例提供的位姿参数估计值与标注参考值的对比曲线。Fig. 13 is a comparison curve between the estimated value of the pose parameter and the marked reference value provided by the embodiment of the present application.
具体实施方式Detailed ways
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
在后续的描述中,使用用于表示元件的诸如“模块”、“部件”或“单元”的后缀仅为了有利于本发明的说明,其本身没有特定的意义。因此,“模块”、“部件”或“单元”可以混合地使用。In the following description, use of suffixes such as 'module', 'part' or 'unit' for denoting elements is only for facilitating description of the present invention and has no specific meaning by itself. Therefore, 'module', 'part' or 'unit' may be used in combination.
本发明实施例中提供的视觉设备包括但不限于工业自动化设备、以及智能机器人等设备或者用户终端,能够识别及捕获目标物体、提供目标物体的实时图像信息及实时的空间位姿信息。本发明实施例中提供的视觉设备可以包括:RF(Radio Frequency,射频)单元、WiFi模块、音频输出单元、A/V(音频/视频)输入单元、传感器、接口单元、存储器、处理器、以及电源等部件。The vision devices provided in the embodiments of the present invention include but are not limited to industrial automation equipment, intelligent robots and other equipment or user terminals, which can identify and capture target objects, provide real-time image information and real-time spatial pose information of target objects. The visual device provided in the embodiment of the present invention may include: an RF (Radio Frequency, radio frequency) unit, a WiFi module, an audio output unit, an A/V (audio/video) input unit, a sensor, an interface unit, a memory, a processor, and power supply and other components.
后续描述中将以视觉设备为例进行说明,请参阅图1,其为实现本发明各个实施例的一种视觉设备的硬件结构示意图,该视觉设备100可以包括:一个或多个光学图像传感器101、存储器102、处理器103、以及电源104等部件。本领域技术人员可以理解,图1中示出的视觉设备结构并不构成对视觉设备的限定,视觉设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。In the subsequent description, the vision device will be taken as an example. Please refer to FIG. 1, which is a schematic diagram of the hardware structure of a vision device implementing various embodiments of the present invention. The vision device 100 may include: one or more optical image sensors 101 , memory 102, processor 103, and power supply 104 and other components. Those skilled in the art can understand that the visual device structure shown in Figure 1 does not constitute a limitation to the visual device, and the visual device may include more or fewer components than shown in the illustration, or combine some components, or different components layout.
在一种实施方式中,视觉设备100的光学图像传感器101为一个或多个摄像头,通过开启摄像头,能够实现对图像的捕获,实现拍照、录像等功能,摄像头的位置可以根据需要进行设置。In one embodiment, the optical image sensor 101 of the vision device 100 is one or more cameras. By turning on the cameras, images can be captured, and functions such as taking pictures and videos can be realized. The positions of the cameras can be set as required.
视觉设备100还可包括至少一种传感器,比如光传感器、运动传感器以及其他传感器。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向。Vision device 100 may also include at least one sensor, such as a light sensor, a motion sensor, and other sensors. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when it is stationary.
存储器102可用于存储软件程序以及各种数据。存储器102可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的程序等。此外,存储器102可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 102 can be used to store software programs as well as various data. The memory 102 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a program required by at least one function, and the like. In addition, the memory 102 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
处理器103是视觉设备的控制中心,利用各种接口和线路连接整个视觉设备的各个部分,通过运行或执行存储在存储器102内的软件程序和/或模块,以及调用存储在存储器102内的数据,执行视觉设备的各种功能和处理数据,从而对视觉设备进行整体监控。处理器103可包括一个或多个处理单元。The processor 103 is the control center of the visual device, and uses various interfaces and lines to connect various parts of the entire visual device, by running or executing software programs and/or modules stored in the memory 102, and calling data stored in the memory 102 , to perform various functions of the vision equipment and process data, so as to monitor the vision equipment as a whole. Processor 103 may include one or more processing units.
本实施例提供了一种三维物体位姿参数估计方法,参考图2,三维物体位姿参数估计方法包括步骤S201至步骤S206。This embodiment provides a method for estimating pose parameters of a three-dimensional object. Referring to FIG. 2 , the method for estimating pose parameters for a three-dimensional object includes steps S201 to S206.
步骤S201,获取基于三维物体的前一帧图像确定的上述三维物体的位姿参数,作为确定上述三维物体的当前帧图像对应位姿参数的初始位姿参数。Step S201, acquiring the pose parameters of the above-mentioned three-dimensional object determined based on the previous frame image of the three-dimensional object as initial pose parameters for determining the corresponding pose parameters of the current frame image of the above-mentioned three-dimensional object.
步骤S202,基于该初始位姿参数将上述三维物体的三维空间直线段投影至上述当前帧图像的二维图像平面之上,得到上述三维空间直线段的在上述二维图像平面上的投影直线段。Step S202, based on the initial pose parameters, project the 3D straight line segment of the 3D object onto the 2D image plane of the current frame image to obtain the projected straight line segment of the 3D straight line segment on the 2D image plane .
在本实施例中,投影直线段由图像的二维图像坐标表征。In this embodiment, the projected straight line segment is represented by the two-dimensional image coordinates of the image.
步骤S203,确定上述投影直线段在上述二维图像平面上最接近的图像直线段,并计算上述投影直线段与上述最接近的图像直线段之间的距离误差。Step S203, determining the closest image straight segment of the projected straight segment on the two-dimensional image plane, and calculating a distance error between the projected straight segment and the closest image straight segment.
在本实施例中,在图像的二维图像上最接近的图像直线段可以被认为实际三维空间直线段的投影直线段。该距离误差可表征基于初始位姿参数确定的In this embodiment, the closest straight line segment of the image on the two-dimensional image of the image may be regarded as a projected straight line segment of the straight line segment in the actual three-dimensional space. The distance error can be characterized based on the initial pose parameters determined
步骤S204,判断上述距离误差是否满足预设条件;如果不满足上述预设条件,进入步骤S205;如果满足上述预设条件,进入步骤S206。Step S204, judging whether the above-mentioned distance error satisfies the preset condition; if the above-mentioned preset condition is not satisfied, proceed to step S205; if the above-mentioned preset condition is satisfied, proceed to step S206.
在一些实施例中,步骤S204中,预设条件可为距离误差小于预设距离误差,当距离误差大于该预设距离误差时,确定不满足预设条件,当距离误差小于或等于该预设距离误差时,确定满足该预设条件。但本实施例不限于此。In some embodiments, in step S204, the preset condition may be that the distance error is less than the preset distance error. When the distance error is greater than the preset distance error, it is determined that the preset condition is not met. When the distance error is less than or equal to the preset When there is a distance error, it is determined that the preset condition is met. But this embodiment is not limited thereto.
步骤S205,基于上述距离误差确定新的位姿参数,并将上述新的位姿参数作为上述步骤S202的初始位姿参数。Step S205, determining a new pose parameter based on the above-mentioned distance error, and using the above-mentioned new pose parameter as the initial pose parameter of the above-mentioned step S202.
步骤S206,将上述初始位姿参数作为上述三维物体的上述当前帧图像的位姿参数。Step S206, using the above-mentioned initial pose parameters as pose parameters of the above-mentioned current frame image of the above-mentioned three-dimensional object.
通过该三维物体位姿参数估计方法,通过迭代投影确定三维物体的位姿参数,避免了依赖大量的历史图像标注,并且高效且准确的实现了纹理稀少的三维物体的位姿参数估计。特征匹配与位姿参数估计交替迭代进行,能够去除外点影响,同时获取匹配结果与位姿参数估计结果。Through the method for estimating pose parameters of three-dimensional objects, the pose parameters of three-dimensional objects are determined by iterative projection, which avoids relying on a large number of historical image annotations, and efficiently and accurately realizes pose parameter estimation of three-dimensional objects with sparse textures. Feature matching and pose parameter estimation are performed alternately and iteratively, which can remove the influence of outliers and obtain matching results and pose parameter estimation results at the same time.
在一些实施例中,步骤S205还累计步骤S205确定新的位姿参数的累计次数,每确定一次新的位姿参数,累计次数增加1。步骤S204中,如果不满足上述预设条件,则判断累计次数是否大于预设值,如果小于预设值,进入步骤S205。可选地,如果大于该预设值,将上述初始位姿参数作为上述三维物体的上述当前帧图像的位姿参数。In some embodiments, step S205 also accumulates the accumulated times of determining new pose parameters in step S205, and the accumulated times increase by 1 each time a new pose parameter is determined. In step S204, if the above-mentioned preset condition is not satisfied, it is judged whether the accumulated number is greater than the preset value, and if it is smaller than the preset value, go to step S205. Optionally, if it is greater than the preset value, the above initial pose parameter is used as the pose parameter of the above current frame image of the above three-dimensional object.
在一些实施例中,由于自身遮挡等原因导致一些三维空间直线段是不可见的,可在投影前根据可见性测试去除不可见直线段,仅保留可见直线段。为此,在一些实施例中,上述步骤S202之前,还包括:确定上述当前帧图像的视线与上述三维空间直线段所在平面的夹角大小,基于上述夹角大小判断上述三维空间直线段的投影可见性并去除被遮挡的三维空间直线段。In some embodiments, some three-dimensional straight line segments are invisible due to self-occlusion and other reasons, and the invisible straight line segments can be removed according to the visibility test before projection, and only the visible straight line segments are retained. For this reason, in some embodiments, before the above step S202, it also includes: determining the angle between the line of sight of the current frame image and the plane where the three-dimensional space straight segment is located, and judging the projection of the above three-dimensional space straight line segment based on the above angle Visibility and removal of occluded straight segments in 3D space.
在一些实施例中,如图7所示,通过以下方式得到被遮挡的三维空间直线段:In some embodiments, as shown in FIG. 7, the occluded three-dimensional straight line segment is obtained by the following method:
计算视线向量与三维直线段所在平面法向量的数量积,根据该数量积判断三维空间直线段的投影可见性:Compute the gaze vector and the normal vector of the plane where the three-dimensional line segment is located The quantitative product of , according to which the projective visibility of the straight line segment in 3D space is judged:
其中,V(Li)为1表示该三维空间直线段可见,为0表示该三维空间直线段不可见。Wherein, V(L i ) is 1, indicating that the straight line segment in the three-dimensional space is visible, and is 0, indicating that the straight line segment in the three-dimensional space is invisible.
在一些实施例中,若该三维空间直线段可见,则对其投影直线段进行等间隔均匀采样,采样点称为控制点。In some embodiments, if the straight line segment in the three-dimensional space is visible, the projected straight line segment is uniformly sampled at equal intervals, and the sampling points are called control points.
在一些实施例中,上述步骤S203,确定上述投影直线段在上述二维图像平面上最接近的图像直线段,并计算上述投影直线段与上述最接近的图像直线段之间的距离误差,参考图3,包括步骤S301至步骤S304。In some embodiments, the above step S203 is to determine the closest image straight segment of the projected straight segment on the two-dimensional image plane, and calculate the distance error between the projected straight segment and the closest image straight segment, refer to Fig. 3 includes step S301 to step S304.
步骤S301,在上述三维空间直线段的在上述二维图像平面上的投影直线段上采样得到多个控制点。Step S301 , obtaining a plurality of control points by sampling on the projected straight line segment of the straight line segment in the three-dimensional space on the two-dimensional image plane.
步骤S302,确定上述投影直线段的垂直方向。Step S302, determining the vertical direction of the projected straight line segment.
步骤S303,在上述多个控制点中每个控制点处的预设搜索范围沿上述垂直方向双向搜索,将最大似然比值的像素点作为候选对应点,得到多个候选对应点。In step S303, the preset search range at each control point among the plurality of control points is bidirectionally searched along the above vertical direction, and the pixel point with the maximum likelihood ratio is used as a candidate corresponding point to obtain a plurality of candidate corresponding points.
在本实施例中,多个候选对应点可等效为直线段。In this embodiment, the multiple candidate corresponding points may be equivalent to straight line segments.
步骤S304,确定上述多个候选对应点与投影直线段的距离误差。Step S304, determining distance errors between the plurality of candidate corresponding points and the projected straight line segment.
上述步骤S203中投影直线段与上述最接近的图像直线段之间的距离误差,可由该多个候选对应点与上述投影直线段之间的距离误差表征。The distance error between the projected straight line segment and the closest image straight line segment in step S203 may be represented by the distance error between the multiple candidate corresponding points and the projected straight line segment.
通过该方法,在初始位姿参数的约束下,可以在预设搜索范围中搜索最优对应点,无需全图搜索图像特征,提高了计算效率,降低了计算复杂度。Through this method, under the constraints of the initial pose parameters, the optimal corresponding point can be searched in the preset search range, without the need to search the image features in the whole image, which improves the computational efficiency and reduces the computational complexity.
在一些实施例中,上述步骤S301中,可以均匀采样多个控制点,以提高搜索准确度。In some embodiments, in the above step S301, multiple control points may be uniformly sampled to improve search accuracy.
在一些实施例中,如图8所示,对每一控制点,沿垂直于投影直线段的方向进行一维搜索,搜索范围为{Qi,j∈[-R,R]}。计算搜索范围内每一像素点的似然比值,取似然比值最大的像素点(本实施例中称为最大似然比值点)作为候选对应点满足:In some embodiments, as shown in FIG. 8 , for each control point, a one-dimensional search is performed along the direction perpendicular to the projected straight line segment, and the search range is {Q i , j∈[-R, R]}. Calculate the likelihood ratio of each pixel in the search range, and take the pixel with the largest likelihood ratio (referred to as the maximum likelihood ratio point in this embodiment) as a candidate corresponding point Satisfy:
ζj为似然比值,表示分别在pt和Qj处的卷积值之和的绝对值。Mδ是预先定义的δ方向梯度掩模。v(·)表示所在位置的邻近像素。ζ j is the likelihood ratio, which represents the absolute value of the sum of the convolution values at p t and Q j respectively. M δ is a predefined gradient mask in the δ direction. v(·) represents the adjacent pixels of the location.
在一些实施例中,如图9所示,候选对应点x′i与对应投影直线段ls(r)的距离为:In some embodiments, as shown in FIG. 9 , the distance between the candidate corresponding point x′ i and the corresponding projected straight line segment l s (r) is:
其中,和为X′i的图像坐标。in, and is the image coordinate of X′ i .
在一些实施例中,上述步骤S205,基于上述距离误差确定新的位姿参数,参考图4,包括步骤S401步骤S403。In some embodiments, the above step S205 is to determine new pose parameters based on the above distance error, referring to FIG. 4 , including steps S401 and S403.
步骤S401,利用李代数空间表征上述初始位姿参数。Step S401, using the Lie algebraic space to characterize the above initial pose parameters.
步骤S402,根据上述距离误差确定位姿增量。Step S402, determining the pose increment according to the distance error.
步骤S403,基于上述位姿增量确定新的位姿参数。Step S403, determining new pose parameters based on the above pose increments.
在一些实施例中,上述步骤S402根据上述距离误差确定位姿增量,包括:根据上述距离误差,采用鲁棒估计确定位姿增量。鲁棒估计,指采用Tukey影响函数自适应地为距离误差分配权重,减弱虚假候选对应点的影响。In some embodiments, the above step S402 determining the pose increment according to the distance error includes: determining the pose increment by using robust estimation according to the above distance error. Robust estimation refers to the use of Tukey's influence function to adaptively assign weights to distance errors to reduce the influence of false candidate corresponding points.
在一些实施例中,上述步骤S403基于上述位姿增量确定新的位姿参数,包括:通过指数映射确定在欧式空间的旋转增量和平移增量,基于上述旋转增量和上述平移增量确定新的旋转矩阵和新的平移向量。In some embodiments, the above-mentioned step S403 determines new pose parameters based on the above-mentioned pose increments, including: determining the rotation increments and translation increments in Euclidean space through exponential mapping, based on the above-mentioned rotation increments and the above-mentioned translation increments Determine a new rotation matrix and a new translation vector.
在一些实施例中,在李代数se(3)空间表征位姿参数,v为平移向量,ω为旋转向量。位姿增量计算公式如下:In some embodiments, the pose parameters are represented in a Lie algebra se(3) space, v is a translation vector, and ω is a rotation vector. The pose increment calculation formula is as follows:
其中,为的Moore-Penrose伪逆。D=diag(ω1,...,ωk)是由权重值组成的对角矩阵,该权重值由Tukey影响函数计算所得。是候选对应点与对应投影直线段的距离误差向量ei(r)的Jacobian矩阵:in, for Moore-Penrose pseudo-inverse. D=diag(ω 1 , . . . , ω k ) is a diagonal matrix composed of weight values calculated by the Tukey influence function. is the Jacobian matrix of the distance error vector e i (r) between the candidate corresponding point and the corresponding projected straight line segment:
公式(6)中 In formula (6)
利用指数映射可确定对应欧氏空间的旋转矩阵R和平移向量T,表示为:The rotation matrix R and translation vector T corresponding to the Euclidean space can be determined by exponential mapping, expressed as:
经过位姿增量更新后的位姿参数表示为:The pose parameters after pose incremental update are expressed as:
本实施例还提供了一种三维物体位姿参数估计方法,用以初始化三维物体的位姿参数,参考图5,三维物体位姿参数估计方法包括步骤S501至步骤S509。This embodiment also provides a method for estimating pose parameters of a three-dimensional object, which is used for initializing pose parameters of a three-dimensional object. Referring to FIG. 5 , the method for estimating pose parameters of a three-dimensional object includes steps S501 to S509.
步骤S501,获取三维物体的初始帧图像。Step S501, acquiring an initial frame image of a three-dimensional object.
步骤S502,提取上述初始帧图像中该三维物体的图像几何特征。Step S502, extracting image geometric features of the three-dimensional object in the initial frame image.
在一些实施例中,特征由特征检测和描述算法获取,具体信息包括其在图像坐标系下的坐标,以及由邻近灰度计算而来的特征向量。In some embodiments, the features are obtained by a feature detection and description algorithm, and the specific information includes their coordinates in the image coordinate system and feature vectors calculated from adjacent gray levels.
步骤S503,将提取的图像几何特征与上述三维物体的参考特征库匹配,得到上述提取的图像几何特征对应的三维空间坐标。Step S503, matching the extracted geometric features of the image with the reference feature database of the above-mentioned three-dimensional object to obtain the three-dimensional space coordinates corresponding to the extracted geometric features of the image.
其中,上述参考特征库包含从上述三维物体的多个视角下的图像中提取的图像几何特征与三维空间坐标之间的对应关系。Wherein, the above-mentioned reference feature library includes the corresponding relationship between image geometric features extracted from images of the above-mentioned three-dimensional object under multiple viewing angles and three-dimensional space coordinates.
步骤S504,基于上述三维物体的三维模型以及上述提取的图像几何特征对应的二维图像坐标和三维空间坐标,使用N点透视方法确定上述三维物体的初始位姿参数。Step S504, based on the 3D model of the 3D object and the 2D image coordinates and 3D space coordinates corresponding to the extracted geometric features of the image, use the N-point perspective method to determine the initial pose parameters of the 3D object.
在本实施例中,N点透视方法为在图像点坐标与对应三维空间点坐标已知,以及视觉设备的相机内参已知条件下,优化求解三维物体相对于相机的位姿参数的方法。In this embodiment, the N-point perspective method is a method for optimally solving the pose parameters of the three-dimensional object relative to the camera under the condition that the image point coordinates and the corresponding three-dimensional space point coordinates are known, and the internal camera parameters of the visual device are known.
步骤S505,基于上述初始位姿参数将上述三维物体的三维空间直线段投影至上述初始帧图像的二维图像平面之上,得到上述三维空间直线段的在上述二维图像平面上的投影直线段。Step S505, based on the above initial pose parameters, project the 3D straight line segment of the 3D object onto the 2D image plane of the initial frame image to obtain the projected straight line segment of the 3D straight line segment on the 2D image plane .
步骤S506,确定上述投影直线段在上述二维图像平面上最接近的图像直线段,并计算上述投影直线段与上述最接近的图像直线段之间的距离误差。Step S506, determining the closest image straight segment of the projected straight segment on the two-dimensional image plane, and calculating a distance error between the projected straight segment and the closest image straight segment.
步骤S507,判断上述距离误差是否满足预设条件,如果不满足上述预设条件,进入步骤S508;如果满足上述预设条件,进入步骤S509。Step S507, judging whether the above-mentioned distance error satisfies the preset condition, if not, proceed to step S508; if satisfy the above-mentioned preset condition, proceed to step S509.
步骤S508,基于上述距离误差确定新的位姿参数,并将上述新的位姿参数作为上述步骤S505的初始位姿参数,进入步骤S505。Step S508, determine a new pose parameter based on the above-mentioned distance error, and use the above-mentioned new pose parameter as the initial pose parameter of the above-mentioned step S505, and proceed to step S505.
步骤S509,将上述初始位姿参数作为上述三维物体的位姿参数。Step S509, using the above-mentioned initial pose parameters as pose parameters of the above-mentioned three-dimensional object.
在一些实施例中,上述图像几何特征为上述三维物体的关键角点特征和/或直线特征。In some embodiments, the image geometric features are key corner features and/or straight line features of the three-dimensional object.
在一些实施例中,上述步骤S502提取上述初始帧图像的图像几何特征,包括:在上述初始帧图像上提取该三维物体的关键角点和/或直线段;基于提取的关键角点和/或直线段的局部灰度确定上述提取的关键角点和/或直线段的特征向量。In some embodiments, the above-mentioned step S502 extracting the image geometric features of the above-mentioned initial frame image includes: extracting the key corner points and/or straight line segments of the three-dimensional object on the above-mentioned initial frame image; based on the extracted key corner points and/or The local grayscale of the straight line segment determines the above extracted key corner points and/or feature vectors of the straight line segment.
在一些实施例中,上述步骤S504,基于上述初始位姿参数将上述三维物体的三维空间直线段投影至上述初始帧图像的二维图像平面之上,得到上述三维空间直线段的在上述二维图像平面上的投影直线段之前,还包括:确定上述初始帧图像的视线与上述三维空间直线段所在平面的夹角大小,基于上述夹角大小判断上述三维空间直线段的投影可见性并去除被遮挡的三维空间直线段。In some embodiments, the above step S504, based on the above initial pose parameters, projects the 3D space straight line segment of the above 3D object onto the 2D image plane of the above initial frame image to obtain the above 3D space straight line segment in the above 2D Before projecting the straight line segment on the image plane, it also includes: determining the angle between the line of sight of the initial frame image and the plane where the straight line segment in three-dimensional space is located, judging the projection visibility of the straight line segment in three-dimensional space based on the angle, and removing the Blocked straight line segments in 3D space.
在一些实施例中,上述步骤S506,参考图3,可包括:在上述投影直线段上采样得到多个控制点;确定上述投影直线段的垂直方向;在上述多个控制点中每个控制点处的预设搜索范围沿上述垂直方向双向搜索,将最大似然比值的像素点作为候选对应点,得到多个候选对应点;确定上述多个候选对应点与投影直线段的距离误差。In some embodiments, the above-mentioned step S506, referring to FIG. 3 , may include: obtaining a plurality of control points by sampling on the above-mentioned projected straight line segment; determining the vertical direction of the above-mentioned projected straight line segment; The preset search range at is searched bidirectionally along the above-mentioned vertical direction, using the pixel point with the maximum likelihood ratio as a candidate corresponding point to obtain multiple candidate corresponding points; and determining the distance error between the above-mentioned multiple candidate corresponding points and the projected straight line segment.
在一些实施例中,基于上述距离误差确定新的位姿参数的步骤,参考图4,可包括:利用李代数空间表征上述初始位姿参数;根据上述距离误差确定位姿增量;基于上述位姿增量确定新的位姿参数。In some embodiments, the step of determining new pose parameters based on the above-mentioned distance error, referring to FIG. 4 , may include: using Lie algebraic space to characterize the above-mentioned initial pose parameters; The pose increment determines the new pose parameters.
在一些实施例中,根据上述距离误差确定位姿增量的步骤,可包括:根据上述距离误差,采用鲁棒估计确定位姿增量。基于上述位姿增量确定新的位姿参数,包括:通过指数映射确定在欧式空间的旋转增量和平移增量,基于上述旋转增量和上述平移增量确定新的旋转矩阵和新的平移向量。In some embodiments, the step of determining the pose increment according to the distance error may include: using robust estimation to determine the pose increment according to the distance error. Determine the new pose parameters based on the above pose increments, including: determine the rotation increment and translation increment in Euclidean space through exponential mapping, and determine the new rotation matrix and new translation based on the above rotation increments and the above translation increments vector.
本实施例提供的参考特征库建立方法,用于生产本实施例的参考特征库,该参考特征库可应用于本实施例的三维物体位姿参数估计方法,尤其是步骤S503中。参考图6,该参考特征库建立方法包括步骤S601至步骤S604。The method for establishing a reference feature library provided in this embodiment is used to produce the reference feature library of this embodiment, and the reference feature library can be applied to the method for estimating pose parameters of a three-dimensional object in this embodiment, especially in step S503. Referring to FIG. 6 , the method for establishing a reference signature database includes steps S601 to S604.
步骤S601,获取三维物体多个视角下的图像,得到该三维物体的多帧图像。Step S601, acquire images of a three-dimensional object under multiple viewing angles, and obtain multiple frames of images of the three-dimensional object.
在本实施例中,该多帧图像可包括该三维物体至少部分或者更多视角下的图像,每个视角可包括一帧或多帧图像。在一些实施例中,可包括三维物体的3至5个视角下的图像。In this embodiment, the multiple frames of images may include images of at least part of the three-dimensional object or more viewing angles, and each viewing angle may include one or more frames of images. In some embodiments, images from 3 to 5 viewing angles of a three-dimensional object may be included.
步骤S602,提取上述多帧图像中该三维物体的图像几何特征。Step S602, extracting image geometric features of the three-dimensional object in the above-mentioned multiple frames of images.
在一些实施例中,特征由特征检测和描述算法获取,具体信息包括其在图像坐标系下的坐标,以及由邻近灰度计算而来的特征向量。In some embodiments, the features are obtained by a feature detection and description algorithm, and the specific information includes their coordinates in the image coordinate system and feature vectors calculated from adjacent gray levels.
在一些实施例中,上述图像几何特征为上述三维物体的关键角点特征和/或直线特征。In some embodiments, the image geometric features are key corner features and/or straight line features of the three-dimensional object.
在一些实施例中,提取上述多帧图像中该三维物体的图像几何特征,可包括:在上述多帧图像上提取该三维物体的关键角点和/或直线段;基于提取的关键角点和/或直线段的局部灰度确定上述提取的关键角点和/或直线段的特征向量。In some embodiments, extracting the image geometric features of the three-dimensional object in the above multiple frames of images may include: extracting key corner points and/or straight line segments of the three-dimensional object on the above multiple frame images; based on the extracted key corner points and And/or the local gray level of the straight line segment determines the key corner point and/or the feature vector of the straight line segment extracted above.
步骤S603,根据三维物体的三维模型,利用反投影法确定图像几何特征对应的三维空间坐标。Step S603, according to the 3D model of the 3D object, use the back projection method to determine the 3D space coordinates corresponding to the geometric features of the image.
在本实施例中,每帧图像的一个或多个几何特征整体与三维空间坐标对应。In this embodiment, one or more geometric features of each frame of image as a whole correspond to three-dimensional space coordinates.
步骤S604,形成包含三维物体的图像几何特征与三维空间坐标之间的对应关系的参考特征库。Step S604, forming a reference feature library including the correspondence between the image geometric features of the three-dimensional object and the three-dimensional space coordinates.
在一些实施方式中,作为示例性说明,一种三维物体位姿参数估计方法包括:1)线下阶段:按照如图6所示的方法构建参考特征库;2)初始化阶段:按照如图5所述的方法确定初始帧图像对应的位姿参数;3)位姿参数更新阶段:按照如图2所示的方法确定初始帧图像之后的图像帧对应的位姿参数。In some implementations, as an example, a method for estimating pose parameters of a three-dimensional object includes: 1) offline stage: construct a reference feature library according to the method shown in Figure 6; 2) initialization stage: follow the method shown in Figure 5 The method determines the pose parameters corresponding to the initial frame image; 3) pose parameter update stage: determine the pose parameters corresponding to the image frames after the initial frame image according to the method shown in Figure 2 .
在一些实施例中,可判断图像是否为初始帧图像,当图像为初始帧图像时,进入初始化阶段,按照如图5所述的方法确定初始帧图像对应的位姿参数;当图像不是初始帧图像时,进入位姿参数更新阶段,按照如图2所示的方法确定图像帧对应的位姿参数。In some embodiments, it can be judged whether the image is the initial frame image, and when the image is the initial frame image, enter the initialization stage, and determine the pose parameters corresponding to the initial frame image according to the method as shown in Figure 5; when the image is not the initial frame When the image is generated, enter the pose parameter update stage, and determine the pose parameters corresponding to the image frame according to the method shown in Figure 2.
本申请提供的一种视觉设备,该视觉设备包括:存储器、处理器及存储在上述存储器上并可在上述处理器上运行的计算机程序;上述计算机程序被上述处理器执行时实现本上述任意实施例或实施方式的三维物体位姿参数估计方法的步骤。A visual device provided by the present application, the visual device includes: a memory, a processor, and a computer program stored on the above-mentioned memory and operable on the above-mentioned processor; when the above-mentioned computer program is executed by the above-mentioned processor, any of the above-mentioned implementations can be realized. The steps of the method for estimating a pose parameter of a three-dimensional object according to an example or an implementation manner.
本申请提供的一种计算机可读存储介质,上述计算机可读存储介质上存储有三维物体位姿参数估计程序,上述三维物体位姿参数估计程序被处理器执行时实现本申请任意的三维物体位姿参数估计方法的步骤。A computer-readable storage medium provided by the present application. The above-mentioned computer-readable storage medium stores a three-dimensional object pose parameter estimation program. The steps of the attitude parameter estimation method.
实验及实验结果说明Explanation of experiment and experiment result
在本实施例中,以连续运动立方体为测试对象,图像分辨率为640*480像素。初始帧图像进行初始化得到初始位姿参数,往后帧以上一帧的位姿参数作为当前帧的初始位姿参数,进行二维与三维直线特征匹配和位姿参数估计。所有的实验在一台中央处理器(CPU)为i5-5200Hq(2.2GHz),RAM为8GB的便携式计算机上进行。In this embodiment, a continuously moving cube is used as the test object, and the image resolution is 640*480 pixels. The initial frame image is initialized to obtain the initial pose parameters, and the pose parameters of the next frame and above are used as the initial pose parameters of the current frame, and the two-dimensional and three-dimensional linear feature matching and pose parameter estimation are performed. All experiments were performed on a central processing unit (CPU) of Performed on a laptop with i5-5200Hq (2.2GHz) and 8GB of RAM.
取立方体在三个不同视角的成像图像作为参考图像,构建参考特征库。该多帧参考图像如图10所示。初始帧图像与参考特征库的关键角点特征匹配结果如图11所示,右下角图像为初始帧图像,对应点特征用直线连接,立方体三维模型以初始帧图像的初始位姿参数投影至初始帧二维图像平面上。Take the imaging images of the cube at three different viewing angles as reference images to build a reference feature library. The multi-frame reference image is shown in FIG. 10 . The matching results of key corner point features between the initial frame image and the reference feature library are shown in Figure 11. The image in the lower right corner is the initial frame image, and the corresponding point features are connected by straight lines. The cube 3D model is projected to the initial Frame the 2D image plane.
往后帧的直线特征匹配和位姿参数估计结果如图12所示。立方体三维空间直线段按估计位姿参数重投影至图像平面上,投影直线基本与图像直线重合,直角坐标系朝向表示目标位姿。连续位姿参数估计结果与标注参考值的对比曲线如图13所示,估计曲线基本与参考曲线一致。计算位姿估计值与参考值的均方根误差,如表1所示。另外,单帧平均处理时间43ms,满足实时性要求。The linear feature matching and pose parameter estimation results of subsequent frames are shown in Figure 12. The straight line segment in the three-dimensional space of the cube is re-projected onto the image plane according to the estimated pose parameters, the projected straight line basically coincides with the image straight line, and the orientation of the rectangular coordinate system represents the target pose. The comparison curve of continuous pose parameter estimation results and marked reference values is shown in Figure 13, and the estimated curve is basically consistent with the reference curve. Calculate the root mean square error between the pose estimation value and the reference value, as shown in Table 1. In addition, the average processing time of a single frame is 43ms, which meets the real-time requirements.
表1立方体位姿参数误差Table 1 Cube pose parameter error
从以上结果表明,本发明算法能够准确完成二维与三维直线特征匹配,同时能够准确估计三维物体的位姿参数,并且计算复杂度低。The above results show that the algorithm of the present invention can accurately complete two-dimensional and three-dimensional linear feature matching, and can accurately estimate the pose parameters of three-dimensional objects, and has low computational complexity.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the above embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in various embodiments of the present invention.
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,这些均属于本发明的保护之内。Embodiments of the present invention have been described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementations, and the above-mentioned specific implementations are only illustrative, rather than restrictive, and those of ordinary skill in the art will Under the enlightenment of the present invention, many forms can also be made without departing from the gist of the present invention and the protection scope of the claims, and these all belong to the protection of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910389377.3A CN110111388B (en) | 2019-05-10 | 2019-05-10 | Three-dimensional object pose parameter estimation method and visual equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910389377.3A CN110111388B (en) | 2019-05-10 | 2019-05-10 | Three-dimensional object pose parameter estimation method and visual equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110111388A true CN110111388A (en) | 2019-08-09 |
CN110111388B CN110111388B (en) | 2021-03-23 |
Family
ID=67489342
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910389377.3A Active CN110111388B (en) | 2019-05-10 | 2019-05-10 | Three-dimensional object pose parameter estimation method and visual equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110111388B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110542422A (en) * | 2019-10-10 | 2019-12-06 | 上海钛米机器人科技有限公司 | Robot positioning method, device, robot and storage medium |
CN111127547A (en) * | 2019-12-17 | 2020-05-08 | 北京迈格威科技有限公司 | Positioning method, positioning device, robot and storage medium |
CN111325796A (en) * | 2020-02-28 | 2020-06-23 | 北京百度网讯科技有限公司 | Method and apparatus for determining pose of vision device |
CN111369571A (en) * | 2020-02-27 | 2020-07-03 | 北京百度网讯科技有限公司 | Three-dimensional object pose accuracy judgment method and device and electronic equipment |
CN112037282A (en) * | 2020-09-04 | 2020-12-04 | 北京航空航天大学 | Aircraft attitude estimation method and system based on key points and skeleton |
CN113052954A (en) * | 2019-12-28 | 2021-06-29 | 深圳先进技术研究院 | Three-dimensional reconstruction method, device, terminal and storage medium based on line segment matching |
CN113256722A (en) * | 2021-06-21 | 2021-08-13 | 浙江华睿科技有限公司 | Pose determination method, pose determination device and storage medium |
CN113551661A (en) * | 2020-04-23 | 2021-10-26 | 曰轮法寺 | Pose identification and track planning method, device and system, storage medium and equipment |
CN113643356A (en) * | 2020-04-27 | 2021-11-12 | 北京达佳互联信息技术有限公司 | Camera pose determination method, camera pose determination device, virtual object display method, virtual object display device and electronic equipment |
CN113793297A (en) * | 2021-08-13 | 2021-12-14 | 北京迈格威科技有限公司 | Pose determination method and device, electronic equipment and readable storage medium |
CN114049376A (en) * | 2021-09-17 | 2022-02-15 | 北京航空航天大学 | Pose real-time tracking method, apparatus, computer readable medium and program product |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100197391A1 (en) * | 2009-01-30 | 2010-08-05 | Microsoft Corporation | Visual target tracking |
EP2722136A1 (en) * | 2012-10-19 | 2014-04-23 | inos Automationssoftware GmbH | Method for in-line calibration of an industrial robot, calibration system for performing such a method and industrial robot comprising such a calibration system |
CN105096386A (en) * | 2015-07-21 | 2015-11-25 | 中国民航大学 | Method for automatically generating geographic maps for large-range complex urban environment |
CN107564062A (en) * | 2017-08-16 | 2018-01-09 | 清华大学 | Pose method for detecting abnormality and device |
CN107833253A (en) * | 2017-09-22 | 2018-03-23 | 北京航空航天大学青岛研究院 | A kind of camera pose refinement method towards the generation of RGBD three-dimensional reconstructions texture |
CN108022264A (en) * | 2016-11-01 | 2018-05-11 | 狒特科技(北京)有限公司 | Camera pose determines method and apparatus |
CN108122256A (en) * | 2017-12-25 | 2018-06-05 | 北京航空航天大学 | It is a kind of to approach under state the method for rotating object pose measurement |
CN108986161A (en) * | 2018-06-19 | 2018-12-11 | 亮风台(上海)信息科技有限公司 | A kind of three dimensional space coordinate estimation method, device, terminal and storage medium |
CN109470149A (en) * | 2018-12-12 | 2019-03-15 | 北京理工大学 | A method and device for measuring the pose of a pipeline |
CN109493384A (en) * | 2018-09-20 | 2019-03-19 | 顺丰科技有限公司 | Camera pose estimation method, system, device and storage medium |
CN109725645A (en) * | 2019-03-29 | 2019-05-07 | 中国人民解放军国防科技大学 | Nested unmanned aerial vehicle landing cooperation sign design and relative pose acquisition method |
US20200043189A1 (en) * | 2017-01-13 | 2020-02-06 | Zhejiang University | Simultaneous positioning and dense three-dimensional reconstruction method |
-
2019
- 2019-05-10 CN CN201910389377.3A patent/CN110111388B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100197391A1 (en) * | 2009-01-30 | 2010-08-05 | Microsoft Corporation | Visual target tracking |
EP2722136A1 (en) * | 2012-10-19 | 2014-04-23 | inos Automationssoftware GmbH | Method for in-line calibration of an industrial robot, calibration system for performing such a method and industrial robot comprising such a calibration system |
CN105096386A (en) * | 2015-07-21 | 2015-11-25 | 中国民航大学 | Method for automatically generating geographic maps for large-range complex urban environment |
CN108022264A (en) * | 2016-11-01 | 2018-05-11 | 狒特科技(北京)有限公司 | Camera pose determines method and apparatus |
US20200043189A1 (en) * | 2017-01-13 | 2020-02-06 | Zhejiang University | Simultaneous positioning and dense three-dimensional reconstruction method |
CN107564062A (en) * | 2017-08-16 | 2018-01-09 | 清华大学 | Pose method for detecting abnormality and device |
CN107833253A (en) * | 2017-09-22 | 2018-03-23 | 北京航空航天大学青岛研究院 | A kind of camera pose refinement method towards the generation of RGBD three-dimensional reconstructions texture |
CN108122256A (en) * | 2017-12-25 | 2018-06-05 | 北京航空航天大学 | It is a kind of to approach under state the method for rotating object pose measurement |
CN108986161A (en) * | 2018-06-19 | 2018-12-11 | 亮风台(上海)信息科技有限公司 | A kind of three dimensional space coordinate estimation method, device, terminal and storage medium |
CN109493384A (en) * | 2018-09-20 | 2019-03-19 | 顺丰科技有限公司 | Camera pose estimation method, system, device and storage medium |
CN109470149A (en) * | 2018-12-12 | 2019-03-15 | 北京理工大学 | A method and device for measuring the pose of a pipeline |
CN109725645A (en) * | 2019-03-29 | 2019-05-07 | 中国人民解放军国防科技大学 | Nested unmanned aerial vehicle landing cooperation sign design and relative pose acquisition method |
Non-Patent Citations (3)
Title |
---|
KARL PAUWELS ET AL: ""Real-time Model-based Rigid Object Pose Estimation and Tracking Combining Dense and Sparse Visual Cues"", 《2013 IEEE CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION》 * |
ZHOUDI HUANG ET AL: ""BALG: An alternative for fast and robust feature matching"", 《J. VIS. COMMUN. IMAGE R.》 * |
冯春等: ""基于多传感器融合的航天器间位姿参数估计"", 《红外与激光工程》 * |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110542422A (en) * | 2019-10-10 | 2019-12-06 | 上海钛米机器人科技有限公司 | Robot positioning method, device, robot and storage medium |
CN111127547A (en) * | 2019-12-17 | 2020-05-08 | 北京迈格威科技有限公司 | Positioning method, positioning device, robot and storage medium |
CN113052954A (en) * | 2019-12-28 | 2021-06-29 | 深圳先进技术研究院 | Three-dimensional reconstruction method, device, terminal and storage medium based on line segment matching |
CN111369571A (en) * | 2020-02-27 | 2020-07-03 | 北京百度网讯科技有限公司 | Three-dimensional object pose accuracy judgment method and device and electronic equipment |
CN111325796B (en) * | 2020-02-28 | 2023-08-18 | 北京百度网讯科技有限公司 | Method and apparatus for determining pose of vision equipment |
CN111325796A (en) * | 2020-02-28 | 2020-06-23 | 北京百度网讯科技有限公司 | Method and apparatus for determining pose of vision device |
CN113551661A (en) * | 2020-04-23 | 2021-10-26 | 曰轮法寺 | Pose identification and track planning method, device and system, storage medium and equipment |
CN113643356B (en) * | 2020-04-27 | 2024-05-28 | 北京达佳互联信息技术有限公司 | Camera pose determination method, virtual object display method, device and electronic equipment |
CN113643356A (en) * | 2020-04-27 | 2021-11-12 | 北京达佳互联信息技术有限公司 | Camera pose determination method, camera pose determination device, virtual object display method, virtual object display device and electronic equipment |
CN112037282A (en) * | 2020-09-04 | 2020-12-04 | 北京航空航天大学 | Aircraft attitude estimation method and system based on key points and skeleton |
CN112037282B (en) * | 2020-09-04 | 2021-06-15 | 北京航空航天大学 | Aircraft attitude estimation method and system based on key points and skeleton |
CN113256722B (en) * | 2021-06-21 | 2021-10-15 | 浙江华睿科技股份有限公司 | Pose determination method, pose determination device and storage medium |
CN113256722A (en) * | 2021-06-21 | 2021-08-13 | 浙江华睿科技有限公司 | Pose determination method, pose determination device and storage medium |
CN113793297A (en) * | 2021-08-13 | 2021-12-14 | 北京迈格威科技有限公司 | Pose determination method and device, electronic equipment and readable storage medium |
CN114049376A (en) * | 2021-09-17 | 2022-02-15 | 北京航空航天大学 | Pose real-time tracking method, apparatus, computer readable medium and program product |
CN114049376B (en) * | 2021-09-17 | 2024-12-10 | 北京航空航天大学 | Method, device, computer-readable medium and program product for real-time posture tracking |
Also Published As
Publication number | Publication date |
---|---|
CN110111388B (en) | 2021-03-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110111388B (en) | Three-dimensional object pose parameter estimation method and visual equipment | |
CN111325796B (en) | Method and apparatus for determining pose of vision equipment | |
US10922844B2 (en) | Image positioning method and system thereof | |
CN108447097B (en) | Depth camera calibration method and device, electronic equipment and storage medium | |
US9886774B2 (en) | Photogrammetric methods and devices related thereto | |
CN105469405B (en) | Positioning and map constructing method while view-based access control model ranging | |
US9420265B2 (en) | Tracking poses of 3D camera using points and planes | |
US8447099B2 (en) | Forming 3D models using two images | |
CN108898630A (en) | A kind of three-dimensional rebuilding method, device, equipment and storage medium | |
CN110246147A (en) | Vision inertia odometer method, vision inertia mileage counter device and mobile device | |
JP7280385B2 (en) | Visual positioning method and related apparatus, equipment and computer readable storage medium | |
AU2020401367A1 (en) | 3-D reconstruction using augmented reality frameworks | |
WO2018112788A1 (en) | Image processing method and device | |
Ataer-Cansizoglu et al. | Calibration of non-overlapping cameras using an external SLAM system | |
CN107843251A (en) | The position and orientation estimation method of mobile robot | |
CN110648363A (en) | Camera posture determining method and device, storage medium and electronic equipment | |
WO2023005457A1 (en) | Pose calculation method and apparatus, electronic device, and readable storage medium | |
CN112733641A (en) | Object size measuring method, device, equipment and storage medium | |
GB2567245A (en) | Methods and apparatuses for depth rectification processing | |
CN109902675B (en) | Object pose acquisition method, scene reconstruction method and device | |
CN115705651A (en) | Video motion estimation method, device, equipment and computer readable storage medium | |
CN111829522B (en) | Instant positioning and map construction method, computer equipment and device | |
Zhou et al. | Semi-dense visual odometry for RGB-D cameras using approximate nearest neighbour fields | |
CN112184766B (en) | Object tracking method and device, computer equipment and storage medium | |
CN105339981B (en) | Method for using one group of primitive registration data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |