A three-dimensional map construction method, device, equipment and storage medium

By constructing a reference surface and calculating the scale in a 3D map, the problem of insufficient accuracy of the 3D map scale is solved, achieving high-precision 3D map modeling and improving the safety and economic benefits of engineering applications.

CN121330206BActive Publication Date: 2026-05-05ZHEJIANG KELAN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG KELAN INFORMATION TECH CO LTD
Filing Date
2025-12-15
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

The low calculation accuracy of existing 3D map scales leads to insufficient modeling accuracy of 3D models, affecting safety and economic issues in engineering applications.

Method used

By determining the viewpoint in the 3D map, constructing a reference surface and calculating the height of the reference surface window, and determining the 3D map scale based on perspective projection rules, the accuracy of scale calculation is improved.

Benefits of technology

It enables rapid and accurate calculation of scale information at any location in a 3D map, improving the modeling accuracy of 3D maps and avoiding safety and economic problems in engineering applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121330206B_ABST
    Figure CN121330206B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, and storage medium for constructing a 3D map, applicable to the field of 3D mapping. It involves determining a reference point within the view frustum of a viewpoint, constructing a reference plane containing the reference point and parallel to the view frustum, determining the height of the 3D map rendering interface window, and determining the height of the reference plane window. The unit of the 3D map rendering interface window height is pixels, while the unit of the reference plane window height is length. A distance-pixel ratio is determined based on the ratio of the reference plane window height to the 3D map rendering interface window height. The 3D map scale of the reference point is determined based on the distance-pixel ratio, constructing a 3D map containing the 3D map scale. Based on perspective projection rules, the scale information at any location in the 3D map can be calculated quickly and accurately, improving the efficiency of constructing a 3D map with a high-precision scale. The high-precision scale can assist in obtaining accurate geographic information within the 3D map, thereby improving modeling accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of three-dimensional maps, and in particular to a three-dimensional map construction method, a three-dimensional map construction device, an electronic device, and a computer-readable storage medium. Background Technology

[0002] Map scale is the ratio of the length of a line segment on a map to the horizontal projection length of the corresponding line segment on the ground, used to indicate the degree of reduction in the representation of geographical features. The accuracy of a 3D map scale directly affects the modeling accuracy of a 3D model. When the accuracy of the 3D map scale is low, the accuracy of the 3D geographic information obtained from it is low, and consequently, the accuracy of the modeling based on that information is also low. In engineering applications, such as terrain exploration, urban planning, and map navigation, low-precision modeling leads to safety and economic problems. Currently, the determination of the 3D map scale is based on the viewpoint height of the current 3D map. However, in a 3D map system, which is typically an ellipsoid similar to the Earth, the same window height represents different actual 3D lengths depending on the viewing angle and location. Therefore, the calculated accuracy of the 3D map scale is low, leading to lower modeling accuracy in the 3D model. Summary of the Invention

[0003] The purpose of this invention is to provide a three-dimensional map construction method, a three-dimensional map construction device, an electronic device, and a computer-readable storage medium, which are applied in the field of three-dimensional maps. This method, based on perspective projection rules, can quickly and accurately calculate the scale information of any location in a three-dimensional map, improve the efficiency of constructing a three-dimensional map containing a high-precision scale, obtain accurate geographic information through the high-precision scale, and improve the modeling accuracy.

[0004] To address the aforementioned technical problems, this invention provides a three-dimensional map construction method, comprising:

[0005] Determine a viewpoint in the 3D map, determine a reference point within the viewpoint's view frustum, and construct a reference plane that includes the reference point and is parallel to the view frustum's far section.

[0006] The height of the 3D map rendering interface window is determined, and the height of the reference plane window is determined; the unit of the height of the 3D map rendering interface window is pixels, and the unit of the height of the reference plane window is length.

[0007] The distance pixel ratio is determined based on the ratio of the height of the 3D map rendering interface window to the height of the reference surface window;

[0008] The 3D map scale of the reference point is determined based on the distance pixel ratio, and the 3D map containing the 3D map scale is constructed.

[0009] Optionally, determining the reference plane window height includes:

[0010] The upper line segment is determined based on the midpoint between the viewpoint and the upper edge of the far section, and the lower line segment is determined based on the midpoint between the viewpoint and the lower edge of the far section.

