Slope extraction method and device based on inclined real scene model and electronic equipment

By utilizing the OSG library to parse tilted reality models, the terrain slope is automatically determined, solving the problem of low automation in traditional methods and achieving efficient and accurate slope extraction.

CN118521536BActive Publication Date: 2026-11-24HUANENG LANCANG RIVER HYDROPOWER CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410583963.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-11
Publication Date
2026-11-24
Estimated Expiration
2044-05-11

AI Technical Summary

Technical Problem

Traditional methods for extracting terrain slope require manual intervention, have low automation levels, and are limited in efficiency and accuracy when dealing with large-scale, complex terrain data.

Method used

The OSG library, an open-scene design tool, is used to analyze tilted real-world models. By traversing the set of points to be determined for slope and setting the search radius and rotation angle increments, the slope information is determined.

Benefits of technology

It achieves automatic batch extraction of terrain slope, with a high degree of automation, high efficiency and high accuracy, and low cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118521536B_ABST
    Figure CN118521536B_ABST
Patent Text Reader

Abstract

This invention proposes a slope extraction method, apparatus, and electronic device based on an inclined real-scene model. The slope extraction method includes: parsing the inclined real-scene model of the target survey area using the OSG library to obtain the model elevation of each point on the inclined real-scene model; traversing the set of points corresponding to the target survey area where the slope needs to be determined; and determining the slope information of each point based on the coordinates of at least one point indicated by the set of points, the model elevation of each point on the inclined real-scene model, a set search radius, and a set rotation angle increment. This achieves automatic batch extraction of terrain slope, offering advantages such as high automation, high efficiency, high accuracy, and low cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of engineering surveying technology, and in particular to a slope extraction method, apparatus, and electronic device based on a tilted real-world model. Background Technology

[0002] Topographic slope extraction is an important step in GIS (Geographic Information System) and topographic analysis to understand the morphology and characteristics of the Earth's surface. However, traditional topographic slope extraction methods often require manual intervention and editing, have low automation levels, and may be limited in efficiency and accuracy when dealing with large-scale, complex topographic data. Summary of the Invention

[0003] The present invention aims to at least partially solve one of the technical problems in the related art.

[0004] Therefore, the first objective of this invention is to propose a slope extraction method based on a tilted real-world model to achieve automatic batch extraction of terrain slope, which has the advantages of high automation, high efficiency, good accuracy and low cost.

[0005] The second objective of this invention is to provide a slope extraction device based on a tilted real-world model.

[0006] The third objective of this invention is to provide an electronic device.

[0007] The fourth objective of this invention is to provide a computer-readable storage medium.

[0008] The fifth objective of this invention is to provide a computer program product.

[0009] To achieve the above objectives, a first aspect of the present invention proposes a slope extraction method based on a tilted real-world model, comprising:

[0010] The OSG library is used to analyze the tilted real-world model of the target survey area to obtain the model elevation of each point on the tilted real-world model.

[0011] The set of slope points corresponding to the target survey area is traversed. Based on the coordinates of at least one slope point indicated by the set of slope points and the model elevation of each point on the tilted real scene model, as well as the set search radius and the set rotation angle increment, the slope information of each slope point is determined.

[0012] To achieve the above objectives, a second aspect of the present invention provides a slope extraction device based on a tilted real-world model, comprising:

[0013] The parsing module is used to parse the tilted real-world model of the target survey area using the open-scene design OSG library, so as to obtain the model elevation of each point on the tilted real-world model.

[0014] The processing module is used to traverse the set of slope points to be determined corresponding to the target survey area, and determine the slope information of each slope point based on the coordinates of at least one slope point indicated by the set of slope points to be determined and the model elevation of each point on the tilted real scene model, as well as setting the search radius and setting the rotation angle increment.

[0015] To achieve the above objectives, a third aspect of the present invention provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the slope extraction method based on the tilted real-world model described in the first aspect.

[0016] To achieve the above objectives, a fourth aspect of the present invention provides a computer-readable storage medium storing computer instructions for causing the computer to execute the slope extraction method based on the tilted real-world model described in the first aspect.

[0017] To achieve the above objectives, a fifth aspect of the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the slope extraction method based on a tilted real-world model as described in the first aspect.

[0018] The technical solutions provided by the embodiments of the present invention have the following beneficial effects:

[0019] The OSG library is used to parse the tilted reality model of the target survey area to obtain the model elevation of each point on the tilted reality model. Then, the set of points corresponding to the target survey area where the slope needs to be determined is traversed. Based on the coordinates of at least one point indicating the slope to be determined from the set of points, the model elevation of each point on the tilted reality model, and by setting the search radius and the increment of the rotation angle, the slope information of each point is determined. This achieves automatic batch extraction of terrain slope, with advantages of high automation, high efficiency, good accuracy, and low cost.

[0020] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0021] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0022] Figure 1 This is a flowchart illustrating a slope extraction method based on a tilted real-world model provided in an embodiment of the present invention.

