WO2019237433A1 - 扫地机器人的摄像头与里程计坐标标定方法及系统 - Google Patents
扫地机器人的摄像头与里程计坐标标定方法及系统 Download PDFInfo
- Publication number
- WO2019237433A1 WO2019237433A1 PCT/CN2018/093454 CN2018093454W WO2019237433A1 WO 2019237433 A1 WO2019237433 A1 WO 2019237433A1 CN 2018093454 W CN2018093454 W CN 2018093454W WO 2019237433 A1 WO2019237433 A1 WO 2019237433A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- camera
- dimensional code
- center
- cleaning robot
- odometer
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C25/00—Manufacturing, calibrating, cleaning, or repairing instruments or devices referred to in the other groups of this subclass
Definitions
- the present invention relates to the technical field of cleaning robots, and in particular, to a method and a system for calibrating a camera and an odometer coordinate of a cleaning robot.
- the present invention proposes a method and system for calibrating the camera and odometer coordinates of a cleaning robot, according to the relative position relationship between the camera and the two-dimensional code center, and the relative position between the odometer and the two-dimensional code center.
- the relationship is to obtain the relative position relationship between the camera and the odometer, in order to solve the problem that the existing cleaning robot does not consider the relative position relationship between the camera and the odometer, resulting in a large deviation in the position information obtained by the fusion.
- a method for calibrating a camera and an odometer coordinate of a cleaning robot includes:
- the step of obtaining a relative position relationship between the camera and the center of the two-dimensional code includes:
- the relative position relationship between the camera and the center of the two-dimensional code is obtained through two-dimensional code positioning.
- the two-dimensional code positioning includes line detection, quadrilateral detection, calculation of a homography matrix, and external parameters.
- the method includes:
- the step of rotating the cleaning robot in place until the two-dimensional code exists in an image captured by the camera includes:
- the method includes:
- the present invention also provides a camera and odometer coordinate calibration system of a sweeping robot.
- a coordinate system is established by taking the center of a two-dimensional code as a coordinate origin.
- the center axis of the sweeping robot is located on the yz-axis plane of the two-dimensional code.
- the system includes :
- a first acquisition module configured to acquire a relative position relationship between a camera and the center of the two-dimensional code
- a second acquisition module configured to acquire a relative position relationship between the odometer and the two-dimensional code center
- a third obtaining module configured to obtain the camera and the two-dimensional code according to a relative positional relationship between the camera and the two-dimensional code center and a relative positional relationship between the odometer and the two-dimensional code center Relative position relationship between odometers.
- the two-dimensional code positioning includes line detection, quadrilateral detection, calculation of a homography matrix and external parameters
- the first acquisition module includes:
- the first sub-acquisition module is configured to obtain a relative position relationship between a camera and a center of the two-dimensional code by using two-dimensional code positioning.
- system includes:
- a detection module configured to detect whether the two-dimensional code exists in an image captured by the camera
- a rotation module is configured to rotate the cleaning robot in place if there is no two-dimensional code in an image captured by the camera.
- the rotation module includes:
- a sub-rotation module is configured to rotate the cleaning robot in place at a preset rotation angle until the two-dimensional code exists in an image captured by the camera.
- system includes:
- the coordinate transformation module is configured to transform the coordinate system of the cleaning robot so that the three-axis direction of the coordinate system of the cleaning robot is the same as the three-axis direction of the center of the two-dimensional code.
- the present invention has the beneficial effects of obtaining the relative positional relationship between the camera and the odometer according to the relative positional relationship between the camera and the two-dimensional code center and the relative positional relationship between the odometer and the two-dimensional code center.
- the calibration of the relative position relationship between the camera and the odometer aims to solve the problem that the existing cleaning robot does not consider the relative position relationship between the camera and the odometer, resulting in a large deviation in the position information obtained by the fusion.
- FIG. 1 is a flowchart of a method for calibrating a camera and an odometer coordinate of a cleaning robot according to an embodiment of the present invention
- FIG. 2 is a functional module diagram of a camera and an odometer coordinate calibration system of a cleaning robot according to an embodiment of the present invention
- FIG. 3 is a schematic diagram of a coordinate system of a camera and a two-dimensional code of a cleaning robot according to an embodiment of the present invention.
- an embodiment of the present invention proposes a method for calibrating a camera and an odometer coordinate of a cleaning robot.
- a coordinate system is established with a center of a two-dimensional code as a coordinate origin, and a center axis of the cleaning robot is located at yz of the two-dimensional code On the axis plane, the method includes the following steps:
- Step S101 Obtain a relative position relationship between a camera and a center of a two-dimensional code.
- the sweeping robot is placed on the ground and is facing the QR code.
- the central axis of the sweeping robot is on the yz axis plane of the QR code.
- the shooting port of the camera faces the two-dimensional code, and the center of the two-dimensional code is used as the coordinate origin to obtain the relative position relationship between the camera and the two-dimensional code center.
- the method before step S101, the method includes:
- the steps of rotating the sweeping robot in situ until a QR code exists in the image captured by the camera include:
- the rotation angle of the cleaning robot that rotates in place every time is a preset rotation angle.
- the preset rotation angle is 15 °.
- step S101 includes:
- the relative position relationship between the camera and the center of the two-dimensional code is obtained through two-dimensional code positioning.
- the camera captures the two-dimensional code, and obtains the relative position relationship between the camera and the center of the two-dimensional code through the two-dimensional code positioning.
- Two-dimensional code positioning includes line detection, quadrilateral detection, calculation of homography matrix and external parameters.
- line detection Calculate the gradient direction and gradient size of each pixel in the image, and then use the similarity measure of the pixel point gradient, and adjacent pixel points with similar gradient information are merged into a whole.
- the nodes of the graph are one pixel, and the edges are weighted by the gradient similarity of two pixels (regions).
- D (n) to represent its gradient direction
- M (n) to represent the magnitude of the gradient value.
- Quadrilateral detection Connect the detected lines to form a polygon through the spatial neighbor criterion. Limit the number of polygons and the number of corner points formed by the polygon to limit the number of polygons to obtain the quadrilateral and spatially adjacent quadrilaterals. Then merge into a new quadrilateral, and finally get a large quadrilateral that contains many 0,1 codes (0,1 represents a small quadrilateral). After the quadrilateral is detected, the distance is calculated by comparing the encoding of the large quadrilateral with a preset encoding type to obtain a more accurate detection target.
- the homography matrix represents the second transformation of the 2D point projection onto the camera coordinate system on the two-dimensional code coordinate system, which can be obtained by the Direct Linear Transform algorithm.
- Camera internal parameters are represented by P, including camera focal length and center deviation.
- External parameters are indicated by E.
- the homography matrix can be written as follows:
- the columns of the rotation matrix must be unit size, and according to the corresponding direction information of the two-dimensional code and the camera, where the two-dimensional code appears in front of the camera, the size and direction of s can be obtained.
- the third column of the rotation matrix can be recovered by calculating the cross product of two known columns, because the rotated column matrix must be orthogonal. In this way, the relative position relationship between the two-dimensional code and the camera can be obtained.
- the relative position relationship T between the camera and the center of the two-dimensional code is obtained through the two-dimensional code positioning, which is denoted as (x, 0, z). Among them, the cleaning robot only moves on the horizontal plane, the y-axis does not need to be calibrated, and the y-axis coordinate information Set to 0.
- the method After the step of obtaining the relative position relationship between the camera and the center of the two-dimensional code through two-dimensional code positioning, the method includes:
- the y axis is constant. According to the two-dimensional code positioning to obtain the relative position relationship between the camera and the center of the two-dimensional code, the relative rotation matrix between the camera and the center of the cleaning robot can be obtained as R .
- the method includes:
- the coordinate system of the cleaning robot is transformed so that the three-axis direction of the coordinate system of the cleaning robot is the same as the three-axis direction of the center of the two-dimensional code.
- the coordinate system of the cleaning robot is transformed so that the three-axis directions of the xyz coordinate system of the cleaning robot and the xyz three-axis of the two-dimensional code center are the same, which is convenient for subsequent calculation of the position information of the cleaning robot.
- Step S102 Obtain a relative position relationship between the odometer and the two-dimensional code center.
- the center of the two-dimensional code is used as the coordinate origin
- the odometer is on the yz-axis plane of the two-dimensional code
- the cleaning robot moves only on the horizontal plane
- the y-axis is not calibrated
- the coordinate information of the y-axis is set to zero.
- the odometer coordinates are (0, 0, s).
- Step S103 Obtain the relative positional relationship between the camera and the odometer according to the relative positional relationship between the camera and the two-dimensional code center and the relative positional relationship between the odometer and the two-dimensional code center.
- the relative position relationship between the camera and the QR code center and the relative position relationship between the odometer and the QR code center, the relative position relationship between the camera and the odometer is obtained, and the camera and the odometer are calibrated.
- the relative positional relationship between them is to solve the problem that the existing cleaning robot does not consider the relative positional relationship between the camera and the odometer, resulting in a large deviation in the position information obtained by the fusion.
- an embodiment of the present invention further provides a camera and odometer coordinate calibration system 1 of a sweeping robot, which establishes a coordinate system with a QR code center as a coordinate origin, and a central axis of the sweeping robot is located in the QR code
- the system 1 includes a first acquisition module 11, a second acquisition module 12, and a third acquisition module 13.
- the first obtaining module 11 is configured to obtain a relative position relationship between a camera and a center of a two-dimensional code.
- the sweeping robot is placed on the ground and is facing the QR code.
- the central axis of the sweeping robot is on the yz axis plane of the QR code.
- the shooting port of the camera faces the two-dimensional code, and the center of the two-dimensional code is used as the coordinate origin to obtain the relative position relationship between the camera and the two-dimensional code center.
- system 1 includes:
- a detection module configured to detect whether a two-dimensional code exists in an image captured by a camera
- a rotation module is used to rotate the cleaning robot in place if there is no QR code in the image captured by the camera.
- the rotation module includes:
- the sub-rotation module is used to rotate the sweeping robot in place at a preset rotation angle until a QR code exists in the image captured by the camera.
- the rotation angle of the cleaning robot that rotates in place every time is a preset rotation angle.
- the preset rotation angle is 15 °.
- the first obtaining module 11 includes:
- the first sub-acquisition module is configured to obtain the relative position relationship between the camera and the center of the two-dimensional code through two-dimensional code positioning.
- the camera captures the two-dimensional code, and obtains the relative position relationship between the camera and the center of the two-dimensional code through the two-dimensional code positioning.
- Two-dimensional code positioning includes line detection, quadrilateral detection, calculation of homography matrix and external parameters.
- line detection Calculate the gradient direction and gradient size of each pixel in the image, and then use the similarity measure of the pixel point gradient, and adjacent pixel points with similar gradient information are merged into a whole.
- the nodes of the graph are one pixel, and the edges are weighted by the gradient similarity of two pixels (regions).
- D (n) to represent its gradient direction
- M (n) to represent the magnitude of the gradient value.
- Quadrilateral detection Connect the detected lines to form a polygon through the spatial neighbor criterion. Limit the number of polygons and the number of corner points formed by the polygon to limit the number of polygons to obtain the quadrilateral and spatially adjacent quadrilaterals. Then merge into a new quadrilateral, and finally get a large quadrilateral that contains many 0,1 codes (0,1 represents a small quadrilateral). After the quadrilateral is detected, the distance is calculated by comparing the encoding of the large quadrilateral with a preset encoding type to obtain a more accurate detection target.
- the homography matrix represents the second transformation of the 2D point projection onto the camera coordinate system on the two-dimensional code coordinate system, which can be obtained by the Direct Linear Transform algorithm.
- Camera internal parameters are represented by P, including camera focal length and center deviation.
- External parameters are indicated by E.
- the homography matrix can be written as follows:
- the columns of the rotation matrix must be unit size, and according to the corresponding direction information of the two-dimensional code and the camera, where the two-dimensional code appears in front of the camera, the size and direction of s can be obtained.
- the third column of the rotation matrix can be recovered by calculating the cross product of two known columns, because the rotated column matrix must be orthogonal. In this way, the relative position relationship between the two-dimensional code and the camera can be obtained.
- the relative position relationship T between the camera and the center of the two-dimensional code is obtained through the two-dimensional code positioning, which is denoted as (x, 0, z). Among them, the cleaning robot only moves on the horizontal plane, the y-axis does not need to be calibrated, and the y-axis coordinate information Set to 0.
- System 1 includes:
- a fourth acquisition module is configured to acquire a relative rotation matrix between the camera and the center of the cleaning robot.
- the y axis is constant. According to the two-dimensional code positioning to obtain the relative position relationship between the camera and the center of the two-dimensional code, the relative rotation matrix between the camera and the center of the cleaning robot can be obtained as R .
- System 1 includes:
- a coordinate transformation module is used to transform the coordinate system of the cleaning robot so that the three-axis direction of the coordinate system of the cleaning robot is the same as the three-axis direction of the center of the two-dimensional code.
- the coordinate system of the cleaning robot is transformed so that the three-axis directions of the xyz coordinate system of the cleaning robot and the xyz three-axis of the two-dimensional code center are the same, which is convenient for subsequent calculation of the position information of the cleaning robot.
- the second acquisition module 12 is configured to acquire a relative position relationship between the odometer and the center of the two-dimensional code.
- the center of the two-dimensional code is used as the origin of the coordinates
- the odometer is on the yz-axis plane of the two-dimensional code
- the cleaning robot moves only on the horizontal plane.
- the odometer coordinates are (0, 0, s).
- the third obtaining module 13 is configured to obtain the relative positional relationship between the camera and the odometer according to the relative positional relationship between the camera and the two-dimensional code center and the relative positional relationship between the odometer and the two-dimensional code center.
- the relative position relationship between the camera and the QR code center and the relative position relationship between the odometer and the QR code center, the relative position relationship between the camera and the odometer is obtained, and the camera and the odometer are calibrated.
- the relative positional relationship between them is to solve the problem that the existing cleaning robot does not consider the relative positional relationship between the camera and the odometer, resulting in a large deviation in the position information obtained by the fusion.
Landscapes
- Engineering & Computer Science (AREA)
- Manufacturing & Machinery (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Length Measuring Devices By Optical Means (AREA)
- Image Processing (AREA)
Abstract
一种扫地机器人的摄像头与里程计坐标标定方法及系统(1),该方法以二维码中心为坐标原点建立坐标系,扫地机器人的中心轴线位于二维码的yz轴平面上,方法包括:获取摄像头与二维码中心之间的相对位置关系(S101),获取里程计与二维码中心之间的相对位置关系(S102),根据摄像头与二维码中心之间的相对位置关系、里程计与二维码中心之间的相对位置关系,获取摄像头与里程计之间的相对位置关系(S103)。标定摄像头与里程计之间的相对位置关系,旨在解决现有的扫地机器人不考虑摄像头与里程计之间相对位置关系,导致融合得到的位置信息有较大偏差的问题。
Description
本发明涉及扫地机器人技术领域,特别涉及一种扫地机器人的摄像头与里程计坐标标定方法及系统。
随着视觉SLAM技术的成熟,基于单目的视觉定位技术因其价格低廉,定位精度高而逐渐应用于扫地机上。为了保证扫地机器人定位系统的稳定性以及定位的精确性,一般还要融合扫地机器人自身的里程计信息来与视觉做融合。由于摄像头摆放的位置与里程计中心往往不在一起,如果不考虑它们之间的相对位置关系,融合得到的位置信息会有较大偏差。
针对现有技术不足,本发明提出一种扫地机器人的摄像头与里程计坐标标定方法及系统,根据摄像头与二维码中心之间的相对位置关系、里程计与二维码中心之间的相对位置关系,获取摄像头与里程计之间的相对位置关系,旨在解决现有的扫地机器人不考虑摄像头与里程计之间相对位置关系,导致融合得到的位置信息有较大偏差的问题。
本发明提出的技术方案是:
一种扫地机器人的摄像头与里程计坐标标定方法,以二维码中心为坐标原点建立坐标系,扫地机器人的中心轴线位于所述二维码的yz轴平面上,所述方法包括:
获取摄像头与所述二维码中心之间的相对位置关系;
获取里程计与所述二维码中心之间的相对位置关系;
根据所述摄像头与所述二维码中心之间的相对位置关系、所述里程计与所述二维码中心之间的相对位置关系,获取所述摄像头与所述里程计之间的相对位置关系。
进一步地,在所述获取摄像头与所述二维码中心之间的相对位置关系的步骤中,包括:
通过二维码定位获取摄像头与所述二维码中心之间的相对位置关系,所述二维码定位包括线检测、四边形检测、计算单应性矩阵和外参。
进一步地,在所述获取摄像头与所述二维码中心之间的相对位置关系的步骤之前,所述方法包括:
检测所述摄像头拍摄的图像中是否存在所述二维码;
若不存在,则原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码。
进一步地,在所述原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码的步骤中,包括:
按预设的旋转角度原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码。
进一步地,在所述获取摄像头与所述二维码中心之间的相对位置关系的步骤之前,包括:
将所述扫地机器人的坐标系进行变换,使扫地机器人的坐标系三轴方向与所述二维码中心的三轴方向相同。
本发明还提供一种扫地机器人的摄像头与里程计坐标标定系统,以二维码中心为坐标原点建立坐标系,扫地机器人的中心轴线位于所述二维码的yz轴平面上,所述系统包括:
第一获取模块,用于获取摄像头与所述二维码中心之间的相对位置关系;
第二获取模块,用于获取里程计与所述二维码中心之间的相对位置关系;
第三获取模块,用于根据所述摄像头与所述二维码中心之间的相对位置关系、所述里程计与所述二维码中心之间的相对位置关系,获取所述摄像头与所述里程计之间的相对位置关系。
进一步地,所述二维码定位包括线检测、四边形检测、计算单应性矩阵和外参,所述第一获取模块包括:
第一子获取模块,用于通过二维码定位获取摄像头与所述二维码中心之间的相对位置关系。
进一步地,所述系统包括:
检测模块,用于检测所述摄像头拍摄的图像中是否存在所述二维码;
旋转模块,用于若不存在,则原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码。
进一步地,所述旋转模块包括:
子旋转模块,用于按预设的旋转角度原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码。
进一步地,所述系统包括:
坐标变换模块,用于将所述扫地机器人的坐标系进行变换,使扫地机器人的坐标系三轴方向与所述二维码中心的三轴方向相同。
根据上述的技术方案,本发明有益效果:根据摄像头与二维码中心之间的相对位置关系、里程计与二维码中心之间的相对位置关系,获取摄像头与里程计之间的相对位置关系,标定摄像头与里程计之间的相对位置关系,旨在解决现有的扫地机器人不考虑摄像头与里程计之间相对位置关系,导致融合得到的位置信息有较大偏差的问题。
图1是应用本发明实施例提供的扫地机器人的摄像头与里程计坐标标定方法的流程图;
图2是应用本发明实施例提供的扫地机器人的摄像头与里程计坐标标定系统的功能模块图;
图3是应用本发明实施例提供的扫地机器人的摄像头与二维码的坐标系示意图。
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
如图1和图3所示,本发明实施例提出一种扫地机器人的摄像头与里程计坐标标定方法,以二维码中心为坐标原点建立坐标系,扫地机器人的中心轴线位于二维码的yz轴平面上,所述方法包括以下步骤:
步骤S101、获取摄像头与二维码中心之间的相对位置关系。
将二维码垂直于地面放置,以二维码中心为坐标原点建立坐标系,扫地机器人放置在地面上,并正对二维码,扫地机器人的中心轴线位于二维码的yz轴平面上,摄像头的拍摄口朝向二维码,以二维码中心为坐标原点为坐标系,获取摄像头与二维码中心之间的相对位置关系。
在一些实施例中,在步骤S101之前,所述方法包括:
检测摄像头拍摄的图像中是否存在二维码;
若不存在,则原地旋转扫地机器人,直至摄像头拍摄的图像中存在二维码。
开启摄像头,并使用摄像头拍摄图像,在摄像头拍摄到图像之后,检测摄像头拍摄的图像中是否存在二维码,若摄像头拍摄的图像中不存在二维码,说明摄像头的拍摄口没有朝向二维码,则原地旋转扫地机器人,改变摄像头的拍摄口朝向,直至摄像头拍摄的图像中存在二维码,也就是,原地旋转扫地机器人,原地旋转一定角度之后,停止原地旋转并进行拍摄,检测摄像头拍摄的图像中是否存在二维码,若不存在,再次原地旋转扫地机器人,直到检测摄像头拍摄的图像中存在二维码,不再原地旋转。
在原地旋转扫地机器人,直至摄像头拍摄的图像中存在二维码的步骤中,包括:
按预设的旋转角度原地旋转扫地机器人,直至摄像头拍摄的图像中存在二维码。
每次原地旋转扫地机器人的旋转角度为预设旋转角度,具体地,预设的旋转角度为15°。
在本实施例中,在步骤S101中,包括:
通过二维码定位获取摄像头与二维码中心之间的相对位置关系。
摄像头拍摄二维码,通过二维码定位获取摄像头与二维码中心之间的相对位置关系。
二维码定位包括线检测、四边形检测、计算单应性矩阵和外参。
具体地,线检测:计算图像中每个像素的梯度方向和梯度大小,然后利用像素点梯度的相似性度量,具有相似的梯度信息的相邻的像素点被合并成一个整体。采用类似图割的方法,图的节点为一个像素点,边的权重为两个像素点(区域)的梯度相似性。对于像素(区域)n,利用D(n)代表其梯度方向,M(n)代表梯度值大小,像素(区域)n与像素(区域)m合并的条件是:
D(n∪m)≤min(D(n) ,D(m))+KD/|n∪m|
M(n∪m)≤min(M(n) ,M(m))+KM/|n∪m|
四边形检测:将检测出的线通过空间相邻准则连接构成多边形,通过对多边形边长的限制和对多边形所构成的角点的个数对多边形的数量进行限制,得到四边形,空间相邻的四边形则合并成新的四边形,最终得到一个包含很多0 ,1编码(0 ,1代表小的四边形)的大四边形。在检测到四边形之后,通过对大四边形的编码和预先设定的编码类型对比计算距离,得到更加准确的检测目标。
计算单应性矩阵和外参:单应性矩阵代表在二维码坐标系上2D点投影到摄像头坐标系所进行的其次变换,可以通过直接线性变化法 (Direct Linear Transform algorithm)来求得。相机内参用P表示,包括相机焦距,中心偏差。外参用 E表示。则单应性矩阵可以写为如下形式:
其中,Rij(i ,j=0 ,1 ,2)代表旋转参数,Tk(k=x ,y ,z)代表平移参数。
由于旋转矩阵的列必须是单位大小,再根据二维码与摄像头的对应的方向信息,其中,二维码出现在摄像头的前面,可以获得s的大小与方向。旋转矩阵的第三列可以通过计算两个已知列的交叉乘积来恢复,因为旋转的列矩阵必须是正交的。由此可以得到二维码相对于摄像头的相对位置关系。
通过二维码定位获取摄像头与二维码中心之间的相对位置关系T,记为(x,0,z),其中,扫地机器人只在水平面上移动,y轴不用标定,y轴的坐标信息设为0。
在通过二维码定位获取摄像头与二维码中心之间的相对位置关系的步骤之后,方法包括:
获取摄像头与扫地机器人中心之间相对旋转矩阵。
由于扫地机器人在xz轴移动,y轴是不变的,根据二维码定位获取摄像头与二维码中心之间的相对位置关系,可以得到摄像头与扫地机器人中心之间的相对旋转矩阵即为R。
在步骤S101之前,所述方法包括:
将扫地机器人的坐标系进行变换,使扫地机器人的坐标系三轴方向与二维码中心的三轴方向相同。
在本实施例中,将扫地机器人的坐标系统进行变换,使扫地机器人的坐标系xyz三轴与二维码中心的xyz三轴方向相同,方便后续扫地机器人的位置信息计算。
步骤S102、获取里程计与二维码中心之间的相对位置关系。
在本实施例中,以二维码中心为坐标原点,里程计在二维码的yz轴平面上,扫地机器人只在水平面上移动,y轴不用标定,y轴的坐标信息设为0。为此,里程计坐标为(0,0,s)。
步骤S103、根据摄像头与二维码中心之间的相对位置关系、里程计与二维码中心之间的相对位置关系,获取摄像头与里程计之间的相对位置关系。
根据摄像头与二维码中心之间的相对位置关系T(x,0,z),里程计与二维码中心之间的相对位置关系(0,0,s),为此,通过计算可以得到摄像头与里程计之间的相对位置关系(x,0,z-s)。
综上所述,根据摄像头与二维码中心之间的相对位置关系、里程计与二维码中心之间的相对位置关系,获取摄像头与里程计之间的相对位置关系,标定摄像头与里程计之间的相对位置关系,旨在解决现有的扫地机器人不考虑摄像头与里程计之间相对位置关系,导致融合得到的位置信息有较大偏差的问题。
如图2和图3所示,本发明实施例还提出一种扫地机器人的摄像头与里程计坐标标定系统1,以二维码中心为坐标原点建立坐标系,扫地机器人的中心轴线位于二维码的yz轴平面上,系统1包括第一获取模块11、第二获取模块12和第三获取模块13。
第一获取模块11,用于获取摄像头与二维码中心之间的相对位置关系。
将二维码垂直于地面放置,以二维码中心为坐标原点建立坐标系,扫地机器人放置在地面上,并正对二维码,扫地机器人的中心轴线位于二维码的yz轴平面上,摄像头的拍摄口朝向二维码,以二维码中心为坐标原点为坐标系,获取摄像头与二维码中心之间的相对位置关系。
在一些实施例中,系统1包括:
检测模块,用于检测摄像头拍摄的图像中是否存在二维码;
旋转模块,用于若不存在,则原地旋转扫地机器人,直至摄像头拍摄的图像中存在二维码。
开启摄像头,并使用摄像头拍摄图像,在摄像头拍摄到图像之后,检测摄像头拍摄的图像中是否存在二维码,若摄像头拍摄的图像中不存在二维码,说明摄像头的拍摄口没有朝向二维码,则原地旋转扫地机器人,改变摄像头的拍摄口朝向,直至摄像头拍摄的图像中存在二维码,也就是,原地旋转扫地机器人,原地旋转一定角度之后,停止原地旋转并进行拍摄,检测摄像头拍摄的图像中是否存在二维码,若不存在,再次原地旋转扫地机器人,直到检测摄像头拍摄的图像中存在二维码,不再原地旋转。
旋转模块包括:
子旋转模块,用于按预设的旋转角度原地旋转扫地机器人,直至摄像头拍摄的图像中存在二维码。
每次原地旋转扫地机器人的旋转角度为预设旋转角度,具体地,预设的旋转角度为15°。
在本实施例中,第一获取模块11包括:
第一子获取模块,用于通过二维码定位获取摄像头与二维码中心之间的相对位置关系。
摄像头拍摄二维码,通过二维码定位获取摄像头与二维码中心之间的相对位置关系。
二维码定位包括线检测、四边形检测、计算单应性矩阵和外参。
具体地,线检测:计算图像中每个像素的梯度方向和梯度大小,然后利用像素点梯度的相似性度量,具有相似的梯度信息的相邻的像素点被合并成一个整体。采用类似图割的方法,图的节点为一个像素点,边的权重为两个像素点(区域)的梯度相似性。对于像素(区域)n,利用D(n)代表其梯度方向,M(n)代表梯度值大小,像素(区域)n与像素(区域)m合并的条件是:
D(n∪m)≤min(D(n) ,D(m))+KD/|n∪m|
M(n∪m)≤min(M(n) ,M(m))+KM/|n∪m|
四边形检测:将检测出的线通过空间相邻准则连接构成多边形,通过对多边形边长的限制和对多边形所构成的角点的个数对多边形的数量进行限制,得到四边形,空间相邻的四边形则合并成新的四边形,最终得到一个包含很多0 ,1编码(0 ,1代表小的四边形)的大四边形。在检测到四边形之后,通过对大四边形的编码和预先设定的编码类型对比计算距离,得到更加准确的检测目标。
计算单应性矩阵和外参:单应性矩阵代表在二维码坐标系上2D点投影到摄像头坐标系所进行的其次变换,可以通过直接线性变化法 (Direct Linear Transform algorithm)来求得。相机内参用P表示,包括相机焦距,中心偏差。外参用 E表示。则单应性矩阵可以写为如下形式:
其中,Rij(i ,j=0 ,1 ,2)代表旋转参数,Tk(k=x ,y ,z)代表平移参数。
由于旋转矩阵的列必须是单位大小,再根据二维码与摄像头的对应的方向信息,其中,二维码出现在摄像头的前面,可以获得s的大小与方向。旋转矩阵的第三列可以通过计算两个已知列的交叉乘积来恢复,因为旋转的列矩阵必须是正交的。由此可以得到二维码相对于摄像头的相对位置关系。
通过二维码定位获取摄像头与二维码中心之间的相对位置关系T,记为(x,0,z),其中,扫地机器人只在水平面上移动,y轴不用标定,y轴的坐标信息设为0。
系统1包括:
第四获取模块,用于获取摄像头与扫地机器人中心之间相对旋转矩阵。
由于扫地机器人在xz轴移动,y轴是不变的,根据二维码定位获取摄像头与二维码中心之间的相对位置关系,可以得到摄像头与扫地机器人中心之间的相对旋转矩阵即为R。
系统1包括:
坐标变换模块,用于将扫地机器人的坐标系进行变换,使扫地机器人的坐标系三轴方向与二维码中心的三轴方向相同。
在本实施例中,将扫地机器人的坐标系统进行变换,使扫地机器人的坐标系xyz三轴与二维码中心的xyz三轴方向相同,方便后续扫地机器人的位置信息计算。
第二获取模块12,用于获取里程计与二维码中心之间的相对位置关系。
在本实施例中,以二维码中心为坐标原点,里程计在二维码的yz轴平面上,扫地机器人只在水平面上移动,y轴不用标定,y轴的坐标信息设为0。为此,里程计坐标为(0,0,s)。
第三获取模块13,用于根据摄像头与二维码中心之间的相对位置关系、里程计与二维码中心之间的相对位置关系,获取摄像头与里程计之间的相对位置关系。
根据摄像头与二维码中心之间的相对位置关系T(x,0,z),里程计与二维码中心之间的相对位置关系(0,0,s),为此,通过计算可以得到摄像头与里程计之间的相对位置关系(x,0,z-s)。
综上所述,根据摄像头与二维码中心之间的相对位置关系、里程计与二维码中心之间的相对位置关系,获取摄像头与里程计之间的相对位置关系,标定摄像头与里程计之间的相对位置关系,旨在解决现有的扫地机器人不考虑摄像头与里程计之间相对位置关系,导致融合得到的位置信息有较大偏差的问题。
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。
Claims (10)
- 一种扫地机器人的摄像头与里程计坐标标定方法,以二维码中心为坐标原点建立坐标系,扫地机器人的中心轴线位于所述二维码的yz轴平面上,其特征在于,所述方法包括:获取摄像头与所述二维码中心之间的相对位置关系;获取里程计与所述二维码中心之间的相对位置关系;根据所述摄像头与所述二维码中心之间的相对位置关系、所述里程计与所述二维码中心之间的相对位置关系,获取所述摄像头与所述里程计之间的相对位置关系。
- 根据权利要求1所述的扫地机器人的摄像头与里程计坐标标定方法,其特征在于,在所述获取摄像头与所述二维码中心之间的相对位置关系的步骤中,包括:通过二维码定位获取摄像头与所述二维码中心之间的相对位置关系,所述二维码定位包括线检测、四边形检测、计算单应性矩阵和外参。
- 根据权利要求1所述的扫地机器人的摄像头与里程计坐标标定方法,其特征在于,在所述获取摄像头与所述二维码中心之间的相对位置关系的步骤之前,所述方法包括:检测所述摄像头拍摄的图像中是否存在所述二维码;若不存在,则原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码。
- 根据权利要求3所述的扫地机器人的摄像头与里程计坐标标定方法,其特征在于,在所述原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码的步骤中,包括:按预设的旋转角度原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码。
- 根据权利要求1所述的扫地机器人的摄像头与里程计坐标标定方法,其特征在于,在所述获取摄像头与所述二维码中心之间的相对位置关系的步骤之前,包括:将所述扫地机器人的坐标系进行变换,使扫地机器人的坐标系三轴方向与所述二维码中心的三轴方向相同。
- 一种扫地机器人的摄像头与里程计坐标标定系统,以二维码中心为坐标原点建立坐标系,扫地机器人的中心轴线位于所述二维码的yz轴平面上,其特征在于,所述系统包括:第一获取模块,用于获取摄像头与所述二维码中心之间的相对位置关系;第二获取模块,用于获取里程计与所述二维码中心之间的相对位置关系;第三获取模块,用于根据所述摄像头与所述二维码中心之间的相对位置关系、所述里程计与所述二维码中心之间的相对位置关系,获取所述摄像头与所述里程计之间的相对位置关系。
- 根据权利要求6所述的扫地机器人的摄像头与里程计坐标标定系统,其特征在于,所述二维码定位包括线检测、四边形检测、计算单应性矩阵和外参,所述第一获取模块包括:第一子获取模块,用于通过二维码定位获取摄像头与所述二维码中心之间的相对位置关系。
- 根据权利要求6所述的扫地机器人的摄像头与里程计坐标标定系统,其特征在于,所述系统包括:检测模块,用于检测所述摄像头拍摄的图像中是否存在所述二维码;旋转模块,用于若不存在,则原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码。
- 根据权利要求8所述的扫地机器人的摄像头与里程计坐标标定系统,其特征在于,所述旋转模块包括:子旋转模块,用于按预设的旋转角度原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码。
- 根据权利要求6所述的扫地机器人的摄像头与里程计坐标标定系统,其特征在于,所述系统包括:坐标变换模块,用于将所述扫地机器人的坐标系进行变换,使扫地机器人的坐标系三轴方向与所述二维码中心的三轴方向相同。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810620619.0 | 2018-06-15 | ||
CN201810620619.0A CN108827342A (zh) | 2018-06-15 | 2018-06-15 | 扫地机器人的摄像头与里程计坐标标定方法及系统 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019237433A1 true WO2019237433A1 (zh) | 2019-12-19 |
Family
ID=64142171
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/093454 WO2019237433A1 (zh) | 2018-06-15 | 2018-06-28 | 扫地机器人的摄像头与里程计坐标标定方法及系统 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108827342A (zh) |
WO (1) | WO2019237433A1 (zh) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109754408B (zh) * | 2019-01-07 | 2020-12-01 | 合肥泰禾光电科技股份有限公司 | 轨迹跟踪方法及装置 |
CN110646231B (zh) * | 2019-09-25 | 2022-01-11 | 深圳巴诺机器人有限公司 | 一种扫地机器人测试方法和装置 |
CN110597265A (zh) * | 2019-09-25 | 2019-12-20 | 深圳巴诺机器人有限公司 | 一种扫地机器人回充方法和装置 |
CN113124896B (zh) * | 2019-12-30 | 2023-03-28 | 上海智远慧智能技术股份有限公司 | 一种agv里程计在线精确校准的控制方法 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150139532A1 (en) * | 2013-11-20 | 2015-05-21 | Electronics And Telecommunications Research Institute | Camara tracking apparatus and method using reconstruction segments and volumetric surface |
CN106292658A (zh) * | 2016-07-30 | 2017-01-04 | 许琴琴 | 一种扫地机器人寻路方法 |
CN106338287A (zh) * | 2016-08-24 | 2017-01-18 | 杭州国辰牵星科技有限公司 | 基于天花板的室内移动机器人视觉定位方法 |
CN206411514U (zh) * | 2016-09-13 | 2017-08-15 | 哈尔滨工业大学深圳研究生院 | 一种基于二维码定位的智能仓储移动机器人系统 |
CN206627826U (zh) * | 2017-01-10 | 2017-11-10 | 上海极络智能科技有限公司 | 基于二维码的导航系统 |
CN107803837A (zh) * | 2017-12-01 | 2018-03-16 | 深圳市沃特沃德股份有限公司 | 制约装置和视觉扫地机器人及其控制方法 |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106803261A (zh) * | 2015-11-20 | 2017-06-06 | 沈阳新松机器人自动化股份有限公司 | 机器人相对位姿估计方法 |
CN106323294B (zh) * | 2016-11-04 | 2023-06-09 | 新疆大学 | 变电站巡检机器人定位方法及定位装置 |
CN106969766A (zh) * | 2017-03-21 | 2017-07-21 | 北京品创智能科技有限公司 | 一种基于单目视觉和二维码路标的室内自主导航方法 |
CN108007451B (zh) * | 2017-11-10 | 2020-08-11 | 未来机器人(深圳)有限公司 | 货物承载装置位姿的检测方法、装置、计算机设备和存储介质 |
CN107862719B (zh) * | 2017-11-10 | 2020-10-27 | 未来机器人(深圳)有限公司 | 相机外参的标定方法、装置、计算机设备和存储介质 |
-
2018
- 2018-06-15 CN CN201810620619.0A patent/CN108827342A/zh active Pending
- 2018-06-28 WO PCT/CN2018/093454 patent/WO2019237433A1/zh active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150139532A1 (en) * | 2013-11-20 | 2015-05-21 | Electronics And Telecommunications Research Institute | Camara tracking apparatus and method using reconstruction segments and volumetric surface |
CN106292658A (zh) * | 2016-07-30 | 2017-01-04 | 许琴琴 | 一种扫地机器人寻路方法 |
CN106338287A (zh) * | 2016-08-24 | 2017-01-18 | 杭州国辰牵星科技有限公司 | 基于天花板的室内移动机器人视觉定位方法 |
CN206411514U (zh) * | 2016-09-13 | 2017-08-15 | 哈尔滨工业大学深圳研究生院 | 一种基于二维码定位的智能仓储移动机器人系统 |
CN206627826U (zh) * | 2017-01-10 | 2017-11-10 | 上海极络智能科技有限公司 | 基于二维码的导航系统 |
CN107803837A (zh) * | 2017-12-01 | 2018-03-16 | 深圳市沃特沃德股份有限公司 | 制约装置和视觉扫地机器人及其控制方法 |
Also Published As
Publication number | Publication date |
---|---|
CN108827342A (zh) | 2018-11-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5832341B2 (ja) | 動画処理装置、動画処理方法および動画処理用のプログラム | |
WO2021026850A1 (zh) | 一种基于二维码的导航定姿定位方法和系统 | |
CN109163657B (zh) | 一种基于双目视觉三维重建的圆形目标位姿检测方法 | |
WO2019237433A1 (zh) | 扫地机器人的摄像头与里程计坐标标定方法及系统 | |
US8155387B2 (en) | Method and system for position determination using image deformation | |
CN112686877B (zh) | 基于双目相机的三维房屋损伤模型构建测量方法及系统 | |
Ying et al. | Fisheye lenses calibration using straight-line spherical perspective projection constraint | |
CN113012237A (zh) | 一种毫米波雷达与视频监控摄像头联合标定方法 | |
JP4619962B2 (ja) | 路面標示計測システム、白線モデル計測システムおよび白線モデル計測装置 | |
CN110033489A (zh) | 一种车辆定位准确性的评估方法、装置及设备 | |
KR20170139548A (ko) | 이미지 라인들로부터의 카메라 외부 파라미터들 추정 | |
Gerke | Using horizontal and vertical building structure to constrain indirect sensor orientation | |
CN108279677B (zh) | 基于双目视觉传感器的轨道机器人检测方法 | |
CN103106662B (zh) | 空间一条直线线性求解抛物折反射摄像机内参数 | |
CN103106661A (zh) | 空间二条相交直线线性求解抛物折反射摄像机内参数 | |
Su et al. | A novel camera calibration method based on multilevel-edge-fitting ellipse-shaped analytical model | |
Horanyi et al. | Generalized pose estimation from line correspondences with known vertical direction | |
CN115371673A (zh) | 一种未知环境中基于Bundle Adjustment的双目相机目标定位方法 | |
Yang et al. | A novel camera calibration method based on circle projection model | |
Jiang et al. | Bridge Deformation Measurement Using Unmanned Aerial Dual Camera and Learning‐Based Tracking Method | |
Mei et al. | Fast central catadioptric line extraction, estimation, tracking and structure from motion | |
Liu et al. | Calibration method based on the image of the absolute quadratic curve | |
Yang et al. | Effect of field of view on the accuracy of camera calibration | |
JP4132068B2 (ja) | 画像処理装置及び三次元計測装置並びに画像処理装置用プログラム | |
Omidalizarandi et al. | Comparison of target-and mutual informaton based calibration of terrestrial laser scanner and digital camera for deformation monitoring |
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: 18922698 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: 18922698 Country of ref document: EP Kind code of ref document: A1 |