Image rendering method and device based on building model

CN120472117BActive Publication Date: 2026-10-20BEIJING INST OF ARCHITECTURAL DESIGN +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510530339.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2026-10-20
Estimated Expiration
2045-04-25

AI Technical Summary

Technical Problem

[0004]有鉴于此,本发明提供了一种基于建筑模型的图像渲染方法及装置,以解决传统方法操作过程复杂、易出错、成本大、占用内存、无法保证视图渲染质量的问题

Benefits of technology

[0014]本公开实施例归一化处理算法处理第一像素点的邻域边的角度余切权重,以使目标建筑模型的局部领域的像素分布均匀,拉普拉斯算法生成目标建筑模型的分辨率变换矩阵,不但使得目标建筑模型中的每个像素点得到逐步优化和收敛,而且还提升了目标建筑模型的平滑度,降低细微噪声对该模型的影响。同时,离散化过程使得模型在保持原始特征的同时,去除了多余细节,降低了渲染负担,进而大幅提升了建筑物图像的可视化显示效率与图像渲染质量,为城市建筑规划提供了便利性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120472117B_ABST
    Figure CN120472117B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image processing, and discloses a building model-based image rendering method and device. The application uses a resolution transformation matrix of a target building model to render a building image in a visual application interface, can dynamically adjust the current resolution of the building image, does not need to store and calculate a large number of LOD models in advance, thereby reducing the memory and cost of the system, and can guarantee the rendering quality of the building image when dynamically adapting to different changes in viewing distance or adjustment requirements, thereby improving the flexibility of the visual application interface in displaying the building image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and specifically to an image rendering method and apparatus based on architectural models. Background Technology

[0002] In modern urban planning and construction, it is often necessary to create 3D models of building complexes covering the entire city or parts thereof and display them interactively in real time on different terminals. The construction of these building models faces the following challenges and needs: First, because 3D building models in cities contain a large number of buildings, each with numerous vertices and faces, large-scale data processing is required during image rendering. Second, because the shapes of buildings in 3D city models vary, and many contain irregular meshes or "coarse meshes" resulting from multiple external data acquisitions and fusions, complex network structures must be handled during image rendering. Third, because users need to view the overall layout or local details of the city from different viewpoints and zoom levels, and perform interactive operations such as path planning and lighting analysis, dynamic adjustment is required during image rendering. Fourth, because large view areas need to be rendered simultaneously in city-level architectural scenes, real-time rendering pressure is significant.

[0003] To address the aforementioned challenges and requirements of image rendering, related technologies typically pre-generate multiple Level of Detail (LOD) models based on urban buildings using semi-automatic or manual methods. When a user browses a target building area, data is retrieved from these pre-generated LOD models. However, when the user needs to adjust image quality or changes their viewing distance, the LOD models are readjusted to adapt to the new changes. This method is complex, error-prone, costly, and memory-intensive. Furthermore, to meet the user's global browsing needs, this method generally ignores local building detail differences, resulting in a reduced view resolution and thus failing to guarantee view rendering quality. Summary of the Invention

[0004] In view of this, the present invention provides an image rendering method and apparatus based on a building model to solve the problems of traditional methods being complex, error-prone, costly, memory-intensive, and unable 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] The first coordinates of the first pixel, the second coordinates of the second pixel, and the grid parameters to which the first pixel belongs are obtained from the target building model, wherein the first pixel is each pixel in the target building model, and the second pixel is a neighboring pixel of the first pixel;

[0008] Based on the first coordinates of the first pixel, the second coordinates of the second pixel, and the grid parameters to which the first pixel belongs, a resolution transformation matrix for the target building model is generated to make the surface of the target building model smoother.

[0009] Based on the resolution transformation matrix of the target building model, render the building image in the visualization application interface.

[0010] The image rendering method based on building models in this embodiment uses the resolution transformation matrix of the target building model to render building images in the visualization application interface. It can dynamically adjust the current resolution of the building image without storing and calculating a large number of LOD models in advance, thus reducing system memory and overhead. Furthermore, it can ensure the rendering quality of the building image when dynamically adapting to different viewing distance changes or adjustment needs, thereby improving the flexibility of displaying building images in the visualization application interface.

