Building modeling method and device, electronic equipment, storage medium and computer program product

By guiding users to move their devices to areas where the image sensor can fully capture images, and determining building heights based on sensor parameters, the problem of remote sensing data being affected is solved, resulting in more accurate building model rendering.

CN121937658APending Publication Date: 2026-04-28CHINA MOBILE SHANGHAI ICT CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE SHANGHAI ICT CO LTD
Filing Date
2024-10-28
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Remote sensing data is easily affected by factors such as weather, lighting, shooting height, and obstructions, which can lead to inaccurate building models.

Method used

The system outputs information to guide the user to move the terminal to an area that the image sensor can fully image, determines the building height based on sensor parameters, and renders the model.

Benefits of technology

It improves the accuracy of building models, reduces the impact of obstructions on height acquisition, lowers acquisition costs, and simplifies the modeling process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121937658A_ABST
    Figure CN121937658A_ABST
Patent Text Reader

Abstract

The invention discloses a building modeling method and device, electronic equipment, a storage medium and a computer program product, and the method comprises the steps: outputting first information; the first information is used for guiding a user to move a first terminal to a first area; the first area represents an area where the first terminal is located under the condition that an image sensor of the first terminal can perform complete imaging on the first building; determining a first height of the first building based on second information; the second information represents sensing parameters of one or more sensors in the first terminal when the first terminal is located in the first area; and rendering a model of the first building based on the first height of the first building.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information processing technology, and in particular to a building modeling method, apparatus, electronic device, storage medium, and computer program product. Background Technology

[0002] In related technologies, the height of a building is determined based on remote sensing data, and a building model is generated on this basis. However, remote sensing data is easily affected by factors such as weather, lighting, shooting height, and obstructions, resulting in an inaccurate building model. Summary of the Invention

[0003] To address the related technical issues, embodiments of this application provide a building modeling method, apparatus, electronic device, storage medium, and computer program product.

[0004] The technical solution of this application embodiment is implemented as follows:

[0005] This application provides a building modeling method, the method comprising:

[0006] Output first information; the first information is used to guide the user to move the first terminal to the first area; the first area represents the area where the first terminal is located when the image sensor of the first terminal can fully image the first building;

[0007] Based on the second information, the first height of the first building is determined; the second information represents the sensing parameters of one or more sensors in the first terminal when the first terminal is in the first area.

[0008] Render the model of the first building based on its first height.

[0009] In the above scheme, the output of the first information includes:

[0010] Determine whether each first grid within a second region of the 2D map has a visual relationship with each outline point of the first building in the 2D map; the second region represents the area selected by the user from the 2D map when performing surveying; the first building is located within the second region; the region in the 2D map is covered by multiple first grids;

[0011] The region corresponding to the first grid that has a visual relationship with the maximum number of said contour points is determined as the first region;

[0012] Based on the location of the first region in the two-dimensional map, the first information is output.

[0013] In the above scheme, determining whether each first grid within the second region of the two-dimensional map has a visual relationship with each outline point of the first building in the two-dimensional map includes:

[0014] Determine whether the first line connecting the center coordinates of each first grid in the two-dimensional map and each outline point of the first building intersects with any building drawn in the two-dimensional map, and obtain the determination result corresponding to each first line;

[0015] If the first line corresponding to the judgment result does not intersect with any building drawn in the two-dimensional map, it is determined that there is a line-of-sight relationship between the corresponding first grid and the corresponding contour point.

[0016] The method in the above scheme further includes:

[0017] The second information is determined when the first terminal is located in the first area and the center of the first terminal's camera is aligned with a first feature point of the first building; wherein,

[0018] The first feature point represents a point on the top plane of the first building in three-dimensional space, and the projection point of the first feature point relative to the horizontal plane coincides with the first contour point; the first contour point represents the contour point of the first building that has a visual relationship with the first region.

[0019] In the above scheme, determining the first height of the first building based on the second information includes:

[0020] Based on the second information, the first angle between the second line connecting the first terminal and the first feature point and the horizontal plane is determined.

[0021] Based on the first included angle and the first distance, the first height of the first building is determined; the first distance represents the distance between the center point of the first region and the first contour point.

[0022] In the above scheme, the method further includes: determining a first texture of the first building;

[0023] Correspondingly, rendering the model of the first building based on its first height includes:

[0024] Render the model of the first building based on the first height of the first building and the first texture.

[0025] In the above scheme, determining the first texture of the first building includes:

[0026] Determine the first image or first color corresponding to the first texture of the first building; wherein,

[0027] The first image is used to render the texture pattern of the first texture; the first color is used to render the texture color of the first texture.

[0028] In the above scheme, determining the first color corresponding to the first texture of the first building includes:

[0029] The first color is determined based on the user's access permissions to the model of the first building.

[0030] In the above scheme, determining the first color corresponding to the first texture of the first building includes:

[0031] A first array is determined; the first array contains a first statistical value corresponding to each building within the third region; the first building is located within the third region.

[0032] Based on the numerical position of each first statistical value in the first array within the first interval, a second interval is linearly interpolated to obtain a second array; wherein, the endpoints of the first interval are: the second statistical value and the third statistical value; the second statistical value represents the smallest first statistical value in the first array, and the third statistical value represents the largest first statistical value in the first array; the endpoints of the second interval are: the color corresponding to the second statistical value and the color corresponding to the third statistical value;

[0033] Based on the second array, the color corresponding to the first statistical value of the first building is determined as the first color.

[0034] In the above scheme, rendering the model of the first building based on its first height includes:

[0035] Based on the third information of the first building and the first height, a model of the first building is rendered; the third information represents the attribute information of the building; wherein, the attribute information includes one or more of the following of the building: identification, location, name, type and outline coordinates.

[0036] This application also provides a building modeling method, the method comprising:

[0037] Based on the quadtree method, the second region selected by the user during the survey is decomposed into multiple fourth regions;

[0038] A third piece of information is determined for each of a plurality of buildings; the third piece of information represents the attribute information of the building; the plurality of buildings are each located in a fourth region;

[0039] Based on the steps of any of the above methods, each target building in each fourth region is modeled; the target building represents the building to be modeled.

[0040] This application also provides a building modeling device, including:

[0041] A guidance unit is used to output first information; the first information is used to guide the user to move the first terminal to a first area; the first area represents the area where the first terminal is located when the image sensor of the first terminal can fully image the first building.

[0042] The determining unit is configured to determine a first height of the first building based on second information; the second information characterizes sensing parameters of one or more sensors within the first terminal when the first terminal is in the first area.

[0043] A rendering unit is used to render the model of the first building at its first height.

[0044] This application also provides an electronic device, including: a first processor and a first communication interface; wherein,