[0023] Figure 2 This is a schematic diagram of a tilted real-world model provided in an embodiment of the present invention;

[0024] Figure 3 This is a flowchart illustrating another slope extraction method based on a tilted real-world model provided in an embodiment of the present invention.

[0025] Figure 4 This is a flowchart illustrating another slope extraction method based on a tilted real-world model provided in an embodiment of the present invention.

[0026] Figure 5 This is a schematic diagram of a planar search circle and angle rotation provided in an embodiment of the present invention;

[0027] Figure 6 This is a schematic diagram of slope calculation on an inclined real-world model provided in an embodiment of the present invention;

[0028] Figure 7 This is a schematic diagram of the slope at a certain point on a real-world model of a spillway provided in an embodiment of the present invention.

[0029] Figure 8 This is a schematic diagram of the slope at a certain point on a real-world model of a slope provided in an embodiment of the present invention;

[0030] Figure 9 A schematic diagram of a slope extraction device based on a tilted real-world model provided in an embodiment of the present invention;

[0031] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0032] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0033] The following description, with reference to the accompanying drawings, outlines an embodiment of the slope extraction method, apparatus, and electronic device based on a tilted real-world model of the present invention.

[0034] Figure 1 This is a flowchart illustrating a slope extraction method based on a tilted real-world model provided in an embodiment of the present invention.

[0035] like Figure 1 As shown, the slope extraction method based on the tilted reality model includes the following steps:

[0036] Step 101: Use the OSG library to parse the tilted real-world model of the target survey area to obtain the model elevation of each point on the tilted real-world model.

[0037] Among them, the OSG (Open Scene Graph) library is a high-performance, open-source 3D graphics toolkit for real-time visualization.

[0038] As an example, a schematic diagram of the tilted real-world model of the target survey area is shown below. Figure 2 As shown. Since tilted reality models typically contain rich spatial information, such as terrain elevation, building height, and road width, in some embodiments, the model elevation of each point on the tilted reality model can be obtained by parsing the tilted reality model of the target survey area using the OSG library.

[0039] As one possible approach, before using the OSG library to parse the oblique reality model of the target survey area to obtain the model elevation of each point on the oblique reality model, UAV oblique photography technology can be used to obtain the oblique reality model of the target survey area.

[0040] Step 102: Traverse the set of slope points corresponding to the target survey area, and determine the slope information of each slope point based on the coordinates of at least one slope point indicated by the set of slope points and the model elevation of each point on the tilted real scene model, as well as by setting the search radius and the rotation angle increment.

[0041] The set of points to be determined for slope is composed of the coordinates of at least one point. Thus, in some embodiments, by traversing the set of points to be determined for slope corresponding to the target survey area, the coordinates of each point can be obtained. Then, based on the coordinates of each point and the model elevation of each point on the tilted real-world model, as well as setting the search radius and the increment of the rotation angle, the slope information of each point can be determined.

[0042] The search radius can be any set search radius, such as 1 meter, 5 meters, etc. Similarly, the rotation angle increment can be any set rotation angle increment, such as 5 degrees, 10 degrees, etc. The embodiments of the present invention do not limit this.

[0043] One possible implementation is to traverse the set of points corresponding to the target slope in the target survey area. Using these traversed points as centers and a search radius as the radius, a corresponding target circle is generated. Based on the target circle corresponding to the traversed slope points, the coordinates of the traversed slope points, the model elevation of each point on the tilted real-world model, and the set search radius and rotation angle increment, at least one loop is executed to obtain the slope information of the traversed slope points. In each loop, the coordinates of the intersection point between the target diameter corresponding to each loop and the target circle corresponding to the traversed slope points are determined. Based on the coordinates of the intersection points corresponding to each cycle, the model elevation of the intersection points corresponding to each cycle is determined from the model elevation of each point on the tilted real scene model. Based on the model elevation of the intersection points corresponding to each cycle and the set search radius, the slope information of the slope point to be determined for each cycle is determined. The target diameter corresponding to each cycle is the diameter of the target circle corresponding to each cycle in the direction of the target angle corresponding to the corresponding cycle. The target angle corresponding to the first cycle is zero degrees, and the target angle corresponding to subsequent cycles is determined incrementally based on the target angle corresponding to the previous cycle and the set rotation angle.

[0044] It should be noted that each time the traversal is performed, a slope point to be determined is taken from the set of slope points to be determined corresponding to the target survey area, and a target circle corresponding to the slope point to be determined is generated. Based on the target circle corresponding to the slope point to be determined, the coordinates of the slope point to be determined, the model elevation of each point on the tilted real scene model, and the set search radius and set rotation angle increment, at least one loop is executed to obtain the slope information of the slope point to be determined.

