Map splicing method, storage medium and electronic device

By selecting fixed reference objects between the local map and the base map to build equivalent points, determining the difference characteristics and calculating the alignment parameters, more convenient and accurate alignment and splicing are achieved, solving the problem of alignment and splicing difficulties in the existing technology, and improving the robot environment cognition and positioning accuracy.

CN119494775BActive Publication Date: 2025-05-06SHANGHAI SEER INTELLIGENT TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510075142.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-17
Publication Date
2025-05-06
Estimated Expiration
2045-01-17

AI Technical Summary

Technical Problem

The prior art is difficult to more conveniently and accurately align and splice the collected local map and the base map, resulting in difficulties in position confirmation and path planning when robots perform tasks in known environments.

Method used

By obtaining the base map and the map to be stitched, selecting fixed reference objects to build equivalent points, determining the difference characteristics, calculating the alignment parameters based on the position coordinates of the equivalent points, aligning and splicing, forming a complete environmental map.

Benefits of technology

It realizes more convenient and accurate alignment and splicing between local maps and base maps, improves the robot's global understanding and positioning accuracy of the working environment, and simplifies the intelligent map splicing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494775B_ABST
    Figure CN119494775B_ABST
Patent Text Reader

Abstract

The present application relates to the field of map and positioning technology, and provides a map splicing method, including: obtaining a base map and a map to be spliced, the base map and the map to be spliced ​​are constructed based on a laser scanning device; selecting at least one fixed reference object on the base map and the map to be spliced ​​to construct at least one pair of equivalent points, the equivalent points are two points corresponding to the same fixed reference base map and the map to be spliced; determining the difference features between the base map and the map to be spliced; calculating the alignment parameters between the base map and the map to be spliced ​​based on the difference features and the position coordinates of the equivalent points; aligning the base map and the map to be spliced ​​based on the alignment parameters; splicing the aligned base map and the map to be spliced ​​to obtain a spliced ​​map. Fixed reference points are selected on the base map and the map to be spliced ​​as equivalent points, and a suitable alignment algorithm is selected based on the difference features of the map to be spliced ​​to calculate the alignment parameters between the two maps, which greatly simplifies the intelligent map splicing process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of map and positioning technology, and in particular to a map splicing method, a storage medium and an electronic device. Background Art

[0002] When some robots perform action-related tasks in a known environment, they need to rely on pre-built maps to confirm their own positions. In order to complete tasks efficiently and accurately, a comprehensive understanding of the entire working environment is required. A separate local map can only provide local information perceived by the robot at a specific moment and location. By aligning and splicing the local map with the base map that describes the robot's working environment a priori, these fragmented information can be integrated to form a complete environmental map, allowing the robot to clearly know the overall picture of the entire working area, including the connection relationship between various areas, the distribution of obstacles, etc., so as to better plan paths and perform tasks.

[0003] However, due to the limitations of the robot's hardware, operating mode, different locations, environmental changes and other factors, there will be large differences between the constructed local maps and the base map. Therefore, it is difficult to complete the alignment and splicing conveniently and accurately during the alignment and splicing.

[0004] Therefore, how to more conveniently and accurately align and splice the collected local maps with the base map has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The embodiments of the present application provide a map stitching method, a storage medium and an electronic device to solve the technical problem of how to more conveniently and accurately align and stitch a collected local map with a base map in the prior art.

[0006] According to a first aspect, the present application provides a map stitching method, including: obtaining a base map and a map to be stitched, wherein the base map and the map to be stitched are constructed based on a laser scanning device; selecting at least one fixed reference object on the base map and the map to be stitched to construct at least one pair of equivalent points, wherein the equivalent points are two points in the base map and the map to be stitched that correspond to the same fixed reference object; determining the difference features between the base map and the map to be stitched; calculating the alignment parameters between the base map and the map to be stitched based on the difference features and the position coordinates of the equivalent points; aligning the base map and the map to be stitched based on the alignment parameters; stitching the aligned base map and the map to be stitched to obtain a stitched map.

[0007] In one embodiment, the calculating the alignment parameters between the base map and the map to be spliced ​​based on the difference features and the position coordinates of the equivalent points includes: when the difference features have linear distortion differences in two dimensions, constructing an affine transformation matrix between the base map and the map to be spliced; calculating the affine transformation matrix parameters as the alignment parameters based on the position coordinates of the equivalent points and the affine transformation matrix; when the difference features only have linear distortion differences, constructing a similarity transformation matrix between the base map and the map to be spliced; calculating the similarity transformation matrix parameters as the alignment parameters based on the position coordinates of the equivalent points and the similarity transformation matrix;

[0008] When the distortion difference does not exist in the difference feature, a rotation and translation transformation matrix between the base map and the map to be stitched is constructed; and the rotation and translation transformation matrix parameters are calculated as the alignment parameters based on the position coordinates of the equivalent points and the rotation and translation transformation matrix.

