Image rendering method and device based on building model

Through the resolution transformation matrix based on the building model, normalization and Laplace algorithms are used to dynamically adjust the image resolution of buildings, which solves the problems of complex operation, high cost, large memory footprint and insufficient rendering quality in the existing technology, and achieves efficient and flexible image rendering effects.

CN120472117APending Publication Date: 2025-08-12BEIJING INST OF ARCHITECTURAL DESIGN +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510530339.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

The prior art is complex in image rendering of urban three-dimensional architectural models, error-prone, high cost, memory occupies and cannot guarantee the quality of view rendering, especially when dynamically adjusting requirements.

Method used

The resolution transformation matrix based on the architectural model is adopted, and the resolution transformation matrix of the target building model is generated through normalization processing and Laplace algorithm, and the current resolution of the building image is dynamically adjusted, reducing dependence on the LOD model, and achieving flexible visual line and browsing requirements adaptation.

Benefits of technology

Improves the flexibility and rendering quality of the visual application interface to display building images, reduces system memory and computing overhead, and ensures efficient rendering effect at different visual ranges and perspectives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472117A_ABST
    Figure CN120472117A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses an image rendering method and device based on a building model.A resolution transformation matrix of a target building model is utilized to render a building image in a visual application interface, the current resolution of the building image can be dynamically adjusted, and the image rendering efficiency is improved. According to the method, a large number of LOD models do not need to be stored and calculated in advance, so that the memory and overhead of the system are reduced, the rendering quality of the building image can be ensured when different sight distance changes or adjustment requirements are dynamically adapted, and the flexibility of displaying the building image by a visual application interface is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an image rendering method and device based on a building model. Background Art

[0002] In modern urban planning and construction, it is often necessary to perform 3D modeling of the entire or partial city building complex and display it interactively in real time on different terminals. The construction of building models faces the following challenges or meets the following requirements: First, because the 3D building models in the city contain a large number of buildings, each of which contains a large number of vertices and faces, the image rendering process requires processing large amounts of data; second, because the buildings in the 3D building models in the city have different shapes and contain a large number of irregular grids or "coarse grids" obtained through multiple external data collection and fusion, the image rendering process also requires processing complex network structures; third, because users need to view the overall layout of the city or local details from different viewpoints and zoom levels, and perform interactive operations such as path planning and lighting analysis, the image rendering process also needs to meet dynamic adjustment requirements; fourth, because in city-level building scenes, a large view range area needs to be rendered simultaneously, the real-time rendering pressure faced during image rendering is relatively high.

[0003] Related technologies, in order to cope with the above-mentioned challenges of image rendering or meet the above-mentioned needs as much as possible, generally pre-generate multiple sets of level of detail (LOD) models based on urban buildings through semi-automatic or manual methods. When the user browses the target building area, data is called from the pre-generated multiple sets of LOD models. When the user needs to adjust the image quality or the user's viewing distance changes, the multiple sets of LOD models are readjusted to adapt to the new changes. This method has a complex operation process, is prone to errors, is costly, and occupies memory. In addition, in order to meet the user's global browsing needs, this method generally ignores the differences in local details of the building, resulting in a reduction in view resolution, and thus cannot guarantee the view rendering quality. Summary of the Invention

[0004] In view of this, the present invention provides an image rendering method and device based on a building model to solve the problems of traditional methods such as complex operation process, prone to errors, high cost, memory occupation, and inability to guarantee view rendering quality.

[0005] In a first aspect, the present invention provides an image rendering method based on a building model, the method comprising:

[0006] Obtain the target building model;

[0007] Obtaining, from the target building model, a first coordinate of a first pixel point, a second coordinate of a second pixel point, and a grid parameter to which the first pixel point belongs, wherein the first pixel point is each pixel point in the target building model, and the second pixel point is a neighboring pixel point of the first pixel point;

[0008] generating a resolution transformation matrix of the target building model according to the first coordinate of the first pixel point, the second coordinate of the second pixel point, and a grid parameter to which the first pixel point of the first pixel point belongs, so as to make the surface of the target building model smooth;

[0009] Rendering a building image in a visualization application interface according to the resolution transformation matrix of the target building model.

[0010] The image rendering method based on the building model in the embodiment of the present disclosure uses the resolution transformation matrix of the target building model to render the building image in the visualization application interface. It can dynamically adjust the current resolution of the building image without the need to store and calculate a large number of LOD models in advance, thereby reducing the system's memory and overhead. In addition, it can also ensure the rendering quality of the building image when dynamically adapting to different viewing distance changes or adjustment requirements, thereby improving the flexibility of the visualization application interface in displaying the building image.

