A three-dimensional construction method for architectural scenes
By converting architectural scenes into point cloud data and using holographic projection and Gaussian scattering function processing, a three-dimensional space of Gaussian distribution is constructed, which solves the problems of large computing volume and slow rendering speed in the existing technology, and achieves a more accurate and efficient architectural scene Render.
Patent Information
- Application Number
- CN202411547965.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-01
AI Technical Summary
The existing technology has large amount of calculation and slow rendering speed in the three-dimensional construction of architectural scenes, resulting in insufficient precision and clearness of the architectural model.
By converting the architectural scene into processable point cloud data, the point cloud data is analyzed, key point and normal information is extracted, and the building mapping scene is processed using holographic projection and Gaussian scattering functions, the three-dimensional space of Gaussian distribution is constructed, and the Gaussian distribution is optimized. Meta to generate accurate 3D models and render them.
It improves the accuracy and rendering efficiency of architectural scenes, reduces computing requirements, and enhances the authenticity of visual effects and rendering quality.
Smart Images

Figure CN119068122B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of three-dimensional construction, and in particular to a three-dimensional construction method for a building scene. Background Art
[0002] With the continuous advancement of technology and the expansion of the market, 3D reconstruction technology is expected to play a more important role in the future, bringing revolutionary development to the construction and other related industries.
[0003] The Chinese patent application publication number is CN101290222A, which discloses a method for quickly constructing a three-dimensional building scene through a true orthogonal image. The method comprises: (1) extracting the top surface of the building through the true orthogonal image to obtain a plane vector graphic and simultaneously obtain the plane coordinates of the vector; (2) performing polygonal triangulation processing on the top surface of the building and polygonal triangulation processing on the plane vector graphic obtained in step (1), and performing elevation reading in combination with digital surface model data and digital elevation model data to generate a building model and a ground model; (3) combining the building model and the ground model to generate a three-dimensional scene model; (4) performing texture mapping and superposition on the three-dimensional building model and the true orthogonal image to generate a three-dimensional building scene rendering.
[0004] In the prior art, the digital surface model data and the digital elevation model data are read at elevation to generate a building model and a ground model and combine them to generate a three-dimensional scene model. The scene is not specifically analyzed and processed, resulting in the building model being inaccurate and unclear. Summary of the invention
[0005] To this end, the present invention provides a three-dimensional construction method for building scenes, which can solve the problems of large amount of calculation and slow rendering speed when building scenes.
[0006] To achieve the above object, the present invention provides a rendering method based on a building scene, comprising:
[0007] Convert the building scene into processable point cloud data, analyze the point cloud data, and extract key points and normal information of the building scene based on the analysis results;
[0008] Taking the key point as the center point, the building scene is captured by holographic projection to obtain a building mapping scene, and based on the key point and the normal information, the building mapping scene is processed by using a Gaussian scattering function to blur mapping details and retain the scene outline in the mapping;
[0009] According to the center point of each building component in the building scene and the ambient light, and using the Gaussian scattering function and the ambient light, a Gaussian basis element of each building component is calculated, and a continuous three-dimensional space is constructed by mapping the building components in the form of Gaussian distribution through a minimum volume unit, wherein each Gaussian basis element includes parameter information, and the parameter information of each Gaussian basis element satisfies an isoproportional correspondence relationship with the parameter information of the building component;
[0010] Optimizing the Gaussian primitives of each building component by using a 3D smoothing filter and a 2D Mip technique to eliminate the distorted portion of the Gaussian primitives;
[0011] Constructing a 3D model identical to the building scene based on the optimized Gaussian primitives;
[0012] The Gaussian primitives in the 3D model are processed by rasterization to determine which pixels are visible, the visible pixels are analyzed, and each visible pixel is colored according to the analysis result to obtain a rendered scene.
[0013] Furthermore, the step of extracting key points and normal information of the building scene according to the analysis results includes:
[0014] De-noising, filtering and cleaning of point cloud data;
[0015] According to the processing of the point cloud data, identifying feature points in the point cloud data, the feature points including corner points, edge points or plane areas;
[0016] Constructing a three-dimensional grid model of the building scene according to the feature points in the point cloud data;
[0017] Key points are detected according to the three-dimensional grid model, and local plane fitting is performed on each key point and normal information is calculated.
[0018] Furthermore, the calculation process of the Gaussian scattering function includes:
[0019] Calculate the standard deviation of a Gaussian distribution using a variety of scattering models and algorithms built into optical simulation software tools ; and according to the spatial position of the key point in the three-dimensional grid model, the Gaussian scattering value of the key point is calculated by the Gaussian scattering function, and the Gaussian scattering function is:
[0020]
[0021] in, is the standard deviation of the Gaussian distribution, x is the horizontal coordinate of the key point in the three-dimensional mesh model, y is the vertical coordinate of the key point in the three-dimensional mesh model, and z is the vertical coordinate of the key point in the three-dimensional mesh model.
[0022] Furthermore, the step of calculating the Gaussian basis element of each building component by using the Gaussian scattering function and the ambient illumination comprises:
[0023] The lighting environment in the building scene is analyzed using computer vision technology to determine the intensity of the incident light, and the Gaussian basis element of each building component is calculated based on the intensity of the incident light, the normal information of the plane where the center point of each building component is located, and the Gaussian scattering function:
[0024]
[0025] in, is the Gaussian basis element of the center point of the i-th building component, is the Gaussian scattering value of the center point of the i-th building component, is the normal of the plane where the center point of the i-th building component is located, is the intensity of the incident light, is the coordinate position of the center point of the i-th building component.
[0026] Furthermore, the step of optimizing the Gaussian primitives of each building component by using a 3D smoothing filter and a 2D Mip technology comprises:
[0027] The maximum frequency of the key points of the building scene mapped on each axis is determined by the fast Fourier transform algorithm, and the size of the constrained Gaussian primitive is calculated according to the maximum frequency to avoid aliasing of building components in the building scene. The formula for calculating the size of the constrained Gaussian primitive is:
[0028]
[0029] in, are the sampling frequencies on the three coordinate axes of the key points,
[0030] The texture mapping of the Gaussian primitives of the building component is optimized according to the 2D Mip filter, the texture resolution is selected using the 2D Mip filter, and the textures between different levels are smoothly transitioned to form Gaussian primitives.
[0031] Furthermore, the step of determining the maximum frequency of the key points of the building scene mapped on each axis by using a fast Fourier transform algorithm includes:
[0032] Digitize the 3D model of the building scene to ensure that each key point has coordinate data;
[0033] According to the sampling theorem, the frequencies mapped by the key points on each axis are sampled to obtain discrete data points;
[0034] The frequency of the mapping of each key point on the coordinate axis is converted into the frequency domain by fast Fourier transform for amplitude calculation, and the amplitude calculation is:
[0035]
[0036] where X[k] is the kth complex element of the fast Fourier transform, , are the real part and the imaginary part of the key point respectively, the amplitude value is calculated for each key point, the maximum amplitude value and its corresponding frequency are determined, and the frequency is the maximum frequency.
[0037] Further, the step of constructing a 3D model identical to the building scene based on the optimized Gaussian primitives includes:
[0038] The optimized Gaussian primitives containing position, scale and direction parameter information are superimposed, and the superposition formula is:
[0039]
[0040] Wherein, N is the number of Gaussian primitives, and the superimposed Gaussian primitives are overlapped to construct a 3D model.
[0041] Furthermore, the step of using the Gaussian primitives in the 3D model to render the scene using a rendering algorithm includes:
[0042] Perform lighting simulation by setting the lighting conditions of the building scene to ensure that the lighting matches the properties of the Gaussian primitives;
[0043] Based on the lighting condition, converting the Gaussian primitives into a 2D pixel grid using a rasterizer, which converts 3D vertices into pixels in screen space;
[0044] Depth testing and stencil testing are performed during rasterization to determine which pixels are visible;
[0045] Lighting calculation, texture mapping and visual effect detection are performed according to the visible pixels, the final color is calculated using the output of the fragment shader, and rendering operations are performed on each pixel.
[0046] Further, the steps of performing depth testing and stencil testing during rasterization to determine which pixels are visible include:
[0047] Before rendering begins, initialize the depth buffer to store a depth value for each pixel in the scene;
[0048] For each fragment generated during rasterization, calculate its depth value;
[0049] Based on the comparison between the depth value of the fragment and the corresponding depth value in the depth buffer, determine whether the fragment is visible according to the comparison result, if the depth value of the fragment is less than or equal to the value in the depth buffer, retain the fragment, otherwise, discard the fragment;
[0050] For the retained fragments, a stencil test is performed to determine which pixels are visible.
[0051] Furthermore, the step of coloring each visible pixel to obtain a rendered scene includes:
[0052] Executing a shader program through the visible pixels to calculate lighting and material properties;
[0053] Sample color and surface properties from the texture image based on the fragment's texture coordinates;
[0054] Based on the texture mapping and the shader program, a blending mode is applied to the transparent or semi-transparent material to calculate the final color of the visible pixel, and the visible pixel is colored by color value encoding to obtain a rendered scene.
[0055] Compared with the prior art, the beneficial effects of the present invention are that the architectural scene is converted into processable point cloud data through software, and the accurate spatial position information of the architectural scene is provided by analyzing the point cloud data, which is helpful to improve the accuracy of subsequent analysis and processing; the architectural scene is captured by holographic projection with the key point as the center point, ensuring the accurate alignment of the projection content with the actual architectural scene, improving the authenticity of the visual effect, so as to obtain the architectural mapping scene with the same normal as the key point, and based on the key point and the normal information of the architectural scene, the architectural mapping scene is processed by using a Gaussian scattering function to blur the mapping details, retain the scene outline in the mapping, highlight the architectural features, reduce the mapping noise, and improve the mapping quality; according to the center point and ambient light of each architectural component in the architectural scene, the Gaussian basis element of each architectural component is calculated by using the Gaussian scattering function, and the mapping of the architectural scene is constructed into a continuous three-dimensional space in the form of a Gaussian distribution through the minimum volume unit, and the Gaussian distribution can effectively compress data, reduce storage and calculation requirements, and facilitate various spatial analysis and processing, and use 3D smoothing filters and 2D Mip technology optimizes the Gaussian primitives of each key point to eliminate the distorted part of the Gaussian primitives, improve the visual effect, make the rendered visual effect smoother and more coherent, and improve the overall visual quality. The optimized Gaussian primitives construct a 3D model identical to the architectural scene, simplifying the conversion process from the architectural scene to the digital model. The Gaussian primitives in the 3D model are used in the scene rendering using a rendering algorithm to reduce unnecessary calculations, improve rendering efficiency, and maintain rendering quality.
[0056] In particular, the analysis results of point cloud data can be used to extract all key points and normal information on the surface of the building model to reduce manual intervention and improve the efficiency of the automated processing flow. Normal information is crucial for calculating lighting effects and directly affects the realism of the rendering.
[0057] In particular, the Gaussian scattering function values of the key points are calculated to blur the mapping details, retain important structural information in the mapping, highlight the features of the building, reduce mapping noise, and improve the mapping quality.
[0058] In particular, by using the Gaussian scattering function and the ambient illumination to calculate the Gaussian basis element of each building component, it is helpful to clearly express the structure and elements of the scene, making the scene more three-dimensional and vivid.
[0059] In particular, by utilizing a 3D smoothing filter, noise and distortion in a data set can be effectively reduced, and a 2DMip filter is used to optimize the texture mapping of the Gaussian primitives of the building components, and a 2D Mip filter is used to select the texture resolution and smoothly transition textures between different levels to form Gaussian primitives to reduce the problems of aliasing, aliasing and dilation of texture mapping.
[0060] In particular, determining the maximum frequency mapped by the key points of the building scene on each axis through the fast Fourier transform algorithm helps to enhance the useful information of the signal by highlighting the main frequency components while suppressing the unimportant signal parts.
[0061] In particular, by stacking the optimized Gaussian primitives together, it is ensured that all elements correctly cover the entire area and the handling of overlaps ensures a more accurate approximation of the building model.
[0062] In particular, by using the optimized Gaussian primitives to render scenes using rendering algorithms, the rendering efficiency is effectively improved while maintaining the rendering quality to generate realistic architectural scenes.
[0063] In particular, depth testing can effectively eliminate hidden surfaces, thereby avoiding pixel coverage problems. By eliminating invisible pixels in advance, the workload of subsequent rendering steps can be reduced and rendering efficiency can be improved.
[0064] In particular, by performing texture mapping and visual effect detection according to the visible pixels, calculating the final color using the output of the fragment shader, and performing scene rendering operations on each pixel, the rendering efficiency is effectively improved while maintaining the rendering quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A schematic diagram of the structure of a three-dimensional construction method for a building scene provided by an embodiment of the present invention;
[0066] Figure 2A schematic diagram of a structure for extracting all key points and normal information on the surface of a building model according to the analysis results of point cloud data in a three-dimensional construction method for a building scene provided by an embodiment of the present invention;
[0067] Figure 3 A schematic diagram of a structure of a method for constructing a three-dimensional building scene provided by an embodiment of the present invention, which uses fast Fourier transform to determine the maximum frequency mapped by key points of the building scene on each axis;
[0068] Figure 4 A schematic structural diagram of a method for constructing a three-dimensional building scene provided in an embodiment of the present invention, in which an optimized Gaussian primitive is used to render a scene using a rendering algorithm. DETAILED DESCRIPTION
[0069] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0070] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.
[0071] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be understood as a limitation on the present invention.
[0072] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0073] See also Figure 1 As shown, the present invention provides a three-dimensional construction method for a building scene, comprising:
[0074] Step S100, converting the building scene into processable point cloud data, analyzing the point cloud data, and extracting key points and normal information of the building scene according to the analysis results;
[0075] Step S200, taking the key point as the center point and using holographic projection to capture the building scene to obtain a building mapping scene, and based on the key point and the normal information, processing the building mapping scene using a Gaussian scattering function to blur mapping details and retain the scene outline in the mapping;
[0076] Step S300, according to the center point of each building component in the building scene and the ambient light, and using the Gaussian scattering function and the ambient light, a Gaussian basis element of each building component is calculated, and a continuous three-dimensional space is constructed by mapping the building components in the form of Gaussian distribution through a minimum volume unit, and each Gaussian basis element includes parameter information, and the parameter information of each Gaussian basis element satisfies an isoproportional correspondence relationship with the parameter information of the building component;
[0077] Step S400, optimizing the Gaussian primitives of each building component by using a 3D smoothing filter and a 2D Mip technology to eliminate the distorted part of the Gaussian primitives;
[0078] Step S500, constructing a 3D model identical to the building scene based on the optimized Gaussian primitives;
[0079] Step S600: rasterize the Gaussian primitives in the 3D model to determine which pixels are visible, analyze the visual depth of the visible pixels, and color each visible pixel according to the analysis result to obtain a rendered scene.
[0080] Specifically, a three-dimensional scanner is used to scan a building scene, three-dimensional coordinate information in the building scene is captured, and point cloud data is generated. The distribution of the point cloud data in space is analyzed to determine the overall structure of the building scene and the positional relationship between each building component, so as to capture the core position point of all pictures of any scene in the building scene, wherein the core position point is a coordinate point of the center point composed of each component, which is magnified in a certain proportion in the three-dimensional space, and the coordinate point is a key point, and the normal information of the corresponding point is extracted. Based on the key point and the corresponding normal information, a building mapping scene is obtained, and Gaussian scattering processing is performed on the mapping scene to blur the mapping details and retain the scene contour in the mapping. The Gaussian scattering function and the ambient illumination are used to calculate the Gaussian basis element of each building component, and the Gaussian basis element is the minimum volume unit with position, scale and direction parameters. The mapping of the building components is constructed into a continuous three-dimensional space in the form of Gaussian distribution by using the Gaussian basis element, and the Gaussian smoothing filter and the 2D Mip technology are used to optimize the Gaussian basis element of each building component, and a 3D model identical to the building scene is constructed according to the optimized Gaussian basis element, and finally the scene is rendered.
[0081] Specifically, the present embodiment converts the building scene into processable point cloud data through software, and provides accurate spatial position information of the building scene by analyzing the point cloud data, which helps to improve the accuracy of subsequent analysis and processing; uses the key point as the center point to capture the building scene using holographic projection, ensures the accurate alignment of the projection content with the actual building scene, and improves the authenticity of the visual effect, so as to obtain the building mapping scene with the same normal as the key point; based on the key point and the normal information of the building scene, uses the Gaussian scattering function to process the building mapping scene, so as to blur the mapping details, retain the scene outline in the mapping, highlight the building features, and reduce the mapping noise, so as to improve the mapping quality; according to the center point and ambient lighting of each building component in the building scene, and using the Gaussian scattering function to calculate the Gaussian basis element of each building component, the mapping of the building scene is constructed into a continuous three-dimensional space in the form of a Gaussian distribution through the minimum volume unit, and the Gaussian distribution can effectively compress data, reduce storage and computing requirements, and facilitate various spatial analysis and processing, and use 3D smoothing filters and 2D Mip technology optimizes the Gaussian primitives of each key point to eliminate the distorted part of the Gaussian primitives, improve the visual effect, make the rendered visual effect smoother and more coherent, and improve the overall visual quality. The optimized Gaussian primitives construct a 3D model identical to the architectural scene, simplifying the conversion process from the architectural scene to the digital model. The Gaussian primitives in the 3D model are used in the scene rendering using a rendering algorithm to reduce unnecessary calculations, improve rendering efficiency, and maintain rendering quality.
[0082] See also Figure 2 As shown, the steps of extracting key points and normal information of the building scene according to the analysis results include:
[0083] Step S110, denoising, filtering and cleaning the point cloud data;
[0084] Step S120, identifying feature points in the point cloud data according to the processing of the point cloud data, the feature points including corner points, edge points or plane areas;
[0085] Step S130, constructing a three-dimensional grid model of the building scene according to the feature points in the point cloud data;
[0086] Step S140: detecting key points according to the three-dimensional mesh model, performing local plane fitting and calculating normal information for each key point.
[0087] Specifically, the point cloud data is a collection of a large number of discrete points in the building scene. The discrete points carry spatial information, such as position, shape, texture, etc. The Harris corner point detection detects the local curvature change of each point in the point cloud to identify the corner points. The point cloud data is clustered and analyzed to group points with similar attributes. The boundaries between different groups are compared to identify the edge points. By extracting the edge points, the outline and boundary of the building scene are clearly outlined. The plane area is identified in the point cloud data based on the fitted mathematical model (such as the plane model). The plane area usually corresponds to the plane part of the building scene, such as the wall, the ground, etc. The feature points in the point cloud data include corner points, edge points and plane areas, etc., which respectively represent the features and shape information of different building scenes in the point cloud.
[0088] Specifically, a deep learning machine learning algorithm is usually used to train a model that can automatically identify key points to detect key points, select a similar local neighborhood around the key points, and use the points in these neighborhoods to fit a plane by the least squares method. The normal direction in the normal information is directly calculated by the parameters of the plane. The calculation method is:
[0089] The plane passing through the key point is represented as Ax+By+Cz+D=0, and the normal direction can be directly determined by (A, B, C), where (A, B, C) is the coordinates of the key point and is normalized to a unit vector.
[0090] Specifically, this embodiment extracts all key points and normal information of the building model surface through the analysis results of point cloud data, which can reduce manual intervention and improve the efficiency of the automated processing flow. In addition, normal information is crucial for calculating lighting effects and directly affects the authenticity of rendering.
[0091] Specifically, the calculation process of the Gaussian scattering function includes:
[0092] The standard deviation of the Gaussian distribution is calculated using a variety of scattering models and algorithms built into the optical simulation software tool; and the Gaussian scattering value of the key point is calculated based on the spatial position of the key point in the three-dimensional grid model through the Gaussian scattering function, and the Gaussian scattering function is:
[0093]
[0094] in, is the standard deviation of the Gaussian distribution, x is the horizontal coordinate of the key point in the three-dimensional mesh model, y is the vertical coordinate of the key point in the three-dimensional mesh model, and z is the vertical coordinate of the key point in the three-dimensional mesh model.
[0095] Specifically, this embodiment calculates the Gaussian scattering function value of the key point to blur the mapping details, retain important structural information in the mapping, highlight the characteristics of the building, reduce mapping noise, and improve mapping quality.
[0096] Specifically, the step of calculating the Gaussian basis element of each building component by using the Gaussian scattering function and the ambient illumination comprises:
[0097] The lighting environment in the building scene is analyzed using computer vision technology to determine the intensity of the incident light, and the Gaussian basis element of each building component is calculated based on the intensity of the incident light, the normal information of the plane where the center point of each building component is located, and the Gaussian scattering function:
[0098]
[0099] in, is the Gaussian basis element of the center point of the i-th building component, is the Gaussian scattering value of the center point of the i-th building component, is the normal of the plane where the center point of the i-th building component is located, is the intensity of the incident light, is the coordinate position of the center point of the i-th building component.
[0100] Specifically, this embodiment calculates the Gaussian basis element of each building component by using the Gaussian scattering function and the ambient illumination, which helps to clearly express the structure and elements of the scene and make the scene more three-dimensional and vivid.
[0101] Specifically, the steps of optimizing the Gaussian primitives of each building component by using the 3D smoothing filter and the 2D Mip technology include:
[0102] The maximum frequency of the key points of the building scene mapped on each axis is determined by the fast Fourier transform algorithm, and the size of the constrained Gaussian primitive is calculated according to the maximum frequency to avoid aliasing of building components in the building scene. The formula for calculating the size of the constrained Gaussian primitive is:
[0103]
[0104] in, The sampling frequencies on the three coordinate axes of the key points are respectively, the texture mapping of the Gaussian primitives of the building components is optimized according to the 2D Mip filter, the texture resolution is selected by using the 2D Mip filter, and the textures between different levels are smoothly transitioned to form Gaussian primitives.
[0105] Specifically, the 2D Mip filter is used to automatically select a suitable texture resolution according to the roughness of the texture surface. A lower resolution means clearer texture details. As the texture details have been smoothed during the 2D Mip process, the continuity of the texture and the visually smooth transition can be maintained even when switching between different mipmap levels.
[0106] Specifically, this embodiment can effectively reduce noise and distortion in a data set by utilizing a 3D smoothing filter, and optimize the texture mapping of the Gaussian primitives of the building component by utilizing a 2D Mip filter, and utilize the 2D Mip filter to select the texture resolution and smoothly transition textures between different levels to form Gaussian primitives to reduce the problems of aliasing, aliasing and dilation of texture mapping.
[0107] See also Figure 3 As shown, the steps of determining the maximum frequency mapped by the key points of the building scene on each axis through fast Fourier transform include:
[0108] Step S410, digitizing the 3D model of the building scene to ensure that each key point has coordinate data;
[0109] Step S420, sampling the frequencies mapped by the key points on each axis according to the sampling theorem to obtain discrete data points;
[0110] Step S430, applying fast Fourier transform to the frequency of the mapping of each key point on the coordinate axis, converting it into the frequency domain for amplitude calculation, the amplitude calculation is:
[0111]
[0112] where X[k] is the kth complex element of the fast Fourier transform, , are the real part and the imaginary part of the key point respectively, the amplitude value is calculated for each key point, the maximum amplitude value and its corresponding frequency are determined, and the frequency is the maximum frequency.
[0113] Specifically, this embodiment determines the maximum frequency mapped by the key points of the building scene on each axis through the fast Fourier transform algorithm, which helps to enhance the useful information of the signal by highlighting the main frequency components, while suppressing the unimportant signal parts.
[0114] Specifically, the steps of constructing a 3D model identical to the building scene based on the optimized Gaussian primitives include:
[0115] The optimized Gaussian primitives containing position, scale and direction parameter information are superimposed, and the superposition formula is:
[0116]
[0117] Wherein, N is the number of Gaussian primitives, V is the volume in space formed by the superposition of Gaussian primitives, and the superimposed Gaussian primitives are overlapped to construct a 3D model.
[0118] Specifically, this embodiment constructs the entire computational domain by stacking the optimized Gaussian primitives together, ensuring that all elements correctly cover the entire area, and processing the overlapping parts to ensure a more accurate approximation of the building model.
[0119] See also Figure 4 As shown, the step of using the Gaussian primitives in the 3D model to render the scene using a rendering algorithm includes:
[0120] Step S610, performing illumination simulation by setting illumination conditions of the building scene to ensure that the illumination matches the properties of the Gaussian primitives;
[0121] Step S620, based on the lighting condition, convert the Gaussian primitives into a 2D pixel grid using rasterization, where the rasterizer converts 3D vertices into pixels in screen space;
[0122] Step S630, performing a depth test and a template test during the rasterization process to determine which pixels are visible;
[0123] Step S640, performing illumination calculation, texture mapping and visual effect detection according to visible pixels, calculating the final color using the output of the fragment shader, and performing a scene rendering operation on each pixel.
[0124] Specifically, this embodiment uses the optimized Gaussian primitives to perform scene rendering using a rendering algorithm to effectively improve rendering efficiency while maintaining rendering quality to generate a realistic building scene.
[0125] Specifically, the steps in the rasterization process to perform depth testing and stencil testing to determine which pixels are visible include:
[0126] Before rendering begins, initialize the depth buffer to store a depth value for each pixel in the scene;
[0127] For each fragment generated during rasterization, calculate its depth value;
[0128] Based on the comparison between the depth value of the fragment and the corresponding depth value in the depth buffer, determine whether the fragment is visible according to the comparison result, if the depth value of the fragment is less than or equal to the value in the depth buffer, retain the fragment, otherwise, discard the fragment;
[0129] For the retained fragments, a stencil test is performed to determine which pixels are visible.
[0130] Specifically, a template test is performed on the retained fragment, and the template test is performed based on a template buffer, which stores information about which pixels should be rendered or discarded. In the template test, the pixels in the retained fragment are compared with the corresponding pixels in the template buffer. If the pixel in the retained fragment is equal to the corresponding pixel in the template buffer, the pixel is considered to be visible and continues to participate in the subsequent rendering process. Otherwise, the pixel is invisible.
[0131] Specifically, before rendering begins, the depth buffer is initialized to determine an initial depth value assigned to each pixel in the scene, and the depth value is usually set to a maximum value.
[0132] Specifically, this embodiment can effectively eliminate hidden surfaces through depth testing, thereby avoiding pixel coverage problems. By eliminating invisible pixels in advance, the workload of subsequent rendering steps can be reduced, thereby improving rendering efficiency.
[0133] Specifically, the steps of coloring each visible pixel to obtain a rendered scene include:
[0134] Executing a shader program through the visible pixels to calculate lighting and material properties;
[0135] Sample color and surface properties from the texture image based on the fragment's texture coordinates;
[0136] Based on the texture mapping and the shader program, a blending mode is applied to the transparent or semi-transparent material to calculate the final color of the visible pixel, and the visible pixel is colored by color value encoding to obtain a rendered scene.
[0137] Specifically, this embodiment performs texture mapping and visual effect detection according to the visible pixels, calculates the final color using the output of the fragment shader, and performs scene rendering operations on each pixel, thereby effectively improving rendering efficiency while maintaining rendering quality.
[0138] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.
[0139] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A three-dimensional construction method for a building scene, characterized in that: include: Convert the building scene into processable point cloud data, analyze the point cloud data, and extract key points and normal information of the building scene based on the analysis results; Taking the key point as the center point, the building scene is captured by holographic projection to obtain a building mapping scene, and based on the key point and the normal information, the building mapping scene is processed by using a Gaussian scattering function to blur mapping details and retain the scene outline in the mapping; According to the center point of each building component in the building scene and the ambient light, and using the Gaussian scattering function and the ambient light, a Gaussian basis element of each building component is calculated, and a continuous three-dimensional space is constructed by mapping the building components in the form of Gaussian distribution through a minimum volume unit, wherein each Gaussian basis element includes parameter information, and the parameter information of each Gaussian basis element satisfies an isoproportional correspondence relationship with the parameter information of the building component; Optimizing the Gaussian primitives of each building component by using a 3D smoothing filter and a 2D Mip technique to eliminate the distorted portion of the Gaussian primitives; Constructing a 3D model identical to the building scene based on the optimized Gaussian primitives; Processing the Gaussian primitives in the 3D model by rasterization to determine which pixels are visible, analyzing the visible pixels, and coloring each visible pixel according to the analysis result to obtain a rendered scene; The step of calculating the Gaussian basis element of each building component by using the Gaussian scattering function and the ambient illumination comprises: The lighting environment in the building scene is analyzed using computer vision technology to determine the intensity of the incident light, and the Gaussian basis element of each building component is calculated based on the intensity of the incident light, the normal information of the plane where the center point of each building component is located, and the Gaussian scattering function: in, is the Gaussian basis element of the center point of the i-th building component, is the Gaussian scattering value of the center point of the i-th building component, is the standard deviation of the Gaussian distribution, is the normal of the plane where the center point of the i-th building component is located, is the intensity of incident light in the lighting environment, is the coordinate position of the center point of the i-th building component; The step of optimizing the Gaussian primitives of each building component by using a 3D smoothing filter and a 2D Mip technique comprises: The maximum frequency of the key points of the building scene mapped on each axis is determined by the fast Fourier transform algorithm, and the size of the constrained Gaussian primitive is calculated according to the maximum frequency to avoid Gaussian primitive aliasing of the building components. The formula for calculating the size of the constrained Gaussian primitive is: in, is the maximum frequency, are the sampling frequencies on the three coordinate axes of the key points, The texture mapping of the Gaussian primitives of the building component is optimized according to the 2D Mip filter, the texture resolution is selected using the 2D Mip filter, and the textures between different levels are smoothly transitioned to form Gaussian primitives.
2. The three-dimensional construction method for architectural scenes according to claim 1, characterized in that: The steps of extracting key points and normal information of the building scene based on the analysis results include: De-noising, filtering and cleaning of point cloud data; According to the processing of the point cloud data, identifying feature points in the point cloud data, the feature points including corner points, edge points or plane areas; Constructing a three-dimensional grid model of the building scene according to the feature points in the point cloud data; Key points are detected according to the three-dimensional grid model, and local plane fitting and normal information are calculated for each key point.
3. The three-dimensional construction method for architectural scenes according to claim 2, characterized in that: The calculation process of the Gaussian scattering function includes: Calculate the standard deviation of a Gaussian distribution using a variety of scattering models and algorithms built into optical simulation software tools ; and according to the spatial position of the key point in the three-dimensional grid model, the Gaussian scattering value of the key point is calculated by the Gaussian scattering function, and the Gaussian scattering function is: in, is the standard deviation of the Gaussian distribution, x is the horizontal coordinate of the key point in the three-dimensional mesh model, y is the vertical coordinate of the key point in the three-dimensional mesh model, and z is the vertical coordinate of the key point in the three-dimensional mesh model.
4. The three-dimensional construction method for architectural scenes according to claim 1, characterized in that: The steps of determining the maximum frequency mapped by the key points of the building scene on each axis through the fast Fourier transform algorithm include: Digitize the 3D model of the building scene to ensure that each key point has coordinate data; According to the sampling theorem, the frequencies mapped by the key points on each axis are sampled to obtain discrete data points; The frequency of the mapping of each key point on the coordinate axis is converted into the frequency domain by fast Fourier transform for amplitude calculation, and the amplitude calculation is: where X[k] is the kth complex element of the fast Fourier transform, , are the real part and the imaginary part of the key point respectively, the amplitude value is calculated for each key point, the maximum amplitude value and its corresponding frequency are determined, and the frequency is the maximum frequency.
5. The three-dimensional construction method for architectural scenes according to claim 4, characterized in that: The step of constructing a 3D model identical to the building scene based on the optimized Gaussian primitives comprises: The optimized Gaussian primitives containing position, scale and direction parameter information are superimposed, and the superposition formula is: Wherein, N is the number of Gaussian primitives, and the superimposed Gaussian primitives are overlapped to construct a 3D model.
6. The three-dimensional construction method for architectural scenes according to claim 5, characterized in that: The step of using the Gaussian primitives in the 3D model to render the scene using a rendering algorithm comprises: Perform lighting simulation by setting the lighting conditions of the building scene to ensure that the lighting matches the properties of the Gaussian primitives; Based on the lighting condition, converting the Gaussian primitives into a 2D pixel grid using a rasterizer, which converts 3D vertices into pixels in screen space; Depth testing and stencil testing are performed during rasterization to determine which pixels are visible; Lighting calculations, texture mapping, and visual effect detection are performed based on visible pixels, the final color is calculated using the output of the fragment shader, and rendering operations are performed on each pixel to obtain a rendered scene.
7. The three-dimensional construction method for architectural scenes according to claim 6, characterized in that: The steps in the rasterization process to perform depth testing and stencil testing to determine which pixels are visible include: Before rendering begins, initialize the depth buffer to store a depth value for each pixel in the scene; For each fragment generated during rasterization, calculate its depth value; Based on the comparison between the depth value of the fragment and the corresponding depth value in the depth buffer, determine whether the fragment is visible according to the comparison result, if the depth value of the fragment is less than or equal to the value in the depth buffer, retain the fragment, otherwise, discard the fragment; For the retained fragments, a stencil test is performed to determine which pixels are visible.
8. The three-dimensional construction method for architectural scenes according to claim 7, characterized in that: The steps to shade each visible pixel to obtain a rendered scene include: Executing a shader program through the visible pixels to calculate lighting and material properties; Sample color and surface properties from the texture image based on the fragment's texture coordinates; Based on the texture mapping and the shader program, a blending mode is applied to the transparent or semi-transparent material to calculate the final color of the visible pixel, and the visible pixel is colored by color value encoding to obtain a rendered scene.
Citation Information
Patent Citations
Method for rapidly constructing three-dimensional architecture scene through real orthophotos
CN101290222A
Contact network three-dimensional reconstruction method based on SIFT and LBP point cloud registration
CN104299260A
Method for synthesizing new view angle of lunar surface based on Gaussian radiation field
CN118469836A