[0011] In some optional implementations, a resolution transformation matrix of the target building model is generated based on the first coordinates of the first pixel, the second coordinates of the second pixel, and the mesh parameters to which the first pixel belongs, so as to make the surface of the target building model smoother, including:

[0012] Based on the second coordinates of the second pixel and the grid parameters of the first pixel, the angle cotangent weight of the neighborhood edge of the first pixel is processed using a normalization processing algorithm to make the pixel distribution in the local area of ​​the target building model uniform.

[0013] Based on the grid parameters of the processed first pixel, the first coordinate of the first pixel, and the second coordinate of the second pixel, the Laplacian 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.

[0014] The normalization processing algorithm in this embodiment processes the angular cotangent weights of the neighborhood edges of the first pixel to make the pixel distribution in the local neighborhood of the target building model uniform. The Laplacian algorithm generates the resolution transformation matrix of the target building model, which not only optimizes and converges each pixel in the target building model step by step, but also improves the smoothness of the target building model and reduces the impact of subtle noise on the model. At the same time, the discretization process allows the model to retain its original features while removing redundant details, reducing the rendering burden, and thus significantly improving the visualization efficiency and image rendering quality of building images, providing convenience for urban building planning.

[0015] In some optional implementations, the grid parameters of the first pixel include the first angle cotangent value of the first neighboring edge of the first pixel, the second angle cotangent weight of the second neighboring edge of the first pixel, and the area of ​​the Thiessen polygon of the grid to which the first pixel belongs. The first neighboring edge, the second neighboring 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 angle cotangent weights of the neighborhood edges of the first pixel are processed using a normalization algorithm to ensure a uniform pixel distribution in the local neighborhood of the target building model. This is expressed by the following formula:

[0017]

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

[0019] In some alternative implementations, the Laplacian algorithm is used to generate the resolution transformation matrix of the target building model to smooth its surface, as expressed by the following formula:

[0020]

[0021] Where, cotα ij cotβ is the cotangent value of the first angle of the first neighborhood edge of the first pixel. ij p is the second angle cotangent weight of the second neighborhood edge of the first pixel. i For the first pixel, A(p) i Let be the area of ​​the Thiessen polygon to which the first pixel belongs, k be the Laplacian operator in the k-th iteration, k+1 be the Laplacian operator in the (k+1)-th iteration, and p j For the second pixel, Δ k Let Δ be the current update parameter corresponding to the kth iteration. k+1Here, p represents the current update parameters for the (k+1)th iteration, p represents the coordinates of the optimized target pixel, f represents the coordinates of the fixed pixel, h represents the coordinates of the pixel to be adjusted by the target user, and I represents the coordinates of the pixel to be adjusted manually. F+H It is an identity matrix.

[0022] In some optional implementations, rendering the building image in the visualization application interface based on the resolution transformation matrix of the target building model includes:

[0023] Receive adjustment instructions from the target user for any pixel to be adjusted in the building image in the visualization application interface;

[0024] Based on the adjustment instruction for 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] This embodiment 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 enabling fine-tuning of the current resolution of the building image in the visualization application interface to adapt to the application needs of different users.

[0026] In some optional implementations, rendering the building image in the visualization application interface based on the resolution transformation matrix of the target building model includes:

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

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

[0029] This embodiment of the disclosure introduces a resolution transformation matrix for the target building model, which can dynamically adjust the current resolution of the view image quality based on the target user's current viewing distance or browsing needs. This ensures both rendering efficiency when observing from a distance and detail accuracy when observing from close distance, providing a more flexible solution for real-time rendering. This approach can effectively reduce the operating pressure on the GPU and CPU, increase the frame rate of building images, and ensure a smooth interactive experience in large scenes.

[0030] In some alternative implementations, the visual application interface includes: a visual application interface for a head-mounted device or a visual application interface for architectural software.

[0031] Secondly, the present invention provides an image rendering apparatus based on a building model, comprising:

[0032] The first acquisition module is used to acquire the target building model;

[0033] The second acquisition module is used to acquire the first coordinates of the first pixel, the second coordinates of the second pixel, and the grid parameters to which the first pixel belongs from the target building model. The first pixel is each pixel in the target building model, and the second pixel is a neighboring pixel of the first pixel.