[0011] The intersection of the reference surface and the upper line segment is determined as the upper line segment intersection point, and the intersection of the reference surface and the lower line segment is determined as the lower line segment intersection point;

[0012] The reference surface window line segment is determined based on the intersection point of the upper line segment and the intersection point of the lower line segment, and the length of the reference surface window line segment is determined as the height of the reference surface window.

[0013] Optionally, determining the length of the reference surface window line segment as the height of the reference surface window includes:

[0014] In the far section, determine the center point of the far section located in the direction of the viewpoint, and determine the viewing line segment of the far section based on the viewpoint and the center point of the far section;

[0015] The intersection of the reference plane and the viewing line segment of the far section is determined as the center point of the reference plane, and the viewing line segment of the reference plane is determined based on the viewpoint and the center point of the reference plane;

[0016] Determine the length of the reference plane viewing line segment, and based on the length of the reference plane viewing line segment and the vertical angle of the viewpoint, determine the length between the intersection of the upper line segment and the center point of the reference plane;

[0017] The height of the reference surface window is determined by twice the length between the intersection of the upper line segment and the center point of the reference surface.

[0018] Optionally, determining the length of the reference plane view segment includes:

[0019] Determine a first vector with the viewpoint as the starting point and the reference point as the ending point;

[0020] Determine a second vector that starts from the viewpoint and ends at the center point of the far section;

[0021] Based on the vector projection rule, a third vector is determined using the first vector and the second vector, with the viewpoint as the starting point and the center point of the reference surface as the ending point.

[0022] The coordinates of the center point of the reference surface are determined based on the coordinates of the viewpoint and the third vector.

[0023] The length of the reference surface view segment is determined based on the coordinates of the center point of the reference surface and the coordinates of the viewpoint.

[0024] Optionally, based on the length of the line segment along the reference plane and the vertical angle of the viewpoint, the length between the intersection of the upper line segment and the center point of the reference plane is determined, including:

[0025] The length between the intersection of the upper line segment and the center point of the reference surface is obtained by inputting the length of the reference surface line segment and the vertical angle of the viewpoint into the length formula;

[0026] The expression for the length formula is:

[0027] 1 / 2 * h1 = d * tan(1 / 2 * α);

[0028] In the formula, 1 / 2*h1 is the length between the intersection of the upper line segment and the center point of the reference surface, h1 is the height of the reference surface window, d is the length of the line segment of the reference surface view, and α is the vertical angle of the viewpoint.

[0029] Optionally, determine the height of the 3D map rendering interface window, including:

[0030] Obtain the window information of the 3D map rendering interface window, and determine the height of the 3D map rendering interface window from the window information.

[0031] Optionally, determining a reference point within the visual cone of the viewpoint includes:

[0032] Obtain the mouse position within the view frustum of the viewpoint, convert the mouse position into a 3D mouse position in the 3D map, and determine the 3D mouse position as the reference point.

[0033] To solve the above-mentioned technical problems, the present invention provides a three-dimensional map building device, comprising:

[0034] The first module is used to determine a viewpoint in a three-dimensional map, determine a reference point within the viewpoint's view frustum, and construct a reference surface that includes the reference point and is parallel to the view frustum's far section.

[0035] The second module is used to determine the height of the 3D map rendering interface window and the height of the reference surface window of the reference surface; the unit of the height of the 3D map rendering interface window is pixels, and the unit of the height of the reference surface window is length.

[0036] The third module is used to determine the distance pixel ratio based on the ratio of the height of the 3D map rendering interface window to the height of the reference surface window;

[0037] The fourth module is used to determine the three-dimensional map scale of the reference point based on the distance pixel ratio, and to construct the three-dimensional map containing the three-dimensional map scale.

[0038] To solve the above-mentioned technical problems, the present invention provides an electronic device, comprising:

[0039] Memory, used to store computer programs;

[0040] A processor is used to implement the three-dimensional map construction method described above when executing the computer program.

[0041] To address the aforementioned technical problems, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the aforementioned three-dimensional map construction method.

