Shadow measurement method for building height inversion
By combining the fishing net method with multiple constraints, the shadow area is segmented and the optimal length value is screened, which solves the problem of low measurement accuracy caused by occlusion and irregular shadows and achieves high-precision building height inversion.
Patent Information
- Application Number
- CN202311012400.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-11
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-08-11
AI Technical Summary
Existing shadow measurement algorithms have low measurement accuracy in obstructed and irregular shadow areas and cannot accurately calculate building heights.
The fishing net method is used for point measurement, and the shadow is segmented based on the building's four boundaries and the sun's position. The optimal length value is selected using the quartile method and the two-way approximation method, and the shadow length of the building is determined based on the classification according to the occlusion situation.
The accuracy and robustness of shadow measurement are improved, and the building height measurement error is better than 5m, meeting the accuracy requirements in complex scenes.
Smart Images

Figure CN119515755B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a shadow measurement method for building height inversion, and belongs to the technical field of geographic space measurement. BACKGROUND
[0002] In recent years, the urbanization process in China has been continuously advancing, not only in terms of the growth of urban area, but also in terms of the growth of building height. Height growth can not only overcome the bottleneck of scarce urban land resources, but also contribute to the optimization of urban structure and urban function. In the field of urban remote sensing research, the extraction of urban building height has also become a research focus. The estimation and measurement of urban building height has become an important parameter for urban planning and expansion, urban disaster risk warning and assessment, and also provides basic surveying and mapping data for the establishment of digital city three-dimensional models. In recent years, the opening source of satellite images, building footprint vector data and laser radar point cloud and many other geographic spatial data is creating opportunities to generate large-scale three-dimensional city models at low cost.
[0003] Shadows in images bring many negative effects to remote sensing interpretation, but some shadows can be used to calculate the height of the target ground object. In some areas where unmanned aerial vehicles cannot reach or stereo image pairs are lacking, calculating the height information through building shadows has become a common technical means. For a single image, the height of the target ground object cannot be directly obtained, but the height information of the ground object can be calculated through the specific relationship between the target ground object shadow and the sun, the satellite height angle and the azimuth angle. Since 1989, researchers have used shadow information to estimate building height in aerial photogrammetry. Therefore, obtaining accurate shadow length is the key to building height inversion.
[0004] Currently, there are relatively few shadow measurement algorithms, mainly including area and perimeter inversion algorithm, corner nearest distance method and fishing net method. The area and perimeter inversion algorithm and the corner nearest distance method are only limited to regular and unobstructed shadow areas, and are not suitable for irregular and obstructed building shadows. The fishing net method combines pixel size, sun azimuth line and other conditions to generate a series of equally spaced fishing net lines in the shadow area, and the relative accuracy is high, so the method is widely used. For this reason, some people propose to combine building outlines and the fishing net method to realize one-to-one correspondence between buildings and shadows, and solve the problem of mutual adhesion of shadows in densely built areas, but this method does not explore the influence of non-smooth shadow boundaries and obstructions in complex scenes on the measurement results, resulting in low measurement accuracy. SUMMARY
[0005] The purpose of the present application is to provide a shadow measurement method for building height inversion to solve the problem of low measurement accuracy caused by obstructions in the current shadow measurement process.
[0006] The application provides a shadow measurement method for building height inversion, which comprises the following steps:
[0007] 1) obtaining shadow vectors of a building, and performing dot measurement on the obtained shadow vectors;
[0008] 2) determining a building corresponding to each shadow vector according to the dot measurement result, determining a segmentation ratio and segmentation points according to a building boundary range and a sampling interval;
[0009] 3) segmenting the shadow vectors by using the segmentation points and a sun azimuth to obtain a plurality of regions, and counting shadow length values in each region;
[0010] 4) performing statistical processing on the shadow length values of each region to determine optimal length values of each region, classifying a shielding condition of the current building according to differences of the optimal length values of the regions, and determining a shadow length value of the building according to the shielding category and the optimal length values of the regions.
[0011] The application determines the segmentation ratio and segmentation points according to the building boundary range and the sampling interval to realize optimal division of the shadow, performs statistical processing on the shadow length values of each region to determine the optimal length values of each region, and determines the shadow length value of the building according to the differences of the optimal length values of the regions and the optimal length values of the regions. The measurement process of the application fully considers selection of a measurement region, selection of statistical data, and selection of an optimal value, can maximally reduce influences of a non-smooth shadow boundary and shielding on a measurement result, and improves accuracy and robustness of shadow method calculation of a building height.
[0012] Further, if the differences of the optimal length values of the regions are less than a set threshold value, the current scene belongs to a first category, otherwise, the current scene belongs to a second category, the first category refers to no shielding or full shielding of the building, and the second category refers to partial shielding of the building; if the current scene is the first category, if the building is not shielded, an average value of the optimal length values of the regions is taken as the shadow length of the building, if the building is fully shielded, a nearest neighbor search algorithm is used for searching, and a shadow length corresponding to a nearest non-shielded building or a shadow length corresponding to a nearest partially shielded building is taken as the shadow length value of the building; if the current scene is the second category, a maximum value of the optimal length values of the regions is taken as the shadow length of the building.
[0013] The application classifies the scene where the building is located according to the difference of the optimal length value of each region, so as to show the sheltering condition of the building, when the building is not sheltered, the average value of the optimal length value of each region is the shadow length of the building, when the building is partially sheltered, the maximum value is selected as the shadow length of the building, when the building is fully sheltered, the search range is expanded to the nearest neighbor non-sheltered building or partially sheltered building, and the shadow length of the building is taken as the shadow length of the building. The method fully considers the sheltering condition of the building, and further optimizes and adjusts the optimal value of each region according to the sheltering condition, and further improves the accuracy of the shadow length measurement of the building.
[0014] Further, the step 1) adopts the fishing net method to measure the points on the whole shadow mask.
[0015] The fishing net method is adopted to measure the points, and the correspondence between the shadow and the building can be accurately realized.
[0016] Further, the calculation formula of the segmentation ratio in the step 2) is:
[0017]
[0018] Wherein, seg is the segmentation ratio, d is the sampling interval of the point measurement, η is the buffer distance, BX max and BX min are the maximum longitude and minimum longitude of the building outer package rectangle, and SR is the image resolution.
[0019] The ratio of the sampling interval of the point measurement plus a certain buffer distance to the width of the building outer package rectangle is taken as the segmentation ratio, and the determined segmentation ratio is more reasonable, and the problems that the measurement result is low due to too large segmentation ratio and the calculation result is unreliable due to too small segmentation ratio are avoided.
[0020] Further, the segmentation point is determined according to the number of regions to be divided, the segmentation ratio and the building range.
[0021] Further, each region is determined by the solar azimuth angle, the maximum and minimum latitude of the shadow outer package rectangle and the segmentation point.
[0022] The application determines each statistical region based on the solar azimuth angle, the maximum and minimum latitude of the shadow outer package rectangle and the segmentation point, the size of the determined statistical region is appropriate, and the measurement result of the shadow length can be further improved.
[0023] Further, the determination process of the optimal length value of each region is as follows:
[0024] The quartile method is adopted to remove the abnormal value in the shadow length value in each region;
[0025] The two-way approximation method is used to select a group of highly similar values from the shadow length values in each region, and the average value of the group of shadow length values is taken as the optimal value of the region.
[0026] The present application removes the abnormal values in the shadow length values in each region by quartile method to avoid the interference caused by abnormal values, and further selects the shadow length of each region by two-way approximation method to find highly similar measurement values, so that the selected optimal value can represent the measurement results of the region.
[0027] Further, the threshold value set in the step 4) refers to the shadow length corresponding to the allowable error of the building height.
[0028] Further, the classification basis in the step 4) is:
[0029]
[0030] Wherein opt max And opt min The maximum and minimum of the quartile statistical result, δ is the allowable error of the building height, α is the solar elevation angle, 1 represents the first type of scene, and 2 represents the second type of scene. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 is the technical roadmap of the shadow measurement method for building height inversion of the present application;
[0032] Figure 2a is a schematic diagram of the first relatively ideal shadow distribution in a real scene;
[0033] Figure 2b is a schematic diagram of the second relatively ideal shadow distribution in a real scene;
[0034] Figure 2c is a schematic diagram of the holes in the shadow caused by the influence of vegetation on the shadow boundary in a real scene;
[0035] Figure 2d is a schematic diagram of the non-smooth shadow boundary in a real scene;
[0036] Figure 2e is a schematic diagram of the shadow shielding and extension in a real scene;
[0037] Figure 2f is a schematic diagram of the shadow affected by the first-level shielding of the building in a real scene;
[0038] Figure 2g is a schematic diagram of the shadow affected by the second-level shielding of the building in a real scene;
[0039] Figure 2his a schematic diagram of a shadow under a three-level building shelter in a real scene;
[0040] Figure 2i is a schematic diagram of a shadow under a four-level building shelter in a real scene;
[0041] Figure 2j is a schematic diagram of a shadow under a four-level building shelter in a real scene;
[0042] Figure 3a is a schematic diagram of a shadow under a four-level building shelter in a real scene;
[0043] Figure 3b is a schematic diagram of a shadow under a four-level building shelter in a real scene;
[0044] Figure 3c is a schematic diagram of a shadow under a four-level building shelter in a real scene;
[0045] Figure 4 is a schematic diagram of a shadow under a four-level building shelter in a real scene;
[0046] Figure 5 is a schematic diagram of a shadow under a four-level building shelter in a real scene. DETAILED DESCRIPTION
[0047] The specific embodiments of the present application will be further described below with reference to the accompanying drawings.
[0048] The present application first acquires a shadow vector of a building, carries out point distribution measurement on the acquired shadow vector, and determines a shadow vector corresponding to each building vector according to the point distribution measurement result, determines a segmentation point according to a building four-compass range and a sampling point interval; then carries out segmentation on the shadow vector by using the segmentation point and a sun azimuth, obtains a plurality of regions, and counts a shadow length value in each region; and finally carries out statistical processing on the shadow length value of each region, determines an optimal length value of each region, classifies a current shadow scene according to a difference of the optimal length values of the regions,
[0049] The method implementation route is as shown in Figure 1 and will be specifically described below.
[0050] 1. Region measurement
[0051] The existing method for inversely calculating a building height based on shadow information is usually established on three idealized assumptions of shadow regularization, terrain flattening and distribution idealization. The idealized assumptions also result in a lower robustness of most algorithms in actual application. The reason is that actual shadow conditions are complex, buildings are connected and sheltered seriously, so that the shadow measurement result is inaccurate. Common shadow shapes in a real scene are as shown in Figures 2a-2j , wherein Figure 2a and Figure 2bThe ideal shadow distribution is shown respectively; Figure 2c , Figure 2d and Figure 2e are the cases of the shadow internal hole caused by the influence of vegetation on the shadow boundary, the non-smooth shadow boundary, the shadow shielding and the lengthening of the shadow; Figures 2f to 2j respectively represent the case of the shadow being shielded by the building to different degrees and the case of the shadows being mutually connected. It can be seen from the figures that for the shadow of the building being shielded, only part of the area can be used to calculate the height of the building, and this part of the area is referred to as the optimal measurement area, and the value calculated by using the optimal measurement area is the optimal value. Therefore, the optimal measurement area of the shadow needs to be considered to obtain an accurate and reliable shadow length value.
[0052] The present application designs a partition measurement mode with the additional condition of the building polygon, as shown in Figure 3a , Figure 3b and Figure 3c to solve the problem of inaccurate measurement caused by the horizontal and vertical connection of the shadow and the shielding of the shadow in the densely built-up area.
[0053] Firstly, the fishnet method is used to measure the points in the whole shadow mask, the principle is that seed points are arranged in the shadow range at a certain sampling interval (in pixels), as shown in Figure 3a , and the distance of the shadow boundary in the solar azimuth is measured; secondly, the nearest neighbor search algorithm is used to determine the shadow corresponding to each building; then, the partition proportion point is determined according to the four-to range of the outer rectangle of the building and the sampling point interval. For the determination of the partition proportion point, the No. 1 statistical area of Figure 3b is taken as an example. If the partition proportion is too large, the statistical area will be larger, and more measurement values affected by the shielding will be included in the set, causing the measurement result to be low. If the partition proportion is too small, only a small amount or no measurement value will be included in the set, resulting in unreliable calculation result. Therefore, in order to ensure that a certain number of measurement results are included in the statistical set in the horizontal direction, the present application takes the ratio of the horizontal measurement interval plus a certain buffer distance to the width of the outer rectangle of the building as the minimum partition proportion, as shown in formula (1):
[0054]
[0055] Wherein, seg is the partition proportion, d is the sampling interval, η is the buffer distance, BX max and BX min are the maximum longitude and minimum longitude of the outer rectangle of the building, and SR is the image resolution.
[0056] In order to reduce the influence of the shielding measurement value on the final statistical result, four measurement regions are defined in the embodiment: left and right measurement regions determined by the minimum segmentation ratio (segmentation points are div1_L, div1_B, div3_L, div3_B) to reduce the ratio of the shielding measurement value in the measurement region and improve the measurement capability in the shielding situation. The middle measurement region is divided into two parts (segmentation points are div2_L, div2_B), which can effectively avoid the situation that more measurement values affected by shielding are counted into the set due to the too large middle measurement region, resulting in a low measurement result. The measurement region divided based on this can effectively take into account different degrees of shielding. The latitude and longitude coordinates of the segmentation points are shown in formula (2):
[0057]
[0058] In the formula, BY max and BY min are the maximum latitude and minimum latitude of the building outer package rectangle, div1_L and div1_B are the latitude and longitude coordinates of the first segmentation point, and div2_L, div2_B, div3_L and div3_B are the same.
[0059] Formula (2) is the calculation formula of the segmentation point coordinates when the region is divided into four, and the calculation formula of the segmentation point coordinates when the region is divided into n is:
[0060] div1_L = BX min +(BX max -BX min )·seg
[0061] M
[0062] divm_L = div1_L + (m-1)(BX max -BX min )(1-2seg) / (n-2)
[0063] M
[0064] divn-1_L = BX max -(BX max -BX min )·seg
[0065] div1_B = L = divm_B = L = divn-1_B = (BY max +BY min ) / 2
[0066] In the formula, n is the number of segmented regions, m is the mth segmentation point, and the value range is [2, n-2].
[0067] Then, the segmentation starting point is determined by the building four-compass coordinates and the segmentation proportion point coordinates, and the segmentation area is formed according to the sun azimuth and the segmentation length (the shadow length plus half of the building length), and the part of the segmentation area intersecting with the shadow is the measurement area. The application defines as a closed polygon, and the four measurement areas are shown in formula (3):
[0068]
[0069] In the formula, S(i) (i=1, 2, 3, 4) is the measurement statistical area, γ is the sun azimuth angle, Hbuf is the segmentation height, SY max , SY min are the maximum and minimum latitudes of the shadow outer-rectangle, is the shadow polygon. min , div1_L, div1_B, γ, Hbuf, and the rest are the same, Poly shadow is the segmentation area.
[0070] Finally, the measurement values in each area are counted according to the fishing net method, and the shadow length set L i ={l1, l2, K, l n}(i=1, 2, 3, 4) is constructed, as shown in formula (4). Figure 3c
[0071] The number n of the area division has no definite basis and is an experimental value, which is the result of comprehensive consideration of different shielding situations and building widths, so as to reduce the proportion of the shielded shadow measurement values in the measurement set. The number of the measurement statistical areas should be as small as possible, and the smaller the number of the measurement, the smaller the calculation amount. However, if the measurement area is too large, the proportion of the error measurement values will also increase. The four areas in the embodiment are the result of a large number of tests.
[0072] 2. Optimal quality evaluation.
[0073] 1) Determine the optimal value of each area.
[0074] Firstly, the application adopts the statistical method to eliminate the abnormal values in L i of each area. Specifically, the application adopts the quartile method in statistics to eliminate the abnormal values in L i of each area. The quartile method can analyze the dispersion degree of data, or the two-level differentiation degree, eliminate the influence of the maximum and minimum abnormal values by segmenting the data, and can judge the data concentration interval by judging the data density. Then, a set of highly similar measurement values is selected by setting the optimal threshold T by using the bidirectional approximation strategy, and the average value is taken as the optimal value of the statistical area, as shown in formula (5). Figure 4 For this embodiment, the implementation process of this step is as follows:
[0075] (1) L i The values are arranged from small to large, and the quartile method is used to eliminate gross errors.
[0076] (2) Take L i The median is used as the reference value l med , set the optimal threshold T, which is an empirical value used to control the neatness of the data. The smaller the value, the more neat the screening results will be, but the number will also be smaller. It is usually set to the allowable error of the building height.
[0077] (3) Calculate L i Middle max With l min If the difference is greater than T, it will be further eliminated according to formula (4).
[0078]
[0079] (4) Iterate (3) until L i Middle max With l min The difference is less than T, and the mean is taken as the optimal value opt of the region according to formula (5).
[0080]
[0081] Where n is the number of measurements after screening by the two-way approximation strategy
[0082] 2) Classify shadow scenes according to the differences in the optimal values of each area.
[0083] Using partitioned measurement effectively addresses the problem of poor accuracy in existing shadow measurement algorithms when the top edge of a shadow is partially obscured by surrounding buildings. However, when the top edge of a shadow is completely obscured by surrounding buildings, the image cannot capture the full shadow length, making the building height measured using this method unreliable. In practical applications, fully obscured target buildings must be screened out for further analysis, either manually or through the integration of other auxiliary information.
[0084] This example classifies shadow scenes based on the differences in opt values across four measurement areas. The four opt values for fully and completely obscured shadows are relatively similar due to their smooth boundaries. However, the four opt values for partially obscured shadows, such as buildings and trees, show significant differences, and the largest statistical result is the most reliable. Therefore, based on the differences in opt values across different measurement areas, shadow scenes are divided into two categories: fully and completely obscured scenes are the first category, while partially obscured scenes are the second category.
[0085] The present invention uses the shadow length corresponding to the allowable error of building height as the difference threshold, calculates the difference between the maximum and minimum values of the four statistical results, and performs scene discrimination according to formula (6).
[0086]
[0087] Where: opt max with opt min are the maximum and minimum values of the four statistical results, δ is the allowable error of the building height, α is the solar altitude angle, 1 represents the first type of scenario, and 2 represents the second type of scenario.
[0088] 3) Determine the shadow of the building according to the shadow scene category.
[0089] like Figure 5 As shown, the present invention designs an optimal value evaluation strategy based on the classification results. For the second type of scenario, directly take opt max The corresponding measurement area is taken as the optimal area, opt max It will also represent the shadow length value of the building, that is, the largest optimal value is selected from the optimal values of the four areas as the shadow length value of the building. For the first type of scene, first perform occlusion judgment to determine whether the building is in an unobstructed state or a fully obstructed state. If it is in an unobstructed state, select the average opt of each area as the shadow length value of the building, that is, calculate the average of the optimal values of the four areas, and use the average as the shadow length value of the building; if the building is in a fully obstructed state, expand the search range to the surrounding areas, and use the opt corresponding to the nearest unobstructed building or the opt corresponding to the second type of building. max Use this as the shadow length value for the building and mark it.
[0090] This method achieves optimal shadow segmentation by combining a fishing net method with multiple constraints. Shadow lengths in all segmented areas are then counted, and the optimal shadow value is determined using the quartile method and a two-way approximation strategy. When comparing building heights estimated from shadow measurements with those from three-dimensional intersections, the absolute error in building heights is better than 5 meters for over 90% of the cases. Therefore, the shadow lengths obtained using this method are highly accurate, capable of measuring complex shadows of varying types. This improves the accuracy of building height inversion using the shadow method, laying a foundation for research on the inversion and expansion of urban heights.
Claims
1. A shadow measurement method for building height inversion, characterized in that: The method comprises the following steps: 1) Obtain the shadow vector of the building and perform point measurement on the obtained shadow vector; 2) Determine the building corresponding to each shadow vector based on the point measurement results, and determine the segmentation ratio and segmentation points based on the building's boundaries and sampling interval; 3) Use the segmentation point and the sun's position to segment the shadow vector, obtain multiple regions, and count the shadow length values in each region; 4) Perform statistical processing on the shadow length values of each area, and use the two-way approximation method to select a group of highly similar shadow length values from the shadow length values in each area, and use the average value of this group of shadow length values as the optimal length value of the area; If the difference in the optimal length values of each area is less than the set threshold, it belongs to the first category of scenes, otherwise it is the second category of scenes. The first category of scenes refers to buildings that are unobstructed or fully obstructed, and the second category of scenes refers to buildings that are partially obstructed. If the current scene is the first category of scenes, if the building is unobstructed, the average value of the optimal length values of each area is used as the shadow length of the building. If it is fully obstructed, the nearest neighbor search algorithm is used to search, and the shadow length corresponding to the nearest unobstructed building or the shadow length corresponding to the partially obstructed building is used as the shadow length value of the building. If the current scene is the second category of scenes, the maximum value of the optimal length values of each area is used as the shadow length of the building.
2. The shadow measurement method for building height inversion according to claim 1, characterized in that: In the step 1), the fishnet method is used to measure the entire shadow mask.
3. The shadow measurement method for building height inversion according to claim 1, characterized in that: The calculation formula for the segmentation ratio in step 2) is: Where seg is the segmentation ratio, d is the sampling interval of the point measurement, η is the buffer distance, BX max With BX min are the maximum and minimum longitudes of the building envelope rectangle, and SR is the image resolution.
4. The shadow measurement method for building height inversion according to claim 3, characterized in that: The segmentation points are determined based on the number of areas to be divided, the segmentation ratio, and the boundaries of the buildings.
5. The shadow measurement method for building height inversion according to claim 3, characterized in that: Each region is determined by the solar azimuth, the maximum and minimum latitudes of the shadow rectangle, and the dividing point.
6. The shadow measurement method for building height inversion according to claim 1, characterized in that: The shadow length values of each area were eliminated using the quartile method to remove outliers.
7. The shadow measurement method for building height inversion according to claim 1, characterized in that: The threshold value set in step 4) refers to the shadow length corresponding to the allowable error of the building height.
8. The shadow measurement method for building height inversion according to claim 1, characterized in that: The classification basis in step 4) is: where opt max with opt min are the maximum and minimum values of the four statistical results, δ is the allowable error of the building height, α is the solar altitude angle, 1 represents the first type of scenario, and 2 represents the second type of scenario.
Citation Information
Patent Citations
Method of extracting city building height based on multi-temporal remote sensing image shadow
CN107679441A
Method for measuring and calculating height of building by utilizing multi-feature fusion
CN113408419A