Data registration method, device, equipment and storage medium based on straight line features

Through the data registration method based on straight line features, the straight line features in the sampling data are extracted and mapped, and the polar coordinate position transformation relationship and registration error function are constructed, which solves the problem of low data registration accuracy in the existing technology and achieves higher data registration accuracy.

CN113344995BActive Publication Date: 2024-10-01BEIJING HAPPY SPLENDID TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110690537.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-22
Publication Date
2024-10-01
Estimated Expiration
2041-06-22

AI Technical Summary

Technical Problem

Existing data registration methods have low accuracy when the data collection device is blocked or moves greatly, making it difficult to effectively solve the problem of data registration accuracy.

Method used

A data registration method based on straight line features is adopted. By obtaining sampling data at two adjacent moments, the straight line features are extracted and coordinate mapping is performed. The polar coordinate position transformation relationship and registration error function are constructed. The preset algorithm is used to solve the plane position transformation relationship. Implement data registration.

Benefits of technology

The accuracy of data registration is improved, especially when the data acquisition device is blocked or has large movements, data registration can be performed more accurately.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113344995B_ABST
    Figure CN113344995B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a data registration method, device, equipment and storage medium based on straight line features. The method belongs to the field of data processing technology, and comprises: firstly, extracting straight line features and coordinate mapping the acquired first frame sampling data and second frame sampling data to obtain first polar coordinate straight line features and second polar coordinate straight line features, and then constructing the polar coordinate position transformation relationship between the first frame sampling data and the second frame sampling data according to the defined plane position transformation relationship; then constructing the registration error function according to the polar coordinate position transformation relationship, the first polar coordinate straight line features and the second polar coordinate straight line features; finally, solving the plane position transformation relationship through a preset algorithm according to the registration error function to realize data registration between the first frame sampling data and the second frame sampling data. The embodiment of the present application can improve the accuracy of data registration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a data registration method, device, equipment and storage medium based on straight line features. Background Art

[0002] Data registration is a mathematical calculation process that converts a large set of three-dimensional spatial data points in two or more coordinate systems into a unified coordinate system. In fact, it is to find the transformation relationship between the two coordinate systems. It is used in popular fields such as unmanned driving perception systems, image alignment for three-dimensional reconstruction, and navigation and positioning of mobile robots. Currently, existing data registration methods are based on point features, such as point set to point set registration methods. When the data acquisition device (camera, lidar, etc.) is blocked or moves greatly, the accuracy of data registration is low. Summary of the invention

[0003] The embodiments of the present invention provide a data registration method, device, equipment and storage medium based on straight line features, aiming to solve the problem of low accuracy of existing data registration.

[0004] In a first aspect, an embodiment of the present invention provides a data registration method based on straight line features, which includes:

[0005] Acquire a first frame of sampling data and a second frame of sampling data collected by a data collection device, wherein the first frame of sampling data and the second frame of sampling data are sampling data at two adjacent moments;

[0006] Respectively performing straight line feature extraction and coordinate mapping on the first frame sampling data and the second frame sampling data to obtain a first polar coordinate straight line feature and a second polar coordinate straight line feature;

[0007] Constructing a polar coordinate position transformation relationship between the first frame of sampling data and the second frame of sampling data in a polar coordinate system according to a plane position transformation relationship between the first frame of sampling data and the second frame of sampling data defined in a plane coordinate system;

[0008] Constructing a registration error function according to the polar coordinate position transformation relationship, the first polar coordinate straight line feature, and the second polar coordinate straight line feature;

[0009] The plane position transformation relationship is solved by a preset algorithm according to the registration error function to achieve data registration between the first frame sampling data and the second frame sampling data.

[0010] In a second aspect, an embodiment of the present invention further provides a data registration device based on straight line features, comprising:

[0011] An acquisition unit, used for acquiring a first frame of sampling data and a second frame of sampling data acquired by a data acquisition device, wherein the first frame of sampling data and the second frame of sampling data are sampling data at two adjacent moments;

[0012] An extraction and mapping unit, used for performing straight line feature extraction and coordinate mapping on the first frame sampling data and the second frame sampling data respectively to obtain a first polar coordinate straight line feature and a second polar coordinate straight line feature;

[0013] A first construction unit, configured to construct a polar coordinate position transformation relationship between the first frame of sampling data and the second frame of sampling data in a polar coordinate system according to a plane position transformation relationship between the first frame of sampling data and the second frame of sampling data defined in a plane coordinate system;

[0014] A second construction unit is used to construct a registration error function according to the polar coordinate position transformation relationship, the first polar coordinate straight line feature and the second polar coordinate straight line feature;

[0015] A calculation unit is used to solve the plane position transformation relationship through a preset algorithm according to the registration error function to achieve data registration between the first frame sampling data and the second frame sampling data.

[0016] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.

[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program implements the above method when executed by a processor.

[0018] The embodiment of the present invention provides a data registration method, device, equipment and storage medium based on straight line features. The method includes: firstly extracting straight line features and performing coordinate mapping on the acquired first frame sampling data and second frame sampling data to obtain first polar coordinate straight line features and second polar coordinate straight line features, and then constructing the polar coordinate position transformation relationship between the first frame sampling data and the second frame sampling data according to the defined plane position transformation relationship; then constructing the registration error function according to the polar coordinate position transformation relationship, the first polar coordinate straight line feature and the second polar coordinate straight line feature; finally, solving the plane position transformation relationship through a preset algorithm according to the registration error function to realize data registration between the first frame sampling data and the second frame sampling data. The technical solution of the embodiment of the present invention solves the plane position transformation relationship based on straight line features instead of point features, which can improve the accuracy of data registration when the data acquisition device is blocked or moves greatly. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0020] Figure 1 A schematic diagram of a flow chart of a data registration method based on straight line features provided by an embodiment of the present invention;

