WO2019237433A1 - Method and system for calibrating coordinates of camera and odometer of cleaning robot - Google Patents

Method and system for calibrating coordinates of camera and odometer of cleaning robot Download PDF

Info

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
Application number
PCT/CN2018/093454
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 深圳市沃特沃德股份有限公司
Publication of WO2019237433A1 publication Critical patent/WO2019237433A1/en

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C25/00Manufacturing, 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

A method and system (1) for calibrating coordinates of a camera and an odometer of a cleaning robot. The method establishes a coordinate system with the center of a QR code as a coordinate origin. A central axis of a cleaning robot is located on a yz-axis plane of the QR code. The method comprises: obtaining a relative position relationship between a camera and the center of a QR code (S101); obtaining a relative position relationship between an odometer and the center of the QR code (S102); and obtaining a relative position relationship between the camera and the odometer according to the relative position relationship between the camera and the center of the QR code and the relative position relationship between the odometer and the center of the QR code (S103). The calibration of the relative position relationship between the camera and the odometer aims at resolving the problem of large deviation of fused position information due to that an existing cleaning robot does not take the relative position relationship between a camera and an odometer into consideration.

Description

扫地机器人的摄像头与里程计坐标标定方法及系统Coordinate calibration method and system for camera and odometer of sweeping robot 技术领域Technical field
本发明涉及扫地机器人技术领域,特别涉及一种扫地机器人的摄像头与里程计坐标标定方法及系统。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.
背景技术Background technique
随着视觉SLAM技术的成熟,基于单目的视觉定位技术因其价格低廉,定位精度高而逐渐应用于扫地机上。为了保证扫地机器人定位系统的稳定性以及定位的精确性,一般还要融合扫地机器人自身的里程计信息来与视觉做融合。由于摄像头摆放的位置与里程计中心往往不在一起,如果不考虑它们之间的相对位置关系,融合得到的位置信息会有较大偏差。With the maturity of vision SLAM technology, monocular-based vision positioning technology is gradually applied to sweepers due to its low price and high positioning accuracy. In order to ensure the stability and positioning accuracy of the cleaning robot positioning system, the odometry information of the cleaning robot itself is generally integrated with the vision. Because the position of the camera and the center of the odometer are often not together, if the relative position relationship between them is not considered, the position information obtained by the fusion will have a large deviation.
技术问题technical problem
针对现有技术不足,本发明提出一种扫地机器人的摄像头与里程计坐标标定方法及系统,根据摄像头与二维码中心之间的相对位置关系、里程计与二维码中心之间的相对位置关系,获取摄像头与里程计之间的相对位置关系,旨在解决现有的扫地机器人不考虑摄像头与里程计之间相对位置关系,导致融合得到的位置信息有较大偏差的问题。In view of the shortcomings of the prior art, 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.
技术解决方案Technical solutions
本发明提出的技术方案是:The technical solution proposed by the present invention is:
一种扫地机器人的摄像头与里程计坐标标定方法,以二维码中心为坐标原点建立坐标系,扫地机器人的中心轴线位于所述二维码的yz轴平面上,所述方法包括:A method for calibrating a camera and an odometer coordinate of a cleaning robot. A coordinate system is established by taking a center of a two-dimensional code as a coordinate origin, and a center axis of the cleaning robot is located on a yz-axis plane of the two-dimensional code. The method includes:
获取摄像头与所述二维码中心之间的相对位置关系;Obtaining a relative position relationship between a camera and the center of the two-dimensional code;
获取里程计与所述二维码中心之间的相对位置关系;Obtaining a relative position relationship between the odometer and the two-dimensional code center;
根据所述摄像头与所述二维码中心之间的相对位置关系、所述里程计与所述二维码中心之间的相对位置关系,获取所述摄像头与所述里程计之间的相对位置关系。Obtaining the relative position between the camera and the odometer according to the relative position relationship between the camera and the two-dimensional code center and the relative position relationship between the odometer and the two-dimensional code center relationship.
进一步地,在所述获取摄像头与所述二维码中心之间的相对位置关系的步骤中,包括:Further, 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.
进一步地,在所述获取摄像头与所述二维码中心之间的相对位置关系的步骤之前,所述方法包括:Further, before the step of obtaining a relative position relationship between a camera and the center of the two-dimensional code, the method includes:
检测所述摄像头拍摄的图像中是否存在所述二维码;Detecting whether the two-dimensional code exists in an image captured by the camera;
若不存在,则原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码。If it does not exist, rotate the cleaning robot in place until the two-dimensional code exists in the image captured by the camera.
进一步地,在所述原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码的步骤中,包括:Further, the step of rotating the cleaning robot in place until the two-dimensional code exists in an image captured by the camera includes:
按预设的旋转角度原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码。Rotate the cleaning robot in place at a preset rotation angle until the two-dimensional code exists in an image captured by the camera.
进一步地,在所述获取摄像头与所述二维码中心之间的相对位置关系的步骤之前,包括:Further, before the step of obtaining a relative position relationship between the camera and the center of the two-dimensional code, the method includes:
将所述扫地机器人的坐标系进行变换,使扫地机器人的坐标系三轴方向与所述二维码中心的三轴方向相同。Transforming 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.
本发明还提供一种扫地机器人的摄像头与里程计坐标标定系统,以二维码中心为坐标原点建立坐标系,扫地机器人的中心轴线位于所述二维码的yz轴平面上,所述系统包括: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.
进一步地,所述二维码定位包括线检测、四边形检测、计算单应性矩阵和外参,所述第一获取模块包括:Further, the two-dimensional code positioning includes line detection, quadrilateral detection, calculation of a homography matrix and external parameters, and 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.
进一步地,所述系统包括:Further, the 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.
进一步地,所述旋转模块包括:Further, 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.
进一步地,所述系统包括:Further, the 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.
有益效果Beneficial effect
根据上述的技术方案,本发明有益效果:根据摄像头与二维码中心之间的相对位置关系、里程计与二维码中心之间的相对位置关系,获取摄像头与里程计之间的相对位置关系,标定摄像头与里程计之间的相对位置关系,旨在解决现有的扫地机器人不考虑摄像头与里程计之间相对位置关系,导致融合得到的位置信息有较大偏差的问题。According to the above technical solution, 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.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是应用本发明实施例提供的扫地机器人的摄像头与里程计坐标标定方法的流程图;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;
图2是应用本发明实施例提供的扫地机器人的摄像头与里程计坐标标定系统的功能模块图;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;
图3是应用本发明实施例提供的扫地机器人的摄像头与二维码的坐标系示意图。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.
本发明的最佳实施方式Best Mode of the Invention
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。In order to make the objectives, technical solutions, and advantages of the present invention clearer, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
如图1和图3所示,本发明实施例提出一种扫地机器人的摄像头与里程计坐标标定方法,以二维码中心为坐标原点建立坐标系,扫地机器人的中心轴线位于二维码的yz轴平面上,所述方法包括以下步骤:As shown in FIG. 1 and FIG. 3, 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:
步骤S101、获取摄像头与二维码中心之间的相对位置关系。Step S101: Obtain a relative position relationship between a camera and a center of a two-dimensional code.
将二维码垂直于地面放置,以二维码中心为坐标原点建立坐标系,扫地机器人放置在地面上,并正对二维码,扫地机器人的中心轴线位于二维码的yz轴平面上,摄像头的拍摄口朝向二维码,以二维码中心为坐标原点为坐标系,获取摄像头与二维码中心之间的相对位置关系。Place the QR code perpendicular to the ground, and establish a coordinate system with the center of the QR code as the origin of the coordinates. 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.
在一些实施例中,在步骤S101之前,所述方法包括:In some embodiments, before step S101, the method includes:
检测摄像头拍摄的图像中是否存在二维码;Detect whether there is a QR code in the image captured by the camera;
若不存在,则原地旋转扫地机器人,直至摄像头拍摄的图像中存在二维码。If it does not exist, rotate the cleaning robot in place until a QR code exists in the image captured by the camera.
开启摄像头,并使用摄像头拍摄图像,在摄像头拍摄到图像之后,检测摄像头拍摄的图像中是否存在二维码,若摄像头拍摄的图像中不存在二维码,说明摄像头的拍摄口没有朝向二维码,则原地旋转扫地机器人,改变摄像头的拍摄口朝向,直至摄像头拍摄的图像中存在二维码,也就是,原地旋转扫地机器人,原地旋转一定角度之后,停止原地旋转并进行拍摄,检测摄像头拍摄的图像中是否存在二维码,若不存在,再次原地旋转扫地机器人,直到检测摄像头拍摄的图像中存在二维码,不再原地旋转。Turn on the camera and use the camera to capture the image. After the camera captures the image, check whether there is a QR code in the image captured by the camera. If there is no QR code in the image captured by the camera, it means that the camera's shooting port is not facing the QR code. , Then rotate the sweeping robot in place and change the orientation of the camera's shooting port until a QR code exists in the image captured by the camera, that is, rotate the sweeping robot in place. After rotating a certain angle in place, stop the in place rotation and shoot. Detect whether there is a QR code in the image captured by the camera. If it does not exist, rotate the sweeping robot in place again until the presence of the QR code in the image captured by the camera does not rotate in place.
在原地旋转扫地机器人,直至摄像头拍摄的图像中存在二维码的步骤中,包括:The steps of rotating the sweeping robot in situ until a QR code exists in the image captured by the camera include:
按预设的旋转角度原地旋转扫地机器人,直至摄像头拍摄的图像中存在二维码。Rotate the sweeping robot in place at a preset rotation angle until a QR code exists in the image captured by the camera.
每次原地旋转扫地机器人的旋转角度为预设旋转角度,具体地,预设的旋转角度为15°。The rotation angle of the cleaning robot that rotates in place every time is a preset rotation angle. Specifically, the preset rotation angle is 15 °.
在本实施例中,在步骤S101中,包括:In this embodiment, 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.
具体地,线检测:计算图像中每个像素的梯度方向和梯度大小,然后利用像素点梯度的相似性度量,具有相似的梯度信息的相邻的像素点被合并成一个整体。采用类似图割的方法,图的节点为一个像素点,边的权重为两个像素点(区域)的梯度相似性。对于像素(区域)n,利用D(n)代表其梯度方向,M(n)代表梯度值大小,像素(区域)n与像素(区域)m合并的条件是:Specifically, 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. Using a method similar to graph cut, the nodes of the graph are one pixel, and the edges are weighted by the gradient similarity of two pixels (regions). For pixel (area) n, use D (n) to represent its gradient direction, and M (n) to represent the magnitude of the gradient value. The conditions for merging pixel (area) n and pixel (area) m are:
    D(n∪m)≤min(D(n) ,D(m))+KD/|n∪m|D (n∪m) ≤min (D (n), D (m)) + KD / | n∪m |
    M(n∪m)≤min(M(n) ,M(m))+KM/|n∪m|M (n∪m) ≤min (M (n), M (m)) + KM / | n∪m |
