CN117218257A - Rendering method and device and electronic equipment - Google Patents

Rendering method and device and electronic equipment Download PDF

Info

Publication number
CN117218257A
CN117218257A CN202311405816.8A CN202311405816A CN117218257A CN 117218257 A CN117218257 A CN 117218257A CN 202311405816 A CN202311405816 A CN 202311405816A CN 117218257 A CN117218257 A CN 117218257A
Authority
CN
China
Prior art keywords
target
distance
vertex
height
compression coefficient
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311405816.8A
Other languages
Chinese (zh)
Inventor
陈书全
朱永峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Autonavi Yunmap Technology Co ltd
Original Assignee
Beijing Autonavi Yunmap Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Autonavi Yunmap Technology Co ltd filed Critical Beijing Autonavi Yunmap Technology Co ltd
Priority to CN202311405816.8A priority Critical patent/CN117218257A/en
Publication of CN117218257A publication Critical patent/CN117218257A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The application discloses a rendering method, which comprises the following steps: obtaining a target building within a set distance range around a target position based on a target position of a target object; obtaining a target distance from a target position to a vertex of a target building; determining a target height compression coefficient of the vertex according to the target distance of the vertex; determining a rendering height value of the vertex according to the target height compression coefficient of the vertex and the height value of the vertex; and rendering the target building according to the rendering height value of the vertexes of the target building. The rendering height value of the target building is obtained by compressing the height value of the vertex of the building by using the target height compression coefficient, so that the rendering height value of the vertex of the building is smaller than the height value of the vertex of the building, the overall height of the target building is reduced, other space elements which are originally shielded by the target building can be seen by a user, and the user experience is improved.

Description

