WO2019084804A1 - Visual odometry and implementation method therefor - Google Patents

Visual odometry and implementation method therefor Download PDF

Info

Publication number
WO2019084804A1
WO2019084804A1 PCT/CN2017/108684 CN2017108684W WO2019084804A1 WO 2019084804 A1 WO2019084804 A1 WO 2019084804A1 CN 2017108684 W CN2017108684 W CN 2017108684W WO 2019084804 A1 WO2019084804 A1 WO 2019084804A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
moment
coordinate system
transformation
motion compensation
Prior art date
Application number
PCT/CN2017/108684
Other languages
French (fr)
Chinese (zh)
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 CN201780087613.5A priority Critical patent/CN110520694A/en
Priority to PCT/CN2017/108684 priority patent/WO2019084804A1/en
Publication of WO2019084804A1 publication Critical patent/WO2019084804A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/04Interpretation of pictures
    • G01C11/06Interpretation of pictures by comparison of two or more pictures of the same area
    • G01C11/12Interpretation of pictures by comparison of two or more pictures of the same area the pictures being supported in the same relative position as when they were taken
    • G01C11/14Interpretation of pictures by comparison of two or more pictures of the same area the pictures being supported in the same relative position as when they were taken with optical projection
    • G01C11/20Interpretation of pictures by comparison of two or more pictures of the same area the pictures being supported in the same relative position as when they were taken with optical projection in separate planes
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C22/00Measuring distance traversed on the ground by vehicles, persons, animals or other moving solid bodies, e.g. using odometers, using pedometers

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Multimedia (AREA)
  • Studio Devices (AREA)
  • Image Analysis (AREA)

Abstract

Disclosed is a visual odometry implementation method. The method comprises: acquiring a first image collected at a first moment by a photographic device and a second image collected at a second moment by same, wherein the first moment is before the second moment; based on pose information of the photographic device at the first moment, estimating pose estimation information of the photographic device at the second moment; based on the pose information at the first moment and the pose estimation information at the second moment, performing projection transformation on at least one of the first image and the second image to obtain two images in the same coordinate system; performing feature point matching in the two images in the same coordinate system; and based on matching feature points in the two images, calculating pose information of the photographic device at the second moment. Further disclosed are visual odometry, an unmanned device, an augmented reality device, a virtual reality device and a readable storage medium.

Description