四边形检测:将检测出的线通过空间相邻准则连接构成多边形,通过对多边形边长的限制和对多边形所构成的角点的个数对多边形的数量进行限制,得到四边形,空间相邻的四边形则合并成新的四边形,最终得到一个包含很多0 ,1编码(0 ,1代表小的四边形)的大四边形。在检测到四边形之后,通过对大四边形的编码和预先设定的编码类型对比计算距离,得到更加准确的检测目标。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.
计算单应性矩阵和外参:单应性矩阵代表在二维码坐标系上2D点投影到摄像头坐标系所进行的其次变换,可以通过直接线性变化法 (Direct Linear Transform  algorithm)来求得。相机内参用P表示,包括相机焦距,中心偏差。外参用 E表示。则单应性矩阵可以写为如下形式:Calculate the homography matrix and external parameters: 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:
Figure dest_path_image001
Figure dest_path_image001
其中,Rij(i ,j=0 ,1 ,2)代表旋转参数,Tk(k=x ,y ,z)代表平移参数。Among them, Rij (i, j = 0,1,2) represents the rotation parameter, and Tk (k = x, y, z) represents the translation parameter.
由于旋转矩阵的列必须是单位大小,再根据二维码与摄像头的对应的方向信息,其中,二维码出现在摄像头的前面,可以获得s的大小与方向。旋转矩阵的第三列可以通过计算两个已知列的交叉乘积来恢复,因为旋转的列矩阵必须是正交的。由此可以得到二维码相对于摄像头的相对位置关系。Because 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.
通过二维码定位获取摄像头与二维码中心之间的相对位置关系T,记为(x,0,z),其中,扫地机器人只在水平面上移动,y轴不用标定,y轴的坐标信息设为0。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.
在通过二维码定位获取摄像头与二维码中心之间的相对位置关系的步骤之后,方法包括: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:
获取摄像头与扫地机器人中心之间相对旋转矩阵。Obtain the relative rotation matrix between the camera and the center of the cleaning robot.
由于扫地机器人在xz轴移动,y轴是不变的,根据二维码定位获取摄像头与二维码中心之间的相对位置关系,可以得到摄像头与扫地机器人中心之间的相对旋转矩阵即为R。As the cleaning robot moves on the xz axis, 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 .
在步骤S101之前,所述方法包括:Before step S101, 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.
在本实施例中,将扫地机器人的坐标系统进行变换,使扫地机器人的坐标系xyz三轴与二维码中心的xyz三轴方向相同,方便后续扫地机器人的位置信息计算。In this embodiment, 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.
步骤S102、获取里程计与二维码中心之间的相对位置关系。Step S102: Obtain a relative position relationship between the odometer and the two-dimensional code center.
在本实施例中,以二维码中心为坐标原点,里程计在二维码的yz轴平面上,扫地机器人只在水平面上移动,y轴不用标定,y轴的坐标信息设为0。为此,里程计坐标为(0,0,s)。In this embodiment, 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, and the coordinate information of the y-axis is set to zero. For this purpose, the odometer coordinates are (0, 0, s).
步骤S103、根据摄像头与二维码中心之间的相对位置关系、里程计与二维码中心之间的相对位置关系,获取摄像头与里程计之间的相对位置关系。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.
根据摄像头与二维码中心之间的相对位置关系T(x,0,z),里程计与二维码中心之间的相对位置关系(0,0,s),为此,通过计算可以得到摄像头与里程计之间的相对位置关系(x,0,z-s)。According to the relative position relationship T (x, 0, z) between the camera and the center of the two-dimensional code, the relative position relationship between the odometer and the center of the two-dimensional code (0,0, s). To this end, it can be obtained by calculation. Relative position relationship between camera and odometer (x, 0, zs).
综上所述,根据摄像头与二维码中心之间的相对位置关系、里程计与二维码中心之间的相对位置关系,获取摄像头与里程计之间的相对位置关系,标定摄像头与里程计之间的相对位置关系,旨在解决现有的扫地机器人不考虑摄像头与里程计之间相对位置关系,导致融合得到的位置信息有较大偏差的问题。In summary, according to 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.
如图2和图3所示,本发明实施例还提出一种扫地机器人的摄像头与里程计坐标标定系统1,以二维码中心为坐标原点建立坐标系,扫地机器人的中心轴线位于二维码的yz轴平面上,系统1包括第一获取模块11、第二获取模块12和第三获取模块13。As shown in FIG. 2 and FIG. 3, 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 On the plane of the yz axis, the system 1 includes a first acquisition module 11, a second acquisition module 12, and a third acquisition module 13.
第一获取模块11,用于获取摄像头与二维码中心之间的相对位置关系。The first obtaining module 11 is configured to obtain a relative position relationship between a camera and a center of a two-dimensional code.
将二维码垂直于地面放置,以二维码中心为坐标原点建立坐标系,扫地机器人放置在地面上,并正对二维码,扫地机器人的中心轴线位于二维码的yz轴平面上,摄像头的拍摄口朝向二维码,以二维码中心为坐标原点为坐标系,获取摄像头与二维码中心之间的相对位置关系。Place the QR code perpendicular to the ground, and establish a coordinate system with the center of the QR code as the origin of the coordinates. 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.
在一些实施例中,系统1包括:In some embodiments, 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.
开启摄像头,并使用摄像头拍摄图像,在摄像头拍摄到图像之后,检测摄像头拍摄的图像中是否存在二维码,若摄像头拍摄的图像中不存在二维码,说明摄像头的拍摄口没有朝向二维码,则原地旋转扫地机器人,改变摄像头的拍摄口朝向,直至摄像头拍摄的图像中存在二维码,也就是,原地旋转扫地机器人,原地旋转一定角度之后,停止原地旋转并进行拍摄,检测摄像头拍摄的图像中是否存在二维码,若不存在,再次原地旋转扫地机器人,直到检测摄像头拍摄的图像中存在二维码,不再原地旋转。Turn on the camera and use the camera to capture the image. After the camera captures the image, check whether there is a QR code in the image captured by the camera. If there is no QR code in the image captured by the camera, it means that the camera's shooting port is not facing the QR code. , Then rotate the sweeping robot in place and change the orientation of the camera's shooting port until a QR code exists in the image captured by the camera, that is, rotate the sweeping robot in place. After rotating a certain angle in place, stop the in place rotation and shoot. Detect whether there is a QR code in the image captured by the camera. If it does not exist, rotate the sweeping robot in place again until the presence of the QR code in the image captured by the camera does not rotate in place.
旋转模块包括: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.
每次原地旋转扫地机器人的旋转角度为预设旋转角度,具体地,预设的旋转角度为15°。The rotation angle of the cleaning robot that rotates in place every time is a preset rotation angle. Specifically, the preset rotation angle is 15 °.
在本实施例中,第一获取模块11包括:In this embodiment, 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.
具体地,线检测:计算图像中每个像素的梯度方向和梯度大小,然后利用像素点梯度的相似性度量,具有相似的梯度信息的相邻的像素点被合并成一个整体。采用类似图割的方法,图的节点为一个像素点,边的权重为两个像素点(区域)的梯度相似性。对于像素(区域)n,利用D(n)代表其梯度方向,M(n)代表梯度值大小,像素(区域)n与像素(区域)m合并的条件是:Specifically, 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. Using a method similar to graph cut, the nodes of the graph are one pixel, and the edges are weighted by the gradient similarity of two pixels (regions). For pixel (area) n, use D (n) to represent its gradient direction, and M (n) to represent the magnitude of the gradient value. The conditions for merging pixel (area) n and pixel (area) m are:
    D(n∪m)≤min(D(n) ,D(m))+KD/|n∪m|D (n∪m) ≤min (D (n), D (m)) + KD / | n∪m |
    M(n∪m)≤min(M(n) ,M(m))+KM/|n∪m|M (n∪m) ≤min (M (n), M (m)) + KM / | n∪m |
