Point cloud registration method, device, electronic device and storage medium

By clustering and filtering feature points on point cloud images, combined with curvature and spatial distance information, the problem of poor point cloud registration accuracy is solved and more accurate pose transformation calculations are achieved.

CN111915657BActive Publication Date: 2024-08-27ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010651233.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-08
Publication Date
2024-08-27
Estimated Expiration
2040-07-08

AI Technical Summary

Technical Problem

The accuracy of point cloud registration in the existing technology is poor, especially when there are moving objects in the point cloud image, the feature points are unstable, resulting in poor accuracy in calculating the pose transformation relationship.

Method used

By clustering each pixel in the point cloud image, it is determined whether the minimum circumscribed rectangular area is a moving object area, and the corresponding pixels are filtered out; combined with curvature and spatial distance information, edge points and plane points are selected for point cloud processing Registration uses preset distance and angle thresholds to filter feature points and determine rotation and translation matrices.

Benefits of technology

It improves the accuracy of point cloud registration, reduces the influence of feature points of moving objects, ensures the accuracy of rotation matrices and translation matrices, and thus improves the overall accuracy of point cloud registration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111915657B
    Figure CN111915657B
Patent Text Reader

Abstract

The present invention discloses a point cloud registration method, device, electronic device and storage medium. In the embodiment of the present invention, after the electronic device acquires the point cloud image, it performs clustering processing on each first pixel point in the point cloud image according to a preset first distance threshold, and then for each cluster, it determines whether the cluster is a cluster corresponding to a moving object according to the length and width of the minimum circumscribed rectangle of the cluster, and if so, the first pixel point of the cluster is filtered out. Thus, the feature points of the moving object are filtered out, and then the point cloud registration is performed based on the point cloud image after the first pixel point is filtered out. Because the unstable feature points of the moving object are filtered out, when the point cloud registration is performed based on the point cloud image after the first pixel point is filtered out, the determined rotation matrix and translation matrix are more accurate, thereby making the point cloud registration more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a point cloud registration method, device, electronic equipment and storage medium. Background Art

[0002] Three-dimensional reconstruction mainly uses sensors to obtain data at different locations and construct a three-dimensional model of the scene based on the correlation between the data. The most common three-dimensional model is represented in the form of a point cloud, and point cloud registration technology is needed to obtain the correlation between the data. Point cloud registration is to find the coordinate transformation relationship between the two point clouds based on the overlapping area of ​​the two point clouds, including the rotation matrix R and the translation matrix t, and then unify them into the same coordinate system to splice the two point clouds into one point cloud.

[0003] The key point of the common point cloud registration algorithm design is to extract feature points from the point cloud and use feature matching to calculate the pose transformation relationship, that is, the rotation matrix R and the translation matrix t to achieve point cloud registration. The problem with this method is that for two frames of point cloud images, after extracting the feature points, the pose transformation relationship is calculated based on the positional relationship of all feature points. If there are moving objects in the point cloud images, the feature points contained in the moving objects are unstable. In this way, the pose transformation relationship is calculated based on the positional relationship of all feature points including the feature points of the moving objects. The accuracy of the pose transformation relationship is poor, which in turn makes the accuracy of point cloud registration poor. Summary of the invention

[0004] The embodiments of the present invention provide a point cloud registration method, device, electronic device and storage medium to solve the problem of poor accuracy of point cloud registration in the prior art.

[0005] An embodiment of the present invention provides a point cloud registration method, the method comprising:

[0006] Obtain each frame of point cloud image for point cloud registration;

[0007] For each frame of the point cloud image, clustering processing is performed on each first pixel point in the point cloud image according to spatial coordinate information of each first pixel point in the point cloud image and a preset first distance threshold;

[0008] Determine the minimum bounding rectangle area of ​​each cluster, and for each minimum bounding rectangle area, determine whether the minimum bounding rectangle area is the area corresponding to the moving object according to the length and width of the minimum bounding rectangle area, if yes, filter out the first pixel point in the minimum bounding rectangle area, if no, retain the first pixel point in the minimum bounding rectangle area;

[0009] Point cloud registration is performed based on the point cloud image after filtering out the first pixel.

[0010] Further, judging whether the minimum circumscribed rectangular area is an area corresponding to the moving object according to the length and width of the minimum circumscribed rectangular area includes:

[0011] Determine whether a first ratio of the length to the width of the minimum circumscribed rectangular area is within a preset first range; or determine whether a second ratio of the width to the length of the minimum circumscribed rectangular area is within a preset second range.

[0012] Furthermore, after retaining the first pixel point in the minimum circumscribed rectangular area and before performing point cloud registration based on the point cloud image after filtering out the first pixel point, the method further includes:

[0013] For each first pixel point in the point cloud image, determine each second pixel point in a horizontal preset neighborhood including the first pixel point, determine the spatial distances from the first pixel point and each second pixel point to the laser sensor respectively, and calculate the absolute value of the difference between the spatial distance from the first pixel point to the laser sensor and the spatial distance from each second pixel point to the laser sensor respectively; determine the curvature of the first pixel point according to the sum of each absolute value;

[0014] Sort each of the first pixel points in descending order of curvature, select a preset first number of first pixel points from front to back as edge points in the point cloud image, and select a preset second number of first pixel points from back to front as plane points in the point cloud image;

[0015] The performing point cloud registration based on the point cloud image after filtering out the first pixel point comprises:

[0016] Point cloud registration is performed based on each edge point and each plane point in the point cloud image after filtering out the first pixel point.

[0017] Furthermore, the step of sorting each of the first pixel points in descending order of curvature, selecting a preset first number of first pixel points from front to back as edge points in the point cloud image, and selecting a preset second number of first pixel points from back to front as plane points in the point cloud image includes:

[0018] For the first pixel points of each row in the point cloud image, the first pixel points of the row are sorted in descending order of curvature, and a preset third number of first pixel points are selected from front to back as edge points in the point cloud image, and a preset fourth number of first pixel points are selected from back to front as plane points in the point cloud image.

[0019] Furthermore, for the first pixel points of each row in the point cloud image, sorting the first pixel points of the row in descending order of curvature, selecting a preset third number of first pixel points from front to back as edge points in the point cloud image, and selecting a preset fourth number of first pixel points from back to front as plane points in the point cloud image includes:

[0020] The first pixel points of each row in the point cloud image are divided into a preset fifth number of groups, and for the first pixel points of each group, the first pixel points of the group are sorted in descending order of curvature, and a preset sixth number of first pixel points are selected from front to back as edge points in the point cloud image, and a preset seventh number of first pixel points are selected from back to front as plane points in the point cloud image.

[0021] Further, after determining each edge point and each plane point in the point cloud image, and before performing point cloud registration based on each edge point and each plane point in the point cloud image after filtering out the first pixel point, the method further includes:

[0022] According to the spatial coordinate information of each edge point and each plane point, the spatial distance from each edge point and each plane point to the laser sensor is determined, and the edge points and plane points whose spatial distance is greater than a preset second distance threshold are filtered out.

[0023] Furthermore, after filtering out edge points and plane points whose spatial distance is greater than a preset second distance threshold, and before performing point cloud registration based on each edge point and each plane point in the point cloud image after filtering out the first pixel point, the method further includes:

[0024] For each retained plane point, determine a third pixel point in the point cloud image that is located in the same column and adjacent to the plane point, and judge whether the plane point and the third pixel point satisfy the first formula arctan(dz,sqrt(dx*dx+dy*dy))<θ; if yes, retain the plane point, if not, filter out the plane point;

[0025] In the formula, dz=|z1-z2|, dx=x1-x2, dy=y1-y2, θ is a preset angle value; the spatial coordinate information of the plane point is (x1, y1, z1), and the spatial coordinate information of the third pixel point is (x2, y2, z2).

[0026] Further, the performing point cloud registration based on each edge point and each plane point in the point cloud image after filtering out the first pixel point includes:

[0027] For each edge point in the current frame point cloud image, two fourth pixel points corresponding to the edge point in the previous frame point cloud image are determined according to the spatial distance, and the spatial distance of the spatial straight line formed by the edge point and the two fourth pixel points is determined; wherein the two fourth pixel points are the edge points in the previous frame point cloud image;

[0028] For each plane point in the current frame point cloud image, three fifth pixel points corresponding to the plane point in the previous frame point cloud image are determined according to the spatial distance, and the spatial distance between the plane point and the spatial plane formed by the three fifth pixel points is determined; wherein the three fifth pixel points are the plane points in the previous frame point cloud image;

[0029] According to the spatial distance from each edge point to the corresponding spatial straight line and the spatial distance from each plane point to the corresponding spatial plane, a rotation matrix and a translation matrix are determined; and point cloud registration is performed based on the rotation matrix and the translation matrix.

[0030] Furthermore, for each edge point in the current frame point cloud image, determining two fourth pixel points corresponding to the edge point in the previous frame point cloud image according to the spatial distance includes:

[0031] For each edge point in the current frame point cloud image, determine a preset eighth number of sixth pixel points in the previous frame point cloud image that are closest to the edge point in spatial distance, and select two sixth pixel points with the smallest difference in intensity value with the edge point as two fourth pixel points corresponding to the edge point;