[0011] In some optional implementations, generating a resolution transformation matrix of the target building model according to the first coordinate of the first pixel point, the second coordinate of the second pixel point, and the grid parameter to which the first pixel point belongs, so as to smooth the surface of the target building model, includes:

[0012] processing the angle cotangent weight of the neighborhood edge of the first pixel point using a normalization processing algorithm according to the second coordinate of the second pixel point and the grid parameter to which the first pixel point belongs, so as to uniformly distribute pixels in the local area of the target building model;

[0013] A resolution transformation matrix of the target building model is generated using a Laplace algorithm according to the processed grid parameters of the first pixel point, the first coordinate of the first pixel point, and the second coordinate of the second pixel point, so as to smooth the surface of the target building model.

[0014] The disclosed embodiment uses a normalization algorithm to process the angular cotangent weights of the neighborhood edges of the first pixel point to achieve a uniform pixel distribution within the local area of the target building model. The Laplace algorithm generates a resolution transformation matrix for the target building model, which not only gradually optimizes and converges each pixel in the target building model but also improves the smoothness of the target building model and reduces the impact of subtle noise on the model. Furthermore, the discretization process allows the model to retain its original features while removing redundant details, reducing the rendering burden. This significantly improves the visualization efficiency and rendering quality of building images, facilitating urban architectural planning.

[0015] In some optional embodiments, the grid parameters to which the first pixel belongs include a first angle cotangent value of a first neighborhood edge of the first pixel, a second angle cotangent weight of a second neighborhood edge of the first pixel, and an area of a Thiessen polygon of the grid to which the first pixel belongs, wherein the first neighborhood edge, the second neighborhood edge, and the first pixel constitute the grid to which the first pixel belongs, and the grid to which the first pixel belongs is a triangular grid.

[0016] The normalization algorithm is used to process the angle cotangent weight of the neighborhood edge of the first pixel point to make the pixel distribution in the local area of the target building model uniform, which is expressed by the following formula:

[0017]

[0018] in, is the angle cotangent weight of the neighborhood edge of the first pixel after processing, ω ij is the angle cotangent weight of the neighborhood edge of the first pixel before processing, and pj is the second coordinate of the second pixel.

[0019] In some optional implementations, the resolution transformation matrix of the target building model is generated using the Laplace algorithm to smooth the surface of the target building model, which is expressed by the following formula:

[0020]

[0021] Among them, cotα ij is the cotangent value of the first angle of the first neighborhood edge of the first pixel, cotβ ij is the second angle cotangent weight of the second neighborhood edge of the first pixel, p i is the first pixel, A(p i ) is the area of the Thiessen polygon to which the first pixel belongs, k is the Laplace operator in the kth iteration, k+1 is the Laplace operator in the k+1th iteration, p j is the second pixel, Δ k is the current update parameter corresponding to k iterations, Δ k+1is the current update parameter corresponding to the k+1th iteration, p is the coordinate of the optimized target pixel, f is the coordinate of the fixed pixel, h is the coordinate of the pixel to be adjusted manually by the target user, I F+H is the identity matrix.

[0022] In some optional implementations, rendering a building image in a visualization application interface according to a resolution transformation matrix of a target building model includes:

[0023] Receiving an adjustment instruction from a target user for any pixel to be adjusted in the building image in the visualization application interface;

[0024] According to the adjustment instruction of any pixel to be adjusted, the current resolution of the building image in the visualization application interface is adjusted using the resolution transformation matrix of the target building model.

[0025] The embodiment of the present disclosure utilizes the resolution transformation matrix of the target building model to dynamically update the current resolution of the building image in the visualization application interface, thereby achieving fine-tuning of the current resolution of the building image in the visualization application interface to meet the application needs of different users.

[0026] In some optional implementations, rendering a building image in a visualization application interface according to a resolution transformation matrix of a target building model includes:

[0027] Get the target user's current viewing distance or browsing needs;

[0028] According to the current viewing distance or browsing requirements of the target user, the resolution transformation matrix of the target building model is used to render the building image in the visualization application interface.

[0029] Due to the introduction of the resolution transformation matrix of the target building model, the disclosed embodiment can dynamically adjust the current resolution of the view quality in combination with the current viewing distance or browsing needs of the target user, thereby ensuring both rendering efficiency when observing from a distance and detail accuracy when observing from a close distance, providing a more flexible solution for real-time rendering. This method can effectively reduce the operating pressure of the GPU and CPU, improve the frame rate of the building image, and ensure a smooth interactive experience in large scenes.

[0030] In some optional implementations, the visualization application interface includes: a visualization application interface of a head-mounted device or a visualization application interface of architectural software.

