Building area determination method and apparatus, electronic device, and storage medium
By acquiring DSM data and utilizing edge detection algorithms and building height thresholds, building area attributes are determined, solving the problems of high cost and low efficiency in existing technologies, and achieving efficient and accurate building area determination.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG HUITIAN AEROSPACE TECH CO LTD
- Filing Date
- 2022-12-19
- Publication Date
- 2026-05-08
AI Technical Summary
Existing technologies for determining building areas are costly and inefficient, especially those based on deep learning, machine learning, the combination of DSM and DEM, and image processing methods, which suffer from low accuracy or high cost.
By acquiring digital surface model (DSM) data and using edge detection algorithms to detect edge information, combined with estimated ground elevation values and building height thresholds, the attributes of building areas are determined. This reduces the reliance on image pixel texture information and improves the efficiency and accuracy of building area determination.
By identifying building areas solely through DSM data, costs are reduced and efficiency is improved. This overcomes the problems of noise points and incomplete extraction in existing technologies, achieving higher accuracy and efficiency.
Smart Images

Figure CN116029991B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a method, apparatus, electronic device, and storage medium for determining a building area. Background Technology
[0002] With the continuous development of economic construction, urban construction is in full swing, and urban changes are frequent and dramatic. To facilitate understanding the distribution of urban buildings for urban planning and monitoring urban development, the relevant technologies address the issue of identifying building areas. Summary of the Invention
[0003] In view of the above problems, this application proposes a method, apparatus, electronic device and storage medium for determining building areas, which can determine building areas through DSM data, thereby reducing the cost of determining building areas and improving the efficiency of building area determination.
[0004] In a first aspect, embodiments of this application provide a method for determining a building area, the method comprising: acquiring digital surface model (DSM) data; performing edge detection on the DSM data based on an edge detection algorithm to obtain edge information of the DSM data; obtaining an estimated ground elevation value corresponding to the DSM data based on the DSM data; traversing the DSM data based on the edge information; if non-edge information is determined to be traversed into the DSM data based on the edge information, then obtaining the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value; determining the building area attribute of the non-edge location based on the relationship between the difference and a building height threshold, wherein the building area attribute includes belonging to a building area or belonging to a non-building area.
[0005] Secondly, embodiments of this application provide a building area determination device, the device comprising: a DSM data acquisition module, an edge information acquisition module, an estimated ground elevation value acquisition module, a DSM data traversal module, a non-edge information determination module, and a building area attribute determination module. The DSM data acquisition module is used to acquire Digital Surface Model (DSM) data; the edge information acquisition module is used to perform edge detection on the DSM data based on an edge detection algorithm to obtain edge information of the DSM data; the estimated ground elevation value acquisition module is used to obtain an estimated ground elevation value corresponding to the DSM data based on the DSM data; the DSM data traversal module is used to traverse the DSM data based on the edge information; the non-edge information determination module is used to obtain the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value if non-edge information is determined to be traversed into the DSM data based on the edge information; and the building area attribute determination module is used to determine the building area attribute of the non-edge location based on the relationship between the difference and a building height threshold, wherein the building area attribute includes belonging to a building area or belonging to a non-building area.
[0006] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory is coupled to the processor, the memory stores instructions, and when the instructions are executed by the processor, the processor performs the above-described method.
[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing program code, which can be invoked by a processor to execute the above-described method.
[0008] The building area determination method, apparatus, electronic device, and storage medium provided in this application embodiment acquire digital surface model (DSM) data, perform edge detection on the DSM data based on an edge detection algorithm to obtain edge information of the DSM data, obtain estimated ground elevation values corresponding to the DSM data based on the DSM data, traverse the DSM data based on the edge information, if non-edge information is determined in the traversed DSM data based on the edge information, obtain the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value, and determine the building area attribute of the non-edge location based on the relationship between the difference and a building height threshold. The building area attribute includes belonging to a building area or belonging to a non-building area. Thus, the building area is determined only through DSM data, reducing the cost of determining the building area and improving the efficiency of determining the building area. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 A flowchart illustrating a method for determining a building area according to an embodiment of this application is shown;
[0011] Figure 2 A flowchart illustrating a method for determining a building area according to an embodiment of this application is shown;
[0012] Figure 3 A flowchart illustrating a method for determining a building area according to an embodiment of this application is shown;
[0013] Figure 4 A flowchart illustrating a method for determining a building area according to an embodiment of this application is shown;
[0014] Figure 5 A flowchart illustrating a method for determining a building area according to an embodiment of this application is shown;
[0015] Figure 6 A flowchart illustrating a method for determining a building area according to an embodiment of this application is shown;
[0016] Figure 7 A block diagram of a building area determination device according to an embodiment of this application is shown;
[0017] Figure 8 A block diagram of an electronic device for performing a building area determination method according to an embodiment of this application is shown;
[0018] Figure 9 A storage unit for storing or carrying program code implementing the building area determination method according to an embodiment of this application is shown. Detailed Implementation
[0019] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0020] To facilitate understanding of urban building distribution for city planning and monitoring urban development, related technologies involve identifying building areas. Understandably, identifying building areas helps vehicles navigate around them, ensuring user safety; additionally, users can extract building information to understand the distribution of urban buildings, thus aiding in urban planning and monitoring urban development.
[0021] In related technologies, there are methods to obtain building areas using deep learning or machine learning. However, it is understandable that although deep learning or machine learning can extract buildings to a certain extent, it requires the prior construction of samples for training models. Moreover, buildings are diverse in terms of shape and color, and their textures are similar to those of roads or bare ground. Therefore, obtaining building areas through conventional deep learning or machine learning methods is costly and inefficient.
[0022] In addition, some related technologies utilize a combination of Digital Surface Model (DSM) and Digital Elevation Model (DEM) to identify buildings. While the DSM-DEM combination method uses height information to identify buildings, its accuracy depends heavily on the accuracy of the DEM data. However, obtaining DEM data is typically difficult and limited, resulting in high costs and low efficiency in determining building areas.
[0023] Furthermore, while some related technologies combine image processing methods with DSM (Discrete Modeling) to extract buildings, these image processing methods suffer from low accuracy. For example, edge detection is performed on RGB images, and then contour information is used to extract buildings. However, edge detection based on RGB images is susceptible to interference from building shadows or multiple colors of the same building, resulting in inaccurate extraction of building edge information. Therefore, building extraction based on a combination of image processing methods and DSM suffers from low accuracy.
[0024] To address the aforementioned problems, the inventors, through long-term research, discovered and proposed the building area determination method, apparatus, electronic device, and storage medium provided in the embodiments of this application. This method determines building areas solely through DSM data, reducing the cost and improving the efficiency of building area determination. The specific building area determination method will be described in detail in subsequent embodiments.
[0025] Please see Figure 1 , Figure 1A flowchart illustrating a building area determination method according to an embodiment of this application is shown. This building area determination method determines building areas solely through DSM data, reducing the cost and improving the efficiency of building area determination. In specific embodiments, this building area determination method can be applied to, for example... Figure 7 The building area determination device 200 and the electronic device 100 equipped with the building area determination device 200 are shown. Figure 8 The following will use an electronic device as an example to illustrate the specific process of this embodiment. Of course, it is understood that the electronic device used in this embodiment may include smartphones, tablets, wearable electronic devices, vehicles, etc., and is not limited thereto. The following will focus on... Figure 1 The process shown will be explained in detail. The method for determining the building area may specifically include the following steps:
[0026] Step S110: Obtain Digital Surface Model (DSM) data.
[0027] In some implementations, the electronic device may include a LiDAR (Light Detection and Ranging) system. The LiDAR system can actively transmit and receive laser pulses to acquire Digital Elevation Model (DSM) data that approximates the actual terrain features. The DSM data may include ground elevation model data that incorporates the heights of surface structures, bridges, and trees, and may include acoustic information of the terrain as well as other surface information besides the ground surface. The DSM data may also include image data and ground elevation values at different locations.
[0028] Optionally, electronic devices can acquire Digital Surface Model (DSM) data using LiDAR technology or image matching methods. For example, electronic devices can obtain raw point cloud data based on LiDAR technology and further extract feature points from the raw point cloud data as the data foundation to construct DSM data in the ArcGIS platform.
[0029] Step S120: Perform edge detection on the DSM data based on the edge detection algorithm to obtain the edge information of the DSM data.
[0030] In some implementations, after acquiring DSM data, the electronic device can perform edge detection on the DSM data based on an edge detection algorithm to obtain the edge information included in the DSM data. The edge information can be understood as the location of changes in ground elevation values within a preset range in the DSM data; or it can be understood as the edge values of areas of ground elevation change in the DSM data. The edge information may include DSM data of points located at edge positions; or it may be an edge rendering corresponding to the DSM data. The electronic device may have pre-set edge detection algorithms, such as differential edge detection methods, differential edge detection methods, Roberts edge detection operators, Sobel edge detection operators, Prewitt edge detection operators, Laplacian edge detection operators, and Canny edge detection operators.
[0031] For example, DSM data can be DSM image data. Furthermore, the electronic device performs edge detection on the DSM data based on an edge detection algorithm to obtain the edge information of the DSM data. This can be achieved by performing edge detection on the DSM image data based on the Canny edge detection operator to obtain the edge effect map of the DSM image data.
[0032] Step S130: Obtain the estimated ground elevation value corresponding to the DSM data based on the DSM data.
[0033] In some implementations, after obtaining DSM data, the electronic device can obtain the estimated ground elevation value corresponding to the DSM data. Specifically, the electronic device can calculate the average, median, mode, arithmetic mean, and minimum of the ground elevation values included in the DSM data as the estimated ground elevation value corresponding to the DSM data.
[0034] Step S140: Traverse the DSM data based on the edge information.
[0035] In some implementations, after obtaining the edge information corresponding to the DSM information, the electronic device can traverse the DSM data based on the edge information. This traversal based on edge information can involve traversing the DSM data and determining whether the current position of the traversed DSM data belongs to edge information based on the edge information.
[0036] Step S150: If non-edge information is determined to be traversed in the DSM data based on the edge information, then the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value is obtained.
[0037] In some implementations, electronic devices traverse DSM data based on edge information. If the traversal of the DSM data determines that it is non-edge information, the difference between the ground elevation value corresponding to this non-edge information and the estimated ground elevation value is obtained. Specifically, the electronic device traverses the DSM data, comparing the data at the current location with the edge information. If the edge information determines that the current location of the traversed DSM data does not belong to edge information, then non-edge information is identified within the traversed DSM data. Furthermore, the electronic device can obtain the difference between the ground elevation value corresponding to this non-edge information and the estimated ground elevation value.
[0038] Step S160: Based on the relationship between the difference and the building height threshold, determine the building area attribute of the non-edge location, wherein the building area attribute includes belonging to a building area or belonging to a non-building area.
[0039] In some implementations, electronic devices are pre-set with building height thresholds. After obtaining the difference between the ground elevation value corresponding to non-edge information and the estimated ground elevation value, the electronic device can compare this difference with the building height threshold to obtain the relationship between the difference and the building height threshold. This relationship can include a difference greater than the building height threshold, or a difference less than or equal to the building height threshold.
[0040] The relationship between the difference and the building height threshold can be used as a basis for determining the building area attributes of non-edge locations; the building area attributes include belonging to a building area or belonging to a non-building area. For example, if the difference is greater than the building height threshold, the building area attribute of the non-edge location is determined to belong to a building area; if the difference is less than or equal to the building height threshold, the building area attribute of the non-edge location is determined to belong to a non-building area.
[0041] One embodiment of this application provides a method for determining building areas. This method acquires Digital Surface Model (DSM) data, performs edge detection on the DSM data using an edge detection algorithm to obtain edge information, obtains estimated ground elevation values corresponding to the DSM data, and iterates through the DSM data based on the edge information. If non-edge information is identified in the traversed DSM data based on the edge information, the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value is obtained. Based on the relationship between the difference and a building height threshold, the building area attribute of the non-edge location is determined. The building area attribute includes whether it belongs to a building area or a non-building area. This method determines the building area using only DSM data, reducing the cost and improving the efficiency of determining building areas.
[0042] Please see Figure 2 , Figure 2A flowchart illustrating a method for determining a building area according to an embodiment of this application is shown. This method is applied to the aforementioned electronic device, and will be discussed below. Figure 2 The process shown will be explained in detail. The method for determining the building area may specifically include the following steps:
[0043] Step S210: Obtain Digital Surface Model (DSM) data.
[0044] Step S220: Perform edge detection on the DSM data based on the edge detection algorithm to obtain the edge information of the DSM data.
[0045] For a detailed description of steps S210-S220, please refer to the description of steps S110-S120 above, which will not be repeated here.
[0046] Step S230: Obtain the average value of the ground elevation in the DSM data.
[0047] In some implementations, after acquiring DSM data, the electronic device can obtain the average value of the ground elevation values in the DSM data.
[0048] Step S240: Determine the average value as the estimated ground elevation value corresponding to the DSM data.
[0049] In some implementations, after the electronic device obtains the average value of the ground elevation values in the DSM data, it can determine the average value as the estimated ground elevation value corresponding to the DSM data.
[0050] Step S250: Traverse the DSM data based on the edge information.
[0051] In some implementations, after acquiring edge information, electronic devices can traverse DSM data and determine whether the current position of the traversed DSM data belongs to edge information based on the edge information.
[0052] In some implementations, after obtaining the estimated ground elevation value, the electronic device can determine whether to replace the estimated ground elevation value with the ground elevation value of the area surrounding the current location, based on whether the current location of the DSM data belongs to the edge information determined by the edge information.
[0053] In some implementations, please refer to Figure 3 The building area determination method provided in this application embodiment may further include steps S2510-S2530.
[0054] Step S2510: If edge information is determined to be traversed in the DSM data based on the edge information, then a target window is obtained with the position corresponding to the edge information as the center.
[0055] In some implementations, if the electronic device determines the edge information traversed in the DSM data based on edge information, a target window is obtained centered on the position corresponding to the edge information. The electronic device may pre-set the size of the target window, such as 7, 8, or 9. For example, the electronic device may pre-set the size of the target window, such as a window of size ksize, where ksize is a base number, such as 7; if the electronic device determines the edge information traversed in the DSM data based on edge information, a target window of size 7 is obtained centered on the position corresponding to the edge information.
[0056] Step S2520: Obtain the target ground elevation value based on the DSM data in the target window.
[0057] In some implementations, after obtaining the target window, the electronic device can obtain the target ground elevation value based on the DSM data in the target window. Optionally, the electronic device can calculate the average, maximum, minimum, median, etc., of the ground elevation values in the DSM data in the target window as the target ground elevation value.
[0058] In this process, after the electronic device determines the edge information, it obtains the target window and obtains the target ground elevation value based on the target window. This can be understood as the electronic device, after obtaining the edge information, further searching the surrounding area of the location corresponding to the edge information to obtain the target ground elevation value of the surrounding area of the location corresponding to the edge information.
[0059] In some implementations, please refer to Figure 4 Step S2520 may include steps S2521-S2522.
[0060] Step S2521: Obtain the minimum ground elevation value in the DSM data in the target window.
[0061] In some implementations, after obtaining the target window, the electronic device can acquire the minimum ground elevation value in the DSM data within that target window.
[0062] Step S2522: Determine the minimum ground elevation value as the target ground elevation value.
[0063] In some implementations, the electronic device obtains the minimum ground elevation value in the DSM data within the target window, and can determine this minimum ground elevation value as the target ground elevation value.
[0064] In this process, after the electronic device determines the edge information, it obtains the target window and obtains the target ground elevation value based on the target window. This can be understood as the electronic device, after obtaining the edge information, further searching the surrounding area of the location corresponding to the edge information and obtaining the minimum ground elevation value of the surrounding area of the location corresponding to the edge information as the target ground elevation value.
[0065] Step S2530: If the absolute value of the difference between the target ground elevation value and the estimated ground elevation value is less than the difference threshold, then the target ground elevation value replaces the estimated ground elevation value as the new estimated ground elevation value.
[0066] In some implementations, after obtaining the target ground elevation value, the electronic device can further calculate the absolute value of the difference between the target ground elevation value and the estimated ground elevation value, and compare the absolute value of the difference with a difference threshold to obtain the relationship between the absolute value of the difference and the difference threshold. The electronic device may have a pre-set difference threshold, and the relationship between the absolute value of the difference and the difference threshold can be used as a basis for determining whether to replace the estimated ground elevation value with the target ground elevation value as the new estimated ground elevation value. For example, if the absolute value of the difference between the target ground elevation value and the estimated ground elevation value is less than the difference threshold, then the target ground elevation value replaces the estimated ground elevation value as the new estimated ground elevation value; if the absolute value of the difference is greater than or equal to the difference threshold, then the target ground elevation value does not replace the estimated ground elevation value.
[0067] Understandably, when the absolute difference between the target ground elevation value and the estimated ground elevation value is less than the difference threshold, the target ground elevation value replaces the estimated ground elevation value as the new estimated ground elevation value; otherwise, the estimated ground elevation value is not updated. This is to avoid interference from situations such as buildings or ditches above buildings that could affect the determination of building areas based on DSM data, thereby improving the accuracy of determining building areas.
[0068] Step S260: If non-edge information is determined to be traversed in the DSM data based on the edge information, then the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value is obtained.
[0069] For a detailed description of step S260, please refer to the previous description of step S150, which will not be repeated here.
[0070] Step S270: Based on the relationship between the difference and the building height threshold, determine the building area attribute of the non-edge location, wherein the building area attribute includes belonging to a building area or belonging to a non-building area.
[0071] In some implementations, after the electronic device obtains the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value, it can compare the difference with a building height threshold to obtain the relationship between the difference and the building height threshold, and further determine the building area attribute of the non-edge location based on the relationship between the difference and the building height threshold.
[0072] In some implementations, step S270 may include steps S2710 and S2720, or steps S2710 and S2730.
[0073] Step S2710: If the difference is greater than the building height threshold, then obtain the slope value of the non-edge location based on the DSM data.
[0074] In some implementations, after the electronic device obtains the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value, it can compare the difference with a building height threshold. If the difference is greater than the building height threshold, the electronic device can further obtain the slope value of the non-edge location based on the DSM data.
[0075] The methods for representing slope include percentage method, degree method, mil method, and fractional method. The percentage method for slope can be based on the percentage of the elevation difference between two locations to the horizontal distance between them; the slope calculation formula can be: Slope = (Elevation difference / Horizontal distance) x 100%. Optionally, electronic equipment obtains the slope value of non-edge locations based on DSM data, which can be based on both DSM data and the slope calculation formula.
[0076] In some implementations, please refer to Figure 5 Step S2710 may include steps S2711-S2712.
[0077] Step S2711: If the difference is greater than the building height threshold, the slope of the DSM data is calculated based on the preset slope algorithm to obtain the slope map corresponding to the DSM data.
[0078] In some implementations, if the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value is greater than a building height threshold, the electronic device can calculate the slope of the DSM data based on a preset slope algorithm to obtain a slope map corresponding to the DSM data. The electronic device can have a preset slope algorithm pre-set, such as a VGG network model or a convolutional neural network model. For example, the electronic device can obtain the slope map corresponding to the DSM data by first obtaining the side length of the largest feature within the area corresponding to the DSM data, then using this side length as the regular grid size to construct a regular grid that traverses the entire point cloud area corresponding to the DSM data, extracting the lowest elevation point in each grid, placing it into a sparse ground point set, and then using this set of ground points in the ArcGIS software platform to interpolate and generate 1m resolution DSM data, thereby generating the slope map corresponding to the DSM data.
[0079] Step S2712: Obtain the slope value of the non-edge location based on the slope map.
[0080] Furthermore, after obtaining the slope map corresponding to the DSM data, the electronic device can obtain the slope value of non-edge locations based on the slope map. Specifically, the electronic device can obtain the slope value of non-edge locations by combining the elevation of each location point in the slope map and the horizontal distance between each location point with the slope calculation formula.
[0081] Step S2720: If the slope value of the non-edge location is less than the slope threshold, then the building area attribute of the non-edge location is determined to belong to the building area.
[0082] In some implementations, a slope threshold may be preset in the electronic device. After the electronic device obtains the slope value of the non-edge location, it can compare the slope value of the non-edge location with the slope threshold. If the slope value of the non-edge location is less than the slope threshold, the building area attribute of the non-edge location is determined to belong to the building area.
[0083] Step S2730: If the slope value of the non-edge location is greater than or equal to the slope threshold, then the building area attribute of the non-edge location is determined to belong to the non-building area.
[0084] In some implementations, after the electronic device obtains the slope value of a non-edge location, it can compare the slope value of the non-edge location with a slope threshold. If the slope value of the non-edge location is greater than or equal to the slope threshold, the building area attribute of the non-edge location is determined to belong to a non-building area.
[0085] In some implementations, step S270 may also include step S2740.
[0086] Step S2740: If the difference is less than or equal to the building height threshold, then the building area attribute of the non-edge location is determined to belong to the non-building area.
[0087] In some implementations, after the electronic device obtains the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value, it can compare the difference with a building height threshold. If the difference is less than or equal to the building height threshold, the building area attribute of the non-edge location is determined to belong to a non-building area.
[0088] For example, please refer to Figure 6 The illustration shows a flowchart of a method for determining building areas according to an embodiment of this application. After acquiring DSM data, the electronic device can obtain an edge effect map (i.e., edge information) corresponding to the DSM data based on an edge detection algorithm; it can also obtain the average value of the ground elevation values in the DSM data and determine this average value as the estimated ground elevation value corresponding to the DSM data; and it can also calculate the slope of the DSM data based on a preset slope algorithm to obtain a slope map corresponding to the DSM data. It is understood that both the edge effect map and the slope map are obtained through calculations on the DSM data, reducing the cost of determining building areas; furthermore, edge detection on the DSM data avoids problems such as shadows encountered when performing edge detection based on image texture information, improving the accuracy of determining building areas.
[0089] Furthermore, the electronic device can traverse the DSM data based on edge information. If edge information is found in the DSM data, a target window is obtained centered on the location corresponding to the edge information. The minimum ground elevation value in the DSM data within the target window is then obtained and set as the target ground elevation value. This means searching the area surrounding the edge location of the edge information to obtain the minimum ground elevation value. Further, after obtaining the target ground elevation value, the electronic device can determine whether the absolute value of the difference between the target ground elevation value and the estimated ground elevation value is less than a difference threshold. If it is less, the target ground elevation value replaces the estimated ground elevation value as the new estimated ground elevation value; if it is greater than or equal to, the target ground elevation value does not replace the estimated ground elevation value. By determining whether the absolute difference between the target ground elevation value and the estimated ground elevation value is less than the difference threshold, the system avoids situations where the estimated ground elevation is a building or ditch, thus improving the accuracy of determining building areas based on DSM data.
[0090] The electronic device can traverse the DSM data based on edge information. If non-edge information is found in the DSM data based on the edge information, the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value is obtained. Based on the relationship between this difference and a building height threshold, the building area attribute of the non-edge location is determined. If the difference is greater than the building height threshold, the slope value of the non-edge location is obtained based on the DSM data. If the slope value of the non-edge location is less than the slope threshold, the building area attribute of the non-edge location is determined to be a building area. If the difference is less than or equal to the building height threshold, the building area attribute of the non-edge location is determined to be a non-building area; if the slope value of the non-edge location is greater than or equal to the slope threshold, the building area attribute of the non-edge location is determined to be a non-building area.
[0091] It is understood that the building area determination method provided in this application obtains edge information and slope map corresponding to the DSM data by performing edge detection on the DSM data. It then obtains a new estimated ground elevation value by combining whether to use the minimum elevation value (target ground elevation value) of the edge area to update the estimated ground elevation value. Finally, it uses the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value to determine the building area attribute of the non-edge location by relating it to the building height threshold and the slope threshold. Thus, by using only DSM data and without relying on the texture information of image pixels, it can effectively overcome the shortcomings of serious building noise points and incomplete building extraction based on supervised classification and other methods, determine the building area, reduce the cost of determining the building area, and improve the accuracy of determining the building area.
[0092] The method for determining building areas provided in one embodiment of this application is different from... Figure 1 The building area determination method shown in this embodiment can also obtain the average value of the ground elevation in the DSM data, and determine the average value as the estimated ground elevation value corresponding to the DSM data, and update the estimated ground elevation value, thereby avoiding the situation where the estimated ground elevation is a building or ditch, etc., and improving the accuracy of determining the building area. In addition, determining the building area only through DSM data reduces the cost of determining the building area and also improves the efficiency of determining the building area.
[0093] Please see Figure 7 , Figure 7 A block diagram of a building area determination device according to an embodiment of this application is shown. This building area determination device 200 is applied to the aforementioned electronic device. The following will focus on... Figure 7The process is described in detail below. The building area determination device 200 includes: a DSM data acquisition module 210, an edge information acquisition module 220, an estimated ground elevation value acquisition module 230, a DSM data traversal module 240, a non-edge information determination module 250, and a building area attribute determination module 260, wherein:
[0094] DSM data acquisition module 210 is used to acquire digital surface model (DSM) data.
[0095] The edge information acquisition module 220 is used to perform edge detection on the DSM data based on the edge detection algorithm to obtain the edge information of the DSM data.
[0096] The estimated ground elevation value acquisition module 230 is used to obtain the estimated ground elevation value corresponding to the DSM data based on the DSM data.
[0097] DSM data traversal module 240 is used to traverse the DSM data based on the edge information.
[0098] The non-edge information determination module 250 is used to obtain the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value if non-edge information is determined to be traversed in the DSM data based on the edge information.
[0099] The building area attribute determination module 260 is used to determine the building area attribute of the non-edge location based on the relationship between the difference and the building height threshold, wherein the building area attribute includes belonging to a building area or belonging to a non-building area.
[0100] Furthermore, the building area attribute determination module 260 may include: a slope value acquisition unit and a building area attribute determination first unit, wherein:
[0101] The slope value acquisition unit is used to obtain the slope value of the non-edge location based on the DSM data if the difference is greater than the building height threshold.
[0102] The first unit for determining building area attributes is used to determine that the building area attribute of the non-edge location belongs to a building area if the slope value of the non-edge location is less than a slope threshold; or
[0103] If the slope value of the non-edge location is greater than or equal to the slope threshold, then the building area attribute of the non-edge location is determined to belong to the non-building area.
[0104] Furthermore, the slope value acquisition unit may include: a slope map acquisition unit and a slope value acquisition subunit, wherein:
[0105] The slope map acquisition unit is used to calculate the slope of the DSM data based on a preset slope algorithm if the difference is greater than the building height threshold, and obtain the slope map corresponding to the DSM data.
[0106] The slope value acquisition sub-unit is used to obtain the slope value of the non-edge location based on the slope map.
[0107] Furthermore, the building area attribute determination module 260 may further include: a second building area attribute determination unit, wherein:
[0108] The second unit for determining building area attributes is used to determine that the building area attribute of the non-edge location belongs to a non-building area if the difference is less than or equal to the building height threshold.
[0109] Furthermore, the building area determination device 200 may also include: a target window acquisition module, a target ground elevation value acquisition module, and an estimated ground elevation value update module, wherein:
[0110] The target window acquisition module is used to obtain a target window centered on the position corresponding to the edge information if the edge information is determined to be traversed in the DSM data based on the edge information.
[0111] The target ground elevation value acquisition module is used to obtain the target ground elevation value based on the DSM data in the target window.
[0112] The estimated ground elevation value update module is used to replace the estimated ground elevation value with the target ground elevation value as the new estimated ground elevation value if the absolute value of the difference between the target ground elevation value and the estimated ground elevation value is less than the difference threshold.
[0113] Furthermore, the target ground elevation value acquisition module may include: a minimum ground elevation value acquisition unit and a target ground elevation value acquisition unit, wherein:
[0114] The minimum ground elevation value acquisition unit is used to acquire the minimum ground elevation value in the DSM data in the target window.
[0115] The target ground elevation value acquisition unit is used to determine the minimum ground elevation value as the target ground elevation value.
[0116] Further, the estimated ground elevation value acquisition module 230 may include: an average value acquisition unit and an estimated ground elevation value acquisition unit, wherein:
[0117] The average value acquisition unit is used to acquire the average value of the ground elevation values in the DSM data.
[0118] The estimated ground elevation value acquisition unit is used to determine the average value as the estimated ground elevation value corresponding to the DSM data.
[0119] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0120] In the several embodiments provided in this application, the coupling between modules can be electrical, mechanical, or other forms of coupling.
[0121] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0122] Please see Figure 8 This document illustrates a structural block diagram of an electronic device 100 provided in an embodiment of this application. The electronic device 100 can be a smartphone, tablet computer, e-reader, or other electronic device capable of running applications. The electronic device 100 in this application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications can be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more applications are configured to perform the methods described in the foregoing method embodiments.
[0123] The processor 110 may include one or more processing cores. The processor 110 connects to various parts within the electronic device 100 using various interfaces and lines, and performs various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and by calling data stored in the memory 120. Optionally, the processor 110 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 110 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content to be displayed; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 110 and may be implemented separately using a communication chip.
[0124] The memory 120 may include random access memory (RAM) or read-only memory (ROM). The memory 120 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch functionality, sound playback functionality, image playback functionality, etc.), and instructions for implementing the various method embodiments described below. The data storage area may also store data created by the electronic device 100 during use (such as phonebook data, audio and video data, chat log data, etc.).
[0125] Please see Figure 9 This diagram illustrates a structural block diagram of a computer-readable storage medium provided in an embodiment of this application. The computer-readable medium 300 stores program code that can be invoked by a processor to execute the methods described in the above method embodiments.
[0126] The computer-readable storage medium 300 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 300 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 300 has storage space for program code 310 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 310 may be compressed, for example, in a suitable form.
[0127] In summary, the building area determination method, apparatus, electronic device, and storage medium provided in this application acquire digital surface model (DSM) data, perform edge detection on the DSM data based on an edge detection algorithm to obtain edge information of the DSM data, obtain estimated ground elevation values corresponding to the DSM data based on the DSM data, traverse the DSM data based on the edge information, and if non-edge information is determined in the traversed DSM data based on the edge information, the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value is obtained. Based on the relationship between the difference and a building height threshold, the building area attribute of the non-edge location is determined. The building area attribute includes belonging to a building area or belonging to a non-building area. Thus, the building area is determined only through DSM data, reducing the cost of determining the building area and improving the efficiency of determining the building area.
[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for determining a building area, characterized in that, The method includes: Acquire Digital Surface Model (DSM) data; Edge detection is performed on the DSM data based on an edge detection algorithm to obtain the edge information of the DSM data; Based on the DSM data, obtain the estimated ground elevation value corresponding to the DSM data; The DSM data is traversed based on the edge information; If edge information is determined to be traversed in the DSM data based on the edge information, then the target window is obtained with the position corresponding to the edge information as the center; The target ground elevation value is obtained based on the DSM data in the target window; If the absolute value of the difference between the target ground elevation value and the estimated ground elevation value is less than the difference threshold, then the target ground elevation value replaces the estimated ground elevation value as the new estimated ground elevation value. If non-edge information is determined to be traversed in the DSM data based on the edge information, then the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value is obtained. Based on the relationship between the difference and the building height threshold, the building area attributes of non-edge locations are determined, wherein the building area attributes include belonging to a building area or belonging to a non-building area.
2. The method according to claim 1, characterized in that, The determination of building area attributes in non-edge locations based on the relationship between the difference and the building height threshold includes: If the difference is greater than the building height threshold, the slope value of the non-edge location is obtained based on the DSM data; If the slope value at the non-edge location is less than the slope threshold, then the building area attribute at the non-edge location is determined to belong to a building area; or If the slope value of the non-edge location is greater than or equal to the slope threshold, then the building area attribute of the non-edge location is determined to belong to the non-building area.
3. The method according to claim 2, characterized in that, If the difference is greater than the building height threshold, then the slope value of the non-edge location is obtained based on the DSM data, including: If the difference is greater than the building height threshold, the slope of the DSM data is calculated based on a preset slope algorithm to obtain the slope map corresponding to the DSM data. The slope value of the non-edge location is obtained based on the slope map.
4. The method according to claim 2, characterized in that, The method further includes: If the difference is less than or equal to the building height threshold, then the building area attribute of the non-edge location is determined to belong to the non-building area.
5. The method according to claim 1, characterized in that, Obtaining the target ground elevation value based on the DSM data in the target window includes: Obtain the minimum ground elevation value from the DSM data in the target window; The minimum ground elevation value is determined as the target ground elevation value.
6. The method according to claim 1, characterized in that, The step of obtaining the estimated ground elevation value corresponding to the DSM data based on the DSM data includes: Obtain the average value of the ground elevation in the DSM data; The average value is determined as the estimated ground elevation value corresponding to the DSM data.
7. A building area determination device, characterized in that, The device includes: The DSM data acquisition module is used to acquire Digital Surface Model (DSM) data. An edge information acquisition module is used to perform edge detection on the DSM data based on an edge detection algorithm to obtain the edge information of the DSM data. The estimated ground elevation value acquisition module is used to obtain the estimated ground elevation value corresponding to the DSM data based on the DSM data; The DSM data traversal module is used to traverse the DSM data based on the edge information; if edge information is determined to be found in the DSM data based on the edge information, a target window is obtained with the position corresponding to the edge information as the center; a target ground elevation value is obtained based on the DSM data in the target window; if the absolute value of the difference between the target ground elevation value and the estimated ground elevation value is less than the difference threshold, the target ground elevation value replaces the estimated ground elevation value as the new estimated ground elevation value. The non-edge information determination module is used to obtain the difference between the ground elevation value corresponding to the non-edge information and the estimated ground elevation value if non-edge information is determined to be traversed in the DSM data based on the edge information. The building area attribute determination module is used to determine the building area attributes of non-edge locations based on the relationship between the difference and the building height threshold, wherein the building area attributes include belonging to a building area or belonging to a non-building area.
8. An electronic device, characterized in that, include: One or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications being configured to perform the method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium contains program code that can be invoked by a processor to execute the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Building identification method and system, electronic equipment and readable storage medium
CN111523391A