[0034] The matrix generation module is used to generate a resolution transformation matrix of the target building model based on the first coordinates of the first pixel, the second coordinates of the second pixel, and the grid parameters to which the first pixel belongs, so as to make the surface of the target building model smoother.

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

[0036] Thirdly, 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 computer instructions to perform the image rendering method based on the building model described in the first aspect or any corresponding embodiment thereof.

[0037] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the image rendering method based on a building model according to the first aspect or any corresponding embodiment described above. Attached Figure Description

[0038] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

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

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

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

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

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

[0044] Figure 6 Structural block diagram of an image rendering device based on architectural models;

[0045] Figure 7 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

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

[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 in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0048] This embodiment provides an image rendering method based on a building model, which can be used on computer devices such as mobile phones, tablets, desktop computers, laptops, servers, etc. Figure 1 This is a flowchart of an image rendering method based on a building model according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:

[0049] Step S101: Obtain the target building model.

[0050] Specifically, the target building model is a 3D building model, and its file format includes OBJ, FBX, etc. OBJ file format is suitable for interoperability between 3D software models and is widely used in mobile application development, game development, virtual reality (VR), and augmented reality (AR). FBX file format is a universal file format suitable for various application scenarios requiring the storage, exchange, and display of 3D data, such as data exchange and sharing between different software and platforms. For example, the target building model can include, but is not limited to, 3D models of city skyscrapers, bridges, parks, ancient buildings, highways, etc. This embodiment of the disclosure obtains the target building model to further analyze its local geometry, providing a basis for subsequent image rendering.

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

[0052] Specifically, such as Figure 2 The diagram shows the pixel arrangement in the target building model. The first pixel represents each pixel in the target building model, and the second pixel represents the neighboring pixels in the local neighborhood of each pixel. For example, in... Figure 2 In the diagram, the first pixel is O, and its corresponding first coordinate is p. i This indicates that a Thiessen polygon is formed with the first pixel O as its center. The vertices of the Thiessen polygon are the neighboring pixels of the first pixel, i.e., the second pixel mentioned above. Figure 2 In the diagram, the second pixels are designated as B1, B2, B3, B4, and B5, and the second coordinates corresponding to the second pixels are uniformly represented by p. j This means that the second coordinate information of each second pixel is different. For example, for B1, its second coordinate p j It can be (x1, y1, z1), while for B2, its second coordinate p j It can be (x5, y4, z3).

[0053] In a specific example, the grid parameters of the first pixel include the first angle cotangent value of the first neighboring edge of the first pixel, the second angle cotangent weight of the second neighboring edge of the first pixel, and the area of ​​the Thiessen polygon of the grid to which the first pixel belongs. The first neighboring edge, the second neighboring 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.

[0054] For example, in Figure 2In the diagram, the first pixel belongs to a triangular mesh, and the first neighboring edge of the first pixel is represented by v. i This indicates that the second neighborhood edge of the first pixel is represented by v. j Let α represent the first angle of the first neighborhood edge, β represent the second angle of the first neighborhood edge, and cotα represent the cotangent value of the first angle. ij This indicates that the cotangent value of the second angle is represented by cotβ. ij This indicates that, in the target building model, the first and second angle cotangent values ​​can be used to represent the tilt angle of the target building model's surface or edge. The area of ​​the Thiessen polygon of the mesh to which the first pixel belongs can be represented by A(p i )express.

[0055] Furthermore, the cotangent weight of the angle cotangent values ​​is obtained by calculating the angle cotangent values ​​(first angle cotangent value, second angle cotangent value) of the neighborhood edges of each first pixel and combining them with the area of ​​the Thiessen polygon. The cotangent weight is used to measure the relative influence between the vertices of the Thiessen polygon, and the area of ​​the Thiessen polygon is used to perform local weighting processing on each pixel.

[0056] Step S103: Based on the first coordinates of the first pixel, the second coordinates of the second pixel, and the grid parameters to which the first pixel belongs, generate the resolution transformation matrix of the target building model so that the surface of the target building model tends to be smooth.

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

