A model replacement method and storage medium for visual building
By providing a visual building model replacement method in urban planning, the server automatically completes model replacement and issues overlapping prompts, solving the problem that users need to manually observe and confirm the effect of model replacement, reducing the user's work burden and observation time.
Patent Information
- Application Number
- CN202111482694.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2041-12-07
AI Technical Summary
During the urban planning process, users need to manually observe and confirm the model replacement effect of buildings and vegetation in large-scale areas, resulting in a long observation time and increasing the work burden of users.
Provide a visual architectural model replacement method, automatically complete model replacement through a server, and issue a prompt when the replacement model overlaps with other models, reducing the content that users need to observe.
An automated model replacement process is realized, reducing the user's observation time and work burden, allowing users to only focus on overall landscape changes without paying attention to details.
Smart Images

Figure CN114202626B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of building models, and in particular to a model replacement method and storage medium for visualizing a building. Background Art
[0002] With the development of technology, the reference materials for urban planning are no longer two-dimensional maps, but three-dimensional electronic models.
[0003] The current mainstream method of building a 3D model is to obtain data through oblique photography by drones, and then build a 3D model of the city based on the data. In addition, a single building or tree can be separated from the 3D model in a monomeric way to form an independent model. The independent building model or tree module can be displayed separately or recombined with the 3D model to provide convenience for subsequent users. For example, users who are interested in houses can only extract the house data they are interested in, without having to extract the surrounding environment data they are not interested in; users who are interested in road networks can only extract the road network data they are interested in.
[0004] Regarding the above-mentioned related technologies, the inventor believes that in the planning process, changes are often made to buildings, roads or green plants, which is reflected in the three-dimensional model by replacing the original model with a preset model. After the replacement is completed, manual observation is required to see whether the effect meets the expectations. When replacing buildings and vegetation in large areas, users are required to observe on their own, which results in a long observation time. Summary of the invention
[0005] In order to reduce the user's observation content, the present application provides a model replacement method and storage medium for a visualized building.
[0006] In a first aspect, the present application provides a method for replacing a model of a visualized building, which adopts the following technical solution:
[0007] A model replacement method for a visualized building comprises the following steps:
[0008] Acquire a replacement instruction based on a preset trigger condition, wherein the replacement instruction includes first model information and second model information;
[0009] Matching the replacement object model information stored in the preset model database with the first model information to determine the replacement object model corresponding to the first model information;
[0010] Determine a replacement area in the preset three-dimensional model according to the second model information, and determine an area adjacent to the replacement area as a comparison area;
[0011] Overlay the replacement model into the replacement area;
[0012] Determine whether there is overlap between the replacement model and the comparison model corresponding to the comparison area,
[0013] If there is overlap between the replacement model and the comparison model corresponding to the comparison area, a prompt is issued.
[0014] By adopting the above technical solution, the user only needs to determine the first model information corresponding to the replacement model and the second model information corresponding to the replaced model. The server automatically completes the replacement between the corresponding replacement model and the replaced model, and automatically issues a prompt when the replacement model overlaps with other comparison models, so that the user can understand the overlapping situation in time, so that the user only needs to pay attention to the overall landscape changes after the replacement without paying attention to the details, thereby reducing the content that the user needs to observe and reducing the user's workload.
[0015] Optionally, the second model information includes first location information.
[0016] Dividing a plurality of lot areas on the three-dimensional model based on a preset division method, wherein each lot area corresponds to a second lot information;
[0017] Determining a replacement area in a preset three-dimensional model according to the second model information includes the following steps:
[0018] The corresponding second section information is matched according to the first section information, and the section area corresponding to the second section information is defined as a replacement area.
[0019] By adopting the above technical solution, the three-dimensional model is divided into sections, and different sections must correspond to several monomer models in the three-dimensional model, which facilitates the unified replacement of several monomer models in one section.
[0020] Optionally, the lot area includes a road area, a building area and a vegetation area;
[0021] Dividing a plurality of area sections on the three-dimensional model based on a preset division method includes the following steps:
[0022] Get a simulated image of the 3D model from a bird's-eye view.
[0023] Identify roads, buildings and vegetation in the simulated image based on the real-scene images stored in the preset image database;
[0024] Dividing the simulated image into a plurality of mapping circles according to the roads, buildings and vegetation in the simulated image, wherein each mapping circle includes only one of the roads, buildings and vegetation;
[0025] A corresponding lot area is formed in the three-dimensional model according to the position of the mapping circle in the mapping diagram.
[0026] By adopting the above technical solution, the lot areas are divided into roads, buildings and vegetation, so that the model type in each vegetation area is single, which is convenient for users to quickly replace the same type of model directly according to the lot area without having to click on the models one by one to make a selection.
[0027] Optionally, dividing the simulated image into a plurality of mapping circles according to roads, buildings and vegetation in the simulated image further includes the following steps:
[0028] Delineating a road path in the simulated image according to the contour of the road;
[0029] Determine whether there is a single building or a single vegetation in the closed area surrounded by the road path;
[0030] If there is a single building or a single vegetation in the closed area surrounded by the road path, the closed area is regarded as a mapping circle;
[0031] If there are both buildings and vegetation in the closed area surrounded by the road path, corresponding mapping circles are drawn according to the outlines of the buildings and vegetation in the closed area;
[0032] The road path is segmented to form a plurality of mapping circles.
[0033] By adopting the above technical solution, the roads with the highest distribution range are preferentially identified, and the roads are used as preliminary boundaries to form multiple closed areas, and then several mapping circles are formed in each closed area to minimize the formation of mapping circles that only circle a single model.
[0034] Optionally, segmenting the road path to form a plurality of mapping circles comprises the following steps:
[0035] Divide the road path into multiple sections according to the forks;
[0036] determining in sequence whether the length of the road section exceeds a preset minimum length;
[0037] If the length of the road segment exceeds the shortest length, the road segment is segmented to form sub-segments whose length is less than the shortest length, and the contour of the sub-segment is used as a mapping circle;
[0038] If the length of the road segment is less than or equal to the shortest length, the outline of the current road segment is used as a mapping circle.
[0039] By adopting the above technical solution, when the road length is too long, it is seldom to directly change the entire road in reality, so it is necessary to further divide the road sections so that the long road sections form multiple mapping circles.
[0040] Optionally, segmenting the road segment includes the following steps:
[0041] Divide the length of the road section by the shortest length to obtain the quotient, and convert the quotient into the number of segments;
[0042] The length of the road section is divided by the number of sections to get the length of each section;
[0043] According to the length of the sub-sections, the sub-sections are cut out from one end of the section to the other end.
[0044] By adopting the above technical solution, after the number of segments is obtained, the length of each section is obtained by the section length, so that the length of each section is average and close to the shortest length, so that the range of the formed mapping circle is moderate.
[0045] Optionally, before determining whether there is overlap between the replacement model and the comparison model corresponding to the comparison area, the following steps are included:
[0046] Determine the contrast model based on the type of contrast area.
[0047] When the type of the comparison area is a road area, a cross section of the road area is obtained, and a comparison model is generated by stretching the cross section;
[0048] When the type of the comparison area is a vegetation area, a projection of the vegetation in the vegetation area on a horizontal plane is obtained, a cross section covering the projection is generated based on the projection, and a comparison model is generated by stretching the cross section;
[0049] When the type of the comparison area is a building area, a building model corresponding to the building area is obtained, and the building model is enlarged according to a preset safety distance to generate a comparison model.
[0050] By adopting the above technical solution, for different types of regions, since the types of models in the regions are also different, different methods are needed to convert the models into comparison models, thereby improving the accuracy of overlapping judgment between the comparison model and the replacement model.
[0051] In a second aspect, the present application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and execute any of the above-mentioned methods for replacing a model of a visualized building.
[0052] In summary, the present application includes at least one of the following beneficial technical effects: the server automatically completes the replacement between the corresponding replacement model and the replaced model according to the replacement instruction, and automatically issues a prompt when the replacement model overlaps with other comparison models, so that the user can understand the overlapping situation in time, so that the user only needs to pay attention to the overall landscape changes after the replacement without paying attention to the details, thereby reducing the content that the user needs to observe and reducing the user's workload. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a flowchart of an embodiment of the present application. DETAILED DESCRIPTION
[0054] The following is combined with Figure 1 This application is described in further detail.
[0055] The embodiment of the present application discloses a model replacement method for a visualized building, which is applied in a server. A three-dimensional model and a feature database for storing real-scene models are pre-established in the server, wherein the three-dimensional model is generated in a dedicated modeling software using images collected by oblique photography of a drone, and the buildings, vegetation, etc. in the three-dimensional model are formed into a single model by a monomeric method, and the single model can be displayed independently or reassembled into the three-dimensional model. The real-scene model stored in the feature database can be generated by the user through the modeling software, or imported from an external database. In this embodiment, the real-scene model in the feature database is mainly based on the data imported from the external database, and the user manually adds buildings and plants unique to the area, thereby improving the applicability of the feature database.
[0056] A model replacement method for visualizing buildings, referring to Figure 1 , including the following steps:
[0057] S100: Acquire a replacement instruction based on a preset trigger condition, wherein the replacement instruction includes first model information and second model information.
[0058] The first model information corresponds to the real scene model in the feature database, and the second model information corresponds to the monomer model in the three-dimensional model. The first model information includes a number representing the corresponding real scene model, and the second model information includes second section information representing the geographical area where the corresponding monomer model is located in the three-dimensional model.
[0059] The preset trigger condition is that the user determines a real scene model and a single model respectively after the virtual button of "model replacement" is triggered. The user determines the real scene model or the single model by directly clicking on the corresponding model to obtain the corresponding number, or by inputting the corresponding number in the text box. In this embodiment, the user inputs the corresponding number in the text box to determine the real scene model or the single model, so as to avoid the user wasting time searching among many models.
[0060] In addition, after the virtual button "Model Replacement" is triggered, the user can also select multiple real-life models and multiple single models to achieve simultaneous replacement of multiple groups of models. However, it should be noted that the user needs to complete the pairing between the real-life model and the single model. For example, after the user clicks on a real-life model and a single model in turn, and then clicks on the real-life model and single model of the second group, the server automatically matches the adjacent real-life models and single models.
[0061] Before the preset trigger conditions are met, the corresponding geographical areas need to be divided on the three-dimensional model.
[0062] In one embodiment, multiple area segments are divided on the three-dimensional model based on a preset division method, and the specific steps are as follows:
[0063] S110: Acquire a simulated image of the three-dimensional model from a top-down perspective.
[0064] S120: Identify roads, buildings and vegetation in the simulation image based on the real scene images stored in the preset image database.
[0065] The real-life images stored in the preset image database are divided into three categories, corresponding to roads, buildings, and vegetation. Real-life images are images generated by drones shooting real objects from a bird's-eye view in the air. After the real-life images are acquired, users manually classify them according to the type of real objects.
[0066] The server identifies roads, buildings and vegetation from the simulated image based on the real image. There are two ways to identify them. The first is to match similar patterns in the simulated image based on the three types of real images in turn to define roads, buildings and vegetation. The second is to identify independent patterns in the simulated image first, then compare them with the three types of real images in turn, and select the category corresponding to the closest real image as the definition of the pattern.
[0067] S130: Divide the simulated image into a plurality of mapping circles according to the roads, buildings and vegetation in the simulated image.
[0068] Each mapping circle includes only one of roads, buildings and vegetation.
[0069] The simulation image is divided into a plurality of mapping circles according to roads, buildings and vegetation in the simulation image, including the following steps:
[0070] The road path is delineated according to the road contour in the simulation image.
[0071] Determine whether there is a single building or a single vegetation in the closed area surrounded by the road path;
[0072] If there is a single building or a single vegetation in the closed area surrounded by the road path, the closed area is regarded as a mapping circle, that is, multiple buildings or multiple vegetation correspond to one mapping circle.
[0073] If there are both buildings and vegetation in the closed area surrounded by the road path, corresponding mapping circles are drawn according to the outlines of the buildings and vegetation in the closed area, that is, a single building or a single vegetation corresponds to a mapping circle.
[0074] The road path is divided according to the forks to form multiple sections, and the outline of each section is a mapping circle.
[0075] Each mapping circle is given an identification information after being generated. The identification information includes the pattern category in the mapping circle and the number corresponding to the mapping circle. The pattern category is one of buildings, vegetation and roads. Different mapping circles have different numbers, so the number can also play a role in positioning.
[0076] In addition, in order to reduce the size of the mapping circle corresponding to the road, the shortest length is preset in the server, and the server further divides the road segment according to the shortest length, including the following steps:
[0077] Determine whether the length of the road segment exceeds the minimum length.
[0078] If the length of the road section exceeds the shortest length, the road section is segmented to form sub-segments whose lengths are less than the shortest length, and the contours of the sub-segments are used as a mapping circle.
[0079] If the length of the road segment is less than or equal to the shortest length, the outline of the current road segment is used as a mapping circle.
[0080] In one embodiment, segmenting a road segment comprises the following steps:
[0081] Divide the length of the road section by the shortest length to get the quotient. If the quotient is not a positive integer, round it up to use it as the number of segments. If the quotient is a positive integer, use it directly as the number of segments.
[0082] The length of the section is divided by the number of sections to get the length of each section.
[0083] According to the length of the sub-sections, the sub-sections are cut out from one end of the section to the other end.
[0084] S140: forming a corresponding segment area in the three-dimensional model according to the position of the mapping circle in the mapping image.
[0085] Each lot area corresponds to a second lot information; the second lot information includes identification information of the corresponding mapping circle.
[0086] The lot area includes a road area, a building area and a vegetation area. The road area corresponds to a mapping circle that only includes roads, the building area corresponds to a mapping circle that only includes buildings, and the vegetation area corresponds to a mapping circle that only includes vegetation.
[0087] S200: Match the replacement object model information stored in the preset model database with the first model information to determine the replacement object model corresponding to the first model information.
[0088] The first model information quickly completes the matching with the replacement model information in the model database according to the number. Once the user does not enter the correct number when entering the first model information, the server will have a matching error or fail to match any replacement model, and the server will issue an alarm to remind the user to enter the correct number again.
[0089] S300: Determine a replacement area in a preset three-dimensional model according to the second model information, and determine an area adjacent to the replacement area as a comparison area.
[0090] In one embodiment, determining a replacement area in a preset three-dimensional model according to the second model information includes the following steps:
[0091] The corresponding second section information is matched according to the first section information, and the section area corresponding to the second section information is defined as a replacement area.
[0092] The first location information is actually input by the user in the text box according to the second location information. Therefore, as long as the user does not make an input error, the first location information can certainly be matched to the corresponding second location information.
[0093] S400: Cover the replacement object model in the replacement area.
[0094] Before replacement, first determine whether there is a single model in the replacement area. If there is no single model, determine the coverage position of the replacement model according to the number in the identification information, and complete the combination of the replacement model and the three-dimensional model. If there is a single model, first clear the single model in the replacement area, and then replace the replacement model.
[0095] S500: Determine whether there is overlap between the replacement object model and the comparison model corresponding to the comparison area.
[0096] The purpose of judging whether there is overlap between the replacement model and the comparison model corresponding to the comparison area is to judge whether the replacement model will interfere with the adjacent comparison model after replacing the original single model, thereby assisting the user to make a more reasonable plan.
[0097] S600: If there is overlap between the replacement model and the comparison model corresponding to the comparison area, a prompt is issued.
[0098] The prompts include issuing a pop-up window warning and wrapping a red film on the surface of the duplicate replacement model.
[0099] If there is no overlap between the replacement model and the comparison model corresponding to the comparison area, the replacement model is displayed normally.
[0100] If there is an overlap between the replacement model and the comparison model corresponding to the comparison area, a pop-up warning will be issued, the identification information of the replacement model in the overlapping area will be synchronously displayed in the pop-up window, and the surface of the overlapping replacement model will be wrapped with a red film to facilitate users to find it quickly.
[0101] In one embodiment, before determining whether there is overlap between the replacement model and the comparison model corresponding to the comparison area, the following steps are included:
[0102] The contrast model is determined according to the type of the contrast region. Different types of contrast regions have different ways of generating contrast models.
[0103] When the type of the comparison area is a road area, a cross section of the road area is obtained, and a comparison model is generated by stretching the cross section.
[0104] When the type of the comparison area is a vegetation area, the projection of the vegetation in the vegetation area on the horizontal plane is obtained, a cross section covering the projection is generated based on the projection, and the comparison model is generated by stretching the cross section.
[0105] When the type of the comparison area is a building area, a building model corresponding to the building area is obtained, and the building model is enlarged according to a preset safety distance to generate a comparison model.
[0106] The embodiment of the present application further discloses a computer-readable storage medium storing a computer program that can be loaded by a processor and execute any of the above-mentioned methods for replacing a model of a visualized building.
[0107] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.
Claims
1. A model replacement method for a visualized building, characterized in that: The following steps are involved: Acquire a replacement instruction based on a preset trigger condition, wherein the replacement instruction includes first model information and second model information; Matching the replacement object model information stored in the preset model database with the first model information to determine the replacement object model corresponding to the first model information; Determine a replacement area in the preset three-dimensional model according to the second model information, and determine an area adjacent to the replacement area as a comparison area; Overlay the replacement model into the replacement area; Determine whether there is overlap between the replacement model and the comparison model corresponding to the comparison area, If there is an overlap between the replacement model and the comparison model corresponding to the comparison area, a prompt is issued; the second model information includes the first section information, Divide a plurality of area sections on the three-dimensional model based on a preset division method; The lot area includes road area, building area and vegetation area; Dividing a plurality of area sections on the three-dimensional model based on a preset division method includes the following steps: Get a simulated image of the 3D model from a bird's-eye view. Identify roads, buildings and vegetation in the simulated image based on the real-scene images stored in the preset image database; Dividing the simulated image into a plurality of mapping circles according to the roads, buildings and vegetation in the simulated image, wherein each mapping circle includes only one of the roads, buildings and vegetation; A corresponding lot area is formed in the three-dimensional model according to the position of the mapping circle in the mapping diagram.
2. A method for replacing a model of a visualized building according to claim 1, characterized in that: Each lot area corresponds to a second lot information; Determining a replacement area in a preset three-dimensional model according to the second model information includes the following steps: The corresponding second section information is matched according to the first section information, and the section area corresponding to the second section information is defined as a replacement area.
3. The method for replacing a model of a visualized building according to claim 1, characterized in that: Dividing the simulated image into a plurality of mapping circles according to roads, buildings and vegetation in the simulated image also includes the following steps: Delineating a road path in the simulated image according to the contour of the road; Determine whether there is a single building or a single vegetation in the closed area surrounded by the road path; If there is a single building or a single vegetation in the closed area surrounded by the road path, the closed area is regarded as a mapping circle; If there are both buildings and vegetation in the closed area surrounded by the road path, corresponding mapping circles are drawn according to the outlines of the buildings and vegetation in the closed area; The road path is segmented to form a plurality of mapping circles.
4. A method for replacing a model of a visualized building according to claim 3, characterized in that: The road path is segmented to form a plurality of mapping circles, comprising the following steps: Divide the road path into multiple sections according to the forks; determining in sequence whether the length of the road section exceeds a preset minimum length; If the length of the road segment exceeds the shortest length, the road segment is segmented to form sub-segments whose length is less than the shortest length, and the contour of the sub-segment is used as a mapping circle; If the length of the road segment is less than or equal to the shortest length, the outline of the current road segment is used as a mapping circle.
5. A method for replacing a model of a visualized building according to claim 4, characterized in that: Segmenting the road segments includes the following steps: Divide the length of the road section by the shortest length to obtain the quotient, and convert the quotient into the number of segments; The length of the road section is divided by the number of sections to get the length of each section; According to the length of the sub-sections, the sub-sections are cut out from one end of the section to the other end.
6. The method for replacing a model of a visualized building according to claim 1, characterized in that: Before determining whether there is overlap between the replacement model and the comparison model corresponding to the comparison area, the following steps are included: Determine the contrast model based on the type of contrast area. When the type of the comparison area is a road area, a cross section of the road area is obtained, and a comparison model is generated by stretching the cross section; When the type of the comparison area is a vegetation area, a projection of the vegetation in the vegetation area on a horizontal plane is obtained, a cross section covering the projection is generated based on the projection, and a comparison model is generated by stretching the cross section; When the type of the comparison area is a building area, a building model corresponding to the building area is obtained, and the building model is enlarged according to a preset safety distance to generate a comparison model.
7. A computer-readable storage medium, characterized in that: The computer program is stored which can be loaded by a processor and executes the model replacement method for visualizing a building according to any one of claims 1 to 6.
Citation Information
Patent Citations
Customizable indoor three-dimensional scene editing method, device and system and storage medium
CN113052983A