四边形检测:将检测出的线通过空间相邻准则连接构成多边形,通过对多边形边长的限制和对多边形所构成的角点的个数对多边形的数量进行限制,得到四边形,空间相邻的四边形则合并成新的四边形,最终得到一个包含很多0 ,1编码(0 ,1代表小的四边形)的大四边形。在检测到四边形之后,通过对大四边形的编码和预先设定的编码类型对比计算距离,得到更加准确的检测目标。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.
计算单应性矩阵和外参:单应性矩阵代表在二维码坐标系上2D点投影到摄像头坐标系所进行的其次变换,可以通过直接线性变化法 (Direct Linear Transform  algorithm)来求得。相机内参用P表示,包括相机焦距,中心偏差。外参用 E表示。则单应性矩阵可以写为如下形式:Calculate the homography matrix and external parameters: 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:
Figure dest_path_image002
Figure dest_path_image002
其中,Rij(i ,j=0 ,1 ,2)代表旋转参数,Tk(k=x ,y ,z)代表平移参数。Among them, Rij (i, j = 0,1,2) represents the rotation parameter, and Tk (k = x, y, z) represents the translation parameter.
由于旋转矩阵的列必须是单位大小,再根据二维码与摄像头的对应的方向信息,其中,二维码出现在摄像头的前面,可以获得s的大小与方向。旋转矩阵的第三列可以通过计算两个已知列的交叉乘积来恢复,因为旋转的列矩阵必须是正交的。由此可以得到二维码相对于摄像头的相对位置关系。Because 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.
通过二维码定位获取摄像头与二维码中心之间的相对位置关系T,记为(x,0,z),其中,扫地机器人只在水平面上移动,y轴不用标定,y轴的坐标信息设为0。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.
系统1包括: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.
由于扫地机器人在xz轴移动,y轴是不变的,根据二维码定位获取摄像头与二维码中心之间的相对位置关系,可以得到摄像头与扫地机器人中心之间的相对旋转矩阵即为R。As the cleaning robot moves on the xz axis, 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 .
系统1包括: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.
在本实施例中,将扫地机器人的坐标系统进行变换,使扫地机器人的坐标系xyz三轴与二维码中心的xyz三轴方向相同,方便后续扫地机器人的位置信息计算。In this embodiment, 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.
第二获取模块12,用于获取里程计与二维码中心之间的相对位置关系。The second acquisition module 12 is configured to acquire a relative position relationship between the odometer and the center of the two-dimensional code.
在本实施例中,以二维码中心为坐标原点,里程计在二维码的yz轴平面上,扫地机器人只在水平面上移动,y轴不用标定,y轴的坐标信息设为0。为此,里程计坐标为(0,0,s)。In this embodiment, 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, and the cleaning robot moves only on the horizontal plane. For this purpose, the odometer coordinates are (0, 0, s).
第三获取模块13,用于根据摄像头与二维码中心之间的相对位置关系、里程计与二维码中心之间的相对位置关系,获取摄像头与里程计之间的相对位置关系。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.
根据摄像头与二维码中心之间的相对位置关系T(x,0,z),里程计与二维码中心之间的相对位置关系(0,0,s),为此,通过计算可以得到摄像头与里程计之间的相对位置关系(x,0,z-s)。According to the relative position relationship T (x, 0, z) between the camera and the center of the two-dimensional code, the relative position relationship between the odometer and the center of the two-dimensional code (0,0, s). To this end, it can be obtained by calculation. Relative position relationship between camera and odometer (x, 0, zs).
综上所述,根据摄像头与二维码中心之间的相对位置关系、里程计与二维码中心之间的相对位置关系,获取摄像头与里程计之间的相对位置关系,标定摄像头与里程计之间的相对位置关系,旨在解决现有的扫地机器人不考虑摄像头与里程计之间相对位置关系,导致融合得到的位置信息有较大偏差的问题。In summary, according to 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.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiments of the present invention and is not intended to limit the present invention. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention shall be included in the protection of the present invention. Within range.