[0021] Figure 2 A schematic diagram of a sub-process of a data registration method based on straight line features provided by an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of a sub-process of a data registration method based on straight line features provided by an embodiment of the present invention;

[0023] Figure 4 A schematic diagram of a sub-process of a data registration method based on straight line features provided by an embodiment of the present invention;

[0024] Figure 5 A schematic diagram of a sub-process of a data registration method based on straight line features provided by an embodiment of the present invention;

[0025] Figure 6 A schematic block diagram of a data registration device based on straight line features provided by an embodiment of the present invention;

[0026] Figure 7 A schematic block diagram of an extraction and mapping unit of a data registration device based on straight line features provided by an embodiment of the present invention;

[0027] Figure 8 A schematic block diagram of a first construction unit of a data registration device based on straight line features provided by an embodiment of the present invention;

[0028] Fig. 9 A schematic block diagram of a second construction unit of a data registration device based on straight line features provided by an embodiment of the present invention;

[0029] Fig.10 A schematic block diagram of a sixth construction subunit of the data registration device based on straight line features provided by an embodiment of the present invention;

[0030] Fig.11 A schematic block diagram of a computing unit of a data registration device based on straight line features provided by an embodiment of the present invention;

[0031] Fig.12A schematic block diagram of a second computing subunit of a data registration device based on straight line features provided by an embodiment of the present invention; and

[0032] Fig.13 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0034] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0035] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0036] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0037] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0038] See also Figure 1 , Figure 1is a flow chart of a data registration method based on straight line features provided by an embodiment of the present invention. The data registration method based on straight line features of the embodiment of the present invention can be applied to a mobile robot terminal. For example, the data registration method based on straight line features can be implemented by a software program configured on the mobile robot terminal, thereby improving the accuracy of data registration. Figure 1 As shown, the method includes the following steps S100-S140.

[0039] S100 , acquiring a first frame of sampling data and a second frame of sampling data collected by a data collection device, wherein the first frame of sampling data and the second frame of sampling data are sampling data at two adjacent moments.

[0040] In an embodiment of the present invention, when the mobile robot terminal is moving on its own, the data acquisition device (camera, lidar) thereon will automatically collect the first frame sampling data and the second frame sampling data, wherein the first frame sampling data and the second frame sampling data are sampling data at two adjacent moments. After collecting the first frame sampling data and the second frame sampling data, the mobile robot terminal will obtain the first frame sampling data and the second frame sampling data and perform a series of processing on them to achieve data registration.

[0041] S110 , respectively extracting straight line features and performing coordinate mapping on the first frame sampling data and the second frame sampling data to obtain first polar coordinate straight line features and second polar coordinate straight line features.

[0042] In an embodiment of the present invention, after the mobile robot terminal obtains the first frame sampling data and the second frame sampling data, it will respectively extract straight line features on the first frame sampling data and the second frame sampling data to obtain the first straight line feature and the second straight line feature. After obtaining the first straight line feature and the second straight line feature, the first straight line feature and the second straight line feature are mapped from the plane coordinate system to the polar coordinate system to obtain the first polar coordinate straight line feature and the second polar coordinate straight line feature.

[0043] See also Figure 2 In one embodiment, for example, in an embodiment of the present invention, the step S110 includes the following steps S111-S112.

[0044] S111, performing straight line feature extraction on the first frame sampling data and the second frame sampling data respectively by using a preset straight line feature extraction method to obtain a first straight line feature and a second straight line feature;

[0045] S112, mapping the first straight line feature and the second straight line feature from the plane coordinate system to the polar coordinate system to obtain a first polar coordinate straight line feature and a second polar coordinate straight line feature.

[0046] In an embodiment of the present invention, straight line feature extraction and coordinate mapping are performed on the first frame sampling data and the second frame sampling data respectively to obtain a first polar coordinate straight line feature and a second polar coordinate straight line feature. Specifically, straight line feature extraction is performed on the first frame sampling data and the second frame sampling data respectively by a preset straight line extraction method to obtain a first straight line feature and a second straight line feature, wherein the preset straight line feature extraction method can use any one of the Hough transform method, the Split-and-Merge method, the Line-Regression method, the Line-Tracking method and the RANSAC method; after obtaining the first straight line feature and the second straight line feature, the first straight line feature and the second straight line feature are mapped from a plane coordinate system to a polar coordinate system to obtain a first polar coordinate straight line feature and a second polar coordinate straight line feature. In practical applications, it is assumed that the extracted first straight line feature and the second straight line feature are respectively expressed as:

[0047] L i ={L i,k |k=1,2,3…} (1)

[0048] L i+1 ={L i+1,k |k=1,2,3…} (2)

[0049] Among them, L i,k represents the kth straight line extracted from the i-th frame sampling data, L i+1,k represents the kth straight line extracted from the i+1th frame of sampling data. i It represents the set of all straight line features extracted from the i-th frame sampling data, which is the first straight line feature, L i+1 It represents the set of all straight line features extracted from the i+1th frame sampling data, which is the second straight line feature.

