A method for building geometry texture generation based on contour condition bag
Patent Information
- Application Number
- CN202611114188.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-27
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-07-27
AI Technical Summary
[0010]针对现有技术存在的不足,本发明目的是提供一种基于轮廓条件包的建筑几何纹理生成方法,旨在解决建筑几何纹理生成质量差的问题
1.输入约束更充分:本发明将单一footprint扩展为包含高度、道路、用途、屋顶颜色、拓扑关系和置信度的条件包,使生成过程能够利用城市上下文,而不是只根据轮廓形状猜测建筑。
Smart Images

Figure CN122636878B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for generating architectural geometric textures based on contour condition packages, belonging to the fields of 3D city modeling, remote sensing image processing, generative artificial intelligence, and digital twin technology. Background Technology
[0002] Current urban building 3D modeling primarily relies on techniques such as oblique photogrammetry, multi-view image reconstruction, laser point clouds, manual modeling, and rule-based building block generation. While these methods offer high reliability in high-precision projects, they typically require significant data acquisition costs, long production cycles, and substantial manual model retouching. When the target area only has lightweight data such as map outlines, satellite imagery, planning maps, or coarse DSMs, traditional modeling workflows struggle to quickly generate building models with reasonable geometric shapes and visual appeal.
[0003] In recent years, architectural generation methods based on diffusion models, ControlNet, multi-view generation, and 3D generation have begun to generate 3D buildings from 2D maps, architectural footprints, hand-drawn height sketches, or text prompts. Generation methods that take map outlines as input typically convert the architectural outlines into conditional maps, and then obtain the architectural geometry and texture results through three stages: height map generation, geometry reconstruction, and appearance stylization. The advantages of these methods are simple input, fast generation speed, and strong interactivity, making them suitable for planning design and rapid pre-generation of 3D city scenarios.
[0004] However, existing methods for generating architectural geometry and textures from map outlines still have significant shortcomings.
[0005] First, the footprint itself only limits the building's plan area and cannot uniquely determine the building's height, roof type, roof slope, facade style, and surrounding relationship. The same outline may correspond to various reasonable building forms such as a single-story factory, a multi-story residential building, a commercial complex, or a tower. If only the outline is used as a condition, the model is prone to generating visually acceptable buildings that are inconsistent with the actual urban context.
[0006] Second, existing height map generation processes typically lack structured intermediate representations such as ridge lines, eaves lines, roof zoning, and aspect diagrams. While height maps can express changes in roof height, without roof structure constraints, the model may generate continuous but non-conforming curved roofs, resulting in unclear ridges, unstable slopes, non-closed roof zoning, or unreasonable local height abrupt changes.
[0007] Third, existing texture generation stages are prone to misalignment between geometric boundaries and generated textures. Since texture generation models primarily focus on visual style and image quality, when the input contour has large misalignments, narrow notches, or irregular boundaries, the generated texture may cross the boundaries of the real building, resulting in problems such as roof texture drift, facade texture misalignment, and crosstalk between textures of adjacent buildings.
[0008] Fourth, actual map outlines and planned outlines often have problems such as short-side noise, unclosed outlines, narrow notches, repeated points, slight misalignments, and topological self-intersections. If these outlines are directly input into the generated model, the geometric reconstruction error will be amplified, resulting in uneven building edges, local collapses, misfilling of narrow gaps, or broken roof surfaces.
[0009] Fifth, existing methods often lack a verifiable quality loop. When the generated results exhibit height anomalies, roof zoning errors, or texture misalignments, the system typically can only regenerate the entire building or require manual adjustments, making it difficult to perform local regeneration and quality archiving for specific defects. Therefore, there is an urgent need to propose a building geometry texture generation method that expands the map outline into a conditional package including height, roads, usage, roof color, roof structure, and confidence level, and introduces intermediate representation of the roof structure, texture back projection alignment, and a quality loop during the generation process. Summary of the Invention
[0010] To address the shortcomings of existing technologies, the present invention aims to provide a method for generating architectural geometric textures based on contour condition packages, thereby solving the problem of poor quality in architectural geometric texture generation.
[0011] To achieve the above objectives, the present invention provides a method for generating architectural geometric textures based on contour condition packages, comprising: Acquire multi-source spatial data and unify the spatial reference coordinate system and resolution of the multi-source spatial data; perform semantic hierarchical recognition of building outlines based on multi-source spatial data and construct condition packages; encode the condition packages into raster control maps of different scales; Height maps are generated and corrected based on raster control maps of different scales; The height map is split according to semantic layering, geometric modules of blocks are constructed, and the geometric modules corresponding to each sub-block are spliced together to output the initial draft of the building geometry; Extract the set of geometric anchor points from the initial architectural geometry draft, and generate multi-view textures in stages based on the anchor points.
[0012] Furthermore, the steps for generating a raster image are as follows: Acquire multi-source heterogeneous spatial data of the target city, including: building footprints, satellite imagery, road plots, coarse DSM, and planned land use; transform all acquired data into a unified spatial coordinate system; divide the multi-source heterogeneous spatial data into several city tiles according to the actual building or road orientation of the target city, and assign a unique ID index to all building instances within each city tile; Masking and denoising are performed on the coarse DSM data, topological repair is performed on the contours of all footprint polygons, semantic decomposition is performed on the repaired contours, and core fields are extracted to construct a condition package. Calculate the confidence level of the core fields corresponding to each building instance and incorporate it into the constructed condition package; The condition packages corresponding to each building instance are coded into raster maps at 1m and 3m scales; Based on the output modeling of grid control maps at different scales, the modeling includes ridgeline heatmaps, eaves heatmaps, roof zoning maps, and aspect maps, generating an initial height map.
[0013] Furthermore, the steps for extracting the core fields are as follows: Iterate through all building instances in each city tile and extract 6 sets of core fields by module: Layered outline: According to the architectural construction meaning, the footprint polygons corresponding to each building instance are split to obtain the geometric fragments of the main layer, the auxiliary layer, the recessed layer and the noise edge layer, and the vertex coordinate sequence corresponding to each layer is stored. Layered height prior: Extract the elevation data corresponding to the main layer, auxiliary layer and recessed layer from the coarse DSM data of each building instance, arrange the elevation data in ascending order, divide the height range of each layer, and obtain the layered height prior of each building instance. Road parcel context: Calculate the spatial distance constraints from each building instance to its surrounding roads; Land use type: Land parcel planning corresponding to each building instance; Roof color and style: Extract satellite images corresponding to each building instance, calculate the RGB pixel mean of the roof pixels corresponding to each building instance to obtain the roof color; process the roof pixels of each building instance with grayscale gradient operator to extract texture direction; Topological relationships: The positional and directional relationships between each building instance and its adjacent buildings.
[0014] Furthermore, the steps for calculating the confidence level are as follows: Data resolution score: Set the global resolution reference range for multi-source spatial data. Obtain the scale of the footprint polygon corresponding to each building instance, and convert each scale to an equivalent resolution using the equivalent resolution of the mapping scale, and calculate the data resolution score. Field completeness score: Set any core field to be able to be broken down into several sub-attribute items, determine whether all sub-attribute items of the core field are missing, and calculate the field completeness score corresponding to each core field.
[0015] Furthermore, the subsequent steps for calculating the confidence level are as follows: The calculation process of domain consistency score: The maximum a priori height of the main floor corresponding to each building instance is used as the indicator parameter for calculating the domain consistency score; In any city tile, select building A; with the geometric center of building A as the center, define a radius... For a circular area; Within the circular area, buildings with the same land use type as building A are designated as neighboring buildings. The characteristic parameters of each neighboring building are obtained. The straight-line distance from each neighboring building to building A is calculated, expressed as a radius. Using Gaussian spatial weighting as the scale parameter, the spatial weights of each neighboring building are calculated. The average characteristic parameters of the circular area are obtained by weighting the spatial weights of each neighboring building and averaging the characteristic parameters of each neighboring building. Calculate the relative difference between the corresponding indicator parameters of Building A and the average indicator parameters, and then process it with a negative exponential function to obtain the domain consistency score of Building A; Set the weighting of data resolution score, field completeness score, and domain consistency score, and calculate the confidence level of the core fields corresponding to each building instance.
[0016] Furthermore, the steps for generating the initial height map are as follows: Input the 3m medium-scale raster map into the computer model, and generate the ridge line heat map, eaves line heat map, roof zoning map, and slope angle map along the outline of the raster map and the building structure. The generated ridge line heat map, eaves line heat map, roof zoning map, aspect map, and 1m scale grid map are input into the calculation model to generate the height map of the building instance; based on the zoning location of the roof zoning map, in the initial height map, a 9×9 scanning window is used to filter the pixel value with the largest elevation within the scanning window and extract the elevation extreme value line; In the initial height map, the Sobel operator is used to calculate the horizontal and vertical height change magnitudes of the initial height map, and a comparison threshold for gradient magnitudes is set to extract the height gradient boundary lines at the intersection of different partitions. Peak pixels are extracted sequentially from the ridge heatmap and connected to form a ridge vector line; boundary lines between different blocks are extracted from the roof zoning map; the bidirectional Chamfer distance algorithm is used to calculate the similarity between the elevation extreme line and the ridge vector line, as well as the height gradient boundary line and the boundary line within the same region, and the network parameters in the computer model are adjusted to correct the deviation of the height map. The height map is split according to semantic layering, the geometric modules of each sub-block are constructed, and the geometric modules corresponding to each sub-block are spliced together to output the initial draft of the building geometry.
[0017] Furthermore, the steps for constructing the initial architectural geometry draft are as follows: The heightmap is divided into three sub-blocks: main, subordinate, and recessed. Based on the different partition height values provided by the heightmap, the geometric module of each sub-block is constructed: Main sub-block: Based on the roof zoning map, on the roof defined by the ridge line heat map and aspect map, a flat slope is fitted for each roof section as the roof. Extend vertically upwards from the ground along the outer contour of the main building until it reaches the height of the eaves, generating four vertical exterior walls to obtain a three-dimensional block of the main building consisting of the roof and four walls. Sub-blocks: Based on the zoning of the roof zoning diagram and the outline of the sub-layers defined by the eaves heat map, construct the roof and walls corresponding to the sub-layers at the corresponding sub-layer positions of the main building blocks; Recessed sub-block: Based on the recessed outline in the eaves heatmap, a concave cavity is generated at the corresponding position of the main layer geometric module and the auxiliary layer geometric module. The geometric modules corresponding to each sub-block are spliced together to output the initial draft of the architectural geometry.
[0018] Furthermore, the splicing steps for the corresponding geometric modules of each sub-block are as follows: Using the geometric module corresponding to the main layer as the parent module and the geometric module corresponding to the auxiliary layer as the child module, set the standard normalized normal distance from the center point of the wall surface to be spliced in the child module to the spliced wall surface of the parent module. ; Define the two-dimensional planar splicing loss With 3D stitching loss ; Phased adjustments Train a 3D object detection model according to the corresponding weights; Phase a: Will The weights are set to zero, and the 3D object detection model learns the splicing rules of the sub-modules. Stage b: Increase The weights are determined based on the two-dimensional planar stitching loss. Based on the calculation results, the splicing positions of the sub-modules are adjusted so that the actual normalized normal distance from the center point of the sub-module to be spliced wall surface to the parent module's spliced wall surface, as continuously output by the model, falls within the interval [range missing]. Inside, the initial draft of the architectural geometry was obtained.
[0019] Furthermore, the steps for generating architectural geometric textures are as follows: From the initial architectural geometry draft, fixed feature points are extracted as geometric anchor points. Using these anchor points as alignment references, multi-view textures are generated in stages to obtain a complete architectural geometry model. Determine the view orientation and establish the three-dimensional coordinates of the initial architectural geometry draft and each view. Figure 2 The projection transformation relationship of pixel coordinates in a 3D textured canvas; The generation of all lines within the same canvas is restricted to passing through geometric anchor points. Structural lines are generated based on existing geometric anchor points on each canvas. Both ends or inflection points of each structural line segment must be aligned with the corresponding anchor point pixels; Obtain the roof zoning diagram and condition package corresponding to each building instance. Based on the corresponding positions of the main layer, auxiliary layer and recessed layer in the roof zoning diagram, add zoning labels to each closed block divided by the structural lines in the canvas. Extract the colors of each area in the building from the condition package, and fill in the corresponding colors in the closed blocks divided by the structural lines; Extract the textures corresponding to each area of the building from the condition package, match the texture details according to the block type, unify the texture direction, density and scaling of each block, and then add local details in turn.
[0020] Compared with the prior art, the beneficial effects of the present invention are: 1. More comprehensive input constraints: This invention expands a single footprint into a conditional package that includes height, roads, usage, roof color, topological relationships, and confidence levels, enabling the generation process to utilize urban context rather than simply guessing the building based on its outline shape.
[0021] 2. Roof geometry is more in line with building structure: This invention introduces ridge line, eaves line, roof zoning and aspect diagram before the height map is generated, which can reduce the problems of roof curvature, ambiguity of ridge, incorrect aspect and non-closed roof zoning.
[0022] 3. Higher texture and geometry fit: This invention adds a rendering back projection alignment mechanism in the texture stage, using geometric boundaries to constrain texture edges, which can reduce the risk of textures crossing building boundaries, misaligned facade textures, and color jumps in multiple views.
[0023] 4. More robust to irregular contours: This invention performs topological cleaning on the footprint and uses sub-block processing for slender notches, inner courtyards and complex local areas, which can prevent contour noise from being directly amplified into geometric collapse.
[0024] 5. Possesses a closed-loop engineering quality system: This invention enables the location and repair of height errors, roof structure errors, and texture misalignments through quality scoring and local regeneration mechanisms, reducing the cost of overall regeneration and manual model repair.
[0025] 6. Verifiable output results: The present invention retains conditions including fields, confidence levels, roof structure candidates, texture alignment errors, and local regeneration logs, which facilitates quality tracking and subsequent refinement of the digital twin platform in large-scale modeling production. Attached Figure Description
[0026] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a schematic diagram of the architectural geometric texture generation method of the present invention; Figure 2 This is a schematic diagram of the contour condition package construction of the present invention. Detailed Implementation
[0027] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0028] Please see Figure 1 and Figure 2 A method for generating architectural geometry textures based on contour condition packages includes: Step S1: Semantic preprocessing of multi-source data and construction of contour condition packages; Acquire multi-source spatial data, including: building footprints, satellite imagery, road parcels, coarse DSM, and planned land use; unify the spatial reference coordinate system and resolution of the multi-source spatial data, divide the city into tiles, and establish a building instance index for each tile; perform basic topology verification, and then perform semantic layer recognition on the building outlines, splitting the building outlines into four semantic layers: main layer, auxiliary layer, recessed layer, and noise edge layer; construct seven semantic condition packages including: layered outlines, height prior, road context, land use type, roof style, topological relationship, and dynamic confidence; dynamically calculate the confidence corresponding to each field according to data precision and neighborhood consistency, and encode the condition packages into raster control maps of different scales; Acquire multi-source heterogeneous spatial data of the target city, including: building footprints, satellite imagery, road plots, rough DSM, and planned land use; transform all acquired data into a unified spatial coordinate system; divide the multi-source heterogeneous spatial data into several city tiles according to the actual building or road orientation of the target city, and then assign a unique ID index to all building instances within each city tile; It should be noted that, in this invention, "target city" refers to the city in which architectural geometric textures are generated using this invention.
[0029] Height quantile filtering and morphological erosion dilation filtering were used to mask and denoise the coarse DSM data in the multi-source heterogeneous spatial data. Then, ArcGIS tools were used to perform topological repair on the outlines of all footprint polygons in the multi-source heterogeneous spatial data for each building, namely: closure repair, self-intersection detection, duplicate point deletion, and short-side noise filtering. During filtering, the main corners and long side directions were preserved to avoid accidentally deleting real recesses, courtyards, or corridors. The repaired outlines were semantically decomposed to obtain four semantic layers: main layer, auxiliary layer, recessed layer, and noise edge layer. The specific processing steps are as follows: Iterate through all building instances in each city tile, extracting 6 sets of core fields in modules; bind each building instance's core field to its unique ID index, generating six types of condition packages: Core field one, hierarchical outline: Based on the architectural structural meaning, the footprint polygons corresponding to each building instance are split into four independent geometric segments: main layer, auxiliary layer, recessed layer, and noise edge layer. The vertex coordinate sequence corresponding to each layer is then stored. Main body layer: The main body of the building, corresponding to the main outline of the building; Subsidiary layers refer to the secondary structural outlines that are attached to the main building and extend outwards. Recessed areas refer to inward-recessed areas inside a building, corresponding to open openings such as wells, light wells, and underground parking garages within the building. Noise edge layer representation: Non-main layer, auxiliary layer and recessed layer in the building footprint polygon, and parts that have no actual architectural structural significance. These parts do not participate in geometric reconstruction, but are only used for smoothing correction of the building outline in the later stage. It should be noted that the vertex coordinate sequence represents an ordered set of two-dimensional coordinate points arranged counterclockwise along the outer ring and clockwise along the inner ring of the building footprint polygon. The specific extraction process for the core field one, the layered contour, is as follows: Extract the outer and inner ring outlines of the footprint polygon corresponding to a single building instance. Take the main polygon of the outer ring outline as the main layer, the extended polygon connected to the main body and with an area smaller than the main polygon as the auxiliary layer, and the inner ring outline in the footprint polygon and the open concave area on the outer ring outline as the recessed layer. The non-main layer, auxiliary layer, and recessed layer in the footprint polygon, and the parts that have no actual architectural significance, are designated as noise edge layers. The morphological feature parameters of the main layer, the auxiliary layer and the concave layer are calculated separately using a polygon encoding network. PolyCNN or Polygon Transformer are preferred polygon encoding networks. The morphological characteristic parameters of the main layer, the auxiliary layer and the recessed layer include: the projected area of the polygon corresponding to each layer, the length and width of the minimum bounding rectangle of the polygon corresponding to each layer and the aspect ratio, the concavity and convexity coefficient of the polygon corresponding to each layer, the main axis direction of the polygon outline of each layer and the coordinates of all concave inflection points or slender notches greater than 180° on the polygon outline of each layer. It should be noted that the convexity coefficient of each layer is calculated by dividing the convex hull area of the corresponding polygon of each layer by the area of each layer. For each building instance, a blank pixel grid is created for the corresponding city tile. The polygons of the main layer, auxiliary layer and recessed layer of each building instance in the city tile are projected into the pixel grid. The outline edges of the pixels inside the polygons of each layer are filled into the pixel grid to generate the layered binary outline Mask and signed distance field SDF of each building instance. Among them, each layer has a set of data for the contour morphology parameters; the signed distance field SDF and the binary contour mask only exist in the main layer, the auxiliary layer and the recessed layer, and not in the noise edge layer. Core field two, layer height prior: Extract coarse DSM data of each building instance from multi-source spatial data, and then extract the elevation data of the main floor, auxiliary floor and recessed floor of each building instance from the coarse DSM data of each building instance. Arrange the elevation data of each floor of each building instance in ascending order from small to large, and divide the height range of each building in each floor with 5% and 95% as quantiles to obtain the prior height of each building instance. Core field three: Road parcel context: Calculate the minimum setback distance from each building instance to its surrounding roads, determine the location of each building instance within its corresponding plot and the positional relationship between the building and its surrounding roads, as well as other plot areas that intersect with the plot where each building instance is located, as spatial distance constraints for each building instance. Core Field 4, Land Use Type: Determine the land use plan corresponding to each building instance based on the planned land use of each building instance; The fifth core field is the roof color and style; Satellite images corresponding to each building instance are extracted from multi-source spatial data. The satellite images are preprocessed with filtering and image enhancement. Roof pixels corresponding to each building instance are extracted from the preprocessed satellite images. The RGB pixel mean of the roof pixels corresponding to each building instance is calculated to obtain the main color tone of the roof of each building instance. Then, the roof pixels of each building instance are processed with grayscale gradient operators to extract the roof texture direction. Core field six: Topological relationship: The positional and directional relationships between each building instance and its adjacent buildings, roads, or plots of land; The scores for the core fields corresponding to each building instance are calculated based on data resolution, field completeness, and domain consistency. The calculation process of data resolution score: Set the global resolution reference range for multi-source spatial data. Obtain the scale of the footprint polygons corresponding to each building instance, and convert each scale to an equivalent resolution using the equivalent resolution of the mapping scale. Let the equivalent resolution be... ; Data resolution score : ; like Greater than ,but The value is zero; if Less than ,but The value is one.
[0030] The calculation process for field completeness score: Set any core field to be able to be broken down into several sub-attribute items, determine whether all sub-attribute items of the core field are missing, and calculate the field completeness score corresponding to each core field. Suppose a certain core field It can be broken down into m sub-attribute items, defining a binary tag. ; Represents core fields The score corresponding to the i-th sub-attribute item; If core fields If the corresponding i-th sub-attribute item exists, then The value is one; If core fields If the corresponding i-th sub-attribute item is missing, then The value is zero; Core fields Field completeness score for: .
[0031] The calculation process of domain consistency score: The maximum a priori height of the main floor corresponding to each building instance is used as the indicator parameter for calculating the domain consistency score; In any city tile, randomly select a building, designated as Building A; with the geometric center of Building A as the center, define a circle with a radius of... A circular region with a radius of The preferred size is 200 meters, but users or relevant technicians can adjust the radius according to actual needs. Size; Within the circular area, buildings with the same land use type as building A are designated as neighboring buildings. The characteristic parameters of each neighboring building are obtained. The straight-line distance from each neighboring building to building A is calculated, expressed as a radius. Using Gaussian spatial weighting as the scale parameter, the spatial weights of each neighboring building are calculated. The average characteristic parameters of the circular area are obtained by weighting the spatial weights of each neighboring building and averaging the characteristic parameters of each neighboring building. The relative difference between the characteristic parameters corresponding to Building A and the average characteristic parameters is calculated, and then processed using a negative exponential function to obtain the domain consistency score of Building A. : ;in, Indicates the characteristic parameters of building A. This represents the average characteristic parameter of the circular area corresponding to building A; It should be noted that the data resolution score and domain consistency score are shared by all core fields for each building instance, meaning that all six types of core fields have the same data resolution score and domain consistency score; however, the field completeness score is unique to each core field for each building instance, meaning that the six types of core fields have different field completeness scores.
[0032] Set the weighting of data resolution score, field completeness score, and domain consistency score, calculate the confidence level of the core fields for each building instance, and store them in an array. In this context, it is considered the seventh type of condition package.
[0033] It should be noted that when setting the weighting of data resolution score, field completeness score, and domain consistency score, the weighting order is: data resolution score weighting > field completeness score weighting > domain consistency score weighting. The weighting values for data resolution score, field completeness score, and domain consistency score are all within the range of 0 to 1, and the sum of these weighting values is 1. The optimal weighting for data resolution score is 0.40 to 0.55. The optimal weighting for field completeness score is 0.30 to 0.40. The optimal weighting for the field completeness score is 0.10 to 0.30.
[0034] The condition package corresponding to each building instance is coded into a raster map at 1m and 3m scales.
[0035] Step S2: Roof geometry constraint generation and building geometry generation; Based on the output modeling of grid control maps at different scales, ridge line heat maps, eaves line heat maps, roof zoning maps, and aspect maps are generated, and then an initial height map is generated. The elevation extreme value lines and height gradient boundary lines are extracted from the initial height map, and the height map is corrected based on the ridge line heat map, eaves line heat map, and roof zoning map. The height map is divided into three types of sub-blocks: main, auxiliary, and recessed, based on semantic layering. Geometric modules are constructed for each sub-block, and the corresponding geometric modules of each sub-block are spliced together to output the initial draft of the architectural geometry. A 3m medium-scale raster map is input into the computer model. Following the contour of the raster map and the building structure, heat maps of the ridge line, eaves line, roof zoning, and slope angle are generated. The computer model is preferably a deep learning model such as multi-branch U-Net, ControlNet, or Stable Diffusion UNet. The process of generating the eaves heat map: Traverse all contour lines in the raster image, retain the contour lines corresponding to the main layer and the sub-layer of the core field, and delete the contour lines of the recessed layer; convert all retained contour lines into vector raster. The pixel containing the outline is assigned a value of 1. The value of the pixels perpendicular to the outline and moving towards the inside of the building wall or the sides of the roof decreases from 1 to 0. The value decreases as the distance from the outline increases. The process of generating the roof zoning diagram: Based on the position of the main layer, the sub-layer, and the recessed layer corresponding to the core field, different numeric labels are assigned to the main layer, the sub-layer, and the recessed layer. These numeric labels are global numeric labels and are only used for differentiation, without any other special requirements. Fill in the corresponding number labels for the main layer, the auxiliary layer, and the recessed layer in the pixel positions to represent the semantic partitioning of the building; The process of generating a roof ridge heat map: The building is divided into main floor area, auxiliary floor area and recessed floor area by numerical labels based on the roof zoning map; Calculate the geometric centerlines of the closed contours corresponding to the main layer region, the auxiliary layer region, and the recessed layer region in sequence. Obtain the elevations of all points on the centerlines in each region. Select the line segment with the highest and continuous elevation on the centerline as the ridge line. Perform attenuation diffusion on the selected ridge line. The pixel value on the ridge line is assigned a value of 1, and the pixel value spreading to the left and right sides of the roof gradually decreases from 1 until it becomes 0; The process of generating the aspect angle diagram: Obtain the DSM data corresponding to each building, and use the terrain gradient algorithm to calculate the slope orientation of each area pixel by pixel based on the corresponding areas of the main floor, auxiliary floor and recessed floor as defined by the roof zoning map. The generated ridge line heat map, eaves line heat map, roof zoning map, aspect map, and 1m scale grid map are input into the computational model to generate the height map of the building instance; the computer model is preferably a deep learning model such as multi-branch U-Net, ControlNet, or Stable Diffusion UNet. Extract elevation extreme value lines and elevation gradient boundary lines from the initial elevation map, and compare them with the ridge line heat map, eaves line heat map, and roof zoning map to correct the roof structure; Based on the partition location of the roof partition map, in the initial height map, a 9×9 scanning window is used to filter the pixel value with the largest elevation within the scanning window. The pixels with the largest elevation at the same partition location in the initial height map are connected to obtain the elevation extreme value line. In the initial height map, the Sobel operator is used to calculate the horizontal and vertical height change magnitudes of the initial height map to obtain the gradient magnitude map of the initial height map; a comparison threshold for gradient magnitude is set, and pixels with gradient magnitudes greater than the threshold are retained. The retained pixel values are connected into line segments, and the longest and continuous line segment at the intersection of different partitions is selected as the height gradient boundary line. Peak pixels are extracted sequentially from the ridge heatmap and connected to form a ridge vector line; boundary lines between different blocks are extracted from the roof zoning map; the bidirectional Chamfer distance algorithm is used to calculate the similarity between the elevation extremum line and the ridge vector line, as well as the height gradient boundary line and the boundary line within the same region, in turn; the network parameters in the computer model are adjusted so that the deviations between the elevation extremum line and the ridge vector line at the same location in the height map generated by the computer model, as well as the deviations between the height gradient boundary line and the boundary line at the same location, are all within the preset deviation range; It should be noted that during the height map generation process, the model prioritizes processing raster maps encoded by high-confidence conditional packets.
[0036] Based on the semantic layering corresponding to core field one, the height map is divided into three types of sub-blocks: main, subordinate, and recessed. Based on the different partition height values provided by the height map, the geometric module of each sub-block is constructed: Main sub-block: Based on the roof zoning map, on the roof defined by the ridge line heat map and aspect map, a flat slope is fitted for each roof section as the roof. Extend vertically upwards from the ground along the outer contour of the main building until it reaches the height of the eaves, generating four vertical exterior walls to obtain a three-dimensional block of the main building consisting of the roof and four walls. Sub-blocks: Based on the zoning of the roof zoning diagram and the outline of the sub-layers defined by the eaves heat map, construct the roof and walls corresponding to the sub-layers at the locations of the sub-layers corresponding to the main building blocks; Recessed sub-block: Based on the recessed outline in the eaves heatmap, a concave cavity is generated at the corresponding position of the main layer geometric module and the auxiliary layer geometric module. The geometric modules corresponding to each sub-block are spliced together to eliminate splicing gaps and output the initial architectural geometry draft: Using the geometric module corresponding to the main layer as the parent module and the geometric module corresponding to the auxiliary layer as the child module, set the standard normalized normal distance from the center point of the wall surface to be spliced in the child module to the spliced wall surface of the parent module. ; Define the two-dimensional planar splicing loss : ; in, This represents the normalized normal distance from the center point of the wall surface to be spliced in the submodule to the spliced wall surface of the parent module when the submodule is spliced to the parent module. Sets the area within the parent module where child modules are allowed to be joined, and defines the maximum number of child modules that the parent module is allowed to join. ; Define the standard length of the child module's bounding box when the parent module allows splicing. and standard width ; Define the standard reserved distance between submodules ; Define the 3D stitching loss : ; in, Indicates quantity loss, ;in, Indicates the number of submodules; Indicates positional loss. ;in, This indicates the standard two-dimensional plane center coordinates of the child module's bounding box on the s-th wall of the parent module when splicing is allowed; sf represents the number of walls in the parent module that allow splicing of child modules. Represents the two-dimensional plane center coordinates of the bounding box of the j-th child module on the s-th wall of the parent module; Indicates dimensional loss. ;in, and , where represent the length and width of the bounding box of the j-th submodule, respectively; Indicates distance loss. ;in, Indicates the distance between two adjacent submodules; , in order to represent The weighting coefficients, The value range is from 0 to 1, and The sum of is 1; Define the two-dimensional planar splicing loss Weighting coefficients ,Will As an additional loss, it is added to the loss function of the 3D object detection model. The parent and child modules are concatenated using the 3D object detection model. The preferred 3D object detection models are the 3D YOLOv8 model, the YOLO-3D model, and the Voxel YOLO model. Phased adjustments The size of the target is used to train a 3D object detection model; Phase a: Will Set the value to zero or a very small number, such as The 3D object detection model learns the splicing rules of the sub-modules, that is, the model output tends to stabilize. Phase b: Gradually increasing The value of , after the model completes the learning of the splicing rules, is based on the two-dimensional planar splicing loss. Based on the calculation results, the splicing positions of the sub-modules are adjusted so that the actual normalized normal distance from the center point of the sub-module to be spliced wall surface to the parent module's spliced wall surface, as continuously output by the model, falls within the interval [range missing]. Inside, the initial draft of the architectural geometry was obtained.
[0037] Step 3: Generation and optimization of architectural geometry and quality self-inspection: Extract the set of geometric anchor points from the initial architectural geometry draft, use the anchor points as alignment references, generate multi-view textures in stages to obtain a complete architectural geometry model; Fixed feature points are extracted from the initial architectural geometry draft and used as geometric anchor points. These fixed feature points can be roof ridge endpoints, eaves corners, facade corners, and vertices where different blocks are joined. Using these geometric anchor points as alignment references, multi-view textures are generated in stages to obtain a complete architectural geometry model. Determine the view orientation, such as top view, side view, and oblique view; based on the view orientation, establish the three-dimensional coordinates of the initial architectural geometry draft and each view. Figure 2 The projection transformation relationship of pixel coordinates in a 3D textured canvas; Two-dimensional textured canvas representation: a flat, blank image used to represent the colors and textures of architectural structures such as roofs, walls, windows, and balconies; The system restricts all line generation within the same canvas to pass through geometric anchor points. Based on the existing geometric anchor points on each canvas, four types of structural lines are generated: ridge watershed line, eaves outline line, facade corner dividing line, and roof block dividing line. Both ends or inflection points of each structural line segment must be aligned with the corresponding anchor point pixels; Obtain the roof zoning map and condition package corresponding to each building instance, and fill the corresponding positions of the main layer, auxiliary layer and recessed layer areas on the canvas with the roof texture and color. The specific process is as follows; Based on the corresponding positions of the main layer, auxiliary layer, and recessed layer in the roof zoning diagram, add zoning labels to each closed block divided by the structural lines in the canvas: main, auxiliary, and recessed. Extract the colors of each area in the building from the condition package, and fill in the corresponding colors in any closed block divided by the structural lines, strictly using the structural lines as the dividing boundary, and there should be no color overflow across blocks; Extract the textures corresponding to each area of the building from the condition package, match the texture details according to the block type, unify the texture direction, density and scaling of each block, and then add local details in turn to obtain the building geometric model; local details include but are not limited to corner decorations, doors and windows, and balconies.
[0038] Adjust the texture and color of the building geometry to eliminate color jumps in multiple views, and introduce a defect gene library and matching mechanism to construct a multi-dimensional quality assessment system for building geometry. Extract the defect features of low-quality building geometry and match them with the defect gene library, call the corresponding adjustment strategy to perform local correction, and re-evaluate its quality after correction; establish a full-link data traceability and archiving mechanism for core results such as geometry, texture, and quality heatmaps to adapt to the calling needs of different scenarios such as digital twin platforms, planning displays, and mobile browsing.
[0039] The above formulas are all dimensionless calculations. The formulas are derived from software simulations using a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation. For example, there are weighting coefficients and proportional coefficients. The values set are to quantify each parameter to obtain a specific value, which is convenient for subsequent comparison. The values of the weighting coefficients and proportional coefficients are only required to not affect the proportional relationship between the parameters and the quantified values.
[0040] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for generating architectural geometric textures based on contour condition packages, characterized in that, The generation methods include: Acquire multi-source spatial data and unify the spatial reference coordinate system and resolution of the multi-source spatial data; perform semantic hierarchical recognition of building outlines based on multi-source spatial data and construct condition packages; encode the condition packages into raster control maps of different scales; Generate height maps based on grid control maps of different scales; The height map is split according to semantic layering, geometric modules of blocks are constructed, and the geometric modules corresponding to each sub-block are spliced together to output the initial draft of the building geometry; Extract the set of geometric anchor points from the initial architectural geometry draft, and generate multi-view textures in stages based on the anchor points; The steps for generating a raster image are as follows: Acquire multi-source heterogeneous spatial data of the target city, including: building footprints, satellite imagery, road plots, coarse DSM, and planned land use; transform all acquired data into a unified spatial coordinate system; divide the multi-source heterogeneous spatial data into several city tiles according to the actual building or road orientation of the target city, and assign a unique ID index to all building instances within each city tile; Masking and denoising are performed on the coarse DSM data, topological repair is performed on the contours of all footprint polygons, semantic decomposition is performed on the repaired contours, and core fields are extracted to construct a condition package. Calculate the confidence level of the core fields corresponding to each building instance and incorporate it into the constructed condition package; The condition packages corresponding to each building instance are coded into raster maps at 1m and 3m scales; Based on the output modeling of grid control maps at different scales, the modeling includes ridgeline heatmaps, eaves heatmaps, roof zoning maps, and aspect maps, generating an initial height map.
2. The method for generating architectural geometric textures based on contour condition packages according to claim 1, characterized in that, The steps for extracting the core fields are as follows: Iterate through all building instances in each city tile and extract core fields by module: Layered outline: According to the architectural construction meaning, the footprint polygons corresponding to each building instance are split to obtain the geometric fragments of the main layer, the auxiliary layer, the recessed layer and the noise edge layer, and the vertex coordinate sequence corresponding to each layer is stored. Layered height prior: Extract the elevation data corresponding to the main layer, auxiliary layer and recessed layer from the coarse DSM data of each building instance, arrange the elevation data in ascending order, divide the height range of each layer, and obtain the layered height prior of each building instance. Road parcel context: Calculate the spatial distance constraints from each building instance to its surrounding roads; Land use type: Land parcel planning corresponding to each building instance; Roof color and style: Extract satellite images corresponding to each building instance, calculate the RGB pixel mean of the roof pixels corresponding to each building instance to obtain the roof color; process the roof pixels of each building instance with grayscale gradient operator to extract texture direction; Topological relationships: The positional and directional relationships between each building instance and its adjacent buildings.
3. The method for generating architectural geometric textures based on contour condition packages according to claim 1, characterized in that, The steps for calculating the confidence level are as follows: Set the global resolution reference range for multi-source spatial data. Obtain the scale of the footprint polygon corresponding to each building instance, and convert each scale to an equivalent resolution using the equivalent resolution of the mapping scale, and calculate the data resolution score. Set any core field to be able to be broken down into several sub-attribute items, determine whether all sub-attribute items of the core field are missing, and calculate the field completeness score corresponding to each core field.
4. The method for generating architectural geometric textures based on contour condition packages according to claim 3, characterized in that, Confidence calculation also includes: The maximum a priori height of the main floor corresponding to each building instance is used as the indicator parameter for calculating the domain consistency score; In any city tile, select building A; with the geometric center of building A as the center, define a circle with a radius of... A circular area; Within the circular area, buildings with the same land use type as building A are designated as neighboring buildings. The characteristic parameters of each neighboring building are obtained. The straight-line distance from each neighboring building to building A is calculated, expressed as a radius. Using Gaussian spatial weighting as the scale parameter, the spatial weights of each neighboring building are calculated. The average characteristic parameters of the circular area are obtained by weighting the spatial weights of each neighboring building and averaging the characteristic parameters of each neighboring building. Calculate the relative difference between the corresponding indicator parameters of Building A and the average indicator parameters, and then process it with a negative exponential function to obtain the domain consistency score of Building A; Set the weighting of data resolution score, field completeness score, and domain consistency score, and calculate the confidence level of the core fields corresponding to each building instance.
5. The method for generating architectural geometric textures based on contour condition packages according to claim 1, characterized in that, The steps for generating the initial height map are as follows: Input the 3m medium-scale raster map into the computer model, and generate the ridge line heat map, eaves line heat map, roof zoning map, and slope angle map along the outline of the raster map and the building structure. The generated ridge line heat map, eaves line heat map, roof zoning map, aspect map, and 1m scale raster map are input into the calculation model to generate the height map of the building instance; based on the zoning location of the roof zoning map, a scanning window is set in the initial height map, and the pixel value with the largest elevation within the scanning window is filtered to extract the elevation extreme value line; In the initial height map, calculate the horizontal and vertical height change amplitudes of the initial height map, set a comparison threshold for gradient amplitude, and extract the height gradient boundary lines at the intersection of different partitions. From the ridge heatmap, peak pixels are extracted and connected to form ridge vector lines; from the roof zoning map, boundary lines between different blocks are extracted; the bidirectional Chamfer distance algorithm is used to calculate the similarity between the elevation extreme lines and the ridge vector lines, as well as the height gradient boundary lines and boundary lines within the same region, and the network parameters in the computer model are adjusted to correct the deviation of the height map. The height map is split according to semantic layering, the geometric modules of each sub-block are constructed, and the geometric modules corresponding to each sub-block are spliced together to output the initial draft of the building geometry.
6. The method for generating architectural geometric textures based on contour condition packages according to claim 5, characterized in that, The steps for creating the initial architectural geometry draft are as follows: The heightmap is divided into three sub-blocks: main, subordinate, and recessed. Based on the different partition height values provided by the heightmap, the geometric module of each sub-block is constructed: Main sub-block: Based on the roof zoning map, on the roof defined by the ridge line heat map and aspect map, a flat slope is fitted for each roof section as the roof. Along the outer contour of the main building, extend vertically upwards from the ground until it reaches the height of the eaves, generating four vertical exterior walls to obtain the three-dimensional block of the main building. Sub-blocks: Based on the zoning of the roof zoning diagram and the outline of the sub-layers defined by the eaves heat map, construct the roof and walls corresponding to the sub-layers at the positions of the sub-layers in the main building blocks; Recessed sub-block: Based on the recessed outline in the eaves heatmap, a concave cavity is generated at the corresponding position of the main layer geometric module and the auxiliary layer geometric module. The geometric modules corresponding to each sub-block are spliced together to output the initial draft of the architectural geometry.
7. The method for generating architectural geometric textures based on contour condition packages according to claim 6, characterized in that, The steps for assembling the geometric modules corresponding to each sub-block are as follows: Using the geometric module corresponding to the main layer as the parent module and the geometric module corresponding to the auxiliary layer as the child module, set the standard normalized normal distance from the center point of the wall surface to be spliced in the child module to the spliced wall surface of the parent module. ; Define the two-dimensional planar splicing loss With 3D stitching loss ; Phased adjustments Train a 3D object detection model according to the corresponding weights; Phase a: will The weights are set to zero, and the 3D object detection model learns the splicing rules of the sub-modules. Stage b: Increase The weights are determined based on the two-dimensional planar stitching loss. Based on the calculation results, adjust the splicing position of the sub-modules so that the actual normalized normal distance from the center point of the sub-module to be spliced wall surface to the spliced wall surface of the parent module in the model output reaches the specified value. This yielded the initial draft of the architectural geometry.
8. The method for generating architectural geometric textures based on contour condition packages according to claim 1, characterized in that, The steps for generating architectural geometric textures are as follows: From the initial architectural geometry draft, fixed feature points are extracted as geometric anchor points. Using these anchor points as alignment references, multi-view textures are generated in stages to obtain a complete architectural geometry model. Determine the view orientation and establish the projection transformation relationship between the three-dimensional coordinates of the initial architectural geometry draft and the pixel coordinates of the two-dimensional texture canvas of each view; The generation of all lines within the same canvas is restricted to passing through geometric anchor points. Structural lines are generated based on existing geometric anchor points on each canvas. The two ends or inflection points of each structural line segment are aligned with the corresponding anchor point pixels; Obtain the roof zoning diagram and condition package corresponding to each building instance. Based on the corresponding positions of the main layer, auxiliary layer and recessed layer in the roof zoning diagram, add zoning labels to each closed block divided by the structural lines in the canvas. Extract the colors of each area in the building from the condition package, and fill in the corresponding colors in the closed blocks divided by the structural lines; Extract the textures corresponding to each area of the building from the condition package, match the texture details according to the block type, unify the texture direction, density and scaling of each block, and supplement the local details in turn.
Citation Information
Patent Citations
Progressive multi-level detail monomer reconstruction method for live-action three-dimensional building model
CN119251414A
Building three-dimensional model construction method and system, intelligent terminal and storage medium
CN120374889A