[0045] As an example, suppose the search radius is denoted by r, the rotation angle increment is denoted by Δθ, and the target angle corresponding to the i-th iteration is denoted by θ. i This means that by traversing the set of points corresponding to the target survey area where the slope needs to be determined, and taking the point O from the set where the slope needs to be determined, the coordinates O(x0, y0) of the point O can be obtained. A circle is drawn with point O as the center and radius r, which gives the target circle C0 corresponding to the point O. Based on the target circle C0 corresponding to the point O, the coordinates O(x0, y0) of the point O, the model elevation of each point on the inclined real-world model, and r and Δθ, at least one iteration is performed to obtain the slope information of the point O.

[0046] The following is combined Figure 3 The process of each cycle is explained.

[0047] Step 301: For any loop, based on the target angle corresponding to this loop, the coordinates of the slope points to be determined traversed, and the set search radius, determine the coordinates of the intersection point between the target diameter corresponding to this loop and the target circle corresponding to the slope points to be determined traversed.

[0048] In this system, the target angle corresponding to the first cycle is zero degrees, and the target diameter corresponding to each cycle is the diameter of the target circle corresponding to each cycle in the direction passing through the target angle corresponding to the corresponding cycle.

[0049] As one possible implementation, the intersection points include a first intersection point and a second intersection point. For any given loop, the product of the set search radius and the cosine of the target angle corresponding to the current loop is determined as the first intermediate value for that loop, and the product of the set search radius and the sine of the target angle corresponding to the current loop is determined as the second intermediate value for that loop. Thus, the difference between the x-coordinate of the traversed slope point and the first intermediate value corresponding to the current loop is determined as the x-coordinate of the first intersection point for that loop, and the difference between the y-coordinate of the traversed slope point and the second intermediate value corresponding to the current loop is determined as the y-coordinate of the first intersection point for that loop. Furthermore, the sum of the x-coordinates of the traversed slope points and the first intermediate value corresponding to the current loop is determined as the x-coordinate of the second intersection point for that loop, and the sum of the y-coordinates of the traversed slope points and the second intermediate value corresponding to the current loop is determined as the y-coordinate of the second intersection point for that loop.

[0050] As an example, considering the example above, which executes at least one iteration based on the target circle C0 corresponding to the slope point O, the coordinates O(x0, y0) of the slope point O, the model elevations of each point on the tilted real-world model, and r and Δθ, since the target angle θ1 corresponding to the first iteration is zero degrees, the target diameter corresponding to the first iteration is the diameter in the direction of the zero-degree direction of the target circle C0 corresponding to the slope point O. Assuming the target diameter corresponding to the first iteration is represented by L0, and the intersection points of L0 and the target circle C0 corresponding to the slope point O include the first intersection point P1 and the second intersection point P2, and the coordinates of the first intersection point P1 and the second intersection point P2 are represented by P1(x1, y1) and P2(x2, y2) respectively, then...

[0051] x1=x0-r*cos(θ),y1=y0-r*sin(θ)

[0052] x2=x0+r*cos(θ),y2=y0+r*sin(θ)

[0053] In the formula, x0 is the x-coordinate of the slope point O to be determined, y0 is the y-coordinate of the slope point O to be determined, x1 is the x-coordinate of the first intersection point P1, y1 is the y-coordinate of the first intersection point P1, x2 is the x-coordinate of the second intersection point P2, y2 is the y-coordinate of the second intersection point P2, and r is the radius of the target circle C0 corresponding to the slope point O to be determined, which is the set search radius.

[0054] Step 302: Based on the coordinates of the intersection points corresponding to this cycle, determine the model elevation of the intersection points corresponding to this cycle from the model elevations of each point on the tilted real-world model. Based on the model elevation of the intersection points corresponding to this cycle and the set search radius, determine the slope value of the slope point to be determined in this cycle in the direction of the target angle corresponding to this cycle.

[0055] As one possible implementation, after determining the model elevation of the intersection point corresponding to the current cycle from the model elevation of each point on the tilted real scene model based on the coordinates of the intersection point corresponding to the current cycle, the absolute value of the difference between the model elevation of the first intersection point and the model elevation of the second intersection point corresponding to the current cycle can be determined as the target absolute value corresponding to the current cycle. Thus, the ratio between the target absolute value corresponding to the current cycle and twice the set search radius is determined as the slope value of the slope point to be determined in the current cycle in the direction of the target angle corresponding to the current cycle.

[0056] As an example, considering the intersection points of the target diameter L0 corresponding to the first cycle and the target circle C0 corresponding to the slope point O, including the first intersection point P1 and the second intersection point P2, the model elevations at positions P1 and P2 can be obtained on the tilted real-world model using the OSG library based on the coordinates of P1 and P2. Assuming the model elevations at positions P1 and P2 are represented by z1 and z2 respectively, and the slope value of the slope point O in the direction of the target angle θ1 corresponding to the first cycle is represented by i1, then...

[0057]