[0050] The extracted first straight line feature and the second straight line feature are mapped from the plane coordinate system to the polar coordinate system and expressed as:

[0051]

[0052]

[0053] Wherein, l represents the distance from the straight line to the origin. In the embodiment of the present invention, the straight line includes a first straight line corresponding to the first straight line feature and a second straight line corresponding to the second straight line feature. α is the angle between the normal vector of the straight line and the x-axis. Function The domain of is:

[0054]

[0055] S120: Construct a polar coordinate position transformation relationship between the first frame sampling data and the second frame sampling data in a polar coordinate system according to the plane position transformation relationship between the first frame sampling data and the second frame sampling data defined in a plane coordinate system.

[0056] In an embodiment of the present invention, after performing straight line feature extraction and coordinate mapping on the first frame sampling data and the second frame sampling data respectively to obtain a first polar coordinate straight line feature and a second polar coordinate straight line feature, a polar coordinate position transformation relationship between the first frame sampling data and the second frame sampling data in a polar coordinate system is constructed according to the plane position transformation relationship between the first frame sampling data and the second frame sampling data defined in a plane coordinate system, wherein the plane position transformation relationship includes a rotation angle and a translation matrix; and the polar coordinate position transformation relationship includes an angle transformation relationship and a distance transformation relationship.

[0057] See also Figure 3 In one embodiment, for example, in an embodiment of the present invention, the step S120 includes the following steps S121-S122.

[0058] S121, constructing an angle transformation relationship between the first frame of sampling data and the second frame of sampling data in a polar coordinate system according to a rotation angle between the first frame of sampling data and the second frame of sampling data defined in a plane coordinate system;

[0059] S122: construct a distance transformation relationship between the first frame sampling data and the second frame sampling data in a polar coordinate system according to the rotation angle and translation matrix between the first frame sampling data and the second frame sampling data defined in a plane coordinate system.

[0060] In an embodiment of the present invention, after performing linear feature extraction and coordinate mapping on the first frame sampling data and the second frame sampling data to obtain the first polar coordinate linear feature and the second polar coordinate linear feature, an angle transformation relationship between the first frame sampling data and the second frame sampling data in the polar coordinate system is constructed according to the rotation angle between the first frame sampling data and the second frame sampling data defined in the plane coordinate system; a distance transformation relationship between the first frame sampling data and the second frame sampling data in the polar coordinate system is constructed according to the rotation angle and translation matrix between the first frame sampling data and the second frame sampling data defined in the plane coordinate system. In practical applications, the angle transformation relationship and the distance transformation relationship are expressed as follows:

[0061] α i+1,k =α i,k +θ (6)

[0062] l i+1,k = l i,k +tx cos(α i,k +θ)+t y sin(α i,k +θ) (7)

[0063] Where θ is the rotation angle, t=(t x ,t y ) is the translation matrix, l is the distance from the straight line (the first straight line and the second straight line) to the origin, and α is the angle between the normal vector of the straight line and the x-axis.

[0064] S130: constructing a registration error function according to the polar coordinate position transformation relationship, the first polar coordinate straight line feature, and the second polar coordinate straight line feature.

[0065] In an embodiment of the present invention, after constructing the polar coordinate position transformation relationship between the first frame sampling data and the second frame sampling data in the polar coordinate system, a registration error function is constructed based on the polar coordinate position transformation relationship, the first polar coordinate straight line feature and the second polar coordinate straight line feature.

[0066] See also Figure 4 In one embodiment, for example, in an embodiment of the present invention, the step S130 includes the following steps S131-S135.

[0067] S131, constructing a collection area formula of the data collection device within a preset angle range;

[0068] S132, constructing a plane registration error formula according to a preset distance function in the acquisition region area formula;

[0069] S133, constructing a polar coordinate local error formula according to the first polar coordinate straight line feature, the second polar coordinate straight line feature and the plane registration error formula;

[0070] S134, substituting the polar coordinate position transformation relationship into the polar coordinate local error formula to obtain a polar coordinate target local error formula;

[0071] S135. Construct a polar coordinate global registration error formula according to the polar coordinate target local error formula and a preset coverage coefficient, and use the polar coordinate global registration error formula as the registration error function.

[0072] In an embodiment of the present invention, a registration error function is constructed based on the polar coordinate position transformation relationship, the first polar coordinate straight line feature, and the second polar coordinate straight line feature. Specifically, a collection area formula of the data acquisition device is constructed within a preset angle range, wherein the preset angle range is (0, 2π), and the collection area formula is formula (8); a plane registration error formula is constructed based on a preset distance function in the collection area formula, wherein the preset distance function is The plane registration error formula is formula (9); the polar coordinate local error formula is constructed according to the first polar coordinate straight line feature, the second polar coordinate straight line feature and the plane registration error formula, wherein the polar coordinate local error formula is formula (10), where a i is the largest lower bound of the first and second straight lines, b i is the largest upper bound of the first straight line and the second straight line; the polar coordinate position transformation relationship is substituted into the polar coordinate local error formula to obtain the polar coordinate target local error formula, that is, formula (6) and formula (7) are substituted into formula (10) to obtain the target local error formula formula (11), wherein Pi is defined as formula (12); a polar coordinate global registration error formula is constructed according to the polar coordinate target local error formula and the preset coverage coefficient, and the polar coordinate global registration error formula is used as the registration error function. The polar coordinate global registration error formula is formula (13), and the coverage coefficient is formula (14).