Claims (10)

  1. 一种扫地机器人的摄像头与里程计坐标标定方法,以二维码中心为坐标原点建立坐标系,扫地机器人的中心轴线位于所述二维码的yz轴平面上,其特征在于,所述方法包括:A method for calibrating a camera and an odometer coordinate of a cleaning robot. A coordinate system is established by taking a center of a two-dimensional code as a coordinate origin, and a center axis of the cleaning robot is located on a yz-axis plane of the two-dimensional code. :
    获取摄像头与所述二维码中心之间的相对位置关系;Obtaining a relative position relationship between a camera and the center of the two-dimensional code;
    获取里程计与所述二维码中心之间的相对位置关系;Obtaining a relative position relationship between the odometer and the two-dimensional code center;
    根据所述摄像头与所述二维码中心之间的相对位置关系、所述里程计与所述二维码中心之间的相对位置关系,获取所述摄像头与所述里程计之间的相对位置关系。Obtaining the relative position between the camera and the odometer according to the relative position relationship between the camera and the two-dimensional code center and the relative position relationship between the odometer and the two-dimensional code center relationship.
  2. 根据权利要求1所述的扫地机器人的摄像头与里程计坐标标定方法,其特征在于,在所述获取摄像头与所述二维码中心之间的相对位置关系的步骤中,包括:The method for calibrating a camera and an odometer coordinate of a cleaning robot according to claim 1, wherein the step of acquiring a relative position relationship between the camera and the center of the two-dimensional code comprises:
    通过二维码定位获取摄像头与所述二维码中心之间的相对位置关系,所述二维码定位包括线检测、四边形检测、计算单应性矩阵和外参。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.
  3. 根据权利要求1所述的扫地机器人的摄像头与里程计坐标标定方法,其特征在于,在所述获取摄像头与所述二维码中心之间的相对位置关系的步骤之前,所述方法包括:The method for calibrating a camera and an odometer coordinate of a cleaning robot according to claim 1, wherein before the step of obtaining a relative position relationship between the camera and the center of the two-dimensional code, the method comprises:
    检测所述摄像头拍摄的图像中是否存在所述二维码;Detecting whether the two-dimensional code exists in an image captured by the camera;
    若不存在,则原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码。If it does not exist, rotate the cleaning robot in place until the two-dimensional code exists in the image captured by the camera.
  4. 根据权利要求3所述的扫地机器人的摄像头与里程计坐标标定方法,其特征在于,在所述原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码的步骤中,包括:The method for calibrating the camera and odometer coordinate of the cleaning robot according to claim 3, wherein in the step of rotating the cleaning robot in place until the two-dimensional code exists in the image captured by the camera ,include:
    按预设的旋转角度原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码。Rotate the cleaning robot in place at a preset rotation angle until the two-dimensional code exists in an image captured by the camera.
  5. 根据权利要求1所述的扫地机器人的摄像头与里程计坐标标定方法,其特征在于,在所述获取摄像头与所述二维码中心之间的相对位置关系的步骤之前,包括:The method for calibrating a camera and an odometer coordinate of a cleaning robot according to claim 1, before the step of obtaining a relative position relationship between the camera and the center of the two-dimensional code, comprising:
    将所述扫地机器人的坐标系进行变换,使扫地机器人的坐标系三轴方向与所述二维码中心的三轴方向相同。Transforming 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.
  6. 一种扫地机器人的摄像头与里程计坐标标定系统,以二维码中心为坐标原点建立坐标系,扫地机器人的中心轴线位于所述二维码的yz轴平面上,其特征在于,所述系统包括:A camera and odometer coordinate calibration system of a sweeping robot establishes a coordinate system with a center of a two-dimensional code as a coordinate origin, and a central axis of the sweeping robot is located on a 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.
  7. 根据权利要求6所述的扫地机器人的摄像头与里程计坐标标定系统,其特征在于,所述二维码定位包括线检测、四边形检测、计算单应性矩阵和外参,所述第一获取模块包括:The camera and odometer coordinate calibration system of a cleaning robot according to claim 6, wherein the two-dimensional code positioning includes line detection, quadrilateral detection, calculation of a homography matrix and external parameters, and the first acquisition module include:
    第一子获取模块,用于通过二维码定位获取摄像头与所述二维码中心之间的相对位置关系。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.
  8. 根据权利要求6所述的扫地机器人的摄像头与里程计坐标标定系统,其特征在于,所述系统包括:The camera and odometer coordinate calibration system of the cleaning robot according to claim 6, wherein the system comprises:
    检测模块,用于检测所述摄像头拍摄的图像中是否存在所述二维码;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.
  9. 根据权利要求8所述的扫地机器人的摄像头与里程计坐标标定系统,其特征在于,所述旋转模块包括:The camera and odometer coordinate calibration system of the cleaning robot according to claim 8, wherein the rotation module comprises:
    子旋转模块,用于按预设的旋转角度原地旋转所述扫地机器人,直至所述摄像头拍摄的图像中存在所述二维码。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.
  10. 根据权利要求6所述的扫地机器人的摄像头与里程计坐标标定系统,其特征在于,所述系统包括:The camera and odometer coordinate calibration system of the cleaning robot according to claim 6, wherein the system comprises:
    坐标变换模块,用于将所述扫地机器人的坐标系进行变换,使扫地机器人的坐标系三轴方向与所述二维码中心的三轴方向相同。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.