Rendering method and device and electronic equipment
Technical Field
The present application relates to the field of map rendering technologies, and in particular, to a rendering method, a rendering device, and an electronic device.
Background
Along with the improvement of terminal performance and map data quality, the rendering effect of the electronic map also evolves towards an increasingly refined direction. Electronic maps are commonly used in various scenarios for providing services based on location, such as network booking, shopping, navigation, intelligent driving, etc. Taking a navigation scene as an example, in order to enable a user to generate an immersive user experience when using a navigation function, the prior art proposes a technical scheme of displaying navigation related information (such as a navigation route, road conditions, guiding actions, etc.) on a three-dimensional electronic map in a superimposed manner.
Although the rendering effect of the three-dimensional electronic map is finer and closer to the real world, the inventor finds that, because the view angle of the user looking at the three-dimensional electronic map is different from the view angle of the user looking at the real world, if the display height of the building in the three-dimensional electronic map is unreasonable, the problem that the building blocks other space elements in the three-dimensional electronic map can occur, thereby affecting the user experience.
Therefore, a technical scheme is needed to solve the problem of shielding other space elements by the building in the three-dimensional electronic map.
Disclosure of Invention
In order to solve or at least partially solve the technical problems, the embodiment of the application provides a rendering method, a rendering device and electronic equipment.
In a first aspect, an embodiment of the present application provides a rendering method, including:
obtaining a target building within a set distance range around a target position based on a target position of a target object;
acquiring a target distance from the target position to the vertex of the target building;
determining a target height compression coefficient of the vertex according to the target distance of the vertex;
determining a rendering height value of the vertex according to the target height compression coefficient of the vertex and the height value of the vertex;
and rendering the target building according to the rendering height value of the vertexes of the target building.
In a second aspect, an embodiment of the present application provides a rendering apparatus, including:
a first acquisition unit configured to acquire a target building within a set distance range around a target position based on a target position of a target object;
a second acquisition unit configured to acquire a target distance from the target position to a vertex of the target building;
a first determining unit, configured to determine a target height compression coefficient of the vertex according to a target distance of the vertex;
a second determining unit, configured to determine a rendering height value of the vertex according to a target height compression coefficient of the vertex and the height value of the vertex;
and the rendering unit is used for rendering the target building according to the rendering height value of the vertexes of the target building.
In a third aspect, an embodiment of the present application provides an electronic device, the device including a processor and a memory;
the processor is configured to execute instructions stored in the memory to cause the apparatus to perform the method of any one of the first aspects above.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium comprising instructions that instruct a device to perform the method of any one of the first aspects above.
In a fifth aspect, embodiments of the present application provide a computer program product which, when run on a computer, causes the computer to perform the method of any of the first aspects above.
Compared with the prior art, the embodiment of the application has the following advantages:
the rendering scheme provided by the embodiment of the application is applied to rendering a three-dimensional electronic map based on map data, and is used for executing the steps of acquiring the target distance from a target position to the vertex of a target building, determining the target height compression coefficient of the vertex according to the target distance, determining the height rendering value of the vertex based on the target height compression coefficient of the vertex and the height value of the vertex when rendering the target building aiming at the target building in the set distance range around the target position based on the target position of a target object. Because the building in the three-dimensional electronic map is three-dimensional, when the building shields other space elements, such as sky, the rendering height of the building is usually too high, for this purpose, when the three-dimensional electronic map is rendered, the target building is not rendered based on the height value of the vertex of the target building (namely, the original height value), but based on the target distance from the target position to the vertex of the target building, the target height compression coefficient of the vertex is determined according to the target distance of the vertex, the height value of the vertex is compressed by utilizing the target height compression coefficient of the vertex to obtain the height rendering value of the vertex, and because the rendering height value of the vertex of the target building is smaller than the height value of the vertex, under the condition that the camera view angle of the three-dimensional electronic map is the same, the rendering height value-based target building is lower than the original height value-based on the rendering target building, so that other space elements, such as sky, of the three-dimensional electronic map, which are originally shaded by the target building, can be seen in the three-dimensional electronic map by a user, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings may be obtained according to the drawings without inventive effort to those skilled in the art.
FIG. 1 is a rendering effect diagram of an electronic map rendered in a navigation scene in the prior art;
fig. 2 is a flow chart of a rendering method according to an embodiment of the present application;
FIG. 3 is a rendering effect diagram of the method of the present application in a navigation scene according to an embodiment of the present application;
FIG. 4 is a flowchart of a rendering method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a rendering device according to an embodiment of the present application.
Detailed Description
In order to make the present application better understood by those skilled in the art, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Because the real world reduction degree of the three-dimensional electronic map is better than that of the two-dimensional electronic map, more and more scenes begin to adopt the three-dimensional electronic map, and the three-dimensional electronic map or the two-dimensional electronic map is generally rendered based on map rendering data, wherein the map rendering data generally comprises: road data, point of interest data, etc., wherein real-world buildings, shops, etc. correspond to the point of interest data.
The inventors of the present application have found when studying a three-dimensional electronic map that, since a building in the three-dimensional electronic map is three-dimensional, that is, the building is high, a situation in which the building blocks other space elements (space elements may also be referred to as geographic elements) inevitably occurs in the three-dimensional electronic map, some of the blocking is allowable, but some of the blocking causes deterioration of user experience, taking a navigation scene as an example, as shown in fig. 1, navigation-related information is displayed in the three-dimensional electronic map, the navigation-related information including: the car logo 101 (the display position of the car logo in the three-dimensional electronic map is related to the positioning position of the navigated object), the navigation route, the navigation guidance information (the guidance arrow, the traffic light) and the like, and the buildings (102, 103) around the road are arranged in the three-dimensional electronic map, besides the road at the lane level, wherein the distance from the building (102) to the navigated object is short, the distance from the building (103) to the navigated object is long, as shown in fig. 1, the height of the buildings around the road is high, so that the screen area which is positioned in front of the navigated object and far from the car logo in the three-dimensional electronic map is covered by the dense buildings, but no matter how dense the buildings are in the real world, the user can still see the sky, and in the three-dimensional electronic map, the camera view angle is higher than the view angle of the user in the real world, the camera can see the sky forward, and in some cases, the sky line should be seen, and the reason that the user cannot see the sky line in the three-dimensional electronic map is due to the fact that the altitude of the buildings is high. The reason why the height of the building is excessively high is that the prior art renders the building in the three-dimensional electronic map using an original height value (hereinafter, referred to as a height value) of the vertex of the building.
In order to solve the above-mentioned problems, embodiments of the present application provide a rendering method, and various non-limiting embodiments of the present application are described in detail below with reference to the accompanying drawings.
Exemplary method
Referring to fig. 2, the flow chart of the rendering method provided by the embodiment of the application is shown. In an example, the method provided by the embodiment of the application can be executed by a client of application software, and the application software can be software only integrating a map display function or software integrating a map navigation function, so that the application is not limited.
In this embodiment, the method may include, for example, the steps of: S101-S105.
S101: based on a target position of a target object, a target building within a set distance range around the target position is obtained. The target object is a terminal device of a client terminal provided with the application software, and the terminal device can be a mobile terminal or a vehicle machine fixedly arranged on a vehicle. Taking an example that the application software is the application software with the map navigation function, the software can have three working states, namely a navigation state, a cruising state and a map browsing state, and no matter what working state is, the software can obtain the positioning position of the target object through GNSS satellite positioning or network positioning or fusion positioning, and because the positioning position is the longitude and latitude position in a geographic coordinate system and the rendering of the electronic map adopts rendering world coordinates, the positioning position of the target object needs to be converted into a target position (map center) in the rendering world coordinate system.
Since the building for shielding the skyline is usually a building located around the road where the target position is located, the present application obtains the target building within a set distance range around the target position based on the target position of the target object, where the set distance range may be set according to the actual situation, and the distance range may be one or multiple, and the embodiment of the present application is not limited specifically.
Further, the electronic map rendering needs to send corresponding map data to the client based on the request of the client, usually by the service side, or the client performs rendering according to the locally stored map data, therefore, the client acquires the building based on the received or locally stored map data, the attribute of the building comprises the vertex, the vertex is divided into the vertex of the bottom surface and the vertex of the top surface, and the blocking is the influence of the height of the building, so the application only processes the vertex of the top surface of the building, if not specifically stated, the following vertexes refer to the vertex of the top surface, the coordinate of the vertex is three-dimensional coordinate, the Z value represents the height of the vertex, and similarly, in the electronic map rendering scene, the coordinate of the vertex of the building is the coordinate in the rendering world coordinate system.
S102: and obtaining a target distance from the target position to the vertex of the target building.
Wherein, the coordinates of the vertex of the target building and the target position are the coordinates in the rendering world coordinate system, so the distance from the target building to the target position can be calculated by calculating the distance from two points. In addition, although the top surface of a building is generally planar in the real world, that is, the height values of the respective vertices of the top surface should be the same in reality, in an electronic map, in order for a user to see the top surface of the building, the height values of the respective vertices of the top surface are not exactly the same, and the height values of the vertices of the same building farther from the user may be higher than the height values of the vertices closer to the user.
S103: and determining a target height compression coefficient of the vertex according to the target distance from the target position to the vertex of the target building.
S104: and determining a rendering height value of the vertex according to the target height compression coefficient of the vertex and the height value of the vertex.
S105: and rendering the target building according to the rendering height value of the vertexes of the target building.
The above is a rendering method provided by the present application, in order to avoid that a target building blocks other space elements, the method does not directly render based on the height value of the vertex of the building, that is, the original height value, but compresses the height value of the vertex by the target height compression coefficient of the vertex, and renders the target building based on the rendering height value of the vertex of the target building. Because the height value of the vertex of the target building is smaller than the height value of the vertex, under the condition that the camera view angle of the three-dimensional electronic map is the same, the target building rendered based on the height value of the rendering is lower than the target building rendered based on the original height value, so that other space elements, such as sky, which are originally shielded by the target building, in the three-dimensional electronic map can be rendered in the three-dimensional electronic map and seen by a user, and the user experience is improved.
The rendering method provided by the application is introduced above, and the height compression principle of the building and related embodiments are described in detail below.
Considering that when a user looks at a building in the real world, the height of the building in the eyes of the user is related to the distance from the building to the user, and the building far away from the user is higher in the real world than the building near the user, the height in the eyes of the user is lower than the building near the user, so that in order to generate the same visual effect in an electronic map, in the embodiment of the application, the specific value of the target height compression coefficient is related to the distance from the target position of the target object to the vertex of the target building. Meanwhile, the magnitude of the value of the target high compression coefficient indicates the degree of high compression. When the value of the height compression coefficient is inversely related to the height compression degree, that is, the larger the value of the target height compression coefficient is, the smaller the value of the target height compression coefficient is, and the larger the height compression degree is, in order to achieve the visual effect of near height and far height, the larger the value of the target height compression coefficient corresponding to the smaller the target distance is, and the smaller the value of the target height compression coefficient corresponding to the larger the target distance is. Of course, in practice, the value of the target high compression coefficient and the high compression degree may be positively correlated, and the technical means for achieving the effect of near high and far low through the correlation between the target distance and the target high compression coefficient, no matter what expression mode is adopted, all belong to the same or equivalent technical means of the application.
Because the number of the buildings is numerous, and the target position changes along with the change of the target object, in order to simplify the complexity of the technical implementation and improve the rendering efficiency, in one embodiment of the application, the distance interval and the height compression coefficient may be preset, that is, S103 may determine the target height compression coefficient of the vertex according to the corresponding relationship between the target distance and the preset distance interval and the height compression coefficient when in specific implementation. That is, in the corresponding relation between the preset distance interval and the height compression coefficient, the distance interval to which the target distance of the vertex belongs is searched, and then the target height compression coefficient of the vertex is determined based on the height compression coefficient corresponding to the distance interval to which the target distance belongs. For example, if the height compression coefficient corresponding to the distance interval to which the target distance belongs is a unique value, determining the height compression coefficient corresponding to the distance interval as the target height compression coefficient of the vertex, if the height compression coefficient of the distance interval to which the target distance belongs is expressed by an equation, determining the target height compression coefficient of the vertex based on the equation, where the target height compression coefficient calculated by the equation may change linearly, nonlinearly, or exhibit other mathematical rules along with the change of the target distance, and in any way, the technical means of rendering the building to exhibit a visual effect of near height and far height may be used as an embodiment of the present application.
In practice, if the equation is used to express the high compression coefficient, there may be only one of the preset distance intervals. Of course, if there are more than two preset distance intervals, the height compression coefficient of at least one preset distance interval may be selected to be expressed by an equation.
When the preset distance interval includes more than two distance intervals, in order to make only one distance interval to which the target distance is queried, the distance values included in any two distance intervals are not coincident, and the height compression coefficients corresponding to different distance intervals are different, as the height compression principle is known, if the height compression degree indicated by the height compression coefficient is inversely related to the value of the height compression coefficient, the height compression coefficient corresponding to the distance interval with a large distance is smaller than the height compression coefficient corresponding to the distance interval with a small distance value. In other words, the height compression degree corresponding to the distance interval with a large distance is higher than that corresponding to the distance interval with a small distance value, so that the building presents a visual effect of near high and far low.
In order to reduce the calculation pressure of the client and improve the rendering efficiency, in the preferred embodiment of setting the corresponding relation between the distance interval and the height compression coefficient, the preset distance interval comprises three distance intervals, namely a first distance interval, a second distance interval and a third distance interval, wherein the value of any distance of the first distance interval is smaller than the value of the distance in the second distance interval, and the value of any distance of the second distance interval is smaller than the value of the distance in the third distance interval. In order to prevent the height of the compressed building from jumping, the first distance zone, the second distance zone, and the third distance zone preferably form a continuous distance zone. For example, the first distance interval has a distance value of [0, 50 meters ], the second distance interval has a distance value of (50 meters, 1500 meters), and the second distance interval has a distance value of [1500 meters, infinity).
In one example, the first distance interval may uniquely correspond to a first height compression coefficient, the third distance interval may uniquely correspond to a second height compression coefficient, the first height compression coefficient is greater than the second height compression coefficient, the height compression coefficient of the second distance interval is expressed using an equation, and the height compression coefficient is graded from the first height compression coefficient to the second height compression coefficient.
Based on the above example, in a specific implementation, S103 may determine that the target height compression coefficient is the first height compression coefficient if the distance zone to which the target distance belongs is the first distance zone. And if the distance interval to which the target distance belongs is a third distance interval, determining the target height compression coefficient as the second height compression coefficient. If the distance interval to which the target distance belongs is a second distance interval, the target height compression coefficient can be determined through an equation.
An example of the equation is related to the target distance, the first altitude compression coefficient, the second altitude compression coefficient, and the like such that the target altitude compression coefficient calculated by the equation is a value that is located between the first altitude compression coefficient and the second altitude compression coefficient and linearly varies with a change in the target distance. Therefore, the target height compression value can be calculated according to the target distance, the first height compression coefficient, the second height compression coefficient, the distance value corresponding to the first distance interval and the distance value corresponding to the third distance interval. Specifically, the target height compression value may be calculated by substituting the above value into the following equation (1).
Wherein y is a target height compression coefficient, and x is a target distance;
h1 is a first high compression coefficient;
h2 is the second high compression coefficient;
r2 is the minimum distance value of the third distance interval;
r1 maximum distance value of the first distance interval.
The process of determining the target height compression factor of the present application is illustrated below in conjunction with the examples of table 1.
TABLE 1
Distance interval High compression coefficient
Less than or equal to 50 meters 0.7
Greater than 50 meters and less than 1500 meters 0.7 linear decay to 0.2
Greater than or equal to 1500 meters 0.2
As shown in table 1, if the target distance is less than or equal to 50 meters, the determined target height compression coefficient is 0.7; if the target distance is greater than or equal to 1500 meters, determining that the target height compression coefficient is 0.2; if the target distance is between 50 meters and 1500 meters, then the target height compression factor can be calculated according to equation (2), which is a value between 0.7 and 0.2. For example, if the target distance is 100 meters, the height compression coefficient calculated according to the formula (2) is 0.683.
The distances in table 1 are calculated distances based on coordinates in the world coordinate system, and the distances may have a certain conversion relation with the distances in the geographic coordinate system.
In one example, the target height compression coefficient indicates a height compression degree inversely related to the target height compression coefficient, and the target height compression coefficient may have a value between 0 and 1, and in this case, the target height compression coefficient may be multiplied on the basis of the height value (original height value) of the vertex, so as to obtain a rendering height value of the vertex, thereby implementing compression of the height value of the vertex.
In yet another example, the target height compression coefficient indicates a height compression degree that is positively correlated with the target height compression coefficient, and the target height compression coefficient may be a value greater than 1, in which case, the height value of the vertex may be obtained by dividing the target height compression coefficient by the height value of the vertex, thereby achieving compression of the height value of the vertex.
After determining the rendering height value of the vertices of the target building, the target building may be rendered based on the height rendering value of the vertices of the target building.
In the embodiment of the present application, the top surface of the target building may include a plurality of vertices, for example, if the top surface of the target building is rectangular, there are four vertices, and for each of the four vertices, the rendering height value corresponding to the vertex may be determined using S101-S104. And then, rendering the target building based on rendering height values respectively corresponding to the vertexes of the target building.
For the rendering of the building, the rendering height value is only one parameter, and when the target building is rendered, the target building can be rendered according to the rendering height value and other rendering parameters (such as color parameters, material parameters and the like) corresponding to each vertex of the target building. Since the present application does not improve the technology of rendering colors, shadows, outlines, etc. of a building, the present application does not specifically describe the specific rendering technology of a building, and a person skilled in the art can select a corresponding technology according to his experience.
As can be seen from the above description, in the embodiment of the present application, in order to avoid the target building from blocking other space elements, when the target building is rendered, the height value of the vertex is compressed by the target height compression coefficient of the vertex, and then the target building is rendered based on the rendered height value of the vertex of the target building. Because the height value of the vertex of the target building is smaller than the height value of the vertex, under the condition that the camera view angle of the three-dimensional electronic map is the same, the target building rendered based on the height value of the rendering is lower than the target building rendered based on the original height value, so that other space elements, such as sky or a skyline, in the three-dimensional electronic map, which are originally shielded by the target building, can be rendered in the three-dimensional electronic map and seen by a user, and the user experience is improved.
The implementation effect of the scheme can be understood with reference to fig. 3, and fig. 3 is a rendering effect diagram of implementing the method of the present application in a navigation scene provided by the embodiment of the present application.
As shown in the left half of fig. 3, the navigation page before the scheme is applied may refer to the description part of fig. 1, and the right half of fig. 3 shows the navigation page after the scheme is applied, where it is known by comparison that the height of a building shown by the three-dimensional electronic map in the navigation page after the scheme is applied becomes lower, and accordingly, an astronomical line originally blocked by the building in the three-dimensional electronic map can be rendered in the three-dimensional electronic map and seen by a user. As in fig. 3, the distant building 301 no longer obscures the skyline 302.
The rendering method provided by the embodiment of the application is introduced above, and next, the rendering method provided by the embodiment of the application is introduced by taking application software with a lane-level map navigation function as an example and combining the technical architecture of a client of the software.
Referring to fig. 4, the flow chart of the rendering method provided by the embodiment of the application is shown.
As shown in fig. 4, the client includes a positioning engine and a rendering engine, wherein after the software enters the lane-level navigation mode, the positioning engine may acquire the positioning position of the terminal device (target object) on which the software is installed in real time, and transmit the positioning position to the rendering engine.
The rendering engine may perform S401-S409 as follows.
S401: and judging whether to start the height compression function of the building.
The height compression function refers to compressing the height value of the vertex of the building when rendering the building, and whether to start the building or not can be preset by a user or can be judged by a rendering engine according to the scene.
If the height compression function is turned on, S402 is executed, otherwise S409 is executed: conventional rendering logic is performed.
In conventional rendering logic, the height of a building is rendered with an original height value.
S402: based on the positioning position, a target position of the target object is acquired.
For the description of the positioning location and the target location, please refer to the relevant portions above, and the description thereof is omitted here.
S403: a target location and a target distance of a vertex of a target building are determined.
S404: and reading the corresponding relation between the preset distance interval and the height compression coefficient.
S405: and determining the target height compression coefficient of the vertex according to the target distance and the corresponding relation between the preset distance interval and the height compression coefficient.
S406: and determining a rendering height value of the vertex according to the target height compression coefficient of the vertex and the height value of the vertex.
S407: other rendering parameters of the target building are determined.
S408: rendering a target building based on the vertex's rendering height value and the other rendering parameters.
In one example, the foregoing S403 and S405-S408 may be performed by a graphics processor (graphics processing unit, GPU). Specific implementations of S403 and S405-S408 described above may refer to the relevant description section described above, and will not be repeated here.
Exemplary apparatus
Based on the method provided by the embodiment, the embodiment of the application also provides a corresponding device, and the device is described below with reference to the accompanying drawings.
Referring to fig. 5, the structure of a rendering device according to an embodiment of the present application is shown. The apparatus 500 may specifically include, for example: a first acquisition unit 501, a second acquisition unit 502, a first determination unit 503, a second determination unit 504, and a rendering unit 505.
A first acquisition unit 501 for acquiring a target building within a set distance range around a target position based on a target position of a target object;
a second obtaining unit 502, configured to obtain a target distance from the target position to a vertex of the target building;
a first determining unit 503, configured to determine a target height compression coefficient of the vertex according to a target distance of the vertex;
a second determining unit 504, configured to determine a rendering height value of the vertex according to the target height compression coefficient of the vertex and the height value of the vertex;
and a rendering unit 505 for rendering the target building according to the rendering height value of the vertices of the target building.
Optionally, the first determining unit 503 is configured to determine, according to the target distance of the vertex, a target height compression coefficient of the vertex, where the determining is implemented as:
and determining the target height compression coefficient of the vertex according to the corresponding relation between the target distance and the preset distance interval and the height compression coefficient.
Optionally, if more than two distance intervals are preset and the distance values of the distance intervals do not coincide, the height compression coefficients corresponding to different distance intervals are different, and the height compression coefficient corresponding to the distance interval with the larger distance value is smaller than the height compression coefficient corresponding to the distance interval with the smaller distance value.
Optionally, the two or more distance intervals include a first distance interval, a second distance interval, and a third distance interval, where a distance value of the first distance interval is smaller than that of the second distance interval, and a distance value of the second distance interval is smaller than that of the third distance interval, when the target distance falls into the second distance interval, the first determining unit 503 is configured to determine, according to the target distance and a preset correspondence between the distance interval and a height compression coefficient, a target height compression coefficient of the vertex, where the determining is implemented as follows:
and determining the target height compression coefficient of the vertex according to the target distance, the distance values corresponding to the first distance interval and the third distance interval and the height compression coefficient.
Optionally, the second determining unit 504 is configured to determine, according to the target height compression coefficient of the vertex and the height value of the vertex, a rendering height value of the vertex, where the determining is implemented as:
and multiplying the height value of the vertex by the target height compression coefficient to obtain the rendering height value of the vertex.
Since the apparatus 500 is an apparatus corresponding to the method provided in the above method embodiment, the specific implementation of each unit of the apparatus 500 is the same as the above method embodiment, and therefore, with respect to the specific implementation of each unit of the apparatus 500, reference may be made to the description part of the above method embodiment, and details are not repeated herein.
The embodiment of the application also provides electronic equipment, which comprises a processor and a memory;
the processor is configured to execute instructions stored in the memory to cause the apparatus to perform the rendering method according to any one of the above method embodiments.
An embodiment of the present application provides a computer-readable storage medium including instructions that instruct a device to perform the rendering method described in any one of the above method embodiments.
Embodiments of the present application provide a computer program product which, when run on a computer, causes the computer to perform the rendering method according to any of the above method embodiments.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.
The foregoing description of the preferred embodiments of the application is not intended to limit the application to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the application are intended to be included within the scope of the application.

