A method for automatically assigning house numbers in a real three-dimensional city
Through deep learning-based mobile terminal shooting and 3D city model matching technology, the low efficiency and low precision of manual house number assignment in real-life 3D city modeling have been solved, and automated and intelligent house number assignment has been achieved, improving work efficiency and recognition accuracy.
Patent Information
- Application Number
- CN202211225438.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-09
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-10-09
AI Technical Summary
In the existing technology, the process of assigning house numbers in real-life 3D city modeling relies on manual field surveys and data entry, resulting in paper waste, high workload, and low efficiency. In addition, the existing algorithms are simple and fail to effectively solve the problems of house number recognition and verification.
A house number recognition model based on deep learning is used in combination with mobile terminals to take close-up and long-range photos. The location information is matched with the three-dimensional city model, and the house number is automatically assigned through texture matching and verification.
It realizes paperless, low-intensity and efficient automatic assignment of house numbers, improves work efficiency, ensures recognition accuracy and reliability, and reduces manual labor.
Smart Images

Figure CN115482348B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of real-scene three-dimensional city modeling, and in particular to a method for automatically assigning house numbers in a real-scene three-dimensional city. Background Art
[0002] House numbers are a building's legal identifier and address code, and are a crucial attribute of a building. During real-world 3D city modeling, it's necessary to assign house numbers to individual buildings. This involves adding the building's real-world house number to the corresponding 3D model. Existing technology typically uses manual methods, combining field surveys with indoor manual data entry.
[0003] The existing technical solution adopts the method of field investigation + indoor manual input, such as Figure 1 Shown, including:
[0004] 1) Working base map production stage: First, a two-dimensional map is exported from the real-life three-dimensional city model and printed into a paper map as the working base map for the field survey.
[0005] 2) Field investigation stage: Investigators will match the actual buildings with the buildings in the working base map one by one, and register the house numbers on the working base map.
[0006] 3) Indoor data entry stage: Match the buildings in the working base map with the individual buildings in the 3D model one by one, and manually enter the house numbers into the attribute list of the individual buildings.
[0007] However, this method has many defects, such as:
[0008] ①During the work base map production stage, printing paper maps requires a large amount of paper, which causes waste and is not environmentally friendly.
[0009] During the field survey phase, investigators need to carry multiple paper maps to the field, which they frequently retrieve, unfold, fold, and organize. They also need to match and register real-world buildings with those in the working base map. During the indoor data entry phase, they need to match buildings in the working base map with individual buildings in the 3D model, and manually enter the building numbers into the attribute lists of the individual buildings, requiring a large number of characters to be entered. These factors increase workload and reduce efficiency.
[0010] CN110598681A discloses a method for identifying house numbers in natural street scenes, comprising the following steps: S1: obtaining a house number image to be identified; S2: performing pixel compression processing on the house number image, then inputting the house number image into a trained convolutional neural network to identify the house number; S3: outputting the house number. However, the method only discloses simple house number image recognition, with a relatively simple algorithm, and does not disclose manual intervention when an error is reported.
[0011] CN106296815A discloses a method for constructing and displaying an interactive three-dimensional digital city. It is achieved in two ways: the first is to construct and display a realistic three-dimensional digital city, and the second is to construct and display a modeled three-dimensional digital city. The first is to use a camera to shoot a panoramic image, map the panoramic image onto a three-dimensional sphere, simulate the movement trajectory of a person in spatial order, and replace the panoramic image at the corresponding coordinate position on the sphere in real time, and display it to the user; the second is to use pre-compiled CAD standard blocks to draw two-dimensional CAD completion drawings of existing buildings and new buildings, assign values to the corresponding blocks, output the two-dimensional graphics and three-dimensional models of the buildings, integrate them in a two-dimensional space and a three-dimensional space according to the coordinates, and display them to the user; it requires pre-compiled standard blocks, and does not consider the recognition and verification of house numbers;
[0012] Currently, no effective solutions have been proposed for the problems in related technologies. Summary of the Invention
[0013] In response to the problems in the related art, the present invention proposes a method for automatically assigning house numbers in a real three-dimensional city to overcome the above-mentioned technical problems existing in the existing related art.
[0014] To this end, the specific technical solutions adopted in the present invention are as follows:
[0015] A method for automatically assigning house numbers in a real-life three-dimensional city, the method comprising the following steps:
[0016] S1. Obtaining a close-up photo, a long-range photo, and location information of a building through a mobile terminal; wherein a counter T is set to 0;
[0017] S2. Extracting the house number in the close-up photo using a house number recognition model based on deep learning;
[0018] S3, matching the location information with the three-dimensional city model to determine the corresponding target building;
[0019] S4, performing texture matching between the facade image of the target building and the distant view photo;
[0020] S5. Determine whether to automatically assign the house number to the target building based on the matching result.
[0021] Furthermore, the method of obtaining the close-up photo, the long-range photo and the location information of the building through the mobile terminal includes the following steps:
[0022] S11. Use a mobile device to take a close-up photo of only a single house number in front of the building;
[0023] S12, obtaining and saving the latitude and longitude of the location where the close-up photo was taken;
[0024] S13, obtaining and saving the direction in which the close-up photo was taken, which is recorded as the true azimuth;
[0025] S14. Taking a long-range photo that covers the building facade to the greatest extent possible;
[0026] The location information includes latitude, longitude and true azimuth.
[0027] Furthermore, the method of extracting the house number in the close-up photo using a house number recognition model based on deep learning includes the following steps:
[0028] S21, using a Haar cascade classifier to detect, locate, and extract the position of the house number in the close-up photo, and cropping the close-up photo into a house number image;
[0029] S22, pre-processing the house number image to obtain a high-definition character image;
[0030] S23: Input the character image into the trained house number recognition model based on deep learning for recognition and extraction, and output the house number in character format.
[0031] Furthermore, the pre-processing of the house number image to obtain a high-definition character image includes the following steps:
[0032] S221, performing grayscale processing on the house number image to obtain a grayscale image;
[0033] S222, performing thresholding processing on the grayscale image using a mean-adaptive binary segmentation method;
[0034] S223, performing image erosion on the grayscale image after thresholding to remove the border of the house number in the image;
[0035] S224 , dilating the eroded grayscale image to obtain a character image.
[0036] Furthermore, matching the location information with the three-dimensional city model to determine the corresponding target building includes the following steps:
[0037] S31, converting the latitude and longitude values into coordinate data of a three-dimensional city model;
[0038] S32, converting the true azimuth into the north azimuth of the three-dimensional city model coordinates;
[0039] S33. Using the coordinate data as a starting point and the north azimuth as a direction, search for the first intersecting single building in the three-dimensional city model based on a spatial relative position relationship, and use the search result as a target building.
[0040] Furthermore, texture matching is performed on the facade image of the target building and the distant view photo, including the following steps:
[0041] S41, obtaining an exterior facade image of the target building in the three-dimensional city model;
[0042] S42, performing grayscale processing on both the facade image and the distant view image, and unifying their grayscale levels and image sizes, to obtain a facade grayscale image and a distant view grayscale image respectively;
[0043] S43, decomposing the facade grayscale image and the distant view grayscale image into frequency domain components using discrete Fourier transform;
[0044] S44, respectively calculating the grayscale co-occurrence matrix of the facade grayscale image and the distant view grayscale image, and calculating the eigenvalues of each;
[0045] S45, calculating the similarity between the feature values of the facade grayscale image and the feature values of the distant view grayscale image using Euclidean distance;
[0046] S46 , comparing the similarity value between the facade grayscale image and the distant view grayscale image with a preset threshold to obtain a texture matching result.
[0047] Furthermore, the gray level co-occurrence matrices of the facade grayscale image and the distant grayscale image are calculated respectively, and their respective eigenvalues are calculated, including the following steps:
[0048] S441: The frequency domain components of the facade grayscale image and the distant view grayscale image include a plurality of spectrograms, and each of the spectrograms selects four directions to construct a co-occurrence matrix;
[0049] S442, respectively calculating the texture parameters of each co-occurrence matrix in each of the spectrograms;
[0050] S443. Calculate the average value of the same texture parameter in the same direction of all the spectrum images to represent the grayscale co-occurrence matrix of the four directions of the spectrum components, and use it as the eigenvalue of both the facade grayscale image and the distant view grayscale image.
[0051] Furthermore, the respectively calculating of the texture parameters of each co-occurrence matrix in each of the spectrum graphs comprises the following steps:
[0052] S4421. Calculate the main diagonal moment of inertia of the single-directional co-occurrence matrix in the spectrum graph. The formula is:
[0053]
[0054] Where G represents the main diagonal moment of inertia;
[0055] h and k represent the coordinate values of the co-occurrence matrix M(h, k);
[0056] m hk Represents the value of the element at (h, k);
[0057] S4422. Calculate the angular second-order moment of the single-directional co-occurrence matrix in the spectrum graph. The formula is:
[0058]
[0059] Where, J represents the second-order angular moment;
[0060] S4423. Calculate the entropy of the single-directional co-occurrence matrix in the spectrum graph. The formula is:
[0061]
[0062] Where S represents entropy;
[0063] S4424. Calculate the correlation of the single-directional co-occurrence matrix in the spectrum graph. The formula is:
[0064]
[0065] Where C represents the correlation;
[0066] μ x 、μ y Represents m x 、m y The mean of
[0067] σ x , σ y Represents m x 、m y The standard deviation of
[0068] and
[0069] Furthermore, the calculating of the similarity between the feature value of the facade grayscale image and the feature value of the distant view grayscale image by using the Euclidean distance comprises the following steps:
[0070] S451. Calculate the similarity distance in each direction between the eigenvalues of the facade grayscale image and the eigenvalues of the distant view grayscale image using the Euclidean distance formula. The formula is:
[0071]
[0072] Where a represents the grayscale image of the facade;
[0073] b represents the distant grayscale image;
[0074] Represents the similarity distance between two images in one direction, and the similarity distances in the other three directions are and
[0075] G a , G b Respectively represent the main diagonal moment of inertia of the single-direction co-occurrence matrix in the facade grayscale image and the distant grayscale image;
[0076] J a 、J b They represent the angular second-order moment of the single-directional co-occurrence matrix in the facade grayscale image and the distant grayscale image respectively;
[0077] S a 、S b Respectively represent the entropy of the single-directional co-occurrence matrix in the facade grayscale image and the distant grayscale image;
[0078] C a 、C b Respectively represent the correlation of single-direction co-occurrence matrices in the facade grayscale image and the distant grayscale image;
[0079] S452: Calculate the similarity between the eigenvalues of the facade grayscale image and the distant grayscale image by combining the similarity distances in the four directions of the eigenvalues. The formula is:
[0080]
[0081] Where D represents the similarity between two images;
[0082] α, β, ω, and ρ all represent weighting coefficients, and α+β+ω+ρ=1.
[0083] Furthermore, the step of confirming whether to automatically assign the house number to the target building according to the matching result includes the following steps:
[0084] S51. If the match is successful, the house number is subjected to a standard verification with the house numbers of buildings surrounding the target building. If the verification is successful, the house number is automatically added to the target building attribute list. If the verification is unsuccessful, a manual check is performed to verify the final house number, and the verified house number is automatically added to the target building attribute list.
[0085] S52. If the match fails, the counter T=T+1. When T<3, return to step S2. When T=3, manually check and assign the house number manually, and automatically add the house number to the target building attribute list.
[0086] The beneficial effects of the present invention are:
[0087] 1. By building a house number collection system based on smart mobile terminals, the location and orientation of the photo location can be automatically recorded when taking photos of house numbers, and house number character recognition can be completed automatically in batches with one click. The correspondence between the system and the three-dimensional city map can be automatically calculated and verified, thereby achieving automatic assignment of the real scene to the corresponding target building in the three-dimensional city. This system has the functional advantages of being paperless, low in workload, and significantly improving work efficiency.
[0088] 2. Through distributed hybrid calculation based on discrete Fourier transform and grayscale image co-occurrence matrix, high-precision texture feature extraction of real-life building images and three-dimensional building images is performed, and then block distribution calculation is performed on them, effectively reducing the grayscale level during calculation, thereby reducing the complexity of system calculation and operation, greatly improving the computational efficiency of image texture feature extraction and image similarity calculation and matching, while ensuring the accuracy of building image recognition and matching, and maximizing the efficiency of automatic replication of real-life buildings.
[0089] 3. By taking close-up and long-range photos of real buildings, comprehensive information such as the building's house number, geographical location, building orientation, and building facade can be obtained. Through two independent yet interconnected image processing systems, the association between the real building and the 3D city model is established, thus completing the intelligent and automated assignment of the real building to the 3D city model, significantly reducing the workload and difficulty of manual participation.
[0090] 4. First, texture matching is performed on the facade image of the target building and the distant photo to determine the house number. Then, the successfully matched house number is subjected to standard verification with the house numbers of the buildings surrounding the target building. When the verification is successful, the house number is automatically added to the target building attribute list, that is, the identified house number is verified twice, thereby ensuring the reliability of the identified house number. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0092] Figure 1 It is the process of assigning values between real-scene buildings and three-dimensional buildings in the existing technology;
[0093] Figure 2 The present invention is a flowchart of a method for automatically assigning house numbers in a real three-dimensional city according to an embodiment of the present invention. DETAILED DESCRIPTION
[0094] According to an embodiment of the present invention, a method for automatically assigning house numbers in a real three-dimensional city is provided.
[0095] The present invention will now be further described with reference to the accompanying drawings and specific embodiments. Figure 2 As shown, according to an embodiment of the present invention, the method for automatically assigning house numbers in a real three-dimensional city includes the following steps:
[0096] S1. Obtaining a close-up photo, a long-range photo, and location information of a building through a mobile terminal; wherein a counter T is set to 0;
[0097] The location information includes latitude, longitude and true azimuth, and step S1 includes the following steps:
[0098] S11. Use a mobile device to take a close-up photo of only a single house number in front of the building;
[0099] S12, obtaining and saving the latitude and longitude of the location where the close-up photo was taken;
[0100] S13, obtaining and saving the direction in which the close-up photo was taken, which is recorded as the true azimuth;
[0101] S14. Taking a long-range photo that covers the building facade to the greatest extent possible;
[0102] In addition, the technical requirements for taking close-up photos are:
[0103] a) Take a photo of the house number within 3 meters and directly in front of it to ensure a clear image;
[0104] b) Try to keep the tablet computer parallel to the wall to which the doorplate is attached;
[0105] c) Only take a picture of one house number at a time.
[0106] Technical requirements for taking long-range photos: Take photos of the building facade from any position, make the image clear, and try to cover the building facade as much as possible.
[0107] S2. Extracting the house number in the close-up photo using a house number recognition model based on deep learning, comprising the following steps:
[0108] S21, using a Haar cascade classifier to detect, locate, and extract the position of the house number in the close-up photo, and cropping the close-up photo into a house number image;
[0109] Leveraging the rectangular nature of house numbers, various regions within the close-up photo to be inspected are screened to extract the desired house number image region. Haar features are primarily categorized as edge features, linear features, center features, and diagonal features. Haar models trained on extensive datasets effectively filter target image regions by cascading multiple different basic features. Therefore, cascading multiple weak classifiers can significantly improve the retrieval accuracy of house number border regions.
[0110] S22, pre-processing the house number image to obtain a high-definition character image, comprising the following steps:
[0111] S221, performing grayscale processing on the house number image to obtain a grayscale image;
[0112] Grayscale processing of house number images can reduce the impact of pixel differences and floating-point operations on processing efficiency;
[0113] S222, performing thresholding processing on the grayscale image using a mean-adaptive binary segmentation method;
[0114] By using the grayscale difference between the object and the background in the image to threshold the image, the uneven image brightness caused by lighting problems can be solved.
[0115] S223, performing image erosion on the grayscale image after thresholding to remove the border of the house number in the image;
[0116] S224 , performing dilation processing on the eroded grayscale image to obtain a character image.
[0117] S23: Input the character image into the trained house number recognition model based on deep learning for recognition and extraction, and output the house number in character format.
[0118] The house number recognition model consists of two convolutional layers, two pooling layers, one flattening layer, and four fully connected layers. The convolutional layer contains multiple filters, and the ReLU activation function is used after convolution to increase the nonlinearity of the convolutional neural network, enabling the model to better fit the data and better solve more complex problems. The max-pooling operation is used in the pooling layer to reduce the feature dimension of the image. Through the flattening operation, the image samples are converted into one-dimensional vectors, connected to four fully connected layers, and finally output through the Softmax function.
[0119] S3, matching the location information with the three-dimensional city model to determine the corresponding target building, including the following steps:
[0120] S31, converting the latitude and longitude values into coordinate data of a three-dimensional city model;
[0121] S32, converting the true azimuth into the north azimuth of the three-dimensional city model coordinates;
[0122] S33. Using the coordinate data as a starting point and the north azimuth as a direction, search for the first intersecting single building in the three-dimensional city model based on a spatial relative position relationship, and use the search result as a target building.
[0123] The coordinates and position information of the three-dimensional city model in the present invention are acquired and constructed using CGCS2000, a three-dimensional national geodetic coordinate system whose origin is located at the center of mass of the Earth. The application of modern space technology for topographic mapping and positioning can greatly improve the accuracy of point expression and quickly obtain accurate three-dimensional geocentric coordinates, which can meet the needs of the present invention for rapid and accurate positioning of urban buildings.
[0124] S4, performing texture matching on the facade image of the target building and the distant view photo, comprising the following steps:
[0125] S41, obtaining an exterior facade image of the target building in the three-dimensional city model;
[0126] S42, performing grayscale processing on both the facade image and the distant view image, and unifying their grayscale levels and image sizes, to obtain a facade grayscale image and a distant view grayscale image respectively;
[0127] S43, decomposing the facade grayscale image and the distant view grayscale image into frequency domain components using discrete Fourier transform;
[0128] The Fourier transform decomposes an image's signal in frequency space into a superposition of multiple low-frequency and high-frequency signals. For texture images, the focus is primarily on the image's high-frequency information. Therefore, the Fourier transform can record information such as the direction and depth of the texture's veins. The discrete Fourier transform decomposes an image into its distinct frequency domain components, exhibiting properties such as separability, linearity, symmetry, translational invariance, rotational invariance, and energy invariance, making it crucial for image processing. In this invention, the discrete Fourier transform is used to convert the texture features of a grayscale image into spectral features, narrowing the feature distribution range and thereby reducing computational complexity.
[0129] S44, respectively calculating the grayscale co-occurrence matrix of the facade grayscale image and the distant view grayscale image, and calculating the eigenvalues of each, including the following steps:
[0130] S441: The frequency domain components of the facade grayscale image and the distant view grayscale image include a plurality of spectrograms, and each of the spectrograms selects four directions to construct a co-occurrence matrix;
[0131] S442, respectively calculating the texture parameters of each co-occurrence matrix in each of the spectrograms;
[0132] The step of respectively calculating the texture parameters of each co-occurrence matrix in each of the spectrum graphs comprises the following steps:
[0133] S4421. Calculate the main diagonal moment of inertia of the single-directional co-occurrence matrix in the spectrum graph. The formula is:
[0134]
[0135] Where G represents the main diagonal moment of inertia (reflecting the clarity of the image and the depth of the texture grooves. The deeper the texture grooves, the greater the main diagonal moment of inertia and the better the visual clarity of the image).
[0136] h and k represent the coordinate values of the co-occurrence matrix M(h, k);
[0137] m hk Represents the value of the element at (h, k);
[0138] S4422. Calculate the angular second-order moment of the single-directional co-occurrence matrix in the spectrum graph. The formula is:
[0139]
[0140] Where J represents the angular second-order moment (reflecting the uniformity of the image grayscale distribution, the angular second-order moment of coarse texture is larger, while the angular second-order moment of fine texture is smaller);
[0141] S4423. Calculate the entropy of the single-directional co-occurrence matrix in the spectrum graph. The formula is:
[0142]
[0143] Where S represents entropy (reflecting the amount of information in the image and indicating the complexity of the texture. If the image has no texture, the entropy value is close to 0);
[0144] S4424. Calculate the correlation of the single-directional co-occurrence matrix in the spectrum graph. The formula is:
[0145]
[0146] Where C represents the correlation (which measures the linear dependence of neighborhood grayscale and is used to measure the similarity of the elements of the spatial grayscale co-occurrence matrix in the row or column direction);
[0147] μ x 、μ y Represents m x 、m y The mean of
[0148] σ x , σ y Represents m x 、m y The standard deviation of
[0149] and
[0150] S443. Calculate the average value of the same texture parameter in the same direction of all the spectrum images to represent the grayscale co-occurrence matrix of the four directions of the spectrum components, and use it as the eigenvalue of both the facade grayscale image and the distant view grayscale image.
[0151] S45, calculating the similarity between the eigenvalues of the facade grayscale image and the eigenvalues of the distant view grayscale image using Euclidean distance, comprising the following steps:
[0152] S451. Calculate the similarity distance in each direction between the eigenvalues of the facade grayscale image and the eigenvalues of the distant view grayscale image using the Euclidean distance formula. The formula is:
[0153]
[0154] Where a represents the grayscale image of the facade;
[0155] b represents the distant grayscale image;
[0156] Represents the similarity distance between two images in one direction, and the similarity distances in the other three directions are and
[0157] G a , G b Respectively represent the main diagonal moment of inertia of the single-direction co-occurrence matrix in the facade grayscale image and the distant grayscale image;
[0158] J a 、J b They represent the angular second-order moment of the single-directional co-occurrence matrix in the facade grayscale image and the distant grayscale image respectively;
[0159] S a 、S b Respectively represent the entropy of the single-directional co-occurrence matrix in the facade grayscale image and the distant grayscale image;
[0160] C a 、C b Respectively represent the correlation of single-direction co-occurrence matrices in the facade grayscale image and the distant grayscale image;
[0161] S452: Calculate the similarity between the eigenvalues of the facade grayscale image and the distant grayscale image by combining the similarity distances in the four directions of the eigenvalues. The formula is:
[0162]
[0163] Where D represents the similarity between two images;
[0164] α, β, ω, and ρ all represent weighting coefficients, and α+β+ω+ρ=1.
[0165] S46 , comparing the similarity value between the facade grayscale image and the distant view grayscale image with a preset threshold to obtain a texture matching result.
[0166] S5. Confirming whether to automatically assign the house number to the target building based on the matching result, including the following steps:
[0167] S51. If the match is successful, the house number is subjected to a standard verification with the house numbers of buildings surrounding the target building. If the verification is successful, the house number is automatically added to the target building attribute list. If the verification is unsuccessful, a manual check is performed to verify the final house number, and the verified house number is automatically added to the target building attribute list.
[0168] S52. If the match fails, the counter T=T+1. When T<3, return to step S2. When T=3, manually check and assign the house number manually, and automatically add the house number to the target building attribute list.
[0169] The matching process and matching results are both determined by the similarity between the facade grayscale image and the distant grayscale image. The lower the value, the higher the similarity between the two. In the application process in different cities or different scenarios, the value can be set according to the actual usage scenario, or set according to specific experimental verification. After setting the similarity value threshold, when the similarity is lower than the threshold, the real-life building is determined to match the three-dimensional building, and the value is automatically assigned. The house number is compared with the house numbers of the buildings around the target building for standard verification. For example, the surrounding buildings are in the range of No. 1108-1200, XX Road. If the identified house number is within the range of the house numbers of the surrounding buildings, the standard verification is successful. Otherwise, the verification is unsuccessful, that is, a secondary verification is performed to ensure the reliability of the house number. When the matching fails for three times in total, it is verified through manual inspection.
[0170] To sum up, with the help of the above technical solution of the present invention, by constructing a house number collection system based on an intelligent mobile terminal, when taking a photo of the house number, the location and orientation information of the photo taking location can be automatically recorded, and house number character recognition can be completed automatically in batches with one click. The correspondence calculation and correspondence verification between the house number and the three-dimensional city map can be automatically performed, thereby realizing the automatic assignment of the real scene and the corresponding target building in the three-dimensional city, and having the functional advantages of paperless, low work intensity, and significantly improved work efficiency.
[0171] Through distributed hybrid calculation based on discrete Fourier transform and grayscale image co-occurrence matrix, high-precision texture feature extraction of real-life building images and three-dimensional building images is performed, and then block distribution calculation is performed on them, effectively reducing the grayscale level during calculation, thereby reducing the complexity of system calculation and operation, greatly improving the computational efficiency of image texture feature extraction and image similarity calculation and matching, while ensuring the accuracy of building image recognition and matching, and maximizing the efficiency of automatic replication of real-life buildings.
[0172] By taking close-up and long-range photos of real buildings respectively, it is possible to obtain comprehensive information such as the house number, geographical location, building orientation and building facade of the real building. Through two independent and interconnected image processing systems, the correlation between the real building and the three-dimensional city model is established, thereby completing the intelligent and automated assignment of real buildings to the three-dimensional city model, greatly reducing the amount of labor and difficulty of manual participation.
[0173] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for automatically assigning house numbers in a real three-dimensional city, characterized in that: The method comprises the following steps: S1. Obtaining a close-up photo, a long-range photo, and location information of a building through a mobile terminal, wherein a counter T is set to 0. Step S1 includes the following sub-steps: S11. Using a mobile terminal, take a close-up photo containing only a single house number directly in front of the building; S12, obtaining and saving the latitude and longitude of the location where the close-up photo was taken; S13, obtaining and saving the direction in which the close-up photo was taken, which is recorded as the true azimuth; S14. Taking a long-range photo that covers the building facade to the greatest extent possible; Wherein, the location information includes latitude, longitude and true azimuth; S2. Extracting the house number in the close-up photo using a house number recognition model based on deep learning; S3, matching the location information with the three-dimensional city model to determine the corresponding target building; S4, performing texture matching on the facade image of the target building and the distant view photo; Step S4 includes the following steps: S41, obtaining an exterior facade image of the target building in the three-dimensional city model; S42, performing grayscale processing on both the facade image and the distant view image, and unifying their grayscale levels and image sizes, to obtain a facade grayscale image and a distant view grayscale image respectively; S43, decomposing the facade grayscale image and the distant view grayscale image into frequency domain components using discrete Fourier transform; S44, respectively calculating the gray level co-occurrence matrix of the facade gray image and the distant gray image, and calculating the eigenvalues of each; wherein step S44 includes the following sub-steps: S441: The frequency domain components of the facade grayscale image and the distant view grayscale image include a plurality of spectrograms, and each of the spectrograms selects four directions to construct a co-occurrence matrix; S442, respectively calculating the texture parameters of each co-occurrence matrix in each of the spectrograms; S443, calculating the average value of the same texture parameter in the same direction of all the spectrum graphs to represent the gray level co-occurrence matrix of the four directions of the spectrum component, and using it as the eigenvalue of both the facade grayscale image and the distant view grayscale image; S45, calculating the similarity between the feature values of the facade grayscale image and the feature values of the distant view grayscale image using Euclidean distance; S46, comparing the similarity value between the facade grayscale image and the distant view grayscale image with a preset threshold to obtain a texture matching result; S5. Confirming whether to automatically assign the house number to the target building based on the matching result, including the following steps: S51. If the match is successful, the house number is subjected to a standard verification with the house numbers of buildings surrounding the target building. If the verification is successful, the house number is automatically added to the target building attribute list. If the verification is unsuccessful, a manual check is performed to verify the final house number, and the verified house number is automatically added to the target building attribute list. S52. If the match fails, the counter T=T+1. When T<3, return to step S2. When T=3, manually check and assign the house number manually, and automatically add the house number to the target building attribute list.
2. The method for automatically assigning house numbers in a real three-dimensional city according to claim 1, characterized in that: The method of extracting the house number from the close-up photo using a house number recognition model based on deep learning includes the following steps: S21, using a Haar cascade classifier to detect, locate, and extract the position of the house number in the close-up photo, and cropping the close-up photo into a house number image; S22, pre-processing the house number image to obtain a high-definition character image; S23: Input the character image into the trained house number recognition model based on deep learning for recognition and extraction, and output the house number in character format.
3. The method for automatically assigning house numbers in a real three-dimensional city according to claim 2, characterized in that: The pre-processing of the house number image to obtain a high-definition character image includes the following steps: S221, performing grayscale processing on the house number image to obtain a grayscale image; S222, performing thresholding processing on the grayscale image using a mean-adaptive binary segmentation method; S223, performing image erosion on the grayscale image after thresholding to remove the border of the house number in the image; S224 , performing dilation processing on the eroded grayscale image to obtain a character image.
4. The method for automatically assigning house numbers in a real three-dimensional city according to claim 3, characterized in that: The matching of the location information with the three-dimensional city model to determine the corresponding target building includes the following steps: S31, converting the latitude and longitude values into coordinate data of a three-dimensional city model; S32, converting the true azimuth into the north azimuth of the three-dimensional city model coordinates; S33. Using the coordinate data as a starting point and the north azimuth as a direction, search for the first intersecting single building in the three-dimensional city model based on a spatial relative position relationship, and use the search result as a target building.
5. The method for automatically assigning house numbers in a real three-dimensional city according to claim 1, characterized in that: The step of respectively calculating the texture parameters of each co-occurrence matrix in each of the spectrum graphs comprises the following steps: S4421. Calculate the main diagonal moment of inertia of the single-directional co-occurrence matrix in the spectrum graph. The formula is: Where G represents the main diagonal moment of inertia; h and k represent the coordinate values of the co-occurrence matrix M(h, k); m hk Represents the value of the element at (h, k); S4422. Calculate the angular second-order moment of the single-directional co-occurrence matrix in the spectrum graph. The formula is: Where, J represents the angular second moment; S4423. Calculate the entropy of the single-directional co-occurrence matrix in the spectrum graph. The formula is: Where S represents entropy; S4424. Calculate the correlation of the single-directional co-occurrence matrix in the spectrum graph. The formula is: Where C represents the correlation; μ x 、μ y Represents m x 、m y The mean of σ x , σ y Represents m x 、m y The standard deviation of and 6. The method for automatically assigning house numbers in a real three-dimensional city according to claim 5, characterized in that: The method of calculating the similarity between the feature values of the facade grayscale image and the feature values of the distant view grayscale image using the Euclidean distance comprises the following steps: S451. Calculate the similarity distance in each direction between the eigenvalues of the facade grayscale image and the eigenvalues of the distant view grayscale image using the Euclidean distance formula. The formula is: Where a represents the grayscale image of the facade; b represents the distant grayscale image; Represents the similarity distance between two images in one direction, and the similarity distances in the other three directions are and G a , G b Respectively represent the main diagonal moment of inertia of the single-direction co-occurrence matrix in the facade grayscale image and the distant grayscale image; J a 、J b They represent the angular second-order moment of the single-directional co-occurrence matrix in the facade grayscale image and the distant grayscale image respectively; S a 、S b Respectively represent the entropy of the single-directional co-occurrence matrix in the facade grayscale image and the distant grayscale image; C a 、C b Respectively represent the correlation of single-direction co-occurrence matrices in the facade grayscale image and the distant grayscale image; S452: Calculate the similarity between the eigenvalues of the facade grayscale image and the distant grayscale image by combining the similarity distances in the four directions of the eigenvalues. The formula is: Where D represents the similarity between two images; α, β, ω, and ρ all represent weighting coefficients, and α+β+ω+ρ=1.
Citation Information
Patent Citations
Interactive 3D digital city construction and display method
CN106296815A
Natural streetscape house number identification method
CN110598681A
Robot positioning method based on monocular camera assistance
CN110827353A
Method and device for displaying interest point identification
CN111694921A