[0058] In the formula, i1 is the slope value of the slope point O to be determined in the direction of the target angle θ1 corresponding to the first cycle, that is, the slope value of the slope point O to be determined in the direction of zero degrees, z1 is the model elevation at position P1, z2 is the model elevation at position P2, and r is the radius of the target circle C0 corresponding to the slope point O to be determined, that is, the set search radius.

[0059] Step 303: Determine the target angle for the next cycle based on the set rotation angle increment and the target angle corresponding to the current cycle, and stop the cycle if the target angle for the next cycle does not meet the set conditions.

[0060] The set condition can be less than 180 degrees, so the target angle for the next cycle will not meet the set condition if the target angle for the next cycle is greater than or equal to 180 degrees.

[0061] As one possible implementation, the sum of the increment of the set rotation angle and the target angle corresponding to the current cycle can be used to determine the target angle for the next cycle. If the target angle for the next cycle does not meet the set condition, the cycle can be stopped.

[0062] As an example, suppose the increment of the rotation angle is represented by Δθ. Since the target angle θ1 corresponding to the first cycle is zero degrees, i.e., θ1 = 0, we can determine the target angle θ2 corresponding to the second cycle as 0 + Δθ, the target angle θ3 corresponding to the third cycle as 0 + Δθ + Δθ, and so on. Assuming the condition is less than 180 degrees, then when the target angle θ of the i-th cycle... i The loop stops when the angle is not less than 180 degrees, that is, when it is greater than or equal to 180 degrees.

[0063] Step 304: Determine the slope information of the slope point to be determined based on the slope value of the slope point to be determined in the direction of the target angle corresponding to the corresponding cycle.

[0064] As one possible implementation, the slope information includes the slope direction and the slope value, so that the target slope value can be determined from the slope value of the slope point to be determined in each cycle in the direction of the target angle corresponding to the cycle, and the target slope value is determined as the slope value of the slope point to be determined, and the direction of the target angle corresponding to the cycle of the target slope value is determined as the slope direction of the slope point to be determined.

[0065] Optionally, the target slope value can be determined as the maximum slope value among the slope values ​​of the point to be determined for each cycle in the direction of the target angle corresponding to the cycle.

[0066] As an example, suppose the slope values ​​of the desired slope point in each cycle obtained through the above steps, in the direction of the target angle corresponding to the cycle, are: slope value i1 of the desired slope point O in the direction of the target angle θ1 in the first cycle, slope value i2 of the desired slope point O in the direction of the target angle θ2 in the second cycle, slope value i3 of the desired slope point O in the direction of the target angle θ3 in the third cycle, ..., and the target angle θ1 of the desired slope point O in the tenth cycle. 10 Slope value i in the direction 10 If i2 is the largest slope value among these slope values, then i2 can be determined as the slope value of the slope point to be determined, and the direction of the target angle θ2 corresponding to the second cycle can be determined as the slope direction of the slope point to be determined.

[0067] Understandably, the smaller the increment of the rotation angle, the more accurate the slope information of the determined slope point will be, but it will also take more time.

[0068] The slope extraction method based on a tilted real-scene model provided in this invention utilizes the OSG library to parse the tilted real-scene model of the target survey area to obtain the model elevation of each point on the tilted real-scene model. Then, it iterates through the set of points corresponding to the target survey area where the slope needs to be determined. Based on the coordinates of at least one point indicated by the set of points to be determined, the model elevation of each point on the tilted real-scene model, and by setting a search radius and a rotation angle increment, the slope information of each point is determined. This achieves automatic batch extraction of terrain slope, offering advantages such as high automation, high efficiency, good accuracy, and low cost.

[0069] To clearly illustrate the present invention, examples will be given below.

[0070] Figure 4 This is a flowchart illustrating another slope extraction method based on a tilted real-world model provided in an embodiment of the present invention.

[0071] like Figure 4 As shown, the slope extraction method based on the tilted reality model includes the following steps:

[0072] Step 401: Use UAV oblique photography technology to obtain an oblique real-world model of the target survey area.

[0073] Step 402: Use the OSG library to read and parse the tilted real-world model.

[0074] Step 403: Set parameters such as search radius r and rotation angle increment Δθ.

[0075] Step 404: Traverse the set of points for which the slope to be determined, and obtain the slope information at each point based on the point coordinates, the tilted real-world model, and relevant parameters. The specific steps are as follows:

[0076] (1) Take out point O(x0,y0) from the point set, and draw a circle C0 with point O(x0,y0) as the center and r as the radius;

[0077] (2) Taking the east direction as the starting angle direction (0 direction, i.e., the direction where zero degrees are located), let θ = 0, and let L0 be the diameter of circle C0 passing through the 0 direction. L0 intersects circle C0 at P1(x1,y1) and P2(x2,y2) respectively. Calculate the coordinates according to the following formula:

[0078] x1 = x0 - r, y1 = y0

[0079] x² = x₀ + r, y² = y₀

[0080] In the formula,

[0081] x0, y0 — coordinates of point O;