[0032] The step of determining, for each plane point in the current frame point cloud image, three fifth pixel points corresponding to the plane point in the previous frame point cloud image according to the spatial distance comprises:

[0033] For each plane point in the current frame point cloud image, determine a preset ninth number of seventh pixel points in the previous frame point cloud image that are closest to the plane point in spatial distance, and select three seventh pixel points with the smallest difference in intensity value with the plane point as the three fifth pixel points corresponding to the plane point.

[0034] Furthermore, after determining the rotation matrix and the translation matrix and before performing point cloud registration based on the rotation matrix and the translation matrix, the method further includes:

[0035] Determine a local map according to a point cloud image before a current frame point cloud image;

[0036] The current frame point cloud image is registered with the local map according to the rotation matrix and the translation matrix, and the rotation matrix and the translation matrix are updated according to the registration result.

[0037] Furthermore, determining the local map according to the point cloud image before the current frame point cloud image includes:

[0038] For each frame of point cloud image before the current frame of point cloud image, determine the spatial distance between the laser sensor corresponding to the frame of point cloud image and the laser sensor corresponding to the previous frame of point cloud image, and judge whether the spatial distance is greater than a preset third distance threshold, and if so, determine that the frame of point cloud image is a key frame point cloud image;

[0039] A local map is determined based on each keyframe point cloud image.

[0040] On the other hand, an embodiment of the present invention provides a point cloud registration device, the device comprising:

[0041] An acquisition module, used to acquire each frame of point cloud image for point cloud registration;

[0042] A clustering processing module, configured to perform clustering processing on each first pixel point in each frame of the point cloud image according to the spatial coordinate information of each first pixel point in the point cloud image and a preset first distance threshold;

[0043] A first filtering module is used to determine the minimum bounding rectangle area of ​​each cluster, and for each minimum bounding rectangle area, determine whether the minimum bounding rectangle area is an area corresponding to a moving object according to the length and width of the minimum bounding rectangle area, and if yes, filter out the first pixel point in the minimum bounding rectangle area, and if no, retain the first pixel point in the minimum bounding rectangle area;

[0044] The registration module is used to perform point cloud registration based on the point cloud image after filtering out the first pixel point.

[0045] Furthermore, the first filtering module is specifically used to determine whether a first ratio of the length to the width of the minimum circumscribed rectangular area is within a preset first range; or to determine whether a second ratio of the width to the length of the minimum circumscribed rectangular area is within a preset second range.

[0046] Furthermore, the device also includes:

[0047] A determination module is used to determine, for each first pixel point in the point cloud image, each second pixel point in a preset horizontal neighborhood including the first pixel point, determine the spatial distances of the first pixel point and each second pixel point to the laser sensor, respectively, and calculate the absolute values ​​of the differences between the spatial distances of the first pixel point to the laser sensor and the spatial distances of each second pixel point to the laser sensor; determine the curvature of the first pixel point according to the sum of each absolute value; sort each first pixel point in descending order of curvature, select a preset first number of first pixel points from front to back as edge points in the point cloud image, and select a preset second number of first pixel points from back to front as plane points in the point cloud image;

[0048] The registration module is specifically used to perform point cloud registration based on each edge point and each plane point in the point cloud image after filtering out the first pixel point.

[0049] Furthermore, the determination module is specifically used to sort the first pixel points of each row in the point cloud image in order of curvature from large to small, select a preset third number of first pixel points from front to back as edge points in the point cloud image, and select a preset fourth number of first pixel points from back to front as plane points in the point cloud image.

[0050] Furthermore, the determination module is specifically used to divide the first pixel points of each row in the point cloud image into a preset fifth number of groups, and for the first pixel points of each group, sort the first pixel points of the group in order of curvature from large to small, and select a preset sixth number of first pixel points from front to back as edge points in the point cloud image, and select a preset seventh number of first pixel points from back to front as plane points in the point cloud image.

[0051] Furthermore, the device also includes:

[0052] The second filtering module is used to determine the spatial distance from each edge point and each plane point to the laser sensor according to the spatial coordinate information of each edge point and each plane point, and filter out edge points and plane points whose spatial distance is greater than a preset second distance threshold.

[0053] Furthermore, the device also includes:

[0054] The third filtering module is used to determine, for each retained plane point, a third pixel point in the point cloud image that is located in the same column and adjacent to the plane point, and judge whether the plane point and the third pixel point satisfy the first formula arctan(dz,sqrt(dx*dx+dy*dy))<θ; if yes, retain the plane point, if not, filter out the plane point; wherein dz=|z1-z2|, dx=x1-x2, dy=y1-y2, θ is a preset angle value; the spatial coordinate information of the plane point is (x1, y1, z1), and the spatial coordinate information of the third pixel point is (x2, y2, z2).

[0055] Furthermore, the registration module is specifically used to determine, for each edge point in the current frame point cloud image, two fourth pixel points corresponding to the edge point in the previous frame point cloud image according to the spatial distance, and determine the spatial distance of the spatial straight line formed by the edge point and the two fourth pixel points; wherein the two fourth pixel points are the edge points in the previous frame point cloud image; for each plane point in the current frame point cloud image, three fifth pixel points corresponding to the plane point in the previous frame point cloud image according to the spatial distance, and determine the spatial distance of the plane point and the spatial plane formed by the three fifth pixel points; wherein the three fifth pixel points are the plane points in the previous frame point cloud image; determine the rotation matrix and the translation matrix according to the spatial distance from each edge point to the corresponding spatial straight line and the spatial distance from each plane point to the corresponding spatial plane; and perform point cloud registration based on the rotation matrix and the translation matrix.

[0056] Furthermore, the registration module is specifically used to determine, for each edge point in the current frame point cloud image, a preset eighth number of sixth pixel points in the previous frame point cloud image that are closest to the edge point in spatial distance, and select two sixth pixel points with the smallest difference in intensity value with the edge point as two fourth pixel points corresponding to the edge point;

[0057] The registration module is specifically used to determine, for each plane point in the current frame point cloud image, a preset ninth number of seventh pixel points in the previous frame point cloud image that are closest to the plane point in spatial distance, and select the three seventh pixel points with the smallest difference in intensity value with the plane point as the three fifth pixel points corresponding to the plane point.

[0058] Furthermore, the device also includes:

[0059] The updating module is used to determine the local map according to the point cloud image before the current frame point cloud image; align the current frame point cloud image with the local map according to the rotation matrix and the translation matrix, and update the rotation matrix and the translation matrix according to the alignment result.

[0060] Furthermore, the updating module is specifically used to determine, for each frame of point cloud image before the current frame of point cloud image, the spatial distance between the laser sensor corresponding to the frame of point cloud image and the laser sensor corresponding to the previous frame of point cloud image, and judge whether the spatial distance is greater than a preset third distance threshold, and if so, determine that the frame of point cloud image is a key frame point cloud image;

[0061] A local map is determined based on each keyframe point cloud image.

[0062] On the other hand, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0063] Memory, used to store computer programs;

[0064] The processor is used to implement any of the method steps described above when executing the program stored in the memory.

[0065] On the other hand, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any of the method steps described above is implemented.

[0066] An embodiment of the present invention provides a point cloud registration method, device, electronic device and storage medium, the method comprising: obtaining each frame of point cloud image for point cloud registration; for each frame of point cloud image, clustering each first pixel in the point cloud image according to the spatial coordinate information of each first pixel and a preset first distance threshold; determining the minimum bounding rectangular area of ​​each cluster, for each minimum bounding rectangular area, judging whether the minimum bounding rectangular area is an area corresponding to a moving object according to the length and width of the minimum bounding rectangular area, if yes, filtering out the first pixel in the minimum bounding rectangular area, if not, retaining the first pixel in the minimum bounding rectangular area; performing point cloud registration based on the point cloud image after filtering out the first pixel.

[0067] Because in the embodiment of the present invention, after the electronic device acquires the point cloud image, each first pixel in the point cloud image is clustered according to the preset first distance threshold, and then for each cluster, according to the length and width of the minimum circumscribed rectangle of the cluster, it is determined whether the cluster is a cluster corresponding to the moving object, and if so, the first pixel of the cluster is filtered out. Thus, the feature points of the moving object are filtered out, and then the point cloud registration is performed based on the point cloud image after the first pixel is filtered out. Because the unstable feature points of the moving object are filtered out, when the point cloud registration is performed based on the point cloud image after the first pixel is filtered out, the determined rotation matrix and translation matrix are more accurate, thereby making the point cloud registration more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0069] Figure 1 A schematic diagram of a point cloud registration process provided in Example 1 of the present invention;

[0070] Figure 2 A schematic diagram of a point cloud registration process provided in Example 11 of the present invention;

[0071] Figure 3 A schematic diagram of the structure of a point cloud registration device provided in Example 12 of the present invention;

[0072] Figure 4 This is a schematic diagram of the structure of an electronic device provided in Example 13 of the present invention. DETAILED DESCRIPTION

[0073] The present invention will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than 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.

[0074] Embodiment 1:

[0075] Figure 1 A schematic diagram of a point cloud registration process provided by an embodiment of the present invention, the process includes the following steps:

[0076] S101: Acquire each frame of point cloud image for point cloud registration.