[0073]

[0074]

[0075]

[0076]

[0077]

[0078]

[0079]

[0080] S140: Solve the plane position transformation relationship through a preset algorithm according to the registration error function to achieve data registration between the first frame sampling data and the second frame sampling data.

[0081] In an embodiment of the present invention, after the registration error function is constructed, the plane position transformation relationship is solved by a preset algorithm according to the constructed registration error function to achieve data registration between the first frame sampling data and the second frame sampling data. Among them, the preset algorithm is the Adam algorithm. In an embodiment of the present invention, the Adam algorithm uses the first-order moment estimation and the second-order moment estimation of the gradient to dynamically adjust the learning rate of each parameter. It can be understood that the parameter is the position parameter corresponding to the plane position transformation relationship. After the bias correction, the learning rate after each iteration has a certain range, so that the parameter is relatively stable, that is, the plane position transformation relationship can be stably obtained.

[0082] See also Figure 5 In one embodiment, for example, in an embodiment of the present invention, the step S140 includes the following steps S141-S145.

[0083] S141, calculating a partial derivative of a position parameter corresponding to the plane position transformation relationship in the registration error function to obtain a partial derivative position;

[0084] S142, calculating the gradient value of the partial derivative position at the current moment to obtain a gradient position parameter;

[0085] S143, respectively calculating the first-order momentum and the second-order momentum of the position corresponding to the gradient position parameter by using the first preset momentum formula and the second preset momentum formula;

[0086] S144, calculating the position descent gradient value at the current moment according to the position first-order momentum and the position second-order momentum by using a preset descent gradient formula;

[0087] S145. Update the gradient position parameter at the next moment according to the position descending gradient value until a preset number of updates is reached to obtain the plane position transformation relationship and realize data registration between the first frame sampling data and the second frame sampling data.

[0088] In the embodiment of the present invention, for ease of understanding, the steps of the Adam algorithm are first introduced. Assuming that the parameter to be optimized is ω, the objective function is f(ω), the learning rate is σ, and the initial value is 0.01, the Adam algorithm performs the following steps in each iteration:

[0089] Step 1: Calculate the current gradient of the parameter to be optimized in the objective function

[0090] Step 2: Calculate the first-order momentum and second-order momentum: m t =φ(g1,g2,…,g t ), V t =ψ(g1,g2,…,g t );

[0091] Step 3: Add bias correction and calculate the current descent gradient value The calculation formulas for the corresponding parameters of the first-order momentum, second-order momentum and descent gradient value in step 2 and step 3 are as follows:

[0092] m t =β1·m t-1 +(1-β1)·g t (15)

[0093]

[0094]

[0095]

[0096] In formula (15) to formula (16), β1=0.9, β2=0.999 and ε=0.00000001.

[0097] Step 4: Update the parameter value ω at the next moment t+1 =ω t -η t , until t is the preset number of updates.

[0098] After understanding the parameter solving process of the Adam algorithm, the partial derivative of the position parameter corresponding to the plane position transformation relationship in the registration error function is first calculated to obtain the partial derivative position. In practical applications, the partial derivatives of the rotation angle, the translation amount in the x direction and the translation amount in the y direction in the translation matrix are calculated respectively. Specifically, as shown in formulas (19) to (21), after the partial derivative position is obtained, the gradient value of the partial derivative position at the current moment is calculated to obtain the gradient position parameter, which corresponds to step one of the Adam algorithm; the first-order momentum and the second-order momentum of the position corresponding to the gradient position parameter are calculated respectively by the first preset momentum formula and the second preset momentum formula, which corresponds to step two of the Adam algorithm; the position descent gradient value at the current moment is calculated by the preset descent gradient formula according to the first-order momentum and the second-order momentum of the position, which corresponds to step three of the Adam algorithm; the gradient position parameter at the next moment is updated according to the position descent gradient value until the preset update number is reached to obtain the plane position transformation relationship, so as to realize the data registration between the first frame sampling data and the second frame sampling data, which corresponds to step four of the Adam algorithm.

[0099]

[0100]

[0101] Figure 6FIG. 2 is a schematic block diagram of a data registration device 200 based on straight line features provided by an embodiment of the present invention. Figure 6 As shown, corresponding to the above data registration method based on straight line features, the present invention also provides a data registration device 200 based on straight line features. The data registration device 200 based on straight line features includes a unit for executing the above data registration method based on straight line features, and the device can be configured in a terminal provided with a data acquisition device, for example, configured in a mobile robot terminal. Specifically, please refer to Figure 6 The data registration device 200 based on straight line features includes an acquisition unit 201, an extraction and mapping unit 202, a first construction unit 203, a second construction unit 204 and a calculation unit 205.

[0102] Among them, the acquisition unit 201 is used to acquire the first frame sampling data and the second frame sampling data collected by the data acquisition device, wherein the first frame sampling data and the second frame sampling data are sampling data at two adjacent moments; the extraction and mapping unit 202 is used to perform straight line feature extraction and coordinate mapping on the first frame sampling data and the second frame sampling data respectively to obtain the first polar coordinate straight line feature and the second polar coordinate straight line feature; the first construction unit 203 is used to construct the polar coordinate position transformation relationship between the first frame sampling data and the second frame sampling data in the polar coordinate system according to the plane position transformation relationship between the first frame sampling data and the second frame sampling data defined in the plane coordinate system; the second construction unit 204 is used to construct a registration error function according to the polar coordinate position transformation relationship, the first polar coordinate straight line feature and the second polar coordinate straight line feature; the calculation unit 205 is used to solve the plane position transformation relationship through a preset algorithm according to the registration error function to achieve data registration between the first frame sampling data and the second frame sampling data.