[0082] x1, y1 — coordinates of point P1;

[0083] x2, y2 — coordinates of point P2;

[0084] r — the radius of circle C0.

[0085] (3) Based on the coordinates of P1 and P2, the model elevations at positions P1 and P2 are obtained from the OSG library on the tilted real-world model as z1 and z2, respectively. The slope in this direction is then calculated using the following formula:

[0086]

[0087] In the formula,

[0088] i0—the slope value in the 0 direction;

[0089] z1, z2 — Model elevations of points P1 and P2;

[0090] r — the radius of circle C0.

[0091] (4) Increment θ by Δθ, and denote the diameter of circle C0 passing through the direction of θ as L. θ L θ Intersecting circle C0 at points P3(x3,y3) and P4(x4,y4) respectively, calculate the coordinates using the following formula:

[0092] x3=x0-r*cos(θ), y3=y0-r*sin(θ)

[0093] x4=x0+r*cos(θ), y4=y0+r*sin(θ)

[0094] In the formula,

[0095] x0, y0 — coordinates of point O;

[0096] x3, y3 — coordinates of point P3;

[0097] x4, y4 — coordinates of point P4;

[0098] r—the radius of circle C0;

[0099] θ — rotation angle.

[0100] Optionally, the schematic diagrams of P1, P2, P3, and P4 on circle C0 are as follows: Figure 5 As shown.

[0101] (5) Based on the coordinates of P3 and P4, the model elevations at positions P3 and P4 are obtained from the OSG library on the tilted real-world model as z3 and z4, respectively. The slope in this direction is then calculated using the following formula:

[0102]

[0103] In the formula,

[0104] i θ —Slope in the θ direction;

[0105] z3, z4 — Model elevations of points P3 and P4;

[0106] r — the radius of circle C0.

[0107] Optionally, the above i0, i θ A schematic diagram of slope calculation on a tilted real-world model is shown below. Figure 6 As shown.

[0108] (6) Repeat steps (4) to (5) until θ is greater than or equal to 180°, then end the loop and obtain several sets of slopes.

[0109] (7) Find the maximum slope value and its direction, and use it as the slope information at point O.

[0110] (8) Repeat steps (1) to (7) until all points have been traversed, then end the loop.

[0111] Thus, the slope information of each point in the point set can be obtained. Furthermore, in step (3), the smaller the increment of the rotation angle Δθ, the more accurate the result, but it also requires more time.

[0112] Optionally, after obtaining the slope information at each point, the corresponding information can be displayed on the tilted reality model, for example, Figure 7 This diagram illustrates the slope value at a specific point on a real-world model of the spillway. Figure 8 This diagram illustrates the slope value at a certain point on a real-world model of a slope.

[0113] In summary, this invention first utilizes UAV oblique photogrammetry to acquire an oblique real-scene model of the survey area. Then, it uses the OSG library to read and parse the oblique real-scene model. Next, by setting parameters such as the search radius *r* and the rotation angle increment *Δθ*, it iterates through the set of points for which the slope to be determined is located. Based on the point coordinates, the oblique real-scene model, and relevant parameters, the slope value at each point is obtained, thus achieving automatic batch extraction of terrain slope. The method of this invention is rationally designed and features high automation, high efficiency, good accuracy, and low cost.

[0114] To achieve the above embodiments, the present invention also proposes a slope extraction device based on a tilted real-world model.

[0115] Figure 9 This is a schematic diagram of a slope extraction device based on a tilted real-world model, provided in an embodiment of the present invention.

[0116] like Figure 9 As shown, the slope extraction device based on the tilted real-world model includes: an analysis module 91 and a processing module 92.

[0117] The parsing module 91 is used to parse the tilted real scene model of the target survey area using the open scene design OSG library to obtain the model elevation of each point on the tilted real scene model.

[0118] The processing module 92 is used to traverse the set of slope points to be determined corresponding to the target survey area, and determine the slope information of each slope point based on the coordinates of at least one slope point indicated by the set of slope points to be determined and the model elevation of each point on the tilted real scene model, as well as setting the search radius and setting the rotation angle increment.

[0119] Furthermore, in one possible implementation of this embodiment of the invention, the processing module 92 is further configured to:

[0120] Traverse the set of points corresponding to the slope to be determined in the target survey area, and generate the corresponding target circle with the traversed points as the center and the search radius as the radius.

[0121] Based on the target circle corresponding to the traversed slope point, the coordinates of the traversed slope point, the model elevation of each point on the tilted real-world model, and the set search radius and set rotation angle increment, at least one loop is executed to obtain the slope information of the traversed slope point. In each loop, the coordinates of the intersection point between the target diameter of each loop and the target circle corresponding to the traversed slope point are determined. Based on the coordinates of the intersection point of each loop, the model elevation of the intersection point of each loop is determined from the model elevation of each point on the tilted real-world model. Based on the model elevation of the intersection point of each loop and the set search radius, the slope information of the slope point of each loop is determined. The target diameter of each loop is the diameter of the target circle of each loop in the direction of the target angle of the corresponding loop. The target angle of the first loop is zero degrees, and the target angle of subsequent loops is determined based on the target angle of the previous loop and the set rotation angle increment.