[0042] As can be seen, this invention determines a viewpoint in a 3D map, identifies a reference point within the viewpoint's frustum, and constructs a reference plane containing the reference point and parallel to the frustum. It also determines the height of the 3D map rendering interface window and the height of the reference plane window. The unit of the 3D map rendering interface window height is pixels, while the unit of the reference plane window height is length. The distance pixel ratio is determined based on the ratio of the 3D map rendering interface window height to the reference plane window height. Finally, the 3D map scale of the reference point is determined based on the distance pixel ratio, thus constructing a 3D map containing the 3D map scale. This invention, based on perspective projection rules, can quickly and accurately calculate the scale information at any location in a 3D map, improving the efficiency of constructing a 3D map with a high-precision scale. By obtaining accurate geographic information through the high-precision scale, it enhances modeling accuracy. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0044] Figure 1 A flowchart of a three-dimensional map construction method provided in an embodiment of the present invention;

[0045] Figure 2 This is an example diagram of a cross-section of a cone including a reference point, provided in an embodiment of the present invention.

[0046] Figure 3 An example view of a cross-section of a cone including a reference plane, provided as an embodiment of the present invention;

[0047] Figure 4 This is a structural block diagram of a three-dimensional map building device provided in an embodiment of the present invention. Detailed Implementation

[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0049] Traditional 2D maps have a scale function, but because the map itself is two-dimensional, the scale is roughly the same for all directions and lengths, thus displaying the current map scale well. However, in 3D maps, the scale cannot be directly calculated using the same method as in 2D maps. If the traditional method of calculating the scale based on the viewpoint height is used, due to the perspective projection and the fact that the 3D view frustum appears larger when closer and smaller when farther away, the calculated scale for near and far positions will be the same, resulting in a significant loss of accuracy.

[0050] In 3D maps, the scale is typically calculated based on the viewpoint height of the current 3D scene. A 3D map system is generally an ellipsoid similar to the Earth; viewed from different angles, different locations appear on the window, and the lengths within the same window represent different actual 3D lengths. For example, from a level viewpoint, nearby buildings and distant mountains may have the same pixel value projected onto the window (due to perspective projection), but the lengths represented by those same pixel values ​​are different. Current methods for calculating 3D map scales have low precision. Low-precision scales result in low-precision 3D map geographic information, which in turn reduces the accuracy of the 3D models obtained from these maps, leading to economic and security issues.

[0051] For example, in urban planning projects, when using 3D maps to design urban planning schemes, if the scale and accuracy of the 3D map are low, the accuracy of the roads, bridges, buildings, and other structures obtained from the modeling will deviate significantly from the actual plans, leading to economic and safety issues. Similarly, in the field of map navigation, when navigation is performed using low-precision 3D geographic information, the navigation information will deviate significantly from the actual data.

[0052] The following combination Figure 1 , Figure 1 A flowchart of a three-dimensional map construction method provided in an embodiment of the present invention, the method may include:

[0053] S101: Determine the viewpoint in the 3D map, determine the reference point within the viewpoint's view cone, and construct a reference surface that includes the reference point and is parallel to the far section of the view cone.

[0054] This embodiment determines the viewpoint in a 3D map. In a 3D map, the viewpoint is a complete set of parameters that defines how an observer views a 3D scene. It is essentially a virtual camera that determines which objects in 3D space are seen, and with what perspective, angle, and extent they are presented on the 2D screen. This embodiment does not limit the way the viewpoint is set; it can be set based on the actual application.

[0055] In this embodiment, after determining the viewpoint, a reference point can be determined within the view frustum of the viewpoint. This embodiment does not limit the specific method of determining the reference point. It can be set based on the mouse position. For example, the mouse position within the view frustum of the viewpoint can be obtained, the mouse position can be converted into a 3D mouse position in a 3D map, and the 3D mouse position can be determined as the reference point.

[0056] like Figure 2 As shown, E is the viewpoint, P is the reference point, the far section of the view cone is generally rectangular, F1 is the midpoint of the upper line segment of the far section, F2 is the midpoint of the lower line segment of the far section, C is the center point of the far section, and the vertical angle of the current viewpoint is α (in radians).

[0057] The viewpoint information includes relevant parameters of perspective projection, such as viewpoint position, viewpoint orientation, viewpoint direction, distance between near and far sections, vertical angle, and aspect ratio (used to calculate the horizontal angle: horizontal angle = aspect ratio * vertical angle). All planes parallel to the near and far sections are calculated using perspective projection information, and the resulting pixel width and height are the width and height of the 3D map rendering window, so the 3D map will not be stretched or deformed when displayed.