[0058] Traditional methods, which render building images by selecting different resolution LOD models at different viewing distances or screen sizes, utilize a lower-resolution simplified model to improve rendering efficiency when the user or camera is far from the model, and load a higher-resolution model to enhance detail when the user's viewpoint is closer to the model. This method balances rendering performance and visual effects through predefined hierarchical models and is widely used in large-scale scenes. However, this method results in a large system memory usage due to storing and computing a large number of LOD models. Furthermore, in order to meet the user's global browsing needs, this approach generally reduces the view resolution by ignoring local details of the building, thus failing to guarantee the quality of view rendering.

[0059] In this embodiment, the first coordinates of the first pixel, the second coordinates of the second pixel, and the grid parameters to which the first pixel belongs in the target building model are combined 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, assuming 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; conversely, assuming the target user is viewing the view at close range, the high-frequency components of the model are enhanced, improving detail. This flexible, dynamic adjustment method significantly improves rendering efficiency and maintains high-quality rendering details across different viewpoints. Furthermore, during view quality adjustments, there is no need to pre-store and calculate different LOD models, thus reducing system memory and overhead.

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

[0062] This embodiment provides an image rendering method based on a building model, which can be used on computer devices such as mobile phones, tablets, desktop computers, laptops, 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 below. Figure 3 As shown, in step S103 above, a resolution transformation matrix for the target building model is generated based on the first coordinates of the first pixel, the second coordinates of the second pixel, and the mesh parameters to which the first pixel belongs, so as to make the surface of the target building model smoother. This process includes the following steps:

[0063] Step S1031: Based on the first coordinates of the first pixel and the grid parameters to which the first pixel belongs, the angle cotangent weight of the neighborhood edge of the first pixel is processed using a normalization processing algorithm to make the pixel distribution in the local area of ​​the target building model uniform.

[0064] Because the pixel distribution in the local area of ​​the target building model is uneven, the pixel values ​​in the local area are easily unstable, which affects the accuracy of the resolution transformation matrix of the target building model, and thus affects the rendering quality of the building image in the visualization interface.

[0065] Therefore, the normalization processing algorithm of this embodiment processes the angle cotangent weight of the neighborhood edge of the first pixel 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 angular cotangent weights of the neighborhood edges of the first pixel to make the pixel distribution in the local neighborhood of the target building model uniform, as expressed by the following formula (1):

[0067]

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

[0069] For example, in Figure 2 In the diagram, the second pixels are designated as B1, B2, B3, B4, and B5, and the second coordinates corresponding to the second pixels are uniformly represented by p. j This indicates that the angle cotangent weight ω of the neighborhood edge of the first pixel is... ij It can represent the angular cotangent weights 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 It is the neighborhood edge v of the first pixel. i The corresponding first angle cotangent value and the neighborhood edge v of the first pixel. j The sum of the corresponding second-angle cotangent values.

[0071] The angle cotangent weights of the neighborhood edges of the first pixel are processed using a normalization algorithm. In order to control the angle cotangent weights of the neighborhood edges of the first pixel within a reasonable range and prevent the accumulation of numerical errors caused by excessive weight differences, the normalization algorithm is used to balance the weights in the neighborhood. This is beneficial to achieve smoother updates of each pixel during the generation of the resolution transformation matrix of the target building model, avoiding model deformation caused by excessively large or small values, thereby improving the stability of the system.

[0072] Step S1032: Based on the grid parameters of the processed first pixel, the first coordinate of the first pixel, and the second coordinate of the second pixel, the Laplacian 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.

[0073] Traditional methods typically downgrade the entire LOD model at once when rendering images, lacking differentiated processing for specific local areas (such as urban landmarks), which easily leads to loss of detail. However, using the Laplacian algorithm to generate the resolution transformation matrix of the target building model allows for different weights and iteration strategies to be applied to different buildings or urban functional areas, enabling fine-grained control over the preservation or enhancement of local details, thereby improving 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] Where, cotα ij cotβ is the cotangent value of the first angle of the first neighborhood edge of the first pixel. ij p is the second angle cotangent weight of the second neighborhood edge of the first pixel. i For the first pixel, A(p) i Let be the area of ​​the Thiessen polygon to which the first pixel belongs, k be the Laplacian operator in the k-th iteration, k+1 be the Laplacian operator in the (k+1)-th iteration, and p j For the second pixel, Δ k Let Δ be the current update parameter corresponding to the kth iteration. k+1 Here, p represents the current update parameters for the (k+1)th iteration, p represents the coordinates of the optimized target pixel, f represents the coordinates of the fixed pixel (known), h represents the coordinates of the pixel to be manually adjusted by the target user, and I represents the current update parameters for the (k+1)th iteration. F+H It is the identity matrix. In the above formula (2), the vector on the right side... This illustrates the direct impact between fixed pixels and pixels to be adjusted, combined with the matrix on the left. The relationships between them collectively describe the updates to the entire target building model.

