Boundary detection method, device, electronic device and computer readable storage medium
By screening and segmenting the original point cloud data, and generating a plot comparison map for review and correction, the problem of low accuracy in plot boundary mapping is solved and higher accuracy is achieved.
Patent Information
- Application Number
- CN202210216828.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-07
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2042-03-07
AI Technical Summary
In the prior art, the plot boundary drawing method has low accuracy due to the uncertainty of plot boundary.
By obtaining the original point cloud data of the region to be tested, screening and preprocessing, using the segmentation algorithm to segment the plot, extracting the plot data, and generating a plot comparison chart, reviewing and correcting, and finally delineating the plot boundary.
The accuracy of plot boundaries is improved and the problem of low mapping accuracy caused by uncertainty in plot boundaries is solved.
Smart Images

Figure CN114581464B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a boundary detection method, device, electronic device and computer-readable storage medium. Background Art
[0002] A plot is one of the cadastral units in the land classification. The plot boundary data can describe and display the plot elements of real agricultural scenes. It can also be used in the plant protection operations of agricultural robots, drones, etc. For example, the operation scope can be determined based on the plot boundary data, and the operation route can be planned. At present, the plot boundary drawing method is usually used to draw the plot boundaries of each area to be measured. However, these methods are prone to low accuracy of the plot boundaries due to the uncertainty of the plot boundaries. Summary of the invention
[0003] In view of this, an object of the present invention is to provide a boundary detection method, device, electronic device and computer-readable storage medium, which can improve the problem of low accuracy of plot boundaries drawn by current plot drawing methods due to uncertainty in plot boundaries.
[0004] In order to achieve the above objectives, the technical solutions adopted by the embodiments of the present invention are as follows.
[0005] In a first aspect, an embodiment of the present invention provides a boundary detection method, which adopts the following technical solution.
[0006] A boundary detection method, comprising:
[0007] Obtain the original point cloud data of the area to be measured;
[0008] Screening the original point cloud data to obtain point cloud data to be tested;
[0009] Based on the point cloud data to be measured, a preset segmentation algorithm is used to segment the land parcels and then extract the land parcel data;
[0010] Generate a plot comparison map according to the point cloud data to be measured and the plot data;
[0011] Based on the plot comparison map, the plot data is reviewed and revised, and the plot boundaries of the area to be measured are depicted.
[0012] Furthermore, the segmentation algorithm includes a color-based region growing segmentation algorithm and a region growing-based point cloud segmentation algorithm. The step of extracting the plot data after performing plot segmentation based on the point cloud data to be measured by using a preset segmentation algorithm includes:
[0013] Based on the point cloud data to be measured, using the color-based region growing segmentation algorithm to perform land parcel identification and segmentation, and extract first segmentation data;
[0014] Based on the first segmentation data, secondary plot segmentation is performed using the region growing-based point cloud segmentation algorithm to extract plot data.
[0015] Furthermore, the plot comparison map includes a two-dimensional orthophoto map and a three-dimensional scene map, the plot data includes boundary data of each plot obtained by segmentation, and the three-dimensional scene map and the two-dimensional orthophoto map both include boundary data of the plot;
[0016] The step of reviewing and correcting the plot data based on the plot comparison map and depicting the plot boundaries of the area to be measured includes:
[0017] Linking and controlling the two-dimensional orthophoto map and the three-dimensional scene map;
[0018] Hide the data in the three-dimensional scene image whose elevation exceeds a preset value from the ground surface, obtain the three-dimensional image to be drawn, and use the two-dimensional orthophoto image as the image image to be drawn;
[0019] Enlarging the three-dimensional image to be drawn by a preset multiple, drawing a boundary line of the land parcel on the three-dimensional image to be drawn and the image image to be drawn in combination with the boundary data of the land parcel, wherein the boundary line of the land parcel includes a plurality of boundary points;
[0020] Determine whether each boundary point on the boundary line of the plot meets the preset rules, and if not, display the boundary points on the image map to be drawn and the three-dimensional map to be drawn that do not meet the preset rules as abnormal points;
[0021] The target boundary points are determined by combining the three-dimensional map to be drawn and the image map to be drawn, and the abnormal points are replaced by the target boundary points to complete the plot boundary drawing.
[0022] Furthermore, the step of determining the target boundary point includes:
[0023] According to the position of the abnormal point, determining the area where the abnormal point is located in the three-dimensional image to be drawn and the image image to be drawn;
[0024] After the area where the abnormal point is located is magnified to a preset resolution, the boundary point between the plot where the abnormal point is located and the adjacent plot is determined;
[0025] The intersection point is used as the target boundary point.
[0026] Furthermore, the land parcel includes a plurality of categories, each category corresponds to a preset rule, the land parcel data also includes the category of each land parcel, and the preset rule includes an elevation difference threshold;
[0027] The step of determining whether each boundary point on the boundary line of the plot meets the preset rules includes:
[0028] The elevation difference between adjacent boundary points on the boundary line of the plot is calculated. If the elevation difference is greater than the elevation difference threshold corresponding to the category to which the plot belongs, the adjacent boundary points do not meet the preset rules.
[0029] Furthermore, the step of screening the original point cloud data to obtain the point cloud data to be tested includes:
[0030] Using a filtering method to filter the original point cloud data to obtain filtered point cloud data;
[0031] The data whose elevation from the ground surface exceeds a preset threshold in the filtered point cloud data are excluded.
[0032] Furthermore, the filtering method includes at least one of a statistical filtering method, a bilateral filtering method, a Gaussian filtering method and a radius filtering method.
[0033] In a second aspect, an embodiment of the present invention provides a boundary detection device, which adopts the following technical solution.
[0034] A boundary detection device comprises a preprocessing module, a segmentation module and a drawing module;
[0035] The preprocessing module is used to obtain the original point cloud data of the area to be measured, and screen the original point cloud data to obtain the point cloud data to be measured;
[0036] The segmentation module is used to extract the plot data after segmenting the plots based on the point cloud data to be measured by using a preset segmentation algorithm, wherein the plot data includes the number of plots and the plot boundary data;
[0037] The drawing module is used to generate a plot comparison map based on the point cloud data to be measured and the plot data, review and correct the plot data based on the plot comparison map, and depict the plot boundaries of the area to be measured.
[0038] In a third aspect, an embodiment of the present invention provides an electronic device, which adopts the following technical solution.
[0039] An electronic device comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the boundary detection method as described in the first aspect.
[0040] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which adopts the following technical solution.
[0041] A computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the boundary detection method as described in the first aspect.
[0042] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: the original point cloud data of the area to be measured is screened to obtain the point cloud data to be measured, the interference data in the original point cloud data is screened out, and then the point cloud data to be measured is segmented by a segmentation algorithm to extract the plot data, thereby generating a plot comparison map in combination with the point cloud data to be measured, and then the plot data is further corrected according to the plot comparison map to depict the plot boundaries of the area to be measured, so that the drawn plot boundaries are more accurate, which greatly improves the problem of low accuracy of the drawn plot boundaries due to the uncertainty of the plot boundaries.
[0043] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0045] Figure 1 A block diagram of a boundary detection system provided by an embodiment of the present invention is shown.
[0046] Figure 2 A block diagram of an electronic device provided by an embodiment of the present invention is shown.
[0047] Figure 3 A schematic flow chart of a boundary detection method provided by an embodiment of the present invention is shown.
[0048] Figure 4 Shows Figure 3 Schematic diagram of the process of some sub-steps of step S103.
[0049] Figure 5 Shows Figure 3 Schematic diagram of the flow chart of some sub-steps of step S105.
[0050] Figure 6 Shows Figure 3Schematic diagram of the process of some sub-steps of step S109.
[0051] Figure 7 A schematic diagram showing the linkage between a two-dimensional orthophoto map and a three-dimensional scene map is shown.
[0052] Figure 8 Shows Figure 6 Flow chart of some sub-steps of step S109-4.
[0053] Fig. 9 Shows Figure 6 Schematic diagram of the process of some sub-steps of step S109-6.
[0054] Fig.10 A block diagram of a boundary detection device provided by an embodiment of the present invention is shown.
[0055] Icons: 100 - boundary detection system; 110 - acquisition device; 120 - electronic device; 130 - memory; 140 - processor; 150 - communication module; 160 - boundary detection device; 170 - preprocessing module; 180 - segmentation module; 190 - drawing module. DETAILED DESCRIPTION
[0056] The following will be combined with the accompanying drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0057] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0058] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0059] In addition to displaying and describing the plot elements of the real operation scene, the plot boundary data can also be used in the plant protection operations of agricultural robots, drones, etc. For example, intelligent machinery such as agricultural robots and drones can determine the operation scope based on the plot boundary data, thereby planning the operation route.
[0060] Currently, the plot boundary drawing method is generally used to draw the boundaries of each plot in each region to obtain the plot boundary and plot situation. However, these methods are prone to low accuracy of the plot boundary drawn due to the uncertainty of the plot boundary.
[0061] Based on the above considerations, an embodiment of the present invention provides a boundary detection solution, which draws the plot boundaries by screening the original point cloud data of the area to be measured, segmenting it using an algorithm, and reviewing and correcting the segmented plot data, so as to improve the problem of low accuracy of plot boundaries drawn by existing plot boundary drawing methods.
[0062] Please refer to Figure 1 , is a block diagram of a boundary detection system 100 provided in an embodiment of the present invention, and the boundary detection method provided in an embodiment of the present invention is applied to the boundary detection system 100. The boundary detection system 100 includes a collection device 110 and an electronic device 120, and the collection device 110 and the electronic device 120 can be connected in communication via a near field communication device, a network, a bus, etc.
[0063] The acquisition device 110 is used to acquire original point cloud data of the area to be measured and send the original point cloud data to the electronic device 120 .
[0064] The electronic device 120 is used to implement the boundary detection method provided by the embodiment of the present invention.
[0065] The acquisition device 110 may be, but is not limited to, a drone or a fixed shooting device equipped with a laser radar. The electronic device 120 may be, but is not limited to, a personal computer, a laptop, an iPad, a wearable device, and a server. The server may be an independent server or a server cluster.
[0066] It should be understood that in other implementations, the electronic device 120 and the acquisition device 110 may be integrated into one.
[0067] Please refer to Figure 2 , is a block diagram of an electronic device 120. The electronic device 120 includes a memory 130, a processor 140, and a communication module 150. The memory 130, the processor 140, and the communication module 150 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines.
[0068] The memory 130 is used to store programs or data. The memory 130 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0069] The processor 140 is used to read / write data, computer programs or machine executable instructions stored in the memory 130 and perform corresponding functions. Specifically, when the processor 140 executes the computer program or machine executable instructions in the memory 130, the boundary detection method provided by the embodiment of the present invention is implemented.
[0070] The communication module 150 is used to establish a communication connection between the electronic device 120 and other communication terminals through a network, and to send and receive data through the network.
[0071] It should be understood that Figure 2 The structure shown is only a schematic diagram of the structure of the electronic device 120. The electronic device 120 may also include Figure 2 More or fewer components as shown, or with Figure 1 Different configurations are shown. Figure 2 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0072] Please refer to Figure 3 , Figure 3 The flow chart of the boundary detection method provided by the embodiment of the present invention is as follows. Figure 1 and Figure 2 Taking the electronic device 120 in FIG. 1 as an example, the method may include the following steps.
[0073] S101, obtaining original point cloud data of the area to be measured.
[0074] There are many ways for the electronic device 120 to obtain the original point cloud data, for example, Figure 1 In the illustrated architecture, after the acquisition device 110 acquires the original point cloud data of the area to be measured, the original point cloud data may be sent to the electronic device 120, and the electronic device 120 receives the original point cloud data. For another example, in other implementations, the electronic device 120 may obtain the original point cloud data from a database storing the original point cloud data, or the user may input the original point cloud data to the electronic device 120.
[0075] S103, screening the original point cloud data to obtain the point cloud data to be tested.
[0076] After receiving the original point cloud data, the electronic device 120 screens the original point cloud data and obtains the point cloud data to be tested after eliminating some interference data. That is, the point cloud data to be tested is the point cloud data from which the interference data has been screened out.
[0077] S105, based on the point cloud data to be measured, using a preset segmentation algorithm to segment the land parcels and then extracting the land parcel data.
[0078] The preset segmentation algorithm can perform plot segmentation based on the point cloud data to be measured to extract the plot data.
[0079] S107, generating a plot comparison map according to the point cloud data to be measured and the plot data.
[0080] S109, based on the plot comparison map, the plot data is reviewed and corrected, and the plot boundaries of the area to be measured are depicted.
[0081] Since the plot data may have poor accuracy, the electronic device 120 generates a plot comparison map based on the point cloud data to be measured and the plot data, and then reviews and corrects the plot data based on the plot comparison map to depict the plot boundary of the plot to be measured.
[0082] In the above boundary detection method, the original point cloud data of the area to be measured is first screened to obtain the point cloud data to be measured, and the interference data in the original point cloud data is screened out. Then, the segmentation algorithm is used to segment the point cloud data to be measured, and the plot data is extracted, so as to generate a plot comparison map in combination with the point cloud data to be measured, and then the plot data is further corrected according to the plot comparison map to depict the plot boundary of the area to be measured, so that the plot boundary drawn is more accurate, which greatly improves the problem of low accuracy of the plot boundary drawn due to the uncertainty of the plot boundary.
[0083] It should be noted that after obtaining the original point cloud data, if the area of the area to be measured is large, for example, the area of the area to be measured exceeds the preset area, the preset area can be used as the basis for division. The original point cloud data can be divided into multiple smaller areas to be measured, and the original point cloud data of each smaller area to be measured can be processed by S103-S109 to depict the plot data of each area to be measured.
[0084] There are many ways to screen the original point cloud data, for example, filtering, denoising, setting selection rules, etc. In this embodiment, a feasible implementation of the above S103 is provided, referring to Figure 4 , Figure 4 This is a flowchart of some sub-steps of the above step S103. The original point cloud data can be screened through the following steps to obtain the point cloud data to be tested.
[0085] S103-1, using a filtering method to filter the original point cloud data to obtain filtered point cloud data.
[0086] For example, the original point cloud data is filtered to remove the hash points and independent points in the original point cloud data that will interfere with the subsequent segmentation algorithm to improve the target extraction accuracy.
[0087] S103-2, exclude the data whose elevation from the ground surface exceeds a preset threshold in the filtered point cloud data.
[0088] Since the land has a certain thickness, if trees, viaducts, buildings, etc. are much higher than the land, they may block part of the land. Therefore, a certain preset threshold is set to exclude the data whose elevation from the ground surface exceeds the preset threshold in the filtered point cloud data, so that trees, viaducts, buildings and other obstructions can be excluded.
[0089] It should be understood that point cloud data refers to a set of vectors in a three-dimensional coordinate system, so point cloud data itself has the attribute of elevation data, that is, elevation data can be obtained from point cloud data. In addition, point cloud data records the scanned data in the form of points, each point contains three-dimensional coordinates, color information, and even some points contain reflection intensity information.
[0090] In other implementations, the original point cloud data may be first filtered using a filtering method, and then the filtered point cloud data may be screened according to a set selection rule to obtain the point cloud data to be tested. Alternatively, the data may be screened according to a set selection rule and then filtered.
[0091] By excluding data such as hash points, independent points, and occlusions through filtering methods, the interference caused by the point cloud data itself can be reduced, while eliminating the interference of occlusions, which helps to improve the accuracy of drawing plot boundaries.
[0092] The filtering method in S103-2 can be flexibly selected, for example, it can include at least one of statistical filtering, bilateral filtering, Gaussian filtering and radius filtering.
[0093] The segmentation algorithm in S105 can flexibly select various clustering segmentation algorithms, segmentation algorithms based on point cloud frequency, region growing algorithms, point cloud segmentation algorithms, etc.
[0094] For example, in one embodiment, a color-based region growing segmentation algorithm and a region growing-based point cloud segmentation algorithm may be included. Figure 5 , which is a flow chart of some sub-steps of S105, including the following steps.
[0095] S105-1, based on the point cloud data to be measured, using a color-based region growing segmentation algorithm to perform land parcel identification and segmentation, and extract first segmentation data.
[0096] The first segmentation data includes each land parcel obtained by identification and segmentation, the boundary data of each land parcel, and the initial category of each land parcel, including cultivated land, forest, pond, lake, etc.
[0097] The color-based region growing segmentation algorithm is used to perform land parcel identification and segmentation according to the color information of each point in the point cloud data to be measured, and output first segmentation data about the land parcel segmentation.
[0098] Due to the growth of plants in a plot of land, the regions of the same plot generally have the same characteristics. For example, agricultural plots have the same crop planted in one plot, ponds contain water, and forests contain trees. The points in the point cloud data corresponding to plots with the same characteristics have the same color. Therefore, the color-based region growing segmentation algorithm can use the color information of the point cloud data as the basis to identify and segment the plots.
[0099] It should be understood that since the points in the point cloud data to be tested contain color information, and since there are multiple real objects corresponding to the points, the points corresponding to different real objects have different color information. Therefore, in addition to identifying and segmenting plots, the color-based region growing segmentation algorithm can also identify the attributes of each point, including trees, ponds, agricultural plots, grass, etc.
[0100] Therefore, based on the attributes of each identified point, semantic information is assigned to each point in the point cloud data to be tested. The semantic information refers to semantic information about the attribute. For example, if the attribute of the point is a tree, then the speech information of the point is a tree.
[0101] S105-2: Based on the first segmentation data, perform secondary plot segmentation using a point cloud segmentation algorithm based on region growing to extract plot data.
[0102] The land parcel data includes each land parcel obtained by secondary segmentation, the boundary data of each land parcel, and the category of each land parcel, including mountain, paddy field, dry land, pond, forest, lake, building, etc.
[0103] The point cloud segmentation algorithm based on region growing is used to segment the land according to the curvature value of the midpoint to be measured, and output the land data about the land segmentation. The curvature value of the point cloud data point is a measurement indicator of the terrain.
[0104] The point cloud data to be measured superimposed with the first segmentation data is input into the point cloud segmentation algorithm based on region growing, and on the basis of the first segmentation data, the plot is segmented again according to the curvature value of the point to obtain the plot data. The plot data is the data after further plot segmentation, that is, the data after refined segmentation.
[0105] For example, the first land segmentation is to identify agricultural land, and for large, medium or large-scale farms, the land also has the characteristics of flatness, standardization, and neatness, which are reflected in the point cloud data as the curvature value of the point. Therefore, after the second segmentation, the agricultural land can be specifically refined into mountainous land, dry land and paddy fields, and large, medium or large-scale agricultural land can be divided into smaller agricultural land.
[0106] In the above steps S105-1 to S105-2, the point cloud data to be tested is segmented for the second time by adopting the color-based region growing segmentation algorithm and the region growing-based point cloud segmentation algorithm, so as to segment the plots more accurately, further subdivide the plots, and obtain the type and boundary data of each subdivided plot.
[0107] It should be noted that, since semantic information has been assigned to each point in the point cloud data when the first segmentation data is obtained, the land parcel data obtained after the second segmentation also includes the semantic information of each point.
[0108] Furthermore, in other implementations, a point cloud segmentation algorithm based on region growing may be first used to perform the first plot segmentation, and then a color-based region growing segmentation algorithm may be used to perform the second plot segmentation.
[0109] In this embodiment, the plot comparison map can be flexibly selected. For example, the plot comparison map is a comparison between multiple maps of different dimensions, that is, the plot data is displayed on maps of different dimensions. In one embodiment, the plot comparison map can include a two-dimensional orthophoto map and a three-dimensional scene map.
[0110] For example, the point cloud data to be measured superimposed with the land parcel data are projected to obtain a two-dimensional orthophoto map, and a three-dimensional scene map can be obtained based on the point cloud data to be measured superimposed with the land parcel data.
[0111] The principle of orthophoto is to project the real world onto a two-dimensional plane according to certain mathematical rules to obtain a two-dimensional orthophoto.
[0112] At the same time, since the 2D orthophoto is obtained by projection, it is very easy to have occluded areas formed by tree canopies and other obstructions on the 2D orthophoto, resulting in uncertainty in the boundaries of the plots in the obstructed areas, which leads to poor accuracy in the drawn plot boundaries. Therefore, the 3D scene graph is combined to exclude obstructions that form the occluded areas, which helps to improve the effect of plot data review and correction.
[0113] It should be understood that both the three-dimensional scene graph and the two-dimensional orthophoto graph include the boundary data and the category of the land parcel.
[0114] For example, when drawing the boundary of a plot of land on a 3D scene graph and a 2D orthophoto map, the category of the plot of land will be displayed in the form of semantic information.
[0115] On this basis, with respect to S109, in one implementation, refer to Figure 6 and Figure 7 , Figure 6 It is a flowchart of some sub-steps of S109, including the following steps.
[0116] S109-1, linking and controlling the two-dimensional orthophoto map and the three-dimensional scene map.
[0117] Among them, linkage control means that when any of the two-dimensional orthophoto image and the three-dimensional scene image undergoes operations such as rotation, translation, sliding, zooming in, or zooming out, the same operation occurs synchronously on the other image.
[0118] In addition, the 2D orthophoto and 3D scene graphs are divided into tile data for loading and rendering. The 2D orthophoto adopts Google's tile segmentation rules, and the 3D scene graph adopts EPT's segmentation rules. This allows the 2D orthophoto and 3D scene graphs to be viewed by human eyes, and speeds up the efficiency of data transmission and display without affecting the display effect.
[0119] One implementation method of the linkage control is that the three-dimensional scene graph and the two-dimensional orthophoto image can be displayed on the screen of the electronic device 120 in a dual-view manner, that is, the three-dimensional scene graph and the two-dimensional orthophoto image are displayed simultaneously, and full-screen display of a single view is supported.
[0120] S109-2, hiding the data in the three-dimensional scene image whose elevation exceeds a preset value from the ground surface, obtaining the three-dimensional image to be drawn, and using the two-dimensional orthophoto image as the image image to be drawn.
[0121] The size of the preset value can be flexibly set according to actual processing requirements, and different regions can have different preset values. For example, in this embodiment, the preset value can be smaller than the preset threshold in the above step S103-2. If the preset threshold is 1.5m, the preset value can be 1m, which can further exclude obstructions that can block the boundaries of the plot, simplify the three-dimensional map to be drawn and the image map to be drawn, so as to reduce interference factors in the drawing process.
[0122] S109-3, enlarging the three-dimensional map to be drawn by a preset multiple, and drawing the boundary line of the plot on the three-dimensional map to be drawn and the image map to be drawn in combination with the boundary data of the plot.
[0123] After the three-dimensional map to be drawn is enlarged by a preset multiple, the three-dimensional map to be drawn and the image map to be drawn simultaneously reach the required resolution, and can clearly show the overall picture of the area to be drawn, so that boundary points can be drawn in the image map to be drawn and the three-dimensional map to be drawn according to the boundary data of the plot.
[0124] It should be understood that drawing a boundary point on one of the graphs will simultaneously draw a boundary point at a corresponding position on the other graph.
[0125] S109-4, determine whether each boundary point on the boundary line of the land parcel meets the preset rules. If not, execute S109-5, otherwise the drawing ends.
[0126] The preset rules are used to determine whether the boundary points are reasonable. Therefore, different boundary drawing requirements, such as different precisions, may have different preset rules.
[0127] S109-5, displaying the boundary points on the image map to be drawn and the three-dimensional map to be drawn that do not conform to the preset rules as abnormal points.
[0128] The logic for displaying abnormal points can be flexibly set. For example, in this embodiment, as long as the boundary points corresponding to the same boundary data do not meet the preset rules in at least one of the image map to be drawn and the three-dimensional map to be drawn, they are all displayed as abnormal points.
[0129] S109-6, combining the three-dimensional map to be drawn and the image map to be drawn, determining the target boundary points and replacing the abnormal points with the target boundary points to complete the plot boundary drawing.
[0130] It should be understood that after the plot boundary is drawn, the plot data will be updated synchronously to obtain the corrected plot data. After the drawing is completed, clicking any point within the plot boundary of a plot will display the type of the plot in the form of voice information, such as paddy field, mountain, etc.
[0131] Through the above steps S109-1 to S109-6, boundary lines are drawn on the three-dimensional map to be drawn and the image map to be drawn according to the plot data, and when at least one of the maps shows that the boundary points do not conform to the preset rules, the abnormal points that do not conform to the preset rules are corrected to make the drawn plot boundaries and the corrected plot data more accurate.
[0132] It should be noted that the boundary line of each plot can be drawn through the above S109-1 to S109-6. In addition, before drawing the boundary, you can first select the category of the plot, such as paddy field, etc. After drawing the boundary line of the selected plot, call the preset rules corresponding to the selected category, check the drawn boundary line of the plot, and highlight the abnormal points. It is also possible to check the drawn boundary points in real time based on the preset rules when drawing the boundary points.
[0133] Furthermore, since the land parcels include multiple categories, and different categories have their own characteristics, for example, the mountain is steep and the slope changes quickly, while the paddy field is flat and the slope changes slowly. Therefore, different categories have their own corresponding preset rules, that is, each category has a corresponding preset rule.
[0134] For example, in this embodiment, the preset rule may be related to the elevation change, that is, the preset rule may include an elevation difference threshold, that is, different types of plots have different elevation difference thresholds.
[0135] The plot data includes the number of plots obtained by segmentation, the type of plot and the boundary data of the plot.
[0136] Therefore, in one embodiment, referring to Figure 8 , which is a flowchart of some sub-steps of the above step S109-4.
[0137] S201, calculating the elevation difference between adjacent boundary points on the boundary line of the plot.
[0138] A plot boundary line includes multiple sets of adjacent boundary points, and a complete plot boundary line should be a closed line.
[0139] For example, there are 4 boundary points on the boundary line of the plot, and each boundary point and the adjacent boundary point form a group of adjacent boundary points, so there are 4 groups of adjacent boundary points in total, and these four groups of adjacent boundary points belong to the same plot. For each group of adjacent boundary points, execute S202.
[0140] S202: If the elevation difference is greater than the elevation difference threshold corresponding to the category to which the land parcel belongs, then the adjacent boundary points do not meet the preset rules.
[0141] That is, as long as the elevation difference is greater than the elevation difference threshold, the two boundary points corresponding to the elevation difference are determined to be abnormal points.
[0142] By determining abnormal points based on the elevation difference threshold, boundary points whose slope changes do not conform to the characteristics of the plot can be excluded, making the drawn plot boundaries more reasonable, thereby improving the accuracy of the plot data.
[0143] Optionally, the preset rule may further include a preset distance, that is, the interval length between boundary points cannot exceed the preset distance, for example, cannot exceed 100m. In addition, different types of plots have different preset distances.
[0144] In addition, both the 3D scene graph and the 3D graph to be drawn support viewing the cross-sectional view of the land parcel boundary, so as to analyze the elevation information of the land parcel boundary.
[0145] Furthermore, the method for determining the target boundary point can be flexibly selected, for example, it can include a set boundary point rule, a detection algorithm, etc. In this embodiment, the method for determining the target boundary point can be a set boundary point rule. Fig. 9 , which is a flowchart of some sub-steps of S109-6, the target boundary point is determined through the following steps.
[0146] S301, according to the position of the abnormal point, determine the area where the abnormal point is located in the three-dimensional map to be drawn and the image map to be drawn.
[0147] S302, after the area where the abnormal point is located is enlarged to a preset resolution, the boundary point between the plot where the abnormal point is located and the adjacent plot is determined.
[0148] Zooming in on the area where the outliers are located to a preset resolution can improve the accuracy of the determined intersection points to a certain extent.
[0149] S303, taking the intersection point as the target boundary point.
[0150] Through the above S301 to S303, the target boundary point can be determined more accurately.
[0151] When the abnormal points cannot be eliminated, a warning message may be issued to remind the user to make manual corrections. For example, the user may manually edit the obstructed plots by rotating the three-dimensional map and the image map to be drawn to complete the drawing.
[0152] The boundary detection method provided by the embodiment of the present invention obtains the plot data by using a segmentation algorithm, and then obtains a two-dimensional orthophoto map and a three-dimensional scene map by combining the point cloud data to be tested and the plot data, further reviews and corrects the plot data, and draws the plot boundary line, so as to obtain more accurate plot boundary lines and plot data, and is more efficient and convenient.
[0153] In addition, the data that may cause interference in the original point cloud data is excluded, so that the accuracy can be further improved. The final plot data contains elevation data and voice information.
[0154] It should be understood that although Figure 3-Figure 9 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 3-Figure 9 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0155] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing the boundary detection device 160 is given below. Optionally, the boundary detection device 160 can adopt the above Figure 2 The device structure of the electronic device 120 is shown. Fig.10 , Fig.10 This is a functional module diagram of a boundary detection device 160 provided in an embodiment of the present invention. It should be noted that the basic principle and technical effects of the boundary detection device 160 provided in this embodiment are the same as those of the above-mentioned embodiments. For the sake of brief description, for parts not mentioned in this embodiment, reference can be made to the corresponding contents in the above-mentioned embodiments. The boundary detection device 160 includes a preprocessing module 170, a segmentation module 180 and a drawing module 190.
[0156] The pre-processing module 170 is used to obtain the original point cloud data of the area to be measured, and screen the original point cloud data to obtain the point cloud data to be measured.
[0157] The segmentation module 180 is used to extract the plot data after segmenting the plots based on the point cloud data to be measured by using a preset segmentation algorithm.
[0158] The plot data includes the number of plots and the plot boundary data.
[0159] The drawing module 190 is used to generate a plot comparison map based on the point cloud data to be measured and the plot data, review and correct the plot data based on the plot comparison map, and depict the plot boundaries of the area to be measured.
[0160] Optionally, the above modules can be stored in the form of software or firmware. Figure 2 The memory 130 shown in the figure may be fixed in the operating system (OS) of the electronic device 120 and may be Figure 2 Meanwhile, the data and program codes required for executing the above modules may be stored in the memory 130.
[0161] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0162] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0163] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the 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 enabling 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 described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0164] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A boundary detection method, characterized in that: include: Obtain the original point cloud data of the area to be measured; Screening the original point cloud data to obtain point cloud data to be tested; Based on the point cloud data to be measured, a preset segmentation algorithm is used to segment the land parcels and then extract the land parcel data; Generate a plot comparison map according to the point cloud data to be measured and the plot data, wherein the plot comparison map is a comparison between multiple maps of different dimensions, that is, the plot data is displayed on maps of different dimensions and compared; wherein the plot comparison map includes a two-dimensional orthophoto map and a three-dimensional scene map, and both the three-dimensional scene map and the two-dimensional orthophoto map include boundary data of the plot; Based on the plot comparison map, the plot data is reviewed and corrected, and the plot boundaries of the area to be measured are depicted, including: Linking and controlling the two-dimensional orthophoto map and the three-dimensional scene map; Hiding data in the three-dimensional scene graph whose elevation exceeds a preset value from the ground surface, to obtain a three-dimensional graph to be drawn; According to the plot data, drawing a plot boundary line on the three-dimensional image to be drawn and the two-dimensional orthophoto image, wherein the plot boundary line includes a plurality of boundary points; Determine whether each of the boundary points on the boundary line of the plot meets the preset rules, and if not, display the boundary points that do not meet the preset rules on the two-dimensional orthophoto map and the three-dimensional map to be drawn as abnormal points; The abnormal points are corrected to complete the plot boundary drawing.
2. The boundary detection method according to claim 1, characterized in that: The segmentation algorithm includes a color-based region growing segmentation algorithm and a region growing-based point cloud segmentation algorithm. The step of extracting the plot data after performing plot segmentation based on the point cloud data to be measured by using a preset segmentation algorithm includes: Based on the point cloud data to be measured, using the color-based region growing segmentation algorithm to perform land parcel identification and segmentation, and extract first segmentation data; Based on the first segmentation data, secondary plot segmentation is performed using the region growing-based point cloud segmentation algorithm to extract plot data.
3. The boundary detection method according to claim 1 or 2, characterized in that: The plot data includes boundary data of each plot obtained by segmentation. The step of reviewing and correcting the plot data based on the plot comparison map and depicting the plot boundary of the area to be measured includes: Using the two-dimensional orthophoto map as the image map to be drawn; Enlarging the three-dimensional image to be drawn by a preset multiple, and drawing the boundary line of the land parcel on the three-dimensional image to be drawn and the image image to be drawn in combination with the boundary data of the land parcel; Determine whether each boundary point on the boundary line of the plot meets the preset rules, and if not, display the boundary points on the image map to be drawn and the three-dimensional map to be drawn that do not meet the preset rules as abnormal points; The target boundary points are determined by combining the three-dimensional map to be drawn and the image map to be drawn, and the abnormal points are replaced by the target boundary points to complete the plot boundary drawing.
4. The boundary detection method according to claim 3, characterized in that: The step of determining the target boundary point includes: According to the position of the abnormal point, determining the area where the abnormal point is located in the three-dimensional image to be drawn and the image image to be drawn; After the area where the abnormal point is located is magnified to a preset resolution, the boundary point between the plot where the abnormal point is located and the adjacent plot is determined; The intersection point is used as the target boundary point.
5. The boundary detection method according to claim 3, characterized in that: The land parcel includes a plurality of categories, each category corresponds to a preset rule, the land parcel data also includes the category of each land parcel, and the preset rule includes an elevation difference threshold; The step of determining whether each boundary point on the boundary line of the plot meets the preset rules includes: The elevation difference between adjacent boundary points on the boundary line of the plot is calculated. If the elevation difference is greater than the elevation difference threshold corresponding to the category to which the plot belongs, the adjacent boundary points do not meet the preset rules.
6. The boundary detection method according to claim 1, characterized in that: The step of screening the original point cloud data to obtain the point cloud data to be tested comprises: Using a filtering method to filter the original point cloud data to obtain filtered point cloud data; The data whose elevation from the ground surface exceeds a preset threshold in the filtered point cloud data are excluded.
7. The boundary detection method according to claim 6, characterized in that: The filtering method includes at least one of a statistical filtering method, a bilateral filtering method, a Gaussian filtering method and a radius filtering method.
8. A boundary detection device, characterized in that: Includes preprocessing module, segmentation module and drawing module; The preprocessing module is used to obtain the original point cloud data of the area to be measured, and screen the original point cloud data to obtain the point cloud data to be measured; The segmentation module is used to extract the plot data after segmenting the plots based on the point cloud data to be measured by using a preset segmentation algorithm, wherein the plot data includes the number of plots and the plot boundary data; The drawing module is used to generate a plot comparison map according to the point cloud data to be measured and the plot data, and based on the plot comparison map, review and correct the plot data, and depict the plot boundaries of the area to be measured. The plot comparison map is a comparison between multiple maps of different dimensions, that is, the plot data is displayed on maps of different dimensions and compared; wherein the plot comparison map includes a two-dimensional orthophoto map and a three-dimensional scene map, and both the three-dimensional scene map and the two-dimensional orthophoto map include the boundary data of the plot; The drawing module is further used for: Linking and controlling the two-dimensional orthophoto map and the three-dimensional scene map; Hiding data in the three-dimensional scene graph whose elevation exceeds a preset value from the ground surface, to obtain a three-dimensional graph to be drawn; According to the plot data, drawing a plot boundary line on the three-dimensional image to be drawn and the two-dimensional orthophoto image, wherein the plot boundary line includes a plurality of boundary points; Determine whether each of the boundary points on the boundary line of the plot meets the preset rules, and if not, display the boundary points that do not meet the preset rules on the two-dimensional orthophoto map and the three-dimensional map to be drawn as abnormal points; The abnormal points are corrected to complete the plot boundary drawing.
9. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the boundary detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the boundary detection method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Three-dimensional laser point cloud data processing system
CN110132168A