[0031] In a second aspect, the present invention provides an image rendering device based on a building model, comprising:

[0032] A first acquisition module is used to acquire a target building model;

[0033] a second acquisition module, configured to acquire, from the target building model, a first coordinate of a first pixel point, a second coordinate of a second pixel point, and a grid parameter to which the first pixel point belongs, wherein the first pixel point is each pixel point in the target building model, and the second pixel point is a neighboring pixel point of the first pixel point;

[0034] a matrix generation module, configured to generate a resolution transformation matrix of the target building model based on a first coordinate of the first pixel point, a second coordinate of the second pixel point, and a grid parameter to which the first pixel point belongs, so as to smooth the surface of the target building model;

[0035] The image rendering module is used to render the building image in the visualization application interface according to the target building model.

[0036] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the image rendering method based on the building model of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0037] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the image rendering method based on a building model according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0039] Figure 1 is a flow chart of an image rendering method based on a building model according to an embodiment of the present invention;

[0040] Figure 2 is a schematic diagram of pixel arrangement in a target building model according to an embodiment of the present invention;

[0041] Figure 3 is a flowchart of another image rendering method based on a building model according to an embodiment of the present invention;

[0042] Figure 4 is a flowchart of another image rendering method based on a building model according to an embodiment of the present invention;

[0043] Figure 5 is a simplified flowchart of an image rendering method based on a building model according to an embodiment of the present invention;

[0044] Figure 6 Structural block diagram of image rendering device based on building model;

[0045] Figure 7 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0046] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0047] According to an embodiment of the present invention, an embodiment of an image rendering method based on a building model is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0048] In this embodiment, a method for rendering an image based on a building model is provided, which can be used on computer devices such as mobile phones, tablet computers, desktop computers, portable notebooks, servers, etc. Figure 1 is a flow chart of an image rendering method based on a building model according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0049] Step S101: Acquire a target building model.

[0050] Specifically, the target building model is a three-dimensional building model, and its file formats include OBJ, FBX and other formats. The target building model in the OBJ file format is suitable for mutual guidance between 3D software models, and is widely used in mobile application development, game development, virtual reality (VR) and augmented reality (AR). Among them, the target building model in the FBX file format is a universal file format, which is suitable for various application scenarios that require storage, exchange and display of three-dimensional data, such as data exchange and sharing between different software and platforms. For example, the target building model may include but is not limited to three-dimensional models of urban high-rise buildings, bridges, parks, ancient buildings, roads, etc. The embodiment of the present disclosure obtains the target building model in order to further analyze the local geometric structure of the model, so as to provide a basis for subsequent image rendering.

[0051] Step S102: Obtain a first coordinate of a first pixel point, a second coordinate of a second pixel point, and a grid parameter to which the first pixel point belongs from the target building model, wherein the first pixel point is each pixel point in the target building model, and the second pixel point is a neighboring pixel point of the first pixel point.

[0052] Specifically, if Figure 2 As shown in FIG, a schematic diagram of the pixel arrangement in the target building model is shown, wherein the first pixel represents each pixel in the target building model, and the second pixel represents the neighboring pixel in the local neighborhood of each pixel. For example, Figure 2 In the example, the first pixel is O, and its corresponding first coordinate is p i Represented, and the first pixel point O is the center point to form the Thiessen polygon, the vertex of the Thiessen polygon is the neighborhood pixel point of the first pixel point, that is, the second pixel point in the above. Figure 2 In the figure, the second pixel points are B1, B2, B3, B4, and B5 respectively, and the second coordinates corresponding to the second pixel points are uniformly represented by p j Indicates that the second coordinate information of each second pixel point is different. For example, for B1, its second coordinate p j It can be (x1, y1, z1), and for B2, its second coordinate p j It can be (x5, y4, z3).

[0053] In a specific example, the grid parameters to which the first pixel point belongs include the first angle cotangent value of the first neighborhood edge of the first pixel point, the second angle cotangent weight of the second neighborhood edge of the first pixel point, and the area of the Thiessen polygon of the grid to which the first pixel point belongs, wherein the first neighborhood edge, the second neighborhood edge, and the first pixel point constitute the grid to which the first pixel point belongs, and the grid to which the first pixel point belongs is a triangular grid.

[0054] For example, in Figure 2In the example, the grid to which the first pixel belongs is a triangular grid, and the first neighboring edge of the first pixel is represented by v i Indicates that the second neighborhood edge of the first pixel is represented by v j Indicates that the first angle of the first neighboring edge is α, the second angle of the first neighboring edge is β, and the cotangent value of the first angle is cotα ij The cotangent value of the second angle is cotβ ij In the target building model, the cotangent value of the first angle and the cotangent value of the second angle can be used to represent the inclination angle of the surface or edge of the target building model. The area of the Thiessen polygon of the grid to which the first pixel belongs can be expressed as A(p i )express.