[0077] In this embodiment, the Laplace algorithm described above is applied to recursively discretize and update the current parameters of each pixel in the target building model, generating the resolution transformation matrix of the target building model. This allows for rapid incremental adjustments to the locally updated portion in each iteration, without requiring a large-scale recalculation of the entire city-wide model. This enables quick responses to changes in the target building model in interactive scenarios, shortening the time from modification to visualization feedback.

[0078] Therefore, the image rendering method based on building models in this embodiment not only optimizes and converges each pixel in the target building model step by step, but also improves the smoothness of the target building model and reduces the impact of subtle noise on the model. Simultaneously, the discretization process allows the model to retain its original features while removing redundant details, reducing the rendering burden and thus significantly improving the visualization efficiency and image rendering quality of building images, providing convenience for urban architectural planning.

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

[0080] Specifically, the geometric data of the target building model is transformed into the frequency domain based on the Fourier transform algorithm, separating the low-frequency and high-frequency components of the model to achieve multi-resolution geometric representation. By adjusting the weights of the low-frequency and high-frequency components, the resolution of the model can be dynamically controlled at different viewpoints or distances to improve rendering efficiency while maintaining detail.

[0081] This embodiment provides an image rendering method based on a building model, which can be used on the aforementioned mobile terminals, such as mobile phones and tablets. Figure 4 This is a flowchart of an image rendering method based on a building model according to an embodiment of the present invention, such as... Figure 4 As shown, step S104 above renders the building image in the visualization application interface according to the resolution transformation matrix of the target building model. This process includes the following steps:

[0082] S1041a1 receives adjustment instructions from the target user for any pixel to be adjusted in the building image in the visualization application interface.

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

[0084] Specifically, for example, when a target user wants to adjust the current resolution of any pixel to be adjusted in a building image in a visualization application interface, the computer device in this 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 and the coordinates of the pixel to be adjusted in the resolution transformation matrix of the target building model, thereby realizing fine adjustment of the current resolution of the building image in the visualization application interface to adapt to the application needs of different users.

[0085] This embodiment provides an image rendering method based on a building model, which can be used on the aforementioned mobile terminals, such as mobile phones and tablets. Figure 5 This is a flowchart of an image rendering method based on a building model according to an embodiment of the present invention, such as... Figure 5 As shown, step S104 above renders the building image in the visualization application interface according to the resolution transformation matrix of the target building model. This process includes the following steps:

[0086] Step S1041a2: Obtain the target user's current viewing distance or browsing needs.

[0087] Step S1042b2: Based on the target user's current viewing distance or browsing needs, render the building image in the visualization application interface using the resolution transformation matrix of the target building model.

[0088] Specifically, the current viewing distance includes both increasing and decreasing viewing distance; browsing needs include global browsing and local browsing. Increasing viewing distance typically corresponds to local browsing, and decreasing viewing distance typically corresponds to local browsing. That is, 3D scenes in urban architecture often retain the general outline when the view distance is far, while restoring more high-precision details when viewed up close or in a zoomed-in view. 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 view distance, focus range, etc., so that the most essential building shapes are preserved in the distance, while key details such as windows and balconies are presented in the foreground. This on-demand, dynamic detail adjustment method significantly reduces unnecessary geometric calculations and rendering burden, while preserving necessary visual features to the greatest extent.

[0089] Therefore, the image rendering method based on building models in this embodiment of the present disclosure, by introducing the resolution transformation matrix of the target building model, can dynamically adjust the current resolution of the view image quality according to 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, greatly reducing the number of vertices and faces; when the user zooms or gets closer to a specific building, the high-frequency components (such as key details such as building exterior walls, windows, and roofs) are gradually loaded and rendered, which not only ensures the rendering efficiency when observing from a distance, but also ensures the detail accuracy when observing from a close distance. This provides 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 alternative implementations, the visual application interface includes: a visual application interface for a head-mounted device or a visual application interface for architectural software.