[0058] This embodiment can construct a reference plane that includes a reference point and is parallel to the distal section of the visual cone.

[0059] S102: Determine the height of the 3D map rendering interface window and the height of the reference plane window; the unit of the 3D map rendering interface window height is pixels, and the unit of the reference plane window height is length.

[0060] This embodiment can determine the height h of the 3D map rendering interface window. The height of the 3D map rendering interface window is the interface height of the 3D map display interface. Generally, the window information of the 3D map rendering interface window can be obtained, and the height of the 3D map rendering interface window can be determined from the window information. Generally, the window information includes (resolution: width and height, both in pixels).

[0061] This embodiment can determine the height of the reference surface window. The unit of the reference surface window height is distance. This embodiment does not limit the distance unit, and it can generally be meters (m).

[0062] Due to the rules of perspective projection, on reference planes parallel to near and far sections, the length represented by a unit pixel is the same.

[0063] This embodiment can determine the height of the reference surface window. Specifically, the upper line segment is determined based on the midpoint between the viewpoint and the upper edge of the far section, and the lower line segment is determined based on the midpoint between the viewpoint and the lower edge of the far section; the intersection of the reference surface and the upper line segment is determined as the upper line segment intersection point, and the intersection of the reference surface and the lower line segment is determined as the lower line segment intersection point; the reference surface window line segment is determined based on the intersection of the upper and lower line segments, and the length of the reference surface window line segment is determined as the reference surface window height.

[0064] like Figure 3 As shown, the upper line segment EF1 is constructed by viewpoint E and the midpoint F1 of the upper edge of the far section, and the lower line segment EF2 is constructed by viewpoint E and the midpoint F2 of the upper edge of the far section. The intersection of the reference plane and the upper line segment is the intersection point P1 of the upper line segment, and the intersection of the reference plane and the upper line segment is the intersection point P2 of the upper line segment. The intersection points of the upper and lower line segments are used to construct the reference plane window line segment P1P2. The length of the reference plane window line segment is the height of the reference plane window.

[0065] This embodiment does not limit the specific method of determining the length of the reference plane window segment as the height of the reference plane window. Generally, the center point of the far section located in the direction of the viewpoint is determined in the far section, and the viewing line segment of the far section is determined based on the viewpoint and the center point of the far section; the intersection of the reference plane and the viewing line segment of the far section is determined as the center point of the reference plane, and the viewing line segment of the reference plane is determined based on the viewpoint and the center point of the reference plane; the length of the viewing line segment of the reference plane is determined, and the length between the intersection of the upper line segment and the center point of the reference plane is determined based on the length of the viewing line segment of the reference plane and the vertical angle of the viewpoint; twice the length between the intersection of the upper line segment and the center point of the reference plane is determined as the height of the reference plane window.

[0066] like Figure 3 As shown, the intersection of the ray pointing from viewpoint E and the circular cross-section is the center point C of the far cross-section. Based on viewpoint E and the center point C of the far cross-section, the viewing line segment EC of the far cross-section is determined. The intersection of the reference plane and the viewing line segment EC of the far cross-section is determined as the center point P' of the reference plane. Based on viewpoint E and the center point P' of the reference plane, the viewing line segment EP' of the reference plane can be determined. Points P, P', P1, P2, and the reference plane they reside on are parallel to the plane of the near and far cross-sections (i.e.,...). and ).

[0067] This embodiment can determine the length of the reference plane viewing line segment, and determine the length between the intersection of the upper line segment and the center point of the reference plane based on the length of the reference plane viewing line segment and the vertical angle of the viewpoint.

[0068] Due to the symmetry rule, the length between the intersection point of the upper line segment and the center point of the reference plane is equal to the length between the intersection point of the upper line segment and the center point of the reference plane. Therefore, twice the length between the intersection point of the upper line segment and the center point of the reference plane can be determined as the height of the reference plane window.