[0103] In some embodiments, such as the present embodiment, Figure 7 As shown, the extraction and mapping unit 202 includes an extraction unit 2021 and a mapping unit 2022 .

[0104] Among them, the extraction unit 2021 is used to extract straight line features from the first frame sampling data and the second frame sampling data respectively through a preset straight line feature extraction method to obtain a first straight line feature and a second straight line feature; the mapping unit 2022 is used to map the first straight line feature and the second straight line feature from a plane coordinate system to a polar coordinate system to obtain a first polar coordinate straight line feature and a second polar coordinate straight line feature.

[0105] In some embodiments, such as the present embodiment, Figure 8As shown, the first construction unit 203 includes a first construction subunit 2031 and a second construction subunit 2032 .

[0106] Among them, the first construction subunit 2031 is used to construct an angle transformation relationship between the first frame sampling data and the second frame sampling data in a polar coordinate system according to the rotation angle between the first frame sampling data and the second frame sampling data defined in a plane coordinate system; the second construction subunit 2032 is used to construct a distance transformation relationship between the first frame sampling data and the second frame sampling data in a polar coordinate system according to the rotation angle and translation matrix between the first frame sampling data and the second frame sampling data defined in a plane coordinate system.

[0107] In some embodiments, such as the present embodiment, Fig. 9 As shown, the second building unit 204 includes a third building subunit 2041 , a fourth building subunit 2042 , a fifth building subunit 2043 and a sixth building subunit 2044 .

[0108] Among them, the third construction subunit 2041 is used to construct the acquisition area formula of the data acquisition device within a preset angle range; the fourth construction subunit 2042 is used to construct a plane registration error formula based on the preset distance function in the acquisition area formula; the fifth construction subunit 2043 is used to construct a polar coordinate local error formula based on the first polar coordinate straight line feature, the second polar coordinate straight line feature and the plane registration error formula; the sixth construction subunit 2044 is used to construct a polar coordinate global registration error formula based on the polar coordinate position transformation relationship and the polar coordinate local error formula, and use the polar coordinate global registration error formula as the registration error function.

[0109] In some embodiments, such as the present embodiment, Fig.10 As shown, the sixth construction subunit 2044 includes a substitution unit 20441 and a seventh construction subunit 20442 .

[0110] Among them, the substitution unit 20441 is used to substitute the polar coordinate position transformation relationship into the polar coordinate local error formula to obtain the polar coordinate target local error formula; the seventh construction subunit 20442 is used to construct a polar coordinate global registration error formula according to the polar coordinate target local error formula and a preset coverage coefficient, and use the polar coordinate global registration error formula as the registration error function.

[0111] In some embodiments, such as the present embodiment, Fig.11 As shown, the calculation unit 205 includes a first calculation subunit 2051 and a second calculation subunit 2052 .

[0112] Among them, the first calculation subunit 2051 is used to calculate the partial derivative of the position parameter corresponding to the plane position transformation relationship in the registration error function to obtain the partial derivative position; the second calculation subunit 2052 is used to solve the plane position transformation relationship through the Adam algorithm according to the partial derivative position to achieve data alignment between the first frame sampling data and the second frame sampling data.

[0113] In some embodiments, such as the present embodiment, Fig.12 As shown, the second computing subunit 2052 includes a third computing subunit 20521 , a fourth computing subunit 20522 , a fifth computing subunit 20523 and an updating unit 20524 .

[0114] Among them, the third calculation subunit 20521 is used to calculate the gradient value of the partial derivative position at the current moment to obtain the gradient position parameter; the fourth calculation subunit 20522 is used to calculate the first-order momentum and the second-order momentum of the position corresponding to the gradient position parameter respectively through the first preset momentum formula and the second preset momentum formula; the fifth calculation subunit 20523 is used to calculate the position descent gradient value at the current moment according to the first-order momentum and the second-order momentum of the position through the preset descent gradient formula; the update unit 20524 is used to update the gradient position parameter at the next moment according to the position descent gradient value until the preset number of updates is reached, so as to obtain the plane position transformation relationship and realize the data alignment between the first frame sampling data and the second frame sampling data.

[0115] See also Fig.13 , Fig.13 300 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 300 is a terminal, which may be a mobile robot terminal provided with a data acquisition device.

[0116] See also Fig.13 The computer device 300 includes a processor 302 , a memory and a network interface 305 connected via a system bus 301 , wherein the memory may include a storage medium 303 and an internal memory 304 .

[0117] The storage medium 303 may store an operating system 3031 and a computer program 3032. When the computer program 3032 is executed, the processor 302 may execute a data registration method based on straight line features.

[0118] The processor 302 is used to provide computing and control capabilities to support the operation of the entire computer device 300 .

[0119] The internal memory 304 provides an environment for the operation of the computer program 3032 in the storage medium 303. When the computer program 3032 is executed by the processor 302, the processor 302 can execute a data registration method based on straight line features.