[0045] The first processor is configured to output first information; the first information is configured to guide the user to move the first terminal to a first area; the first area represents the area where the first terminal is located when the image sensor of the first terminal is able to fully image the first building;

[0046] Based on the second information, the first height of the first building is determined; the second information represents the sensing parameters of one or more sensors in the first terminal when the first terminal is in the first area.

[0047] Render the model of the first building based on its first height.

[0048] This application also provides an electronic device, including: a first processor and a first memory for storing a computer program capable of running on the processor.

[0049] Wherein, when the first processor is used to run the computer program, it executes the steps of any of the above methods.

[0050] This application also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the above methods.

[0051] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above methods.

[0052] In this embodiment, first information is output to guide the user to move the first terminal to a first region, where the first region represents the area where the first terminal is located when its image sensor can fully image the first building. Then, based on second information, a first height of the first building is determined, where the second information represents the sensing parameters of one or more sensors within the first terminal when it is in the first region. Finally, based on the first height of the first building, a model of the first building is rendered. This allows the user to be guided to move the terminal to a region where the building can be fully imaged. This region can also be understood as a region where the height of the building can be collected without obstruction. Compared to related technologies, the collected building height is more accurate, thereby improving the accuracy of the determined building model. Attached Figure Description

[0053] Figure 1 A schematic diagram illustrating the implementation process of a building modeling method provided in this application embodiment;

[0054] Figure 2 A schematic diagram of a graphic file provided for an embodiment of this application;

[0055] Figure 3 A schematic diagram of a two-dimensional map provided in an embodiment of this application;

[0056] Figure 4 A schematic diagram of building height acquisition provided in this application embodiment;

[0057] Figure 5 A schematic diagram for calculating building height provided in this application embodiment;

[0058] Figure 6 A schematic diagram illustrating the implementation flow of another building modeling method provided in this application embodiment;

[0059] Figure 7 A schematic diagram of the architecture of a building modeling system provided for an application embodiment of this application;

[0060] Figure 8 An interactive flow diagram provided for an application embodiment of this application;

[0061] Figure 9 Another interactive flow diagram provided for an application embodiment of this application;

[0062] Figure 10 This is a schematic diagram of the structure of a building modeling device provided in an embodiment of this application;

[0063] Figure 11 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0064] In digital twin map applications, white models of buildings are typically used to display the map landscape of a region. These white models can be viewed as simplified virtual 3D models of buildings, or simply as building models. Related technologies determine building heights based on remote sensing data and then generate building models from this data. However, remote sensing data is easily affected by factors such as weather, lighting, shooting height, and obstructions, leading to inaccurate building models.

[0065] Based on this, in this embodiment, first information is output to guide the user to move the first terminal to a first region, where the first region represents the area where the first terminal is located when its image sensor can fully image the first building. Then, based on second information, a first height of the first building is determined, where the second information represents the sensing parameters of one or more sensors within the first terminal when it is in the first region. Finally, based on the first height of the first building, a model of the first building is rendered. In this way, the user can be guided to move the terminal to a region where the building can be fully imaged. This region can also be understood as a region where the height of the building can be collected without obstruction. Compared to related technologies, the collected building height is more accurate, thereby improving the accuracy of the determined building model.

[0066] The present application will now be described in further detail with reference to the accompanying drawings and embodiments.

[0067] This application provides a building modeling method, referring to... Figure 1 The method includes:

[0068] Step 101: Output the first information.

[0069] The first information is used to guide the user to move the first terminal to the first area; the first area represents the area where the first terminal is located when the image sensor of the first terminal can fully image the first building.

[0070] In practical applications, the user guided by the first information can be considered as a person collecting building height data, such as a surveyor. The first terminal can be considered as a tool carried by the user for collecting building height data; for example, the first terminal can be a portable device such as a mobile phone. The image sensor can be a camera or other module built into the first terminal.

[0071] Here, the first information is used to guide the user to move the first terminal they are carrying to the first area. For example, the first information may be a marker for the first area in a two-dimensional map; the first information may also be a real-time path highlighted in a two-dimensional map viewed by the user, the destination of which is the first area.

[0072] In practical applications, after a user moves the first terminal to the first area, the user can use the first terminal to collect the height of the first building within the first area. When the first terminal is in the first area, the image sensor of the first terminal can capture a complete image of the first building. Therefore, the first area can be considered as an area where the height of the building can be collected without obstruction. It can also be understood that this area can be considered as a suitable area for collecting the height of the first building.

[0073] Step 102: Based on the second information, determine the first height of the first building.

[0074] The second information represents the sensing parameters of one or more sensors within the first terminal when the first terminal is in the first area.

[0075] In practical applications, after the user moves the first terminal to the first area, the user can align the camera's viewfinder center of the first terminal with a set point on the first building in three-dimensional space. In this case, the sensing parameters of one or more sensors in the first terminal can be used to determine the positioning coordinates, elevation angle, and azimuth angle of the first terminal at this time. This reference information can then be used to calculate the height of the first building.

[0076] For example, the sensing parameters may include real-time positioning, gyroscope parameters, magnetometer sensor parameters, etc. Step 103: Render the model of the first building based on the first height of the first building.

[0077] In practical applications, a graphic file corresponding to the first building can be created based on its first height. Then, the graphic file is processed by a rendering engine, and the building model corresponding to the graphic file is drawn on the interface of the terminal used to display the building model; that is, the model of the first building is rendered. For example, the graphic file format can be obj (Object File Format).

[0078] In one embodiment, rendering a model of the first building based on its first height includes:

[0079] Render the model of the first building based on the third information and the first height of the first building.

[0080] The third type of information represents the building's attribute information; the attribute information includes one or more of the following: identification, location, name, type, and outline coordinates.

[0081] In practical applications, contour coordinates can be a set of coordinates of multiple contour points of a building.

[0082] For example, Table 1 lists the attribute information of a building.

[0083] Table 1

[0084]

[0085] The primary and secondary categories are equivalent to the type information of the building.

[0086] In practical applications, the attribute information of a building can be determined by setting an interface. For example, the interface can be an Internet map application programming interface (API) provided by a third party.

[0087] For example, the POI data corresponding to the Point of Information (POI) of the area where the first building is located can be retrieved by calling the Internet map API. Each POI is equivalent to a building, and the POI data can include at least one of the following information about the building: name, location, and type. Then, the POI data is processed based on a spatial relationship query algorithm to determine the outline coordinates corresponding to each POI, and the outline coordinates are merged with the POI data and saved as attribute information. In this way, the attribute information of the first building can be determined.

[0088] In practical applications, graphic files can be used to save coded data describing the spatial shape of a building model. The spatial shape of a building model can be understood as: a three-dimensional graphic formed by stretching a closed outline surface based on the building's outline coordinates and then extending that outline surface according to the building's height. It can be understood that the spatial shape of a building model is similar to the spatial shape of the building in reality, and can also be considered as the spatial shape of the building itself.