[0069] This embodiment does not limit the specific method for determining the length of the reference plane view segment. Generally, a first vector with the viewpoint as the starting point and the reference point as the ending point can be determined; a second vector with the viewpoint as the starting point and the far section center point as the ending point can be determined; based on the vector projection rule, a third vector with the viewpoint as the starting point and the reference plane center point as the ending point can be determined using the first and second vectors; the coordinates of the reference plane center point can be determined based on the coordinates of the viewpoint and the third vector; and the length of the reference plane view segment can be determined based on the coordinates of the reference plane center point and the coordinates of the viewpoint.

[0070] like Figure 3 As shown, the first vector is constructed with viewpoint E as the starting point and reference point P as the ending point. A second vector is constructed starting from viewpoint E and ending at the center point C of the far section. Furthermore, based on the vector projection rule, the first vector is used and the second vector Determine the third vector starting from viewpoint E and ending at the center point P' of the reference plane. .

[0071] The third vector can be calculated as shown in the following formula (the " " in the formula below... ", which represents the vector dot product:

[0072] ;

[0073] The coordinates of the viewpoint are known quantities. Based on the coordinates of the viewpoint and the third vector, the coordinates of the center point of the reference plane can be determined.

[0074] ;

[0075] Using P' as the calculation point, calculate the length d from P' to the viewpoint E, which is also the length of the line segment in the reference plane's line of sight;

[0076] .

[0077] like Figure 3 As shown, since in right triangle P'EP1, tan( P'EP1) is equal to the length of its opposite side (P1P') divided by the length of its adjacent side (EP'):

[0078] ;

[0079] Since P' is the midpoint of P1P2, the length between the intersection of the upper line segments and the center point of the reference plane is half the height h1 of the reference plane window, which is 1 / 2 * h1. P'EP1 is half of the vertical angle of the viewpoint, which is 1 / 2*α.

[0080] Therefore, according to the trigonometric function formulas, we know that:

[0081] ;

[0082] This embodiment does not limit the specific method of determining the length between the intersection point of the upper line segment and the center point of the reference plane based on the length of the reference plane line segment and the vertical angle of the viewpoint. Generally, the length of the reference plane line segment and the vertical angle of the viewpoint can be input into the length formula to obtain the output length between the intersection point of the upper line segment and the center point of the reference plane. The expression of the length formula is:

[0083] 1 / 2 * h1 = d * tan(1 / 2 * α);

[0084] In the formula, 1 / 2*h1 is the length between the intersection of the upper line segment and the center point of the reference plane, h1 is the height of the reference plane window, d is the length of the line segment in the view of the reference plane, and α is the vertical angle of the viewpoint.

[0085] In other words, the formula for calculating the height of the reference window is:

[0086] h1=2*d*tan(1 / 2*α).

[0087] S103: Determine the distance pixel ratio based on the ratio of the height of the 3D map rendering interface window to the height of the reference plane window.

[0088] This embodiment can determine the distance-to-pixel ratio based on the ratio of the height of the 3D map rendering interface window to the height of the reference plane window. Since the height of the 3D map rendering interface window is h, and the unit is pixels, the distance-to-pixel ratio s at point P, that is, the distance (m / pixel) corresponding to one pixel, is calculated as follows:

[0089] ;

[0090] Therefore, the ratio of the pixels at the current reference point position to the distance is s.

[0091] S104: Determine the 3D map scale of the reference point based on the distance pixel ratio, and construct a 3D map containing the 3D map scale.

[0092] This embodiment calculates the scale information of the current reference point based on the distance pixel ratio 's' according to a set scale rule. The calculated distance pixel ratio 's' is generally a fraction, so it needs to be converted to a scale format. For example, if the calculated 's' is 2 / 125, or 0.016, the converted scale format can be 8:500, meaning 8 pixels represent 500 meters. The distance values ​​in the scale are generally all zeros except for the first digit, such as 1, 2, 3, ..., 9, 10, 20, ..., 90, 100, 200, 300, ..., 10000, 20000, etc.

[0093] In this embodiment, a 3D map containing the 3D map scale can be quickly and accurately constructed based on the calculated 3D map scale. The high-precision 3D map scale can obtain more accurate 3D map geographic information, thereby improving the modeling accuracy of modeling based on 3D map geographic information and avoiding engineering safety and economic problems caused by low-precision modeling models in engineering applications.