[0009] In one embodiment, the calculation of the affine transformation matrix parameters as the alignment parameters based on the position coordinates of the equivalent points and the affine transformation matrix includes: constructing constraint variables of the affine transformation matrix based on the scanning plane of the laser scanning device and the projection angle of the laser on the scanning plane; wherein the constraint variables include the first scaling parameters and the projection angle of the base map and the map to be stitched on the scanning plane; respectively obtaining the position coordinates of the equivalent points greater than or equal to three pairs; and calculating the affine transformation matrix parameters of the affine transformation matrix with the constraint variables as the alignment parameters based on the position coordinates of the equivalent points.

[0010] In one embodiment, the calculation of the similarity transformation matrix parameters as the alignment parameters based on the position coordinates of the equivalent points and the similarity transformation matrix includes: the difference feature includes a fixed scaling difference; constructing constraint variables of the similarity transformation matrix based on the fixed scaling difference; obtaining at least two pairs of position coordinates of the equivalent points respectively; and calculating the similarity transformation matrix parameters of the similarity transformation matrix using the position coordinates of the equivalent points as the alignment parameters.

[0011] In one embodiment, determining the difference features between the base map and the map to be stitched includes: respectively acquiring first scanning parameters of the base map and second scanning parameters of the map to be stitched; determining difference parameters between the first scanning parameters and the second scanning parameters; and determining the difference features based on the difference parameters.

[0012] In one embodiment, the first scanning parameter and the second scanning parameter include at least one of hardware parameters, operating parameters, location parameters and environmental parameters of a laser scanning device used in a map building process.

[0013] In one embodiment, determining the difference features between the base map and the map to be stitched includes: calculating the relationship features between each pair of equivalent points respectively; and determining the difference features based on the differences between the relationship features corresponding to multiple pairs of the equivalent points.

[0014] In one embodiment, the map stitching method further includes: obtaining an annotation object in the map to be stitched, wherein the annotation object is an annotation object with a preset application registered or constructed in the map to be stitched; correcting the annotation object based on the alignment parameter, and stitching the corrected annotation map onto the stitched map.

[0015] According to a second aspect, an embodiment of the present application provides a map stitching device, including:

[0016] An acquisition module is used to acquire a base map and a map to be spliced, wherein the base map and the map to be spliced ​​are constructed based on a laser scanning device;

[0017] An equivalent point selection module, used for selecting at least one fixed reference object on the base map and the map to be spliced ​​to construct at least one pair of equivalent points, wherein the equivalent points are two points on the base map and the map to be spliced ​​that correspond to the same fixed reference object, respectively;

[0018] A difference feature determination module, used to determine the difference features between the base map and the map to be spliced;

[0019] An alignment parameter calculation module, used for calculating the alignment parameters between the base map and the map to be spliced ​​based on the difference features and the position coordinates of the equivalent points;

[0020] An alignment module, used for aligning the base map and the map to be spliced ​​based on the alignment parameters;

[0021] A stitching module, used for stitching the aligned base map and the map to be stitched;

[0022] The splicing module further includes a marker adjustment module for obtaining the markers in the map to be spliced, wherein the markers are markers with preset applications registered or constructed in the map to be spliced; correcting the markers based on the alignment parameters, and splicing the corrected markers onto the spliced ​​map.

[0023] According to a third aspect, the present application provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the map stitching method as described in any one of the above-mentioned first aspects is implemented.

[0024] According to a fourth aspect, the present application provides an electronic device, comprising one or more processors, one or more memories, and one or more computer program instructions, wherein when the computer program instructions are executed by the processor, any one of the map stitching methods of the first aspect is implemented.

[0025] This application has at least the following beneficial effects:

[0026] In the present application, after the map to be spliced ​​is collected, at least one fixed reference object is selected on the base map and the map to be spliced ​​to construct at least one pair of equivalent points, by determining the difference features between the base map and the map to be spliced, the corresponding alignment algorithm is selected based on the difference features, and the alignment parameters between the base map and the map to be spliced ​​are calculated based on the position coordinates of the equivalent points using the selected alignment algorithm, and the map to be spliced ​​is transformed using the alignment parameters, the map to be spliced ​​is aligned with the base map, the aligned base map and the map to be spliced ​​are superimposed on the point cloud, and the map is rasterized according to a preset size to achieve map splicing. In the present application, by selecting fixed reference points as equivalent points on the base map and the map to be spliced, and selecting a suitable alignment algorithm based on the difference features of the map to be spliced ​​to calculate the alignment parameters between the two maps, the alignment between the maps is achieved, and then the map splicing process is completed, which can easily, efficiently and more targetedly overcome the differences in offset, rotation, scaling, radial and tangential distortion of the maps to be spliced, greatly simplifying the intelligent map splicing process. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0028] Figure 1 A schematic diagram of a map stitching method process provided for some embodiments of the present application;