[0089] In practical applications, a graphic file corresponding to the first building can be created based on the third information and the first height of the first building. Then, the graphic file is processed by the rendering engine, and the spatial shape of the building model corresponding to the graphic file is drawn in the interface of the terminal used to display the building model. That is, the model of the first building is rendered.

[0090] In one embodiment, the graphic file corresponding to the first building may also store third information about the first building.

[0091] For example, such as Figure 2 As shown, for an .obj format graphic file, the third information of the first building, namely the attribute information, can be stored in the graphic file in the form of comment code. The text after "#" represents the comment code, and "#attribute:" indicates that the content of this line is attribute information. The JavaScript Object Notation (JSON) string "{id:'Identifier 1',name:'Building Name 1',class:'Building Type 1'}" is equivalent to structured attribute information. The content in this graphic file other than "#attribute:{id:'Identifier 1',name:'Building Name 1',class:'Building Type 1'}" is equivalent to encoded data describing the spatial shape corresponding to the building model.

[0092] This increases the scalability of the graphics file. In practical applications, the execution entity used to render the building model, such as the rendering engine, can obtain the attribute information of the first building and the corresponding 3D graphics of the first building model based on the graphics file, thereby rendering a model of the first building with more functions and stronger interactivity. For example, the rendering engine can render the texture of the first building model based on the type of the first building, so that users who view the model of the first building can determine the type of the first building through the texture.

[0093] Furthermore, when the entity rendering the building model needs to transmit over the network to receive the graphic file and attribute information corresponding to the first building, the graphic file storing the attribute information allows the entity to receive the graphic file and attribute information through only one network transmission, thereby reducing network overhead.

[0094] In this embodiment, first information is output to guide the user to move the first terminal to a first region, where the first region represents the area where the first terminal is located when its image sensor can fully image the first building. Then, based on second information, a first height of the first building is determined, where the second information represents the sensing parameters of one or more sensors within the first terminal when it is in the first region. Finally, based on the first height of the first building, a model of the first building is rendered. This allows the user to be guided to move the terminal to a region where the building can be fully imaged. This region can also be understood as a region where the height of the building can be collected without obstruction. Compared to related technologies, the collected building height is more accurate, thereby improving the accuracy of the determined building model.

[0095] The method for collecting the height of the first building will be explained further below.

[0096] In one embodiment, the first information is output, including:

[0097] Determine whether there is a line-of-sight relationship between each first grid in the second region of the 2D map and each outline point of the first building in the 2D map;

[0098] The region corresponding to the first grid that has a visual relationship with the most contour points is defined as the first region;

[0099] Based on the location of the first region in the two-dimensional map, output the first information.

[0100] The second region represents the area selected by the user from the two-dimensional map when conducting the survey; the first building is located within the second region; the region in the two-dimensional map is covered by multiple first grids.

[0101] For example, each first grid in a two-dimensional map can correspond to an area that is 2 meters (m) long and 2 meters wide in the real scene, i.e., 2m*2m.

[0102] In practical applications, two-dimensional maps can be generated based on existing map data, providing directional references for personnel collecting the height of the first building. Therefore, the two-dimensional map here can also be described as a data collection map.

[0103] In this context, the outline points of the first building in the 2D map can be considered as key points constituting the outline of the first building drawn on the 2D map. In practical applications, these outline points can be determined based on the outline coordinates in the third information.

[0104] For example, Figure 3A two-dimensional map is provided, which is covered by multiple grids. Each grid is equivalent to a first grid, and region 1 is equivalent to a second region. Building Jzw1 is equivalent to the first building, and the outline points of the building include P1, P2, P3, P4, P5, and P6. It can be seen that the line connecting P1 to P6 in sequence is equivalent to the outline of the first building drawn on the two-dimensional map.

[0105] In one embodiment, determining whether there is a line-of-sight relationship between each first grid within a second region of a two-dimensional map and each outline point of a first building in the two-dimensional map includes:

[0106] Determine whether the first line connecting the center coordinates of each first grid in the two-dimensional map and each outline point of the first building intersects with any building drawn in the two-dimensional map, and obtain the judgment result corresponding to each first line;

[0107] If the judgment result indicates that the first connecting line does not intersect with any building drawn in the two-dimensional map, it is determined that there is a line-of-sight relationship between the corresponding first grid and the corresponding contour point.

[0108] In practical applications, there are no obstacles obstructing the line of sight between two points with a line-of-sight relationship. Therefore, when a first grid and a contour point have a line-of-sight relationship, and the user is located in the area corresponding to the first grid, the user can see or capture the projection of the contour point onto any horizontal plane in 3D space without obstruction. It should be noted that although the first grid corresponds to an area, the area of ​​the area corresponding to the first grid is generally small and can be considered as a single point when collecting building height data. During calculations based on the position of the first grid, the coordinates of the center point of the first grid can be considered as the position of the first grid.

[0109] It is understandable that when a user collects the height of the first building in the first area, there are fewer obstructions compared to other areas in the second area. Therefore, the first area can also be regarded as the best area for collecting the height of the building.

[0110] In practical applications, the judgment results corresponding to all the first lines related to the first building can be organized into a visibility relationship table for further processing. For example, the further processing can be: determining the first grid that has a visibility relationship with the most contour points based on the visibility relationship table.

[0111] For example, refer to Figure 3 Given a two-dimensional map, the process of outputting the first information can include at least the following steps:

[0112] (1) Connect the center coordinates of each grid in region 1 to each contour point of building Jzw1.

[0113] (2) Determine whether each line intersects with any building drawn in the two-dimensional map, and obtain the judgment result corresponding to each line.

[0114] If the judgment result indicates that a line does not intersect with any building drawn in the two-dimensional map, it is determined that there is a line-of-sight relationship between the grid corresponding to the line and the contour point corresponding to the line. In this case, the line can also be described as a line-of-sight connection.

[0115] Figure 3 The diagram shows some line-of-sight connections. It can be seen that the line connecting grid G1 and outline point P1 does not intersect with any building; therefore, grid G1 and outline point P1 have a line-of-sight relationship. The line connecting grid G1 and outline point P3 intersects with building Jzw1; therefore, grid G1 and outline point P3 do not have a line-of-sight relationship.

[0116] In practical applications, the judgment results corresponding to all the connections can be organized into a visibility relationship table as shown in Table 2.

[0117] Table 2