PCT/CN2018/093454 2018-06-15 2018-06-28 Method and system for calibrating coordinates of camera and odometer of cleaning robot WO2019237433A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810620619.0A CN108827342A (en) 2018-06-15 2018-06-15 The camera and odometer coordinate scaling method and system of sweeping robot
CN201810620619.0 2018-06-15

Publications (1)

Publication Number Publication Date
WO2019237433A1 true WO2019237433A1 (en) 2019-12-19

Family

ID=64142171

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/093454 WO2019237433A1 (en) 2018-06-15 2018-06-28 Method and system for calibrating coordinates of camera and odometer of cleaning robot

Country Status (2)

Country Link
CN (1) CN108827342A (en)
WO (1) WO2019237433A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109754408B (en) * 2019-01-07 2020-12-01 合肥泰禾光电科技股份有限公司 Trajectory tracking method and device
CN110646231B (en) * 2019-09-25 2022-01-11 深圳巴诺机器人有限公司 Floor sweeping robot testing method and device
CN110597265A (en) * 2019-09-25 2019-12-20 深圳巴诺机器人有限公司 Recharging method and device for sweeping robot
CN113124896B (en) * 2019-12-30 2023-03-28 上海智远慧智能技术股份有限公司 Control method for online accurate calibration of AGV (automatic guided vehicle) odometer