[0029] Figure 2 A schematic diagram of a map stitching device provided for some embodiments of the present application;

[0030] Figure 3 A schematic diagram of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION

[0031] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0032] As described in the background technology, a separate local map can only provide local information perceived by the robot at a specific time and specific location. By aligning and splicing the local map with the base map that describes the robot's working environment a priori, these fragmented information can be integrated to form a complete environmental map, so that the robot can clearly know the overall picture of the entire working area, including the connection relationship between each area, the distribution of obstacles, etc., so as to better plan the path and perform tasks. At the same time, the robot confirms its own position through the map, and the base map, as a relatively complete reference frame, has more accurate global position information. When the local map is aligned and spliced ​​with the base map, the robot can use the characteristic points, landmarks and other information in the base map to more accurately locate its position in the entire environment. A complete spliced ​​map provides a richer information basis for the robot's task planning. The robot can perform complex task planning based on the spliced ​​map, such as multi-target traversal, regional patrol, etc. Therefore, accurately and conveniently splicing the local map to the map can improve the robot's complete environmental cognition, improve the robot's positioning accuracy, and facilitate task planning and decision-making.

[0033] Based on this, this application proposes a map splicing method, such as Figure 1 As shown, the method may include the following steps:

[0034] S10. Obtain a base map and a map to be spliced, wherein the base map and the map to be spliced ​​are constructed based on a laser scanning device. In this embodiment, the base map can be used as a basic reference map, and the base map can contain global information of the robot's working environment, or a relatively complete a priori description of the environment. The base map can be constructed by high-precision measurement equipment before the robot starts working, or it can be a relatively stable map framework obtained by fusing and splicing multiple previously constructed local maps. It can also be a global map constructed by laser scanning the working environment globally by one or more robots.

[0035] The map to be spliced ​​is a map of a local area obtained by scanning local information by the robot at a specific time and specific position. In this embodiment, the base map and the map to be spliced ​​are both 2D point cloud maps composed of a series of point clouds on the X and Y axis planes constructed by the scanning device through laser scanning. There are public areas on the base map and the map to be spliced, and there are fixed reference objects in the public area, such as the corners of buildings, fixed obstacles in the area, etc.

[0036] S20. Select at least one fixed reference object on the base map and the map to be spliced ​​to construct at least one pair of equivalent points, and the equivalent points are two points in the base map and the map to be spliced ​​that correspond to the same fixed reference object. In this embodiment, the same fixed reference object in the base map and the map to be spliced ​​can be used as a pair of equivalent points between the base map and the map to be spliced. Among them, when selecting equivalent points, at least one pair of equivalent points is selected. When the number of equivalent point pairs selected is 1, 2, 3, 4 or more pairs, the equivalent point alignment will implement different operations, namely translation, translation plus similarity transformation, translation plus radial transformation, and translation plus radial transformation average error.

[0037] In this embodiment, the selection of equivalent points can be done by manual marking. For example, the base map and the map to be spliced ​​can be loaded through roboshop software. After loading, the base map and the map to be spliced ​​can be roughly aligned manually. Fixed reference objects can be manually selected on the base map and the map to be spliced, and the same fixed reference object can be marked on the base map and the map to be spliced, respectively, to obtain multiple pairs of equivalent points.

[0038] In another embodiment, for the selection of equivalent points, feature recognition can also be used for marking. In this embodiment, the area to be identified can be determined on the base map based on the corresponding area of ​​the map to be spliced, and the area to be identified and the map to be identified can be traversed to extract the feature points in the area to be identified and the map to be identified. For example, the Harris corner point detection algorithm can be used to calculate the eigenvalues ​​of the local autocorrelation matrix in the area to be identified and the map to be identified to determine the feature points. The SIFT algorithm can also be used to calculate the feature points in the area to be identified and the map to be identified. After obtaining multiple feature points, the feature points with the same relative position in the corresponding map are selected from the multiple feature points as the feature points corresponding to the fixed reference object.

[0039] In another embodiment, since directly traversing the image to calculate equivalent points may bring about a large computing overhead, and manually marking equivalent points can more quickly determine the range of equivalent points, therefore, in this embodiment, the feature points can be manually marked first, and the shape information of the point cloud within the preset range can be calculated based on the manually marked feature points. After obtaining the point cloud sets of the same shape in the base map and the map to be spliced, the equivalent points corresponding to the fixed reference objects are determined based on the point cloud sets of the same shape. Exemplarily, the centers of the two point cloud sets can be selected as a pair of equivalent points, and the position coordinates of the equivalent points can be accurately determined.

