Point cloud data processing method, device, terminal equipment and storage medium
By rastering the point cloud data and marking the reference point cloud data, eliminating the suspended point cloud data, the problem of low accuracy of the digital surface model is solved, and the independent operation function of the plant protection drone across plots is realized.
Patent Information
- Application Number
- CN202210168721.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-23
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2042-02-23
AI Technical Summary
The digital surface model constructed based on point cloud data in the prior art has low accuracy and cannot effectively distinguish suspended objects, such as field wires or tower spreaders, which affects the route planning of plant protection drones and the function of autonomous operations across plots.
Generate point cloud data by acquiring the target image, rasterize and determine the reference point in each raster, mark and remove point cloud data of category suspended objects according to the preset elevation threshold, and generate a more accurate digital surface model.
Improve the accuracy of the digital surface model, avoid suspended objects being misidentified as ground entities, ensure that plant protection drones can achieve autonomous operations across plots and reduce route interference.
Smart Images

Figure CN114519712B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of point cloud data processing, and in particular, to a point cloud data processing method, apparatus, terminal device and storage medium. Background Art
[0002] At present, plant protection UAVs generally obtain global perception capabilities within a specified area by using models within the specified area (such as point clouds or digital surface models), thereby realizing autonomous operation functions across plots.
[0003] Compared with point clouds, digital surface models have a simpler data format and are therefore less difficult to use. Digital surface models are generally obtained by directly extracting point cloud data. Digital surface models are divided into multiple grids, each of which describes a single elevation value at the corresponding position. Therefore, suspended objects cannot be distinguished in the digital surface model generated from point cloud data. At this time, if suspended objects such as field wires or tower arms cannot be identified in the digital surface model, it will seriously affect the route planning of the plant protection drone, resulting in the plant protection drone being unable to achieve autonomous operation across plots. Summary of the invention
[0004] The embodiments of the present invention provide a point cloud data processing method, apparatus, terminal device and storage medium, which solve the technical problem that the digital surface model constructed based on point cloud data in the prior art has low accuracy.
[0005] In a first aspect, an embodiment of the present invention provides a point cloud data processing method, comprising:
[0006] Acquire a target image, and generate point cloud data according to the target image, where the target image is an image obtained by photographing the target area;
[0007] Rasterizing the point cloud data to obtain multiple grids of preset sizes, and determining a reference point in each grid;
[0008] According to the reference point and the preset elevation threshold, point cloud data classified as suspended objects are marked in each grid, and point cloud data classified as suspended objects are removed to obtain target point cloud data;
[0009] A digital surface model corresponding to the target area is generated based on the target point cloud data.
[0010] Preferably, determining a reference point in each grid includes:
[0011] Cluster the continuous point cloud data in each grid to obtain multiple point cloud layers;
[0012] Determining a surface point cloud layer corresponding to the ground surface among the multiple point cloud layers;
[0013] According to the elevation of each point in the surface point cloud layer, a reference point is selected in the surface point cloud layer.
[0014] Preferably, the continuous point cloud data in each grid is clustered to obtain multiple point cloud layers, including:
[0015] In each grid, the first elevation of each point in the continuous point cloud data is calculated, and the continuous point cloud data in each grid is clustered into different point cloud layers according to the first elevation.
[0016] Preferably, determining a surface point cloud layer corresponding to the ground surface from a plurality of point cloud layers includes:
[0017] In each point cloud layer, the point cloud layer where the first point whose elevation is less than a preset value is located is selected as the surface point cloud layer.
[0018] Preferably, selecting a reference point in the surface point cloud layer according to the elevation of each point in the surface point cloud layer includes:
[0019] The point with the largest first elevation value in the surface point cloud layer is selected as the reference point.
[0020] Preferably, according to the reference point and the preset elevation threshold, point cloud data classified as suspended objects are marked in each grid, and point cloud data classified as suspended objects are removed to obtain target point cloud data, including:
[0021] In each grid, the target point cloud layer is screened out in the point cloud layer according to the first elevation of each point, the preset elevation threshold and the reference point;
[0022] Determine whether there is any suspended point cloud data of the suspended object category in the target point cloud layer;
[0023] If so, mark the suspended point cloud data and remove the suspended point cloud data from the target point cloud layer to obtain the target point cloud data.
[0024] Preferably, in each grid, according to the first elevation of each point, a preset elevation threshold and a reference point, a target point cloud layer is screened out in the point cloud layer, including:
[0025] In each grid, from each point in each point cloud layer, select a target point with the lowest first elevation, calculate a first difference between the first elevation of the target point and the first elevation of the reference point, and determine whether the first difference is greater than or equal to the elevation threshold;
[0026] If so, mark the point cloud layer where the target point is located as the target point cloud layer.
[0027] Preferably, determining whether the target point cloud layer has suspended point cloud data of the suspended object category includes:
[0028] Traverse each point in the target point cloud layer, and for the currently traversed point, determine the target range based on the currently traversed point and the preset distance;
[0029] According to the first elevation of the currently traversed point and the first elevations of other points within the target range, it is determined whether the currently traversed point is a suspended point classified as a suspended object.
[0030] Preferably, determining the target range according to the currently traversed point and the preset distance includes:
[0031] The vertical line between the currently traversed point and the horizontal plane where the reference point is located is used as the axis, the preset distance is used as the radius to determine the cylindrical range, and the cylindrical range is used as the target range.
[0032] Preferably, judging whether the currently traversed point is a suspended point classified as a suspended object according to the first elevation of the currently traversed point and the first elevations of other points includes:
[0033] Calculate the second difference between the first elevation of the currently traversed point and the first elevation of other points;
[0034] Count the number of other points where the second difference is greater than a preset threshold;
[0035] According to the number and the total number of all points in the target range, it is determined whether the currently traversed point is a suspended point of the suspended object category.
[0036] Preferably, judging whether the currently traversed point is a suspended point of the suspended object category according to the number and the total number of all points in the target range includes:
[0037] It is determined whether the ratio of the number to the total number is greater than a preset ratio. If so, the currently traversed point is determined as a suspended point of the suspended object category.
[0038] In a second aspect, an embodiment of the present invention provides a point cloud data processing device, including a point cloud generation module, a rasterization module, a culling module, and a model generation module;
[0039] The point cloud generation module is used to obtain a target image and generate point cloud data according to the target image, where the target image is an image obtained by photographing the target area;
[0040] The rasterization module is used to rasterize the point cloud data to obtain multiple grids of preset sizes, and determine the reference point in each grid;
[0041] The elimination module is used to mark the point cloud data classified as suspended objects in each grid according to the reference point cloud and the preset elevation threshold, and eliminate the point cloud data classified as suspended objects to obtain the target point cloud data;
[0042] The model generation module is used to generate a digital surface model corresponding to the target area based on the target point cloud data.
[0043] In a third aspect, an embodiment of the present invention provides a terminal device, the terminal device includes a processor and a memory;
[0044] The memory is used to store the computer program and transmit the computer program to the processor;
[0045] The processor is used to execute a point cloud data processing method according to the instructions in the computer program.
[0046] In a fourth aspect, an embodiment of the present invention provides a storage medium storing computer executable instructions, which, when executed by a computer processor, are used to execute a point cloud data processing method as described in the first aspect.
[0047] As described above, an embodiment of the present invention provides a point cloud data processing method, apparatus, terminal device and storage medium, the method comprising: acquiring a target image, generating point cloud data according to the target image, the target image being an image obtained by photographing the target area; rasterizing the point cloud data to obtain a plurality of grids of preset sizes, and determining a reference point in each grid; marking point cloud data classified as suspended objects in each grid according to the reference point and a preset elevation threshold, and removing the point cloud data classified as suspended objects to obtain target point cloud data; and generating a digital surface model corresponding to the target area based on the target point cloud data.
[0048] The embodiment of the present invention rasterizes the point cloud data, determines the reference point in each grid, and finally marks the point cloud data classified as suspended objects in each grid according to the reference point and the preset elevation threshold and removes them to obtain the target point cloud data, so that the target point cloud data no longer contains point cloud data classified as suspended objects. When the target point cloud data is subsequently used to generate a digital surface model, it can avoid the situation where the digital surface model expresses the suspended objects as entities in contact with the ground, thereby improving the accuracy of the digital surface model and solving the technical problem of low accuracy of the digital surface model constructed based on point cloud data in the prior art. At the same time, it also enables the plant protection drone to obtain global perception capabilities in the specified area through the digital surface model, and the suspended objects will not interfere with the route of the plant protection drone, realizing the autonomous operation function of the plant protection drone across plots. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A schematic flow chart of a point cloud data processing method provided in an embodiment of the present invention.
[0050] Figure 2 A schematic diagram of rasterizing a point cloud provided by an embodiment of the present invention.
[0051] Figure 3 A schematic flow chart of another point cloud data processing method provided by an embodiment of the present invention.
[0052] Figure 4 A schematic diagram of clustering continuous point cloud data into point cloud layers provided by an embodiment of the present invention.
[0053] Figure 5 A schematic flow chart of another point cloud data processing method provided by an embodiment of the present invention.
[0054] Figure 6 A schematic diagram of calculating a first difference provided by an embodiment of the present invention.
[0055] Figure 7 A schematic diagram of determining a cylindrical range provided by an embodiment of the present invention.
[0056] Figure 8 A schematic flow chart of another point cloud data processing method provided by an embodiment of the present invention.
[0057] Fig. 9 A schematic structural diagram of a point cloud data processing device provided in an embodiment of the present invention.
[0058] Fig.10 A schematic diagram of the structure of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The following description and accompanying drawings fully illustrate the specific embodiments of the present application so that those skilled in the art can practice them. The examples represent possible variations only. Unless explicitly required, separate components and functions are optional, and the order of operations can vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. The scope of the embodiments of the present application includes the entire scope of the claims, and all available equivalents of the claims. In this article, each embodiment may be represented individually or generally by the term "invention", which is only for convenience, and if more than one invention is disclosed in fact, it is not intended to automatically limit the scope of the application to any single invention or inventive concept. In this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, without requiring or implying any actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method or terminal device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed. The various embodiments are described in a progressive manner herein, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. As for the structures, products, etc. disclosed in the embodiments, since they correspond to the parts disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0060] Explanation of terms:
[0061] Digital Surface Model (DSM): refers to a ground elevation model that includes the heights of buildings, bridges, trees, etc. Compared with the Digital Elevation Model (DEM), the Digital Elevation Model only contains the elevation information of the terrain and does not include other surface information. The Digital Surface Model is based on the Digital Elevation Model and further covers the elevation of other surface information besides the ground.
[0062] Point cloud: A point cloud is a collection of points in three-dimensional space, each of which is assigned a Cartesian coordinate. Points can also be assigned other properties, which are generally used to indicate how the point was acquired. For example, the time when the measurement device collecting the data captured the point, or the intensity or position error of the point.
[0063] Embodiment 1
[0064] like Figure 1 As shown, Figure 1A flowchart of a point cloud data processing method provided by an embodiment of the present invention. The point cloud data processing method provided by an embodiment of the present invention can be executed by a point cloud data processing device, which can be implemented by software and / or hardware. The point cloud data processing device can be composed of two or more physical entities, or can be composed of one physical entity. For example, the point cloud data processing device can be a computer, a host computer, a tablet, etc. The method includes the following steps:
[0065] Step 101: Acquire a target image and generate point cloud data according to the target image. The target image is an image obtained by photographing the target area.
[0066] In this embodiment, a target image is first obtained by photographing the target area. It can be understood that the method of obtaining the target image in this embodiment can be set according to actual needs. Exemplarily, in one embodiment, the target image can be obtained by aerial photography, or by using an RGB camera to photograph the target image.
[0067] After acquiring the target image, point cloud data can be generated based on the target image. For example, for a target image acquired by aerial photography, point cloud data can be generated by measuring and settling the target image. For a target image captured by a laser radar and an RGB camera, point cloud data can be generated by fusing the laser radar data and the RGB image. It should be further explained that the point cloud data includes the Cartesian coordinates of each point.
[0068] Step 102: rasterize the point cloud data to obtain a plurality of grids of preset sizes, and determine a reference point in each grid.
[0069] After that, the point cloud data is further rasterized to obtain multiple grids of preset sizes, such as Figure 2 As shown, the grid can be used as the basic unit when processing the point cloud data later. It can be understood that the size of the grid can be set in advance, for example, the point cloud data is divided into 7X7 or 5X5 grids. After obtaining the grid, a reference point is determined in each grid. The reference point is a point corresponding to the highest point on the geoid in the point cloud data. By determining the reference point, the point cloud data classified as suspended objects can be determined according to the reference point. For example, in one embodiment, the reference point can be determined according to the elevation of each point in the point cloud data of each grid.
[0070] Step 103: According to the reference point and the preset elevation threshold, point cloud data classified as suspended objects are marked in each grid, and point cloud data classified as suspended objects are removed to obtain target point cloud data.
[0071] After the reference point is determined in each grid, the point cloud data classified as suspended objects can be marked in each grid according to the preset elevation threshold and the reference point in each grid, and the point cloud data classified as suspended objects can be eliminated. Specifically, in one embodiment, the first elevation of the reference point and other points when the geoid is used as the reference surface can be calculated in the grid, and the difference between the first elevation of other points and the first elevation of the reference point is calculated. According to the difference and the elevation threshold, the point cloud data classified as suspended objects in each grid is screened out, and the point cloud data classified as suspended objects is eliminated.
[0072] Step 104: Generate a digital surface model corresponding to the target area based on the target point cloud data.
[0073] Finally, a digital surface model corresponding to the target area is generated based on the screened target point cloud data. It can be understood that since there is no point cloud classified as suspended objects in the target point cloud data, when the target point cloud data is used to generate the digital surface model, it can avoid expressing the suspended objects as entities in contact with the ground in the digital surface model, thereby improving the accuracy of the digital surface model.
[0074] As described above, the embodiment of the present invention rasterizes the point cloud data, determines the reference point in each grid, and finally marks the point cloud data classified as suspended objects in each grid according to the reference point and the preset elevation threshold and removes them to obtain the target point cloud data. This makes it possible to avoid the situation where the digital surface model expresses the suspended objects as entities in contact with the ground when the target point cloud data is used to generate the digital surface model, thereby improving the accuracy of the digital surface model. At the same time, it also enables the plant protection UAV to obtain the global perception capability in the specified area through the digital surface model, and the suspended objects will not interfere with the route of the plant protection UAV, thereby realizing the autonomous operation function of the plant protection UAV across plots.
[0075] like Figure 3 As shown, Figure 3 A flowchart of another point cloud data processing method provided by an embodiment of the present invention. The method comprises the following steps:
[0076] Step 201: Acquire a target image and generate point cloud data according to the target image. The target image is an image obtained by photographing the target area.
[0077] Step 202: rasterize the point cloud data to obtain multiple grids of preset sizes.
[0078] Step 203: cluster the continuous point cloud data in each grid to obtain multiple point cloud layers.
[0079] In one embodiment, after rasterizing the point cloud data to obtain multiple grids of preset sizes, the continuous point cloud data is clustered in each grid to obtain multiple point cloud layers. The clustering method for continuous point cloud data adopts existing clustering methods, including but not limited to Euclidean cluster extraction, Region growing segmentation, and Color-based region growing segmentation. The specific method can be selected according to actual needs. The specific principles of the clustering method have been recorded in many existing literatures and will not be repeated in this embodiment.
[0080] Based on the above embodiment, clustering the continuous point cloud data in each grid to obtain multiple point cloud layers in step 203 is specifically performed by step 2031, including:
[0081] Step 2031: In each grid, calculate the first elevation of each point in the continuous point cloud data, and cluster the continuous point cloud data in each grid into different point cloud layers according to the first elevation.
[0082] First, the geoid is determined in each grid. Then, for each point in the continuous point cloud data, the first elevation of each point is calculated when the geoid is used as the reference surface. Then, the continuous point cloud data in each grid can be clustered into different point cloud layers according to the first elevation of each point. By clustering the point cloud data according to the first elevation, the point cloud data in the same elevation range can be clustered into one point cloud layer. Different point cloud layers reflect the elevation distribution of the point cloud data, such as Figure 4 As shown, Figure 4 This is a cross-sectional view of the point cloud data.
[0083] Step 204: Determine a surface point cloud layer corresponding to the ground surface from among the multiple point cloud layers.
[0084] After clustering multiple point cloud layers in each grid, a surface point cloud layer corresponding to the ground surface is determined from the multiple point cloud layers of each grid. It can be understood that the surface point cloud layer contains points on the ground surface, and the surface point cloud layer is generally the lowest point cloud layer in the vertical direction, that is, the surface point cloud layer is the point cloud layer with the smallest first elevation among the multiple point cloud layers corresponding to each grid.
[0085] In one embodiment, determining the surface point cloud layer corresponding to the ground surface from the multiple point cloud layers in step 204 is specifically performed by step 2041, including:
[0086] Step 2041: In each point cloud layer, a point cloud layer where points having a first elevation less than a preset value are located is selected as a surface point cloud layer.
[0087] In each point cloud layer, a point whose first elevation is less than a preset value is selected, and the point cloud layer where the point is located is used as a surface point cloud layer. It is understandable that, since there are certain ups and downs on the surface, the first elevation of the point on the surface is generally between 0 and a number slightly greater than 0, such as 0.5. Therefore, in this embodiment, the preset value can be set to a value close to 0, such as 0.05. At this time, if the first elevation of a point is less than 0.05, it can be determined that the point is a point on the surface, and therefore the point cloud layer where the point is located is used as a surface point cloud layer. It is understandable that in this embodiment, the specific value of the preset value can be set according to actual needs, and the specific value of the preset value is not limited in this embodiment.
[0088] Step 205: Select a reference point in the surface point cloud layer according to the elevation of each point in the surface point cloud layer.
[0089] After the surface point cloud layer is confirmed, reference points are further selected from the points of the surface point cloud layer according to the elevation of each point in the surface point cloud layer, so that point cloud data of the suspended object type can be subsequently screened out according to the reference points.
[0090] In one embodiment, in step 205, selecting a reference point in the surface point cloud layer according to the elevation of each point in the surface point cloud layer is specifically performed by step 2051, including:
[0091] Step 2051: Select a point with the largest first elevation value in the surface point cloud layer as a reference point.
[0092] Since the first elevation of the midpoint of the surface point cloud layer is within a certain elevation range, the point with the largest first elevation value in the surface point cloud layer is selected as the reference point. It can be understood that the reference point represents the highest point of the surface point cloud layer.
[0093] Step 206: According to the reference point and the preset elevation threshold, point cloud data classified as suspended objects are marked in each grid, and point cloud data classified as suspended objects are removed to obtain target point cloud data.
[0094] After the reference point is selected in each grid, the point cloud data classified as suspended objects can be marked in each grid according to the reference point and the preset elevation threshold, and the point cloud data classified as suspended objects can be eliminated. In one embodiment, the difference between the first elevation of other point cloud data and the first elevation of the reference point can be calculated in the grid, and the target point cloud layer can be screened out in each grid according to the difference and the elevation threshold, and it is confirmed whether there is point cloud data classified as suspended objects in the target point cloud layer. If so, the point cloud data classified as suspended objects is eliminated to obtain the target point cloud data, so that when a digital surface model is subsequently generated according to the target point cloud data, since the point cloud data classified as suspended objects has been eliminated in the target point cloud data, it can avoid the situation where the suspended objects are expressed as entities in contact with the ground in the digital surface model, thereby improving the accuracy of the digital surface model.
[0095] Step 207: Generate a digital surface model corresponding to the target area based on the target point cloud data.
[0096] like Figure 5 As shown, Figure 5 A flowchart of another point cloud data processing method provided by an embodiment of the present invention. The method comprises the following steps:
[0097] Step 301: Acquire a target image, and generate point cloud data according to the target image, where the target image is an image obtained by photographing the target area.
[0098] Step 302: rasterize the point cloud data to obtain multiple grids of preset sizes.
[0099] Step 303: In each grid, calculate the first elevation of each point in the continuous point cloud data, and cluster the continuous point cloud data in each grid into different point cloud layers according to the first elevation.
[0100] Step 304: Determine a surface point cloud layer corresponding to the ground surface from among the multiple point cloud layers.
[0101] Step 305: Select a reference point in the surface point cloud layer according to the elevation of each point in the surface point cloud layer.
[0102] Step 306: In each grid, according to the first elevation of each point, the preset elevation threshold and the reference point, a target point cloud layer is screened out from the point cloud layer.
[0103] After selecting the reference point in each grid, the difference between the first elevation of each point and the first elevation of the reference point can be calculated to determine whether the difference is greater than or equal to the preset elevation threshold. If so, it can be determined that the point cloud layer where the point is located is far away from the reference point in the vertical direction. The point cloud layer may be the point cloud layer where the suspended object is located, so the point cloud layer is determined as the target point cloud layer. If the difference between the first elevation of all points in a point cloud layer and the first elevation of the reference point is less than the elevation threshold, the point cloud layer is retained, and the point cloud layer can be understood as a point cloud layer that needs to be retained, such as a tree crown. It can be understood that in this embodiment, the specific value of the elevation threshold can be set according to actual needs, and the specific data of the elevation threshold is not limited in this embodiment.
[0104] On the basis of the above embodiment, in step 306, in each grid, according to the first elevation of each point, the preset elevation threshold and the reference point, the target point cloud layer is screened out in the point cloud layer, which is specifically performed by steps 3061-3062, including:
[0105] Step 3061: In each grid, from each point in each point cloud layer, select the target point with the lowest first elevation, calculate the first difference between the first elevation of the target point and the first elevation of the reference point, and determine whether the first difference is greater than or equal to the elevation threshold.
[0106] In one embodiment, Figure 6 As shown, Figure 6 is a cross-sectional view of the point cloud data. Among the points in each point cloud layer of each grid, the target point with the lowest first elevation is selected, and then the first difference between the first elevation of the target point and the first elevation of the reference point is calculated in each grid, and it is further determined whether the first difference is greater than or equal to the elevation threshold. By selecting the target point with the lowest first elevation in each point cloud layer, it is possible to avoid traversing all points in the point cloud layer, thereby reducing the amount of calculation, improving the calculation efficiency and shortening the calculation time.
[0107] Step 3062: If yes, mark the point cloud layer where the target point is located as the target point cloud layer.
[0108] If the first difference value in the point cloud layer is greater than or equal to the elevation threshold, the point cloud layer where the target point is located is marked as the target point cloud layer.
[0109] Step 307: Determine whether there is any suspended point cloud data of the suspended object category in the target point cloud layer.
[0110] After determining the target point cloud layer in each grid, it is further determined whether there is any suspended point cloud data classified as suspended objects in the target point cloud layer, so as to further remove the suspended point cloud data from the point cloud data later.
[0111] On the basis of the above embodiment, the determination in step 307 whether there is suspended point cloud data of the category of suspended objects in the target point cloud layer is specifically performed by steps 3071 and 3072, which specifically include:
[0112] Step 3071: traverse each point in the target point cloud layer, and for the currently traversed point, determine the target range according to the currently traversed point and the preset distance.
[0113] For each target point cloud layer in each grid, each point in the target point cloud layer is traversed. When a certain point is traversed, the target range is determined based on the preset distance with the currently traversed point as the center point. It can be understood that the preset distance can be set according to actual needs, but the target range finally determined needs to fall within the grid.
[0114] Based on the above embodiment, determining the target range according to the currently traversed point and the preset distance in step 3071 is specifically performed by step 30711, including:
[0115] Step 30711: Use the vertical line between the currently traversed point and the horizontal plane where the reference point is located as the axis, use the preset distance as the radius to determine the cylindrical range, and use the cylindrical range as the target range.
[0116] In one embodiment, Figure 7 As shown, Figure 7 For the cross-sectional view of the point cloud data, for the currently traversed point, determine the horizontal plane where the reference point is located, use the vertical line between the currently traversed point and the horizontal plane as the axis, the point on the axis as the center point, and use the preset distance as the radius to determine the cylindrical range, and use the cylindrical range as the target range.
[0117] The above is the specific process of confirming the target range.
[0118] Step 3072: Determine whether the currently traversed point is a suspended point classified as a suspended object based on the first elevation of the currently traversed point and the first elevations of other points within the target range.
[0119] After the target range is confirmed, it is determined whether the currently traversed point is a suspended point classified as a suspended object based on the first elevation of the currently traversed point and the first elevations of other points within the target range. Exemplarily, in one embodiment, by calculating the difference between the first elevation of the currently traversed point and the first elevations of other points, the number of other points whose difference is greater than a preset threshold is determined, and finally, based on the number, it is determined whether the currently traversed point is a suspended point classified as a suspended object.
[0120] On the basis of the above embodiment, in step 3072, judging whether the currently traversed point is a suspended point of the category of suspended object according to the first elevation of the currently traversed point and the first elevation of other points is specifically performed by steps 30721 to 30723, which specifically include:
[0121] Step 30721, calculate the second difference between the first elevation of the currently traversed point and the first elevations of other points.
[0122] First, the second difference between the first elevation of the currently traversed point and the first elevation of each other point is calculated. For example, if the currently traversed point is A and the other points in the target range are B, C, and D, the second difference between the first elevation of A and the first elevation of B, the second difference between the first elevation of C, and the second difference between the first elevation of D are calculated respectively.
[0123] Step 30722: Count the number of other points whose second difference is greater than a preset threshold.
[0124] After calculating the second difference between the currently traversed point and each of the other points, the number of points whose second difference is greater than the preset threshold is counted among the other points. For example, if the second difference between the first elevation of the previously traversed point A and other point B, and the second difference between the first elevation of other point C are both greater than the preset threshold, then the number of other points whose second difference is greater than the preset threshold is 2.
[0125] Step 30723: Based on the number and the total number of all points within the target range, determine whether the currently traversed point is a suspended point of the suspended object category.
[0126] Finally, according to the number of other points whose second difference is greater than the preset threshold and the total number of all points in the target range, it is determined whether the currently traversed point is a suspended point classified as a suspended object. Specifically, in one embodiment, the ratio of the number to the total number can be calculated, and according to the ratio, it is determined whether the currently traversed point is a suspended point classified as a suspended object.
[0127] Based on the above embodiment, in step 30723, judging whether the currently traversed point is a suspended point of the suspended object category according to the number and the total number of all points in the target range includes:
[0128] It is determined whether the ratio of the number to the total number is greater than a preset ratio. If so, the currently traversed point is determined as a suspended point of the suspended object category.
[0129] In one embodiment, it is determined whether the proportion of the number to the total number is greater than a preset proportion. If so, the currently traversed point is determined as a suspended point classified as a suspended object. It is understandable that if the distance between the currently traversed point and most other points in the target range in the vertical direction is greater than a preset threshold, it means that the first elevation of the currently traversed point is high, and there is less point cloud data between the currently traversed point and most other points. Therefore, it is very likely that the currently traversed point is a suspended object (such as an electric wire), and the currently traversed point is determined as a suspended point classified as a suspended object. It is understandable that the preset proportion can be set according to actual needs. In this embodiment, the specific value of the preset proportion is not limited. Exemplarily, the preset proportion can be set to 80%.
[0130] Step 308: If yes, mark the floating point cloud data and remove the floating point cloud data from the target point cloud layer to obtain the target point cloud data.
[0131] If there is suspended point cloud data in the target point cloud layer, the suspended point cloud data is marked in the target point cloud layer, and the suspended point cloud data is removed from the target point cloud layer to obtain the target point cloud data. After traversing each point in each target point cloud layer of each grid, all the suspended points in the target point cloud layer of each grid are summarized to obtain the suspended point cloud data. Finally, the suspended point cloud data in the point cloud data is removed to obtain the target point cloud data. If there is no suspended point cloud data in all target point cloud layers, the target point cloud layer is not operated and the process ends.
[0132] Step 309: Generate a digital surface model corresponding to the target area based on the target point cloud data.
[0133] In the above, by screening out the target point cloud layer in each point cloud layer of each grid, and traversing all points in the target point cloud layer, it is determined whether the currently traversed point is a suspended point classified as a suspended object. If so, the currently traversed point is regarded as a suspended point classified as a suspended object. After all the suspended points classified as suspended objects in the point cloud data are subsequently determined, the suspended point cloud data can be obtained, and the suspended point cloud data is removed from the point cloud data to obtain the target point cloud data. When a digital surface model is subsequently generated based on the target point cloud data, since the suspended objects have been removed from the target point cloud data, it is possible to avoid expressing the suspended objects as entities in contact with the ground in the digital surface model, thereby improving the accuracy of the digital surface model.
[0134] like Figure 8 As shown, Figure 8 A flowchart of another point cloud data processing method provided by an embodiment of the present invention. The method comprises the following steps:
[0135] Step 401: Acquire a target image, and generate point cloud data according to the target image, where the target image is an image obtained by photographing the target area.
[0136] Step 402: Filter the point cloud data.
[0137] In this embodiment, after obtaining the point cloud data, the point cloud data is further filtered to prevent noise points in the point cloud data from interfering with the subsequent stratification process. Exemplarily, in one embodiment, the lowest elevation value of the point cloud data is set, the second elevation of each point cloud in the point cloud data is calculated when the geoid is used as the reference surface, and the point cloud data whose second elevation is lower than the lowest elevation value is filtered.
[0138] Step 403: rasterize the point cloud data to obtain a plurality of grids of preset sizes, and determine a reference point in each grid.
[0139] Step 404: According to the reference point and the preset elevation threshold, point cloud data classified as suspended objects are marked in each grid, and point cloud data classified as suspended objects are removed to obtain target point cloud data.
[0140] Step 405: Generate a digital surface model corresponding to the target area based on the target point cloud data.
[0141] As described above, filtering the point cloud data after obtaining it can avoid interference of noise points on the subsequent stratification process, and at the same time can reduce the amount of calculation and improve the calculation efficiency.
[0142] Embodiment 2
[0143] like Fig. 9 As shown, Fig. 9 A schematic structural diagram of a point cloud data processing device provided in an embodiment of the present invention includes a point cloud generation module 501 , a rasterization module 502 , a culling module 503 and a model generation module 504 .
[0144] The point cloud generation module 501 is used to obtain a target image and generate point cloud data according to the target image. The target image is an image obtained by photographing the target area.
[0145] The rasterization module 502 is used to rasterize the point cloud data to obtain a plurality of grids of preset sizes, and determine a reference point in each grid.
[0146] The elimination module 503 is used to mark the point cloud data classified as suspended objects in each grid according to the reference point cloud and a preset elevation threshold, and eliminate the point cloud data classified as suspended objects to obtain target point cloud data.
[0147] The model generation module 504 is used to generate a digital surface model corresponding to the target area based on the target point cloud data.
[0148] On the basis of the above embodiment, the rasterization module 502 is used to determine the reference point in each grid, including: clustering the continuous point cloud data in each grid to obtain a plurality of point cloud layers;
[0149] A surface point cloud layer corresponding to the ground surface is determined from among the multiple point cloud layers; and a reference point is selected from the surface point cloud layer according to the elevation of each point in the surface point cloud layer.
[0150] On the basis of the above embodiment, the rasterization module 502 is used to cluster the continuous point cloud data in each grid to obtain multiple point cloud layers, including:
[0151] It is used to calculate the first elevation of each point in the continuous point cloud data in each grid, and cluster the continuous point cloud data in each grid into different point cloud layers according to the first elevation.
[0152] Based on the above embodiment, the rasterization module 502 is used to determine a surface point cloud layer corresponding to the ground surface from multiple point cloud layers, including:
[0153] It is used to select the point cloud layer where the first point with elevation less than a preset value is located in each point cloud layer as the surface point cloud layer.
[0154] On the basis of the above-mentioned embodiment, the rasterization module 502 is used to select a reference point in the surface point cloud layer according to the elevation of each point in the surface point cloud layer, including:
[0155] It is used to select the point with the largest first elevation value in the surface point cloud layer as the reference point.
[0156] On the basis of the above embodiment, the elimination module 503 is used to mark the point cloud data classified as suspended objects in each grid according to the reference point and the preset elevation threshold, and eliminate the point cloud data classified as suspended objects to obtain the target point cloud data, including:
[0157] It is used to filter out the target point cloud layer in each grid according to the first elevation of each point, the preset elevation threshold and the reference point; determine whether there is target point cloud data in the target point cloud layer. If so, mark the floating point cloud data and remove the floating point cloud data from the target point cloud layer to obtain the target point cloud data.
[0158] On the basis of the above embodiment, the elimination module 503 is used to filter out the target point cloud layer in the point cloud layer according to the first elevation of each point, the preset elevation threshold and the reference point in each grid, including:
[0159] It is used to select the target point with the lowest first elevation from each point in each point cloud layer in each grid, calculate the first difference between the first elevation of the target point and the first elevation of the reference point, and determine whether the first difference is greater than or equal to the elevation threshold; if so, mark the point cloud layer where the target point is located as the target point cloud layer.
[0160] Based on the above embodiment, the elimination module 503 is used to determine whether the target point cloud layer contains suspended point cloud data classified as suspended objects, including:
[0161] It is used to traverse each point in the target point cloud layer. For the currently traversed point, the target range is determined according to the currently traversed point and the preset distance; according to the first elevation of the currently traversed point and the first elevation of other points in the target range, it is determined whether the currently traversed point is a suspended point classified as a suspended object.
[0162] Based on the above embodiment, the elimination module 503 is used to determine the target range according to the currently traversed points and the preset distance, including:
[0163] It is used to determine the cylindrical range with the vertical line between the currently traversed point and the horizontal plane where the reference point is located as the axis and the preset distance as the radius, and the cylindrical range is used as the target range.
[0164] On the basis of the above embodiment, the elimination module 503 is used to determine whether the currently traversed point is a suspended point of the suspended object category according to the first elevation of the currently traversed point and the first elevations of other points, including:
[0165] Used to calculate the second difference between the first elevation of the currently traversed point and the first elevation of other points; count the number of other points whose second difference is greater than a preset threshold; and determine whether the currently traversed point is a suspended point classified as a suspended object based on the number and the total number of all points within the target range.
[0166] On the basis of the above embodiment, the elimination module 503 is used to determine whether the currently traversed point is a suspended point of the suspended object category according to the number and the total number of all points in the target range, including:
[0167] It is used to determine whether the ratio of the number to the total number is greater than the preset ratio. If so, the currently traversed point is determined as a suspended point with the category of suspended objects.
[0168] Embodiment 3
[0169] This embodiment also provides a terminal device, such as Fig.10 As shown, a terminal device 60 includes a processor 600 and a memory 601;
[0170] The memory 601 is used to store the computer program 602 and transmit the computer program 602 to the processor;
[0171] The processor 600 is used to execute the steps in the above-mentioned point cloud data processing method embodiment according to the instructions in the computer program 602.
[0172] Exemplarily, the computer program 602 may be divided into one or more modules / units, one or more modules / units are stored in the memory 601, and are executed by the processor 600 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 602 in the terminal device 60.
[0173] The terminal device 60 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device 60 may include, but is not limited to, a processor 600 and a memory 601. Those skilled in the art will appreciate that Fig.10 It is only an example of the terminal device 60 and does not constitute a limitation of the terminal device 60. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device 60 may also include input and output devices, network access devices, buses, etc.
[0174] The processor 600 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0175] The memory 601 may be an internal storage unit of the terminal device 60, such as a hard disk or memory of the terminal device 60. The memory 601 may also be an external storage terminal device of the terminal device 60, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (FlashCard), etc. equipped on the terminal device 60. Further, the memory 601 may also include both an internal storage unit of the terminal device 60 and an external storage device. The memory 601 is used to store computer programs and other programs and data required by the terminal device 60. The memory 601 may also be used to temporarily store data that has been output or is to be output.
[0176] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0177] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0178] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0179] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0180] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store computer programs.
[0181] Embodiment 4
[0182] An embodiment of the present invention further provides a storage medium containing computer executable instructions, which are used to execute a point cloud data processing method when executed by a computer processor. The method includes the following steps:
[0183] Acquire a target image, and generate point cloud data according to the target image, where the target image is an image obtained by photographing the target area;
[0184] Rasterizing the point cloud data to obtain multiple grids of preset sizes, and determining a reference point in each grid;
[0185] According to the reference point and the preset elevation threshold, point cloud data classified as suspended objects are marked in each grid, and point cloud data classified as suspended objects are removed to obtain target point cloud data;
[0186] A digital surface model corresponding to the target area is generated based on the target point cloud data.
[0187] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the embodiments of the present invention are not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the embodiments of the present invention. Therefore, although the embodiments of the present invention are described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the embodiments of the present invention, and the scope of the embodiments of the present invention is determined by the scope of the appended claims.
Claims
1. A point cloud data processing method, characterized in that: include: Acquire a target image, and generate point cloud data according to the target image, wherein the target image is an image obtained by photographing the target area; Rasterizing the point cloud data to obtain a plurality of grids of preset sizes, and determining a reference point in each of the grids; According to the reference point and the preset elevation threshold, point cloud data of the category of suspended objects are marked in each of the grids, and the point cloud data of the category of suspended objects are eliminated to obtain target point cloud data; wherein, the point cloud data of the category of suspended objects marked includes: traversing each point in the target point cloud layer, for the currently traversed point, determining the target range according to the currently traversed point and the preset distance, calculating the second difference between the first elevation of the currently traversed point and the first elevation of other points in the target range, counting the number of other points whose second difference is greater than the preset threshold, judging whether the currently traversed point is a suspended point of the category of suspended objects according to the number and the total number of all points in the target range, and marking it if so, wherein the target point cloud layer is obtained by screening multiple point cloud layers, and the multiple point cloud layers are obtained by clustering the continuous point cloud data in each of the grids; A digital surface model corresponding to the target area is generated based on the target point cloud data.
2. A point cloud data processing method according to claim 1, characterized in that: Determining a reference point in each of the grids comprises: Clustering the continuous point cloud data in each of the grids to obtain a plurality of point cloud layers; Determining a surface point cloud layer corresponding to the ground surface from among the plurality of point cloud layers; According to the elevation of each point in the surface point cloud layer, a reference point is selected in the surface point cloud layer.
3. A point cloud data processing method according to claim 2, characterized in that: The step of clustering the continuous point cloud data in each grid to obtain a plurality of point cloud layers includes: In each of the grids, a first elevation of each point in the continuous point cloud data is calculated, and according to the first elevation, the continuous point cloud data in each of the grids are clustered into different point cloud layers.
4. A point cloud data processing method according to claim 3, characterized in that: The step of determining a surface point cloud layer corresponding to the ground surface from among the plurality of point cloud layers comprises: In each of the point cloud layers, a point cloud layer where points whose first elevation is less than a preset value are located is selected as a surface point cloud layer.
5. A point cloud data processing method according to claim 3, characterized in that: The step of selecting a reference point in the surface point cloud layer according to the elevation of each point in the surface point cloud layer comprises: A point with the largest value of the first elevation is selected from the surface point cloud layer as a reference point.
6. A point cloud data processing method according to claim 3, characterized in that: The screening process of the target point cloud layer includes: In each of the grids, a target point cloud layer is screened out from the point cloud layer according to the first elevation of each point, a preset elevation threshold and the reference point.
7. A point cloud data processing method according to claim 6, characterized in that: The step of selecting a target point cloud layer from the point cloud layer according to the first elevation of each point, a preset elevation threshold and the reference point in each grid comprises: In each of the grids, from each point in each of the point cloud layers, a target point with the lowest first elevation is selected, a first difference between the first elevation of the target point and the first elevation of the reference point is calculated, and it is determined whether the first difference is greater than or equal to the elevation threshold; If so, the point cloud layer where the target point is located is marked as the target point cloud layer.
8. A point cloud data processing method according to claim 1, characterized in that: The step of determining the target range according to the currently traversed point and the preset distance includes: A vertical line between the currently traversed point and the horizontal plane where the reference point is located is used as an axis, and a preset distance is used as a radius to determine a cylindrical range, and the cylindrical range is used as a target range.
9. A point cloud data processing method according to claim 1, characterized in that: The step of judging whether the currently traversed point is a suspended point classified as a suspended object according to the number and the total number of all points within the target range includes: It is determined whether the ratio of the number to the total number is greater than a preset ratio. If so, the currently traversed point is determined as a suspended point of a suspended object category.
10. A point cloud data processing device, characterized in that: Includes point cloud generation module, rasterization module, culling module and model generation module; The point cloud generation module is used to obtain a target image and generate point cloud data according to the target image, wherein the target image is an image obtained by photographing the target area; The rasterization module is used to rasterize the point cloud data to obtain a plurality of grids of preset sizes, and determine a reference point in each of the grids; The elimination module is used to mark the point cloud data classified as suspended objects in each of the grids according to the reference point cloud and a preset elevation threshold, and eliminate the point cloud data classified as suspended objects to obtain target point cloud data, wherein the elimination module is specifically used to: traverse each point in the target point cloud layer, and for the currently traversed point, determine the target range according to the currently traversed point and a preset distance, calculate the second difference between the first elevation of the currently traversed point and the first elevation of other points in the target range, count the number of other points whose second difference is greater than the preset threshold, and determine whether the currently traversed point is a suspended point classified as suspended objects according to the number and the total number of all points in the target range, and if so, mark it, wherein the target point cloud layer is obtained by screening multiple point cloud layers, and the multiple point cloud layers are obtained by clustering the continuous point cloud data in each of the grids; The model generation module is used to generate a digital surface model corresponding to the target area based on the target point cloud data.
11. A terminal device, characterized in that: The terminal device includes a processor and a memory; The memory is used to store a computer program and transmit the computer program to the processor; The processor is used to execute a point cloud data processing method as described in any one of claims 1 to 9 according to the instructions in the computer program.
12. A storage medium storing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to perform a point cloud data processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Construction method and device of digital elevation model, equipment and storage medium
CN112907744A
Streetscape ground object multi-dimensional extraction method and system based on point cloud data
CN113963259A