[0055] Furthermore, the cotangent weights of the angle cotangents (first and second angle cotangents) of the neighboring edges of each first pixel are calculated and combined with the area of the Thiessen polygon to obtain the cotangent weights. The cotangent weights are used to measure the relative influence of Thiessen polygon vertices, while the area of the Thiessen polygon is used to perform local weighting on each pixel.

[0056] Step S103 : generating a resolution transformation matrix of the target building model according to the first coordinate of the first pixel, the second coordinate of the second pixel, and the grid parameter to which the first pixel belongs, so as to smooth the surface of the target building model.

[0057] Step S104 : Rendering the building image in the visualization application interface according to the resolution transformation matrix of the target building model.

[0058] Due to the traditional method of rendering building images by selecting LOD models of different resolutions at different viewing distances or screen space sizes, when the user or camera is far away from the model, a simplified model with a lower resolution is used to improve rendering efficiency; when the user's perspective is close to the model, a higher resolution model is loaded to enhance the display of details. This method uses a predefined hierarchical model to balance rendering performance and visual effects and is widely used in large-scale scenes. However, this method consumes a large amount of system memory due to the storage and calculation of a large number of LOD models. In addition, in order to meet the user's global browsing needs, this method generally ignores the differences in local building details, resulting in a reduced view resolution, and thus cannot guarantee the view rendering quality.

[0059] The embodiment of the present disclosure combines the first coordinate of the first pixel point in the target building model, the second coordinate of the second pixel point, and the grid parameters of the first pixel point of the first pixel point to further generate a resolution transformation matrix of the target building model, so as to dynamically adjust the current resolution of the building image in the visualization application interface according to the needs of the target user or the change of viewing distance.

[0060] For example, if the target user is viewing the view from a distance, the resolution transformation matrix of the target building model preserves the low-frequency components of the model, simplifying rendering calculations. If the target user is viewing the view from a close distance, the high-frequency components of the model are enhanced, improving detail. This flexible dynamic adjustment method greatly improves rendering efficiency and maintains high-quality rendering details at different viewing angles. Furthermore, during the view quality adjustment process, there is no need to pre-store and calculate different LOD models, thereby reducing system memory and overhead.

[0061] Therefore, the image rendering method based on the building model in the embodiment of the present disclosure uses the resolution transformation matrix of the target building model to render the building image in the visualization application interface, which can dynamically adjust the current resolution of the building image without the need to store and calculate a large number of LOD models in advance, thereby reducing the system's memory and overhead. It can also ensure the rendering quality of the building image when dynamically adapting to different viewing distance changes or adjustment requirements, thereby improving the flexibility of the visualization application interface in displaying the building image.

[0062] In this embodiment, a method for rendering an image based on a building model is provided, which can be used on computer devices such as mobile phones, tablet computers, desktop computers, portable notebooks, servers, etc. Figure 3 A flowchart of an image rendering method based on a building model according to an embodiment of the present invention is shown in FIG. Figure 3 As shown, in step S103, a resolution transformation matrix of the target building model is generated according to the first coordinate of the first pixel point, the second coordinate of the second pixel point, and the grid parameter to which the first pixel point belongs, so as to make the surface of the target building model smooth. The process includes the following steps:

[0063] In step S1031 , a normalization algorithm is used to process the angle cotangent weight of the neighborhood edge of the first pixel according to the first coordinate of the first pixel and the grid parameters to which the first pixel belongs, so as to make the pixel distribution in the local area of the target building model uniform.

[0064] Due to the uneven pixel distribution in the local area of the target building model, the numerical instability of the pixels in the local area is likely to occur, affecting the accuracy of the resolution transformation matrix of the target building model, and further affecting the rendering quality of the building image in the visualization interface.

[0065] Therefore, the normalization processing algorithm of the embodiment of the present disclosure processes the angle cotangent weight of the neighborhood edge of the first pixel point to make the pixel distribution in the local area of the target building model uniform.

[0066] In a specific example, a normalization algorithm is used to process the angle cotangent weights of the neighborhood edges of the first pixel point so as to make the pixel distribution in the local area of the target building model uniform, which is expressed by the following formula (1):

[0067]

[0068] in, is the angle cotangent weight of the neighborhood edge of the first pixel after processing, ω ij is the angle cotangent weight of the first pixel neighborhood edge before processing (in Figure 2 In the equation ( ), the cotangent weight of the angle between the center point O and any of its neighboring points B) is given, and pj is the second coordinate of the second pixel point.