[0040] S30. Determine the difference features between the base map and the map to be spliced. As an exemplary embodiment, when the map to be spliced ​​is collected, due to the differences in hardware parameters, operation modes, environmental parameters, collection locations, etc. of the laser scanning device, there may be uncertain differences between the map to be spliced ​​and the base map. For example, there may be various types of difference features such as translation, rotation, scaling, and distortion between the map to be spliced ​​and the base map. In this embodiment, when or after the base map and the map to be spliced ​​are obtained, the difference features between the base map and the map to be spliced ​​may be determined first.

[0041] S40. Calculate the alignment parameters between the base map and the map to be spliced ​​based on the difference features and the position coordinates of the equivalent points. Different difference features often require different alignment methods. Therefore, in this embodiment, different alignment algorithms can be selected based on the difference features, and the alignment parameters between the map and the map to be spliced ​​are calculated based on the position coordinates of the equivalent points. The alignment parameters can be parameters that need to be corrected and aligned for the map to be spliced ​​using the map as a reference frame.

[0042] In one embodiment, the determined difference features between the base map and the map to be spliced ​​may include difference features between equivalent points. In this embodiment, based on the difference features between the equivalent points, the ICP registration algorithm can be used to calculate the first alignment parameter between the equivalent points for a preset area based on an equivalent point, and the difference features between the base map and the map to be spliced ​​after simulated alignment based on the first alignment parameter are evaluated, and an affine transformation matrix between the base map and the map to be spliced ​​is constructed based on the difference features; the affine transformation matrix parameters are calculated as the second alignment parameters based on the position coordinates of the equivalent points after simulated alignment based on the first alignment parameter and the affine transformation matrix; in order to further optimize the difference between the map and the map to be spliced, in this embodiment, a similarity transformation matrix between the base map and the map to be spliced ​​is constructed; the similarity transformation matrix parameters are calculated as the third alignment parameters based on the position coordinates of the equivalent points after simulated alignment based on the second alignment parameter and the similarity transformation matrix. In this embodiment, the first alignment parameter, the second alignment parameter and the third alignment parameter can be used as the alignment parameters.

[0043] Specifically, in this embodiment, the ICP registration algorithm is used for preliminary rigid body registration. Based on the extracted equivalent points, the corresponding point pairs are determined by finding the shortest distance between the equivalent points in the two maps. In each iteration, the rigid body transformation parameters (rotation parameters and translation parameters) are calculated according to the corresponding point pairs, so that the map to be spliced ​​is transformed in the direction of the base map. Exemplarily, the rotation parameters and translation parameters that minimize the sum of squares of distances between all corresponding point pairs can be calculated by the least squares method. This process is repeated by continuous simulation until the convergence conditions are met, such as the average distance between the point clouds is less than a certain threshold or the maximum number of iterations is reached, and the rotation parameter and translation parameter sequence generated in each simulation iteration process is used as the first alignment parameter. On the basis of ICP registration, the linear differences that still exist between the base map and the map to be spliced, such as scaling and shearing, are analyzed. These linear differences can be evaluated by the distance changes and angle changes between the equivalent points. Select multiple pairs of equivalent points, and according to the affine transformation formula, establish a set of equations to solve the affine transformation parameters as the second alignment parameters by simulating the coordinates of the equivalent points in the base map and the map to be spliced ​​after the first alignment parameters are aligned; after ICP registration and affine transformation simulation alignment, analyze the remaining shape differences between the base map and the map to be spliced. Although affine transformation can handle many linear differences, it may not be accurate enough for some complex shape changes. Determine the parameters that can optimize the shape between the base map and the map to be spliced ​​as the third alignment parameters through similarity transformation.

[0044] In this embodiment, ICP registration is first performed on the base map and the map to be stitched based on equivalent points, which can reduce the difference between equivalent points and prevent affine or similarity transformation from failing to obtain ideal results due to excessive initial position deviations of equivalent points.

[0045] In one embodiment, before performing ICP registration, the weight of each difference in the difference features between equivalent points can be evaluated or the degree of difference of each difference can be ranked, and the order of calculating the alignment parameters corresponding to ICP registration, the alignment parameters corresponding to affine transformation, and the alignment parameters corresponding to similarity change can be determined in the order from large to small weights or from large to small degree of difference. For example, when the rotation and translation differences are the largest, the ICP registration algorithm is first used to calculate the alignment parameters corresponding to ICP registration, and when the linear difference is the largest, the affine transformation is first used to calculate the alignment parameters corresponding to the affine change.

[0046] S50. Align the base map and the map to be spliced ​​based on the mapping matrix parameters. After obtaining the alignment parameters, transform the map to be spliced ​​based on the alignment parameters to align the base map with the map to be spliced.

[0047] S60. Splicing the aligned base map and the map to be spliced. In this embodiment, the base map and the map to be spliced ​​may be overlaid with point clouds, and the map may be rasterized according to a preset size to achieve map splicing.