Citations (6)

* Cited by examiner, † Cited by third party
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 (en) * 2016-07-30 2017-01-04 许琴琴 A kind of sweeping robot method for searching
CN106338287A (en) * 2016-08-24 2017-01-18 杭州国辰牵星科技有限公司 Ceiling-based indoor moving robot vision positioning method
CN206411514U (en) * 2016-09-13 2017-08-15 哈尔滨工业大学深圳研究生院 A kind of intelligent storage mobile-robot system positioned based on Quick Response Code
CN206627826U (en) * 2017-01-10 2017-11-10 上海极络智能科技有限公司 Navigation system based on Quick Response Code
CN107803837A (en) * 2017-12-01 2018-03-16 深圳市沃特沃德股份有限公司 Confining device and vision sweeping robot and its control method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106803261A (en) * 2015-11-20 2017-06-06 沈阳新松机器人自动化股份有限公司 robot relative pose estimation method
CN106323294B (en) * 2016-11-04 2023-06-09 新疆大学 Positioning method and positioning device for substation inspection robot
CN106969766A (en) * 2017-03-21 2017-07-21 北京品创智能科技有限公司 A kind of indoor autonomous navigation method based on monocular vision and Quick Response Code road sign
CN107862719B (en) * 2017-11-10 2020-10-27 未来机器人(深圳)有限公司 Method and device for calibrating external parameters of camera, computer equipment and storage medium
CN108007451B (en) * 2017-11-10 2020-08-11 未来机器人(深圳)有限公司 Method and device for detecting position and posture of cargo carrying device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
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 (en) * 2016-07-30 2017-01-04 许琴琴 A kind of sweeping robot method for searching
CN106338287A (en) * 2016-08-24 2017-01-18 杭州国辰牵星科技有限公司 Ceiling-based indoor moving robot vision positioning method
CN206411514U (en) * 2016-09-13 2017-08-15 哈尔滨工业大学深圳研究生院 A kind of intelligent storage mobile-robot system positioned based on Quick Response Code
CN206627826U (en) * 2017-01-10 2017-11-10 上海极络智能科技有限公司 Navigation system based on Quick Response Code
CN107803837A (en) * 2017-12-01 2018-03-16 深圳市沃特沃德股份有限公司 Confining device and vision sweeping robot and its control method