[0118] serial number Grid Building Number Outline punctuation Azimuth Distance (m) Visibility 1 G1 Jzw1 P1 235 120 yes 2 G1 Jzw1 P2 200 160 yes 3 G1 Jzw1 P6 260 150 yes 4 G2 Jzw1 P4 140 90 yes 5 G2 Jzw1 P5 150 110 yes 6 G2 Jzw1 P6 185 100 yes 7 G3 Jzw1 P2 65 180 yes 8 G3 Jzw1 P3 45 130 yes 9 G3 Jzw1 P4 40 150 yes

[0119] The azimuth angle corresponding to the line represents the clockwise angle between the line and the due north direction; the distance represents the length of the line, that is, the actual horizontal distance between the grid corresponding to the line and the contour point corresponding to the line.

[0120] (3) Determine the region corresponding to the grid that has a line-of-sight relationship with the most contour points as the first region.

[0121] (4) Output the first information based on the location of the first region in the two-dimensional map.

[0122] In practical applications, the user moves the first terminal to the optimal acquisition area for the height of the first building based on the output first information, and then uses the first terminal to acquire the height of the first building. Specifically,

[0123] In one embodiment, the method further includes:

[0124] The second information is determined when the first terminal is located in the first area and the viewfinder of the first terminal's camera is aligned with the first feature point of the first building.

[0125] The first feature point represents a point on the top plane of the first building in three-dimensional space, and the projection point of the first feature point relative to the horizontal plane coincides with the first contour point; the first contour point represents the contour point of the first building that has a visual relationship with the first region.

[0126] Understandably, the height of the first feature point is also the height of the first building.

[0127] For example, Figure 4 A schematic diagram for collecting building height is given, in which the collection point corresponds to the first region, P1 corresponds to the first contour point, and P1' corresponds to the first feature point.

[0128] In one embodiment, determining the first height of the first building based on second information includes:

[0129] Based on the second information, determine the first angle between the second line connecting the first terminal and the first feature point and the horizontal plane.

[0130] The first height of the first building is determined based on the first included angle and the first distance.

[0131] The first distance represents the distance between the center point of the first region and the first contour point.

[0132] In practical applications, based on the sensing parameters of the first terminal when it aligns the camera's viewfinder with the first feature point of the first building, the viewing angle of the first terminal can be determined. This viewing angle is equivalent to the first included angle. Therefore, the second information can be used to determine the first included angle.

[0133] For example, Figure 4 The distance relationship between P1, P1', and the sampling points can be simplified as follows: Figure 5 The calculation diagram shown below. Based on... Figure 5 The method for determining the first height of the first building based on the first included angle and the first distance is explained.

[0134] It is understandable that P1, P1', and the sampling point form a right triangle, with the sides formed by P1 and P1' and the sides formed by P1 and the sampling point being the right-angled sides.

[0135] In this context, the elevation angle corresponds to the first included angle, which can be determined based on the second information; 'a' corresponds to the first distance, which in practical applications can be determined based on the line-of-sight table; and 'b' corresponds to the height of the first building. Therefore, according to the trigonometric formula: tan(elevation angle) = b / a, 'b', which is the height of the first building, can be calculated.

[0136] In practical applications, to reduce the impact of the environment on the data collection results, the following measures can be taken to improve the accuracy of the collected building heights.

[0137] (1) Before the user uses the first terminal to collect data, the sensor of the first terminal is calibrated based on the built-in calibration function of the first terminal to obtain an accurate viewpoint and level.

[0138] (2) Set the range of parameters involved in the process of collecting the height of the first building. If the parameter is not within the set range, the parameter is considered invalid. That is, the parameter cannot be used to calculate the height of the first building, or the calculated height of the first building is invalid.

[0139] For example, the parameters involved in the data acquisition process and their corresponding setting ranges include:

[0140] Location coordinates: equivalent to the first distance. The setting range for this parameter is less than 1 kilometer (km).

[0141] Elevation angle: Equivalent to the first included angle. The setting range for this parameter is: greater than 0 degrees and less than 90 degrees.

[0142] The calculated height of the first building is greater than 1m and less than 1km.

[0143] (3) Repeat the method steps for calculating the height of the first building in the above embodiments multiple times to obtain multiple calculation results, and take the median of these multiple calculation results as the final calculation result of the height of the first building.

[0144] As can be seen, in this embodiment, the user is guided to move the terminal to an area suitable for collecting the building's height, and the building's height is accurately determined based on the sensing parameters of the terminal's built-in sensors. Compared to related technologies, this avoids the influence of obstructions and other factors on height collection, thereby improving the accuracy of the determined building model. Furthermore, during the height collection process, the parameters required to calculate the building's height can be collected through the terminal's built-in sensors, reducing collection costs and simplifying the building modeling process.

[0145] In related technologies, a white membrane is typically used as a simplified virtual 3D model of a building. While the white membrane can visually represent the height and cross-sectional shape of a building, it generally uses a uniform white texture, resulting in a monotonous style and low visual distinctiveness of the generated building model. Therefore,

[0146] In one embodiment, the method further includes: determining a first texture of the first building;

[0147] Correspondingly, based on the first height of the first building, the model of the first building is rendered, including:

[0148] Render the model of the first building based on its first height and first texture.

[0149] In practical applications, texture files can be used to store encoded data describing the textures of a building model. The texture of a building model can be understood as the style of its outer surface. For example, the texture file format can be MLT (MapLibre Tiles) format.

[0150] In practical applications, the rendering engine can process image files and texture files, and draw the spatial shape and outer surface style of the building model corresponding to the graphic file in the interface of the terminal used to display the building model. In other words, the model of the first building is rendered.

[0151] In one embodiment, determining a first texture of a first building includes:

[0152] Determine the first image or first color corresponding to the first texture of the first building.

[0153] The first image is used to render the texture pattern of the first texture; the first color is used to render the texture color of the first texture.

[0154] In practical applications, the first texture can be presented to the user as the exterior surface style of the building model in the form of a texture pattern or texture color; rendering the texture pattern or texture color of the first building can be regarded as rendering the first texture of the first building.

[0155] Here, the first texture can be determined in the following two ways:

[0156] Method 1: Determine the first image as the texture pattern of the first texture of the first building.

[0157] In practical applications, a texture library can be preset, which stores images corresponding to different types of buildings. The images in the texture library can be obtained by further processing real-life photos of buildings to represent the type of the corresponding building. Real-life photos can be obtained by setting up an image library, taking photos with a mobile phone, etc.

[0158] In determining the first texture of the first building, the image that matches the type of the first building can be identified as the texture pattern of the first texture based on the preset texture library, thereby determining the first texture.

[0159] Method 2: Determine the first color as the texture color of the first texture of the first building.

[0160] Specifically, in one embodiment, determining the first color corresponding to the first texture of the first building includes:

[0161] The first color is determined based on the user's access permissions to the model of the first building.