一种视觉里程计及其实现方法Visual odometer and implementation method thereof 【技术领域】[Technical Field]
本申请涉及运动估计领域,特别是涉及一种视觉里程计及其实现方法、无人设备、增强现实设备、虚拟现实设备及可读存储介质。The present application relates to the field of motion estimation, and in particular to a visual odometer and an implementation method thereof, an unmanned device, an augmented reality device, a virtual reality device, and a readable storage medium.
【背景技术】【Background technique】
视觉里程计(Visual Odometry,VO)通过分析相关图像序列,对相机/相机的载体进行运动估计,以确定相机/相机的载体当前的位置和姿态,从而得到其运动轨迹。Visual Odometry (VO) analyzes the relevant image sequence and performs motion estimation on the camera/camera carrier to determine the current position and posture of the camera/camera carrier to obtain its motion trajectory.
视觉里程计可以使用特征法,特征法是在图像上提取特征点,然后再跟踪这些特征点来计算位姿信息。可以采用光流法来进行特征点跟踪。光流法是利用不同帧的最小化两个特征点周围框的灰度差异来得到特征点匹配结果。光流法在平行运动时匹配效果较为理想。如果图像拍摄过程中拍摄设备旋转,得到的图像也会旋转,不同帧的同一个特征点周围框的灰度差异可能较大,降低特征点匹配的成功率,从而降低位姿信息的准确度甚至匹配失败无法计算出位姿信息,进而影响视觉里程计对旋转的处理能力。The visual odometer can use the feature method, which extracts feature points on the image and then tracks the feature points to calculate the pose information. The optical flow method can be used for feature point tracking. The optical flow method is to obtain the feature point matching result by minimizing the gray difference of the frames around the two feature points with different frames. The optical flow method is ideal for matching in parallel motion. If the shooting device rotates during image capture, the resulting image will also rotate. The grayscale difference between the frames around the same feature point of different frames may be larger, which reduces the success rate of feature point matching, thus reducing the accuracy of pose information and even The matching failure cannot calculate the pose information, which in turn affects the visual odometer's ability to handle rotation.
【发明内容】[Summary of the Invention]
为了至少部分解决以上问题,本发明提出了一种视觉里程计实现方法,该方法包括:获取拍摄设备在第一时刻采集的第一图像和在第二时刻采集的第二图像,第一时刻在第二时刻之前;基于拍摄设备在第一时刻的位姿信息估计拍摄设备在第二时刻的位姿估计信息;基于第一时刻的位姿信息和第二时刻的位姿估计信息对第一图像和第二图像中的至少一个进行投影变换,得到同一坐标系下的两个图像;在同一坐标系下的两个图像中进行特征点匹配;基于两个图像中匹配的特征点计算拍摄设备在第二时刻的位姿信息。In order to at least partially solve the above problems, the present invention provides a visual odometer implementation method, the method comprising: acquiring a first image acquired by a photographing device at a first moment and a second image acquired at a second moment, the first moment being Before the second moment; estimating pose estimation information of the photographing device at the second moment based on the pose information of the photographing device at the first moment; and correcting the first image based on the pose information of the first moment and the pose estimation information of the second moment Performing projection transformation with at least one of the second images to obtain two images in the same coordinate system; performing feature point matching in two images in the same coordinate system; calculating the photographing device based on the matched feature points in the two images Pose information at the second moment.
为了至少部分解决以上问题,本发明提出了一种视觉里程计,该视觉里程计包括拍摄设备及单独或协同工作的至少一个处理器,拍摄设备连接处理器;处理器用于执行指令以实现前述方法。In order to at least partially solve the above problems, the present invention provides a visual odometer comprising a photographing device and at least one processor working alone or in cooperation, the photographing device being coupled to the processor; the processor for executing instructions to implement the aforementioned method .
为了至少部分解决以上问题,本发明提出了一种无人设备,该无人设备包 括前述视觉里程计。In order to at least partially solve the above problems, the present invention proposes an unmanned device, the unmanned device package Including the aforementioned visual odometer.
为了至少部分解决以上问题,本发明提出了一种增强现实设备,该增强现实设备包括前述视觉里程计。In order to at least partially solve the above problems, the present invention proposes an augmented reality device comprising the aforementioned visual odometer.
为了至少部分解决以上问题,本发明提出了一种虚拟现实设备,该虚拟现实设备包括前述视觉里程计。In order to at least partially solve the above problems, the present invention proposes a virtual reality device including the aforementioned visual odometer.
为了至少部分解决以上问题,本发明提出了一种可读存储介质,该可读存储介质存储有指令,指令被执行时实现前述方法。In order to at least partially solve the above problems, the present invention proposes a readable storage medium storing instructions that are implemented when the instructions are executed.
本申请的有益效果是:通过基于摄像设备在第一时刻的位姿信息估计第二时刻的位姿估计信息,然后基于第一时刻的位姿信息和第二时刻的位姿估计信息对第一图像和第二图像中的至少一个进行投影变换,得到同一坐标系下的两个图像以进行特征点匹配,投影变换完成了对第一时刻和第二时刻之间的运动信息的补偿,有效减少了同一坐标系下的两个图像之间摄像设备的旋转运动造成的特征点周围框的灰度差异,从而提高特征点匹配成功率和视觉里程计对旋转的处理能力。The beneficial effect of the present application is to estimate the pose estimation information of the second moment based on the pose information of the imaging device at the first moment, and then first based on the pose information of the first moment and the pose estimation information of the second moment. At least one of the image and the second image is subjected to projection transformation to obtain two images in the same coordinate system for feature point matching, and the projection transformation completes compensation of motion information between the first time and the second time, thereby effectively reducing The gray level difference between the frames around the feature points caused by the rotational motion of the imaging device between the two images in the same coordinate system, thereby improving the feature point matching success rate and the processing ability of the visual odometer to rotate.
【附图说明】[Description of the Drawings]
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings to be used in the embodiments will be briefly described below. Obviously, the drawings in the following description are only some of the present invention. For the embodiments, those skilled in the art can obtain other drawings according to the drawings without any creative work.
图1是本发明视觉里程计实现方法第一实施例的流程示意图;1 is a schematic flow chart of a first embodiment of a method for implementing a visual odometer of the present invention;
图2是本发明视觉里程计实现方法第一实施例的一个例子中拍摄设备在第一时刻和第二时刻的姿势示意图;2 is a schematic diagram of a posture of a photographing apparatus at a first moment and a second moment in an example of the first embodiment of the visual odometer implementation method of the present invention;
图3是本发明视觉里程计实现方法第一实施例的一个例子中校正后的第一图像和第二图像的示意图;3 is a schematic diagram of a corrected first image and a second image in an example of the first embodiment of the visual odometer implementation method of the present invention;
图4是本发明视觉里程计实现方法第一实施例中基于两个图像中匹配的特征点计算拍摄设备在第二时刻的位姿信息的流程示意图;4 is a schematic flow chart of calculating the pose information of the photographing device at the second moment based on the matched feature points in the two images in the first embodiment of the visual odometer implementation method of the present invention;
图5是本发明一实施例中视觉里程计的工作流程示意图;FIG. 5 is a schematic diagram showing the working flow of a visual odometer according to an embodiment of the present invention; FIG.
图6是视觉里程计实现方法第二实施例的流程示意图; 6 is a schematic flow chart of a second embodiment of a method for implementing a visual odometer;
图7是本发明视觉里程计实现方法第三实施例的流程示意图;7 is a schematic flow chart of a third embodiment of a method for implementing a visual odometer of the present invention;
图8是本发明视觉里程计第一实施例的结构示意图;Figure 8 is a schematic structural view of a first embodiment of the visual odometer of the present invention;
图9是本发明视觉里程计第二实施例的结构示意图;Figure 9 is a schematic structural view of a second embodiment of the visual odometer of the present invention;
图10是本发明无人设备一实施例的结构示意图;10 is a schematic structural view of an embodiment of an unmanned device according to the present invention;
图11是本发明增强现实设备一实施例的结构示意图;11 is a schematic structural diagram of an embodiment of an augmented reality device of the present invention;
图12是本发明虚拟现实设备一实施例的结构示意图;12 is a schematic structural diagram of an embodiment of a virtual reality device according to the present invention;
图13是本发明可读存储介质一实施例的结构示意图。Figure 13 is a block diagram showing an embodiment of a readable storage medium of the present invention.
【具体实施方式】【Detailed ways】
下面结合附图和实施例对本发明进行详细说明。以下实施例中不冲突的可以相互结合。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The invention will now be described in detail in conjunction with the drawings and embodiments. The conflicts in the following embodiments can be combined with each other. It is apparent that the described embodiments are only a part of the embodiments of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本发明的实施例例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if present) in the specification and claims of the present invention and the above figures are used to distinguish similar objects without being used for Describe a specific order or order. It is to be understood that the data so used may be interchanged as appropriate, such that the embodiments of the invention described herein can be implemented, for example, in a sequence other than those illustrated or described herein. In addition, the terms "comprises" and "comprises" and "the" and "the" are intended to cover a non-exclusive inclusion, for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to Those steps or units may include other steps or units not explicitly listed or inherent to such processes, methods, products or devices.
如图1所示,本发明视觉里程计实现方法第一实施例包括:As shown in FIG. 1, the first embodiment of the visual odometer implementation method of the present invention includes:
S1:获取拍摄设备在第一时刻采集的第一图像和在第二时刻采集的第二图像。S1: Acquire a first image acquired by the photographing device at the first moment and a second image acquired at the second moment.
拍摄设备可以为相机或摄像头,能够利用光学原理记录图像。拍摄设备可以固定在其载体上。载体可以自行或者在其他物体的驱动下运动,可以为无人设备(例如无人机、无人船等)、增强现实设备、虚拟现实设备、机器人、汽车等等。在一实施例中,该拍摄设备为固定在无人机上的双目相机。The shooting device can be a camera or a camera that can record images using optical principles. The camera can be attached to its carrier. The carrier can be driven by itself or by other objects, and can be unmanned devices (such as drones, unmanned ships, etc.), augmented reality devices, virtual reality devices, robots, automobiles, and the like. In an embodiment, the photographing device is a binocular camera that is fixed to the drone.
第一时刻在第二时刻之前。拍摄设备一般会连续拍摄以得到多张图像组成 的图像序列。第一图像和第二图像在图像序列中可以相邻,也可以不相邻。视觉里程计得到的位姿信息可以用于拍摄设备的载体的控制,为保证控制的实时性,第二图像可以是拍摄设备采集到的最新一帧,或者说当前帧。The first moment is before the second moment. The shooting device usually takes continuous shooting to get multiple images. Sequence of images. The first image and the second image may or may not be adjacent in the sequence of images. The pose information obtained by the visual odometer can be used for controlling the carrier of the photographing device. To ensure the real-time control, the second image can be the latest frame captured by the photographing device, or the current frame.
S2:基于拍摄设备在第一时刻的位姿信息估计拍摄设备在第二时刻的位姿估计信息。S2: Estimating the pose estimation information of the photographing device at the second moment based on the pose information of the photographing device at the first moment.
第一时刻的位姿信息是根据视觉里程计的算法计算得到的,其精度相对较高。第二时刻的位姿估计信息是根据第一时刻的位姿信息以及惯性导航数据进行运动预估而得到的,其精度相对较低。The pose information at the first moment is calculated according to the algorithm of the visual odometer, and its accuracy is relatively high. The pose estimation information at the second moment is obtained based on the pose information of the first moment and the inertial navigation data, and the accuracy is relatively low.
第一时刻的位姿信息可以包括拍摄设备在第一时刻的位置、速度和旋转矩阵/姿态四元数,旋转矩阵为拍摄设备与世界坐标系之间的旋转关系,与姿态四元数可以相互转换。第二时刻的位姿估计信息可以包括拍摄设备在第二时刻的估计位置、估计速度和估计旋转矩阵/估计姿态四元数。由于后续的计算过程中可以不使用第二时刻的估计速度,估计速度可以省去。The pose information at the first moment may include a position, a speed, and a rotation matrix/attitude quaternion of the photographing device at the first moment, and the rotation matrix is a rotation relationship between the photographing device and the world coordinate system, and the pose quaternion may mutually Conversion. The pose estimation information at the second moment may include an estimated position of the photographing device at the second moment, an estimated speed, and an estimated rotation matrix/estimated pose quaternion. Since the estimated speed of the second moment can be used in the subsequent calculation process, the estimated speed can be omitted.
惯性导航数据可以来自于拍摄设备/拍摄设备的载体上安装的惯性器件,惯性器件一般包括加速度计和陀螺仪,惯性导航数据可以包括加速度计的读数和陀螺仪读数。运动预估所使用的估计惯性导航数据可以为第一时刻的惯性导航数据或第二时刻的惯性导航数据,也可以是根据第一时刻和第二时刻的惯性导航数据计算得到的,例如两者的平均值/加权平均值。根据估计惯性导航数据中加速度计的读数可以计算出加速度,对加速度积分后得到速度变化量,加上第一时刻的速度即可得到第二时刻的估计速度,对速度进行积分得到位移量,加上第一时刻的位置可得到第二时刻的估计位置。根据估计惯性导航数据中陀螺仪的读数可以计算出角速度,对角速度积分后得到姿态差,结合第一时刻的旋转矩阵/姿态四元数可得到第二时刻的估计旋转矩阵/估计姿态四元数。The inertial navigation data may be from an inertial device mounted on a carrier of the photographing device/photographing device, which typically includes an accelerometer and a gyroscope, and the inertial navigation data may include accelerometer readings and gyroscope readings. The estimated inertial navigation data used for the motion estimation may be the inertial navigation data at the first moment or the inertial navigation data at the second moment, or may be calculated based on the inertial navigation data at the first moment and the second moment, for example, Average/weighted average. According to the estimated reading of the accelerometer in the inertial navigation data, the acceleration can be calculated. After the acceleration is integrated, the speed change amount is obtained, and the speed of the first moment can be obtained to obtain the estimated speed at the second moment, and the speed is integrated to obtain the displacement amount. The estimated position of the second moment can be obtained from the position at the first moment. According to the estimated gyroscope reading in the inertial navigation data, the angular velocity can be calculated, and the angular velocity is integrated to obtain the attitude difference. Combined with the rotation matrix/attitude quaternion at the first moment, the estimated rotation matrix/estimated attitude quaternion at the second moment can be obtained. .
举例说明第二时刻的位姿估计信息的具体计算方法,假设使用第二时刻的惯性导航数据进行运动预估,由于第一时刻和第二时刻之间的间隔一般非常短,可以将这段时间内的运动视为恒定加速度的运动,计算公式如下:For example, a specific calculation method of the pose estimation information at the second moment is assumed. It is assumed that the inertial navigation data at the second moment is used for motion estimation. Since the interval between the first moment and the second moment is generally very short, the time can be The motion inside is regarded as the motion of constant acceleration, and the calculation formula is as follows:
Figure PCTCN2017108684-appb-000001
Figure PCTCN2017108684-appb-000001
v2=v1+(Rwi(am-ba)+g)Δtv 2 =v 1 +(R wi (a m -b a )+g)Δt
Figure PCTCN2017108684-appb-000002
Figure PCTCN2017108684-appb-000002
Δq=q1{(ω-bω)Δt} Δq=q 1 {(ω-b ω )Δt}
其中,p1为第一时刻的位置,v1为第一时刻的速度,q1为第一时刻的姿态四元数。p2为第二时刻的估计位置,v2为第二时刻的估计速度(可以省去),q2为第二时刻的估计姿态四元数。Where p 1 is the position of the first time, v 1 is the speed of the first time, and q 1 is the attitude quaternion of the first time. p 2 is the estimated position at the second time, v 2 is the estimated speed at the second time (may be omitted), and q 2 is the estimated pose quaternion at the second time.
Δt为第一时刻与第二时刻之间的时间间隔的时长,可以根据第一图像和第二图像在图像序列中的顺序以及拍摄设备的帧率计算得到。举例说明,如果是第一图像和第二图像是相邻的两帧,拍摄设备的帧率为20Hz,粗略计算的情况下Δt可以直接为50ms,如果需要精确计算的话,还要加上第一图像和第二图像的曝光时间差。Rwi是拍摄设备的坐标系与世界坐标系的旋转关系,由姿态四元数q1转换得到。am是第二时刻加速度计的读数,g为重力加速度,ω是第二时刻陀螺仪的读数,Δq为第一时刻和第二时刻之间的姿态差。ba为加速度计的零轴偏差,bω为陀螺仪的零轴偏差,这两个参数一般不随着时间变化,即(ba)1=(ba)2,(bω)1=(bω)2Δt is the duration of the time interval between the first time and the second time, and can be calculated according to the order of the first image and the second image in the image sequence and the frame rate of the photographing device. For example, if the first image and the second image are two adjacent frames, the frame rate of the photographing device is 20 Hz, and in the case of a rough calculation, Δt can be directly 50 ms, and if accurate calculation is required, the first is added. The difference in exposure time between the image and the second image. R wi is the rotational relationship between the coordinate system of the photographing device and the world coordinate system, and is obtained by the attitude quaternion q 1 . a m is the reading of the accelerometer at the second moment, g is the gravitational acceleration, ω is the reading of the gyroscope at the second moment, and Δq is the attitude difference between the first moment and the second moment. b a is the zero-axis deviation of the accelerometer, and b ω is the zero-axis deviation of the gyroscope. These two parameters generally do not change with time, ie (b a ) 1 =(b a ) 2 , (b ω ) 1 =( b ω ) 2 .
S3:基于第一时刻的位姿信息和第二时刻的位姿估计信息对第一图像和第二图像中的至少一个进行投影变换,得到同一坐标系下的两个图像。S3: Perform projection transformation on at least one of the first image and the second image based on the pose information of the first moment and the pose estimation information of the second moment to obtain two images in the same coordinate system.
第一图像所在的坐标系为第一坐标系,第二图像估计所在的坐标系为第二坐标系。第一坐标系对应第一时刻的位姿信息,第二坐标系对应第二时刻的位姿估计信息。如果第一时刻和第二时刻之间拍摄设备是运动的,第一坐标系与第二坐标系不同。The coordinate system in which the first image is located is the first coordinate system, and the coordinate system in which the second image is estimated is the second coordinate system. The first coordinate system corresponds to the pose information of the first moment, and the second coordinate system corresponds to the pose estimation information of the second moment. If the photographing device is moving between the first time and the second time, the first coordinate system is different from the second coordinate system.
一般使用针孔模型来描述世界坐标系与拍摄设备采集到的图像平面的投影关系:A pinhole model is generally used to describe the projection relationship between the world coordinate system and the image plane acquired by the photographing device:
Figure PCTCN2017108684-appb-000003
Figure PCTCN2017108684-appb-000003
其中,[u v 1]T为图像平面中的点,[xw yw zw]T为世界坐标系中的空间点,K为拍摄设备的内参矩阵,R为拍摄设备相对于世界坐标系的旋转矩阵,可以由拍摄设备的姿态四元数转换得到,T为拍摄设备相对于世界坐标系的平移向量,由拍摄设备的位置决定,R和T结合表示了拍摄设备相对于世界坐标系的运动关系,从而定义了图像所在的坐标系。对于第一图像,R由第一时刻的姿态四元数转换得到,T由第一时刻的位置决定;对于第二图像,R由第二时刻的估计姿态四元数转换得到,T由第二时刻的估计位置决定,R和T的计算基础均为估计值,第二坐标系也是估计值,并不一定为第二图像实际所在的坐标系。 Where [u v 1] T is the point in the image plane, [x w y w z w ] T is the spatial point in the world coordinate system, K is the internal parameter matrix of the photographing device, and R is the photographing device relative to the world coordinate system The rotation matrix can be obtained by the quaternion conversion of the shooting device's attitude, T is the translation vector of the shooting device relative to the world coordinate system, determined by the position of the shooting device, and R and T are combined to indicate the movement of the shooting device relative to the world coordinate system. Relationship, which defines the coordinate system in which the image is located. For the first image, R is converted from the attitude quaternion at the first moment, T is determined by the position of the first moment; for the second image, R is obtained by the estimated pose quaternion at the second moment, and T is obtained by the second The estimated position of the time is determined, the calculation basis of R and T is the estimated value, and the second coordinate system is also the estimated value, and is not necessarily the coordinate system in which the second image is actually located.
投影变换可以包括对部分或完整的第一坐标系下的第一图像进行第一投影变换以将其转换为第二坐标系下的第三图像,同一坐标系下的两个图像为第三图像以及部分或完整的第二图像;或者对部分或完整的第二坐标系下的第二图像进行第二投影变换以将其转换为第一坐标系下的第四图像,同一坐标系下的两个图像为第四图像以及部分或完整的第一图像;或者对部分或完整的第一坐标系下的第一图像进行第三投影变换以将其转换为第三坐标系下的第五图像并对部分或完整的第二坐标系下的第二图像进行第四投影变换以将其转换为第三坐标系下的第六图像,第三坐标系与第一坐标系及第二坐标系不同,同一坐标系下的两个图像为第五图像以及第六图像。The projection transformation may include performing a first projection transformation on the first image in the partial or complete first coordinate system to convert it into a third image in the second coordinate system, and the two images in the same coordinate system are the third image. And a partial or complete second image; or performing a second projection transformation on the second image in the partial or complete second coordinate system to convert it into a fourth image in the first coordinate system, two in the same coordinate system The image is a fourth image and a partial or complete first image; or a third projection transformation is performed on the first image in the partial or complete first coordinate system to convert it into a fifth image in the third coordinate system and Performing a fourth projection transformation on the second image in the partial or complete second coordinate system to convert it into a sixth image in the third coordinate system, the third coordinate system being different from the first coordinate system and the second coordinate system, The two images in the same coordinate system are the fifth image and the sixth image.
第三坐标系可以为校正后的第一坐标系,此时第三投影变换为校正变换,第四投影变换包括运动补偿变换及校正变换。第三坐标系也可以为校正后的第二坐标系,此时第三投影变换包括反向运动补偿变换及校正变换,第四投影变换为校正变换。校正变换和运动补偿变换/反向运动补偿变换之间的先后顺序并无限制。The third coordinate system may be the corrected first coordinate system, in which case the third projection transformation is a correction transformation, and the fourth projection transformation includes a motion compensation transformation and a correction transformation. The third coordinate system may also be a corrected second coordinate system, in which case the third projection transformation includes an inverse motion compensation transformation and a correction transformation, and the fourth projection transformation is a correction transformation. There is no limit to the order between the correction transformation and the motion compensation transformation/reverse motion compensation transformation.
第三坐标系也可以为除校正前/后的第一/第二坐标系之外的其他坐标系,例如第一图像前次投影变换之后进行特征点匹配时的坐标系。例如,视觉里程计是连续工作的,将第k帧作为第一图像,第k+1帧作为第二图像,使用本实施例的方法处理之后计算得到第k+1帧对应的位姿信息,处理过程中将第k帧和第k+1帧投影变换到的第三坐标系为校正后的第k帧所在的坐标系;然后将第k+1帧作为第一图像,第k+2帧作为第二图像,使用本实施例的方法处理的过程中可以继续使用校正后的第k帧所在的坐标系作为第三坐标系,这样可以直接使用上次对第k+1帧的投影变换结果而不用再次对第k+1帧进行投影变换,将第k+2帧投影变换到第三坐标系之后即可,从而减少计算量。The third coordinate system may also be a coordinate system other than the first/second coordinate system before/after the correction, for example, a coordinate system when feature point matching is performed after the previous image is converted by the first image. For example, the visual odometer is continuously operated, and the kth frame is used as the first image, and the k+1th frame is used as the second image. After the method of the embodiment is used, the pose information corresponding to the k+1th frame is calculated. The third coordinate system to which the kth frame and the k+1th frame are projected to be transformed is the coordinate system in which the corrected kth frame is located; then the k+1th frame is taken as the first image, the k+2th frame As the second image, the coordinate system in which the corrected kth frame is located can be used as the third coordinate system in the process of processing using the method of the embodiment, so that the projection transformation result of the last k+1 frame can be directly used. Instead of performing the projection transformation on the k+1th frame again, the k+2 frame projection can be transformed into the third coordinate system, thereby reducing the amount of calculation.
以上各种类型的变换中,校正变换的参数是可以根据拍摄设备的畸变信息得到的。对于其他涉及到拍摄设备位姿变化的变换,可以根据变换前的图像使用变换前的坐标系作为参数的针孔模型映射到的世界坐标系中的空间点,与变换后的图像使用变换后的坐标系作为参数的针孔模型映射到的世界坐标系中的空间点相同这一原理来推导得出变换的参数,此时变换的公式可以为:Among the above various types of transformations, the parameters of the correction transformation can be obtained from the distortion information of the photographing device. For other transformations involving the pose change of the photographing device, the spatial point in the world coordinate system to which the pinhole model to which the pre-transformed coordinate system is used as the parameter may be used according to the image before the transformation, and the transformed image is used after the transformation. The coordinate system is used as the parameter of the pinhole model to map to the same spatial point in the world coordinate system to derive the transformed parameters. The formula for the transformation can be:
Figure PCTCN2017108684-appb-000004
Figure PCTCN2017108684-appb-000004
其中,K为拍摄设备的内参矩阵,[u0 v0 1]T为变换前图像平面中的点,[ueis veis  1]T为变换后图像平面中的点,Rwc为变换后的坐标系相对于变换前坐标系的旋转关系,可以根据第一时刻的位姿信息和第二时刻的位姿估计信息计算得到。Where K is the internal reference matrix of the photographing device, [u 0 v 0 1] T is the point in the image plane before the transformation, [u eis v eis 1] T is the point in the transformed image plane, and R wc is the transformed The rotation relationship of the coordinate system with respect to the coordinate system before the transformation can be calculated from the pose information at the first moment and the pose estimation information at the second moment.
对于其他涉及到拍摄设备位姿变化的变换,也可以直接使用图像的二维运动模型来计算变换的参数,此时变换的公式可以为:For other transformations involving the pose change of the shooting device, the two-dimensional motion model of the image can also be directly used to calculate the transformed parameters. The formula for the transformation can be:
Figure PCTCN2017108684-appb-000005
Figure PCTCN2017108684-appb-000005
其中,s为变换前后的坐标系之间的变焦参数,θ为变换前后的坐标系之间的旋转角度,[Δu Δv]T为变换前后的坐标系之间的平移矢量,可以根据第一时刻的位姿信息和第二时刻的位姿估计信息计算得到。Where s is the zoom parameter between the coordinate systems before and after the transformation, θ is the rotation angle between the coordinate systems before and after the transformation, and [Δu Δv] T is the translation vector between the coordinate systems before and after the transformation, which can be based on the first moment. The pose information and the pose estimation information at the second moment are calculated.
下面结合附图举例说明投影变换的过程。在一个例子中,拍摄设备为广角的鱼眼相机,拍摄设备在第一时刻和第二时刻的姿势如图2所示,其中实线框出的10和20分别为拍摄设备在第一时刻和第二时刻的拍摄范围,虚线框出的11和21分别为围绕拍摄设备的重心位置裁剪得到的第五图像和第六图像对应的范围。The process of projection transformation will be exemplified below with reference to the accompanying drawings. In one example, the photographing device is a wide-angle fisheye camera, and the posture of the photographing device at the first moment and the second moment is as shown in FIG. 2, wherein the solid lines are 10 and 20 respectively for the photographing device at the first moment and The shooting range at the second time, 11 and 21 in the broken line frame are the ranges corresponding to the fifth image and the sixth image cropped around the position of the center of gravity of the photographing device, respectively.
如图3所示,校正之后的第一图像13中的点14为拍摄设备的重心位置,围绕点14裁取部分图像作为第五图像15,校正之后的第二图像23中的点24为拍摄设备的重心位置,其中围绕点24的部分图像25是对应第六图像,即对部分图像25进行运动补偿变换之后得到的就是第六图像。As shown in FIG. 3, the point 14 in the first image 13 after correction is the position of the center of gravity of the photographing apparatus, the partial image is cropped around the point 14 as the fifth image 15, and the point 24 in the second image 23 after the correction is photographed. The position of the center of gravity of the device, wherein the partial image 25 surrounding the point 24 corresponds to the sixth image, that is, the sixth image is obtained after the motion compensation transformation of the partial image 25.
投影变换之后得到的第五图像和第六图像的坐标是相同的。可以对完整的图像23进行运动补偿变换之后再根据第五图像15的坐标从中裁剪得到坐标相同的第六图像,这样需要的计算量比较大。为简化计算过程,可以将与第六图像坐标相同的第五图像中每个像素点的坐标作为运动补偿变换的结果,然后根据前面给出的公式反向计算出运动补偿变换之前的回溯点的坐标,所有的回溯点组成了部分图像25,然后计算每个回溯点的灰阶值作为第六图像的对应像素点的灰阶值。The coordinates of the fifth image and the sixth image obtained after the projection transformation are the same. The complete image 23 can be subjected to motion compensation transformation and then cropped from the coordinates of the fifth image 15 to obtain a sixth image having the same coordinates, so that the amount of calculation required is relatively large. In order to simplify the calculation process, the coordinates of each pixel in the fifth image identical to the sixth image coordinate may be used as the result of the motion compensation transformation, and then the backtracking point before the motion compensation transformation is inversely calculated according to the formula given above. Coordinates, all of the backtracking points constitute a partial image 25, and then the grayscale value of each retrospective point is calculated as the grayscale value of the corresponding pixel of the sixth image.
如果某个回溯点的坐标超出校正之后的第二图像23的边界,则将该回溯点的灰阶值(即第六图像的对应像素点的灰阶值)设为0或者随机点。随机点可以服从于但不限于高斯分布/平均分布。如果某个回溯点的坐标刚好与校正之后的第二图像23中某个像素点的坐标相同,则可以直接将该像素点的灰阶值作为该回溯点的灰阶值。如果某个回溯点的坐标在校正之后的第二图像23内且不是整数,则将校正之后的第二图像23中该回溯点不是整数的坐标维度方向上的相 邻像素的灰阶值的线性插值结果作为该回溯点的灰阶值。If the coordinates of a backtracking point exceed the boundary of the second image 23 after the correction, the grayscale value of the backtracking point (ie, the grayscale value of the corresponding pixel of the sixth image) is set to 0 or a random point. Random points can be subject to, but not limited to, Gaussian distribution/average distribution. If the coordinates of a backtracking point are exactly the same as the coordinates of a certain pixel point in the second image 23 after the correction, the grayscale value of the pixel point may be directly used as the grayscale value of the backtracking point. If the coordinates of a backtracking point are within the second image 23 after the correction and are not integers, then the backtracking point in the second image 23 after the correction is not the phase in the coordinate dimension direction of the integer The linear interpolation result of the grayscale value of the adjacent pixel is used as the grayscale value of the backtracking point.
对于最后一种情况,回溯点的坐标为(x,y),g(·)为像素点的灰阶值,即g(x,y)为坐标为(x,y)的点的灰阶值。For the last case, the coordinates of the backtracking point are (x, y), and g(·) is the grayscale value of the pixel, that is, g(x, y) is the grayscale value of the point with the coordinate (x, y). .
假设x不是整数且相邻的两个整数为x1和x2,由于x2-x1=1,y为整数,线性插值可得:g(x,y)=(x2-x)g(x1,y)+(x-x1)g(x2,y)。类似的,假设y不是整数且相邻的两个整数为y1和y2,由于y2-y1=1,x为整数,线性插值可得g(x,y)=(y2-y)g(x,y1)+(y-y1)g(x,y2)。假设x和y都不是整数且x相邻的两个整数为x1和x2,y相邻的两个整数为y1和y2,双线性插值可得g(x,y)=(x2-x)(y2-y)g(x1,y1)+(x2-x)(y-y1)g(x1,y2)+(x-x1)(y2-y)g(x2,y1)+(x-x1)(y-y1)g(x2,y2)。Suppose x is not an integer and the two adjacent integers are x 1 and x 2 . Since x 2 -x 1 =1, y is an integer, linear interpolation can be obtained: g(x, y)=(x 2 -x)g (x 1 , y) + (xx 1 ) g (x 2 , y). Similarly, suppose y is not an integer and the two adjacent integers are y 1 and y 2 . Since y 2 -y 1 =1, x is an integer, linear interpolation can obtain g(x, y)=(y 2 -y )g(x, y 1 )+(yy 1 )g(x, y 2 ). Suppose x and y are not integers and the two integers adjacent to x are x 1 and x 2 , the two integers adjacent to y are y 1 and y 2 , and the bilinear interpolation can be g(x, y)=( x 2 -x)(y 2 -y)g(x 1 ,y 1 )+(x 2 -x)(yy 1 )g(x 1 ,y 2 )+(xx 1 )(y 2 -y)g (x 2 , y 1 ) + (xx 1 ) (yy 1 )g (x 2 , y 2 ).
在本例中,第三坐标系是校正后的第一坐标系,实际也可以将校正后的第二坐标系作为第三坐标系,此时需要对部分或完整的校正后的第一图像进行反向运动补偿变换得到第五图像。类似的,为减少计算量,可以将第六图像中每个像素的坐标作为反向运动补偿变换的结果,根据反向运动补偿变换的参数反向计算出反向运动补偿变换之前的坐标,计算反向运动补偿变换之前的坐标在校正变换后的第一图像中的灰阶值作为第五图像的对应像素的灰阶值,反向运动补偿变换之前的坐标超出边界/不是整数的处理方式可参考前述内容。反向运动补偿变换与运动补偿变换可以互为逆变换。以此类推,这种反向的计算方式可以应用到其他类型的投影变换中去。In this example, the third coordinate system is the corrected first coordinate system, and the corrected second coordinate system may be used as the third coordinate system. In this case, the partial or complete corrected first image needs to be performed. The inverse motion compensation transform yields a fifth image. Similarly, in order to reduce the amount of calculation, the coordinates of each pixel in the sixth image can be used as the result of the inverse motion compensation transformation, and the coordinates before the inverse motion compensation transformation are calculated according to the inverse motion compensation transformation parameters, and the calculation is performed. The coordinates before the inverse motion compensation transform are used as gray scale values of the corresponding pixels in the corrected first transform image, and the coordinates before the inverse motion compensation transform exceed the boundary/not integer processing. Refer to the foregoing. The inverse motion compensation transform and the motion compensation transform can be inverse transforms. By analogy, this reverse calculation can be applied to other types of projection transformations.
S4:在同一坐标系下的两个图像中进行特征点匹配。S4: Feature point matching is performed in two images in the same coordinate system.
由于第二坐标系是估计值,投影变换之后得到的同一坐标系下实际并不一定在同一坐标系下,但即使两个图像实际不在同一坐标系下,两者的坐标系(特别是旋转矩阵)的变化量相对于投影变换之前第一图像和第二图像坐标系的变化量也有明显减小。投影变换之后,两个图像中特征点周围框的灰度差异明显减小甚至消失,使得特征点的匹配成功率提高。Since the second coordinate system is an estimated value, the same coordinate system obtained after the projection transformation is not necessarily in the same coordinate system, but even if the two images are not actually in the same coordinate system, the coordinate systems of the two (especially the rotation matrix) The amount of change of the ) is also significantly reduced with respect to the amount of change of the first image and the second image coordinate system before the projection transformation. After the projection transformation, the gray scale difference of the frame around the feature points in the two images is significantly reduced or even disappeared, so that the matching success rate of the feature points is improved.
S5:基于两个图像中匹配的特征点计算拍摄设备在第二时刻的位姿信息。S5: Calculate the pose information of the photographing device at the second moment based on the matched feature points in the two images.
第二时刻的位姿估计信息的精确度较低,与拍摄设备在第二时刻的实际位姿信息并不一定相同,因此需要使用视觉里程计的算法计算更为精确的第二时刻的位姿信息。计算过程中使用的是原始的/经过校正的第一图像和第二图像。如图4所示,本步骤可以包括:The accuracy of the pose estimation information at the second moment is relatively low, and the actual pose information of the photographing device at the second moment is not necessarily the same, so it is necessary to use a visual odometer algorithm to calculate a more accurate pose of the second moment. information. The original/corrected first image and second image are used in the calculation. As shown in FIG. 4, this step may include:
S51:对两个图像中匹配的特征点中的至少一个进行反向投影变换,得到原 始的/经过校正的第一图像和第二图像中匹配的对应点。S51: performing a back projection transformation on at least one of the matched feature points in the two images to obtain the original Matching corresponding points in the first/corrected first image and the second image.
S52:根据对应点在原始的/经过校正的第一图像和第二图像中的坐标计算帧间运动信息。S52: Calculate inter-frame motion information according to coordinates of the corresponding point in the original/corrected first image and the second image.
S53:利用第一时刻的位姿信息及帧间运动信息获取第二时刻的位姿信息。S53: Acquire the pose information of the second moment by using the pose information and the interframe motion information at the first moment.
本步骤计算得到的是拍摄设备在第二时刻的位姿信息。由于载体的控制可能需要使用的是载体的位姿而非拍摄设备的位姿,本步骤之后可以根据拍摄设备与载体之间固定的相对位姿关系计算出载体在第二时刻的位姿信息。The calculation obtained in this step is the pose information of the photographing device at the second moment. Since the control of the carrier may need to use the pose of the carrier instead of the pose of the photographing device, after this step, the pose information of the carrier at the second moment may be calculated according to the fixed relative pose relationship between the photographing device and the carrier.
随着拍摄设备的连续采集图像,可以重复执行本实施例提供的方法以依次计算拍摄设备在不同帧对应的采集时刻的位姿信息,从而得到拍摄设备/拍摄设备的载体的运动轨迹。With the continuous acquisition of the image of the photographing device, the method provided in this embodiment may be repeatedly performed to sequentially calculate the pose information of the photographing device at the acquisition time corresponding to different frames, thereby obtaining the motion track of the carrier of the photographing device/photographing device.
本实施例提供的方法可以应用于单目视觉里程计,也可以应用于双目视觉里程计。如果应用于双目视觉里程计,可以分别对左/右图像序列应用本实施例提供的方法。The method provided by this embodiment can be applied to a monocular visual odometer, and can also be applied to a binocular visual odometer. If applied to a binocular visual odometer, the method provided by this embodiment can be applied to the left/right image sequence separately.
通过本实施例的实施,基于摄像设备在第一时刻的位姿信息估计第二时刻的位姿估计信息,然后基于第一时刻的位姿信息和第二时刻的位姿估计信息对第一图像和第二图像中的至少一个进行投影变换,得到同一坐标系下的两个图像以进行特征点匹配,投影变换完成了对第一时刻和第二时刻之间的运动信息的补偿,有效减少了同一坐标系下的两个图像之间摄像设备的旋转运动造成的特征点周围框的灰度差异,从而提高特征点匹配成功率和视觉里程计对旋转的处理能力。With the implementation of the embodiment, the pose estimation information of the second moment is estimated based on the pose information of the imaging apparatus at the first moment, and then the first image is based on the pose information of the first moment and the pose estimation information of the second moment. Projection transformation is performed with at least one of the second images to obtain two images in the same coordinate system for feature point matching, and the projection transformation completes compensation of motion information between the first time and the second time, thereby effectively reducing The difference in the gray level of the frame around the feature point caused by the rotational motion of the imaging device between the two images in the same coordinate system, thereby improving the feature point matching success rate and the processing ability of the visual odometer to rotate.
举例说明,如图5所示,在本发明一实施例中,视觉里程计的工作流程可以包括:在tm时刻,拍摄设备采集到的新图像(即第m帧,也可以被称为当前帧)作为第二图像,新图像的前一帧(即tm-1时刻采集到的第m-1帧)作为第一图像,对新图像进行校正变换,然后根据帧间运动预估结果进行运动补偿变换,其中帧间运动预估是根据tm-1时刻计算出的精确位姿和新的惯性导航数据(即tm时刻传感器采集到的惯性导航数据)进行的。图中虚线框出的校正变换和运动补偿变换可以统称为投影变换,校正变换和运动补偿变换的顺序可以调换,也可以一次完成。Illustration, shown in Figure 5, in one embodiment of the present invention, a visual workflow may odometer comprising: at time T m, to capture a new image capture device (i.e. m-th frame, this may also be referred to as Frame) as the second image, the previous frame of the new image (ie, the m-1th frame acquired at time t m-1 ) is used as the first image, and the new image is corrected and transformed, and then the inter-frame motion estimation result is performed. Motion compensation transformation, in which the interframe motion estimation is performed based on the accurate pose calculated at time t m-1 and the new inertial navigation data (ie, the inertial navigation data collected by the sensor at time t m ). The correction transformation and motion compensation transformation in the dashed line in the figure can be collectively referred to as projection transformation, and the order of the correction transformation and the motion compensation transformation can be exchanged or completed at one time.
投影变换后的新图像和校正后的第一图像处于同一坐标系下,可以对这两者进行特征点匹配,然后基于匹配的特征点计算出tm时刻的精确位姿以用于载体的控制。接着在在tm+1时刻,拍摄设备采集到了第m+1帧,此时新图像变为 第m+1帧作为第二图像,第m帧变为第一图像,重复执行前述步骤,可以实时计算拍摄设备的位姿从而得到拍摄设备/拍摄设备的载体的运动轨迹。After the projection transformed new image and the corrected first image are in the same coordinate system, feature point matching can be performed on the two, and then the precise pose at time t m is calculated based on the matched feature points for carrier control. . Then, at time t m+1 , the photographing device collects the m+1th frame, at which time the new image becomes the m+1th frame as the second image, and the mth frame becomes the first image, and the foregoing steps are repeatedly performed, The pose of the photographing device is calculated in real time to obtain the motion trajectory of the carrier of the photographing device/photographing device.
如图6所示,本发明视觉里程计实现方法第二实施例,是在本发明视觉里程计实现方法第一实施例的基础上,S3之前进一步包括:As shown in FIG. 6, the second embodiment of the visual odometer implementation method of the present invention is based on the first embodiment of the visual odometer implementation method of the present invention, and further includes:
S20:利用第二时刻的惯性导航数据估算第一图像与第二图像之间的旋转角。S20: Estimating a rotation angle between the first image and the second image by using the inertial navigation data at the second moment.
一般来说,可以根据第二时刻的陀螺仪的读数估算旋转角。在其他实施例中,也可以利用第一时刻的惯性导航数据,或者结合第一时刻和第二时刻的惯性导航数据来估算旋转角。In general, the angle of rotation can be estimated from the readings of the gyroscope at the second moment. In other embodiments, the inertial navigation data at the first moment may be utilized, or the rotational angle may be estimated in conjunction with the inertial navigation data at the first and second moments.
旋转角可以用一个包括n个元素的数组来表示,其中n可以为大于0的整数,每个元素表示一个可旋转方向上的角度变化量。n的大小与拍摄设备/拍摄设备的载体的运动自由度有关。例如当拍摄设备安装在飞行器上时,n可以等于3,旋转角中的元素分别表示pitch角、yaw角和roll角。The rotation angle can be represented by an array of n elements, where n can be an integer greater than 0, and each element represents an amount of angular change in a rotatable direction. The size of n is related to the degree of freedom of movement of the carrier of the photographing device/photographing device. For example, when the photographing device is mounted on the aircraft, n may be equal to 3, and the elements in the angle of rotation represent the pitch angle, the yaw angle, and the roll angle, respectively.
旋转角可以是带有指向性的,此时旋转角中的每个元素可能为正数或负数或0;旋转角可以是不带有指向性的,此时旋转角中的每个元素可能为正数或0。The rotation angle can be directional, in which case each element in the rotation angle may be positive or negative or 0; the rotation angle may be directional, and each element in the rotation angle may be Positive number or 0.
S21:判断旋转角是否在预设范围内。S21: Determine whether the rotation angle is within a preset range.
如果旋转角是带有指向性的,为简化判断,可以将旋转角的绝对值与预设范围进行比较以去除指向性的影响。如果旋转角不带有指向性,则可以直接将旋转角与预设范围进行比较。If the rotation angle is directional, to simplify the judgment, the absolute value of the rotation angle can be compared with the preset range to remove the influence of the directivity. If the angle of rotation is not directional, the angle of rotation can be directly compared to the preset range.
不考虑指向性(旋转角本身不带有指向性或者取带有指向性的旋转角的绝对值)的情况下,如果旋转角/旋转角的绝对值小于预设范围的下限(即最小值),说明拍摄设备的姿态变化比较平稳,旋转量较小,不需要进行投影变换也能得到较好的特征点匹配结果。如果旋转角/旋转角的绝对值大于预设范围的上限(即最大值),预设范围的上限可以由拍摄设备的视场角决定,说明拍摄设备的姿态变化过于剧烈,旋转量较大,即使进行投影变换,得到的两张图像也完全不重叠或者重叠部分不足以支持得到需要的匹配特征点,投影变换没有意义。Regardless of the directivity (the rotation angle itself does not have directivity or the absolute value of the rotation angle with directivity), if the absolute value of the rotation angle/rotation angle is smaller than the lower limit of the preset range (ie, the minimum value) It indicates that the posture change of the photographing device is relatively stable, the amount of rotation is small, and a good feature point matching result can be obtained without performing projection transformation. If the absolute value of the rotation angle/rotation angle is greater than the upper limit of the preset range (ie, the maximum value), the upper limit of the preset range may be determined by the angle of view of the photographing device, indicating that the posture of the photographing device changes too sharply, and the amount of rotation is large. Even if the projection transformation is performed, the obtained two images do not overlap at all or the overlapping portion is insufficient to support the desired matching feature points, and the projection transformation has no meaning.
不考虑指向性的情况下,预设范围可以是有限的,也可以是无限的。如果预设范围是无限的,其上限可以为正无穷,下限可以为正数,意味着旋转角/旋转角的绝对值不可能大于上限。如果预设范围是有限的,其上限不是正无穷,意味着旋转角/旋转角的绝对值不可能大于上限,如果下限为0则意味着旋转角/旋转角的绝对值不可能小于下限,如果下限为正数则意味着旋转角/旋转角的绝对值可能小于下限。以此类推,可以得到考虑指向性的情况下将旋转角直接与 预设范围进行比较的情况。The preset range can be limited or infinite without considering directivity. If the preset range is infinite, the upper limit can be positive infinity, and the lower limit can be positive, meaning that the absolute value of the rotation angle/rotation angle cannot be greater than the upper limit. If the preset range is finite, the upper limit is not positive infinity, meaning that the absolute value of the rotation angle/rotation angle cannot be greater than the upper limit. If the lower limit is 0, it means that the absolute value of the rotation angle/rotation angle cannot be less than the lower limit. A positive limit means that the absolute value of the rotation angle/rotation angle may be less than the lower limit. By analogy, you can get the rotation angle directly with the consideration of directivity. The case where the preset range is compared.
如果旋转角在预设范围内,则执行包括S3在内的后续步骤;如果旋转角不在预设范围内,则可以不执行包括S3在内的后续步骤而直接使用传统的视觉里程计算法进行特征点匹配(例如小于预设范围的下限的情况下),或者放弃使用里程计算法(例如大于预设范围的上限的情况下)而使用其他方式来定位拍摄设备,例如将第二时刻的位姿估计信息作为第二时刻的位姿信息。在其他实施例中,旋转角不在预设范围内时可以继续执行包括S3在内的后续步骤。If the rotation angle is within the preset range, the subsequent steps including S3 are performed; if the rotation angle is not within the preset range, the subsequent steps including S3 may be performed without using the conventional visual mileage calculation method. Point matching (for example, less than the lower limit of the preset range), or discarding the use of the mileage calculation method (for example, greater than the upper limit of the preset range) and using other methods to locate the photographing device, for example, the pose at the second moment The estimated information is used as the pose information of the second moment. In other embodiments, subsequent steps including S3 may continue to be performed when the rotation angle is not within the preset range.
S20/S21可以在S2中的估算第二时刻的估计位置/速度之前执行,也可以在其之后执行。如果S20和S21均在S2中的估算第二时刻的估计位置/速度之前执行,且旋转角不在预设范围内,则S2中的估算第二时刻的估计位置/速度可以被跳过。S20/S21 may be performed before or at an estimated position/speed in the second time in S2. If both S20 and S21 are performed before the estimated position/speed of the second time estimate in S2, and the rotation angle is not within the preset range, the estimated position/speed of the estimated second time in S2 may be skipped.
如图7所示,本发明视觉里程计实现方法第三实施例,是在本发明视觉里程计实现方法第二实施例的基础上,拍摄设备的视场角小于预设阈值,S20之后进一步包括:As shown in FIG. 7, the third embodiment of the visual odometer implementation method of the present invention is based on the second embodiment of the visual odometer implementation method of the present invention. The field of view of the photographic device is smaller than a preset threshold, and further includes after S20. :
S22:判断旋转角是否属于yaw角。S22: Determine whether the rotation angle belongs to the yaw angle.
本实施例中的拍摄设备安装于飞行器上,拍摄设备的视场角小于预设阈值可以表示拍摄设备不是广角的。The photographing device in this embodiment is mounted on the aircraft, and the field of view of the photographing device is less than a preset threshold, which may indicate that the photographing device is not wide-angle.
如果旋转角属于yaw角,则意味着旋转角中的pitch角和roll角小于或者等于阈值(该阈值可以接近于或者等于0),执行后续步骤(S21或S3);如果旋转角不属于yaw角,则意味着旋转角中的pitch角和/或roll角大于阈值,由于拍摄设备在pitch角和roll角方向上的范围非常小,即使进行投影变换,得到的两张图像也完全不重叠或者重叠部分不足以支持得到需要的匹配特征点,可以不执行后续步骤,而使用其他方式来定位拍摄设备,例如将第二时刻的位姿估计信息作为第二时刻的位姿信息。在其他实施例中,旋转角不在预设范围内时可以继续执行后续步骤。If the rotation angle belongs to the yaw angle, it means that the pitch angle and the roll angle in the rotation angle are less than or equal to the threshold (the threshold can be close to or equal to 0), and the subsequent step (S21 or S3) is performed; if the rotation angle does not belong to the yaw angle , meaning that the pitch angle and/or the roll angle in the rotation angle is larger than the threshold. Since the range of the shooting device in the direction of the pitch angle and the roll angle is very small, even if the projection transformation is performed, the two images obtained do not overlap or overlap at all. In part, it is not sufficient to support the required matching feature points, and the subsequent steps may not be performed, but other methods are used to locate the photographing device, for example, the pose estimation information at the second moment is used as the pose information of the second moment. In other embodiments, the subsequent steps may continue to be performed when the rotation angle is not within the preset range.
S22与S21之间的执行顺序并无限制。在本实施例中,只有在旋转角属于yaw角且在预设范围内时才会执行后续的包括S3在内的步骤,在其他实施例中,也可以只判断旋转角是否属于yaw角而不判断其是否在预设范围内。The order of execution between S22 and S21 is not limited. In this embodiment, the subsequent steps including S3 are performed only when the rotation angle belongs to the yaw angle and is within the preset range. In other embodiments, it is also possible to judge only whether the rotation angle belongs to the yaw angle. Determine if it is within the preset range.
S22可以在S2中的估算第二时刻的估计位置/速度之前执行,也可以在其之后执行。如果S22均在S2中的估算第二时刻的估计位置/速度之前执行,且旋转角不在预设范围内,则S2中的估算第二时刻的估计位置/速度可以被跳过。 S22 may be performed before estimating the estimated position/speed at the second moment in S2, or may be performed thereafter. If S22 is both performed before the estimated position/speed of the second time estimate in S2, and the rotation angle is not within the preset range, the estimated position/speed of the estimated second time in S2 may be skipped.
如图8所示,本发明视觉里程计第一实施例包括处理器110和拍摄设备120。拍摄设备120连接110。图中只画出了一个处理器110和拍摄设备120,实际数量可以更多。处理器110可以单独或者协同工作。如果处理器110的数量大于一,其中可以有部分处理器110不连接拍摄设备120。As shown in FIG. 8, the first embodiment of the visual odometer of the present invention includes a processor 110 and a photographing device 120. The photographing device 120 is connected 110. Only one processor 110 and camera 120 are shown in the figure, and the actual number can be more. The processor 110 can work alone or in concert. If the number of processors 110 is greater than one, there may be portions of the processor 110 that are not connected to the photographing device 120.
处理器110控制视觉里程计的操作,处理器110还可以称为CPU(Central Processing Unit,中央处理单元)。处理器110可能是一种集成电路芯片,具有信号序列的处理能力。处理器110还可以是通用处理器、数字信号序列处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 110 controls the operation of the visual odometer, which may also be referred to as a CPU (Central Processing Unit). Processor 110 may be an integrated circuit chip with the processing capabilities of a signal sequence. The processor 110 can also be a general purpose processor, a digital signal sequence processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware. Component. The general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
拍摄设备120可以为相机或者摄像头,用于采集图像以供处理器110进行处理。The photographing device 120 can be a camera or a camera for acquiring images for processing by the processor 110.
处理器110用于执行指令对拍摄设备采集到的图像进行处理以实现本发明视觉里程计实现方法任一实施例以及不冲突的组合所提供的方法。The processor 110 is configured to execute an instruction to process an image acquired by the photographing device to implement a method provided by any one of the embodiments of the visual odometer implementation method of the present invention and a non-conflicting combination.
如图9所示,本发明视觉里程计第二实施例包括处理器211、212和拍摄设备220。拍摄设备220分别连接处理器211和212。As shown in FIG. 9, the second embodiment of the visual odometer of the present invention includes processors 211, 212 and photographing device 220. The photographing device 220 is connected to the processors 211 and 212, respectively.
处理器211、212和拍摄设备220的具体描述可参考本发明视觉里程计第一实施例的内容。处理器211和212协同工作以实现本发明视觉里程计实现方法任一实施例以及不冲突的组合所提供的方法,其中处理器211可以为专用加速电路,例如DSP、ASIC、FPGA等,负责对第一图像和第二图像中的至少一个进行投影变换,处理器212负责其他部分。A detailed description of the processors 211, 212 and the photographing device 220 can be referred to the contents of the first embodiment of the visual odometer of the present invention. The processors 211 and 212 cooperate to implement the method provided by any embodiment of the visual odometer implementation method of the present invention and the non-conflicting combination, wherein the processor 211 can be a dedicated acceleration circuit, such as a DSP, an ASIC, an FPGA, etc., responsible for At least one of the first image and the second image is subjected to projection transformation, and the processor 212 is responsible for other portions.
图中的连接关系仅为示意,实际可以只有处理器211/212连接拍摄设备220。The connection relationship in the figure is only an illustration, and actually only the processor 211/212 can be connected to the photographing device 220.
本实施例中处理器211和212是两个分立的器件,在其他实施例中两者可以集成在一起。 Processors 211 and 212 in this embodiment are two separate devices, and in other embodiments both may be integrated.
如图10所示,本发明无人设备300一实施例包括视觉里程计310,视觉里程计310可以为本发明视觉里程计任一实施例所提供的视觉里程计。无人设备300可以为无人机、无人船、无人车等。以无人机为例,视觉里程计中的拍摄设备可以安装在机身上,处理器可以是一个独立的硬件,也可以与拍摄设备集成在一起,也可以集成在无人机的飞行控制器中。As shown in FIG. 10, an embodiment of the unmanned device 300 of the present invention includes a visual odometer 310, which may be a visual odometer provided by any of the embodiments of the visual odometer of the present invention. The unmanned device 300 can be a drone, an unmanned boat, an unmanned vehicle, or the like. Taking a drone as an example, the shooting device in the visual odometer can be mounted on the body. The processor can be an independent hardware, integrated with the shooting device, or integrated into the flight controller of the drone. in.
如图11所示,本发明增强现实设备400一实施例包括视觉里程计410,视觉里程计410可以为本发明视觉里程计任一实施例所提供的视觉里程计。 As shown in FIG. 11, an embodiment of the augmented reality device 400 of the present invention includes a visual odometer 410, which may be a visual odometer provided by any of the embodiments of the visual odometer of the present invention.
如图12所示,本发明虚拟现实设备500一实施例包括视觉里程计510,视觉里程计510可以为本发明视觉里程计任一实施例所提供的视觉里程计。As shown in FIG. 12, an embodiment of the virtual reality device 500 of the present invention includes a visual odometer 510, which may be a visual odometer provided by any of the embodiments of the visual odometer of the present invention.
如图13所示,本发明可读存储介质第一实施例包括存储器610,存储器610存储有指令,该指令被执行时实现本发明视觉里程计实现方法任一实施例以及不冲突的组合所提供的方法。As shown in FIG. 13, a first embodiment of a readable storage medium of the present invention includes a memory 610 that stores instructions that, when executed, implement any of the embodiments of the visual odometer implementation method of the present invention and a non-conflicting combination Methods.
存储器610可以包括只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、闪存(Flash Memory)、硬盘、光盘等。The memory 610 may include a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory, a hard disk, an optical disk, and the like.
在本发明所提供的几个实施例中,应该理解到,所揭露的方法和装置,可以通过其它的方式实现。例如,以上所描述的装置实施方式仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present invention, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the device implementations described above are merely illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施方式方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理包括,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施方式所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。 The integrated unit, if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods of the various embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
以上所述仅为本发明的实施方式,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。 The above is only the embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformations made by the description of the invention and the drawings are directly or indirectly applied to other related technologies. The fields are all included in the scope of patent protection of the present invention.