Claims (10)

1. A method of rendering, the method comprising:
obtaining a target building within a set distance range around a target position based on a target position of a target object;
acquiring a target distance from the target position to the vertex of the target building;
determining a target height compression coefficient of the vertex according to the target distance of the vertex;
determining a rendering height value of the vertex according to the target height compression coefficient of the vertex and the height value of the vertex;
and rendering the target building according to the rendering height value of the vertexes of the target building.
2. The method of claim 1, wherein determining the target height compression coefficient for the vertex based on the target distance for the vertex comprises:
and determining the target height compression coefficient of the vertex according to the corresponding relation between the target distance and the preset distance interval and the height compression coefficient.
3. The method according to claim 2, wherein if two or more distance sections are preset and the distance values of the distance sections do not overlap, the height compression coefficients corresponding to the different distance sections are different, and the height compression coefficient corresponding to the distance section having the larger distance value is smaller than the height compression coefficient corresponding to the distance section having the smaller distance value.
4. The method of claim 3, wherein the more than two distance intervals include a first distance interval, a second distance interval, and a third distance interval, a distance value of the first distance interval is smaller than that of the second distance interval, and a distance value of the second distance interval is smaller than that of the third distance interval, and when the target distance falls into the second distance interval, determining the target height compression coefficient of the vertex according to the target distance and a preset correspondence between the distance interval and the height compression coefficient includes:
and determining the target height compression coefficient of the vertex according to the target distance, the distance values corresponding to the first distance interval and the third distance interval and the height compression coefficient.
5. The method of any of claims 1-4, wherein the determining a rendered height value for the vertex from a target height compression coefficient for the vertex and the height value for the vertex comprises:
and multiplying the height value of the vertex by the target height compression coefficient to obtain the rendering height value of the vertex.
6. A rendering apparatus, the apparatus comprising:
a first acquisition unit configured to acquire a target building within a set distance range around a target position based on a target position of a target object;
a second acquisition unit configured to acquire a target distance from the target position to a vertex of the target building;
a first determining unit, configured to determine a target height compression coefficient of the vertex according to a target distance of the vertex;
a second determining unit, configured to determine a rendering height value of the vertex according to a target height compression coefficient of the vertex and the height value of the vertex;
and the rendering unit is used for rendering the target building according to the rendering height value of the vertexes of the target building.
7. The apparatus according to claim 6, wherein the first determining unit, configured to determine the target height compression coefficient of the vertex according to the target distance of the vertex, is implemented as:
and determining the target height compression coefficient of the vertex according to the corresponding relation between the target distance and the preset distance interval and the height compression coefficient.
8. The apparatus according to claim 7, wherein if two or more distance sections are preset and the distance values of the distance sections do not overlap, the height compression coefficients corresponding to the different distance sections are different, and the height compression coefficient corresponding to the distance section having the larger distance value is smaller than the height compression coefficient corresponding to the distance section having the smaller distance value.
9. The apparatus of claim 8, wherein the two or more distance intervals comprise a first distance interval, a second distance interval, and a third distance interval, the distance value of the first distance interval is smaller than the second distance interval, the distance value of the second distance interval is smaller than the third distance interval, and when the target distance falls into the second distance interval, the determining the target height compression coefficient of the vertex according to the target distance and a preset correspondence relationship between the distance interval and the height compression coefficient is implemented as:
and determining the target height compression coefficient of the vertex according to the target distance, the distance values corresponding to the first distance interval and the third distance interval and the height compression coefficient.
10. An electronic device comprising a processor and a memory;
the processor is configured to execute instructions stored in the memory to cause the apparatus to perform the method of any one of claims 1 to 5.
CN202311405816.8A 2023-10-26 2023-10-26 Rendering method and device and electronic equipment Pending CN117218257A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311405816.8A CN117218257A (en) 2023-10-26 2023-10-26 Rendering method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311405816.8A CN117218257A (en) 2023-10-26 2023-10-26 Rendering method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN117218257A true CN117218257A (en) 2023-12-12