[0048] In the present application, after the map to be spliced ​​is collected, at least one fixed reference object is selected on the base map and the map to be spliced ​​to construct at least one pair of equivalent points, by determining the difference features between the base map and the map to be spliced, the corresponding alignment algorithm is selected based on the difference features, and the alignment parameters between the base map and the map to be spliced ​​are calculated based on the position coordinates of the equivalent points using the selected alignment algorithm, and the map to be spliced ​​is transformed using the alignment parameters, the map to be spliced ​​is aligned with the base map, the aligned base map and the map to be spliced ​​are superimposed on the point cloud, and the map is rasterized according to a preset size to achieve map splicing. In the present application, by selecting fixed reference points as equivalent points on the base map and the map to be spliced, and selecting a suitable alignment algorithm based on the difference features of the map to be spliced ​​to calculate the alignment parameters between the two maps, the alignment between the maps is achieved, and then the map splicing process is completed, which can easily, efficiently and more targetedly overcome the differences in offset, rotation, scaling, radial and tangential distortion of the maps to be spliced, greatly simplifying the intelligent map splicing process.

[0049] In one embodiment, when collecting maps to be stitched, the laser scanning device may be affected by factors such as hardware parameters, operating parameters, location parameters, and environmental parameters. The collected maps to be stitched may be translated, rotated, scaled, distorted, etc. relative to the base map. Moreover, the differences in maps to be stitched collected by different laser scanning devices, different regions, and different environments at different times are also different. Therefore, in this embodiment, the corresponding alignment algorithm can be selected based on the specific type of difference features. Therefore, it is necessary to first determine the type of difference features of the map to be stitched relative to the base map.

[0050] In one embodiment, the difference characteristics of the map to be spliced ​​relative to the base map mainly come from the scanning parameters when collecting the map to be spliced, and the scanning parameters may include the hardware parameters and operating parameters of the laser scanning device, as well as the position parameters and environmental parameters scanned during the map construction process. The above scanning parameters are different, and the difference characteristics of the collected maps to be spliced ​​are different. In this embodiment, taking the base map as a map constructed by a laser scanning device as an example, the first scanning parameters of the base map and the second scanning parameters of the map to be spliced ​​are respectively obtained; wherein the first scanning parameters can be used as reference scanning parameters, and when the map to be spliced ​​is scanned by the laser scanning device, the hardware parameters of the corresponding laser scanning device are first obtained, such as the thread, resolution, scanning angle, scanning distance and other parameters of the laser sensor, and the operation mode of the laser scanning device, such as the planned scanning path, the projection angle of the emitted laser and the plane where the base map is located, and other operating parameters, the location of the map to be spliced, the scanning start position and other position parameters, and the number of obstacles in the area where the map to be spliced ​​is located during scanning, the type of obstacles, the reflectivity of objects in the environment and other environmental parameters. After the second scanning parameters are obtained, the parameter differences between the second scanning parameters and the first scanning parameters can be determined one by one, a parameter difference set can be constructed, and possible difference features of the map to be spliced ​​can be determined based on the parameter difference set.

[0051] Exemplarily, the difference feature can be evaluated using a trained neural network model. In this embodiment, the difference feature can be the type of difference, for example, whether distortion will occur, whether scaling will occur, whether offset will occur, rotation and other differences. The difference parameter between the second scanning parameter and the first scanning parameter is used as the input feature of the neural network model, and the type of the difference feature is used as the output of the neural network model to construct a neural network model that can evaluate the difference feature. In this embodiment, the neural network model can adopt a BP network model, and the BP neural network can include an input layer, at least one intermediate layer and an output layer. In this embodiment, the parameter difference is used as the input layer of the BP neural network model, and the difference feature type is used as the output layer. The intermediate layer can be selected according to demand. The parameter difference input with the difference feature type mark extracted from the historical data is forward propagated through the intermediate layer to obtain the error between the output layer and the expected value. Based on the error, the connection weight between the input layer and the intermediate layer and the weight between the intermediate layer and the output layer are adjusted to reduce the error and complete the model training. The parameter difference is input into the BP neural network model after training to obtain the difference feature type evaluation result.

[0052] In another embodiment, a polynomial regression model can also be used to evaluate the difference feature type. In this embodiment, the difference parameter set is used as the input of the polynomial regression model, and the difference feature type is used as the output of the polynomial regression model. The coefficients of the polynomial regression model are calculated by combining multiple sets of parameter difference-difference feature type to construct a polynomial regression model. After obtaining the parameter difference set, the parameter difference set is input into the polynomial regression model to obtain the difference feature type.

[0053] When it is determined that the difference feature has a linear distortion difference in two dimensions, an affine transformation matrix between the base map and the map to be stitched is constructed; and the affine transformation matrix parameters are calculated as the alignment parameters based on the position coordinates of the equivalent points and the affine transformation matrix. The affine transformation matrix can be the following formula:

[0054]