Also Published As

Publication number Publication date
CN108827342A (en) 2018-11-16

Similar Documents

Publication Publication Date Title
JP5832341B2 (en) Movie processing apparatus, movie processing method, and movie processing program
WO2021026850A1 (en) Qr code-based navigation attitude determining and positioning method and system
WO2019237433A1 (en) Method and system for calibrating coordinates of camera and odometer of cleaning robot
CN109163657B (en) Round target pose detection method based on binocular vision three-dimensional reconstruction
US8155387B2 (en) Method and system for position determination using image deformation
CN112686877B (en) Binocular camera-based three-dimensional house damage model construction and measurement method and system
JP4619962B2 (en) Road marking measurement system, white line model measurement system, and white line model measurement device
Ying et al. Fisheye lenses calibration using straight-line spherical perspective projection constraint
CN113012237A (en) Millimeter wave radar and video monitoring camera combined calibration method
KR20170139548A (en) Camera extrinsic parameters estimation from image lines
Gerke Using horizontal and vertical building structure to constrain indirect sensor orientation
Xia et al. Global calibration of non-overlapping cameras: State of the art
CN103106662B (en) Space straight line linear solution parabolic catadioptric camera intrinsic parameter
JP4132068B2 (en) Image processing apparatus, three-dimensional measuring apparatus, and program for image processing apparatus
CN108279677B (en) Rail robot detection method based on binocular vision sensor
CN103106661A (en) Solving parabolic catadioptric camera parameters through two intersected straight lines in space
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 (en) Binocular camera target positioning method based on Bundle Adjustment in unknown environment
Liu et al. Calibration method based on the image of the absolute quadratic curve
Mei et al. Fast central catadioptric line extraction, estimation, tracking and structure from motion
Muffert et al. The estimation of spatial positions by using an omnidirectional camera system
Yang et al. Effect of field of view on the accuracy of camera calibration
Omidalizarandi et al. Comparison of target-and mutual informaton based calibration of terrestrial laser scanner and digital camera for deformation monitoring
Jiang et al. Bridge Deformation Measurement Using Unmanned Aerial Dual Camera and Learning‐Based Tracking Method

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