[0077] The point cloud registration method provided by the embodiment of the present invention is applied to electronic devices, including PCs, tablet computers and other devices.

[0078] The laser sensor scans and obtains each point cloud sequence during the movement process. For each point cloud sequence, according to the number of beams of the laser sensor and the number of points obtained by scanning a beam in one circle, the row and column of the point are calculated according to the spatial position of the point, and the point cloud sequence is mapped into a two-dimensional image. This point cloud sequence is mapped into a two-dimensional figure, that is, each frame of point cloud image for point cloud registration is obtained. Among them, the number of beams of the laser sensor is the number of rows contained in the point cloud image, and the number of points obtained by scanning a beam in one circle is the number of columns contained in the point cloud image. The laser sensor scans and obtains each point cloud sequence. The laser sensor can determine the spatial coordinate information of each point in the point cloud sequence and the distance from each point to the laser sensor. In other words, the spatial coordinate information of each pixel point in each frame of the point cloud image and the distance from the pixel point to the laser sensor are known.

[0079] S102: For each frame of the point cloud image, clustering processing is performed on each first pixel point in the point cloud image according to spatial coordinate information of each first pixel point in the point cloud image and a preset first distance threshold.

[0080] A preset first distance threshold is stored in the electronic device. For each first pixel point in each frame of the point cloud image, the spatial distance between each other first pixel point and the first pixel point is determined according to the spatial coordinate information of each first pixel point in the point cloud image, and the other first pixel points whose spatial distance is less than the preset first distance threshold are clustered together with the first pixel point.

[0081] S103: Determine the minimum bounding rectangular area of ​​each cluster. For each minimum bounding rectangular area, determine whether the minimum bounding rectangular area is the area corresponding to the moving object based on the length and width of the minimum bounding rectangular area. If yes, filter out the first pixel point in the minimum bounding rectangular area. If not, retain the first pixel point in the minimum bounding rectangular area.

[0082] After determining each cluster in the point cloud image, determine the minimum bounding rectangle area of ​​each cluster, and determine the length and width of each minimum bounding rectangle area. It should be noted that in the point cloud image, the row direction is the length and the column direction is the width. For each minimum bounding rectangle area, determine whether the minimum bounding rectangle area is the area corresponding to the moving object based on the length and width of the minimum bounding rectangle area. Among them, the moving object can be determined based on the scene of the point cloud registration. If the scene of the point cloud registration is an indoor scene, the moving object is generally a person. If the scene of the point cloud registration is a traffic scene, the moving object is generally a car.

[0083] The length range and width range of the minimum bounding rectangular area of ​​a moving object can be pre-saved in an electronic device. For each minimum bounding rectangular area, it is determined whether the length of the minimum bounding rectangular area belongs to the length range and whether the width belongs to the width range. If the judgment results are both yes, the minimum bounding rectangular area is determined to be the area corresponding to the moving object, and the first pixel point in the minimum bounding rectangular area is filtered out. Otherwise, the first pixel point in the minimum bounding rectangular area is retained.

[0084] S104: performing point cloud registration based on the point cloud image after filtering out the first pixel.

[0085] Specifically, point cloud registration refers to registering the current frame point cloud image with the previous frame point cloud image, and transforming the current frame point cloud image into the coordinate system of the previous frame point cloud image.

[0086] After filtering out the first pixel of the moving object, the electronic device performs point cloud registration based on the point cloud image after filtering out the first pixel. Among them, the existing registration scheme can be used to extract feature points in the point cloud image, and the rotation matrix R and the translation matrix t are calculated by matching the feature points, and the point cloud registration is realized according to R and t.

[0087] Because in the embodiment of the present invention, after the electronic device acquires the point cloud image, each first pixel in the point cloud image is clustered according to the preset first distance threshold, and then for each cluster, according to the length and width of the minimum circumscribed rectangle of the cluster, it is determined whether the cluster is a cluster corresponding to the moving object, and if so, the first pixel of the cluster is filtered out. Thus, the feature points of the moving object are filtered out, and then the point cloud registration is performed based on the point cloud image after the first pixel is filtered out. Because the unstable feature points of the moving object are filtered out, when the point cloud registration is performed based on the point cloud image after the first pixel is filtered out, the determined rotation matrix and translation matrix are more accurate, thereby making the point cloud registration more accurate.

[0088] Embodiment 2:

[0089] In order to make it more accurate to judge whether the minimum circumscribed rectangular area is the area corresponding to the moving object, based on the above embodiments, in an embodiment of the present invention, judging whether the minimum circumscribed rectangular area is the area corresponding to the moving object according to the length and width of the minimum circumscribed rectangular area includes:

[0090] Determine whether a first ratio of the length to the width of the minimum circumscribed rectangular area is within a preset first range; or determine whether a second ratio of the width to the length of the minimum circumscribed rectangular area is within a preset second range.

[0091] After the electronic device determines each minimum bounding rectangular area, for each minimum bounding rectangular area, the length and width of the minimum bounding rectangular area are determined, a first ratio of the length to the width of the minimum bounding rectangular area is calculated, and whether the minimum bounding rectangular area is the area corresponding to the moving object is determined according to the first ratio. The electronic device stores a preset first range, and the preset first range is determined according to a predetermined reference length and reference width of the minimum bounding rectangular area of ​​the moving object, that is, the electronic device obtains the reference length and reference width of the minimum bounding rectangular area of ​​the moving object in advance, calculates the ratio of the reference length and the reference width, and increases or decreases the ratio by a smaller parameter value to obtain the preset first range. The electronic device determines whether the first ratio of the length to the width of the minimum bounding rectangular area is within the preset first range, and if so, filters out the first pixel point in the minimum bounding rectangular area, and if not, retains the first pixel point in the minimum bounding rectangular area.

[0092] Alternatively, after the electronic device determines each minimum bounding rectangular area, for each minimum bounding rectangular area, it determines the length and width of the minimum bounding rectangular area, calculates the second ratio of the width to the length of the minimum bounding rectangular area, and determines whether the minimum bounding rectangular area is the area corresponding to the moving object based on the second ratio. The electronic device stores a preset second range, which is determined based on a predetermined reference length and reference width of the minimum bounding rectangular area of ​​the moving object, that is, the electronic device obtains the reference length and reference width of the minimum bounding rectangular area of ​​the moving object in advance, calculates the ratio of the reference width to the reference length, and increases or decreases the ratio by a smaller parameter value to obtain the preset second range. The electronic device determines whether the second ratio of the width to the length of the minimum bounding rectangular area is within the preset second range, and if so, filters out the first pixel point in the minimum bounding rectangular area, and if not, retains the first pixel point in the minimum bounding rectangular area.

[0093] In the embodiment of the present invention, it is determined whether the first ratio of the length to the width of the minimum circumscribed rectangular area is within a preset first range; or it is determined whether the second ratio of the width to the length of the minimum circumscribed rectangular area is within a preset second range. To determine whether the minimum circumscribed rectangular area is the area corresponding to the moving object, it is more accurate to determine whether the minimum circumscribed rectangular area is the area corresponding to the moving object.

[0094] Embodiment 3:

[0095] When performing point cloud registration on a point cloud image, point cloud registration may be performed based on each edge point and plane point in the point cloud image. In order to accurately determine each edge point and plane point in the point cloud image, based on the above embodiments, in an embodiment of the present invention, after retaining the first pixel point in the minimum circumscribed rectangular area, before performing point cloud registration based on the point cloud image after filtering out the first pixel point, the method further includes:

[0096] For each first pixel point in the point cloud image, determine each second pixel point in a horizontal preset neighborhood including the first pixel point, determine the spatial distances from the first pixel point and each second pixel point to the laser sensor respectively, and calculate the absolute value of the difference between the spatial distance from the first pixel point to the laser sensor and the spatial distance from each second pixel point to the laser sensor respectively; determine the curvature of the first pixel point according to the sum of each absolute value;

[0097] Sort each of the first pixel points in descending order of curvature, select a preset first number of first pixel points from front to back as edge points in the point cloud image, and select a preset second number of first pixel points from back to front as plane points in the point cloud image;

[0098] The performing point cloud registration based on the point cloud image after filtering out the first pixel point comprises:

[0099] Point cloud registration is performed based on each edge point and each plane point in the point cloud image after filtering out the first pixel point.

[0100] The electronic device determines each second pixel point in a horizontal preset neighborhood including each first pixel point retained in the point cloud image. Preferably, each second pixel point can be determined in a horizontal preset neighborhood with the first pixel point as the center. For example, the horizontal preset neighborhood includes 11 pixel points, where the center pixel point is the first pixel point and there are 5 second pixel points on both sides of the first pixel point. According to the formula c=‖∑ j∈N,j≠i (r j -r i )‖, determine the curvature of the first pixel point, where N is the curvature of the first pixel point p i The total number of second pixel points selected on the left and right sides of the same row, c is the curvature of the first pixel point, r i Indicates the first pixel p i Spatial distance to the sensor, r jIndicates the spatial distance from each second pixel to the sensor. Specifically, the electronic device determines the spatial distance from the first pixel to the laser sensor and the spatial distance from each second pixel to the laser sensor, and calculates the absolute value of the difference between the spatial distance from the first pixel to the laser sensor and the spatial distance from each second pixel to the laser sensor, and sums each absolute value to obtain the curvature of the first pixel.