[0094] In addition to urban planning, terrain exploration, and map navigation, the 3D map with a 3D map scale in this embodiment can also be applied to various scenarios such as sand table project simulation and security projects.

[0095] For example, in sand table project simulations, timely response and accurate issuance of instructions are crucial. The solution in this embodiment can quickly obtain the precise scale of each reference point, enabling the rapid acquisition of 3D scene information and the issuance of accurate instructions.

[0096] For example, in security projects such as barracks / prison areas, the solution in this embodiment can quickly obtain the precise scale of each reference point, which can timely and accurately determine the scope of the incident in the three-dimensional scene and set the prevention scope, thereby reducing unnecessary waste of resources and reducing losses caused by emergencies.

[0097] Based on the above embodiments, the present invention can quickly and accurately calculate the scale information of any location in a 3D map based on perspective projection rules, improve the efficiency of constructing a 3D map containing a high-precision scale, and thus obtain accurate geographic information through the high-precision scale, thereby improving the modeling accuracy.

[0098] The following combination Figure 4 The figure is a structural block diagram of a three-dimensional map building device provided in an embodiment of the present invention. The device may include:

[0099] The first module 100 is used to determine the viewpoint in the three-dimensional map, determine the reference point within the viewpoint's view cone, and construct a reference surface containing the reference point and parallel to the view cone's far section.

[0100] The second module 200 is used to determine the height of the 3D map rendering interface window and the height of the reference plane window; the unit of the 3D map rendering interface window height is pixels, and the unit of the reference plane window height is length.

[0101] The third module 300 is used to determine the distance pixel ratio based on the ratio of the height of the 3D map rendering interface window to the height of the reference plane window;

[0102] The fourth module 400 is used to determine the 3D map scale of the reference point based on the distance pixel ratio and to construct a 3D map containing the 3D map scale.

[0103] Based on the above embodiments, the present invention can quickly and accurately calculate the scale information of any location in a 3D map based on perspective projection rules, construct a 3D map containing a high-precision scale, and then obtain accurate geographical information through the high-precision scale, thereby improving the modeling accuracy.

[0104] Based on the above embodiments, the second module 200 may include:

[0105] The first submodule is used to determine the upper line segment based on the midpoint between the viewpoint and the upper edge of the far section, and to determine the lower line segment based on the midpoint between the viewpoint and the lower edge of the far section.

[0106] The second submodule is used to determine the intersection point of the reference plane and the upper line segment as the upper line segment intersection point, and to determine the intersection point of the reference plane and the lower line segment as the lower line segment intersection point;

[0107] The third submodule is used to determine the reference surface window line segment based on the intersection of the upper line segment and the intersection of the lower line segment, and to determine the length of the reference surface window line segment as the height of the reference surface window.

[0108] Based on the above embodiments, the third submodule may include:

[0109] The first unit is used to determine the center point of the far section located in the direction of the viewpoint in the far section, and to determine the line segment of the far section in the direction of the viewpoint based on the viewpoint and the center point of the far section;

[0110] The second unit is used to determine the center point of the reference plane by the intersection of the reference plane and the viewing line segment of the far section, and to determine the viewing line segment of the reference plane based on the viewpoint and the center point of the reference plane.

[0111] The third unit is used to determine the length of the reference plane line segment. Based on the length of the reference plane line segment and the vertical angle of the viewpoint, the length between the intersection of the upper line segment and the center point of the reference plane is determined.

[0112] The fourth unit is used to determine the height of the reference surface window as twice the length between the intersection of the upper line segments and the center point of the reference surface.

[0113] Based on the above embodiments, the third unit may include:

[0114] The first sub-unit is used to determine the first vector starting from the viewpoint and ending at the reference point;

[0115] The second sub-unit is used to determine the second vector, which starts from the viewpoint and ends at the center point of the far section.

[0116] The third subunit is used to determine a third vector with the viewpoint as the starting point and the center point of the reference surface as the ending point, based on the vector projection rules and using the first and second vectors.

[0117] The fourth sub-unit is used to determine the coordinates of the center point of the reference surface based on the coordinates of the viewpoint and the third vector;

[0118] The fifth sub-unit is used to determine the length of the reference plane line segment based on the coordinates of the reference plane center point and the viewpoint.

[0119] Based on the above embodiments, the third unit may include:

[0120] The sixth sub-unit is used to input the length of the reference plane line segment and the vertical angle of the viewpoint into the length formula to obtain the length between the intersection point of the upper line segment and the center point of the reference plane.

[0121] The expression for the length formula is:

[0122] 1 / 2 * h1 = d * tan(1 / 2 * α);

[0123] In the formula, 1 / 2*h1 is the length between the intersection of the upper line segment and the center point of the reference surface, h1 is the height of the reference surface window, d is the length of the line segment of the reference surface, and α is the vertical angle of the viewpoint.

[0124] Based on the above embodiments, the second module 200 may include:

[0125] The fourth submodule is used to obtain the window information of the 3D map rendering interface window and determine the height of the 3D map rendering interface window from the window information.

[0126] Based on the above embodiments, the first module 100 may include:

[0127] The fifth submodule is used to obtain the mouse position within the view frustum of the viewpoint, convert the mouse position into a 3D mouse position in the 3D map, and determine the 3D mouse position as a reference point.

[0128] Based on the above embodiments, the present invention also provides an electronic device, which may include a memory and a processor. The memory stores a computer program, and when the processor calls the computer program in the memory, it can implement the steps provided in the above embodiments. Of course, the device may also include various necessary network interfaces, a power supply, and other components.

[0129] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by an execution terminal or processor, can implement the method provided in the embodiments of the present invention; the storage medium may include various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0130] In this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A method for constructing a three-dimensional map, characterized in that, include: Determine a viewpoint in the 3D map, determine a reference point within the viewpoint's view frustum, and construct a reference plane that includes the reference point and is parallel to the view frustum's far section. The height of the 3D map rendering interface window is determined, and the height of the reference plane window is determined; the unit of the height of the 3D map rendering interface window is pixels, and the unit of the height of the reference plane window is length. The distance pixel ratio is determined based on the ratio of the height of the 3D map rendering interface window to the height of the reference surface window; The three-dimensional map scale of the reference point is determined based on the distance pixel ratio, the three-dimensional map containing the three-dimensional map scale is constructed, and the geographic information of the three-dimensional map is obtained through the three-dimensional map scale. Determining the reference plane window height includes: The upper line segment is determined based on the midpoint between the viewpoint and the upper edge of the far section, and the lower line segment is determined based on the midpoint between the viewpoint and the lower edge of the far section. The intersection of the reference surface and the upper line segment is determined as the upper line segment intersection point, and the intersection of the reference surface and the lower line segment is determined as the lower line segment intersection point; The reference surface window line segment is determined based on the intersection point of the upper line segment and the intersection point of the lower line segment, and the length of the reference surface window line segment is determined as the height of the reference surface window; Determining the length of the reference surface window line segment as the height of the reference surface window includes: In the far section, determine the center point of the far section located in the direction of the viewpoint, and determine the viewing line segment of the far section based on the viewpoint and the center point of the far section; The intersection of the reference plane and the viewing line segment of the far section is determined as the center point of the reference plane, and the viewing line segment of the reference plane is determined based on the viewpoint and the center point of the reference plane; Determine the length of the reference plane viewing line segment, and based on the length of the reference plane viewing line segment and the vertical angle of the viewpoint, determine the length between the intersection of the upper line segment and the center point of the reference plane; The height of the reference surface window is determined as twice the length between the intersection of the upper line segments and the center point of the reference surface; Determining the length of the reference plane view segment includes: Determine a first vector with the viewpoint as the starting point and the reference point as the ending point; Determine a second vector that starts from the viewpoint and ends at the center point of the far section; Based on the vector projection rule, a third vector is determined using the first vector and the second vector, with the viewpoint as the starting point and the center point of the reference surface as the ending point. The coordinates of the center point of the reference surface are determined based on the coordinates of the viewpoint and the third vector. The length of the reference surface view segment is determined based on the coordinates of the center point of the reference surface and the coordinates of the viewpoint. Based on the length of the line segment of the reference plane and the vertical angle of the viewpoint, the length between the intersection of the upper line segment and the center point of the reference plane is determined, including: The length between the intersection of the upper line segment and the center point of the reference surface is obtained by inputting the length of the reference surface line segment and the vertical angle of the viewpoint into the length formula; The expression for the length formula is: 1 / 2 * h1 = d * tan(1 / 2 * α); In the formula, 1 / 2*h1 is the length between the intersection of the upper line segment and the center point of the reference surface, h1 is the height of the reference surface window, d is the length of the line segment of the reference surface view, and α is the vertical angle of the viewpoint.

2. The three-dimensional map construction method according to claim 1, characterized in that, Determine the height of the 3D map rendering interface window, including: Obtain the window information of the 3D map rendering interface window, and determine the height of the 3D map rendering interface window from the window information.

3. The three-dimensional map construction method according to claim 1, characterized in that, Determining a reference point within the visual cone of the viewpoint includes: Obtain the mouse position within the view frustum of the viewpoint, convert the mouse position into a 3D mouse position in the 3D map, and determine the 3D mouse position as the reference point.

4. A three-dimensional map building device, characterized in that, include: The first module is used to determine a viewpoint in a three-dimensional map, determine a reference point within the viewpoint's view frustum, and construct a reference surface that includes the reference point and is parallel to the view frustum's far section. The second module is used to determine the height of the 3D map rendering interface window and the height of the reference surface window of the reference surface; the unit of the height of the 3D map rendering interface window is pixels, and the unit of the height of the reference surface window is length. The third module is used to determine the distance pixel ratio based on the ratio of the height of the 3D map rendering interface window to the height of the reference surface window; The fourth module is used to determine the three-dimensional map scale of the reference point based on the distance pixel ratio, construct the three-dimensional map containing the three-dimensional map scale, and obtain the three-dimensional map geographic information through the three-dimensional map scale. Determining the reference plane window height includes: The upper line segment is determined based on the midpoint between the viewpoint and the upper edge of the far section, and the lower line segment is determined based on the midpoint between the viewpoint and the lower edge of the far section. The intersection of the reference surface and the upper line segment is determined as the upper line segment intersection point, and the intersection of the reference surface and the lower line segment is determined as the lower line segment intersection point; The reference surface window line segment is determined based on the intersection point of the upper line segment and the intersection point of the lower line segment, and the length of the reference surface window line segment is determined as the height of the reference surface window; Determining the length of the reference surface window line segment as the height of the reference surface window includes: In the far section, determine the center point of the far section located in the direction of the viewpoint, and determine the viewing line segment of the far section based on the viewpoint and the center point of the far section; The intersection of the reference plane and the viewing line segment of the far section is determined as the center point of the reference plane, and the viewing line segment of the reference plane is determined based on the viewpoint and the center point of the reference plane; Determine the length of the reference plane viewing line segment, and based on the length of the reference plane viewing line segment and the vertical angle of the viewpoint, determine the length between the intersection of the upper line segment and the center point of the reference plane; The height of the reference surface window is determined as twice the length between the intersection of the upper line segments and the center point of the reference surface; Determining the length of the reference plane view segment includes: Determine a first vector with the viewpoint as the starting point and the reference point as the ending point; Determine a second vector that starts from the viewpoint and ends at the center point of the far section; Based on the vector projection rule, a third vector is determined using the first vector and the second vector, with the viewpoint as the starting point and the center point of the reference surface as the ending point. The coordinates of the center point of the reference surface are determined based on the coordinates of the viewpoint and the third vector. The length of the reference surface view segment is determined based on the coordinates of the center point of the reference surface and the coordinates of the viewpoint. Based on the length of the line segment of the reference plane and the vertical angle of the viewpoint, the length between the intersection of the upper line segment and the center point of the reference plane is determined, including: The length between the intersection of the upper line segment and the center point of the reference surface is obtained by inputting the length of the reference surface line segment and the vertical angle of the viewpoint into the length formula; The expression for the length formula is: 1 / 2 * h1 = d * tan(1 / 2 * α); In the formula, 1 / 2*h1 is the length between the intersection of the upper line segment and the center point of the reference surface, h1 is the height of the reference surface window, d is the length of the line segment of the reference surface view, and α is the vertical angle of the viewpoint.

5. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the three-dimensional map construction method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the three-dimensional map construction method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Object extraction method and device, electronic equipment and storage medium

    CN114693820A

  • Map label drawing method and device, computer equipment and storage medium

    CN117830587A