[0162] In practical applications, users can view building models by accessing a system used to display building models; that is, they can access the model of the first building. Different users have different access permissions to the model of the first building. A pre-defined correspondence between user access permissions and building colors can be established. Then, during the rendering of the model of the first building, based on this correspondence, the color matching the user's access permission is determined as the first color, and then the first color is determined as the texture color of the first texture of the first building, thereby determining the first texture.

[0163] For example, if the preset correspondence includes: no access permission corresponds to gray, then when a user without access permission accesses the building model, the texture color of the rendered building model will be gray.

[0164] This enhances the visual recognizability of the first building and allows users to be informed of their access rights to the first building through the texture of the building model, thereby increasing the functionality and interactivity of the building model.

[0165] In one embodiment, determining the first color corresponding to the first texture of the first building includes:

[0166] Determine the first array; the first array contains the first statistical value corresponding to each building in the third region; the first building is located in the third region;

[0167] Based on the numerical position of each first statistical value in the first array within the first interval, a linear interpolation is performed on the second interval to obtain the second array; wherein, the endpoints of the first interval are: the second statistical value and the third statistical value; the second statistical value represents the smallest first statistical value in the first array, and the third statistical value represents the largest first statistical value in the first array; the endpoints of the second interval are: the color corresponding to the second statistical value and the color corresponding to the third statistical value;

[0168] Based on the second array, the color corresponding to the first statistical value of the first building is determined as the first color.

[0169] In practical applications, there may be scenarios where users need to perform statistical analysis on buildings. For example, a user might need to determine the age of each building within a third area. In such cases, the texture color of the building model within that area can be determined based on the statistical values ​​corresponding to each building. This allows users to intuitively obtain statistical information through the texture color of the building model, enhancing its functionality and interactivity.

[0170] The method in this embodiment will be illustrated below with an example.

[0171] If a user needs to calculate the usage years of buildings in area 2, there are four buildings in this area: building 1, building 2, building 3, and building 4. The usage years of these four buildings are val1, val2, val3, and val4, respectively. Here, the usage years are equivalent to the first statistical value. Among them, val1 is the smallest usage year in the first array, equivalent to the second statistical value, and val2 is the largest usage year in the first array, equivalent to the third statistical value. Therefore, the first array can be determined as [val1, val2, val3, val4], and the first interval is [val1, val4].

[0172] Then, set colors for the two endpoints of the first interval to form the second interval [val1_color, val4_color], where val1_color1 corresponds to val1 and val4_color corresponds to val4.

[0173] Based on the numerical position of each first statistical value in the first array within the first interval [val1, val4], a linear interpolation is performed on the second interval [val1_color, val4_color]. For example, if val2 is in the middle of the first interval, that is, val2 is the middle value between val1 and val4, then the color corresponding to val2 is the color at the middle position of the linear gradient formed by val1_color and val2_color. In this way, the color corresponding to each first statistical value is obtained, and these colors are grouped into a second array. Here, assuming that the color corresponding to val2 is val2_color and the color corresponding to val3 is val3_color, then the second array is [val1_color, val2_color, val3_color, val4_color].

[0174] If the first building to be rendered in the model is building 2, then based on the second array, the color corresponding to the first statistical value val2 of building 2 can be determined as val2_color. Then val2_color can be determined as the first color, that is, val2_color can be determined as the texture color of the first texture of the model of building 2, thereby determining the first texture.

[0175] In practical applications, the above methods for determining the first texture can be used alternately according to business needs.

[0176] For example, the first texture can be determined by default based on method 1 described above. That is, the texture pattern of the first texture of the first building model is determined by the first image that matches the type of the first building, and this texture pattern is rendered. Then, based on business requirements, the first texture is re-determined based on method 2 described above, and the model of the first building is re-rendered. For example, when a user performs statistics on buildings in a third area, the first color determined according to the statistics results is used as the texture color of the first texture of the first building model, and this texture color is rendered. After the statistics are completed, the texture of the first building model is restored to the texture pattern before the statistics, that is, the texture pattern of the first texture of the first building model is determined again by the first image that matches the type of the first building, and this texture pattern is rendered. Here, redetermining the first texture of the first building model and re-rendering can also be regarded as updating the texture of the first building model. In this way, the diverse display of building models under different business requirements can be adapted, further improving the functionality and interactivity of building models.

[0177] In practical applications, multiple target buildings within a region can be modeled based on the building modeling method in any of the above embodiments to display the map landscape of that region. Target buildings are those whose building models need to be created; for example, target buildings can be buildings of a defined type.

[0178] Based on this, the embodiments of this application also provide a building modeling method, referring to... Figure 6 The method includes:

[0179] Step 601: Based on the quadtree method, decompose the second region selected by the user during the survey into multiple fourth regions.

[0180] In practical applications, during the mapping process, users can first select a second region on a two-dimensional map. For example, a user can first select a polygon on the two-dimensional map and save it as GeoJSON format graphic data. This GeoJSON format graphic data records an array of latitude and longitude coordinates that constitute the outline of the selected polygon. Here, the selected polygon is equivalent to the second region on the two-dimensional map.

[0181] After selecting the second area, users can set a unique identifier for each building within the second area for subsequent processing.

[0182] Then, based on the quadtree method, the graphic data corresponding to the second region can be recursively processed to decompose the second region into multiple smaller graphics, each of which is equivalent to a fourth region.

[0183] In practical applications, the area of ​​the graphic corresponding to each fourth region can be less than a set threshold. For example, the set threshold can be 2km*2km, that is, 4 square kilometers (km²). 2 ).

[0184] Step 602: Determine the third information for each of the multiple buildings.

[0185] The third information represents the attribute information of the buildings; multiple buildings are located in a fourth area.

[0186] In practical applications, the attribute information of each target building in each fourth region can be determined sequentially based on a defined interface. This allows for the determination of the attribute information of each target building in the second region. For example, the defined interface could be a third-party internet map API.

[0187] Here, "multiple buildings" can be understood as multiple target buildings within the same fourth area.

[0188] For example, determining the attribute information of each target building in the second area may include the following steps:

[0189] (1) Call the set interface to query the POI data of a fourth region.

[0190] In practical applications, a fourth region can include multiple Points of Interest (POIs), each POI representing a building. Here, the retrieved POI data can be the POI data of all target buildings within the fourth region.

[0191] (2) Repeat step (1) above until the POI data of all target buildings in all fourth regions are retrieved, and all retrieved data are summarized to form the POI data of all target buildings in the second region.

[0192] (3) Based on the spatial relationship query algorithm, the POI data of all target buildings in the second region are processed to determine the outline coordinates of each target building, and the outline coordinates are merged with the POI data and saved as attribute information.