Claims (23)

  1. 一种视觉里程计实现方法,其特征在于,包括:A visual odometer implementation method, comprising:
    获取拍摄设备在第一时刻采集的第一图像和在第二时刻采集的第二图像,所述第一时刻在所述第二时刻之前;Obtaining a first image acquired by the photographing device at a first moment and a second image acquired at a second moment, the first moment being before the second moment;
    基于所述拍摄设备在第一时刻的位姿信息估计所述拍摄设备在第二时刻的位姿估计信息;Estimating the pose estimation information of the photographing device at the second moment based on the pose information of the photographing device at the first moment;
    基于所述第一时刻的位姿信息和所述第二时刻的位姿估计信息对所述第一图像和所述第二图像中的至少一个进行投影变换,得到同一坐标系下的两个图像;Performing projection transformation on at least one of the first image and the second image based on the pose information of the first moment and the pose estimation information of the second moment to obtain two images in the same coordinate system ;
    在所述同一坐标系下的两个图像中进行特征点匹配;Feature point matching in two images in the same coordinate system;
    基于所述两个图像中匹配的特征点计算所述拍摄设备在所述第二时刻的位姿信息。The pose information of the photographing device at the second moment is calculated based on the matched feature points in the two images.
  2. 根据权利要求1所述的方法,其特征在于,The method of claim 1 wherein
    所述第一图像所在的坐标系为第一坐标系,所述第二图像估计所在的坐标系为第二坐标系,所述第一坐标系对应所述第一时刻的位姿信息,所述第二坐标系对应所述第二时刻的位姿估计信息;The coordinate system in which the first image is located is a first coordinate system, the coordinate system in which the second image is estimated is a second coordinate system, and the first coordinate system corresponds to the pose information of the first time, The second coordinate system corresponds to the pose estimation information of the second moment;
    所述基于所述第一时刻的位姿信息和所述第二时刻的位姿估计信息对所述第一图像和所述第二图像中的至少一个进行投影变换包括:The projecting transforming the at least one of the first image and the second image based on the pose information of the first moment and the pose estimation information of the second moment comprises:
    对部分或完整的所述第一图像进行第一投影变换得到第三图像,所述第三图像所在的坐标系为所述第二坐标系,所述同一坐标系下的两个图像为所述第三图像以及部分或完整的所述第二图像;或 Performing a first projection transformation on the partial or complete first image to obtain a third image, where the coordinate system of the third image is the second coordinate system, and two images in the same coordinate system are a third image and a partial or complete second image; or
    对部分或完整的所述第二图像进行第二投影变换得到第四图像,所述第四图像所在的坐标系为所述第一坐标系,所述同一坐标系下的两个图像为所述第四图像以及部分或完整的所述第一图像;或Performing a second projection transformation on the partial or complete second image to obtain a fourth image, where the coordinate system of the fourth image is the first coordinate system, and two images in the same coordinate system are a fourth image and the partial or complete first image; or
    对部分或完整的所述第一图像进行第三投影变换得到第五图像,并对部分或完整的所述第二图像进行第四投影变换得到第六图像,所述第五图像与所述第六图像所在的坐标系均为第三坐标系,所述第三坐标系与所述第一坐标系及所述第二坐标系不同,所述同一坐标系下的两个图像为所述第五图像以及所述第六图像。Performing a third projection transformation on the partial or complete first image to obtain a fifth image, and performing fourth projection transformation on the partial or complete second image to obtain a sixth image, the fifth image and the first image The coordinate system in which the six images are located is a third coordinate system, the third coordinate system is different from the first coordinate system and the second coordinate system, and the two images in the same coordinate system are the fifth coordinate system. An image and the sixth image.
  3. 根据权利要求2所述的方法,其特征在于,The method of claim 2 wherein:
    所述第三坐标系为校正后的所述第一坐标系,所述第三投影变换为校正变换,所述第四投影变换包括运动补偿变换及所述校正变换;或The third coordinate system is the corrected first coordinate system, the third projection transformation is a correction transformation, and the fourth projection transformation includes a motion compensation transformation and the correction transformation; or
    所述第三坐标系为校正后的所述第二坐标系,所述第三投影变换包括反向运动补偿变换及所述校正变换,所述第四投影变换为所述校正变换;或The third coordinate system is the corrected second coordinate system, the third projection transformation includes an inverse motion compensation transformation and the correction transformation, and the fourth projection transformation is the correction transformation; or
    所述第三坐标系为前次投影变换后的所述第一图像进行所述特征点匹配时的坐标系。The third coordinate system is a coordinate system when the feature point is matched by the first image after the previous projection transformation.
  4. 根据权利要求3所述的方法,其特征在于,The method of claim 3 wherein:
    所述校正变换的参数是根据所述拍摄设备的畸变信息得到的。The parameters of the correction transformation are obtained based on the distortion information of the photographing device.
  5. 根据权利要求3所述的方法,其特征在于,The method of claim 3 wherein:
    所述第五图像与所述第六图像的像素坐标相同;The pixel coordinates of the fifth image and the sixth image are the same;
    所述运动补偿变换的计算方式包括:将所述第五图像中每个所述像素的坐标作为所述运动补偿变换的结果,根据所述运动补偿变换的参数 反向计算出所述运动补偿变换之前的坐标,计算所述运动补偿变换之前的坐标在所述校正变换后的所述第二图像中的灰阶值作为所述第六图像的对应像素的灰阶值。The calculation manner of the motion compensation transform includes: using coordinates of each of the pixels in the fifth image as a result of the motion compensation transformation, and converting parameters according to the motion compensation Calculating a coordinate before the motion compensation transformation, calculating a grayscale value of the coordinate before the motion compensation transformation in the second image after the correction transformation as a gray of a corresponding pixel of the sixth image Order value.
  6. 根据权利要求5所述的方法,其特征在于,The method of claim 5 wherein:
    若所述运动补偿变换之前的坐标不是整数,所述第六图像的对应像素的灰阶值为不是整数的坐标维度方向上的相邻像素的灰阶值的线性插值结果;If the coordinate before the motion compensation transformation is not an integer, the grayscale value of the corresponding pixel of the sixth image is a linear interpolation result of the grayscale value of the adjacent pixel in the coordinate dimension direction that is not an integer;
    若所述运动补偿变换之前的坐标超出边界,所述第六图像的对应像素的灰阶值为0或高斯分布/平均分布的随机点。If the coordinates before the motion compensation transformation exceeds the boundary, the grayscale value of the corresponding pixel of the sixth image is 0 or a random point of the Gaussian distribution/average distribution.
  7. 根据权利要求3所述的方法,其特征在于,The method of claim 3 wherein:
    所述第五图像与所述第六图像的像素坐标相同;The pixel coordinates of the fifth image and the sixth image are the same;
    所述反向运动补偿变换的计算方式包括:将所述第六图像中每个所述像素的坐标作为所述反向运动补偿变换的结果,根据所述反向运动补偿变换的参数反向计算出所述反向运动补偿变换之前的坐标,计算所述反向运动补偿变换之前的坐标在所述校正变换后的所述第一图像中的灰阶值作为所述第五图像的对应像素的灰阶值。The calculation manner of the inverse motion compensation transform includes: using coordinates of each of the pixels in the sixth image as a result of the inverse motion compensation transform, and inversely calculating parameters according to the inverse motion compensation transform Calculating a coordinate before the inverse motion compensation transformation, and calculating a grayscale value of the coordinate before the inverse motion compensation transformation in the first image after the correction transformation as a corresponding pixel of the fifth image Grayscale value.
  8. 根据权利要求7所述的方法,其特征在于,The method of claim 7 wherein:
    若所述反向运动补偿变换之前的坐标不是整数,所述第五图像的对应像素的灰阶值为不是整数的坐标维度方向上的相邻像素的灰阶值的线性插值结果;If the coordinate before the inverse motion compensation transform is not an integer, the grayscale value of the corresponding pixel of the fifth image is a linear interpolation result of the grayscale value of the adjacent pixel in the coordinate dimension direction that is not an integer;
    若所述反向运动补偿变换之前的坐标超出边界,所述第五图像的对应像素的灰阶值为0或高斯分布/平均分布的随机点。 If the coordinates before the inverse motion compensation transform exceeds the boundary, the grayscale value of the corresponding pixel of the fifth image is 0 or a random point of the Gaussian distribution/average distribution.
  9. 根据权利要求3所述的方法,其特征在于,The method of claim 3 wherein:
    所述运动补偿变换与所述反向运动补偿变换互为逆变换,且两者的参数都是基于所述第一时刻的位姿信息和所述第二时刻的位姿估计信息计算得到的。The motion compensation transform and the inverse motion compensation transform are inverse transforms, and the parameters of both are calculated based on the pose information of the first moment and the pose estimation information of the second moment.
  10. 根据权利要求1-9中任一项所述的方法,其特征在于,A method according to any one of claims 1-9, wherein
    所述基于所述拍摄设备在第一时刻的位姿信息估计所述拍摄设备在第二时刻的位姿估计信息包括:The estimating the pose estimation information of the photographing device at the second moment based on the pose information of the photographing device at the first moment comprises:
    利用所述第一时刻的位姿信息及所述第二时刻的惯性导航数据进行运动预估以估计所述第二时刻的位姿估计信息。The motion estimation is performed by using the pose information of the first moment and the inertial navigation data of the second moment to estimate the pose estimation information of the second moment.
  11. 根据权利要求10所述的方法,其特征在于,The method of claim 10 wherein:
    所述基于所述第一时刻的位姿信息和所述第二时刻的位姿估计信息对所述第一图像和所述第二图像中的至少一个进行投影变换之前进一步包括:The method further includes: before performing the projection transformation on the at least one of the first image and the second image based on the pose information of the first moment and the pose estimation information of the second moment:
    利用所述第二时刻的惯性导航数据估算所述第一图像与所述第二图像之间的旋转角;Estimating a rotation angle between the first image and the second image by using the inertial navigation data of the second moment;
    当所述旋转角在预设范围内时进行所述投影变换。The projection transformation is performed when the rotation angle is within a preset range.
  12. 根据权利要求11所述的方法,其特征在于,所述利用所述第二时刻的惯性导航数据估算所述第一图像与所述第二图像之间的旋转角之后进一步包括:The method according to claim 11, wherein the estimating the rotation angle between the first image and the second image by using the inertial navigation data of the second moment further comprises:
    当所述旋转角不在所述预设范围内时不进行所述投影变换。The projection transformation is not performed when the rotation angle is not within the preset range.
  13. 根据权利要求11所述的方法,其特征在于,The method of claim 11 wherein
    所述预设范围的上限由所述拍摄设备的视场角决定。 The upper limit of the preset range is determined by the angle of view of the photographing device.
  14. 根据权利要求11所述的方法,其特征在于,The method of claim 11 wherein
    所述拍摄设备的视场角小于预设阈值,所述利用所述第二时刻的惯性导航数据估算所述第一图像与所述第二图像之间的旋转角之后进一步包括:The field of view of the photographing device is less than a preset threshold, and the estimating the rotation angle between the first image and the second image by using the inertial navigation data of the second moment further comprises:
    当所述旋转角属于所述yaw角时进行所述投影变换。The projection transformation is performed when the rotation angle belongs to the yaw angle.
  15. 根据权利要求11所述的方法,其特征在于,The method of claim 11 wherein
    所述拍摄设备的视场角小于预设阈值,所述利用所述第二时刻的惯性导航数据估算所述第一图像与所述第二图像之间的旋转角之后进一步包括:The field of view of the photographing device is less than a preset threshold, and the estimating the rotation angle between the first image and the second image by using the inertial navigation data of the second moment further comprises:
    当所述旋转角不属于所述yaw角时不进行所述投影变换。The projection transformation is not performed when the rotation angle does not belong to the yaw angle.
  16. 根据权利要求1-15中任一项所述的方法,其特征在于,A method according to any one of claims 1 to 15, wherein
    基于所述两个图像中匹配的特征点计算所述拍摄设备在所述第二时刻的位姿信息包括:Calculating the pose information of the photographing device at the second moment based on the matched feature points in the two images includes:
    对所述两个图像中匹配的特征点的坐标中的至少一个进行反向投影变换得到所述第一图像及所述第二图像中匹配的对应点;Performing a back projection transformation on at least one of the coordinates of the matched feature points in the two images to obtain a matching corresponding point in the first image and the second image;
    基于所述第一图像及所述第二图像中匹配的对应点计算帧间运动信息;Calculating inter-frame motion information based on the matched corresponding points in the first image and the second image;
    利用所述第一时刻的位姿信息及所述帧间运动信息获取所述第二时刻的位姿信息。Acquiring the pose information of the second moment by using the pose information of the first moment and the interframe motion information.
  17. 一种视觉里程计,其特征在于,包括:A visual odometer characterized by comprising:
    拍摄设备及单独或协同工作的至少一个处理器,所述拍摄设备连接所述处理器; a photographing device and at least one processor working alone or in cooperation, the photographing device being connected to the processor;
    所述处理器用于执行指令以实现如权利要求1-16中任一项所述的方法。The processor is operative to execute instructions to implement the method of any of claims 1-16.
  18. 根据权利要求17所述的视觉里程计,其特征在于,A visual odometer according to claim 17, wherein
    所述处理器包括专用加速电路,所述专用加速电路用于对所述第一图像和所述第二图像中的至少一个进行投影变换。The processor includes a dedicated acceleration circuit for projecting transformation of at least one of the first image and the second image.
  19. 一种无人设备,其特征在于,包括如权利要求17或18所述的视觉里程计。An unmanned device, comprising the visual odometer of claim 17 or 18.
  20. 根据权利要求19所述的无人设备,其特征在于,所述无人设备为无人机。The unmanned device according to claim 19, wherein said unmanned device is a drone.
  21. 一种增强现实设备,其特征在于,包括如权利要求17或18所述的视觉里程计。An augmented reality device comprising the visual odometer of claim 17 or 18.
  22. 一种虚拟现实设备,其特征在于,包括如权利要求17或18所述的视觉里程计。A virtual reality device comprising the visual odometer of claim 17 or 18.
  23. 一种可读存储介质,存储有指令,其特征在于,所述指令被执行时实现如权利要求1-16中任一项所述的方法。 A readable storage medium storing instructions, wherein the instructions are executed to implement the method of any of claims 1-16.