[0055] Among them, (x, y) is the coordinate value before transformation, (x', y') is the coordinate value after transformation; a 11 、a 12 、a 21 、a 22 ,t x ,t y are the affine transformation parameters.

[0056] Since in 2D maps, only the plane state of laser scanning is considered, the final result of mapping can be understood as a scanning plane that is not on the horizontal line, but still follows the plane state. The affine transformation matrix is ​​linked to the scaling and projection angle of the scanning plane to construct the affine transformation matrix. In this embodiment, the constraint variables of the affine transformation matrix are constructed based on the scanning plane of the laser scanning device and the projection angle of the laser on the scanning plane; wherein the constraint variables include the first scaling parameter and the projection angle of the base map and the map to be spliced ​​on the scanning plane. The affine transformation matrix with the constraint variables can be expressed by the following formula:

[0057]

[0058] Among them, -s x 、s y are the scaling factors on the X-axis and Y-axis respectively, and α is the projection angle.

[0059] The position coordinates of the equivalent points greater than or equal to three pairs are obtained respectively; based on the position coordinates of the equivalent points, the affine transformation matrix parameters of the affine transformation matrix with the constraint variables are calculated as the alignment parameters. Specifically, the three parameters in the affine transformation matrix can be calculated using the following formula using three pairs of equivalent points, namely: x、s y and α.

[0060]

[0061]

[0062]

[0063] Among them, the three pairs of equivalent points are: (x1, y1) and (x1', y1'), (x2, y2) and (x2', y2') and (x3, y3) and (x3', y3').

[0064] The above formula can be used to obtain nine equations (one equation for each point's x and y coordinates, for a total of three pairs of points) to solve the three unknown parameters - s x 、s y and α.

[0065] When only linear distortion difference exists in the difference feature, a similarity transformation matrix between the base map and the map to be stitched is constructed; the similarity transformation matrix parameters are calculated as the alignment parameters based on the position coordinates of the equivalent points and the similarity transformation matrix. The difference feature includes a fixed scaling difference; the constraint variables of the similarity transformation matrix are constructed based on the fixed scaling difference; the position coordinates of at least two pairs of the equivalent points are obtained respectively; and the similarity transformation matrix parameters of the similarity transformation matrix are calculated as the alignment parameters using the position coordinates of the equivalent points.

[0066] When the base map and the map to be stitched have a fixed zoom difference, the zoom ratios of the two maps in each direction are fixed, and the fixed zoom value is s:

[0067]

[0068] The fixed scaling value s can be solved by selecting two pairs of points. Assuming the equivalent points A0-R0 and A1-R1 are given, then:

[0069]

[0070] For R0-R1*s, get the scaled R01, R 11 . Find its center and calculate t x , t y , calculate the rotation matrix after removing the offset. Use the fixed scale value, offset and rotation matrix as alignment parameters.

[0071] In one embodiment, when the distortion difference does not exist in the difference feature, the difference feature may also include translation and rotation. In this embodiment, the translation vector and rotation matrix in the base map and the map to be stitched may be calculated as alignment parameters.

[0072] In one embodiment, during the map stitching process, there will be annotations with special applications in the map to be stitched, which are registered or constructed based on the current point cloud map, such as sites, storage locations, charging piles, feature lines, special areas, etc. Therefore, when performing map stitching, the annotations in the map to be stitched are obtained, and the annotations are annotations with preset applications registered or constructed in the map to be stitched; the annotations are corrected based on the alignment parameters; and the corrected annotations are stitched onto the stitched map, which can more conveniently connect the complex pre-planning tasks.

[0073] In one embodiment, the area to be aligned of the two maps can be selected as the algorithm input. The algorithm will obtain the point cloud in the selected area and calculate the translation vector and rotation matrix between the two maps. After the map to be spliced ​​is translated and rotated, the map alignment can be achieved. Exemplarily, the ICP algorithm can be used when calculating the translation vector and the rotation matrix. The map alignment is performed by iterative convergence alignment. For example, the advanced methods of ICP such as Generalized-ICP (GICP), RANSAC-ICP, etc. can be used for implementation, and Gaussian mixture models such as Coherent Point Drift (CPD) can also be used for implementation.

[0074] In one embodiment, in the selection of the box area, at least one box area is selected, and ICP alignment is only performed on this area. After multiple box areas are selected, ICP alignment is added to the point clouds in the multiple box areas to improve robustness and effect.

[0075] In one embodiment, after determining the difference features and the alignment algorithm, equivalent point selection or frame selection may be performed manually. Frame selection and equivalent point selection are described below with reference to a specific embodiment:

[0076] The base map and the map to be stitched will be loaded through the roboshop software. After loading, you can manually align the base map and the map to be stitched roughly. Manually select the area that needs to be aligned on the loaded base map and the map to be stitched. When executing it specifically, you can select several smaller areas on the map according to the difference between the base map and the map to be stitched. You can also zoom in on the map and select the edges that are not aligned to make more subtle adjustments.

[0077] When using equivalent point alignment, the base map and the map to be spliced ​​will be loaded through the roboshop software. After loading, the base map and the map to be spliced ​​can be roughly aligned manually. The points at the same position on the base map and the map to be spliced ​​are manually marked as equivalent points. When selecting equivalent points, at least three pairs of equivalent points are selected; the selection of equivalent points has a sequence requirement, the first point is the equivalent point on the map to be spliced, the second point is the equivalent point on the base map, and so on. Then, the alignment parameters are calculated through the reflection transformation matrix or the similarity transformation matrix for automatic alignment.

[0078] like Figure 2 As shown, the embodiment of the present application also provides a map splicing device, including:

[0079] An acquisition module 201 is used to acquire a base map and a map to be spliced, wherein the base map and the map to be spliced ​​are constructed based on a laser scanning device;

[0080] An equivalent point selection module 202 is used to select at least one fixed reference object on the base map and the map to be stitched to construct at least one pair of equivalent points, wherein the equivalent points are two points on the base map and the map to be stitched that correspond to the same fixed reference object, respectively;

[0081] A difference feature determination module 203 is used to determine the difference features between the base map and the map to be spliced;

[0082] An alignment parameter calculation module 204, used for calculating the alignment parameters between the base map and the map to be spliced ​​based on the difference features and the position coordinates of the equivalent points;

[0083] An alignment module 205, configured to align the base map and the map to be spliced ​​based on the alignment parameters;

[0084] A stitching module 206 is used to stitch the aligned base map and the map to be stitched;

[0085] The stitching module 206 further includes an annotation adjustment module, which is used to obtain annotations in the map to be stitched, where the annotations are annotations with preset applications registered or constructed in the map to be stitched; correct the annotations based on the alignment parameters, and stitch the corrected annotations onto the stitched map.

[0086] Figure 3 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Figure 3 As shown, it includes a processor 301, a communication interface 302, a memory 303 and a communication bus 304, wherein the processor 301, the communication interface 302 and the memory 303 communicate with each other through the communication bus 304, wherein,

[0087] Memory 303, used for storing computer programs;

[0088] The processor 301 is used to implement the following steps when executing the computer program stored in the memory 303:

[0089] Acquire a base map and a map to be spliced, wherein the base map and the map to be spliced ​​are constructed based on a laser scanning device;

[0090] Selecting at least one fixed reference object on the base map and the map to be spliced ​​to construct at least one pair of equivalent points, wherein the equivalent points are two points on the base map and the map to be spliced ​​that correspond to the same fixed reference object;

[0091] Determining the difference characteristics between the base map and the map to be stitched;

[0092] Calculating alignment parameters between the base map and the map to be stitched based on the difference features and the position coordinates of the equivalent points;

[0093] Aligning the base map and the map to be stitched based on the alignment parameters;

[0094] The aligned base map and the map to be stitched are stitched together.

[0095] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0096] The communication interface is used for communication between the above electronic device and other devices.

