Dynamic point cloud removal method, electronic equipment and storage medium
By splicing multi-frame point cloud data into an overall point cloud map and converting it into a depth image, calculating and removing dynamic pixels, the problem of slow removal of dynamic obstacles is solved, and the accuracy of removal and map generation is improved, thereby Improved positioning and path planning effects.
Patent Information
- Application Number
- CN202311295628.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-28
- Publication Date
- 2024-09-10
AI Technical Summary
The existing technology removes dynamic obstacles slowly during the real-time positioning and map construction process, resulting in inaccurate generated maps and affecting later positioning and path planning.
By acquiring multi-frame point cloud data, splicing it into an overall point cloud map, and converting it into a depth image of a preset size, the difference in the depth image is calculated to determine the dynamic pixels, and then the dynamic point cloud is removed, thereby improving the removal speed and accuracy. Spend.
The removal speed and accuracy of dynamic point clouds are improved, and the generated maps are more accurate, thereby improving later map-based positioning and path planning.
Smart Images

Figure CN118628692A
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular to a dynamic point cloud removal method, electronic device and storage medium. Background Art
[0002] In the process of real-time positioning and map building, dynamic obstacles such as moving vehicles or pedestrians are often encountered. Dynamic obstacles will produce "ghosts" in the final generated map, which will have an adverse effect on the subsequent map-based positioning or map-based path planning. Currently, in the process of real-time positioning and map building, dynamic obstacles can be filtered out by post-processing methods such as traversing the voxel occupancy grid to remove dynamic objects from the three-dimensional point cloud data. However, this post-processing method is slow to remove point clouds. Summary of the invention
[0003] In view of the above, it is necessary to provide a dynamic point cloud removal method, electronic device and storage medium, which can improve the removal speed of dynamic point clouds, improve the accuracy of dynamic point cloud removal, and at the same time, the map generated based on the first overall point cloud map after removing the dynamic point cloud is more accurate, and thus the subsequent map-based positioning or map-based path planning is more accurate.
[0004] A first aspect of the present application provides a method for removing dynamic point clouds, the method comprising: acquiring multiple frames of first point cloud data; splicing the multiple frames of the first point cloud data into a first overall point cloud map; converting the first point cloud data and the first overall point cloud map into a first depth image and a second depth image of preset sizes, respectively; determining dynamic pixel points in the second depth image based on the first depth image and the second depth image; and removing the dynamic point cloud in the first overall point cloud map based on the dynamic pixel points.
[0005] According to some embodiments of the present application, the first point cloud data of multiple frames are point cloud data in a local coordinate system, and the local coordinate system is the local coordinate system of the sensor that collects the first point cloud data of multiple frames; the first overall point cloud map is point cloud data in a global coordinate system, and the global coordinate system is a world coordinate system.
[0006] According to some embodiments of the present application, stitching together multiple frames of the first point cloud data into a first overall point cloud map includes: obtaining the corresponding posture data when the sensor collects each frame of the first point cloud data; converting each frame of the first point cloud data from the local coordinate system to the corresponding second point cloud data in the global coordinate system by multiplying each frame of the first point cloud data in the local coordinate system by the corresponding posture data, and retaining each frame of the first point cloud data; and stitching multiple frames of the second point cloud data into the first overall point cloud map in the global coordinate system.
[0007] According to some embodiments of the present application, the converting of the first point cloud data and the first overall point cloud map into a first depth image and a second depth image of preset sizes, respectively, includes: for each frame of the first point cloud data, converting the first overall point cloud map in the global coordinate system into a second overall point cloud map in the local coordinate system where the first point cloud data of the current frame is located; converting the first point cloud data of the current frame in the local coordinate system and the second overall point cloud map in the local coordinate system into a first depth image and a second depth image of preset sizes, respectively.
[0008] According to some embodiments of the present application, converting the first point cloud data of the current frame in the local coordinate system and the second overall point cloud map in the local coordinate system into a first depth image and a second depth image of a preset size respectively comprises: according to the formula The first point cloud data of the current frame in the local coordinate system and the second overall point cloud map in the local coordinate system are respectively converted into a first depth image and a second depth image of a preset size; wherein μ ij ,v ij is the coordinate of the jth pixel in the ith depth image, x ij ,y ij ,z ij is the coordinate of the point cloud corresponding to the jth pixel in the ith depth image in the three-dimensional Cartesian coordinate system, r ij is the distance from the point cloud corresponding to the jth pixel in the ith depth image to the sensor, W is the width in the preset size, FOV_down is the lower part of the vertical field of view of the sensor, abs(FOV_down) is the absolute value of the lower part of the vertical field of view of the sensor, FOV is the vertical field of view of the sensor, and H is the height in the preset size.
[0009] According to some embodiments of the present application, before determining the dynamic pixel points in the second depth image based on the first depth image and the second depth image, the method also includes: establishing an index corresponding to each pixel point in the second depth image in the first overall point cloud map; removing the dynamic point cloud in the first overall point cloud map based on the dynamic pixel points includes: determining that the point cloud corresponding to the dynamic pixel point in the first overall point cloud map is the dynamic point cloud based on the index; and removing the dynamic point cloud in the first overall point cloud map.
[0010] According to some embodiments of the present application, determining dynamic pixel points in the second depth image based on the first depth image and the second depth image includes: calculating the difference between the second depth image and the first depth image; and determining dynamic pixel points in the second depth image based on the difference.
[0011] According to some embodiments of the present application, the difference is the absolute value of the difference in depth values between corresponding positions; determining the dynamic pixel points in the second depth image based on the difference includes: determining that the target pixel points in the second depth image whose absolute value is greater than a preset value relative to the first depth image are the dynamic pixel points.
[0012] A second aspect of the present application provides an electronic device, including a processor and a memory, wherein the processor runs a computer program or code stored in the memory to implement a dynamic point cloud removal method as described in any possible embodiment of the first aspect above.
[0013] A third aspect of the present application provides a computer-readable storage medium for storing a computer program or code. When the computer program or code is executed by a processor, the dynamic point cloud removal method of any possible embodiment of the first aspect above is implemented.
[0014] The present application acquires multiple frames of first point cloud data and stitches the multiple frames of first point cloud data into a first overall point cloud map, thereby forming a first overall point cloud map including multiple frames of first point cloud data; converts the first point cloud data and the first overall point cloud map into a first depth image and a second depth image of preset sizes respectively, determines dynamic pixel points in the second depth image according to the first depth image and the second depth image, and removes the dynamic point cloud in the first overall point cloud map according to the dynamic pixel points; compares the first point cloud data with corresponding positions of the first overall point cloud map through the first depth image and the second depth image to determine and remove the dynamic point cloud in the first overall point cloud map, thereby converting the point cloud into a depth image, and removing the dynamic point cloud based on the depth image, thereby improving the speed of removing the dynamic point cloud; removing the dynamic point cloud by post-processing can improve the accuracy of removing the dynamic point cloud; and at the same time, the map generated according to the first overall point cloud map after removing the dynamic point cloud is more accurate, and thus the subsequent map-based positioning or map-based path planning is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 This is an application scenario diagram of a dynamic point cloud removal method according to an embodiment of the present application.
[0016] Figure 2 Flow chart of a dynamic point cloud removal method according to an embodiment of the present application.
[0017] Figure 3 This is a schematic diagram of a sensor scanning according to an embodiment of the present application.
[0018] Figure 4 A schematic diagram of determining point cloud coordinates according to an embodiment of the present application.
[0019] Figure 5 A schematic diagram of the conversion from point cloud coordinates to spherical coordinates according to an embodiment of the present application.
[0020] Figure 6 FIG. 1 is a schematic diagram of the conversion from spherical coordinates to image coordinates according to an embodiment of the present application.
[0021] Figure 7 A schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, words such as "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" is intended to present related concepts in a concrete way.
[0023] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art in the present application. The terms used in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. It should be understood that in the present application, unless otherwise specified, "plurality" refers to two or more than two.
[0024] Please refer to Figure 1, is an application scenario diagram of the dynamic point cloud removal method of an embodiment of the present application. The dynamic point cloud removal method is applied to an electronic device 1. The electronic device 1 may be at least one of a mobile phone, a foldable electronic device, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a vehicle-mounted device or a wearable device. The electronic device 1 may install an application (applicant, APP). The APP may be a client APP or a web APP. The electronic device 1 may obtain the multi-frame first point cloud data 3 collected by the sensor 2 through the APP, and remove the dynamic point cloud according to the multi-frame first point cloud data 3. Specifically: the sensor 2 may be a laser radar scanner, the sensor 2 may include a laser radar component, the laser radar component may be driven to rotate, and may emit laser to collect point cloud data of the surrounding environment. In some embodiments, the sensor 2 may be a multi-line laser radar scanner, which may emit multiple laser scanning lines at the same time to sense the surrounding three-dimensional environment. The multi-line laser radar scanner may be, for example, a 32-line laser radar scanner or a 64-line laser radar scanner. It is understandable that the sensor 2 may also be other sensors, such as a structured light sensor, etc., and this application does not limit this. Figure 1 As shown, the sensor 2 can be held by the user and moved in the actual scene to collect point cloud data of the user's surrounding environment and obtain multiple frames of first point cloud data 3. The actual scene can be a street, a scenic spot, or a shopping mall, etc., and this application does not limit this. After the sensor 2 obtains the multiple frames of first point cloud data 3, the multiple frames of first point cloud data 3 can be exported from the sensor 2, such as Figure 1 The multi-frame first point cloud data 3 derived from the sensor 2 can also be imported into the electronic device 1 through the APP, such as Figure 1 As shown by the dotted line in FIG. 1 , the electronic device 1 can remove the dynamic point cloud according to the multi-frame first point cloud data 3. It can be understood that Figure 1 An example of the sensor 2 is shown, and the present application does not limit the shape and size of the sensor 2.
[0025] In a possible implementation, the electronic device 1 may acquire multiple frames of first point cloud data 3, and stitch the multiple frames of first point cloud data 3 into a first overall point cloud map. The electronic device 1 may also convert the first point cloud data and the first overall point cloud map into a first depth image and a second depth image of preset sizes, respectively, determine dynamic pixel points in the second depth image based on the first depth image and the second depth image, and remove the dynamic point cloud in the first overall point cloud map based on the dynamic pixel points, so that the dynamic point cloud can be removed through the depth image in a post-processing manner.
[0026] Figure 1 The user is shown holding the sensor 2, but it is understandable that the sensor 2 can also be located on a vehicle, etc. to collect point cloud data of the vehicle's surrounding environment and obtain multiple frames of first point cloud data 3, and this application does not impose any restrictions on this.
[0027] Please refer to Figure 2 , which is a flow chart of a dynamic point cloud removal method according to an embodiment of the present application. The method is applied to an electronic device. The electronic device may be at least one of a mobile phone, a foldable electronic device, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a vehicle-mounted device, or a wearable device.
[0028] Methods include:
[0029] S201: Acquire multiple frames of first point cloud data.
[0030] In some embodiments, the multi-frame first point cloud data may be point cloud data in a local coordinate system. The multi-frame first point cloud data may be data collected by a sensor, and the local coordinate system may be the local coordinate system of the sensor that collects the multi-frame first point cloud data. In some embodiments, the sensor may be held by a user and moved in an actual scene to collect point cloud data of the user's surrounding environment and obtain multi-frame first point cloud data, and the electronic device may obtain the multi-frame first point cloud data collected by the sensor. When the sensor collects different frames of first point cloud data, the position and posture of the sensor may be different, and the local coordinate systems of the sensor where the different frames of first point cloud data are located may be different.
[0031] S202: Stitching multiple frames of first point cloud data into a first overall point cloud map.
[0032] In some embodiments, the first overall point cloud map is point cloud data in a global coordinate system, and the global coordinate system may be a world coordinate system.
[0033] In some embodiments, the electronic device may obtain the corresponding posture data when the sensor collects each frame of the first point cloud data, and convert each frame of the first point cloud data from the local coordinate system to the corresponding second point cloud data in the global coordinate system by multiplying the first point cloud data of each frame in the local coordinate system by the corresponding posture data, and splice multiple frames of the second point cloud data into a first overall point cloud map in the global coordinate system. In some embodiments, the electronic device may also retain each frame of the first point cloud data. Thus, the present application may create a first overall point cloud map by converting multiple frames of the first point cloud data in the local coordinate systems of different sensors to the same world coordinate system and splicing them into a first overall point cloud map.
[0034] In some embodiments, the sensor may further include an inertial measurement unit (IMU). The sensor may detect the corresponding posture data when the laser radar component collects the first point cloud data of each frame through the IMU. The electronic device may obtain the corresponding posture data when the sensor collects the first point cloud data of each frame from the sensor. It is understandable that the electronic device may also obtain the corresponding posture data when the sensor collects the first point cloud data of each frame through other methods, and this application does not limit this.
[0035] S203: Convert the first point cloud data and the first overall point cloud map into a first depth image and a second depth image of preset sizes respectively.
[0036] In some embodiments, for each frame of first point cloud data, the electronic device may convert the first overall point cloud map in the global coordinate system into a second overall point cloud map in the local coordinate system where the first point cloud data of the current frame is located, and convert the first point cloud data of the current frame in the local coordinate system and the second overall point cloud map in the local coordinate system into a first depth image and a second depth image of preset sizes, respectively. In some embodiments, for each frame of first point cloud data, the electronic device may convert the first overall point cloud map in the global coordinate system into a second overall point cloud map in the local coordinate system where the first point cloud data of the current frame is located by multiplying the first overall point cloud map in the global coordinate system by the inverse matrix of the posture data corresponding to the first point cloud data of the current frame. The first depth image and the second depth image both include the distance information between each point of the collected object and the sensor, that is, the depth value. The present application can convert the first overall point cloud map and the first point cloud data into the same coordinate system, which can facilitate the subsequent comparison and determination of the difference between the two.
[0037] In some embodiments, the electronic device may be configured to The first point cloud data of the current frame in the local coordinate system and the second overall point cloud map in the local coordinate system are converted into a first depth image and a second depth image of a preset size respectively. ij ,v ijis the coordinate of the jth pixel in the ith depth image, x ij ,y ij ,z ij is the coordinate of the point cloud corresponding to the jth pixel in the ith depth image in the three-dimensional Cartesian coordinate system, r ij is the distance from the point cloud corresponding to the jth pixel in the ith depth image to the sensor, W is the width in the preset size, FOV_down is the lower part of the vertical field of view of the sensor, abs(FOV_down) is the absolute value of the lower part of the vertical field of view of the sensor, FOV is the vertical field of view of the sensor, and H is the height in the preset size.
[0038] In some embodiments, the electronic device may convert the first point cloud data of the current frame and the second overall point cloud map into a corresponding two-dimensional depth image through spherical projection conversion. Specifically:
[0039] The vertical field of view FOV of the sensor 30 can be divided into an upper part FOV_up and a lower part FOV_down, such as Figure 3 As shown by the dotted line in . Among them, the value of FOV_up is a positive number, and the value of FOV_down is a negative number, then FOV = FOV_up + abs (FOV_down). It can be understood that Figure 3 It is an example of a sensor, and the present application does not limit the shape and size of the sensor 30.
[0040] Spherical coordinates can be expressed by three parameters: distance r, azimuth θ, and inclination like Figure 4 As shown in the figure, each point (x, y, z) represented by a three-dimensional Cartesian coordinate in the point cloud data collected by the commonly used sensor is actually converted from a spherical coordinate system: and
[0041] The relationship between the three-dimensional Cartesian coordinate system and the spherical coordinate system can be shown as Figure 5 As shown. Assuming that the coordinates of a point in a three-dimensional Cartesian coordinate system are (x1, y1, z1), the point can be represented as follows using a spherical coordinate system: and
[0042] If the cylinder obtained by rotating the sensor for one circle is unfolded with the x-axis direction as the front view, we can get Figure 6Image a in: The coordinate origin is at the center of the image, the ordinate of the pixel in the image is obtained by projection of the pitch1 angle, in the range of [FOV_down, FOV_up], and the abscissa is obtained by projection of the yaw1 angle, in the range of [-π, π].
[0043] The image coordinate system takes the upper left corner as the origin, such as Figure 6 So Figure 6 The image a in needs to be transformed to move the coordinate origin to the upper left corner, then: yaw2=yaw1+π, and pitch2=FOV_up-pitch1.
[0044] Different types of sensors have different field of view angles and horizontal resolutions, and the preset sizes will also be set to different values as needed. In order to adapt to these changes, yaw2 and pitch2 also need to be normalized: yaw3 = (yaw1 + π) / 2π, and pitch3 = (FOV_up - pitch1) / FOV. At the same time, after normalization, the coordinates of the point projected onto the depth image can be obtained by multiplying the width and height in the preset size:
[0045]
[0046] Among them, μ ij ,v ij is the coordinate of the jth pixel in the i-th depth image, FOV_up is the upper part of the vertical field of view of the sensor, x ij ,y ij ,z ij is the coordinate of the point cloud corresponding to the jth pixel in the ith depth image in the three-dimensional Cartesian coordinate system, r ij is the distance from the point cloud corresponding to the jth pixel in the ith depth image to the sensor, W is the width in the preset size, FOV_down is the lower part of the vertical field of view of the sensor, abs(FOV_down) is the absolute value of the lower part of the vertical field of view of the sensor, FOV is the vertical field of view of the sensor, and H is the height in the preset size.
[0047] S204: Determine dynamic pixels in the second depth image according to the first depth image and the second depth image.
[0048] In some embodiments, the electronic device may calculate the difference between the second depth image and the first depth image, and determine the dynamic pixel points in the second depth image based on the difference. The first depth image corresponds to the first point cloud data, the second depth image corresponds to the first overall point cloud map, and the first overall point cloud map is formed by stitching together multiple frames of first point cloud data, then the second depth image includes the position corresponding to the first depth image. For example, the first depth image is a first image of the entrance of Building C and the entrance of Building D on Street B in City A, then the second depth image includes a second image of the entrance of Building C and the entrance of Building D on Street B in City A. The second image may be the same as or different from the first image.
[0049] In some embodiments, the difference is the absolute value of the difference in depth values between corresponding positions. The electronic device may determine that a target pixel point in the second depth image relative to the first depth image has an absolute value greater than a preset value as a dynamic pixel point. Continuing with the above first depth image and second depth image as an example, the difference may be the absolute value of the difference in depth value between each position at the entrance of Building C, Street, A City in the second depth image and the corresponding position at the entrance of Building C, Street, A City in the first depth image, and the absolute value of the difference in depth value between each position at the entrance of Building D, Street, A City in the second depth image and the corresponding position at the entrance of Building D, Street, A City in the first depth image.
[0050] In some embodiments, before determining the dynamic pixel points in the second depth image based on the first depth image and the second depth image, the electronic device further establishes an index corresponding to each pixel point in the second depth image in the first overall point cloud map.
[0051] S205: removing the dynamic point cloud in the first overall point cloud map according to the dynamic pixel points.
[0052] In some embodiments, the electronic device may determine, based on the index, that the point cloud corresponding to the dynamic pixel point in the first overall point cloud map is a dynamic point cloud, and remove the dynamic point cloud in the first overall point cloud map.
[0053] In some embodiments, the first depth image may correspond to the first point cloud data of the current frame. The electronic device may compare the first point cloud data of each frame with the corresponding positions of the first overall point cloud map by comparing the first depth image corresponding to the first point cloud data of the current frame with the second depth image corresponding to the first overall point cloud map, and may remove all dynamic point clouds in the first overall point cloud map.
[0054] The present application acquires multiple frames of first point cloud data and stitches the multiple frames of first point cloud data into a first overall point cloud map, thereby forming a first overall point cloud map including multiple frames of first point cloud data; converts the first point cloud data and the first overall point cloud map into a first depth image and a second depth image of preset sizes respectively, determines dynamic pixel points in the second depth image according to the first depth image and the second depth image, and removes the dynamic point cloud in the first overall point cloud map according to the dynamic pixel points; compares the first point cloud data with corresponding positions of the first overall point cloud map through the first depth image and the second depth image to determine and remove the dynamic point cloud in the first overall point cloud map, thereby converting the point cloud into a depth image, and removing the dynamic point cloud based on the depth image, thereby improving the speed of removing the dynamic point cloud; removing the dynamic point cloud by post-processing can improve the accuracy of removing the dynamic point cloud; and at the same time, the map generated according to the first overall point cloud map after removing the dynamic point cloud is more accurate, and thus the subsequent map-based positioning or map-based path planning is more accurate.
[0055] Please refer to Figure 7 , which is a schematic diagram of the hardware structure of an electronic device in an embodiment of the present application. The electronic device 7 may be at least one of a mobile phone, a foldable electronic device, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a vehicle-mounted device or a wearable device. The electronic device 7 may include a processor 710 and a memory 720. The processor 710 may run a computer program or code stored in the memory 720 to implement the dynamic point cloud removal method in an embodiment of the present application.
[0056] The processor 710 may include one or more processing units. For example, the processor 710 may include, but is not limited to, an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, a neural network processor (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0057] The processor 710 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 710 is a cache memory. The memory may store instructions or data that the processor 710 has just used or circulated. If the processor 710 needs to use the instruction or data again, it may be directly called from the memory.
[0058] In some embodiments, the processor 710 may include one or more interfaces. The interface may include, but is not limited to, an Inter-Integrated Circuit (I2C) interface, an Inter-Integrated Circuit Sound (I2S) interface, a Pulse Code Modulation (PCM) interface, a Universal Asynchronous Receiver / Transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a General-Purpose Input / Output (GPIO) interface, a Subscriber Identity Module (SIM) interface, a Universal Serial Bus (USB) interface, etc.
[0059] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 7. In other embodiments, the electronic device 7 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0060] The memory 720 may include an external memory interface and an internal memory. Among them, the external memory interface can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 7. The external memory card communicates with the processor 710 through the external memory interface to realize the data storage function. The internal memory can be used to store computer executable program codes, and the executable program codes include instructions. The internal memory may include a storage program area and a storage data area. Among them, the storage program area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The storage data area may store data (such as audio data, image data, etc.) created during the use of the electronic device 7. In addition, the internal memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or a universal flash memory (Universal Flash Storage, UFS), etc. The processor 710 executes various functional applications and data processing of the electronic device 7 by running instructions stored in the internal memory, and / or instructions stored in a memory provided in the processor 710, such as implementing the dynamic point cloud removal method of the embodiment of the present application.
[0061] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 7. In other embodiments, the electronic device 7 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0062] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.
Claims
1. A dynamic point cloud removal method, characterized in that: The method comprises: Obtain multiple frames of first point cloud data; splicing multiple frames of the first point cloud data into a first overall point cloud map; Converting the first point cloud data and the first overall point cloud map into a first depth image and a second depth image of preset sizes respectively; Determine dynamic pixels in the second depth image according to the first depth image and the second depth image; The dynamic point cloud in the first overall point cloud map is removed according to the dynamic pixel points.
2. The method according to claim 1, characterized in that: The multiple frames of the first point cloud data are point cloud data in a local coordinate system, and the local coordinate system is a local coordinate system of a sensor that collects the multiple frames of the first point cloud data; The first overall point cloud map is point cloud data in a global coordinate system, and the global coordinate system is a world coordinate system.
3. The method according to claim 2, characterized in that The step of stitching the first point cloud data of multiple frames into a first overall point cloud map comprises: Acquire the posture data corresponding to each frame of the first point cloud data collected by the sensor; By multiplying each frame of the first point cloud data in the local coordinate system by corresponding posture data, each frame of the first point cloud data in the local coordinate system is converted from the local coordinate system to corresponding second point cloud data in the global coordinate system, and each frame of the first point cloud data is retained; Multiple frames of the second point cloud data are stitched into the first overall point cloud map in the global coordinate system.
4. The method according to claim 2, characterized in that The converting the first point cloud data and the first overall point cloud map into a first depth image and a second depth image of a preset size respectively comprises: For each frame of the first point cloud data, converting the first overall point cloud map in the global coordinate system into a second overall point cloud map in the local coordinate system where the first point cloud data of the current frame is located; The first point cloud data of the current frame in the local coordinate system and the second overall point cloud map in the local coordinate system are respectively converted into a first depth image and a second depth image of preset sizes.
5. The method according to claim 4, characterized in that The converting the first point cloud data of the current frame in the local coordinate system and the second overall point cloud map in the local coordinate system into a first depth image and a second depth image of a preset size respectively comprises: According to the formula Converting the first point cloud data of the current frame in the local coordinate system and the second overall point cloud map in the local coordinate system into a first depth image and a second depth image of preset sizes respectively; Among them, μ ij ,v ij is the coordinate of the jth pixel in the ith depth image, x ij ,y ij ,z ij is the coordinate of the point cloud corresponding to the jth pixel in the ith depth image in the three-dimensional Cartesian coordinate system, r ij is the distance from the point cloud corresponding to the jth pixel in the ith depth image to the sensor, W is the width in the preset size, FOV_down is the lower part of the vertical field of view of the sensor, abs(FOV_down) is the absolute value of the lower part of the vertical field of view of the sensor, FOV is the vertical field of view of the sensor, and H is the height in the preset size.
6. The method according to claim 1, characterized in that: Before determining the dynamic pixel points in the second depth image according to the first depth image and the second depth image, the method further includes: Establishing an index corresponding to each pixel in the second depth image in the first overall point cloud map; The removing the dynamic point cloud in the first overall point cloud map according to the dynamic pixel points comprises: Determine, according to the index, that the point cloud corresponding to the dynamic pixel point in the first overall point cloud map is the dynamic point cloud; The dynamic point cloud in the first overall point cloud map is removed.
7. The method according to claim 1, characterized in that The determining, according to the first depth image and the second depth image, dynamic pixel points in the second depth image comprises: Calculating a difference between the second depth image and the first depth image; According to the difference, dynamic pixels in the second depth image are determined.
8. The method according to claim 7, characterized in that: The difference is the absolute value of the difference in depth values between corresponding positions; The determining, according to the difference, dynamic pixels in the second depth image comprises: It is determined that a target pixel point whose absolute value is greater than a preset value exists in the second depth image relative to the first depth image is the dynamic pixel point.
9. An electronic device comprising a processor and a memory, characterized in that: The processor runs a computer program or code stored in the memory to implement the dynamic point cloud removal method according to any one of claims 1 to 8.
10. A computer-readable storage medium for storing a computer program or code, characterized in that: When the computer program or code is executed by a processor, the dynamic point cloud removal method according to any one of claims 1 to 8 is implemented.