[0091] For example, a target user enters a virtual scene through a head-mounted display device, where multiple building outlines and partial building details are displayed. Based on the target user's distance from the buildings, the method in this embodiment dynamically adjusts the building details, reducing detail display when the user is far from the building and automatically increasing geometric accuracy when the user is close. Simultaneously, the target user can adjust the detail display mode in the settings interface to meet different visual experience needs.

[0092] For example, during the architectural design process, when designers view the overall architectural renderings, they can use the method in this embodiment to automatically render distant buildings with low precision. As the viewing angle approaches, the details of the buildings gradually increase, especially in areas such as windows and doors, ensuring efficient rendering while enhancing the display of design details.

[0093] like Figure 5 The diagram shown is a simplified flowchart of an image rendering method based on a building model, as described in this embodiment of the present disclosure. Figure 5 The proposed method comprises five main steps: First, inputting 3D model data and calculating the mesh structure and neighborhood cotangent weights; second, enhancing numerical stability through weight normalization to lay the foundation for subsequent calculations; third, progressively optimizing vertex positions using Laplacian recursive discretization to achieve local smoothing and global geometric consistency; fourth, decomposing the model into high-frequency and low-frequency components and dynamically adjusting the level of detail based on view distance to achieve a balance between efficiency and detail; finally, outputting the optimized model to support various practical applications. The significance of this technology lies in significantly improving the rendering efficiency of 3D models in complex scenes while preserving key geometric features. It is suitable for scenarios such as virtual reality, game engines, and architectural visualization, meeting users' dual needs for real-time rendering and high-precision modeling.

[0094] This embodiment also provides an image rendering apparatus based on a building model, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, 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, such as Figure 6 As shown, it includes:

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

[0097] The second acquisition module 602 is used to acquire the first coordinates of the first pixel, the second coordinates of the second pixel, and the grid parameters to which the first pixel belongs from the target building model, wherein the first pixel is each pixel in the target building model, and the second pixel is a neighboring pixel of the first pixel;

[0098] The matrix generation module 603 is used to generate a resolution transformation matrix of the target building model based on the first coordinates of the first pixel, the second coordinates of the second pixel, and the grid parameters to which the first pixel belongs, so as to make the surface of the target building model tend to be smooth.

[0099] Image rendering module 604 is used to render building images in the visualization application interface based on the target building model.

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

[0101] The first processing submodule is used to process the angle cotangent weight of the neighborhood edge of the first pixel using a normalization processing algorithm based on the second coordinate of the second 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.

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

[0103] In some optional implementations, the grid parameters of the first pixel include the first angle cotangent value of the first neighboring edge of the first pixel, the second angle cotangent weight of the second neighboring edge of the first pixel, and the area of ​​the Thiessen polygon of the grid to which the first pixel belongs. The first neighboring edge, the second neighboring 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 angle cotangent weight of the neighborhood edge of the first pixel is processed by the normalization processing algorithm to make the pixel distribution of the local area of ​​the target building model uniform, which is expressed by the above formula (1).

[0105] In some alternative 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 smoother, as expressed by the above formula (2).

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

[0107] The instruction receiving submodule is used to receive adjustment instructions from the 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 based on the adjustment command of any pixel to be adjusted, using the resolution transformation matrix of the target building model.

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

[0110] The requirement acquisition submodule is used to obtain the target user's current viewing distance or browsing requirements;

[0111] The image rendering submodule is used to render building images in the visualization application interface based on the target user's current viewing distance or browsing needs, using the resolution transformation matrix of the target building model.

[0112] In some alternative implementations, the visual application interface includes: a visual application interface for a head-mounted device or a visual application interface for architectural software.

[0113] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

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

[0115] This invention also provides a computer device having the above-described image rendering apparatus based on a building model.

[0116] Please see Figure 7 , Figure 7 This is a schematic diagram of the structure of a computer device provided in 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 the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 7 Take a processor 10 as an example.

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

[0118] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

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

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