[0097] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0098] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0099] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.

[0100] It can be understood by those skilled in the art that Figure 3 The structure shown is for illustration only. The device for implementing the above map stitching method may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 3 It does not limit the structure of the above electronic device. For example, the terminal device may also include Figure 3 More or fewer components (such as network interfaces, display devices, etc.) shown in, or with Figure 3 Different configurations shown.

[0101] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.

[0102] According to another aspect of the embodiment of the present application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of the map stitching method.

[0103] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.

[0104] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:

[0105] Acquire a base map and a map to be spliced, wherein the base map and the map to be spliced ​​are constructed based on a laser scanning device;

[0106] Selecting at least one fixed reference object on the base map and the map to be spliced ​​to construct at least one pair of equivalent points, wherein the equivalent points are two points on the base map and the map to be spliced ​​that correspond to the same fixed reference object;

[0107] Determining the difference characteristics between the base map and the map to be stitched;

[0108] Calculating alignment parameters between the base map and the map to be stitched based on the difference features and the position coordinates of the equivalent points;

[0109] Aligning the base map and the map to be stitched based on the alignment parameters;

[0110] The aligned base map and the map to be stitched are stitched together.

[0111] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.

[0112] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.

[0113] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0114] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which may be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.

[0115] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0116] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0117] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.

[0118] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0119] Anything not described in this application can be achieved by adopting or drawing on existing technologies.