[0120] The network interface 305 is used to communicate with other devices over the network. Fig.13 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 300 to which the solution of the present application is applied. The specific computer device 300 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0121] The processor 302 is used to run a computer program 3032 stored in a memory to implement the following steps: obtaining a first frame of sampling data and a second frame of sampling data collected by a data acquisition device, wherein the first frame of sampling data and the second frame of sampling data are sampling data at two adjacent moments; performing straight line feature extraction and coordinate mapping on the first frame of sampling data and the second frame of sampling data to obtain a first polar coordinate straight line feature and a second polar coordinate straight line feature; constructing a polar coordinate position transformation relationship between the first frame of sampling data and the second frame of sampling data in a polar coordinate system according to a plane position transformation relationship between the first frame of sampling data and the second frame of sampling data defined in a plane coordinate system; constructing a registration error function according to the polar coordinate position transformation relationship, the first polar coordinate straight line feature and the second polar coordinate straight line feature; solving the plane position transformation relationship through a preset algorithm according to the registration error function to achieve data registration between the first frame of sampling data and the second frame of sampling data.

[0122] In certain embodiments, such as the present embodiment, when the processor 302 implements the step of respectively performing straight line feature extraction and coordinate mapping on the first frame sampling data and the second frame sampling data to obtain a first polar coordinate straight line feature and a second polar coordinate straight line feature, it specifically implements the following steps: respectively performing straight line feature extraction on the first frame sampling data and the second frame sampling data by a preset straight line feature extraction method to obtain a first straight line feature and a second straight line feature; mapping the first straight line feature and the second straight line feature from a plane coordinate system to a polar coordinate system to obtain a first polar coordinate straight line feature and a second polar coordinate straight line feature.

[0123] In certain embodiments, such as the present embodiment, when the processor 302 implements the step of constructing a polar coordinate position transformation relationship between the first frame sampling data and the second frame sampling data in a polar coordinate system according to the plane position transformation relationship between the first frame sampling data and the second frame sampling data defined in a plane coordinate system, the processor 302 specifically implements the following steps: constructing an angle transformation relationship between the first frame sampling data and the second frame sampling data in a polar coordinate system according to the rotation angle between the first frame sampling data and the second frame sampling data defined in a plane coordinate system; constructing a distance transformation relationship between the first frame sampling data and the second frame sampling data in a polar coordinate system according to the rotation angle and translation matrix between the first frame sampling data and the second frame sampling data defined in a plane coordinate system.

[0124] In certain embodiments, such as the present embodiment, the processor 302, when implementing the step of constructing a registration error function according to the polar coordinate position transformation relationship, the first polar coordinate straight line feature, and the second polar coordinate straight line feature, specifically implements the following steps: constructing an acquisition region area formula of the data acquisition device within a preset angle range; constructing a plane registration error formula according to a preset distance function in the acquisition region area formula; constructing a polar coordinate local error formula according to the first polar coordinate straight line feature, the second polar coordinate straight line feature, and the plane registration error formula; constructing a polar coordinate global registration error formula according to the polar coordinate position transformation relationship and the polar coordinate local error formula, and using the polar coordinate global registration error formula as the registration error function.

[0125] In certain embodiments, such as the present embodiment, when the processor 302 implements the step of constructing a polar coordinate global registration error formula according to the polar coordinate position transformation relationship and the polar coordinate local error formula, and using the polar coordinate global registration error formula as the registration error function, it specifically implements the following steps: substituting the polar coordinate position transformation relationship into the polar coordinate local error formula to obtain the polar coordinate target local error formula; constructing a polar coordinate global registration error formula according to the polar coordinate target local error formula and a preset coverage coefficient, and using the polar coordinate global registration error formula as the registration error function.

[0126] In certain embodiments, such as the present embodiment, when the processor 302 implements the step of solving the plane position transformation relationship through a preset algorithm according to the registration error function to achieve data registration between the first frame sampling data and the second frame sampling data, it specifically implements the following steps: calculating the partial derivative of the position parameter corresponding to the plane position transformation relationship in the registration error function to obtain the partial derivative position; solving the plane position transformation relationship through the Adam algorithm according to the partial derivative position to achieve data registration between the first frame sampling data and the second frame sampling data.

[0127] In certain embodiments, such as the present embodiment, the processor 302 specifically implements the following steps when implementing the step of solving the plane position transformation relationship through the Adam algorithm according to the partial derivative position to achieve data alignment between the first frame sampling data and the second frame sampling data: calculating the gradient value of the partial derivative position at the current moment to obtain the gradient position parameter; calculating the first-order position momentum and the second-order position momentum corresponding to the gradient position parameter respectively through the first preset momentum formula and the second preset momentum formula; calculating the position descent gradient value at the current moment through the preset descent gradient formula according to the first-order position momentum and the second-order position momentum; updating the gradient position parameter at the next moment according to the position descent gradient value until the preset number of updates is reached to obtain the plane position transformation relationship and achieve data alignment between the first frame sampling data and the second frame sampling data.

