Fusion Method, Device, Electronic Device and Storage Medium of Slope Unit
By constructing a target fusion dictionary and a fusion method based on slope consistency conditions in slope unit division, the problem of too small particle size of slope unit division in the prior art is solved, and more accurate slope landform reflection and landslide evaluation accuracy are achieved.
Patent Information
- Application Number
- CN202111642032.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2041-12-29
AI Technical Summary
In the prior art, due to insufficient resolution of the digital elevation model, the slope direction and slope discontinuity is caused, so that the particle size of the slope unit division result obtained by the automatic slope division method is too small and cannot truly reflect the slope landform.
By constructing a target fusion dictionary, the target slope unit and adjacent slope unit to be fused are determined, and the slope consistency conditions are determined. If it is consistent, label annotation and dictionary update are performed, and the target slope unit and adjacent slope unit are finally fused.
The particle size of the slope unit division results is improved, the slope landform situation is more realistically reflected, and the accuracy of regional landslide evaluation is improved.
Smart Images

Figure CN114329978B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of image processing, and in particular, to a method, device, electronic device, and storage medium for fusing slope units. Background Art
[0002] The reasonable division of terrain evaluation units is a key technology for effective evaluation of regional geological landslide disasters. As a terrain evaluation unit, slope units can effectively reflect the overall regional characteristics of landslides and improve the accuracy of subsequent regional landslide evaluations.
[0003] Currently, due to problems such as insufficient resolution of digital elevation models, the extracted slope directions and gradients are discontinuous, resulting in too small grain sizes of the slope unit division results obtained by existing automatic slope division methods. These overly small-grained slope units cannot truly reflect the slope landforms. However, no method has yet been determined to solve the above problems that can improve the overly small grain size of slope units.
[0004] Therefore, it has become an urgent problem to be solved to propose a method for fusing slope units to improve the problem of overly small grain sizes of slope unit division results and better reflect the slope landforms. Summary of the Invention
[0005] The embodiments of the present invention provide a method, device, electronic device, and storage medium for fusing slope units to solve the problem of overly small grain sizes of slope unit division results and better reflect the slope landform conditions.
[0006] In a first aspect, the embodiments of the present invention provide a method for fusing slope units, including:
[0007] Construct a target fusion dictionary for storing fusion tags of slope units to be fused, and based on the vector map of slope units to be fused, determine the target slope units to be fused and the adjacent slope units adjacent to the target slope units;
[0008] Based on the target feature information of the target slope units and the adjacent feature information of the adjacent slope units, determine whether the target slope units and the adjacent slope units meet a preset slope direction consistency condition;
[0009] If they meet, determine the fusion correspondence between the target slope units and the adjacent slope units, and based on the fusion correspondence, label the target slope units and the adjacent slope units respectively, and update the target fusion dictionary based on the labeled tags;
[0010] Based on the target fusion dictionary, fuse the target slope units and the adjacent slope units.
[0011] Second aspect, an embodiment of the present invention further provides a fusion device for ramp units, the device comprising:
[0012] An adjacent ramp unit determination module, configured to construct a target fusion dictionary for storing fusion labels of ramp units to be fused, and based on a vector diagram of ramp units to be fused, determine target ramp units to be fused and adjacent ramp units adjacent to the target ramp units;
[0013] A condition compliance determination module, configured to determine whether the target ramp units and the adjacent ramp units meet a preset slope direction consistency condition based on target feature information of the target ramp units and adjacent feature information of the adjacent ramp units; if they meet, enter the label annotation module;
[0014] A label annotation module, configured to determine a fusion correspondence relationship between the target ramp units and the adjacent ramp units, and based on the fusion correspondence relationship, respectively perform label annotation on the target ramp units and the adjacent ramp units, and update the target fusion dictionary based on the annotated labels;
[0015] A fusion unit module, configured to fuse the target ramp units and the adjacent ramp units based on the target fusion dictionary.
[0016] Third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0017] One or more processors;
[0018] A storage device, configured to store one or more programs,
[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the ramp unit fusion method provided by any embodiment of the present invention.
[0020] Fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the ramp unit fusion method provided by any embodiment of the present invention is implemented.
[0021] A method for fusing slope units provided by an embodiment of the present invention constructs a target fusion dictionary for storing fusion tags of slope units to be fused, and determines a target slope unit to be fused and adjacent slope units adjacent to the target slope unit based on a vector map of the slope units to be fused; determines whether the target slope unit and the adjacent slope units meet a preset slope direction consistency condition based on the target feature information of the target slope unit and the adjacent feature information of the adjacent slope units; if they meet, determines the fusion correspondence relationship between the target slope unit and the adjacent slope units, can perform label annotation for the target slope unit and the adjacent slope units respectively based on the fusion correspondence relationship, and updates the target fusion dictionary based on the annotated labels; fuses the target slope unit and the adjacent slope units based on the target fusion dictionary. The embodiment of the present invention discriminates through the slope direction consistency condition, fuses adjacent slope units while ensuring that the fused slope units have slope direction consistency, improves the problem of too small granularity of the slope unit division result, and better reflects the slope landform situation.
[0022] In addition, a slope unit fusion device, an electronic device, and a storage medium provided by the present invention correspond to the above method and have the same beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] To more clearly illustrate the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.
[0024] Figure 1 It is a flowchart of a method for fusing slope units provided by an embodiment of the present invention;
[0025] Figure 2 It is a flowchart of another method for fusing slope units provided by an embodiment of the present invention;
[0026] Figure 3 It is a schematic diagram of the main fusion process of slope units provided by an embodiment of the present invention;
[0027] Figure 4 It is a schematic diagram of the sub - fusion process of slope units provided by an embodiment of the present invention;
[0028] Figure 5 It is a structural diagram of a slope unit fusion device provided by an embodiment of the present invention;
[0029] Figure 6 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0030] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. In addition, it should be noted that for the convenience of description, only parts related to the present invention rather than all structures are shown in the accompanying drawings.
[0031] In addition, it should be noted that for the convenience of description, only parts related to the present invention rather than all content are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operations are completed, but there can also be additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0032] In order to enable those skilled in the art of the present technology to better understand the solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation manners.
[0033] Embodiment 1
[0034] Figure 1 It is a flowchart of a method for fusing ramp units provided in an embodiment of the present invention. This method can be executed by a fusion device for ramp units, and this device can be implemented through software and / or hardware, and can be configured in a terminal and / or a server to implement the method for fusing ramp units in the embodiment of the present invention.
[0035] As Figure 1 shown, the method of this embodiment can specifically include:
[0036] S101. Construct a target fusion dictionary for storing fusion tags of ramp units to be fused, and based on the vector map of the ramp units to be fused, determine the target ramp units to be fused and the adjacent ramp units adjacent to the target ramp units.
[0037] In specific implementation, the digital elevation model of the ramp units to be fused and the vector map of the ramp units to be fused can be obtained first. The vector map of the ramp units to be fused includes information such as the shape, size, and direction of each ramp unit. Each ramp unit in the vector map of the ramp units to be fused can be sequentially used as the target ramp unit, and the ramp unit having a common side with the target ramp unit is the adjacent ramp unit. Each ramp unit has at least one adjacent ramp unit.
[0038] Optionally, before determining the target ramp unit to be fused and the adjacent ramp units adjacent to the target ramp unit, it further includes: determining, based on the unit areas of the ramp units in the vector map of the ramp units to be fused, the ramp units with unit areas smaller than a preset area threshold as the first ramp units; determining the second ramp units adjacent to the first ramp units, and calculating the boundary lengths of each of the second ramp units and the first ramp unit; determining the second ramp unit corresponding to the longest boundary length as the third ramp unit, and performing a fusion operation on the first ramp unit and the third ramp unit.
[0039] It should be noted that, before determining the target ramp unit and the adjacent ramp units, to improve the accuracy of determination, the vector map of the ramp units to be fused can be preprocessed, and the small and fragmented units can be pre-fused. Specifically, each ramp unit in the vector map of the ramp units to be fused can be traversed to determine the unit area of each ramp unit, and the fragmented ramp units with unit areas smaller than the preset area threshold are determined as the first ramp units, and a ramp unit is determined from the adjacent ramp units adjacent to the first ramp unit for fusion.
[0040] Exemplarily, through the maximum boundary criterion, the third ramp unit that can be fused with the first ramp unit is determined. Specifically, all the second ramp units adjacent to the first ramp unit are determined, and the boundary lengths of each of the second ramp units and the first ramp unit are calculated; the second ramp unit with the longest boundary length is determined as the third ramp unit.
[0041] Further, if the unit area of the fused ramp unit is still smaller than the preset area threshold, it can be fused with the adjacent ramp units again until the unit area of the fused ramp unit is equal to or greater than the preset area threshold.
[0042] S102. Based on the target feature information of the target ramp unit and the adjacent feature information of the adjacent ramp units, determine whether the target ramp unit and the adjacent ramp units meet the preset slope direction consistency condition; if they meet, execute step S103.
[0043] Specifically, the target feature information of the target ramp unit is extracted, and the target feature information includes the area, perimeter, and slope direction feature of the target ramp unit. Exemplarily, the slope direction layer in the vector map of the ramp units to be fused can be determined through a digital elevation model, and the target slope direction feature of the target ramp unit in the slope direction layer is extracted. The slope direction feature includes the horizontal slope direction component and the vertical slope direction component. Further, the adjacent feature information of the adjacent ramp units can be determined based on the digital elevation model and the vector map of the ramp units to be fused.
[0044] Further, the slope direction consistency condition can be used to determine whether the target slope unit can be fused with adjacent slope units. When the slope direction consistency condition is met, it indicates that the characteristics of the slope unit are not affected after the fusion of the target slope unit and the adjacent slope unit, and the fusion operation can be performed.
[0045] Optionally, the target feature information includes the target slope direction feature of the target slope unit, and the adjacent feature information includes the adjacent slope direction feature of the adjacent slope unit. Among them, based on the target feature information of the target slope unit and the adjacent feature information of the adjacent slope unit, determining whether the target slope unit and the adjacent slope unit meet the pre-set slope direction consistency condition includes: calculating the cosine value of the slope direction angle between the target slope unit and the adjacent slope unit based on the target slope direction feature and the adjacent slope direction feature; determining whether the cosine value of the slope direction angle is greater than or equal to the pre-set slope direction consistency threshold; if it is greater than or equal to, it is determined that the target slope unit and the adjacent slope unit meet the slope direction consistency condition.
[0046] Exemplarily, the calculation method of the cosine value of the slope direction angle is: calculating the first product between the horizontal slope direction components of the target slope unit and the adjacent slope unit, calculating the second product between the vertical slope direction components of the target slope unit and the adjacent slope unit, summing the first product and the second product, and using the sum value as the cosine value of the slope direction angle. The larger the value, the closer the slope directions of the target slope unit and the adjacent slope unit are.
[0047] Further, the slope direction consistency threshold can be pre-set, and the calculated cosine value of the slope direction angle is compared with the slope direction consistency threshold. If it is greater than or equal to the slope direction consistency threshold, it indicates that the slope directions of the target slope unit and the adjacent slope unit are close, meeting the slope direction consistency condition, and the fusion operation can be performed; if it is less than the slope direction consistency threshold, it indicates that the slope directions of the target slope unit and the adjacent slope unit differ greatly.
[0048] Optionally, it further includes: if the target slope unit and the adjacent slope unit do not meet the pre-set slope direction consistency condition, then based on the target feature information and the adjacent feature information, determining whether the target slope unit and the adjacent slope unit meet the pre-set relaxation fusion condition.
[0049] Further, for the target slope unit and the adjacent slope unit that do not meet the slope direction consistency condition, it can be further determined whether they meet the relaxation fusion condition. Exemplarily, the relaxation fusion condition is that the cosine value of the slope direction angle is less than or equal to the pre-set slope relaxation threshold and greater than or equal to the pre-set small area slope threshold, so as to screen out the slope units that slightly do not meet the slope direction consistency condition but meet the relaxation requirements and meet the minimum requirements, and to realize the fusion of the target slope unit and the adjacent slope unit as much as possible.
[0050] Optionally, it further includes: if the relaxation condition is satisfied, determining the adjacent area of adjacent slope units, calculating the aspect ratio coefficient between the target slope unit and the adjacent slope unit, and based on the adjacent area and the aspect ratio coefficient, determining whether the target slope unit and the adjacent slope unit meet any one of the preset small area fusion condition, aspect ratio fusion condition, and isolated island fusion condition; if any one is met, performing the determination of the fusion correspondence between the target slope unit and the adjacent slope unit, and based on the fusion correspondence, respectively performing label annotation for the target slope unit and the adjacent slope unit, and updating the target fusion dictionary based on the labeled tags.
[0051] Exemplarily, the small area fusion condition is that the adjacent area of the adjacent slope unit is less than or equal to the preset small area aspect threshold; the aspect ratio fusion condition may be that the target aspect ratio coefficient of the target slope unit and the adjacent aspect ratio coefficient of the adjacent slope unit are both greater than or equal to the preset aspect ratio slope threshold. Further, the maximum adjacent side ratio coefficient between the target slope unit and the adjacent slope unit can also be determined, and the isolated island fusion condition may be that the maximum adjacent side ratio coefficient is greater than or equal to the preset isolated island threshold.
[0052] Specifically, when any one of the preset small area fusion condition, aspect ratio fusion condition, and isolated island fusion condition is satisfied, it indicates that the target slope unit and the adjacent slope unit can be fused, and a fusion operation is performed on the target slope unit and the adjacent slope unit. When all three conditions are not satisfied, it indicates that the target slope unit and the adjacent slope unit cannot be fused.
[0053] S103. Determine the fusion correspondence between the target slope unit and the adjacent slope unit. Based on the fusion correspondence, respectively perform label annotation for the target slope unit and the adjacent slope unit, and update the target fusion dictionary based on the labeled tags.
[0054] In a specific implementation, when the aspect consistency condition is met, a fusion correspondence can be established between the target slope unit and the adjacent slope unit, and the fusion correspondence is identified by means of label annotation. Exemplarily, for the target slope unit and the adjacent slope unit that meet the aspect consistency condition, the same label can be used for annotation to indicate that the two can be fused. Further, the target slope unit and the adjacent slope unit with labels can be stored in the target fusion dictionary, and the target fusion dictionary is updated.
[0055] S104. Based on the target fusion dictionary, fuse the target slope unit and the adjacent slope unit.
[0056] In a specific implementation, based on the labels of each slope unit recorded in the target fusion dictionary, a fusion operation can be performed on each slope unit with a fusion correspondence. Exemplarily, when labeling, the slope units with a fusion correspondence are labeled with the same label, so that the slope units with the same label can be fused simultaneously to complete the fusion operation between the target slope unit and the adjacent slope unit.
[0057] A method for fusing slope units provided by an embodiment of the present invention constructs a target fusion dictionary for storing the fusion labels of slope units to be fused, and determines a target slope unit to be fused and an adjacent slope unit adjacent to the target slope unit based on a vector map of slope units to be fused; determines whether the target slope unit and the adjacent slope unit meet a preset slope direction consistency condition based on the target feature information of the target slope unit and the adjacent feature information of the adjacent slope unit; if they meet, determines the fusion correspondence between the target slope unit and the adjacent slope unit, and can perform label annotation for the target slope unit and the adjacent slope unit respectively based on the fusion correspondence, and updates the target fusion dictionary based on the labeled labels; and fuses the target slope unit and the adjacent slope unit based on the target fusion dictionary. By discriminating through the slope direction consistency condition, the embodiment of the present invention fuses adjacent slope units while ensuring that the fused slope units have slope direction consistency, improves the problem of too small granularity of the slope unit division result, and better reflects the slope landform situation.
[0058] Embodiment 2
[0059] Figure 2 It is a flowchart of another method for fusing slope units provided by an embodiment of the present invention. This embodiment is optimized based on the above technical solutions. Optionally, after fusing the target slope unit and the adjacent slope unit, it further includes: determining the current iteration number, and determining the quantity trend of the current slope unit based on the fusion result of the slope unit; determining whether the current iteration process reaches a stop iteration condition based on the current iteration number and the quantity trend; if it does not reach the stop iteration condition, repeating to determine the target slope unit to be fused and the adjacent slope unit adjacent to the target slope unit. The explanations of the same or corresponding terms as those in the above embodiments are not repeated here.
[0060] As Figure 2 shown, the method of this embodiment may specifically include:
[0061] S201. Construct a target fusion dictionary for storing the fusion labels of slope units to be fused, and determine a target slope unit to be fused and an adjacent slope unit adjacent to the target slope unit based on a vector map of slope units to be fused.
[0062] S202. Determine whether the target slope unit and the adjacent slope unit meet the preset slope direction consistency condition based on the target feature information of the target slope unit and the adjacent feature information of the adjacent slope unit; if they meet, execute step S203.
[0063] S203. Determine the fusion correspondence between the target slope unit and the adjacent slope unit, and based on the fusion correspondence, label the target slope unit and the adjacent slope unit respectively, and update the target fusion dictionary based on the labeled tags.
[0064] S204. Based on the target fusion dictionary, fuse the target slope unit and the adjacent slope unit.
[0065] S205. Determine the current iteration number, and based on the fusion result of the slope unit, determine the quantity trend of the current slope unit. Based on the current iteration number and the quantity trend, determine whether the current iteration process reaches the stop iteration condition; if it does not reach the stop iteration condition, execute step S206.
[0066] In specific implementation, to ensure that each slope unit in the slope vector diagram to be fused can be comprehensively and accurately fused, an iterative method can be adopted to traverse each slope unit in the slope unit vector diagram to be fused multiple times. Before iteration, the current iteration number and the quantity trend of the current slope unit can be determined.
[0067] Specifically, the fusion result after each iteration process can be recorded, the quantity of the remaining slope units after each iteration process can be determined based on the fusion result, and the quantity trend can be determined based on the quantity of the slope units. Exemplarily, if the quantity of the slope units in each iteration process is getting smaller and smaller, it indicates that the quantity trend is a convergence trend, and the slope units can continue to be fused.
[0068] Exemplarily, based on the current iteration number and the quantity trend, determine whether the current iteration process reaches the stop iteration condition. The stop iteration condition includes that the current iteration number is less than the preset maximum fusion number and / or the quantity trend is a convergence trend.
[0069] S206. Repeat the determination of the target slope unit to be fused and the adjacent slope unit adjacent to the target slope unit.
[0070] In specific implementation, if the stop iteration condition is not reached, the determination of the target slope unit to be fused and the adjacent slope unit adjacent to the target slope unit can be repeated, and the operation of determining whether the target slope unit and the adjacent slope unit meet the preset slope direction consistency condition based on the target feature information of the target slope unit and the adjacent feature information of the adjacent slope unit can be performed until the stop iteration condition is met.
[0071] Further, if the stop iteration condition is met, a ramp fusion vector map is generated and output based on the current fusion result. Exemplarily, the ramp fusion vector map includes information such as the shape and slope direction of the fused ramp units.
[0072] In the embodiments of the present invention, the ramp units to be fused can be fused through an iterative method, and a stop iteration condition is set. Thus, on the premise of ensuring the effect of the fused ramp units, the fusible ramp units can be fully and comprehensively fused, improving the problem of overly small granularity in the ramp unit division result and better reflecting the ramp landform situation.
[0073] Embodiment Three
[0074] The above text has described in detail the embodiments corresponding to the fusion method of ramp units. To enable those skilled in the art to further understand the technical solution of this method, the following takes the application scenario of using the fused ramp units for landslide warning assessment and elaborates in detail. Figure 3 This is a schematic diagram of the main fusion process of a ramp unit provided by the embodiments of the present invention. As Figure 3 shown, it includes the following steps:
[0075] 1. Input the digital elevation model, the maximum number of fusions n fush , and the vector map of the ramp units to be fused.
[0076] 2. Pre-fuse the extremely small area ramp units in the vector map of the ramp units to be fused: Traverse each ramp unit in the vector map of the ramp units to be fused, calculate the area of the ramp unit. If the area is less than the preset area threshold, traverse all adjacent ramp units of this ramp unit and calculate the adjacent boundary length between each adjacent ramp unit; according to the maximum boundary criterion, fuse the adjacent ramp unit with the largest adjacent boundary length with this ramp unit.
[0077] 3. Initialize variables: Set the ramp fusion vector map, the iteration number as i, and construct a list of the number of ramp units as f[].
[0078] 4. Judge whether i < n fush and f[-1] > f[-2]; f[-1] represents the number of ramp units in the list generated in the penultimate iteration, and f[-2] represents the number of ramp units in the list generated in the previous iteration, that is, judge whether the current iteration number is less than the pre-input maximum number of fusions, and the number of ramp units after iteration shows a decreasing trend. If not satisfied, jump to step 8. If satisfied, execute step 5 and enter the iterative process.
[0079] 5. Construct a ramp unit data table:
[0080] 5.1. Obtain the fusion results of each time, and extract the slope aspect layer based on the input digital elevation model; determine the area and perimeter of the slope unit, the unit information of the slope units adjacent to the slope unit, and calculate the horizontal slope aspect component and vertical slope aspect component of each slope unit through the slope aspect layer;
[0081] 5.2. Construct a vector map database for storing the vector map information of the slope fusion vector map;
[0082] 5.3. Construct a data feature table to save the area, perimeter and slope aspect features of the target slope unit that can be determined whether it can be fused currently. The slope aspect feature can be the horizontal slope aspect component and vertical slope aspect component of the slope unit; further, an adjacent feature table can be constructed to save the unit information such as the length of each side of the adjacent slope unit of the target slope unit and the label of the slope unit adjacent to the adjacent slope unit.
[0083] 5.4. Construct a slope unit data table in the form of a dataframe, and extract the data in the data feature table into the slope unit data table; construct an adjacent slope unit structure and a boundary length structure in the form of a dict data structure, and extract the corresponding data in the neighbor feature table into the neighbor slope unit structure and the boundary length structure.
[0084] 6. Figure 4 This is a schematic diagram of the sub-fusion process of a slope unit provided by an embodiment of the present invention; as Figure 4 shown, the slope unit fusion process is as follows:
[0085] 6.1. Input parameters, including: the currently generated vector map to be fused, the slope unit data table, the adjacent slope unit structure, the boundary length structure, the slope aspect consistency threshold th asp , the slope aspect relaxation threshold th sl_asp , the isolated island threshold th islet , the maximum fusion area threshold th area , the small area slope aspect threshold th s_asp , the slender slope threshold th slender .
[0086] 6.2. Set the slope unit fusion dictionary is deal ={}, and initialize it; the dictionary is used to save the fusion id (Identity document) corresponding to each slope unit. The fusion rule is that slope units with the same fusion id can perform fusion operations.
[0087] 6.3. Traverse the slope unit data table in ascending order of area, and determine the current target slope unit to be fused; obtain the area, perimeter, slope aspect, slope gradient and other information of the target slope unit.
[0088] 6.4. If the current is deal ={}! = null and area k > th area , that is, there is no slope unit to be fused in the current slope unit fusion dictionary, and the area of the current target slope unit to be fused is greater than the maximum fusion area threshold, return to execute step 6.3; area k represents the area of the current target slope unit to be fused.
[0089] 6.5. Traverse all adjacent slope units of the target slope unit to obtain the unit information of each adjacent slope unit.
[0090] 6.6. Calculate the slope direction consistency index fush sis between the target slope unit and the adjacent slope unit; among them, the slope direction consistency index is the sum of the product of the horizontal slope direction components and the product of the vertical slope direction components of the target slope unit and the adjacent slope unit. The calculated value is the cosine value of the included angle between the slopes of the two slopes, and the larger the value, the closer the slope directions are.
[0091] 6.7. Determine whether the target slope unit and the adjacent slope unit meet the slope direction fusion condition. The slope direction fusion condition can be fush sis ≥th asp ; if it is satisfied, execute the slope unit fusion step 6.8; otherwise, determine whether the relaxation fusion condition is satisfied. The relaxation fusion condition can be th asp > fush sis ≥th sl_asp ; if the relaxation fusion condition is not satisfied, return to execute step 6.5 to recalculate the slope direction consistency between other adjacent slope units and the target slope unit until all adjacent slope units of the target slope unit are traversed. If the relaxation fusion condition is satisfied, execute step 6.8.
[0092] 6.8. Determine whether any of the small area fusion condition, slender fusion condition, and isolated island fusion condition is satisfied; obtain the area area j of the adjacent slope unit, and calculate the slender coefficient slen k of the target slope unit, calculate the slender coefficient slen j of the adjacent slope unit, the maximum adjacent side ratio coefficient ratio, and then perform the detection processes for the small area fusion condition, slender fusion condition, and isolated island fusion condition respectively;
[0093] Exemplarily, the small area fusion condition can be area j ≤th s_asp ; the slender fusion condition can be slen k , slen j ≥th slender; The island fusion condition can be ratio≥th islet .
[0094] If any one of the above three conditions is met, the fusion operation of the target ramp unit and the adjacent ramp unit can be executed, that is, step 6.9; otherwise, return to execute step 6.5.
[0095] 6.9. Update the fusion id of the target ramp unit that meets the fusion condition to n, and update the fusion id of the ramp unit in the ramp unit fusion dictionary based on the updated fusion id.
[0096] 6.10. Determine the current fusion id of the adjacent ramp unit, and determine all the ramp units with the same current fusion id as the adjacent ramp unit. Update the fusion id of all the ramp units and the adjacent ramp unit to n, so that as many ramp units that can be fused as possible can be determined in one iteration through continuous fusion, reducing the number of iterations and improving the fusion efficiency.
[0097] 6.11. Determine whether all the ramp units in the ramp unit data table have been traversed. If the traversal is not over, return to step 6.3, and determine the target ramp unit to be fused this time again in the ramp unit data table in ascending order of area for traversal until all the ramp units have been traversed.
[0098] 6.12. Create a fusion identification data table, which contains the fusion id before update and the fusion id after update of each ramp unit; perform a fusion operation on the ramp unit corresponding to the updated fusion id, and update the vector map of the ramp unit to be fused.
[0099] 7. According to the vector map of the ramp unit to be fused obtained in step 6, calculate the number of ramp units in the current vector map of the ramp unit to be fused, add it to the quantity list, and return to execute step 4.
[0100] 8. Generate a ramp fusion vector map for output based on the fused ramp units; the ramp fusion vector map includes information such as the shape of the fused ramp units.
[0101] The embodiment of the present invention can perform a fusion operation on the ramp unit to be fused in an iterative manner, and can preprocess the fragmented ramp units caused by image resolution errors to avoid affecting the fusion process; and thus can fully and comprehensively fuse the ramp units that can be fused on the premise of ensuring the effect of the ramp units after fusion, better reflecting the ramp landform situation.
[0102] Embodiment 4
[0103] Figure 5The structural diagram of a fusion device for a ramp unit provided by an embodiment of the present invention. This device is used to execute the ramp unit fusion method provided in any of the above embodiments. The device and the ramp unit fusion method in the above embodiments belong to the same inventive concept. For the details not described in detail in the embodiment of the ramp unit fusion device, reference can be made to the embodiment of the above ramp unit fusion method. Specifically, the device may include:
[0104] An adjacent ramp unit determination module 10, configured to construct a target fusion dictionary for storing fusion tags of ramp units to be fused, and based on the vector diagram of the ramp units to be fused, determine the target ramp unit to be fused and the adjacent ramp units adjacent to the target ramp unit;
[0105] A compliance determination module 11, configured to determine whether the target ramp unit and the adjacent ramp units meet a pre-set slope direction consistency condition based on the target feature information of the target ramp unit and the adjacent feature information of the adjacent ramp units; if they meet, enter the label annotation module;
[0106] A label annotation module 12, configured to determine the fusion correspondence between the target ramp unit and the adjacent ramp units, and based on the fusion correspondence, perform label annotation for the target ramp unit and the adjacent ramp units respectively, and update the target fusion dictionary based on the annotated labels;
[0107] A fusion unit module 13, configured to fuse the target ramp unit and the adjacent ramp units based on the target fusion dictionary.
[0108] Based on any optional technical solution in the embodiment of the present invention, optionally, the target feature information includes the target slope direction feature of the target ramp unit, and the adjacent feature information includes the adjacent slope direction feature of the adjacent ramp unit; wherein, the compliance determination module 11 includes:
[0109] A slope direction included angle cosine value calculation unit, configured to calculate the slope direction included angle cosine value between the target ramp unit and the adjacent ramp units based on the target slope direction feature and the adjacent slope direction feature; determine whether the slope direction included angle cosine value is greater than or equal to a pre-set slope direction consistency threshold; if it is greater than or equal to, determine that the target ramp unit and the adjacent ramp units meet the slope direction consistency condition.
[0110] Based on any optional technical solution in the embodiment of the present invention, optionally, the device further includes:
[0111] A relaxation judgment module, configured to if they do not meet, determine whether the target ramp unit and the adjacent ramp units meet a pre-set relaxation fusion condition based on the target feature information and the adjacent feature information.
[0112] Based on any optional technical solution in the embodiments of the present invention, optionally, the device further includes:
[0113] An updated target fusion dictionary module, configured to, if the relaxation fusion condition is satisfied, determine the adjacent area of adjacent ramp units, calculate the elongation coefficient between the target ramp unit and the adjacent ramp units, and based on the adjacent area and the elongation coefficient, determine whether the target ramp unit and the adjacent ramp units meet any one of the preset small area fusion condition, elongation fusion condition, and isolated island fusion condition; if any one is met, execute determining the fusion correspondence between the target ramp unit and the adjacent ramp units, and based on the fusion correspondence, perform label annotation for the target ramp unit and the adjacent ramp units respectively, and update the target fusion dictionary based on the labeled labels.
[0114] Based on any optional technical solution in the embodiments of the present invention, optionally, the device further includes:
[0115] An iteration number determination module, configured to, after fusing the target ramp unit and the adjacent ramp units, determine the current iteration number, and determine the quantity trend of the current ramp units based on the fusion result of the ramp units; based on the current iteration number and the quantity trend, determine whether the current iteration process reaches the stop iteration condition; wherein, the stop iteration condition includes that the current iteration number reaches a preset number threshold or the quantity trend is not a decreasing trend; if the stop iteration condition is not reached, repeat the execution of determining the target ramp unit to be fused and the adjacent ramp units adjacent to the target ramp unit.
[0116] Based on any optional technical solution in the embodiments of the present invention, optionally, the device further includes:
[0117] An output module, configured to, if the stop iteration condition is reached, generate and output a ramp fusion vector diagram based on the current fusion result.
[0118] Based on any optional technical solution in the embodiments of the present invention, optionally, the device further includes:
[0119] A unit area determination module, configured to, before determining the target ramp unit to be fused and the adjacent ramp units adjacent to the target ramp unit, determine the unit area of each ramp unit in the vector diagram of the ramp units to be fused, and determine the ramp units with a unit area smaller than a preset area threshold as the first ramp units; determine each second ramp unit adjacent to the first ramp units, and calculate the boundary lengths of each second ramp unit and the first ramp unit; determine the second ramp unit corresponding to the longest boundary length as the third ramp unit, and perform a fusion operation on the first ramp unit and the third ramp unit.
[0120] The fusion device for slope units provided by the embodiments of the present invention can execute the following method: construct a target fusion dictionary for storing the fusion tags of slope units to be fused, and determine the target slope units to be fused and the adjacent slope units adjacent to the target slope units based on the vector map of the slope units to be fused; determine whether the target slope units and the adjacent slope units meet the preset slope direction consistency condition based on the target feature information of the target slope units and the adjacent feature information of the adjacent slope units; if they meet, determine the fusion correspondence relationship between the target slope units and the adjacent slope units, and can perform label annotation for the target slope units and the adjacent slope units respectively based on the fusion correspondence relationship, and update the target fusion dictionary based on the labeled tags; fuse the target slope units and the adjacent slope units based on the target fusion dictionary. By discriminating through the slope direction consistency condition, the embodiments of the present invention fuse adjacent slope units while ensuring that the fused slope units have slope direction consistency, improve the problem of too small granularity of the slope unit division result, and better reflect the slope landform situation.
[0121] It should be noted that in the embodiments of the above-mentioned slope unit fusion device, the included units and modules are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the present invention.
[0122] Embodiment Five
[0123] Figure 6 It is a structural diagram of an electronic device provided by an embodiment of the present invention. Figure 6 The block diagram of the exemplary electronic device 20 suitable for implementing the embodiments of the present invention is shown. The shown electronic device 20 is only an example and should not bring any limitation to the functions and usage scope of the embodiments of the present invention.
[0124] As Figure 6 shown, the electronic device 20 is presented in the form of a general-purpose computing device. The components of the electronic device 20 may include but are not limited to: one or more processors or processing units 201, a system memory 202, and a bus 203 connecting different system components (including the system memory 202 and the processing unit 201).
[0125] The bus 203 represents one or more of several types of bus architectures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of the multiple bus architectures. By way of example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0126] The electronic device 20 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 20, including volatile and nonvolatile media, removable and non-removable media.
[0127] The system memory 202 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 204 and / or cache memory 205. The electronic device 20 can further include other removable / non-removable, volatile / nonvolatile computer system storage media. By way of example only, a storage system 206 can be used for reading and writing non-removable, nonvolatile magnetic media. A disk drive for reading and writing a removable nonvolatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing a removable nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) can be provided. In these cases, each drive can be connected to the bus 203 through one or more data media interfaces. The memory 202 can include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the embodiments of the present invention.
[0128] A program / utility 208 having a set (at least one) of program modules 207 can be stored, for example, in the memory 202. Such program modules 207 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, and an implementation of a network environment may be included in each or some combination of these examples. The program modules 207 generally perform the functions and / or methods in the embodiments described in the present invention.
[0129] The electronic device 20 can also communicate with one or more external devices 209 (such as a keyboard, a pointing device, a display 210, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 20, and / or communicate with any device that enables the electronic device 20 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 211. Moreover, the electronic device 20 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 212. As shown in the figure, the network adapter 212 communicates with other modules of the electronic device 20 through the bus 203. It should be understood that other hardware and / or software modules can be used in combination with the electronic device 20, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0130] The processing unit 201 executes various functional applications and data processing by running programs stored in the system memory 202.
[0131] An electronic device provided by the present invention can implement the following method: constructing a target fusion dictionary for storing fusion tags of ramp units to be fused, and determining a target ramp unit to be fused and adjacent ramp units adjacent to the target ramp unit based on a vector diagram of the ramp units to be fused; determining whether the target ramp unit and the adjacent ramp units meet a preset slope direction consistency condition based on the target feature information of the target ramp unit and the adjacent feature information of the adjacent ramp units; if they meet, determining a fusion correspondence relationship between the target ramp unit and the adjacent ramp units, and respectively performing label annotation on the target ramp unit and the adjacent ramp units based on the fusion correspondence relationship, and updating the target fusion dictionary based on the labeled tags; fusing the target ramp unit and the adjacent ramp units based on the target fusion dictionary. In the embodiment of the present invention, discrimination is carried out through the slope direction consistency condition, and adjacent ramp units are fused while ensuring that the fused ramp units have slope direction consistency, which improves the problem that the granularity of the ramp unit division result is too small and better reflects the ramp landform situation.
[0132] Embodiment Six
[0133] An embodiment of the present invention provides a storage medium containing computer-executable instructions, and the computer-executable instructions are used to execute a fusion method of ramp units when executed by a computer processor. The method includes:
[0134] Construct a target fusion dictionary for storing fusion labels of slope units to be fused, and based on the vector map of slope units to be fused, determine the target slope units to be fused and the adjacent slope units adjacent to the target slope units; based on the target feature information of the target slope units and the adjacent feature information of the adjacent slope units, determine whether the target slope units and the adjacent slope units meet the pre-set slope direction consistency condition; if they meet, determine the fusion correspondence between the target slope units and the adjacent slope units, and based on the fusion correspondence, perform label annotation for the target slope units and the adjacent slope units respectively, and update the target fusion dictionary based on the annotated labels; based on the target fusion dictionary, fuse the target slope units and the adjacent slope units. In the embodiments of the present invention, discrimination is made through the slope direction consistency condition. While ensuring that the fused slope units have slope direction consistency, adjacent slope units are fused, which improves the problem of too small granularity of the slope unit division result and better reflects the slope landform situation.
[0135] Of course, for a storage medium containing computer-executable instructions provided by the embodiments of the present invention, the computer-executable instructions are not limited to the method operations as described above, and can also execute relevant operations in the slope unit fusion method provided by any embodiment of the present invention.
[0136] The computer storage medium of the embodiments of the present invention can adopt any combination of one or more computer-readable media. The computer-readable media can be computer-readable signal media or computer-readable storage media. The computer-readable storage media can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, the computer-readable storage media can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device.
[0137] A computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.
[0138] The program code contained on a computer-readable medium may be transmitted using any appropriate medium, including - but not limited to - wireless, wire, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0139] The computer program code for performing the operations of the embodiments of the present invention may be written in one or more programming languages or combinations thereof. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0140] Note that the above is only the preferred embodiment of the present invention and the applied technical principles. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein. Various obvious changes, re-adjustments, and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, more other equivalent embodiments may be included, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for fusing ramp units, characterized in that, Including: Determine the unit area of each ramp unit in the ramp unit vector diagram to be fused, and determine the first ramp unit whose unit area is less than the preset area threshold; determine each second ramp unit adjacent to the first ramp unit, and calculate the boundary lengths of each second ramp unit and the first ramp unit; determine the second ramp unit corresponding to the longest boundary length as the third ramp unit, and perform a fusion operation on the first ramp unit and the third ramp unit; Construct a target fusion dictionary for storing the fusion tags of the ramp units to be fused, and based on the ramp unit vector diagram to be fused, determine the target ramp unit to be fused and the adjacent ramp units adjacent to the target ramp unit; Based on the target feature information of the target ramp unit and the adjacent feature information of the adjacent ramp units, determine whether the target ramp unit and the adjacent ramp units meet the preset slope direction consistency condition; If it meets, determine the fusion correspondence relationship between the target ramp unit and the adjacent ramp units, and based on the fusion correspondence relationship, label the target ramp unit and the adjacent ramp units respectively, and update the target fusion dictionary based on the labeled tags; Based on the target fusion dictionary, fuse the target ramp unit and the adjacent ramp units; If it does not meet, based on the target feature information and the adjacent feature information, determine whether the target ramp unit and the adjacent ramp units meet the preset relaxation fusion condition; If the relaxation fusion condition is met, determine the adjacent area of the adjacent ramp units, and based on the adjacent area, determine whether the target ramp unit and the adjacent ramp units meet any one of the preset small area fusion condition and the isolated island fusion condition; if it meets any one, execute determining the fusion correspondence relationship between the target ramp unit and the adjacent ramp units, and based on the fusion correspondence relationship, label the target ramp unit and the adjacent ramp units respectively, and update the target fusion dictionary based on the labeled tags; Wherein, the small area fusion condition is that the adjacent area of the adjacent ramp unit is less than or equal to the preset small area slope direction threshold; the isolated island fusion condition is that the maximum adjacent side ratio coefficient is greater than or equal to the preset isolated island threshold.
2. The method according to claim 1, characterized in that, The target feature information includes the target slope direction feature of the target ramp unit, and the adjacent feature information includes the adjacent slope direction feature of the adjacent ramp unit; wherein, The determining whether the target ramp unit and the adjacent ramp units meet the preset slope direction consistency condition based on the target feature information of the target ramp unit and the adjacent feature information of the adjacent ramp units includes: Based on the target slope direction feature and the adjacent slope direction feature, calculate the cosine value of the slope direction angle between the target ramp unit and the adjacent ramp unit; Determine whether the cosine value of the slope direction angle is greater than or equal to the preset slope direction consistency threshold; If it is greater than or equal to, determine that the target ramp unit and the adjacent ramp units meet the slope direction consistency condition.
3. The method according to claim 1, characterized in that, After fusing the target ramp unit and the adjacent ramp unit, the method further includes: Determining the current iteration number, and determining the quantity trend of the current ramp unit based on the fusion result of the ramp units; Based on the current iteration number and the quantity trend, determining whether the current iteration process reaches a stop iteration condition; wherein, the stop iteration condition includes that the current iteration number reaches a preset number threshold or the quantity trend is not a decreasing trend; If the stop iteration condition is not reached, repeat the process of determining the target ramp unit to be fused and the adjacent ramp unit adjacent to the target ramp unit.
4. The method according to claim 3, characterized in that, The method further includes: If the stop iteration condition is reached, generating and outputting a ramp fusion vector map based on the current fusion result.
5. A device for fusing ramp units, characterized in that, The method includes: A unit area determination module, configured to determine the unit area of each ramp unit in the vector map of the ramp units to be fused, determine the ramp units with the unit area less than a preset area threshold as the first ramp units; determine each second ramp unit adjacent to the first ramp units, and calculate the boundary lengths between each second ramp unit and the first ramp unit; determine the second ramp unit corresponding to the longest boundary length as the third ramp unit, and perform a fusion operation on the first ramp unit and the third ramp unit; An adjacent ramp unit determination module, configured to construct a target fusion dictionary for storing the fusion labels of the ramp units to be fused, and determine the target ramp unit to be fused and the adjacent ramp unit adjacent to the target ramp unit based on the vector map of the ramp units to be fused; A condition compliance determination module, configured to determine whether the target ramp unit and the adjacent ramp unit meet a preset slope direction consistency condition based on the target feature information of the target ramp unit and the adjacent feature information of the adjacent ramp unit; if they meet, enter the label annotation module; if not, enter the relaxation judgment module; A label annotation module, configured to determine the fusion correspondence between the target ramp unit and the adjacent ramp unit, and based on the fusion correspondence, respectively perform label annotation on the target ramp unit and the adjacent ramp unit, and update the target fusion dictionary based on the annotated labels; Based on the target fusion dictionary, fusing the target ramp unit and the adjacent ramp unit; A relaxation judgment module, configured to determine whether the target ramp unit and the adjacent ramp unit meet a preset relaxation fusion condition based on the target feature information and the adjacent feature information; if the relaxation fusion condition is met, enter the update target fusion dictionary module; Update the target fusion dictionary module, which is used to determine the adjacent area of the adjacent slope unit. Based on the adjacent area, determine whether the target slope unit and the adjacent slope unit meet any one of the preset small area fusion condition and island fusion condition; if they meet any one of them, then execute to determine the fusion correspondence between the target slope unit and the adjacent slope unit, and can label the target slope unit and the adjacent slope unit respectively based on the fusion correspondence, and update the target fusion dictionary based on the labeled tags; Wherein, the small area fusion condition is that the adjacent area of the adjacent slope unit is less than or equal to a preset small area slope threshold; the island fusion condition is that the maximum adjacent side ratio coefficient is greater than or equal to a preset island threshold.
6. An electronic device, characterized in that, Comprising: One or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the slope unit fusion method as described in any one of claims 1-4.
7. A computer-readable storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by a processor, it implements the slope unit fusion method as described in any one of claims 1-4.
Citation Information
Patent Citations
Remote sensing image landslide single body dividing method
CN107255516A
Target tracking method fusing convolutional network features and discriminant correlation filter
CN108470355A