[0069] For example, in Figure 2 In the figure, the second pixel points are B1, B2, B3, B4, and B5 respectively, and the second coordinates corresponding to the second pixel points are uniformly represented by p j Indicates that the angle cotangent weight of the neighborhood edge of the first pixel is ω ij It can represent the cotangent weight of the angle between the second pixel points B1, B2, B3, B4, B5 and the center point O.

[0070] In the above formula Among them, u ij =cotα ij +cotβ ij ,u ij is the neighborhood edge v of the first pixel i The corresponding cotangent value of the first angle and the neighborhood edge v of the first pixel point j The sum of the corresponding cotangent values of the second angle.

[0071] A normalization processing algorithm is used to process the angular cotangent weights of the neighborhood edges of the first pixel point. In order to control the angular cotangent weights of the neighborhood edges of the first pixel point within a reasonable range and prevent the accumulation of numerical errors caused by excessive weight differences, a normalization processing algorithm is used to balance the weights within the neighborhood. This is conducive to achieving a smoother update of each pixel point in the process of generating the resolution transformation matrix of the target building model, avoiding model deformation caused by excessively large or small values, and thus improving the stability of the system.

[0072] In step S1032 , a resolution transformation matrix of the target building model is generated using a Laplace algorithm according to the processed grid parameters of the first pixel, the first coordinate of the first pixel, and the second coordinate of the second pixel, so as to smooth the surface of the target building model.

[0073] Traditional methods typically downgrade the entire LOD model at once when rendering an image, lacking differentiated treatment for specific local areas (such as city landmarks), which can easily lead to loss of detail. However, using the Laplace algorithm to generate the resolution transformation matrix of the target building model allows for the use of different weights and iteration strategies for different buildings or urban functional areas, enabling fine-grained control over the preservation or enhancement of local details, thereby increasing the flexibility of visualization effects.

[0074] In a specific example, the Laplace algorithm is used to generate the resolution transformation matrix of the target building model so that the surface of the target building model tends to be smooth, which is expressed by the following formula (2):

[0075]

[0076] Among them, cotα ij is the cotangent value of the first angle of the first neighborhood edge of the first pixel, cotβ ij is the second angle cotangent weight of the second neighborhood edge of the first pixel, p i is the first pixel, A(p i ) is the area of the Thiessen polygon to which the first pixel belongs, k is the Laplace operator in the kth iteration, k+1 is the Laplace operator in the k+1th iteration, p j is the second pixel, Δ k is the current update parameter corresponding to k iterations, Δ k+1 is the current update parameter corresponding to the k+1th iteration, p is the coordinate of the optimized target pixel, f is the coordinate of the fixed pixel (known quantity), h is the coordinate of the pixel to be adjusted manually by the target user, I F+H is the unit matrix. In the above formula (2), the right side vector It expresses the direct influence of fixed pixels and pixels to be adjusted, combined with the matrix on the left The relationships between them jointly describe the update of the entire target building model.

[0077] In the disclosed embodiments, the aforementioned Laplace algorithm is applied to recursively discretize and update the current parameters of each pixel in the target building model, generating a resolution transformation matrix for the target building model. This allows for rapid, incremental adjustments to the local updates within each iteration, eliminating the need for a large-scale recalculation of the entire city-wide model. This enables rapid response to changes to the target building model in interactive scenarios, shortening the time from modification to visual feedback.

[0078] Therefore, the architectural model-based image rendering method in the disclosed embodiments not only enables the gradual optimization and convergence of each pixel in the target architectural model, but also improves the smoothness of the target architectural model and reduces the impact of subtle noise on the model. Furthermore, the discretization process removes redundant details while preserving the original features of the model, reducing the rendering burden. This significantly improves the visualization efficiency and rendering quality of architectural images, facilitating urban architectural planning.

[0079] In other alternative implementations, a Fourier transform algorithm may be used to generate a resolution transformation matrix of the target building model, so as to make the surface of the target building model smooth.

[0080] Specifically, the target building model's geometric data is converted to the frequency domain using a Fourier transform algorithm, separating the model's low-frequency and high-frequency components to achieve a multi-resolution geometric representation. By adjusting the weights of the low-frequency and high-frequency components, the model's resolution can be dynamically controlled at different viewing angles or distances, improving rendering efficiency while preserving detail.

[0081] In this embodiment, a method for rendering an image based on a building model is provided, which can be used in the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Figure 4 is a flow chart of an image rendering method based on a building model according to an embodiment of the present invention. Figure 4 As shown, the above step S104, rendering the building image in the visualization application interface according to the resolution transformation matrix of the target building model, includes the following steps:

[0082] S1041a1 , receiving an adjustment instruction from a target user for any pixel to be adjusted in the building image in the visualization application interface.

[0083] S1042b1 , according to the adjustment instruction of any pixel to be adjusted, using the resolution transformation matrix of the target building model, adjust the current resolution of the building image in the visualization application interface.

[0084] Specifically, for example, when the target user wants to adjust the current resolution of any pixel to be adjusted in the building image in the visualization application interface, the computer device in the embodiment of the present disclosure receives the adjustment instruction of any pixel to be adjusted in the building image in the visualization application interface, and dynamically updates the resolution transformation matrix of the target building model by controlling the coordinates of the fixed pixel points and the coordinates of the pixel points to be adjusted in the resolution transformation matrix of the target building model, thereby achieving fine-tuning of the current resolution of the building image in the visualization application interface to adapt to the application needs of different users.

[0085] In this embodiment, a method for rendering an image based on a building model is provided, which can be used in the above-mentioned mobile terminals, such as mobile phones, tablet computers, etc. Figure 5 is a flow chart of an image rendering method based on a building model according to an embodiment of the present invention. Figure 5 As shown, the above step S104, rendering the building image in the visualization application interface according to the resolution transformation matrix of the target building model, includes the following steps:

[0086] Step S1041a2: Obtain the current viewing distance or browsing requirement of the target user.

[0087] Step S1042b2: Rendering the building image in the visualization application interface using the resolution transformation matrix of the target building model according to the current viewing distance or browsing requirement of the target user.

[0088] Specifically, the current viewing distance includes increasing or decreasing viewing distance, and browsing requirements include global browsing and local browsing. Increasing viewing distance generally corresponds to local browsing, while decreasing viewing distance generally corresponds to local browsing. This means that 3D scenes of urban buildings often retain their general outlines at longer viewing distances, while recovering more high-precision details when viewed up close or with zoomed-in views. Using the resolution transformation matrix of the target building model, the current resolution of the building image in the visualization application interface is divided into high-frequency and low-frequency components. During the actual rendering process, different resolutions can be dynamically switched or interpolated based on the user's current viewing distance, focus range, and other factors, preserving the core building form in the distance and presenting key details such as windows and balconies in the near distance. This on-demand, dynamic detail adjustment significantly reduces ineffective geometric calculations and rendering burdens while preserving essential visual features to the greatest extent possible.

[0089] Therefore, the image rendering method based on the building model in the embodiment of the present disclosure, due to the introduction of the resolution transformation matrix of the target building model, can dynamically adjust the current resolution of the view quality in combination with the current viewing distance or browsing needs of the target user. That is, when the user views the city as a whole, the simplified low-frequency components are rendered, which greatly reduces the number of vertices and faces; when the user zooms or approaches a specific building, the high-frequency components (such as key details such as building exterior walls, windows, and slope roofs) are gradually loaded and rendered, which not only ensures the rendering efficiency when observing from a distance, but also ensures the accuracy of details when observing from a close distance, providing a more flexible solution for real-time rendering of building images. This method can effectively reduce the operating pressure of the GPU and CPU, improve the image frame rate, and ensure a smooth interactive experience in large scenes.

[0090] In some optional implementations, the visualization application interface includes: a visualization application interface of a head-mounted device or a visualization application interface of architectural software.

[0091] For example, a target user enters a virtual scene through a head-mounted display device, which contains multiple building outlines and local building details. Based on the target user's distance from the building, the method in the disclosed embodiment dynamically adjusts the building details, reducing the details displayed when the target user is far away from the building and automatically increasing the building's geometric accuracy when the target user is close to the building. At the same time, the target user can adjust the detail display mode in the settings interface to meet the needs of different visual experiences.

[0092] For example, during the architectural design process, when the designer views the overall architectural rendering, the method in the disclosed embodiment can be used to automatically perform low-precision rendering on distant buildings. When the viewing angle approaches, the details of the building gradually increase, especially in areas such as windows and doors, ensuring efficient rendering while improving the display of design details.

[0093] like Figure 5 As shown in FIG. 1 , a simplified flowchart of an image rendering method based on a building model according to an embodiment of the present disclosure is shown. Figure 5 The technical process of this method is divided into five main steps: first, input the 3D model data and calculate the mesh structure and neighborhood cotangent weights; second, enhance numerical stability through weight normalization to lay the foundation for subsequent calculations; then, gradually optimize the vertex positions based on the Laplace recursive discretization method to achieve local smoothness and global geometric consistency; then, decompose the model into high-frequency and low-frequency components, and dynamically adjust the level of detail according to the view distance to achieve a balance between efficiency and detail; finally, output the optimized model to support a variety of practical applications. The significance of this technology is that it significantly improves the rendering efficiency of 3D models in complex scenes while retaining key geometric features. It is suitable for scenarios such as virtual reality, game engines, and architectural visualization, and can meet users' dual needs for real-time rendering and high-precision modeling.