[0128] It should be understood that in the embodiment of the present application, the processor 302 may be a central processing unit (CPU), and the processor 302 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0129] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above-mentioned embodiment can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiment of the above-mentioned method. Therefore, the present invention also provides a storage medium. The storage medium can be a computer-readable storage medium. The storage medium stores a computer program. When the computer program is executed by a processor, the processor executes the following steps: obtaining a first frame of sampling data and a second frame of sampling data collected by a data acquisition device, wherein the first frame of sampling data and the second frame of sampling data are sampling data at two adjacent moments; performing straight line feature extraction and coordinate mapping on the first frame of sampling data and the second frame of sampling data respectively to obtain a first polar coordinate straight line feature and a second polar coordinate straight line feature; constructing a polar coordinate position transformation relationship between the first frame of sampling data and the second frame of sampling data in a polar coordinate system according to a plane position transformation relationship between the first frame of sampling data and the second frame of sampling data defined in a plane coordinate system; constructing a registration error function according to the polar coordinate position transformation relationship, the first polar coordinate straight line feature and the second polar coordinate straight line feature; solving the plane position transformation relationship through a preset algorithm according to the registration error function to achieve data registration between the first frame of sampling data and the second frame of sampling data.

[0130] In certain embodiments, such as the present embodiment, when the processor executes the computer program to implement the steps of respectively extracting straight line features and coordinate mapping the first frame sampling data and the second frame sampling data to obtain first polar coordinate straight line features and second polar coordinate straight line features, the processor specifically implements the following steps: respectively extracting straight line features from the first frame sampling data and the second frame sampling data by a preset straight line feature extraction method to obtain first straight line features and second straight line features; mapping the first straight line features and the second straight line features from a plane coordinate system to a polar coordinate system to obtain first polar coordinate straight line features and second polar coordinate straight line features.

[0131] In certain embodiments, such as the present embodiment, when the processor executes the computer program to implement the step of constructing a polar coordinate position transformation relationship between the first frame sampling data and the second frame sampling data in a polar coordinate system according to the plane position transformation relationship between the first frame sampling data and the second frame sampling data defined in a plane coordinate system, the processor specifically implements the following steps: constructing an angle transformation relationship between the first frame sampling data and the second frame sampling data in a polar coordinate system according to the rotation angle between the first frame sampling data and the second frame sampling data defined in a plane coordinate system; constructing a distance transformation relationship between the first frame sampling data and the second frame sampling data in a polar coordinate system according to the rotation angle and translation matrix between the first frame sampling data and the second frame sampling data defined in a plane coordinate system.

[0132] In certain embodiments, such as the present embodiment, when the processor executes the computer program to implement the step of constructing a registration error function according to the polar coordinate position transformation relationship, the first polar coordinate straight line feature, and the second polar coordinate straight line feature, the processor specifically implements the following steps: constructing an acquisition region area formula for the data acquisition device within a preset angle range; constructing a plane registration error formula according to a preset distance function in the acquisition region area formula; constructing a polar coordinate local error formula according to the first polar coordinate straight line feature, the second polar coordinate straight line feature, and the plane registration error formula; constructing a polar coordinate global registration error formula according to the polar coordinate position transformation relationship and the polar coordinate local error formula, and using the polar coordinate global registration error formula as the registration error function.

[0133] In certain embodiments, such as the present embodiment, when the processor executes the computer program to implement the step of constructing a polar coordinate global registration error formula based on the polar coordinate position transformation relationship and the polar coordinate local error formula, and using the polar coordinate global registration error formula as the registration error function, the following steps are specifically implemented: substituting the polar coordinate position transformation relationship into the polar coordinate local error formula to obtain the polar coordinate target local error formula; constructing a polar coordinate global registration error formula based on the polar coordinate target local error formula and a preset coverage coefficient, and using the polar coordinate global registration error formula as the registration error function.

[0134] In certain embodiments, such as the present embodiment, when the processor executes the computer program to implement the step of solving the plane position transformation relationship through a preset algorithm according to the registration error function to achieve data registration between the first frame sampling data and the second frame sampling data, the processor specifically implements the following steps: calculating the partial derivative of the position parameter corresponding to the plane position transformation relationship in the registration error function to obtain the partial derivative position; solving the plane position transformation relationship through the Adam algorithm according to the partial derivative position to achieve data registration between the first frame sampling data and the second frame sampling data.

[0135] In certain embodiments, such as the present embodiment, when the processor executes the computer program to implement the step of solving the plane position transformation relationship according to the partial derivative position by the Adam algorithm to realize the data alignment between the first frame sampling data and the second frame sampling data, the following steps are specifically implemented: calculating the gradient value of the partial derivative position at the current moment to obtain the gradient position parameter; calculating the first-order position momentum and the second-order position momentum corresponding to the gradient position parameter by the first preset momentum formula and the second preset momentum formula respectively; calculating the position descent gradient value at the current moment by the preset descent gradient formula according to the first-order position momentum and the second-order position momentum; updating the gradient position parameter at the next moment according to the position descent gradient value until the preset number of updates is reached to obtain the plane position transformation relationship and realize the data alignment between the first frame sampling data and the second frame sampling data.

[0136] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0137] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0138] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and 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.

[0139] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0140] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0141] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0142] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