[0101] After determining the curvature of each first pixel point retained in the point cloud image, a preset first number of first pixel points are selected from front to back in descending order of curvature as edge points in the point cloud image, and a preset second number of first pixel points are selected from back to front as plane points in the point cloud image. The preset first number and the preset second number may be the same or different.

[0102] After each edge point and each plane point in the point cloud image is determined, point cloud registration is performed based on each edge point and each plane point in the point cloud image.

[0103] In the embodiment of the present invention, each edge point and each plane point in the point cloud image is determined according to the curvature of each first pixel point retained, and then the point cloud image is registered according to each edge point and each plane point, making the point cloud registration more accurate.

[0104] Embodiment 4:

[0105] In order to make each determined edge point and each plane point evenly distributed in the point cloud image, thereby further making the point cloud registration more accurate, on the basis of the above embodiments, in an embodiment of the present invention, the step of sorting each first pixel point in descending order of curvature, selecting a preset first number of first pixel points from front to back as edge points in the point cloud image, and selecting a preset second number of first pixel points from back to front as plane points in the point cloud image includes:

[0106] For the first pixel points of each row in the point cloud image, the first pixel points of the row are sorted in descending order of curvature, and a preset third number of first pixel points are selected from front to back as edge points in the point cloud image, and a preset fourth number of first pixel points are selected from back to front as plane points in the point cloud image.

[0107] In order to make each determined edge point and each plane point evenly distributed in the point cloud image, for the first pixel point of each row retained in the point cloud image, a preset third number of first pixel points may be selected from front to back in descending order of curvature as edge points in the point cloud image, and a preset fourth number of first pixel points may be selected from back to front as plane points in the point cloud image. The preset third number and the preset fourth number may be the same or different.

[0108] In the embodiment of the present invention, for the first pixel point of each row retained in the point cloud image, each edge point and each plane point is determined in the first pixel point of the row, so that each edge point and each plane point in the point cloud image is evenly distributed, further making the point cloud registration more accurate.

[0109] Embodiment 5:

[0110] In order to make each determined edge point and each plane point evenly distributed in the point cloud image, thereby further making the point cloud registration more accurate, on the basis of the above embodiments, in an embodiment of the present invention, for the first pixel points of each row in the point cloud image, the first pixel points of the row are sorted in descending order of curvature, a preset third number of first pixel points are selected from front to back as edge points in the point cloud image, and a preset fourth number of first pixel points are selected from back to front as plane points in the point cloud image, including:

[0111] The first pixel points of each row in the point cloud image are divided into a preset fifth number of groups, and for the first pixel points of each group, the first pixel points of the group are sorted in descending order of curvature, and a preset sixth number of first pixel points are selected from front to back as edge points in the point cloud image, and a preset seventh number of first pixel points are selected from back to front as plane points in the point cloud image.

[0112] In an embodiment of the present invention, the first pixel points of each row retained in the point cloud image are divided into a preset fifth number of groups, for example, 6 groups, 7 groups, etc. Then, for the first pixel points of each group in the point cloud image, a preset sixth number of first pixel points are selected from front to back in the order of curvature from large to small as edge points in the point cloud image, and a preset seventh number of first pixel points are selected from back to front as plane points in the point cloud image. The preset sixth number and the preset seventh number may be the same or different.

[0113] Because in the embodiment of the present invention, the first pixel points of each row in the point cloud image are divided into a preset fifth number of groups, for the first pixel points of each group, each edge point and each plane point are determined in the first pixel points of the group, so that each edge point and each plane point in the point cloud image is evenly distributed, thereby further making the point cloud registration more accurate.

[0114] Embodiment 6:

[0115] There may be unstable pixels in each determined edge point and plane point. In order to filter out these unstable pixels, based on the above embodiments, in an embodiment of the present invention, after determining each edge point and plane point in the point cloud image, before performing point cloud registration based on each edge point and each plane point in the point cloud image after filtering out the first pixel, the method further includes:

[0116] According to the spatial coordinate information of each edge point and each plane point, the spatial distance from each edge point and each plane point to the laser sensor is determined, and the edge points and plane points whose spatial distance is greater than a preset second distance threshold are filtered out.

[0117] The electronic device knows the spatial coordinate information of the laser sensor. For each edge point and each plane point, the spatial distance from the point to the laser sensor can be determined based on the spatial coordinate information of the point and the spatial coordinate information of the laser sensor. The electronic device stores a preset second distance threshold. For each edge point and each plane point, it is determined whether the spatial distance from the point to the laser sensor is greater than the preset second distance threshold. If so, the point is filtered out.

[0118] Because the accuracy of edge points and plane points that are far away from the laser sensor cannot be guaranteed, these edge points and plane points that are far away from the laser sensor are unstable points. In the embodiment of the present invention, these unstable points are filtered out, so that each retained edge point and each plane point is more accurate, which makes the point cloud registration based on each retained edge point and each plane point more accurate.

[0119] Embodiment 7:

[0120] In order to further make the determined plane points more accurate, on the basis of the above embodiments, in an embodiment of the present invention, after filtering out edge points and plane points whose spatial distance is greater than a preset second distance threshold, before performing point cloud registration based on each edge point and each plane point in the point cloud image after filtering out the first pixel point, the method further includes:

[0121] For each retained plane point, determine a third pixel point in the point cloud image that is located in the same column and adjacent to the plane point, and judge whether the plane point and the third pixel point satisfy the first formula arctan(dz,sqrt(dx*dx+dy*dy))<θ; if yes, retain the plane point, if not, filter out the plane point;

[0122] In the formula, dz=|z1-z2|, dx=x1-x2, dy=y1-y2, θ is a preset angle value; the spatial coordinate information of the plane point is (x1, y1, z1), and the spatial coordinate information of the third pixel point is (x2, y2, z2).

[0123] The plane points in the point cloud image should be points on the ground. Based on this consideration, the determined plane points are screened again. For each retained plane point, it is determined whether the plane point is a pixel point on the ground. If so, the plane point is retained, otherwise the plane point is filtered out.

[0124] Specifically, the process of determining whether the plane point is a pixel point on the ground is as follows:

[0125] For each retained plane point, determine the third pixel point in the point cloud image that is in the same column and adjacent to the plane point, wherein the third pixel point can be located above the plane point or below the plane point. Determine whether the plane point and the third pixel point satisfy the first formula arctan(dz,sqrt(dx*dx+dy*dy))<θ; if yes, retain the plane point, if not, filter out the plane point; wherein dz=|z1-z2|, dx=x1-x2, dy=y1-y2, θ is the preset angle value; the spatial coordinate information of the plane point is (x1, y1, z1), and the spatial coordinate information of the third pixel point is (x2, y2, z2). The preset angle value can be 10°, for example.

[0126] Since in the embodiment of the present invention, the plane points that are not points on the ground are further filtered out, the retained plane points are more accurate.

[0127] Embodiment 8:

[0128] In order to make the point cloud registration more accurate, based on the above embodiments, in an embodiment of the present invention, the point cloud registration based on each edge point and each plane point in the point cloud image after filtering out the first pixel point includes:

[0129] For each edge point in the current frame point cloud image, two fourth pixel points corresponding to the edge point in the previous frame point cloud image are determined according to the spatial distance, and the spatial distance of the spatial straight line formed by the edge point and the two fourth pixel points is determined; wherein the two fourth pixel points are the edge points in the previous frame point cloud image;

[0130] For each plane point in the current frame point cloud image, three fifth pixel points corresponding to the plane point in the previous frame point cloud image are determined according to the spatial distance, and the spatial distance between the plane point and the spatial plane formed by the three fifth pixel points is determined; wherein the three fifth pixel points are the plane points in the previous frame point cloud image;

[0131] According to the spatial distance from each edge point to the corresponding spatial straight line and the spatial distance from each plane point to the corresponding spatial plane, a rotation matrix and a translation matrix are determined; and point cloud registration is performed based on the rotation matrix and the translation matrix.

[0132] In an embodiment of the present invention, the electronic device determines, for each edge point in the current frame point cloud image, two fourth pixel points corresponding to the edge point based on the spatial coordinate information of the edge point and the spatial coordinate information of each edge point in the previous frame point cloud image. Among them, two edge points in the previous frame image that are closest to the edge point in spatial distance can be determined as the corresponding two fourth pixel points. The two fourth pixel points are connected to form a spatial straight line, and the spatial distance between the edge point and the spatial straight line formed by the two fourth pixel points is determined.

[0133] The electronic device determines, for each plane point in the current frame point cloud image, three fifth pixel points corresponding to the plane point according to the spatial coordinate information of the plane point and the spatial coordinate information of each plane point in the previous frame point cloud image. Among them, the three plane points in the previous frame image that are closest to the plane point in spatial distance can be determined as the corresponding three fifth pixel points. The three fifth pixel points constitute a spatial plane, and the spatial distance between the plane point and the spatial plane constituted by the three fifth pixel points is determined.

[0134] According to the spatial distance from each edge point to the corresponding spatial straight line and the spatial distance from each plane point to the corresponding spatial plane, a rotation matrix R0 and a translation matrix t0 are determined; and point cloud registration is performed based on the rotation matrix and the translation matrix.

[0135] Among them, according to the spatial distance from each edge point to the corresponding spatial straight line and the spatial distance from each plane point to the corresponding spatial plane, an initial pose R0, t0 between the current frame and the previous frame is obtained by minimizing the two spatial distances. The specific steps are as follows:

[0136] Assume there is an edge point in the current frame and a plane point in represents the i-th edge point in the k-th frame of the current frame, and the superscript b represents the edge point. It represents the jth plane point in the kth frame of the current frame, and the superscript p represents the plane point.

[0137] In the previous frame k-1, the edge point The two points that best match and With plane point The three best matching points are and

[0138] Assuming that the coordinate transformation from the current frame point cloud image to the previous frame point cloud image is R0, t0, then for the edge point in the current frame and plane points Their coordinates in the previous frame coordinate system are:

[0139]

[0140]

[0141] in They are the spatial coordinates of the edge points and plane points in the coordinate system of the previous point cloud image.

[0142] Calculate the distance from the i-th edge point to the corresponding straight line respectively The distance from the jth plane point to the corresponding plane

[0143]

[0144]

[0145] Assume that the set of all edge points and plane points in the current frame is P k , then there is the following functional relationship:

[0146] f(P k ,R0,t0)=d;

[0147] Among them, each row in f contains edge points and plane points, and d contains the distance from the point to the corresponding spatial line or spatial plane. In this way, the relationship between the spatial distance d between the edge point and plane point to the spatial line and spatial plane formed by the corresponding matching point and R0,t0 is established.

[0148] By using the nonlinear least squares method to minimize these spatial distances d, we can find the rotation matrix R0 and the translation matrix t0.

[0149] The rotation matrix and the translation matrix determined by the solution provided by the embodiment of the present invention are more accurate, thereby making the point cloud registration based on the rotation matrix and the translation matrix more accurate.

[0150] Embodiment 9:

[0151] In order to make the point cloud registration more accurate, based on the above embodiments, in an embodiment of the present invention, for each edge point in the current frame point cloud image, determining two fourth pixel points corresponding to the edge point in the previous frame point cloud image according to the spatial distance includes:

[0152] For each edge point in the current frame point cloud image, determine a preset eighth number of sixth pixel points in the previous frame point cloud image that are closest to the edge point in spatial distance, and select two sixth pixel points with the smallest difference in intensity value with the edge point as two fourth pixel points corresponding to the edge point;

[0153] The step of determining, for each plane point in the current frame point cloud image, three fifth pixel points corresponding to the plane point in the previous frame point cloud image according to the spatial distance comprises:

[0154] For each plane point in the current frame point cloud image, determine a preset ninth number of seventh pixel points in the previous frame point cloud image that are closest to the plane point in spatial distance, and select three seventh pixel points with the smallest difference in intensity value with the plane point as the three fifth pixel points corresponding to the plane point.

[0155] In an embodiment of the present invention, in order to make the point cloud registration more accurate, on the basis of determining the two fourth pixel points corresponding to the edge point in the previous frame of the point cloud image according to the spatial distance, and determining the three fifth pixel points corresponding to the plane point in the previous frame of the point cloud image according to the spatial distance, a constraint condition of the pixel intensity value is added. It should be noted that in the process of scanning each point cloud sequence obtained by the laser sensor during movement, for each point in the point cloud, the laser sensor will receive a signal reflected back by the point after emitting a light beam, and use the intensity value of the signal as the intensity value of the point. After mapping the point cloud into a point cloud image, the intensity value of each pixel in the point cloud image is the intensity value of the point in the point cloud corresponding to the pixel.

[0156] For the current frame S k Each edge point in the previous frame S k-1 Find the two points corresponding to the edge points of the current frame S to form a line, narrow the matching range, and speed up the matching speed. k Each edge point in the previous frame S k-1 In addition to the spatial distance constraint, the strategy of finding the two corresponding points in the edge points also adds the point intensity value constraint. Only when the spatial distance between the two points is close and the intensity value difference is not large, the two points are considered to be the most matched. Similarly, for each plane point, according to the spatial distance constraint and the intensity value constraint, the three points that best match it are found in the plane points of the previous frame to form a face.

[0157] For each edge point in the current frame point cloud image, when determining the two fourth pixel points corresponding to the edge point, first determine a preset eighth number of sixth pixel points in the previous frame point cloud image that are closest to the edge point in spatial distance, wherein the preset eighth number is greater than 2, for example, it can be 4, 6, 7, etc. Then obtain the intensity values ​​corresponding to the preset eighth number of sixth pixel points, and select the two sixth pixel points with the smallest difference in intensity value with the edge point as the two fourth pixel points corresponding to the edge point.

[0158] For each plane point in the current frame point cloud image, when determining the three fifth pixel points corresponding to the plane point, first determine a preset ninth number of seventh pixel points in the previous frame point cloud image that are closest to the plane point in spatial distance, wherein the preset ninth number is greater than 3, for example, it may be 5, 6, 7, etc. Then obtain the intensity values ​​corresponding to the preset ninth number of seventh pixel points, and select the three seventh pixel points with the smallest difference in intensity value with the plane point as the three fifth pixel points corresponding to the plane point.

[0159] Since in the embodiment of the present invention, two fourth pixel points corresponding to each edge point and three fifth pixel points corresponding to each plane point are determined based on considerations of spatial distance and intensity value, subsequent point cloud registration is more accurate.

[0160] Embodiment 10:

[0161] After determining the rotation matrix and the translation matrix, and before performing point cloud registration based on the rotation matrix and the translation matrix, the method further includes:

[0162] Determine a local map according to a point cloud image before a current frame point cloud image;

[0163] The current frame point cloud image is registered with the local map according to the rotation matrix and the translation matrix, and the rotation matrix and the translation matrix are updated according to the registration result.

[0164] The IMLS model may be used to align the current frame point cloud image with the local map.

[0165] In the embodiment of the present invention, an implicit moving least square method is used to describe a local map M k The surface implied in is expressed as It represents the distance from point p to the implicit surface. The points corresponding to its zero solution constitute the implicit surface. The local map is composed of n point cloud images before the current frame, for example, n = 30; where p i It is M k The point in Yes i The normal vector at . Represents the weight of the distance. From this formula, we can find that when p i The farther away from x, the greater the i (x) is smaller, and when the distance is 3h, W i (x) < 0.0002, so in order to speed up the calculation, only the points in the sphere with the closest point to point p as the center and a radius of 3h in the local map are considered as p i Go calculate.

[0166] Set the current frame Sk The edge points and plane points in the local map M k Registration, by minimizing the distance from the feature point to the implicit surface to obtain the accurate position and posture of the current frame, that is, to obtain the accurate rotation matrix and translation matrix to improve the registration accuracy;

[0167]

[0168] Among them, m i Indicated by M k Middle distance x i The point cloud contained in a spatial cube with the nearest point as the center.

[0169] According to the calculated R0 and t0, using the formula S k ′={x i ′=R0x i +t0,x i ∈S k} for the current frame S k Perform coordinate transformation and obtain S k ′;

[0170] For S k Every point x in ′ i ′, using the formula Map it onto the implicit surface in the local map; M k Middle distance x i ′, which can also be well approximated as the normal vector corresponding to the nearest point in y i The normal vector at ′;

[0171] Got S k ′ corresponds to the mapping point set Y k ′, and then by minimizing the formula Get S k ' to local map M k The posture transformation of

[0172] For the formula The least square method can be used for iterative solution. Finally, the current frame S is obtained. k Go to local map M k The pose is transformed into R k =R·R0,t k =R·t0+t.

[0173] In the embodiment of the present invention, the local map is determined based on the point cloud image before the current frame point cloud image; the current frame point cloud image is registered with the local map based on the rotation matrix and the translation matrix, and the rotation matrix and the translation matrix are updated based on the registration result. Thus, the updated rotation matrix and the translation matrix are more accurate, that is, the point cloud registration is more accurate.

[0174] Embodiment 11:

[0175] Determining the local map according to the point cloud image before the current frame point cloud image includes:

[0176] For each frame of point cloud image before the current frame of point cloud image, determine the spatial distance between the laser sensor corresponding to the frame of point cloud image and the laser sensor corresponding to the previous frame of point cloud image, and judge whether the spatial distance is greater than a preset third distance threshold, and if so, determine that the frame of point cloud image is a key frame point cloud image;

[0177] A local map is determined based on each keyframe point cloud image.

[0178] In an embodiment of the present invention, the laser sensor scans and obtains each point cloud sequence during the movement process, and maps it into each frame of point cloud image. The spatial coordinate information of the laser sensor during the movement process is known, so the spatial coordinate information of the laser sensor corresponding to each frame of point cloud image is known. Therefore, for each frame of point cloud image before the current frame of point cloud image, the spatial distance between the laser sensor corresponding to the frame of point cloud image and the laser sensor corresponding to the previous frame of point cloud image can be calculated. The spatial distance is the relative movement distance between the current frame and the previous frame. When the relative movement distance is greater than the preset third distance threshold, the current frame is regarded as a key frame and added to the local map. In addition, a threshold value for the number of point cloud images constituting the local map can be set. For example, the threshold value is 30. If the key frame is added to the local map and it is found that the number of point cloud images constituting the local map exceeds the threshold value, the key frame with the earliest collection time in the local map is removed;

[0179] Δt=‖t k -t k-1 ‖<ε;

[0180] Among them, ‖t k -t k-1 ‖ represents the spatial distance between the laser sensor corresponding to the current frame point cloud image and the laser sensor corresponding to the previous frame point cloud image, and ε is a preset third distance threshold, and the value is, for example, 0.3.

[0181] Among them, the process of splicing each key frame point cloud image into a local map belongs to the existing technology, and the process will not be described in detail here.

[0182] Figure 2 The point cloud registration flow chart provided in the embodiment of the present invention includes the following steps:

[0183] S201: Acquire each frame of point cloud image for point cloud registration.

[0184] S202: For each frame of the point cloud image, clustering processing is performed on each first pixel point in the point cloud image according to spatial coordinate information of each first pixel point in the point cloud image and a preset first distance threshold.

[0185] S203: Determine the minimum enclosing rectangular area of ​​each cluster, and for each minimum enclosing rectangular area, determine whether a first ratio of the length to the width of the minimum enclosing rectangular area is within a preset first range, if yes, filter out the first pixel in the minimum enclosing rectangular area, if no, retain the first pixel in the minimum enclosing rectangular area; or determine whether a second ratio of the width to the length of the minimum enclosing rectangular area is within a preset second range, if yes, filter out the first pixel in the minimum enclosing rectangular area, if no, retain the first pixel in the minimum enclosing rectangular area.

[0186] S204: For each first pixel point in the point cloud image, determine the curvature of the first pixel point; and determine each edge point and each plane point in the point cloud image according to the curvature of each first pixel point.

[0187] S205: For each edge point in the current frame point cloud image, determine the two fourth pixel points corresponding to the edge point in the previous frame point cloud image, and determine the spatial distance between the edge point and the spatial straight line formed by the two fourth pixel points; for each plane point in the current frame point cloud image, determine the three fifth pixel points corresponding to the plane point in the previous frame point cloud image, and determine the spatial distance between the plane point and the spatial plane formed by the three fifth pixel points.

[0188] S206: Determine a rotation matrix and a translation matrix according to the spatial distance from each edge point to the corresponding spatial straight line and the spatial distance from each plane point to the corresponding spatial plane.

[0189] S207: Determine a local map according to a point cloud image before the current frame point cloud image; align the current frame point cloud image with the local map according to the rotation matrix and the translation matrix, and update the rotation matrix and the translation matrix according to the alignment result.

[0190] S208: Perform point cloud registration based on the updated rotation matrix and translation matrix.

[0191] The embodiments of the present invention have the following beneficial effects:

[0192] The method of the embodiment of the present invention removes the point cloud of moving objects by clustering before extracting feature points (edge ​​points and plane points), thereby avoiding the influence of moving objects on feature matching. At the same time, the extracted feature points are distance screened to remove unstable point clouds at a distance. Moreover, in the feature point matching stage, distance constraints are used to strengthen intensity constraints, thereby improving the accuracy of feature point matching and reducing the possibility of mismatching. In the process of matching with the local map, the current frame is aligned with the surface implicit in the local map, and the geometric information of the point cloud is utilized to improve the alignment result.

[0193] The embodiment of the present invention is divided into two stages: coarse registration and fine registration. Preliminary registration is performed by extracting features between adjacent frames, and then the result of the preliminary registration is used to align the current frame with the local map to optimize the registration result. Since the initial value is provided, it is not easy to fall into the local minimum during the iterative solution of the fine registration, and the optimal matching result can be obtained.

[0194] The embodiment of the present invention provides an iterative initial value, which can prevent the alignment result from falling into a local minimum. When calculating the distance from a point to an implicit surface, the implicit surface is composed of points in the corresponding cube space rather than points in the entire local map. This can make full use of the point cloud data in the local map and improve the accuracy of pose estimation.

[0195] Embodiment 12:

[0196] Figure 3 A schematic diagram of the structure of a point cloud registration device provided in an embodiment of the present invention, wherein the device comprises:

[0197] An acquisition module 31 is used to acquire each frame of point cloud image for point cloud registration;

[0198] A clustering processing module 32, configured to perform clustering processing on each first pixel point in each frame of the point cloud image according to the spatial coordinate information of each first pixel point in the point cloud image and a preset first distance threshold;

[0199] A first filtering module 33 is used to determine the minimum bounding rectangle area of ​​each cluster, and for each minimum bounding rectangle area, determine whether the minimum bounding rectangle area is an area corresponding to a moving object according to the length and width of the minimum bounding rectangle area, and if yes, filter out the first pixel point in the minimum bounding rectangle area, and if no, retain the first pixel point in the minimum bounding rectangle area;

[0200] The registration module 34 is used to perform point cloud registration based on the point cloud image after filtering out the first pixel point.

[0201] The first filtering module 33 is specifically used to determine whether a first ratio of the length to the width of the minimum circumscribed rectangular area is within a preset first range; or determine whether a second ratio of the width to the length of the minimum circumscribed rectangular area is within a preset second range.

[0202] The device also includes:

[0203] A determination module 35 is used to determine, for each first pixel point in the point cloud image, each second pixel point in a preset horizontal neighborhood including the first pixel point, determine the spatial distances of the first pixel point and each second pixel point to the laser sensor, respectively, and calculate the absolute values ​​of the differences between the spatial distances of the first pixel point to the laser sensor and the spatial distances of each second pixel point to the laser sensor; determine the curvature of the first pixel point according to the sum of each absolute value; sort each first pixel point in descending order of curvature, select a preset first number of first pixel points from front to back as edge points in the point cloud image, and select a preset second number of first pixel points from back to front as plane points in the point cloud image;

[0204] The registration module 34 is specifically configured to perform point cloud registration based on each edge point and each plane point in the point cloud image after filtering out the first pixel point.

[0205] The determination module 35 is specifically used to sort the first pixel points of each row in the point cloud image in descending order of curvature, select a preset third number of first pixel points from front to back as edge points in the point cloud image, and select a preset fourth number of first pixel points from back to front as plane points in the point cloud image.

[0206] The determination module 35 is specifically used to divide the first pixel points of each row in the point cloud image into a preset fifth number of groups, sort the first pixel points of each group in descending order of curvature, select a preset sixth number of first pixel points from front to back as edge points in the point cloud image, and select a preset seventh number of first pixel points from back to front as plane points in the point cloud image.

[0207] The device also includes:

[0208] The second filtering module 36 is used to determine the spatial distance from each edge point and each plane point to the laser sensor according to the spatial coordinate information of each edge point and each plane point, and filter out edge points and plane points whose spatial distance is greater than a preset second distance threshold.

[0209] The device also includes:

[0210] The third filtering module 37 is used to determine, for each retained plane point, a third pixel point in the point cloud image that is located in the same column and adjacent to the plane point, and judge whether the plane point and the third pixel point satisfy the first formula arctan(dz,sqrt(dx*dx+dy*dy))<θ; if yes, retain the plane point, if not, filter out the plane point; wherein dz=|z1-z2|, dx=x1-x2, dy=y1-y2, θ is a preset angle value; the spatial coordinate information of the plane point is (x1, y1, z1), and the spatial coordinate information of the third pixel point is (x2, y2, z2).

[0211] The registration module 34 is specifically used to determine, for each edge point in the current frame point cloud image, two fourth pixel points corresponding to the edge point in the previous frame point cloud image according to the spatial distance, and determine the spatial distance of the spatial straight line formed by the edge point and the two fourth pixel points; wherein the two fourth pixel points are the edge points in the previous frame point cloud image; for each plane point in the current frame point cloud image, three fifth pixel points corresponding to the plane point in the previous frame point cloud image according to the spatial distance, and determine the spatial distance of the plane point and the spatial plane formed by the three fifth pixel points; wherein the three fifth pixel points are the plane points in the previous frame point cloud image; determine the rotation matrix and the translation matrix according to the spatial distance from each edge point to the corresponding spatial straight line and the spatial distance from each plane point to the corresponding spatial plane; and perform point cloud registration based on the rotation matrix and the translation matrix.

[0212] The registration module 34 is specifically configured to determine, for each edge point in the current frame point cloud image, a preset eighth number of sixth pixel points in the previous frame point cloud image that are closest to the edge point in spatial distance, and select two sixth pixel points with the smallest difference in intensity value with the edge point as two fourth pixel points corresponding to the edge point;

[0213] The registration module 34 is specifically used to determine, for each plane point in the current frame point cloud image, a preset ninth number of seventh pixel points that are closest to the plane point in the previous frame point cloud image in spatial distance, and select three seventh pixel points with the smallest difference in intensity value with the plane point as three fifth pixel points corresponding to the plane point.

[0214] The device also includes:

[0215] The updating module 38 is used to determine the local map based on the point cloud image before the current frame point cloud image; align the current frame point cloud image with the local map according to the rotation matrix and the translation matrix, and update the rotation matrix and the translation matrix according to the alignment result.

[0216] The updating module 38 is specifically used to determine, for each frame of point cloud image before the current frame of point cloud image, the spatial distance between the laser sensor corresponding to the frame of point cloud image and the laser sensor corresponding to the previous frame of point cloud image, and judge whether the spatial distance is greater than a preset third distance threshold, and if so, determine that the frame of point cloud image is a key frame of point cloud image;

[0217] A local map is determined based on each keyframe point cloud image.

[0218] Embodiment 13:

[0219] Based on the above embodiments, an electronic device is also provided in an embodiment of the present invention, such as Figure 4 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;

[0220] The memory 303 stores a computer program. When the program is executed by the processor 301, the processor 301 performs the following steps:

[0221] Obtain each frame of point cloud image for point cloud registration;

[0222] For each frame of the point cloud image, clustering processing is performed on each first pixel point in the point cloud image according to spatial coordinate information of each first pixel point in the point cloud image and a preset first distance threshold;

[0223] Determine the minimum bounding rectangle area of ​​each cluster, and for each minimum bounding rectangle area, determine whether the minimum bounding rectangle area is the area corresponding to the moving object according to the length and width of the minimum bounding rectangle area, if yes, filter out the first pixel point in the minimum bounding rectangle area, if no, retain the first pixel point in the minimum bounding rectangle area;

[0224] Point cloud registration is performed based on the point cloud image after filtering out the first pixel.

[0225] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present invention. Since the principle of solving the problem by the above electronic device is similar to that of the point cloud registration method, the implementation of the above electronic device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0226] The electronic device provided in the embodiment of the present invention may specifically be a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (PDA), a network side device, etc.

[0227] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

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

[0229] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0230] The above-mentioned processor can be a general-purpose processor, including a central processing unit, a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0231] In the embodiment of the present invention, when the processor executes the program stored in the memory, each frame of the point cloud image for point cloud registration is obtained; for each frame of the point cloud image, each first pixel in the point cloud image is clustered according to the spatial coordinate information of the first pixel and a preset first distance threshold; the minimum bounding rectangle area of ​​each cluster is determined, and for each minimum bounding rectangle area, whether the minimum bounding rectangle area is the area corresponding to the moving object is determined according to the length and width of the minimum bounding rectangle area, if yes, the first pixel in the minimum bounding rectangle area is filtered out, if not, the first pixel in the minimum bounding rectangle area is retained; and point cloud registration is performed based on the point cloud image after filtering out the first pixel.

[0232] Because in the embodiment of the present invention, after the electronic device acquires the point cloud image, each first pixel in the point cloud image is clustered according to the preset first distance threshold, and then for each cluster, according to the length and width of the minimum circumscribed rectangle of the cluster, it is determined whether the cluster is a cluster corresponding to the moving object, and if so, the first pixel of the cluster is filtered out. Thus, the feature points of the moving object are filtered out, and then the point cloud registration is performed based on the point cloud image after the first pixel is filtered out. Because the unstable feature points of the moving object are filtered out, when the point cloud registration is performed based on the point cloud image after the first pixel is filtered out, the determined rotation matrix and translation matrix are more accurate, thereby making the point cloud registration more accurate.

[0233] Embodiment 14:

[0234] On the basis of the above embodiments, an embodiment of the present invention further provides a computer storage readable storage medium, wherein the computer readable storage medium stores a computer program executable by an electronic device, and when the program is run on the electronic device, the electronic device implements the following steps when executing:

[0235] Acquire each frame of point cloud image for point cloud registration; for each frame of point cloud image, cluster each first pixel in the point cloud image according to the spatial coordinate information of each first pixel and a preset first distance threshold; determine the minimum bounding rectangle area of ​​each cluster, and for each minimum bounding rectangle area, judge whether the minimum bounding rectangle area is the area corresponding to the moving object according to the length and width of the minimum bounding rectangle area, if yes, filter out the first pixel in the minimum bounding rectangle area, if not, retain the first pixel in the minimum bounding rectangle area; perform point cloud registration based on the point cloud image after filtering out the first pixel.

[0236] Based on the same inventive concept, a computer-readable storage medium is also provided in an embodiment of the present invention. Since the principle of solving the problem when the processor executes the computer program stored on the above-mentioned computer-readable storage medium is similar to that of the point cloud registration method, the implementation of the computer program stored on the above-mentioned computer-readable storage medium by the processor can refer to the implementation of the method, and the repeated parts will not be repeated.

[0237] The above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in the electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc., optical storage such as CD, DVD, BD, HVD, etc., and semiconductor storage such as ROM, EPROM, EEPROM, non-volatile memory (NANDFLASH), solid-state drive (SSD), etc.

[0238] A computer program is stored in a computer-readable storage medium provided in an embodiment of the present invention. When the computer program is executed by a processor, it is implemented to obtain each frame of point cloud image for point cloud registration; for each frame of point cloud image, clustering processing is performed on each first pixel point in the point cloud image according to the spatial coordinate information of each first pixel point in the point cloud image and a preset first distance threshold; the minimum bounding rectangular area of ​​each cluster is determined, and for each minimum bounding rectangular area, according to the length and width of the minimum bounding rectangular area, it is judged whether the minimum bounding rectangular area is the area corresponding to the moving object, if so, filtering out the first pixel point in the minimum bounding rectangular area, if not, retaining the first pixel point in the minimum bounding rectangular area; and point cloud registration is performed based on the point cloud image after filtering out the first pixel point.

[0239] Because in the embodiment of the present invention, after the electronic device acquires the point cloud image, each first pixel in the point cloud image is clustered according to the preset first distance threshold, and then for each cluster, according to the length and width of the minimum circumscribed rectangle of the cluster, it is determined whether the cluster is a cluster corresponding to the moving object, and if so, the first pixel of the cluster is filtered out. Thus, the feature points of the moving object are filtered out, and then the point cloud registration is performed based on the point cloud image after the first pixel is filtered out. Because the unstable feature points of the moving object are filtered out, when the point cloud registration is performed based on the point cloud image after the first pixel is filtered out, the determined rotation matrix and translation matrix are more accurate, thereby making the point cloud registration more accurate.

[0240] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0241] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0242] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0243] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0244] 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.

Claims

1. A point cloud registration method, characterized in that: The method comprises: Obtain each frame of point cloud image for point cloud registration; For each frame of the point cloud image, clustering processing is performed on each first pixel point in the point cloud image according to spatial coordinate information of each first pixel point in the point cloud image and a preset first distance threshold; Determine the minimum bounding rectangle area of ​​each cluster, and for each minimum bounding rectangle area, determine whether the minimum bounding rectangle area is the area corresponding to the moving object according to the length and width of the minimum bounding rectangle area, if yes, filter out the first pixel point in the minimum bounding rectangle area, if not, retain the first pixel point in the minimum bounding rectangle area; wherein the moving object is determined according to the scene of point cloud registration; For each first pixel point retained in the point cloud image, determine each second pixel point in a horizontal preset neighborhood including the first pixel point, determine the spatial distances from the first pixel point and each second pixel point to the laser sensor respectively, and calculate the absolute value of the difference between the spatial distance from the first pixel point to the laser sensor and the spatial distance from each second pixel point to the laser sensor respectively; determine the curvature of the first pixel point according to the sum of each absolute value; Sort each of the first pixel points in descending order of curvature, select a preset first number of first pixel points from front to back as edge points in the point cloud image, and select a preset second number of first pixel points from back to front as plane points in the point cloud image; Point cloud registration is performed based on each edge point and each plane point in the point cloud image after filtering out the first pixel point.

2. The method according to claim 1, characterized in that The determining, based on the length and width of the minimum circumscribed rectangular area, whether the minimum circumscribed rectangular area is an area corresponding to the moving object comprises: Determine whether a first ratio of the length to the width of the minimum circumscribed rectangular area is within a preset first range; or determine whether a second ratio of the width to the length of the minimum circumscribed rectangular area is within a preset second range.

3. The method according to claim 1, characterized in that The step of sorting each of the first pixel points in descending order of curvature, selecting a preset first number of first pixel points from front to back as edge points in the point cloud image, and selecting a preset second number of first pixel points from back to front as plane points in the point cloud image comprises: For the first pixel points of each row in the point cloud image, the first pixel points of the row are sorted in descending order of curvature, and a preset third number of first pixel points are selected from front to back as edge points in the point cloud image, and a preset fourth number of first pixel points are selected from back to front as plane points in the point cloud image.

4. The method according to claim 3, characterized in that The step of sorting the first pixel points of each row in the point cloud image in descending order of curvature, selecting a preset third number of first pixel points from front to back as edge points in the point cloud image, and selecting a preset fourth number of first pixel points from back to front as plane points in the point cloud image comprises: The first pixel points of each row in the point cloud image are divided into a preset fifth number of groups, and for the first pixel points of each group, the first pixel points of the group are sorted in descending order of curvature, and a preset sixth number of first pixel points are selected from front to back as edge points in the point cloud image, and a preset seventh number of first pixel points are selected from back to front as plane points in the point cloud image.