[0094] This embodiment also provides an image rendering device based on a building model, which is used to implement the above-mentioned embodiments and preferred implementations. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0095] This embodiment provides an image rendering device based on a building model. Figure 6 As shown, including:

[0096] The first acquisition module 601 is used to acquire a target building model;

[0097] A second acquisition module 602 is configured to acquire, from the target building model, a first coordinate of a first pixel point, a second coordinate of a second pixel point, and a grid parameter to which the first pixel point belongs, wherein the first pixel point is each pixel point in the target building model, and the second pixel point is a neighboring pixel point of the first pixel point;

[0098] a matrix generation module 603 for generating a resolution transformation matrix of the target building model based on the first coordinate of the first pixel point, the second coordinate of the second pixel point, and the grid parameter to which the first pixel point belongs, so as to smooth the surface of the target building model;

[0099] The image rendering module 604 is configured to render the building image in the visualization application interface according to the target building model.

[0100] In some optional implementations, the matrix generation module 603 includes:

[0101] a first processing submodule, configured to process the angle cotangent weight of the neighborhood edge of the first pixel point using a normalization processing algorithm according to the second coordinate of the second pixel point and the grid parameter to which the first pixel point belongs, so as to uniformly distribute pixels in a local area of the target building model;

[0102] The second processing submodule is used to generate a resolution transformation matrix of the target building model using the Laplace algorithm based on the processed grid parameters of the first pixel point, the first coordinate of the first pixel point, and the second coordinate of the second pixel point, so as to make the surface of the target building model smooth.

[0103] In some optional embodiments, the grid parameters to which the first pixel belongs include a first angle cotangent value of a first neighborhood edge of the first pixel, a second angle cotangent weight of a second neighborhood edge of the first pixel, and an area of a Thiessen polygon of the grid to which the first pixel belongs, wherein the first neighborhood edge, the second neighborhood edge, and the first pixel constitute the grid to which the first pixel belongs, and the grid to which the first pixel belongs is a triangular grid.

[0104] The normalization algorithm is used to process the angle cotangent weight of the neighborhood edge of the first pixel point to make the pixel distribution in the local area of the target building model uniform, which is expressed by the above formula (1).

[0105] In some optional implementations, the resolution transformation matrix of the target building model is generated using the Laplace algorithm to make the surface of the target building model smooth, which is expressed by the above formula (2).

[0106] In some optional implementations, the image rendering module 604 includes:

[0107] An instruction receiving submodule is used to receive an adjustment instruction from a target user for any pixel to be adjusted in the building image in the visualization application interface;

[0108] The image quality adjustment submodule is used to adjust the current resolution of the building image in the visualization application interface using the resolution transformation matrix of the target building model according to the adjustment instruction of any pixel to be adjusted.

[0109] In some optional implementations, the image rendering module 604 includes:

[0110] The demand acquisition submodule is used to obtain the current viewing distance or browsing needs of the target user;

[0111] The image rendering submodule is used to render the building image in the visualization application interface using the resolution transformation matrix of the target building model according to the current viewing distance or browsing requirements of the target user.

[0112] In some optional implementations, the visualization application interface includes: a visualization application interface of a head-mounted device or a visualization application interface of architectural software.

[0113] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0114] The image rendering device based on the building model in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0115] An embodiment of the present invention further provides a computer device having the above-mentioned image rendering device based on the building model.

[0116] See also Figure 7 , Figure 7 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 7As shown, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in the memory or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.

[0117] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0118] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0119] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0120] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0121] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0122] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0123] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention. Such modifications and variations are all within the scope defined by the appended claims.

Claims

1. An image rendering method based on a building model, characterized in that: The method comprises: Obtain the target building model; Obtaining, from the target building model, a first coordinate of a first pixel point, a second coordinate of a second pixel point, and a grid parameter to which the first pixel point belongs, wherein the first pixel point is each pixel point in the target building model, and the second pixel point is a neighboring pixel point of the first pixel point; generating a resolution transformation matrix of the target building model according to the first coordinate of the first pixel point, the second coordinate of the second pixel point, and a grid parameter to which the first pixel point of the first pixel point belongs, so as to make the surface of the target building model smooth; Rendering a building image in a visualization application interface according to the resolution transformation matrix of the target building model.