PCT/CN2017/108684 2017-10-31 2017-10-31 Visual odometry and implementation method therefor WO2019084804A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201780087613.5A CN110520694A (en) 2017-10-31 2017-10-31 A kind of visual odometry and its implementation
PCT/CN2017/108684 WO2019084804A1 (en) 2017-10-31 2017-10-31 Visual odometry and implementation method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/108684 WO2019084804A1 (en) 2017-10-31 2017-10-31 Visual odometry and implementation method therefor

Publications (1)

Publication Number Publication Date
WO2019084804A1 true WO2019084804A1 (en) 2019-05-09

Family

ID=66332810

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/108684 WO2019084804A1 (en) 2017-10-31 2017-10-31 Visual odometry and implementation method therefor

Country Status (2)

Country Link
CN (1) CN110520694A (en)
WO (1) WO2019084804A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111951201A (en) * 2019-05-16 2020-11-17 杭州海康机器人技术有限公司 Unmanned aerial vehicle aerial image splicing method and device and storage medium
CN111950599A (en) * 2020-07-20 2020-11-17 重庆邮电大学 Dense visual odometer method for fusing edge information in dynamic environment
CN112102403A (en) * 2020-08-11 2020-12-18 国网安徽省电力有限公司淮南供电公司 High-precision positioning method and system for autonomous inspection unmanned aerial vehicle in power transmission tower scene
CN112146578A (en) * 2019-06-28 2020-12-29 顺丰科技有限公司 Scale ratio calculation method, device, equipment and storage medium
CN113326856A (en) * 2021-08-03 2021-08-31 电子科技大学 Self-adaptive two-stage feature point matching method based on matching difficulty
WO2023015566A1 (en) * 2021-08-13 2023-02-16 深圳市大疆创新科技有限公司 Control method, control device, movable platform, and storage medium

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111291654B (en) * 2020-01-21 2023-10-17 上海肇观电子科技有限公司 Discharge detection method and device for conveyor belt, circuit and medium
CN111220148A (en) * 2020-01-21 2020-06-02 珊口(深圳)智能科技有限公司 Mobile robot positioning method, system and device and mobile robot
CN111721318B (en) * 2020-05-26 2022-03-25 南京航空航天大学 Template matching visual odometer based on self-adaptive search area
CN111798489B (en) * 2020-06-29 2024-03-08 北京三快在线科技有限公司 Feature point tracking method, device, medium and unmanned equipment
CN111860224A (en) * 2020-06-30 2020-10-30 北京百度网讯科技有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN112066988B (en) * 2020-08-17 2022-07-26 联想(北京)有限公司 Positioning method and positioning equipment
CN113096151B (en) * 2021-04-07 2022-08-09 地平线征程(杭州)人工智能科技有限公司 Method and apparatus for detecting motion information of object, device and medium
CN114323010B (en) * 2021-12-30 2024-03-01 北京达佳互联信息技术有限公司 Initial feature determination method, device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080167814A1 (en) * 2006-12-01 2008-07-10 Supun Samarasekera Unified framework for precise vision-aided navigation
US20090263009A1 (en) * 2008-04-22 2009-10-22 Honeywell International Inc. Method and system for real-time visual odometry
CN102519481A (en) * 2011-12-29 2012-06-27 中国科学院自动化研究所 Implementation method of binocular vision speedometer
CN102538781A (en) * 2011-12-14 2012-07-04 浙江大学 Machine vision and inertial navigation fusion-based mobile robot motion attitude estimation method
CN105513083A (en) * 2015-12-31 2016-04-20 新浪网技术(中国)有限公司 PTAM camera tracking method and device
CN105976402A (en) * 2016-05-26 2016-09-28 同济大学 Real scale obtaining method of monocular vision odometer

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000134537A (en) * 1998-10-28 2000-05-12 Ricoh Co Ltd Image input device and its method
JP4142460B2 (en) * 2003-01-31 2008-09-03 オリンパス株式会社 Motion detection device
JP2014089113A (en) * 2012-10-30 2014-05-15 Yamaha Corp Posture estimation device and program
CN103900583B (en) * 2012-12-25 2018-02-27 联想(北京)有限公司 For positioning the apparatus and method with map structuring immediately
CN103150728A (en) * 2013-03-04 2013-06-12 北京邮电大学 Vision positioning method in dynamic environment
US9177362B2 (en) * 2013-08-02 2015-11-03 Facebook, Inc. Systems and methods for transforming an image
CN103528571B (en) * 2013-10-12 2016-04-06 上海新跃仪表厂 Single eye stereo vision relative pose measuring method
CN104374395A (en) * 2014-03-31 2015-02-25 南京邮电大学 Graph-based vision SLAM (simultaneous localization and mapping) method
CN103900473A (en) * 2014-03-31 2014-07-02 浙江大学 Intelligent mobile device six-degree-of-freedom fused pose estimation method based on camera and gravity inductor
JP6464934B2 (en) * 2015-06-11 2019-02-06 富士通株式会社 Camera posture estimation apparatus, camera posture estimation method, and camera posture estimation program
CN105045263B (en) * 2015-07-06 2016-05-18 杭州南江机器人股份有限公司 A kind of robot method for self-locating based on Kinect depth camera
JP6338021B2 (en) * 2015-07-31 2018-06-06 富士通株式会社 Image processing apparatus, image processing method, and image processing program
CN105469405B (en) * 2015-11-26 2018-08-03 清华大学 Positioning and map constructing method while view-based access control model ranging
CN105953796A (en) * 2016-05-23 2016-09-21 北京暴风魔镜科技有限公司 Stable motion tracking method and stable motion tracking device based on integration of simple camera and IMU (inertial measurement unit) of smart cellphone
CN105931275A (en) * 2016-05-23 2016-09-07 北京暴风魔镜科技有限公司 Monocular and IMU fused stable motion tracking method and device based on mobile terminal
CN105976403B (en) * 2016-07-25 2018-09-21 中国电子科技集团公司第二十八研究所 A kind of IR imaging target tracking method based on the drift of kernel function barycenter
CN106251305B (en) * 2016-07-29 2019-04-30 长春理工大学 A kind of realtime electronic image stabilizing method based on Inertial Measurement Unit IMU
CN107025668B (en) * 2017-03-30 2020-08-18 华南理工大学 Design method of visual odometer based on depth camera
CN106969763B (en) * 2017-04-07 2021-01-01 百度在线网络技术(北京)有限公司 Method and apparatus for determining yaw angle of unmanned vehicle
CN107230225B (en) * 2017-04-25 2020-06-09 华为技术有限公司 Method and apparatus for three-dimensional reconstruction
CN107167139A (en) * 2017-05-24 2017-09-15 广东工业大学 A kind of Intelligent Mobile Robot vision positioning air navigation aid and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080167814A1 (en) * 2006-12-01 2008-07-10 Supun Samarasekera Unified framework for precise vision-aided navigation
US20090263009A1 (en) * 2008-04-22 2009-10-22 Honeywell International Inc. Method and system for real-time visual odometry
CN102538781A (en) * 2011-12-14 2012-07-04 浙江大学 Machine vision and inertial navigation fusion-based mobile robot motion attitude estimation method
CN102519481A (en) * 2011-12-29 2012-06-27 中国科学院自动化研究所 Implementation method of binocular vision speedometer
CN105513083A (en) * 2015-12-31 2016-04-20 新浪网技术(中国)有限公司 PTAM camera tracking method and device
CN105976402A (en) * 2016-05-26 2016-09-28 同济大学 Real scale obtaining method of monocular vision odometer

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111951201A (en) * 2019-05-16 2020-11-17 杭州海康机器人技术有限公司 Unmanned aerial vehicle aerial image splicing method and device and storage medium
CN111951201B (en) * 2019-05-16 2024-01-23 杭州海康威视数字技术股份有限公司 Unmanned aerial vehicle aerial image splicing method, device and storage medium
CN112146578A (en) * 2019-06-28 2020-12-29 顺丰科技有限公司 Scale ratio calculation method, device, equipment and storage medium
CN111950599A (en) * 2020-07-20 2020-11-17 重庆邮电大学 Dense visual odometer method for fusing edge information in dynamic environment
CN111950599B (en) * 2020-07-20 2022-07-01 重庆邮电大学 Dense visual odometer method for fusing edge information in dynamic environment
CN112102403A (en) * 2020-08-11 2020-12-18 国网安徽省电力有限公司淮南供电公司 High-precision positioning method and system for autonomous inspection unmanned aerial vehicle in power transmission tower scene
CN112102403B (en) * 2020-08-11 2022-11-25 国网安徽省电力有限公司淮南供电公司 High-precision positioning method and system for autonomous inspection unmanned aerial vehicle in power transmission tower scene
CN113326856A (en) * 2021-08-03 2021-08-31 电子科技大学 Self-adaptive two-stage feature point matching method based on matching difficulty
CN113326856B (en) * 2021-08-03 2021-12-03 电子科技大学 Self-adaptive two-stage feature point matching method based on matching difficulty
WO2023015566A1 (en) * 2021-08-13 2023-02-16 深圳市大疆创新科技有限公司 Control method, control device, movable platform, and storage medium