[0122] Furthermore, in one possible implementation of this embodiment of the invention, the processing module 92 is further configured to:

[0123] For any given loop, based on the target angle corresponding to this loop, the coordinates of the slope points to be determined traversed, and the set search radius, determine the coordinates of the intersection point between the target diameter corresponding to this loop and the target circle corresponding to the slope points to be determined traversed. Here, the target angle corresponding to the first loop is zero degrees, and the target diameter corresponding to each loop is the diameter of the target circle corresponding to each loop in the direction passing through the target angle corresponding to the corresponding loop.

[0124] Based on the coordinates of the intersection points corresponding to this cycle, the model elevation of the intersection points corresponding to this cycle is determined from the model elevation of each point on the tilted real scene model. Based on the model elevation of the intersection points corresponding to this cycle and the set search radius, the slope value of the slope point to be calculated corresponding to this cycle in the direction of the target angle corresponding to this cycle is determined.

[0125] Based on the set rotation angle increment and the target angle corresponding to the current cycle, determine the target angle corresponding to the next cycle, and stop the cycle if the target angle corresponding to the next cycle does not meet the set conditions;

[0126] Based on the slope value of the slope point to be determined in each cycle, in the direction of the target angle corresponding to the cycle, the slope information of the slope point to be determined is determined.

[0127] Furthermore, in one possible implementation of this embodiment of the invention, the intersection point includes a first intersection point and a second intersection point; the processing module 92 is further configured to:

[0128] For any given cycle, the product of the set search radius and the cosine of the target angle corresponding to this cycle is determined as the first intermediate value for this cycle, and the product of the set search radius and the sine of the target angle corresponding to this cycle is determined as the second intermediate value for this cycle.

[0129] The difference between the x-coordinate of the traversed slope point and the first intermediate value corresponding to the current cycle is determined as the x-coordinate of the first intersection point corresponding to the current cycle. The difference between the y-coordinate of the traversed slope point and the second intermediate value corresponding to the current cycle is determined as the y-coordinate of the first intersection point corresponding to the current cycle.

[0130] The sum of the x-coordinate of the traversed slope point and the first intermediate value corresponding to the current cycle is determined as the x-coordinate of the second intersection point corresponding to the current cycle. The sum of the y-coordinate of the traversed slope point and the second intermediate value corresponding to the current cycle is determined as the y-coordinate of the second intersection point corresponding to the current cycle.

[0131] Furthermore, in one possible implementation of this embodiment of the invention, the processing module 92 is further configured to:

[0132] The absolute value of the difference between the model elevation of the first intersection point and the model elevation of the second intersection point corresponding to this cycle is determined as the target absolute value corresponding to this cycle.

[0133] The ratio between the absolute value of the target corresponding to the current cycle and twice the set search radius is determined as the slope value of the slope point to be calculated in the current cycle in the direction of the target angle corresponding to the current cycle.

[0134] Furthermore, in one possible implementation of this embodiment of the invention, the processing module 92 is further configured to:

[0135] The sum of the set rotation angle increment and the target angle corresponding to the current cycle is determined as the target angle for the next cycle.

[0136] Furthermore, in one possible implementation of this invention, the slope information includes the slope direction and the slope value; the processing module 92 is further configured to:

[0137] The target slope value is determined from the slope value of the point to be determined corresponding to each cycle in the direction of the target angle corresponding to the corresponding cycle.

[0138] The target slope value is determined as the slope value of the point to be determined, and the direction of the target angle corresponding to the wheel cycle corresponding to the target slope value is determined as the slope direction of the point to be determined.

[0139] Furthermore, in one possible implementation of the present invention, the above-described apparatus further includes:

[0140] Oblique real-world models of the target survey area are obtained using UAV oblique photography technology.

[0141] It should be noted that the foregoing explanation of the slope extraction method embodiment based on the tilted real-scene model also applies to the slope extraction device based on the tilted real-scene model in this embodiment, and will not be repeated here.

[0142] The slope extraction device based on a tilted real-scene model provided in this invention utilizes the OSG library to parse the tilted real-scene model of the target survey area to obtain the model elevation of each point on the tilted real-scene model. It then traverses the set of points corresponding to the target survey area where the slope needs to be determined. Based on the coordinates of at least one point indicated by the set of points to be determined, the model elevation of each point on the tilted real-scene model, and by setting a search radius and a rotation angle increment, the slope information of each point is determined. This achieves automatic batch extraction of terrain slope, offering advantages such as high automation, high efficiency, good accuracy, and low cost.

[0143] To implement the above embodiments, the present invention also proposes an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to execute the slope extraction method based on the tilted real-world model proposed in any of the above embodiments of the present invention.