[0120] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0121] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A map splicing method, characterized in that: include: Acquire a base map and a map to be spliced, wherein the base map and the map to be spliced ​​are constructed based on a laser scanning device; Selecting at least one fixed reference object on the base map and the map to be spliced ​​to construct at least one pair of equivalent points, wherein the equivalent points are two points corresponding to the same fixed reference object in the base map and the map to be spliced ​​respectively; Determining difference features between the base map and the map to be stitched, wherein the difference features include difference features between equivalent points; Calculating the alignment parameters between the base map and the map to be spliced ​​based on the difference features and the position coordinates of the equivalent points, including: calculating the first alignment parameters between the equivalent points using an ICP registration algorithm for a preset area based on an equivalent point based on the difference features between the equivalent points, evaluating the difference features between the base map and the map to be spliced ​​after simulated alignment based on the first alignment parameters, and constructing an affine transformation matrix between the base map and the map to be spliced ​​based on the difference features between the base map and the map to be spliced; calculating the affine transformation matrix parameters as the second alignment parameters based on the position coordinates of the equivalent points after simulated alignment based on the first alignment parameters and the affine transformation matrix; constructing a similarity transformation matrix between the base map and the map to be spliced; calculating the similarity transformation matrix parameters as the third alignment parameters based on the position coordinates of the equivalent points after simulated alignment based on the second alignment parameters and the similarity transformation matrix, and using the first alignment parameter, the second alignment parameter and the third alignment parameter as the alignment parameters; Aligning the base map and the map to be stitched based on the alignment parameters; The aligned base map and the map to be spliced ​​are spliced ​​to obtain a spliced ​​map.

2. The map stitching method according to claim 1, characterized in that: The step of calculating the alignment parameters between the base map and the map to be stitched based on the difference features and the position coordinates of the equivalent points comprises: When the difference feature has linear distortion differences in two dimensions, constructing an affine transformation matrix between the base map and the map to be spliced; Calculating the affine transformation matrix parameters as the alignment parameters based on the position coordinates of the equivalent point and the affine transformation matrix; When the difference feature only has a linear distortion difference, constructing a similarity transformation matrix between the base map and the map to be spliced; Calculate the similarity transformation matrix parameters as the alignment parameters based on the position coordinates of the equivalent point and the similarity transformation matrix; When the distortion difference does not exist in the difference feature, constructing a rotation and translation transformation matrix between the base map and the map to be stitched; The rotation and translation transformation matrix parameters are calculated as the alignment parameters based on the position coordinates of the equivalent point and the rotation and translation transformation matrix.

3. The map stitching method according to claim 2, characterized in that: The calculating the affine transformation matrix parameters as the alignment parameters based on the position coordinates of the equivalent point and the affine transformation matrix comprises: Constructing constraint variables of the affine transformation matrix based on the scanning plane of the laser scanning device and the projection angle on the scanning plane; wherein the constraint variables include the first scaling parameter of the base map and the map to be spliced ​​on the scanning plane and the projection angle; Respectively obtain position coordinates of the equivalent points greater than or equal to three pairs; Affine transformation matrix parameters of an affine transformation matrix having the constraint variables are calculated as the alignment parameters based on the position coordinates of the equivalent points.

4. The map stitching method according to claim 2, characterized in that: The calculating the similarity transformation matrix parameters as the alignment parameters based on the position coordinates of the equivalent points and the similarity transformation matrix comprises: The difference features include fixed scaled differences; Constructing constraint variables of the similarity transformation matrix based on the fixed scaling difference; respectively obtaining position coordinates of at least two pairs of the equivalent points; The similarity transformation matrix parameters of the similarity transformation matrix are calculated using the position coordinates of the equivalent points as the alignment parameters.

5. The map stitching method according to claim 1, characterized in that: Determining the difference features between the base map and the map to be stitched includes: Respectively obtaining a first scanning parameter of the base map and a second scanning parameter of the map to be stitched; determining a difference parameter between the first scanning parameter and the second scanning parameter; The difference characteristic is determined based on the difference parameter.

6. The map stitching method according to claim 5, characterized in that: The first scanning parameter and the second scanning parameter include at least one of hardware parameters, operating parameters, location parameters and environmental parameters used to construct a laser scanning device during map construction.

7. The map stitching method according to claim 1, characterized in that: Determining the difference features between the base map and the map to be stitched includes: Calculate the relationship characteristics between each pair of equivalent points separately; The difference feature is determined based on the difference between the relationship features corresponding to the multiple pairs of the equivalent points.

8. The map stitching method according to claim 1, characterized in that: Also includes: Acquire an annotation object in the map to be stitched, where the annotation object is an annotation object with a preset application registered or constructed in the map to be stitched; Correcting the annotation based on the alignment parameter; The corrected labeled image is stitched onto the stitched map.

9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the map stitching method according to any one of claims 1 to 8 is implemented.

10. An electronic device, characterized in that: The method comprises one or more processors, one or more memories, and one or more computer program instructions. When the computer program instructions are executed by the processor, the map stitching method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Image splicing method and device, computer equipment and storage medium

    CN117333360A

  • Image registration method and device, computer equipment and storage medium

    CN118918158A