[0121] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0122] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0123] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. An image rendering method based on architectural models, characterized in that, The method includes: Obtain the target building model; The first coordinates of the first pixel, the second coordinates of the second pixel, and the grid parameters to which the first pixel belongs are obtained from the target building model, wherein the first pixel is each pixel in the target building model, and the second pixel is a neighboring pixel of the first pixel; Based on the first coordinates of the first pixel, the second coordinates of the second pixel, and the grid parameters to which the first pixel belongs, a resolution transformation matrix for the target building model is generated to make the surface of the target building model smoother. Based on the resolution transformation matrix of the target building model, render the building image in the visualization application interface; Based on the first coordinates of the first pixel, the second coordinates of the second pixel, and the grid parameters to which the first pixel belongs, a resolution transformation matrix for the target building model is generated to smooth the surface of the target building model, including: Based on the second coordinates of the second pixel and the grid parameters to which the first pixel belongs, the angle cotangent weight of the neighborhood edge of the first pixel is processed using a normalization processing algorithm to make the pixel distribution in the local area of ​​the target building model uniform. Based on the processed grid parameters of the first pixel, the first coordinate of the first pixel, and the second coordinate of the second pixel, the Laplacian 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.

2. The image rendering method based on a building model according to claim 1, characterized in that, The grid parameters of the first pixel include the first angle cotangent value of the first neighboring edge of the first pixel, the second angle cotangent weight of the second neighboring edge of the first pixel, and the area of ​​the Thiessen polygon of the grid to which the first pixel belongs. The first neighboring edge, the second neighboring 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. The angle cotangent weights of the neighborhood edges of the first pixel are processed using a normalization algorithm to ensure a uniform pixel distribution in the local neighborhood of the target building model, as expressed by the following formula: in, The angle cotangent weight of the neighborhood edge of the first pixel after processing. The angle cotangent weight of the neighborhood edge of the first pixel before processing. The second coordinate is the second coordinate of the second pixel.

3. The image rendering method based on a building model according to claim 2, characterized in that, The resolution transformation matrix of the target building model is generated using the Laplacian algorithm to smooth the surface of the target building model, as expressed by the following formula: in, The first angle cotangent value of the first neighborhood edge of the first pixel. The second angle cotangent weight of the second neighborhood edge of the first pixel is given. For the first pixel, Let be the area of ​​the Thiessen polygon to which the first pixel belongs. For the first Laplace operator in the next iteration For the first Laplace operator in the next iteration For the second pixel, for The current update parameter corresponding to the next iteration. For the first The current update parameter corresponding to the next iteration. Here, f represents the coordinates of the optimized target pixel, h represents the coordinates of the fixed pixel, and f represents the coordinates of the pixel to be manually adjusted by the target user. It is an identity matrix.

4. The image rendering method based on a building model according to claim 1, characterized in that, Based on the resolution transformation matrix of the target building model, render the building image in the visualization application interface, including: Receive adjustment instructions from the target user for any pixel to be adjusted in the building image in the visualization application interface; Based on the adjustment instruction for 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.

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

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

7. An image rendering device based on an architectural model, characterized in that, The device includes: The first acquisition module is used to acquire the target building model; The second acquisition module is used to acquire the first coordinates of the first pixel, the second coordinates of the second pixel, and the grid parameters to which the first pixel belongs from the target building model, wherein the first pixel is each pixel in the target building model, and the second pixel is a neighboring pixel of the first pixel; The matrix generation module is used to generate a resolution transformation matrix of the target building model based on the first coordinates of the first pixel, the second coordinates of the second pixel, and the grid parameters to which the first pixel belongs, so as to make the surface of the target building model smoother. The image rendering module is used to render building images in the visualization application interface based on the target building model; The matrix generation module includes: The first processing submodule is used to process the angle cotangent weight of the neighborhood edge of the first pixel using a normalization processing algorithm based on the second coordinate of the second 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. The second processing submodule is used to generate a resolution transformation matrix of the target building model using the Laplacian algorithm based on the grid parameters of the processed first pixel, the first coordinate of the first pixel, and the second coordinate of the second pixel, so as to make the surface of the target building model tend to be smooth.

8. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the image rendering method based on the building model as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the image rendering method based on the building model as described in any one of claims 1 to 6.

Citation Information

Patent Citations

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

    CN119810359A

  • Generation and display of interactive 3D real estate models

    US20240404215A1