[0144] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0145] It should be noted that, Figure 10 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.

[0146] like Figure 10 As shown, the electronic device includes:

[0147] The memory 11, the processor 12, and the computer program stored on the memory 11 and capable of running on the processor 12.

[0148] When the processor 12 executes the program, it implements the slope extraction method based on the tilted real-world model provided in any of the above embodiments.

[0149] Furthermore, electronic devices also include:

[0150] Communication interface 13 is used for communication between memory 11 and processor 12.

[0151] The memory 11 is used to store computer programs that can run on the processor 12.

[0152] The memory 11 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage.

[0153] The processor 12 is used to implement the slope extraction method based on the tilted real-scene model described in any of the above embodiments when executing the program.

[0154] If the memory 11, processor 12, and communication interface 13 are implemented independently, then the communication interface 13, memory 11, and processor 12 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 10 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0155] Optionally, in a specific implementation, if the memory 11, processor 12, and communication interface 13 are integrated on a single chip, then the memory 11, processor 12, and communication interface 13 can communicate with each other through an internal interface.

[0156] Processor 12 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.

[0157] To implement the above embodiments, the present invention also proposes a computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the slope extraction method based on the tilted real-scene model proposed in any of the above embodiments of the present invention.

[0158] To implement the above embodiments, the present invention also proposes a computer program product, including a computer program that, when executed by a processor, implements the slope extraction method based on a tilted real-world model proposed in any of the above embodiments of the present invention.

[0159] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0160] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0161] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of the invention pertain.

[0162] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.

[0163] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any of the following techniques known in the art, or a combination thereof: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0164] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0165] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0166] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

Claims

1. A slope extraction method based on a tilted real-world model, characterized in that, include: The OSG library is used to analyze the tilted real-world model of the target survey area to obtain the model elevation of each point on the tilted real-world model. The set of points corresponding to the target survey area to be determined is traversed. Based on the coordinates of at least one point to be determined indicated by the set of points to be determined and the model elevation of each point on the tilted real-world model, and with a set search radius and a set rotation angle increment, the slope information of each point to be determined is determined, including: Traverse the set of slope points corresponding to the target survey area, and generate a target circle with the traversed slope points as the center and the set search radius as the radius; Based on the target circle corresponding to the traversed slope point, the coordinates of the traversed slope point, the model elevation of each point on the tilted real-world model, the set search radius, and the set rotation angle increment, at least one loop is executed to obtain the slope information of the traversed slope point. In each loop, the coordinates of the intersection point between the target diameter corresponding to each loop and the target circle corresponding to the traversed slope point are determined. Based on the coordinates of the intersection point corresponding to each loop, the model elevation of the intersection point corresponding to each loop is determined from the model elevations of each point on the tilted real-world model. Finally, based on the model elevation of the intersection point corresponding to each loop and the set search radius, the slope information of each loop is determined. The slope information of the slope point to be determined is cyclically defined. The target diameter for each cycle is the diameter of the target circle in the direction of the target angle corresponding to the corresponding cycle. The target angle for the first cycle is zero degrees. The target angle for subsequent cycles is determined incrementally based on the target angle of the previous cycle and the set rotation angle. The slope information includes the slope direction and the slope value. The target slope value is determined from the slope values ​​of the slope point to be determined in the direction of the target angle corresponding to the cycle, and the target slope value is set as the slope value of the slope point to be determined. The direction of the target angle corresponding to the cycle with the target slope value is set as the slope direction of the slope point to be determined.

2. The method according to claim 1, characterized in that, Each cycle includes the following steps: For any given cycle, based on the target angle corresponding to this cycle, the coordinates of the target slope points traversed, and the set search radius, determine the coordinates of the intersection point between the target diameter corresponding to this cycle and the target circle corresponding to the target slope points traversed. Here, the target angle corresponding to the first cycle is zero degrees, and the target diameter corresponding to each cycle is the diameter of the target circle corresponding to each cycle in the direction passing through the target angle corresponding to the corresponding cycle. Based on the coordinates of the intersection points corresponding to the current cycle, the model elevation of the intersection points corresponding to the current cycle is determined from the model elevations of each point on the tilted real-world model. Based on the model elevation of the intersection points corresponding to the current cycle and the set search radius, the slope value of the slope point to be determined in the current cycle is determined in the direction of the target angle corresponding to the current cycle. Based on the set rotation angle increment and the target angle corresponding to the current cycle, the target angle corresponding to the next cycle is determined, and the cycle stops if the target angle corresponding to the next cycle does not meet the set conditions. Based on the slope value of the slope point to be determined in the direction of the target angle corresponding to the cycle in each cycle, the slope information of the slope point to be determined is determined.