Also Published As

Publication number Publication date
CN110520694A (en) 2019-11-29

Similar Documents

Publication Publication Date Title
WO2019084804A1 (en) Visual odometry and implementation method therefor
US10659768B2 (en) System and method for virtually-augmented visual simultaneous localization and mapping
CN107747941B (en) Binocular vision positioning method, device and system
JP6534664B2 (en) Method for camera motion estimation and correction
CN111210463B (en) Virtual wide-view visual odometer method and system based on feature point auxiliary matching
WO2020014909A1 (en) Photographing method and device and unmanned aerial vehicle
JP2018522348A (en) Method and system for estimating the three-dimensional posture of a sensor
WO2021043213A1 (en) Calibration method, device, aerial photography device, and storage medium
CN106873619B (en) Processing method of flight path of unmanned aerial vehicle
WO2020113423A1 (en) Target scene three-dimensional reconstruction method and system, and unmanned aerial vehicle
WO2021027323A1 (en) Hybrid image stabilization method and device based on bionic eye platform
CN107577451B (en) Multi-Kinect human body skeleton coordinate transformation method, processing equipment and readable storage medium
EP3296952B1 (en) Method and device for blurring a virtual object in a video
US20090141043A1 (en) Image mosaicing apparatus for mitigating curling effect
WO2019191288A1 (en) Direct sparse visual-inertial odometry using dynamic marginalization
GB2580691A (en) Depth estimation
WO2022083038A1 (en) Visual positioning method and related apparatus, device and computer-readable storage medium
CN111801198A (en) Hand-eye calibration method, system and computer storage medium
JP7345664B2 (en) Image processing system and method for landmark position estimation with uncertainty
WO2020063058A1 (en) Calibration method for multi-degree-of-freedom movable vision system
JP2019032218A (en) Location information recording method and device
WO2019183789A1 (en) Method and apparatus for controlling unmanned aerial vehicle, and unmanned aerial vehicle
WO2020135447A1 (en) Target distance estimation method and device, and unmanned aerial vehicle
CN116052046A (en) Dynamic scene binocular vision SLAM method based on target tracking
CN110060295B (en) Target positioning method and device, control device, following equipment and storage medium

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: 17930584

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: 17930584

Country of ref document: EP

Kind code of ref document: A1