[0143] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A data registration method based on straight line features, It is characterized in that include: Acquire a first frame of sampling data and a second frame of sampling data collected by a data collection device, wherein the first frame of sampling data and the second frame of sampling data are sampling data at two adjacent moments; Respectively performing straight line feature extraction and coordinate mapping on the first frame sampling data and the second frame sampling data to obtain a first polar coordinate straight line feature and a second polar coordinate straight line feature; Constructing a polar coordinate position transformation relationship between the first frame of sampling data and the second frame of sampling data in a polar coordinate system according to a plane position transformation relationship between the first frame of sampling data and the second frame of sampling data defined in a plane coordinate system; Constructing a registration error function according to the polar coordinate position transformation relationship, the first polar coordinate straight line feature, and the second polar coordinate straight line feature; Solving the plane position transformation relationship by a preset algorithm according to the registration error function to achieve data registration between the first frame sampling data and the second frame sampling data, wherein the preset algorithm is an Adam algorithm; Wherein, constructing a registration error function according to the polar coordinate position transformation relationship, the first polar coordinate straight line feature and the second polar coordinate straight line feature comprises: Constructing a collection area formula of the data collection device within a preset angle range; Constructing a plane registration error formula according to a preset distance function in the acquisition region area formula; Constructing a polar coordinate local error formula according to the first polar coordinate straight line feature, the second polar coordinate straight line feature and the plane registration error formula; Substituting the polar coordinate position transformation relationship into the polar coordinate local error formula to obtain a polar coordinate target local error formula; A polar coordinate global registration error formula is constructed according to the polar coordinate target local error formula and a preset coverage coefficient, and the polar coordinate global registration error formula is used as the registration error function.

2. The method according to claim 1, It is characterized in that The extracting straight line features and performing coordinate mapping on the first frame sampling data and the second frame sampling data to obtain first polar coordinate straight line features and second polar coordinate straight line features respectively include: Performing straight line feature extraction on the first frame sampling data and the second frame sampling data respectively by a preset straight line feature extraction method to obtain a first straight line feature and a second straight line feature; The first straight line feature and the second straight line feature are mapped from a plane coordinate system to a polar coordinate system to obtain a first polar coordinate straight line feature and a second polar coordinate straight line feature.

3. The method according to claim 1, It is characterized in that The step of constructing a polar coordinate position transformation relationship between the first frame of sampling data and the second frame of sampling data in a polar coordinate system according to the plane position transformation relationship between the first frame of sampling data and the second frame of sampling data defined in a plane coordinate system includes: Constructing an angle transformation relationship between the first frame of sampling data and the second frame of sampling data in a polar coordinate system according to a rotation angle between the first frame of sampling data and the second frame of sampling data defined in a plane coordinate system; A distance transformation relationship between the first frame sampling data and the second frame sampling data in a polar coordinate system is constructed according to the rotation angle and translation matrix between the first frame sampling data and the second frame sampling data defined in a plane coordinate system.

4. The method according to claim 1, It is characterized in that Solving the plane position transformation relationship by a preset algorithm according to the registration error function to achieve data registration between the first frame sampling data and the second frame sampling data includes: Taking partial derivatives of position parameters corresponding to the plane position transformation relationship in the registration error function to obtain partial derivative positions; The plane position transformation relationship is solved by the Adam algorithm according to the partial derivative position to achieve data alignment between the first frame sampling data and the second frame sampling data.

5. The method according to claim 4, It is characterized in that The step of solving the plane position transformation relationship by using the Adam algorithm according to the partial derivative position to achieve data registration between the first frame sampling data and the second frame sampling data includes: Calculate the gradient value of the partial derivative position at the current moment to obtain a gradient position parameter; Calculating the first-order momentum and the second-order momentum of the position corresponding to the gradient position parameter respectively by using the first preset momentum formula and the second preset momentum formula; Calculate the position descent gradient value at the current moment according to the position first-order momentum and the position second-order momentum by using a preset descent gradient formula; The gradient position parameter at the next moment is updated according to the position descending gradient value until a preset number of updates is reached to obtain the plane position transformation relationship and realize data registration between the first frame sampling data and the second frame sampling data.

6. A data registration device based on straight line features, It is characterized in that include: An acquisition unit, used for acquiring a first frame of sampling data and a second frame of sampling data acquired by a data acquisition device, wherein the first frame of sampling data and the second frame of sampling data are sampling data at two adjacent moments; An extraction and mapping unit, used for performing straight line feature extraction and coordinate mapping on the first frame sampling data and the second frame sampling data respectively to obtain a first polar coordinate straight line feature and a second polar coordinate straight line feature; A first construction unit, configured to construct a polar coordinate position transformation relationship between the first frame of sampling data and the second frame of sampling data in a polar coordinate system according to a plane position transformation relationship between the first frame of sampling data and the second frame of sampling data defined in a plane coordinate system; A second construction unit is used to construct a registration error function according to the polar coordinate position transformation relationship, the first polar coordinate straight line feature and the second polar coordinate straight line feature; a calculation unit, configured to solve the plane position transformation relationship by a preset algorithm according to the registration error function to achieve data registration between the first frame sampling data and the second frame sampling data, wherein the preset algorithm is an Adam algorithm; Wherein, the second building unit comprises: A third construction subunit is used to construct a collection area formula of the data collection device within a preset angle range; A fourth construction subunit, configured to construct a plane registration error formula according to a preset distance function in the acquisition region area formula; a fifth construction subunit, configured to construct a polar coordinate local error formula according to the first polar coordinate straight line feature, the second polar coordinate straight line feature and the plane registration error formula; A substitution unit, used for substituting the polar coordinate position transformation relationship into the polar coordinate local error formula to obtain a polar coordinate target local error formula; The seventh construction subunit is used to construct a polar coordinate global registration error formula according to the polar coordinate target local error formula and a preset coverage coefficient, and use the polar coordinate global registration error formula as the registration error function.

7. A computer device, It is characterized in that The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 5 when executing the computer program.

8. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.