3. The method according to claim 2, characterized in that, The intersection points include a first intersection point and a second intersection point; for any given cycle, determining the coordinates of the intersection point between the target diameter corresponding to the current cycle and the target circle corresponding to the traversed slope point, based on the target angle corresponding to the current cycle, the coordinates of the traversed slope point, and the set search radius, includes: For any given cycle, the product of the set search radius and the cosine of the target angle corresponding to the current cycle is determined as the first intermediate value corresponding to the current cycle, and the product of the set search radius and the sine of the target angle corresponding to the current cycle is determined as the second intermediate value corresponding to the current cycle. The difference between the x-coordinate of the traversed slope point and the first intermediate value corresponding to the current cycle is determined as the x-coordinate of the first intersection point corresponding to the current cycle. The difference between the y-coordinate of the traversed slope point and the second intermediate value corresponding to the current cycle is determined as the y-coordinate of the first intersection point corresponding to the current cycle. The sum of the x-coordinate of the traversed slope point to be determined and the first intermediate value corresponding to the current cycle is determined as the x-coordinate of the second intersection point corresponding to the current cycle. The sum of the y-coordinate of the traversed slope point to be determined and the second intermediate value corresponding to the current cycle is determined as the y-coordinate of the second intersection point corresponding to the current cycle.

4. The method according to claim 3, characterized in that, The step of determining the slope value of the slope point to be calculated in the current cycle in the direction of the target angle corresponding to the current cycle, based on the model elevation of the intersection point corresponding to the current cycle and the set search radius, includes: The absolute value of the difference between the model elevation of the first intersection point and the model elevation of the second intersection point corresponding to the current cycle is determined as the target absolute value corresponding to the current cycle. The ratio between the absolute value of the target corresponding to the current cycle and twice the set search radius is determined as the slope value of the slope point to be determined in the current cycle in the direction of the target angle corresponding to the current cycle.

5. The method according to claim 2, characterized in that, The step of determining the target angle for the next cycle based on the set rotation angle increment and the target angle corresponding to the current cycle includes: The sum of the set rotation angle increment and the target angle corresponding to the current cycle is determined as the target angle corresponding to the next cycle.

6. The method according to claim 2, characterized in that, The slope information includes slope direction and slope value; determining the slope information of the slope point to be determined based on the slope value of the slope point to be determined in the direction of the target angle corresponding to the cycle of each round includes: The target slope value is determined from the slope value of the point to be determined corresponding to each cycle in the direction of the target angle corresponding to the cycle in the corresponding cycle. The target slope value is determined as the slope value of the slope point to be determined, and the direction of the target angle corresponding to the cycle of the target slope value is determined as the slope direction of the slope point to be determined.

7. The method according to any one of claims 1-5, characterized in that, Before using the open-scene design OSG library to analyze the tilted real-world model of the target survey area to obtain the model elevation of each point on the tilted real-world model, the following steps are also included: An oblique real-world model of the target survey area was obtained using UAV oblique photography technology.

8. A slope extraction device based on a tilted real-world model, characterized in that, include: The parsing module is used to parse the tilted real-world model of the target survey area using the open-scene design OSG library, so as to obtain the model elevation of each point on the tilted real-world model. The processing module is used to traverse the set of slope points to be determined corresponding to the target survey area, and determine the slope information of each slope point based on the coordinates of at least one slope point indicated by the set of slope points to be determined and the model elevation of each point on the tilted real scene model, as well as setting the search radius and setting the rotation angle increment. The processing module is also used to traverse the set of slope points to be determined corresponding to the target survey area, and generate a corresponding target circle with the traversed slope points to be determined as the center and the set search radius as the radius; Based on the target circle corresponding to the traversed slope point, the coordinates of the traversed slope point, the model elevation of each point on the tilted real-world model, the set search radius, and the set rotation angle increment, at least one loop is executed to obtain the slope information of the traversed slope point. In each loop, the coordinates of the intersection point between the target diameter corresponding to each loop and the target circle corresponding to the traversed slope point are determined. Based on the coordinates of the intersection point corresponding to each loop, the model elevation of the intersection point corresponding to each loop is determined from the model elevations of each point on the tilted real-world model. Finally, based on the model elevation of the intersection point corresponding to each loop and the set search radius, the slope information of each loop is determined. The slope information of the slope point to be determined is cyclically defined. The target diameter for each cycle is the diameter of the target circle in the direction of the target angle corresponding to the corresponding cycle. The target angle for the first cycle is zero degrees. The target angle for subsequent cycles is determined incrementally based on the target angle of the previous cycle and the set rotation angle. The slope information includes the slope direction and the slope value. The target slope value is determined from the slope values ​​of the slope point to be determined in the direction of the target angle corresponding to the cycle, and the target slope value is set as the slope value of the slope point to be determined. The direction of the target angle corresponding to the cycle with the target slope value is set as the slope direction of the slope point to be determined.

9. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Pavement damage characteristic image generation method based on laser point cloud

    CN108932743A

  • Slope real-scene image acquisition method based on unmanned aerial vehicle oblique photography

    CN112904894A