2. The image rendering method based on the building model according to claim 1, characterized in that: Generating a resolution transformation matrix of the target building model according to the first coordinate of the first pixel point, the second coordinate of the second pixel point, and a grid parameter to which the first pixel point belongs, so as to smooth the surface of the target building model, including: processing, using a normalization algorithm, an angular cotangent weight of a neighborhood edge of the first pixel point according to the second coordinate of the second pixel point and a grid parameter to which the first pixel point belongs, so as to uniformly distribute pixels in a local area of the target building model; A resolution transformation matrix of the target building model is generated using a Laplace algorithm according to the processed grid parameters of the first pixel point, the first coordinate of the first pixel point, and the second coordinate of the second pixel point, so as to smooth the surface of the target building model.

3. The image rendering method based on the building model according to claim 2, characterized in that: The grid parameters of the first pixel point include a first angle cotangent value of a first neighboring edge of the first pixel point, a second angle cotangent weight of a second neighboring edge of the first pixel point, and an area of a Thiessen polygon of the grid to which the first pixel point belongs, wherein the first neighboring edge, the second neighboring edge, and the first pixel point constitute the grid to which the first pixel point belongs, and the grid to which the first pixel point belongs is a triangular grid. The angle cotangent weight of the neighborhood edge of the first pixel point is processed using a normalization algorithm to make the pixel distribution in the local area of the target building model uniform, which is expressed by the following formula: in, is the angle cotangent weight of the neighborhood edge of the first pixel after processing, ω ij is the angle cotangent weight of the neighborhood edge of the first pixel point before processing, and pj is the second coordinate of the second pixel point.

4. The image rendering method based on the building model according to claim 3, characterized in that: The resolution transformation matrix of the target building model is generated using the Laplace algorithm to make the surface of the target building model smooth, which is expressed by the following formula: Among them, cotα ij is the cotangent value of the first angle of the first neighborhood edge of the first pixel, cotβ ij is the second angle cotangent weight of the second neighborhood edge of the first pixel point, p i is the first pixel point, A(p i ) is the area of the Thiessen polygon to which the first pixel belongs, k is the Laplace operator in the kth iteration, k+1 is the Laplace operator in the k+1th iteration, p j is the second pixel point, Δ k is the current update parameter corresponding to k iterations, Δ k+1 is the current update parameter corresponding to the k+1th iteration, p is the coordinate of the optimized target pixel, f is the coordinate of the fixed pixel, h is the coordinate of the pixel to be adjusted manually by the target user, I F+H is the identity matrix.

5. The image rendering method based on the building model according to claim 1, characterized in that: Rendering a building image in a visualization application interface according to a resolution transformation matrix of the target building model includes: Receiving an adjustment instruction from a target user for any pixel to be adjusted in the building image in the visualization application interface; According to the adjustment instruction of any pixel to be adjusted, the current resolution of the building image in the visualization application interface is adjusted using the resolution transformation matrix of the target building model.

6. The image rendering method based on the building model according to claim 1, characterized in that: Rendering a building image in a visualization application interface according to a resolution transformation matrix of the target building model includes: Obtain the target user's current viewing distance or browsing needs; According to the current viewing distance or browsing requirement of the target user, the resolution transformation matrix of the target building model is used to render the building image in the visualization application interface.

7. The image rendering method based on a building model according to any one of claims 1 to 6, characterized in that: The visualization application interface includes: a visualization application interface of a head-mounted device or a visualization application interface of architectural software.

8. An image rendering device based on a building model, characterized in that: The device comprises: A first acquisition module is used to acquire a target building model; a second acquisition module, configured to acquire, from the target building model, a first coordinate of a first pixel point, a second coordinate of a second pixel point, and a grid parameter to which the first pixel point belongs, wherein the first pixel point is each pixel point in the target building model, and the second pixel point is a neighboring pixel point of the first pixel point; a matrix generation module, configured to generate a resolution transformation matrix of the target building model based on the first coordinate of the first pixel point, the second coordinate of the second pixel point, and a grid parameter to which the first pixel point of the first pixel point belongs, so as to smooth the surface of the target building model; The image rendering module is used to render the building image in the visualization application interface according to the target building model.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the image rendering method based on the building model according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the image rendering method based on a building model according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Real scene three-dimensional automatic modeling method and system based on unmanned aerial vehicle

    CN119810359A

  • Systems and methods for image texture uniformization for multiview object capture

    US11120606B1

  • Viewing distance based resolution control for video coding

    US20240331085A1

  • Generation and display of interactive 3D real estate models

    US20240404215A1