Family

ID=89042752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311405816.8A Pending CN117218257A (en) 2023-10-26 2023-10-26 Rendering method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN117218257A (en)

Similar Documents

Publication Publication Date Title
CN108520536B (en) Disparity map generation method and device and terminal
CA2395257C (en) Any aspect passive volumetric image processing method
US9020241B2 (en) Image providing device, image providing method, and image providing program for providing past-experience images
CN112686877A (en) Binocular camera-based three-dimensional house damage model construction and measurement method and system
CN106908043A (en) The three-dimensional amount measuring method of geographic position of target object and height based on Streetscape picture
GB2596662A (en) Displaying objects based on a plurality of models
US8059121B2 (en) Method and aircraft display system for generating three dimensional image
CN114820396B (en) Image processing method, device, equipment and storage medium
JP7432793B1 (en) Mapping methods, devices, chips and module devices based on three-dimensional point clouds
CN117218273A (en) Image rendering method and device
CN117218257A (en) Rendering method and device and electronic equipment
JP4592510B2 (en) 3D map image generating apparatus and method
CN115334247B (en) Camera module calibration method, visual positioning method and device and electronic equipment
CN110838167A (en) Model rendering method and device and storage medium
CN110910482B (en) Method, system and readable storage medium for video data organization and scheduling
CN116433817A (en) Rendering method, device, equipment and storage medium
CN116124123A (en) Parking lot navigation system based on Canvas map
CN116188587A (en) Positioning method and device and vehicle
CN115797579A (en) Image superposition method and device for three-dimensional map, electronic equipment and storage medium
CN106600694B (en) A kind of smoothing processing method and device of terrain data
Habib et al. Integration of lidar and airborne imagery for realistic visualization of 3d urban environments
CN117115243B (en) Building group outer facade window positioning method and device based on street view picture
CN116188668B (en) Shadow rendering method, medium and electronic device based on IOS platform
US20240221272A1 (en) Waterwave simulation methods and apparatuses, electronic devices, and storage media
Inatsuka et al. Level of detail control for texture on 3D maps

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination