A method for generating three-dimensional simulated buildings based on images
By performing specification consistency processing and neural network model training on 2D architectural images, 3D architectural scenes are identified and generated, which solves the problem of difficulty in quickly constructing high-simulation 3D architectural scenes in existing technologies and achieves efficient and accurate 3D building generation. .
Patent Information
- Application Number
- CN202310244803.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-14
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2043-03-14
AI Technical Summary
The existing technology lacks a technical solution for quickly constructing corresponding three-dimensional architectural simulation scenes based on two-dimensional plane architectural images, making it difficult to generate highly simulated and realistic three-dimensional architectural scenes.
By performing specification consistency processing, annotation and cropping on 2D architectural overhead images, image features are extracted and the neural network model is trained. The model is used to perform target recognition on application images, feature data is extracted and height and appearance measurements are performed in a 3D simulation environment. Decoration simulation layout, quickly generate three-dimensional buildings.
It achieves accurate recognition of two-dimensional building images of various specifications and rapid three-dimensional simulation generation. It has the advantages of wide application, reduced implementation difficulty and high efficiency.
Smart Images

Figure CN116152458B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer simulation, and in particular to a method for generating three-dimensional simulated buildings based on images. Background Art
[0002] In the prior art, a bird's-eye view image of a ground building can be obtained by shooting images of the ground through satellite remote sensing or by shooting ground images from an aircraft, which is a two-dimensional plane building image.
[0003] In computer simulation applications, it is hoped that the corresponding three-dimensional architectural scenes can be quickly simulated and constructed based on these two-dimensional architectural images taken from overhead, with high simulation fidelity, and can present the local architectural style and the adjacent relationships between buildings, thereby providing an effective solution for quickly constructing three-dimensional architectural simulation scenes with different regional characteristics. Summary of the invention
[0004] The main technical problem solved by the present invention is to provide a method for generating three-dimensional simulated buildings based on images, thereby solving the problem that there is a lack of technical solutions for quickly constructing corresponding three-dimensional building simulation scenes based on two-dimensional plane building images in the prior art.
[0005] In order to solve the above technical problems, a technical solution adopted by the present invention is to provide a method for generating a three-dimensional simulated building based on an image, comprising the steps of:
[0006] Input a two-dimensional building overhead image sample, perform specification consistency processing on the two-dimensional building overhead image sample, and obtain one or more standardized patterns;
[0007] Annotating and cropping the two-dimensional buildings in the standardized pattern to obtain a plurality of two-dimensional building training samples;
[0008] Extracting the image features of the two-dimensional building training samples and inputting them into an initial neural network recognition model to perform recognition training on the two-dimensional building targets in the standardized pattern, and finally obtaining a two-dimensional building recognition neural network model;
[0009] Using the two-dimensional building recognition neural network model to perform target recognition on an application image containing a two-dimensional building shot from above, and extracting two-dimensional building feature data corresponding to the two-dimensional building shot from above from the application image;
[0010] The two-dimensional building feature data is input into a three-dimensional building simulation environment, and the three-dimensional building height and exterior decoration simulation layout is performed using the two-dimensional building feature data as a plane projection to quickly generate a corresponding three-dimensional simulated building.
[0011] Preferably, the specification consistency processing of the two-dimensional building overhead image samples includes making the ratio p1 / k1 of the pixel quantity p1 and the spatial value k1 of different samples equal or nearly equal.
[0012] Preferably, the specification consistency processing of the two-dimensional building overhead image sample includes segmenting the two-dimensional building overhead image sample T1, wherein the horizontal segmentation ratio is n1, the vertical segmentation ratio is m1, and the corresponding standardized patterns with the same number of pixels are obtained; the two-dimensional building overhead image sample T1 is segmented into a set of multiple standardized patterns, namely: Where T 1,1 、T 1,2 , …, They respectively represent normalized patterns with the same number of pixels after segmentation.
[0013] Preferably, the two-dimensional building training sample is represented by J i , where i represents the serial number, and the image features of the two-dimensional building training samples are in The corresponding polygon feature is The corresponding pixel feature is The corresponding is the spatial orientation feature, The corresponding image format.
[0014] Preferably, the initial neural network recognition model includes a first-level feature extraction network, which is used to extract image features from an input image to obtain a feature map. The output result of the first-level feature extraction network also enters a second-level region proposal network for region selection, and then the divided different regions are applied to the feature map to perform region division on the feature map; then the third-level pooling layer performs pooling processing, and the processing results are input in parallel into three recognition networks, namely, a classification recognition network, a border recognition network, and a pixel recognition network, which are respectively used to identify the type of two-dimensional buildings in the image, identify and annotate the borders of each two-dimensional building, and identify the pixels in the two-dimensional building, and then output a recognized image that has been identified and annotated.
[0015] Preferably, the initial neural network recognition model is trained, including setting network parameters and adjusting network configuration; loading pre-trained weights to start network training, saving the weight results obtained from the training, and finally obtaining the required two-dimensional building recognition neural network model.
[0016] Preferably, the application image is represented as Q1, which is segmented into a set of multiple standardized patterns, namely: Where Q 1,1 , Q 1,2 , …, Q m2,n2They respectively represent standardized patterns with the same number of pixels after the application image is segmented, n2 represents a horizontal segmentation ratio of the application image, and m2 represents a vertical segmentation ratio of the application image.
[0017] Preferably, the two-dimensional building feature data is a set of two-dimensional building data corresponding to each segmented standardized pattern of the application image, namely, Q 1,1 , Q 1,2 , …, Q m2,n2 Corresponding to the two-dimensional building data set For any building data subset q in the set e,r , e∈(1,m2), r∈(1,n2), all represent the extracted two-dimensional architectural features with reference to the pixel coordinate system.
[0018] Preferably, the building data subset q e,r Includes multiple identified two-dimensional building objects l j , where j represents the serial number; for any two-dimensional building object l j All of them use pixel coordinate system as reference to represent their data features. in corresponds to a set of multiple pixel coordinates of the two-dimensional building object, A correspondence is a set of pixel values of a plurality of pixels of the two-dimensional building object, The correspondence is the spatial orientation feature.
[0019] Preferably, the two-dimensional building feature data is based on plane projection, and the two-dimensional building object l j Add height feature b4, that is, in the data feature On the basis of increase
[0020] The beneficial effects of the present invention are as follows: the present invention discloses a method for generating three-dimensional simulated buildings based on images, including the steps of: performing specification consistency processing on two-dimensional building overhead image samples to obtain standardized drawings, marking and cropping the two-dimensional buildings therein, and obtaining multiple two-dimensional building training samples; extracting image features of the two-dimensional building training samples, training to obtain a two-dimensional building recognition neural network model, using the model to perform target recognition on application images containing overhead two-dimensional buildings, extracting two-dimensional building feature data and inputting it into a three-dimensional building simulation environment, performing three-dimensional building height and exterior decoration simulation layout, and quickly generating corresponding three-dimensional simulated buildings. The method is suitable for standardized processing of overhead images of two-dimensional buildings of various specifications, can accurately identify the two-dimensional building objects therein, and thereby quickly generate corresponding three-dimensional simulated buildings, and has the advantages of wide application range, reduced implementation difficulty and high efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 is a flow chart of an embodiment of a method for generating a three-dimensional simulated building based on an image according to the present invention;
[0022] Figure 2 It is a schematic diagram of performing standardized segmentation of an image according to another embodiment of the method for generating a three-dimensional simulated building based on an image of the present invention;
[0023] Figure 3 is an illustrative diagram of performing two-dimensional building annotation and cutting on a standardized drawing according to another embodiment of the method for generating three-dimensional simulated buildings based on images of the present invention;
[0024] Figure 4 is a composition diagram of an initial neural network recognition model in another embodiment of the method for generating a three-dimensional simulated building based on an image according to the present invention;
[0025] Figure 5 is a schematic diagram illustrating the outline of two-dimensional building recognition in another embodiment of the method for generating three-dimensional simulated buildings based on images according to the present invention;
[0026] Figure 6 is a schematic diagram illustrating the combination of contours and pixels of two-dimensional building recognition according to another embodiment of the method for generating three-dimensional simulated buildings based on images of the present invention;
[0027] Figure 7 is a schematic illustration of a building white model generated based on two-dimensional building feature data in another embodiment of the method for generating a three-dimensional simulated building based on an image according to the present invention;
[0028] Figure 8 is a schematic illustration of a three-dimensional building generated based on a building white model in another embodiment of the method for generating a three-dimensional simulated building based on an image according to the present invention;
[0029] Fig. 9 is a schematic diagram of the basic form of the top of a building in another embodiment of the method for generating a three-dimensional simulated building based on an image according to the present invention;
[0030] Fig.10 It is a schematic diagram of two implementation forms of the building top according to another embodiment of the image-based three-dimensional simulated building generation method of the present invention. DETAILED DESCRIPTION
[0031] In order to facilitate the understanding of the present invention, the present invention is described in more detail below in conjunction with the accompanying drawings and specific embodiments. Preferred embodiments of the present invention are provided in the accompanying drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described in this specification. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
[0032] It should be noted that, unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used in this specification includes any and all combinations of one or more related listed items.
[0033] Figure 1 A flowchart of an embodiment of a method for generating a three-dimensional simulated building based on an image is shown, comprising the steps of:
[0034] Step S1: input a two-dimensional building overhead image sample, perform specification consistency processing on the two-dimensional building overhead image sample, and obtain one or more standardized patterns;
[0035] Step S2: labeling and cutting the two-dimensional buildings in the standardized pattern to obtain a plurality of two-dimensional building training samples;
[0036] Step S3: extracting the image features of the two-dimensional building training samples, inputting them into the initial neural network recognition model to perform recognition training on the two-dimensional building targets in the standardized pattern, and finally obtaining a two-dimensional building recognition neural network model;
[0037] Step S4: using the two-dimensional building recognition neural network model to perform target recognition on the application image containing the overhead two-dimensional building, and extracting the two-dimensional building feature data corresponding to the overhead two-dimensional building from the application image;
[0038] Step S5: input the two-dimensional building feature data into a three-dimensional building simulation environment, use the two-dimensional building feature data as a plane projection basis, perform three-dimensional building height and exterior decoration simulation layout, and quickly generate a corresponding three-dimensional simulated building.
[0039] In step S1, for a two-dimensional building overhead image sample T1, it includes at least two parameters, namely, pixel quantity p1 and spatial value k1, wherein the pixel quantity represents the number of image pixels of the sample, and the spatial value represents the area of the actual space presented by the sample, which is correspondingly expressed as T1(p1,k1). It is usually hoped that the pixel quantity p1 is as large as possible and the spatial value k1 is as small as possible, so that the pixel quantity per unit area of the image sample is larger, that is, the larger the ratio p1 / k1 of the pixel quantity p1 and the spatial value k1, the higher the image resolution of the image sample.
[0040] Preferably, the acquired two-dimensional building overhead image samples T1 have multiple sources, such as remote sensing images taken by remote sensing satellites, aerial images taken by aircraft, and drone close-up overhead images taken by commercial drones at close range. When there are two-dimensional building overhead image samples from multiple sources, it is necessary to perform specification consistency processing on these samples from different sources.
[0041] Preferably, in step S1, the specification consistency processing of the two-dimensional building overhead image samples is to make the ratio p1 / k1 of the pixel quantity p1 and the spatial value k1 of different samples equal or nearly equal. Therefore, in the application, it is usually necessary to classify the images according to their different sources to ensure the requirements of specification consistency processing. And the images can also be compressed or interpolated to reduce or increase the pixel quantity of the adjusted image samples;.
[0042] In addition, there is a minimum threshold requirement for the ratio p1 / k1 of the pixel quantity p1 and the spatial value k1. This is because if the ratio is too small, the resolution of the two-dimensional building will be reduced, making it difficult to accurately identify the outline, color, height, type and other features of the two-dimensional building. It is also impossible to distinguish the two-dimensional building from surface objects such as roads, rivers, bridges, trees, and poles, and thus it is impossible to accurately mark and identify the two-dimensional building.
[0043] Preferably, in step S1, the two-dimensional building overhead image samples are processed for specification consistency, and the image samples are processed for uniform pixel size, such as dividing the image with a larger pixel amount into a plurality of standardized patterns with the same pixel amount size, while ensuring that the corresponding spatial values are the same or close. The standardized pattern thus obtained has not only the same or close ratio p1 / k1 of the pixel amount p1 and the spatial value k1, but also the same or close pixel amount p1 itself, and the same or close corresponding spatial value k1 itself.
[0044] Preferably, Figure 2 As shown in the figure, the standardized segmentation of an image with a large number of pixels is schematically illustrated. Figure 2 In the example, the pixel quantity p1 of the two-dimensional building overhead image sample T1 is obtained by multiplying the horizontal pixel number x1 and the vertical pixel number y1, that is, p1=x1y1. Then, the two-dimensional building overhead image sample T1 is segmented, where the horizontal segmentation ratio is n1, for example Figure 2 Where n1=7, the longitudinal division ratio is m1, for example Figure 2 Where m1=3, the number of horizontal pixels x2=x1 / n1 and the number of vertical pixels y2=y1 / m1 corresponding to the standardized pattern of the same pixel size. Therefore, the two-dimensional building overhead image sample T1 can be segmented into a set of multiple standardized patterns, namely: Where T1,1 、T 1,2 , …, They respectively represent normalized patterns with the same number of pixels after segmentation.
[0045] Since these patterns are presented based on pixels, they can be represented by the pixel coordinate system, that is, the coordinate value and pixel value corresponding to each pixel. Figure 2 The lower left corner of the image is the origin of the pixel coordinate value. The horizontal coordinate increases to the right by one pixel. For example, the maximum value is 1024, which means there are 1024 pixels in the horizontal direction. The vertical coordinate increases upward by one pixel. For example, the maximum value is 768, which means there are 768 pixels in the vertical direction. Therefore, the position coordinates of each pixel in an image with a pixel size of 1024×768 can be determined by such a pixel coordinate value. Then, based on the coordinates, the pixel value is represented by the three primary colors (R, G, B).
[0046] Preferably, when the two-dimensional building overhead image sample is divided into multiple standardized patterns, this pixel coordinate system is also used for pixel representation of each standardized pattern. This is conducive to unified standardization processing and is also conducive to processing each standardized pattern and then recombining them, thereby realizing the processing of the two-dimensional building overhead image sample.
[0047] Combined with step S2, Figure 3 An example of two-dimensional building annotation and cropping of the standardized pattern is shown, and it can be seen that there are multiple two-dimensional building training samples 11 to 18. These two-dimensional building training samples are all outlined with polygons, including the number of sides, side lengths and outline shapes of the polygons. The pixel features of these two-dimensional building training samples include white pixels, blue pixels, gray-white mixed pixels and other features. There are also spatial orientation features of the layout of these two-dimensional building training samples, which can be determined based on the spatial orientation of the captured image in the map, such as determining the azimuth of each edge of the training sample with the true north pointing as the 0 angle reference.
[0048] Therefore, when the two-dimensional building training sample is represented by J i , where i represents the serial number, indicating that there are multiple different two-dimensional building training samples. Furthermore, there are also corresponding image features representing the two-dimensional building training samples in The corresponding feature is a polygon, including multiple parameter values, such as the number of sides of the polygon (such as a single-sided circle, an ellipse, a double-sided semicircle, a three-sided triangle, etc.), the length of each side (the length can be expressed in pixels), and the shape of the outline (such as a circle, an ellipse, a semicircle, a triangle, a quadrilateral, etc.); The corresponding pixel features include the number of pixels (or pixel percentage, that is, the percentage of the number of pixels of the sample to the total number of pixels of the standardized pattern), the color value of the pixel, the actual space size corresponding to a single pixel, etc. The correspondence is a spatial orientation feature, including the orientation angles of each edge; The corresponding image format is jpg, tiff and other different image storage formats.
[0049] In step S2, as many two-dimensional building training samples as possible are obtained, and then in step S3, the image features of these two-dimensional building training samples are extracted, that is, the image features of each two-dimensional building training sample are obtained. Then, these two-dimensional building training samples are used to train the initial neural network recognition model, so that the setting parameters of the initial neural network recognition model are continuously adjusted, and finally the two-dimensional building targets can be accurately identified from the standardized patterns, thereby obtaining the corresponding two-dimensional building recognition neural network model.
[0050] Preferably, the initial neural network recognition model is as follows Figure 4 As shown, the image recognition network is mainly constructed with convolutional neural network as the main body, including a first-level feature extraction network N1, which is used to extract image features from the input image to obtain a feature map N2. The output result of the first-level feature extraction network N1 also enters the second-level region proposal network N3 for region selection, and then the divided different regions are applied to the feature map N2, that is, the feature map N2 is divided into regions, and then the third-level pooling layer N4 is used for pooling processing. The processing results are input in parallel to three recognition networks, namely, the classification recognition network N5, the border recognition network N6, and the pixel recognition network N7, which are respectively used to identify the type of two-dimensional buildings in the image, identify and annotate the borders of each two-dimensional building, and identify and divide the pixels in the two-dimensional building, and then output the recognized and annotated recognition image.
[0051] Preferably, the first-level feature extraction network N1 may be a RestNet convolutional neural network, which is used to extract the two-dimensional building features in the image and obtain the segmentation result of the two-dimensional building. For example, it may be a ResNet18, ResNet34, ResNet50, ResNet101 and ResNet152 network.
[0052] Preferably, the second-level region proposal network N3 corresponds to RPN (Region proposal network), which is used to perform a two-dimensional building target frame regression operation on each candidate region, generate a two-dimensional building target regression frame and obtain the category possibility size. Specifically, the second-level region proposal network N3 is used to scan the feature map N2 and try to determine the area containing the two-dimensional building target. For example, the RPN network convolves feature maps of different scales and generates 3 anchors at each position, wherein 3×4 convolution kernels (including building color and background) are generated for the two-dimensional building. Two fully connected layers are connected after the convolution kernel to complete the discrimination of the foreground (target) and background (background) of each pixel, as well as the regression correction of the two-dimensional building target frame.
[0053] Preferably, the corresponding third-level pooling layer N4 may be a target region pooling network (Region Of Interest Pooling) or a ROI Align network. The pooling process corresponding to the ROIPooling network includes quantizing and rounding the boundary coordinates of the target region; then dividing the region into m*m units, and quantizing and rounding the boundaries of these units again. These quantization operations will cause a certain deviation between the boundary values and the initial boundary values, which may not affect the classification, but it will affect the accuracy of the segmentation.
[0054] The pooling process corresponding to ROI Align cancels the quantization and rounding operation of the boundary coordinates, and uses bilinear interpolation to calculate the precise feature values corresponding to the boundaries in m*m units, thereby converting the target area pooling process into a continuous operation. The specific operations are: 1. Traverse each target area without quantizing the boundaries. 2. Divide each target area into m*m units, and the boundaries of each unit are not quantized. 3. Calculate the values of the four coordinate positions in each unit through bilinear interpolation. 4. Perform the maximum value pooling operation on each unit to obtain a feature map of size m*m.
[0055] Preferably, for the classification recognition network N5, the corresponding one may be a Fully-Convolutional Network (FCN) for predicting the two-dimensional building category.
[0056] Preferably, for the frame recognition network N6, the corresponding network may be a fully convolutional network (FCN), which is used to generate regression frames corresponding to the two-dimensional building shapes.
[0057] Preferably, the pixel recognition network N7 may correspond to a fully convolutional network (FCN), for example, it may include 4 consecutive convolutional layers and one deconvolution layer. Each convolution layer has a kernel size of 3×3 and 256 channels, followed by a deconvolution layer with a 2-fold upsampling, which is used to predict the binary pixel value of each two-dimensional building target.
[0058] Therefore, the final recognition image outputs three recognition results: the category of the target, the regression box coordinates of the target, and the pixel value of the target.
[0059] In step S3, the initial neural network recognition model is trained using the two-dimensional building training samples, mainly including setting network parameters and adjusting network configuration, such as initializing learning rate, number of epochs (a complete data set passes through the neural network model once and returns once, and this process is called an epoch), etc.; loading pre-trained weights to start training the network, and saving the weight results obtained from the training. Finally, the required two-dimensional building recognition neural network model is obtained.
[0060] During the training process, by continuously optimizing and adjusting the network configuration and parameters, the two-dimensional building training samples must first be accurately identified, and then the image samples used for inspection and verification are input for detection and verification to evaluate the accuracy and reliability of the two-dimensional building recognition neural network model in detecting two-dimensional buildings. Figure 5 The coordinates of the two-dimensional building regression boxes output after detecting and identifying the two-dimensional building training samples during the training process are shown, indicating that the recognition accuracy is very good. Figure 6 The coordinates of the 2D building regression box and the pixel values in the regression box are displayed after the 2D building training samples are detected and recognized during the training process, which also shows that the recognition accuracy is very good. This is just a schematic display. In actual applications, other 2D buildings in the image are also accurately recognized, with good coverage, covering more than 96% of the 2D buildings in the image.
[0061] Preferably, in step S4, the application image to be detected and identified also needs to be segmented into a plurality of standardized patterns, and then input into a two-dimensional building recognition neural network model for two-dimensional building target recognition.
[0062] Preferably, you can refer to Figure 2 In the embodiment, the image is represented as Q1, which is segmented into a set of multiple standardized patterns, namely: Where Q 1,1 , Q 1,2 , …, They respectively represent the standardized patterns with the same number of pixels after the application image is segmented, and have the same number of pixels as the standardized patterns corresponding to the samples in the training process. n2 represents the horizontal segmentation ratio of the application image, and m2 represents the vertical segmentation ratio of the application image.
[0063] Furthermore, the two-dimensional building feature data obtained in step S4 is based on each segmented standardized pattern, which corresponds to a two-dimensional building data set, namely Q 1,1 , Q 1,2 , …, Corresponding to the two-dimensional building data set For any building data subset q in the set e,r , e∈(1,m2), r∈(1,n2), all represent the extracted two-dimensional architectural features with reference to the pixel coordinate system.
[0064] Preferably, continue with Figure 6 For example, if the figure represents a subset of building data q extracted and identified from a standardized pattern after image segmentation e,r , the building data subset q e,r Includes multiple identified two-dimensional building objects l j , where j represents the sequence number, such as Figure 6 There are l1 to l8 identified two-dimensional building objects shown in FIG. j All of them use pixel coordinate system as reference to represent their data features. in It corresponds to a set of multiple pixel coordinates of the two-dimensional building object. The combination of these pixel coordinates together constitutes the outline of the two-dimensional building object and the pixel composition inside the outline. For example It can be expressed as Among them, (x1', y1') represents the coordinate value corresponding to a pixel in the two-dimensional building object, and the other coordinates have the same meaning. Here, g1 coordinates are shared to correspond to g1 pixels. It corresponds to a set of pixel values of multiple pixels of the two-dimensional building object, and each pixel value represents the color value of the pixel, for example It can be expressed as in The pixel value corresponding to a pixel in the two-dimensional building object may include three values of the three primary colors of red, green and blue, so it is represented by a vector here. Other pixel values have the same meaning, which corresponds to the pixel value of g1 pixels here. Correspondence is a spatial orientation feature, which can be defined by the clockwise angle between the direction of the line connecting two pixel coordinates relative to the north direction, for example Indicates that the clockwise angle between the line connecting the coordinates (x1', y1') to (x2', y2') and the north direction is α.
[0065] Preferably, in step S5, the obtained two-dimensional building feature data is combined with a segmented standardized pattern, and the corresponding building data subset contains a plurality of identified two-dimensional building objects, which are data features established with reference to a pixel coordinate system, and the data features can be combined with a specific orientation for geographic spatial layout. Therefore, the two-dimensional building feature data can be input into a three-dimensional space simulation environment for spatial simulation processing.
[0066] Preferably, the two-dimensional building feature data is used as a plane projection basis to project the two-dimensional building object l j Add height feature b4, that is, in the data feature On the basis of increase The height feature b4 can be randomly generated or set according to the type of building. Figure 7 As shown, it is shown that the building white model 19 is generated in the three-dimensional simulation environment after adding height features based on the plane projection of the two-dimensional building feature data.
[0067] Further preferably, Figure 8 As shown, the generated building white model can be further increased with building wall decoration 20 and building top decoration 21, and the simulated building exterior decoration can be reasonably selected according to the geographical environment required for the simulation or a corresponding exterior decoration material database can be constructed for selection and use.
[0068] Preferably, the decoration of the building top can be realized by modeling simulation, that is, constructing the basic form of the building top, such as Fig. 9 As shown, it includes a round top 31, a flat top 32, a herringbone top 33, a four-slope top 34, a folded top 35, a single-slope top 36, etc.
[0069] Preferably, the style of the building top can be constructed by combining multiple forms based on the basic form. Fig.10 As shown, after the two-dimensional building projection outline 41 is generated as a building white model, the style of the building top can have a combination of multiple basic forms, wherein the top diagram 42 includes a combination of a herringbone top and a four-slope top, and the top diagram 43 includes a combination of a herringbone top and a plane top. Therefore, by constructing multiple basic forms of buildings and then combining them for use, various building top decorations can be enriched, so that the building top can adapt to the local architectural style, construction age, etc.
[0070] Similarly, the wall decoration of the building is similar to the aforementioned building top decoration. It can also be enriched by constructing a variety of basic forms and then selecting and / or combining them to enrich the diversity of wall decoration and adapt it to the architectural style and age of the region where the simulated building is located, thereby creating a more realistic simulation environment.
[0071] It can be seen that the present invention discloses a method for generating three-dimensional simulated buildings based on images, including the steps of: performing specification consistency processing on two-dimensional building overhead image samples to obtain standardized drawings, marking and cropping the two-dimensional buildings therein, and obtaining multiple two-dimensional building training samples; extracting image features of the two-dimensional building training samples, training to obtain a two-dimensional building recognition neural network model, using the model to perform target recognition on application images containing overhead two-dimensional buildings, extracting two-dimensional building feature data and inputting it into a three-dimensional building simulation environment, performing three-dimensional building height and exterior decoration simulation layout, and quickly generating corresponding three-dimensional simulated buildings. This method is suitable for standardized processing of overhead images of two-dimensional buildings of various specifications, can accurately identify the two-dimensional building objects therein, and thereby quickly generate corresponding three-dimensional simulated buildings, and has the advantages of wide application range, reduced implementation difficulty and high efficiency.
[0072] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structural transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for generating a three-dimensional simulated building based on an image, characterized in that: Includes steps: Input a two-dimensional building overhead image sample, perform specification consistency processing on the two-dimensional building overhead image sample, and obtain one or more standardized patterns; Annotating and cropping the two-dimensional buildings in the standardized pattern to obtain a plurality of two-dimensional building training samples; Extracting the image features of the two-dimensional building training samples and inputting them into an initial neural network recognition model to perform recognition training on the two-dimensional building targets in the standardized pattern, and finally obtaining a two-dimensional building recognition neural network model; Using the two-dimensional building recognition neural network model to perform target recognition on an application image containing a two-dimensional building shot from above, and extracting two-dimensional building feature data corresponding to the two-dimensional building shot from above from the application image; Input the two-dimensional building feature data into a three-dimensional building simulation environment, use the two-dimensional building feature data as a plane projection, perform three-dimensional building height and exterior decoration simulation layout, and quickly generate a corresponding three-dimensional simulated building; The specification consistency processing of the two-dimensional building overhead image samples includes making the ratio p1 / k1 of the pixel quantity p1 and the spatial value k1 of different samples equal or nearly equal; The initial neural network recognition model includes a first-level feature extraction network, which is used to extract image features from an input image to obtain a feature map; the output result of the first-level feature extraction network also enters the second-level region proposal network for region selection, and then the divided different regions are applied to the feature map to perform region division on the feature map; and then the third-level pooling layer performs pooling processing, and the processing results are input in parallel to three recognition networks, namely, a classification recognition network, a border recognition network, and a pixel recognition network, which are respectively used to identify the type of two-dimensional buildings in the image, identify and annotate the borders of each two-dimensional building, and identify the pixels in the two-dimensional building, and then output a recognized image after identification and annotation.
2. The method for generating a three-dimensional simulated building based on an image according to claim 1, characterized in that: The specification consistency processing of the two-dimensional building overhead image sample includes segmenting the two-dimensional building overhead image sample T1, wherein the horizontal segmentation ratio is n1 and the vertical segmentation ratio is m1, and the standardized pattern with the same number of pixels is obtained; The two-dimensional building overhead image sample T1 is divided into a set of multiple standardized patterns, namely: in They respectively represent a plurality of normalized patterns having the same number of pixels after segmentation.
3. The method for generating a three-dimensional simulated building based on images according to claim 2, characterized in that: The two-dimensional building training sample is represented by J i , where i represents the serial number, and the image features of the two-dimensional building training samples are in The corresponding polygon feature is The corresponding pixel feature is The corresponding is the spatial orientation feature, The corresponding image format.
4. The method for generating a three-dimensional simulated building based on images according to claim 1, characterized in that: The initial neural network recognition model is trained, including setting network parameters and adjusting network configuration; loading pre-trained weights to start network training, saving the weight results obtained from the training, and finally obtaining the desired two-dimensional building recognition neural network model.
5. The method for generating a three-dimensional simulated building based on images according to claim 4, characterized in that: The application image is represented as Q1, which is segmented into a set of multiple standardized patterns, namely: in They respectively represent standardized patterns with the same number of pixels after the application image is segmented, n2 represents a horizontal segmentation ratio of the application image, and m2 represents a vertical segmentation ratio of the application image.
6. The method for generating a three-dimensional simulated building based on images according to claim 5, characterized in that: The two-dimensional building feature data is based on the application image with each segmented standardized pattern as the object, and each corresponds to a two-dimensional building data set, that is, Corresponding to the two-dimensional building data set For any building data subset q in the set e,r , e∈(1,m2), r∈(1,n2), all represent the extracted two-dimensional architectural features with reference to the pixel coordinate system.
7. The method for generating a three-dimensional simulated building based on images according to claim 6, characterized in that: The building data subset q e,r Includes multiple identified two-dimensional building objects l j , where j represents the serial number; for any two-dimensional building object l j All of them use pixel coordinate system as reference to represent their data features. in corresponds to a set of multiple pixel coordinates of the two-dimensional building object, A correspondence is a set of pixel values of a plurality of pixels of the two-dimensional building object, The correspondence is the spatial orientation feature.
8. The image-based three-dimensional simulated building generation method according to claim 7, characterized in that: The two-dimensional building feature data is the basis for plane projection, and the two-dimensional building object l j Add height feature b4, that is, in the data feature On the basis of increase