[0193] In this way, the attribute information of all target buildings in the second region can be obtained. It is understandable that if the second region is not decomposed into multiple fourth regions, determining the attribute information of all target buildings in the second region would require querying the POI data of all target buildings in the second region at once through a defined interface. Obviously, the data processing volume of the defined interface would be too large, easily leading to data return failures and reducing the efficiency of building modeling. In this embodiment, the second region is decomposed into fourth regions, and the attribute information of each target building in each fourth region is determined sequentially, reducing the data processing volume of the defined interface and improving the efficiency of building modeling.

[0194] Step 603: Model each target building in each fourth region.

[0195] The target building represents the building to be modeled.

[0196] Specifically, based on the building modeling method in any of the foregoing embodiments, each target building in the fourth region is modeled. During the modeling of a building, that building is equivalent to the first building in any of the foregoing embodiments.

[0197] In the modeling process of each building, this application outputs first information to guide the user to move the first terminal to a first region. The first region represents the area where the first terminal is located when its image sensor can fully image the first building. Then, based on second information, a first height of the first building is determined. The second information represents the sensing parameters of one or more sensors within the first terminal when it is in the first region. Finally, based on the first height of the first building, the model of the first building is rendered. This allows the user to be guided to move the terminal to an area where the building can be fully imaged. This area can also be understood as an area where the building's height can be collected without obstruction. Compared to related technologies, the collected building height is more accurate, thereby improving the accuracy of the determined building model.

[0198] The present application will be further described in detail below with reference to application examples.

[0199] This application provides a building modeling system, referring to... Figure 7 The building modeling system includes a client and a server. The client includes a data acquisition module, a data upload module, and a model rendering module; the server includes a data preprocessing module, a data receiving module, a model creation module, and a model storage module.

[0200] In practical applications, the client can collect data through the data acquisition module, such as building height. Then, the client can upload the collected data to the server via the data upload module, and finally, the data rendering module renders the building model. When the user views the rendered building model through a map interface on the terminal, the data rendering module can also read the visible map data from the interface and render the building model onto that map.

[0201] The server can assist the client in data collection through a preprocessing module and receive the data collected by the client through a data receiving module. Then, based on the model creation module, it creates a model file corresponding to the building model. The model file can be a graphic file or a texture file as described in this embodiment. Finally, the model file is saved through a model storage module.

[0202] In practical applications, refer to Figure 8 The interaction process between the client and server during the rendering of a building model can include at least the following steps:

[0203] Step 801: The client requests model files of buildings within the current field of view from the server.

[0204] In practical applications, the current field of view can be regarded as the map area displayed in the client interface when the user views the building model through the client, that is, the map interface in the client.

[0205] Step 802: The server responds to the request and returns the corresponding model file.

[0206] In practical applications, model files can include OBJ format graphics files and MTL format texture files.

[0207] Step 803: The client downloads and parses the model file to obtain the parsing information.

[0208] In practical applications, clients can determine the attribute information of the corresponding building and the spatial shape of the corresponding building model through graphic files, and clients can determine the texture of the corresponding building model through texture files. This information determined from the model files can be regarded as parsed information.

[0209] Step 804: The client renders the building model based on the parsed information.

[0210] In practical applications, when users view rendered building models through a map interface, the client can render the building models onto the map interface for display.

[0211] In practical applications, the client and server can update the texture of the building model according to business needs.

[0212] See Figure 9 The main steps for updating the texture of a building model include:

[0213] Step 901: The client initiates a statistical request for buildings within the designated area.

[0214] Step 902: The server performs statistics on the buildings within the designated area, obtains a statistical array, and generates a color array based on linear interpolation.

[0215] Here, the statistical array corresponds to the first array in this embodiment, and the color array corresponds to the second array in this embodiment.

[0216] Step 903: The server generates a texture file based on the color array and the statistical array, and returns the generated texture file and statistical array to the client.

[0217] In practical applications, the server can create a separate texture file for each color in the color array and name the texture file after the corresponding statistical value. If the statistical array contains multiple statistical values, the server can create multiple texture files.

[0218] Step 904: The client updates the texture of the building models within the set area based on the received texture file.

[0219] In practical applications, the client can iterate through and read the texture files returned by the server, and compare the statistical value corresponding to each building in the set area with the file name of each texture file. If the statistical value corresponding to a building is the same as the file name of the texture file, then the texture file is used as the updated texture file for that building, and the texture of the building model is updated based on the updated texture file.

[0220] Step 905: End the statistical operation and restore the texture of the building model.

[0221] In practical applications, after the user starts the statistical operation, the texture file of the building model before the statistical operation is temporarily saved in the client's local storage. After the user finishes the statistical operation, the temporarily saved texture file can be restored. That is, the texture file of the building model before the statistical operation can be used as the texture file for rendering the model.

[0222] Based on the embodiments described above, this application also provides a building modeling device, referring to... Figure 10 The building modeling device includes:

[0223] Guidance unit 1001: for outputting first information; the first information is used to guide the user to move the first terminal to the first area; the first area represents the area where the first terminal is located when the image sensor of the first terminal can fully image the first building;

[0224] Determining unit 1002: used to determine the first height of the first building based on second information; the second information characterizes the sensing parameters of one or more sensors in the first terminal when the first terminal is in the first area;

[0225] Rendering unit 1003: used to render a model of the first building based on the first height of the first building.

[0226] In one embodiment, the guiding unit 1001 outputs first information, including:

[0227] Determine whether each first grid within a second region of the 2D map has a visual relationship with each outline point of the first building in the 2D map; the second region represents the area selected by the user from the 2D map when performing surveying; the first building is located within the second region; the region in the 2D map is covered by multiple first grids;

[0228] The region corresponding to the first grid that has a visual relationship with the maximum number of said contour points is determined as the first region;

[0229] Based on the location of the first region in the two-dimensional map, the first information is output.

[0230] In one embodiment, the guiding unit 1001 determines whether each first grid within a second region of the two-dimensional map has a visual relationship with each outline point of the first building in the two-dimensional map, including:

[0231] Determine whether the first line connecting the center coordinates of each first grid in the two-dimensional map and each outline point of the first building intersects with any building drawn in the two-dimensional map, and obtain the determination result corresponding to each first line;

[0232] If the first line corresponding to the judgment result does not intersect with any building drawn in the two-dimensional map, it is determined that there is a line-of-sight relationship between the corresponding first grid and the corresponding contour point.

[0233] In one embodiment, the determining unit 1002 is further configured to determine the second information when the first terminal is located in the first area and the center of the first terminal's camera is aligned with a first feature point of the first building; wherein,

[0234] The first feature point represents a point on the top plane of the first building in three-dimensional space, and the projection point of the first feature point relative to the horizontal plane coincides with the first contour point; the first contour point represents the contour point of the first building that has a visual relationship with the first region.

[0235] In one embodiment, the determining unit 1002 determines the first height of the first building based on second information, including:

[0236] Based on the second information, the first angle between the second line connecting the first terminal and the first feature point and the horizontal plane is determined.

[0237] Based on the first included angle and the first distance, the first height of the first building is determined; the first distance represents the distance between the center point of the first region and the first contour point.

[0238] In one embodiment, the determining unit 1002 is further configured to determine a first texture of the first building;

[0239] Correspondingly, the rendering unit 1003 renders a model of the first building based on the first height of the first building, including:

[0240] Render the model of the first building based on the first height of the first building and the first texture.

[0241] In one embodiment, the determining unit 1002 determines the first texture of the first building, including:

[0242] Determine the first image or first color corresponding to the first texture of the first building; wherein,

[0243] The first image is used to render the texture pattern of the first texture; the first color is used to render the texture color of the first texture.

[0244] In one embodiment, the determining unit 1002 determines the first color corresponding to the first texture of the first building, including:

[0245] The first color is determined based on the user's access permissions to the model of the first building.

[0246] In one embodiment, the determining unit 1002 determines the first color corresponding to the first texture of the first building, including:

[0247] A first array is determined; the first array contains a first statistical value corresponding to each building within the third region; the first building is located within the third region.

[0248] Based on the numerical position of each first statistical value in the first array within the first interval, a second interval is linearly interpolated to obtain a second array; wherein, the endpoints of the first interval are: the second statistical value and the third statistical value; the second statistical value represents the smallest first statistical value in the first array, and the third statistical value represents the largest first statistical value in the first array; the endpoints of the second interval are: the color corresponding to the second statistical value and the color corresponding to the third statistical value;

[0249] Based on the second array, the color corresponding to the first statistical value of the first building is determined as the first color.

[0250] In one embodiment, the rendering unit 1003 renders a model of the first building based on the first height of the first building, including:

[0251] Based on the third information of the first building and the first height, a model of the first building is rendered; the third information represents the attribute information of the building; wherein, the attribute information includes one or more of the following of the building: identification, location, name, type and outline coordinates.

[0252] In practical applications, the guiding unit 1001, the determining unit 1002, and the rendering unit 1003 can all be implemented by the processor in the building modeling device.

[0253] It should be noted that the building modeling device provided in the above embodiments is only illustrated by the division of the above program modules. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the building modeling device and the building modeling method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0254] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiments of this application, this application also provides an electronic device, referring to... Figure 11 The electronic device includes:

[0255] The first communication interface 1 is capable of exchanging information with other devices;

[0256] The first processor 2 is connected to the first communication interface 1 to enable information interaction with other devices. When running a computer program, it executes the methods provided by one or more technical solutions in the above embodiments. The computer program is stored in the first memory 3.

[0257] Specifically, the first processor 2 is used to output first information; the first information is used to guide the user to move the first terminal to a first area; the first area represents the area where the first terminal is located when the image sensor of the first terminal can fully image the first building;

[0258] Based on the second information, the first height of the first building is determined; the second information represents the sensing parameters of one or more sensors in the first terminal when the first terminal is in the first area.

[0259] Render the model of the first building based on its first height.

[0260] In one embodiment, the first processor 2 outputs first information, including:

[0261] Determine whether each first grid within a second region of the 2D map has a visual relationship with each outline point of the first building in the 2D map; the second region represents the area selected by the user from the 2D map when performing surveying; the first building is located within the second region; the region in the 2D map is covered by multiple first grids;

[0262] The region corresponding to the first grid that has a visual relationship with the maximum number of said contour points is determined as the first region;

[0263] Based on the location of the first region in the two-dimensional map, the first information is output.

[0264] In one embodiment, the first processor 2 determines whether each first grid within a second region of the two-dimensional map has a visual relationship with each outline point of the first building in the two-dimensional map, including:

[0265] Determine whether the first line connecting the center coordinates of each first grid in the two-dimensional map and each outline point of the first building intersects with any building drawn in the two-dimensional map, and obtain the determination result corresponding to each first line;

[0266] If the first line corresponding to the judgment result does not intersect with any building drawn in the two-dimensional map, it is determined that there is a line-of-sight relationship between the corresponding first grid and the corresponding contour point.

[0267] In one embodiment, the first processor 2 is further configured to:

[0268] The second information is determined when the first terminal is located in the first area and the center of the first terminal's camera is aligned with a first feature point of the first building; wherein,

[0269] The first feature point represents a point on the top plane of the first building in three-dimensional space, and the projection point of the first feature point relative to the horizontal plane coincides with the first contour point; the first contour point represents the contour point of the first building that has a visual relationship with the first region.

[0270] In one embodiment, the first processor 2 determines the first height of the first building based on second information, including:

[0271] Based on the second information, the first angle between the second line connecting the first terminal and the first feature point and the horizontal plane is determined.

[0272] Based on the first included angle and the first distance, the first height of the first building is determined; the first distance represents the distance between the center point of the first region and the first contour point.

[0273] In one embodiment, the first processor 2 is further configured to determine a first texture of the first building;

[0274] Correspondingly, rendering the model of the first building based on its first height includes:

[0275] Render the model of the first building based on the first height of the first building and the first texture.

[0276] In one embodiment, the first processor 2 determines the first texture of the first building, including:

[0277] Determine the first image or first color corresponding to the first texture of the first building; wherein,

[0278] The first image is used to render the texture pattern of the first texture; the first color is used to render the texture color of the first texture.

[0279] In one embodiment, the first processor 2 determines the first color corresponding to the first texture of the first building, including:

[0280] The first color is determined based on the user's access permissions to the model of the first building.

[0281] In one embodiment, the first processor 2 determines the first color corresponding to the first texture of the first building, including:

[0282] A first array is determined; the first array contains a first statistical value corresponding to each building within the third region; the first building is located within the third region.

[0283] Based on the numerical position of each first statistical value in the first array within the first interval, a second interval is linearly interpolated to obtain a second array; wherein, the endpoints of the first interval are: the second statistical value and the third statistical value; the second statistical value represents the smallest first statistical value in the first array, and the third statistical value represents the largest first statistical value in the first array; the endpoints of the second interval are: the color corresponding to the second statistical value and the color corresponding to the third statistical value;

[0284] Based on the second array, the color corresponding to the first statistical value of the first building is determined as the first color.

[0285] In one embodiment, the first processor 2 renders a model of the first building based on a first height of the first building, including:

[0286] Based on the third information of the first building and the first height, a model of the first building is rendered; the third information represents the attribute information of the building; wherein, the attribute information includes one or more of the following of the building: identification, location, name, type and outline coordinates.

[0287] It should be noted that the specific processing procedure of the first communication interface 1 can be understood by referring to the above method.