5. The method according to any one of claims 1 to 4, characterized in that: After determining each edge point and each plane point in the point cloud image, and before performing point cloud registration based on each edge point and each plane point in the point cloud image after filtering out the first pixel point, the method further includes: According to the spatial coordinate information of each edge point and each plane point, the spatial distance from each edge point and each plane point to the laser sensor is determined, and the edge points and plane points whose spatial distance is greater than a preset second distance threshold are filtered out.

6. The method according to claim 5, characterized in that After filtering out edge points and plane points whose spatial distance is greater than a preset second distance threshold, and before performing point cloud registration based on each edge point and each plane point in the point cloud image after filtering out the first pixel point, the method further includes: For each retained plane point, determine a third pixel point in the point cloud image that is located in the same column and adjacent to the plane point, and judge whether the plane point and the third pixel point satisfy the first formula arctan(dz,sqrt(dx*dx+dy*dy))<θ; if yes, retain the plane point, if not, filter out the plane point; In the formula, dz=|z1-z2|, dx=x1-x2, dy=y1-y2, θ is a preset angle value; the spatial coordinate information of the plane point is (x1, y1, z1), and the spatial coordinate information of the third pixel point is (x2, y2, z2).

7. The method according to claim 1, characterized in that The point cloud registration based on each edge point and each plane point in the point cloud image after filtering out the first pixel point comprises: For each edge point in the current frame point cloud image, two fourth pixel points corresponding to the edge point in the previous frame point cloud image are determined according to the spatial distance, and the spatial distance of the spatial straight line formed by the edge point and the two fourth pixel points is determined; wherein the two fourth pixel points are the edge points in the previous frame point cloud image; For each plane point in the current frame point cloud image, three fifth pixel points corresponding to the plane point in the previous frame point cloud image are determined according to the spatial distance, and the spatial distance between the plane point and the spatial plane formed by the three fifth pixel points is determined; wherein the three fifth pixel points are the plane points in the previous frame point cloud image; According to the spatial distance from each edge point to the corresponding spatial straight line and the spatial distance from each plane point to the corresponding spatial plane, a rotation matrix and a translation matrix are determined; and point cloud registration is performed based on the rotation matrix and the translation matrix.

8. The method according to claim 7, characterized in that The step of determining, for each edge point in the current frame point cloud image, two fourth pixel points corresponding to the edge point in the previous frame point cloud image according to the spatial distance comprises: For each edge point in the current frame point cloud image, determine a preset eighth number of sixth pixel points in the previous frame point cloud image that are closest to the edge point in spatial distance, and select two sixth pixel points with the smallest difference in intensity value with the edge point as two fourth pixel points corresponding to the edge point; The step of determining, for each plane point in the current frame point cloud image, three fifth pixel points corresponding to the plane point in the previous frame point cloud image according to the spatial distance comprises: For each plane point in the current frame point cloud image, determine a preset ninth number of seventh pixel points in the previous frame point cloud image that are closest to the plane point in spatial distance, and select three seventh pixel points with the smallest difference in intensity value with the plane point as the three fifth pixel points corresponding to the plane point.

9. The method according to claim 7, characterized in that After determining the rotation matrix and the translation matrix, and before performing point cloud registration based on the rotation matrix and the translation matrix, the method further includes: Determine a local map according to a point cloud image before a current frame point cloud image; The current frame point cloud image is registered with the local map according to the rotation matrix and the translation matrix, and the rotation matrix and the translation matrix are updated according to the registration result.

10. The method according to claim 9, characterized in that Determining the local map according to the point cloud image before the current frame point cloud image includes: For each frame of point cloud image before the current frame of point cloud image, determine the spatial distance between the laser sensor corresponding to the frame of point cloud image and the laser sensor corresponding to the previous frame of point cloud image, and judge whether the spatial distance is greater than a preset third distance threshold, and if so, determine that the frame of point cloud image is a key frame point cloud image; A local map is determined based on each keyframe point cloud image.

11. A point cloud registration device, characterized in that: The device comprises: An acquisition module, used to acquire each frame of point cloud image for point cloud registration; A clustering processing module, configured to perform clustering processing on each first pixel point in each frame of the point cloud image according to the spatial coordinate information of each first pixel point in the point cloud image and a preset first distance threshold; The first filtering module is used to determine the minimum bounding rectangle area of ​​each cluster, and for each minimum bounding rectangle area, determine whether the minimum bounding rectangle area is the area corresponding to the moving object according to the length and width of the minimum bounding rectangle area, if yes, filter out the first pixel point in the minimum bounding rectangle area, if not, retain the first pixel point in the minimum bounding rectangle area; wherein the moving object is determined according to the scene of point cloud registration; The device also includes: A determination module is used to determine, for each first pixel point in the point cloud image, each second pixel point in a preset horizontal neighborhood including the first pixel point, determine the spatial distances of the first pixel point and each second pixel point to the laser sensor, respectively, and calculate the absolute values ​​of the differences between the spatial distances of the first pixel point to the laser sensor and the spatial distances of each second pixel point to the laser sensor; determine the curvature of the first pixel point according to the sum of each absolute value; sort each first pixel point in descending order of curvature, select a preset first number of first pixel points from front to back as edge points in the point cloud image, and select a preset second number of first pixel points from back to front as plane points in the point cloud image; The registration module is used to perform point cloud registration based on each edge point and each plane point in the point cloud image after filtering out the first pixel point.

12. The device according to claim 11, characterized in that The first filtering module is specifically used to determine whether a first ratio of the length to the width of the minimum circumscribed rectangular area is within a preset first range; or to determine whether a second ratio of the width to the length of the minimum circumscribed rectangular area is within a preset second range.

13. The device according to claim 12, characterized in that The determination module is specifically used to sort the first pixel points of each row in the point cloud image in descending order of curvature, select a preset third number of first pixel points from front to back as edge points in the point cloud image, and select a preset fourth number of first pixel points from back to front as plane points in the point cloud image.

14. The device according to claim 13, characterized in that The determination module is specifically used to divide the first pixel points of each row in the point cloud image into a preset fifth number of groups, sort the first pixel points of each group in order of curvature from large to small, select a preset sixth number of first pixel points from front to back as edge points in the point cloud image, and select a preset seventh number of first pixel points from back to front as plane points in the point cloud image.

15. The device according to any one of claims 12 to 14, characterized in that The device also includes: The second filtering module is used to determine the spatial distance from each edge point and each plane point to the laser sensor according to the spatial coordinate information of each edge point and each plane point, and filter out edge points and plane points whose spatial distance is greater than a preset second distance threshold.

16. The device according to claim 15, characterized in that The device also includes: The third filtering module is used to determine, for each retained plane point, a third pixel point in the point cloud image that is located in the same column and adjacent to the plane point, and judge whether the plane point and the third pixel point satisfy the first formula arctan(dz,sqrt(dx*dx+dy*dy))<θ; if yes, retain the plane point, if not, filter out the plane point; wherein dz=|z1-z2|, dx=x1-x2, dy=y1-y2, θ is a preset angle value; the spatial coordinate information of the plane point is (x1, y1, z1), and the spatial coordinate information of the third pixel point is (x2, y2, z2).

17. The device according to claim 12, characterized in that The registration module is specifically used to determine, for each edge point in the current frame point cloud image, two fourth pixel points corresponding to the edge point in the previous frame point cloud image according to the spatial distance, and determine the spatial distance of the spatial straight line formed by the edge point and the two fourth pixel points; wherein the two fourth pixel points are the edge points in the previous frame point cloud image; for each plane point in the current frame point cloud image, three fifth pixel points corresponding to the plane point in the previous frame point cloud image according to the spatial distance, and determine the spatial distance of the plane point and the spatial plane formed by the three fifth pixel points; wherein the three fifth pixel points are the plane points in the previous frame point cloud image; determine the rotation matrix and the translation matrix according to the spatial distance from each edge point to the corresponding spatial straight line and the spatial distance from each plane point to the corresponding spatial plane; and perform point cloud registration based on the rotation matrix and the translation matrix.

18. The device according to claim 17, characterized in that The registration module is specifically used to determine, for each edge point in the current frame point cloud image, a preset eighth number of sixth pixel points in the previous frame point cloud image that are closest to the edge point in space, and select two sixth pixel points with the smallest difference in intensity value with the edge point as two fourth pixel points corresponding to the edge point; The registration module is specifically used to determine, for each plane point in the current frame point cloud image, a preset ninth number of seventh pixel points in the previous frame point cloud image that are closest to the plane point in spatial distance, and select the three seventh pixel points with the smallest difference in intensity value with the plane point as the three fifth pixel points corresponding to the plane point.

19. The device according to claim 17, characterized in that The device also includes: The updating module is used to determine the local map according to the point cloud image before the current frame point cloud image; align the current frame point cloud image with the local map according to the rotation matrix and the translation matrix, and update the rotation matrix and the translation matrix according to the alignment result.

20. The device according to claim 19, characterized in that The updating module is specifically used to determine, for each frame of point cloud image before the current frame of point cloud image, the spatial distance between the laser sensor corresponding to the frame of point cloud image and the laser sensor corresponding to the previous frame of point cloud image, and judge whether the spatial distance is greater than a preset third distance threshold, and if so, determine that the frame of point cloud image is a key frame point cloud image; A local map is determined based on each keyframe point cloud image.

21. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 10 when executing a program stored in a memory.

22. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 10 are implemented.