[0288] Of course, in practical applications, the various components in an electronic device are coupled together through bus system 4. It can be understood that bus system 4 is used to achieve communication and connection between these components. In addition to the data bus, bus system 4 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 11 The general will label all buses as Bus System 4.

[0289] The first memory 3 in this application embodiment is used to store various types of data to support operations in the electronic device. Examples of such data include any computer program used to operate on the electronic device. The methods disclosed in the above-described embodiments of this application can be applied to the first processor 2, or implemented by the first processor 2. The first processor 2 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuit of the hardware in the first processor 2 or by instructions in the form of software. The first processor 2 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The first processor 2 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium located in the first memory 3. The first processor 2 reads the information in the first memory 3 and, in conjunction with its hardware, completes the steps of the aforementioned method.

[0290] In an exemplary embodiment, the electronic device may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general-purpose processors, controllers, MCUs, microprocessors, or other electronic components to perform the aforementioned method.

[0291] It is understood that the first memory 3 in the embodiments of this application can be volatile memory or non-volatile memory, or both. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); the magnetic surface memory can be disk storage or magnetic tape storage. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memories.

[0292] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as an electronic device including a computer program. The computer program can be executed by a first processor 2 of the electronic device to complete the steps described in the aforementioned method. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.

[0293] In an exemplary embodiment, this application also provides a computer program product, including a computer program that can be executed by a first processor 2 of an electronic device to perform the steps described in any of the foregoing methods.

[0294] It should be noted that terms such as "first" and "second" are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0295] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Additionally, the term "one or more" in this document refers to any combination of at least two of any one or more elements from a set of A, B, and C. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set of A, B, and C.

[0296] Furthermore, the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.

[0297] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.

Claims

1. A building modeling method, characterized in that, The method includes: Output first information; the first information is used to guide the user to move the first terminal to the first area; the first area represents the area where the first terminal is located when the image sensor of the first terminal can fully image the first building; Based on the second information, the first height of the first building is determined; the second information represents the sensing parameters of one or more sensors in the first terminal when the first terminal is in the first area; Render the model of the first building based on its first height.

2. The method according to claim 1, characterized in that, The output of the first information includes: Determine whether each first grid within a second region of the 2D map has a visual relationship with each outline point of the first building in the 2D map; the second region represents the area selected by the user from the 2D map when performing mapping; the first building is located within the second region; the region in the 2D map is covered by multiple first grids; The region corresponding to the first grid that has a visual relationship with the maximum number of said contour points is determined as the first region; Based on the location of the first region in the two-dimensional map, the first information is output.

3. The method according to claim 2, characterized in that, The step of determining whether each first grid within the second region of the two-dimensional map has a line-of-sight relationship with each outline point of the first building in the two-dimensional map includes: Determine whether the first line connecting the center coordinates of each first grid in the two-dimensional map and each outline point of the first building intersects with any building drawn in the two-dimensional map, and obtain the determination result corresponding to each first line; If the first line corresponding to the judgment result does not intersect with any building drawn in the two-dimensional map, it is determined that there is a line-of-sight relationship between the corresponding first grid and the corresponding contour point.

4. The method according to claim 1, characterized in that, The method further includes: The second information is determined when the first terminal is located in the first area and the center of the first terminal's camera is aligned with a first feature point of the first building; wherein, The first feature point represents a point on the top plane of the first building in three-dimensional space, and the projection point of the first feature point relative to the horizontal plane coincides with the first contour point; the first contour point represents the contour point of the first building that has a visual relationship with the first region.

5. The method according to claim 4, characterized in that, Determining the first height of the first building based on the second information includes: Based on the second information, the first angle between the second line connecting the first terminal and the first feature point and the horizontal plane is determined. Based on the first included angle and the first distance, the first height of the first building is determined; the first distance represents the distance between the center point of the first region and the first contour point.

6. The method according to claim 1, characterized in that, The method further includes: determining a first texture of the first building; Correspondingly, rendering the model of the first building based on its first height includes: Render the model of the first building based on the first height of the first building and the first texture.

7. The method according to claim 6, characterized in that, Determining the first texture of the first building includes: Determine the first image or first color corresponding to the first texture of the first building; wherein, The first image is used to render the texture pattern of the first texture; the first color is used to render the texture color of the first texture.

8. The method according to claim 7, characterized in that, Determining the first color corresponding to the first texture of the first building includes: The first color is determined based on the user's access permissions to the model of the first building.

9. The method according to claim 7, characterized in that, Determining the first color corresponding to the first texture of the first building includes: A first array is determined; the first array contains a first statistical value corresponding to each building within the third region; the first building is located within the third region. Based on the numerical position of each first statistical value in the first array within the first interval, a second interval is linearly interpolated to obtain a second array; wherein, the endpoints of the first interval are: the second statistical value and the third statistical value; the second statistical value represents the smallest first statistical value in the first array, and the third statistical value represents the largest first statistical value in the first array; the endpoints of the second interval are: the color corresponding to the second statistical value and the color corresponding to the third statistical value; Based on the second array, the color corresponding to the first statistical value of the first building is determined as the first color.

10. The method according to claim 1, characterized in that, Rendering a model of the first building based on its first height includes: Based on the third information of the first building and the first height, a model of the first building is rendered; the third information represents the attribute information of the building; wherein, the attribute information includes one or more of the following of the building: identification, location, name, type and outline coordinates.

11. A building modeling method, characterized in that, The method includes: Based on the quadtree method, the second region selected by the user during the survey is decomposed into multiple fourth regions; A third piece of information is determined for each of a plurality of buildings; the third piece of information represents the attribute information of the building; the plurality of buildings are each located in a fourth region; Based on the building modeling method according to any one of claims 1 to 10, each target building in each fourth region is modeled; the target building represents the building to be modeled.

12. A building modeling device, characterized in that, include: The guiding unit is used to output the first information; The first information is used to guide the user to move the first terminal to the first area; The first region represents the area where the first terminal is located when the image sensor of the first terminal is able to fully image the first building. A determining unit is configured to determine the first height of the first building based on the second information; The second information represents the sensing parameters of one or more sensors within the first terminal when the first terminal is in the first area; A rendering unit is used to render a model of the first building based on the first height of the first building.

13. An electronic device, characterized in that, include: A first processor and a first communication interface; wherein... The first processor is configured to output first information; the first information is configured to guide the user to move the first terminal to a first area; the first area represents the area where the first terminal is located when the image sensor of the first terminal is able to fully image the first building; Based on the second information, the first height of the first building is determined; the second information represents the sensing parameters of one or more sensors in the first terminal when the first terminal is in the first area; Render the model of the first building based on its first height.

14. An electronic device, characterized in that, include: A first processor and a first memory for storing computer programs capable of running on the processor. Wherein, when the first processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 10.

15. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.

16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.