A post-classification building change detection method based on semantic edges
Through a post-classification method based on semantic edges, combined with edge extraction model, KNN algorithm and affine transformation, the problem of building change detection in remote sensing images of different resolutions and sources is solved, and efficient and accurate change detection and detail retention of contour edges is achieved.
Patent Information
- Application Number
- CN202111295237.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-03
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2041-11-03
AI Technical Summary
The prior art is difficult to efficiently detect changes in buildings in remote sensing images of different resolutions and sources, and traditional methods require a large amount of manual annotation and sample annotation time.
The post-classification method based on semantic edges is adopted to learn the edge features of the building through the edge extraction model, and feature points are extracted using the KNN algorithm, affine transformation and image registration are performed, and finally the synthetic image is obtained through pixel point expansion and addition for change detection.
It realizes efficient detection of building changes in remote sensing images of different sources and resolutions, reduces the workload of sample labeling, solves the image offset problem, and improves the accuracy of building contour edges.
Smart Images

Figure CN114066829B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of change detection of buildings in remote sensing images, and in particular, relates to a change detection method of post-classified buildings based on semantic edges. Background Art
[0002] With the increase of urban construction, higher requirements are placed on the level of government governance. Change detection of buildings in the city can not only detect illegal buildings in a timely manner, but also play an important role in maintaining the sustainable development of the city. However, traditional building change detection is often achieved through manual labeling, which is not only very time-consuming and labor-intensive, but also unable to manually label large areas of the city. With the research on change detection algorithms, it is also possible to realize building change detection in large urban areas.
[0003] Nowadays, algorithms for building change detection are often divided into two categories: (1) post-classification-based methods; (2) end-to-end direct detection-based methods. End-to-end change detection algorithms are generally implemented through neural networks. Currently, all neural networks for change detection require a large number of labeled samples to achieve a satisfactory result. Therefore, the algorithm discussed in this article belongs to the first category. However, unlike the previous post-classification method, with the development of neural networks, the accuracy of building extraction and classification has reached a gratifying level, which also makes it possible to realize change detection algorithms based on neural network post-classification.
[0004] Previous change detection algorithms often fail to achieve a satisfactory level of accuracy, and are unable to detect changes in remote sensing images from two different sources. As deep learning methods gradually enhance image understanding capabilities, neural network classification accuracy for buildings in remote sensing images has reached more than 90%. Inspired by this, the present invention proposes a post-classification building change detection method based on D-LinkNet, which only requires fewer building samples to detect changes in buildings in two different sources of remote sensing images.
[0005] In the change detection of remote sensing images from two different sources, due to the inconsistency of image resolution, the accuracy of the change detection algorithm directly used on the two remote sensing images is often not high. The end-to-end detection of changed buildings using a deep convolutional neural network (DCNN) requires the network structure to be redesigned to adapt to the image input for different data sources, and sample annotation also requires a lot of time. The proportion of changed buildings in the entire image is generally much smaller than the unchanged area, and the radiation difference between the two-phase images increases the difficulty of the model to extract changed buildings. The invention of this article avoids the above-mentioned drawbacks of the end-to-end change detection algorithm directly using a neural network to a certain extent.
[0006] Another advantage of the present invention is that after extracting features from the two building classification maps predicted by the edge detection model through a feature point extraction algorithm, the common features in the two building classification maps are extracted using the KNN algorithm to obtain the offset between the two images, and then one of the classification maps is geometrically corrected through an affine transformation, thereby solving the image offset problem of remote sensing images from different sources at different times to a certain extent.
[0007] Previous studies on post-classification change detection are generally divided into two categories: (1) pixel-based change detection; (2) object-based change detection. The method proposed in the present invention is different from the previous post-classification change detection algorithm. The change detection in the present invention is firstly to classify and extract the buildings based on the object, and then to judge the changed buildings based on the pixel in the two post-classified images. In this way, the change detection of the building is better realized, because the two different images on the same building often have different colors and brightness. This avoids the previous change detection algorithms such as the difference method, the ratio method, the change vector detection method CVA, etc., which directly judge the pixels on the two remote sensing images, thereby causing a large number of pseudo changes and a large number of noise points in the result image; it also solves the problem of insufficient accuracy of building object classification in traditional object-based change detection algorithms such as PCA.
[0008] The present invention focuses on solving the drawback that the above-mentioned change detection algorithm cannot detect changes in buildings under satellite images of different resolutions and different sources, and uses an edge detection model to extract building objects, improving the problems of inaccurate building classification and unclear boundaries of previous edge extraction algorithms. In addition, due to the invariance of the features of the edges of the same building in the two-phase images, the extracted building objects are more accurate through the synthesis of the two-phase edges. The present invention also innovatively applies the image registration algorithm to the edge contour map of the two-phase building, solves the offset problem of the two-phase images, and avoids the registration difficulties caused by inconsistent image light and angles. Summary of the invention
[0009] The present invention aims to overcome the above-mentioned shortcomings of the prior art and provides a post-classification building change detection method based on semantic edges.
[0010] The purpose of the present invention is to solve the problem of building change detection in two phases of remote sensing images from different sources. Specifically, the edge features of buildings are first learned from the two phases of remote sensing images using an edge extraction model, and then the building edges in the area where building changes need to be detected are predicted, and two images containing all building information are output. After that, the images are post-processed to obtain clear building boundary binary images, and then the two binary images are registered using image registration technology, and finally the area where the building changes are located is judged.
[0011] To achieve the above purpose, the present invention provides a post-classification building change detection method based on semantic edges, and the technical solution proposed is as follows:
[0012] Step 1: Create samples on two images according to the building classification task, and select parameters to use the edge extraction model training samples to obtain the building edge model.
[0013] Step 2: Input the image areas of the two phases where the building changes need to be identified into their respective building edge models to obtain the target edge intensity maps of the two phases of buildings. The target edge intensity map is a grayscale map with pixel values ranging from 0 to 255, and then the edge intensity map is converted into a binary map according to the threshold.
[0014] Step 3: Since the two images for change detection may come from different satellites and the image resolutions may be inconsistent, one of the binary images needs to be scaled to the same size as the other binary image. The scaling algorithm can use the bicubic interpolation algorithm. Under this method, the point f(x, y) in the scaled image can be weighted at the nearest sixteen sampling points in the original image to obtain a new image. The calculation formula is as follows:
[0015]
[0016] where aij is the weighting coefficient.
[0017] Step 4: Through step 3, two binary images of the building boundary of the same size can be obtained. Then, a feature extraction algorithm is used on the building boundary image to obtain a large number of local feature descriptors. The feature descriptors in the two images are calculated by the nearest neighbor algorithm to obtain the offset of the two images. The specific measures for calculating the image offset are as follows:
[0018] Step 4.1: Continuously downsample the original image to obtain multiple images of different sizes. Use different Gaussian convolution kernels to convolve each of the images to obtain multiple groups of images of different sizes, where each group contains multiple images obtained by convolution of different Gaussian kernels, and construct them into a Gaussian pyramid. Subtract two adjacent images in the same group to obtain a Gaussian difference pyramid.
[0019] Step 4.2: Find possible extreme points in the Gaussian difference pyramid. Possible extreme points are the maximum or minimum values in a certain eight-neighborhood on the difference image at different scales. At the possible extreme point X0 (x0, y0, σ0) T Do a ternary second-order Taylor expansion at, the formula is as follows:
[0020]
[0021] Where σ0 represents the scale space position of this point, (x0, y0) represents the specific position of the point in the image, and then the Taylor expansion is differentiated, and the derivative is set to 0 to obtain the position of the extreme points. These extreme points are given directions, which are the main directions of the gradient directions of all pixels within a circle with a radius of 1.5 times the scale of the Gaussian image where the feature point is located. After deleting some points that do not meet the threshold, the final key point information is obtained.
[0022] Step 4.3: Use the KNN algorithm for the key points on the two images to find the key points with the closest Euclidean distance between each pair to construct a set of descriptors and obtain the final key point description set in the two images.
[0023] Step 4.4: Since the key point description set obtained in step 4.3 has points with erroneous offset, it is necessary to delete the erroneous points. The deletion steps are as follows:
[0024] Step 4.4.1: Read the key point description set and calculate the mean and variance of the offsets of all key points in the two images.
[0025] Step 4.4.2 sets a variance threshold to determine the variance obtained in step 4.4.1. When the variance is greater than the threshold, delete the point set farthest from the mean value.
[0026] Step 4.4.3 repeats steps 4.4.1 and 4.4.2 until the variance is less than the threshold, at which point the average value (x, y) of all key point offsets of the two images is returned.
[0027] Step 5: Using the offset obtained in step 4, perform affine transformation to achieve relative registration of the two edge binary images. Finally, refine the two registered binary images. The specific implementation steps are as follows:
[0028] Step 5.1: Perform an image affine transformation on one of the images. The direction of the transformation is the gradient direction of each set of points in the key point description set obtained in step 4. Take one of the images as the reference image, and translate each pixel point (x0, y0) in the other image based on the offset (x, y) in step 4 to obtain the two binary building boundary images after relative registration.
[0029] Step 5.2: Refine the building contours in the two binary images obtained in step 5.1 to obtain two building contours with single-pixel width boundary lines.
[0030] Step 6: The two binary images obtained in step 5 are expanded and then added to obtain a composite image containing the building features of the two periods. The advantage of the composite image is that the edge features of the buildings of the two periods can complement each other. The specific algorithm for judging the changes of buildings is as follows:
[0031] Step 6.1: Use the contour extraction algorithm on the synthetic image obtained in step 6 to obtain a set of building contours in the synthetic image.
[0032] Step 6.2: Extract the contours of the two refined and aligned binary images obtained in step 5 to obtain their respective contour sets.
[0033] Step 6.3: Judge each contour in the synthetic image contour set to obtain identification 1 and identification 2.
[0034] Step 6.3.1: For each point in the contour set of a binary image obtained in step 6.2, determine whether the point is in the contour of the synthetic image. Set variables. If it is in the contour, add 1 to the number of variables until all points in a contour of this image are determined. Divide the number of variables by the number of all points in the contour in the binary image of this image. If the ratio is greater than a threshold, set the flag 1 to True, indicating that a contour in the synthetic image exists in this image.
[0035] Step 6.3.2: The other phase contour set in step 6.2 is also judged in the same way as step 6.3.1, and finally the identification 2 is obtained.
[0036] Step 6.4: Judge the two identifiers obtained in step 6.3. If identifier 1 and identifier 2 are in an exclusive-OR relationship, it means that the outline is the outline of the changed building, and the outline is added to the array.
[0037] Step 6.5: Add all the contours added in 6.4 to an image matrix with all zeros, and output the final matrix and write it into an image, that is, an image of all the changed building contours in the two phases of images of the area.
[0038] Due to the adoption of the above technical solution, the present invention has the following advantages and beneficial effects:
[0039] 1. The present invention adopts a post-classification method to detect changes in buildings, which does not require manual identification of building changes. Compared with the end-to-end neural network method of identifying building changes, it reduces the workload of sample labeling.
[0040] 2. It can realize the change detection of buildings in two phases of remote sensing images with different sources and resolutions.
[0041] 3. To a certain extent, the problem of remote sensing image offset between two phases can be solved.
[0042] 4. By synthesizing the building outlines in the two remote sensing images and complementing each other, the outline details can be better preserved to a certain extent, making the outline edges of the buildings more accurate.
[0043] 5. Using edge methods to detect changes in buildings can obtain accurate edge contours of changing buildings that cannot be obtained by semantic segmentation and other methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is a schematic diagram of the method of the present invention;
[0045] Figure 2 A sample image of a building of a satellite image of level 18 in an embodiment of the present invention;
[0046] Figure 3 A sample image of a building of a 19-level satellite image in an embodiment of the present invention;
[0047] Figure 4 It is a schematic diagram of the result of 18-level satellite image edge model prediction in an embodiment of the present invention;
[0048] Figure 5 It is a schematic diagram of the result of 19-level satellite image edge model prediction in an embodiment of the present invention;
[0049] Figure 6 It is a schematic diagram of synthesis comparison of building edges of two phases of satellite images in an embodiment of the present invention;
[0050] Figure 7 It is a schematic diagram for comparing the final results of changing buildings in the embodiments of the present invention. DETAILED DESCRIPTION
[0051] The technical solution of the present invention is further described below in conjunction with the accompanying drawings.
[0052] This example provides a method for detecting building changes. The method of the present invention is applicable to detecting building changes in remote sensing images of different resolutions from different sources.
[0053] Figure 1 Schematic diagram of the method for building change detection based on post-classification.
[0054] Reference Figure 1 , the embodiment of the present invention provides a post-classification building change detection method based on semantic edges, comprising the following steps:
[0055] (1) According to the building classification task, samples are created on the two images, and parameters are selected to obtain the building edge model using the D-LinkNet training samples. Model training includes the following steps:
[0056] (1-1) Obtaining high-resolution remote sensing images: There are two resolutions of images: one is the 0.5m remote sensing image (level 18) from the Gaojing-1 satellite, and the other is the 0.25m remote sensing image (level 19) from Google Earth.
[0057] (1-2) Cropping remote sensing images: Select areas with densely distributed buildings in the remote sensing images, crop the 0.5-meter resolution images to 1000*1000 pixels, and crop the 0.25-meter resolution images to 1000*1000 pixels.
[0058] (1-3) Prepare deep learning training samples: Use ArcGIS software to draw building edge samples and obtain vector files with building edge information.
[0059] (1-4) According to the need for building edge extraction, 148 building samples of 0.5-meter resolution remote sensing images were collected, among which one sample is as follows: Figure 2 As shown in the figure, there are 100 building samples of 0.25-meter resolution remote sensing images, one of which is as follows Figure 3 shown.
[0060] (1-5) The parameters set for the D-LinkNet model are as follows:
[0061] The training parameters of the 18-level remote sensing image model are set as follows: number of training stages = 3, number of iterations per stage = [400, 400, 400], batch_size = 4, learning rate update strategy = step, initial learning rate = 0.001, crop size = 448
[0062] The training parameters of the 19-level remote sensing image model are set as follows: number of training stages = 2, number of iterations per stage = [400, 400], batch_size = 4, learning rate update strategy = step, initial learning rate = 0.001, crop size = 448
[0063] (1-6) According to the model parameters set in step (1-5), the samples marked in step (1-4) are input into the model for training, and the building edge model of the 18-level image and the building edge model of the 19-level image are obtained respectively.
[0064] (2) The image areas where building changes need to be identified in the two phases, where the size of the 18-level remote sensing image is 600*600 and the size of the 19-level remote sensing image is 1110*1110, are input into their respective building edge models to obtain the edge intensity maps of the building targets in the two phases, as shown in Figure 4 and Figure 5 As shown. Since the building target edge intensity map obtained from the model is a grayscale image with pixel values ranging from 0 to 255, it is necessary to convert the edge intensity map into a binary image based on the threshold. Use binary_image(x,y) to represent the edge judgment of the ground object at the image (x,y) (1 means edge, 0 means no edge), which can be expressed as:
[0065]
[0066] Since the edge intensity map obtained in step (2) is a bimodal map, the threshold cv2.THRESH_OTSU used here can automatically calculate a suitable threshold in a bimodal image based on its histogram.
[0067] (3) Since the two images for change detection may come from different satellites and the image resolutions may be inconsistent, based on the refined image obtained in step (2-2), the 18-level image building edge binary map is enlarged to the size of the 19-level image building edge binary map. The scaling algorithm uses the bicubic interpolation algorithm. Under this method, the point f(x, y) in the scaled image can be obtained by weighting the nearest sixteen sampling points in the original image. The calculation formula is as follows:
[0068]
[0069] where aij is the weighting coefficient.
[0070] (4) A relatively clear building boundary binary image can be obtained through step (3). The feature extraction algorithm adopted in this embodiment is the SIFT algorithm. The SIFT algorithm is then used on the building boundary image to obtain a large number of local feature descriptors, and the offset of the two images is obtained through the feature descriptors. The steps for calculating the image offset are as follows:
[0071] (4-1) The original image is continuously downsampled to obtain multiple images of different sizes. Each of the images is convolved with a different Gaussian convolution kernel to obtain multiple groups of images of different sizes, each of which contains multiple images convolved with different Gaussian kernels, which are constructed into a Gaussian pyramid. The adjacent images in the same group are subtracted to obtain a Gaussian difference pyramid.
[0072] (4-2) Find possible extreme points in the Gaussian difference pyramid. Possible extreme points are the maximum or minimum values in a certain eight-neighborhood on the difference image at different scales. At the possible extreme point X0 (x0, y0, σ0) T Do a ternary second-order Taylor expansion at, the formula is as follows:
[0073]
[0074] Where σ0 represents the scale space position of this point, (x0, y0) represents the specific position of the point in the image, and then the Taylor expansion is differentiated, and the derivative is set to 0 to obtain the position of the extreme points. These extreme points are given directions, which are the main directions of the gradient directions of all pixels within a circle with a radius of 1.5 times the scale of the Gaussian image where the feature point is located. After deleting some points that do not meet the threshold, the final key point information is obtained.
[0075] (4-3) The KNN algorithm is used for the key points on the two images to find the key points with the closest Euclidean distance between each pair to construct a set of descriptors and obtain the final set of key point descriptions in the two images.
[0076] (4-4) Since the key point description set obtained in step (4-3) has points with erroneous offset, it is necessary to delete the erroneous points. The deletion steps are as follows:
[0077] (4-4-1) Read the key point description set and calculate the mean and variance of the offset of all key points in the two phases of images.
[0078] (4-4-2) Set a variance threshold of 5 and determine the variance obtained in step (4-4-1). When the variance is greater than the threshold, delete the point set farthest from the mean value.
[0079] (4-4-3) Repeat steps (4-4-1) and (4-4-2) until the variance is less than the threshold, then return the average value (x, y) of all key point offsets of the two images.
[0080] (5) Using the offset obtained in step (4), an affine transformation is performed to achieve relative registration of the two edge binary images. Finally, the two registered binary images are refined. The specific implementation steps are as follows:
[0081] (5-1): Perform an image affine transformation on one of the images. The direction of the transformation is the gradient direction of each set of points in the key point description set obtained in step (4). One of the images is used as the reference image, and each pixel point (x0, y0) in the other image is translated based on the offset (x, y) in step (4) to obtain the two binary building boundary images after relative registration.
[0082] (5-2): Thin the building outlines in the two binary images obtained in step (5-1) to obtain two building outlines with single-pixel width boundary lines. The thinning algorithm uses the Zhang-Suen thinning algorithm to thin the building edges into single-pixel width boundary lines. The implementation steps of the Zhang-Suen thinning algorithm are as follows:
[0083] (5-2-1) Perform a raster scan and mark all pixels that meet the following 5 conditions:
[0084] 1. The pixel value is 0;
[0085] 2. When looking at x2, x3, ..., x9, x2 clockwise, the number of changes from 0 to 1 is only 1;
[0086] 3. The number of 1s in x2, x3, ..., x9 is more than 2 and less than 6;
[0087] 4. At least one of x2, x4, and x6 is 1;
[0088] 5. At least one of x4, x6, and x8 is 1;
[0089] Mark all pixels that meet the condition as 1
[0090] (5-2-2) Perform a raster scan and mark all pixels that meet the following 5 conditions:
[0091] 1. The pixel value is 0;
[0092] 2. When looking at x2, x3, ..., x9, x2 clockwise, the number of changes from 0 to 1 is only 1;
[0093] 3. The number of 1s in x2, x3, ..., x9 is more than 2 and less than 6;
[0094] 4. At least one of x2, x4, and x8 is 1;
[0095] 5. At least one of x2, x6, and x8 is 1;
[0096] Mark all pixels that meet the condition as 1
[0097] (5- 2- 3) Repeat the above two steps until no points change.
[0098] (6) The two binary images obtained in step (5) are pixel-expanded and then added together to obtain a composite image containing the features of the two phases of buildings. The composite image is as follows: Figure 6 As shown in B, the advantage of the synthetic image is that it can complement the edge features of the two phases of buildings. The uncorrected synthetic image is shown in Figure 6 As shown in A, the specific algorithm for judging building changes is as follows:
[0099] (6-1) Using the contour extraction algorithm on the synthetic image obtained in step (6), a set of building contours in the synthetic image is obtained. The contour extraction algorithm comes from the findContours function in the opencv library, which can perform topological analysis on binary images and find connected areas.
[0100] (6-2) The contours of the two refined and aligned binary images obtained in step (5) are then extracted to obtain their respective contour sets.
[0101] (6-3) Each contour in the synthetic image contour set is judged to obtain label 1 and label 2.
[0102] (6-3-1) For each point in the contour set of the binary image of the 18-level image obtained in step (6-2), determine whether the point is in the contour of the synthetic image, set variables, and if so, increase the number of variables by 1 until all points in a contour of this image have been determined. Divide the number of variables by the number of points in the contour in the binary image of this image, and set the threshold to 0.9. If it is greater than this threshold, set the flag 1 to True, indicating that a contour in the synthetic image exists in this image.
[0103] (6-3-2) The 19-level image contour set in step (6-2) is also judged using the same method as (6-3-1), and finally label 2 is obtained.
[0104] (6-4) The two identifiers obtained in step (6-3) are judged. If identifier 1 and identifier 2 are in an exclusive-OR relationship, it means that the outline is the outline of the changed building, and the outline is added to a new array.
[0105] (6-5) Add all the contours added in step (6-4) to an image matrix with all zeros, and output the final matrix and write it into an image, that is, an image of all the changed building contours in the two phases of the image of the area, such as Figure 7 As shown in B, Figure 7 A is a sample image of buildings that have changed in two phases of satellite images in the embodiment.
[0106] The contents described in the embodiments of this specification are merely an enumeration of the implementation forms of the inventive concept. The protection scope of the present invention should not be regarded as limited to the specific forms described in the embodiments. The protection scope of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the inventive concept.
Claims
1. A semantic edge-based post-classification building change detection method, comprising the following steps: Step 1: Create samples on two images according to the building classification task, and select parameters to use the edge extraction model training samples to obtain the building edge model; Step 2: Input the image areas of the two phases where the building changes need to be identified into their respective building edge models to obtain the target edge intensity maps of the two phases of buildings; the target edge intensity map is a grayscale map with pixel values ranging from 0 to 255, and then the edge intensity map is converted into a binary map according to the threshold; Step 3: Since the two images for change detection may come from different satellites and the image resolutions may be inconsistent, one of the binary images needs to be scaled to the same size as the other binary image. The scaling algorithm can use the bicubic interpolation algorithm. In this method, the point f(x, y) in the scaled image is weighted at the nearest sixteen sampling points in the original image to obtain a new image. The calculation formula is as follows: where a ij is the weighting coefficient; Step 4: After obtaining two binary images of the same size of the building boundary through step 3, a feature extraction algorithm is used on the building boundary image to obtain a large number of local feature descriptors, and the feature descriptors in the two images are calculated by the nearest neighbor algorithm to obtain the offset of the two images. The specific measures for calculating the image offset are as follows: Step 4.1: Continuously downsample the original image to obtain multiple images of different sizes, and convolve each of the images using a different Gaussian convolution kernel to obtain multiple groups of images of different sizes, where each group contains multiple images obtained by convolution of different Gaussian kernels, and construct them into a Gaussian pyramid; subtract two adjacent images in the same group to obtain a Gaussian difference pyramid; Step 4.2: Find possible extreme points in the Gaussian difference pyramid. Possible extreme points are the maximum or minimum values in a certain eight-neighborhood on the difference image at different scales. At the possible extreme point X0 (x0, y0, σ0) T Do a ternary second-order Taylor expansion at, the formula is as follows: Where σ0 represents the scale space position of this point, (x0, y0) represents the specific position of the point in the image, and then the Taylor expansion is derived, and the derivative is set to 0 to obtain the position of the extreme point. These extreme points are given directions, which are the main directions of the gradient directions of all pixels within a circle with a radius of 1.5 times the scale of the Gaussian image where the extreme point is located. After deleting some points that do not meet the threshold, the final key point information is obtained; Step 4.3: Use the KNN algorithm for the key points on the two images to find the key points with the closest Euclidean distance between each pair to construct a set of descriptors, and obtain the final key point description set in the two images; Step 4.4: Since the key point description set obtained in step 4.3 has points with erroneous offset, it is necessary to delete the erroneous points. The deletion steps are as follows: Step 4.4.1: Read the key point description set and calculate the mean and variance of the offsets of all key points in the two phases of images; Step 4.4.2 sets a variance threshold to determine the variance obtained in step 4.4.
1. When the variance is greater than the threshold, delete the point set farthest from the mean value. Step 4.4.3 repeats steps 4.4.1 and 4.4.2 until the variance is less than the threshold, at which point the average value (x, y) of all keypoint offsets of the two images is returned; Step 5: Using the offset obtained in step 4, perform affine transformation to achieve relative registration of the two edge binary images. Finally, refine the two registered binary images. The specific implementation steps are as follows: Step 5.1: Perform an image affine transformation on one of the images. The direction of the transformation is the gradient direction of each set of points in the key point description set obtained in step 4. Take one of the images as the reference image, and translate each pixel point (x0, y0) in the other image based on the offset (x, y) in step 4 to obtain the two binary building boundary images after relative registration. Step 5.2: Refine the building contours in the two binary images obtained in step 5.1 to obtain two building contours with single-pixel width boundary lines; Step 6: The two binary images obtained in step 5 are expanded and then added to obtain a composite image containing the building features of the two periods. The advantage of the composite image is that the edge features of the buildings of the two periods complement each other. The specific algorithm for judging the changes of buildings is as follows: Step 6.1: Using the contour extraction algorithm on the synthetic image obtained in step 6, obtain a set of building contours in the synthetic image; Step 6.2: Extract the contours of the two binary images obtained in step 5 after refinement and registration, and obtain their respective contour sets; Step 6.3: judge each contour in the synthetic image contour set to obtain identification 1 and identification 2; Step 6.3.1: For each point in the contour set of the binary image of a certain period obtained in step 6.2, determine whether the point is in the contour of the synthetic image, set the variable, if it is in the contour, then increase the number of variables by 1, until all points in a contour of this period of image are determined, divide the number of variables by the number of all points in the contour in the binary image of this period of image, if the ratio is greater than a certain threshold, then set the flag 1 to True, indicating that a contour in the synthetic image exists in this period of image; Step 6.3.2: The other phase contour set in step 6.2 is also judged in the same way as step 6.3.1, and finally the identification 2 is obtained; Step 6.4: judge the two identifiers obtained in step 6.
3. If identifier 1 and identifier 2 are in an exclusive-OR relationship, it means that the outline is the outline of the changed building, and the outline is added to the array; Step 6.5: Add all the contours added in 6.4 to an image matrix with all zeros, and output the final matrix and write it into an image, that is, an image of all the changed building contours in the two phases of images of the area.
2. The method for post-classification building change detection based on semantic edges as claimed in claim 1, characterized in that: In step 1, parameters are selected to obtain a building edge model using D-LinkNet training samples; model training includes the following steps: (1-1) Obtain high-resolution remote sensing images: There are two types of images: 0.5m remote sensing images from the Gaojing-1 satellite and 0.25m remote sensing images from Google Earth. (1-2) Cropping remote sensing images: Select areas with densely distributed buildings in the remote sensing images, crop the 0.5-meter resolution images into 1000*1000 pixels, and crop the 0.25-meter resolution images into 1000*1000 pixels; (1-3) Prepare deep learning training samples: Use ArcGIS software to draw building edge samples and obtain vector files with building edge information; (1-4) According to the need for building edge extraction, 148 building samples of 0.5-meter resolution remote sensing images and 100 building samples of 0.25-meter resolution remote sensing images were collected; (1-5) The parameters set for the D-LinkNet model are as follows: The training parameters of the 18-level remote sensing image model are set as follows: number of training stages = 3, number of iterations per stage = [400, 400, 400], batch_size = 4, learning rate update strategy = step, initial learning rate = 0.001, crop size = 448 The training parameters of the 19-level remote sensing image model are set as follows: number of training stages = 2, number of iterations per stage = [400, 400], batch_size = 4, learning rate update strategy = step, initial learning rate = 0.001, crop size = 448; (1-6) According to the model parameters set in step (1-5), the samples marked in step (1-4) are input into the model for training, and the building edge model of the 18-level image and the building edge model of the 19-level image are obtained respectively.
3. The method for post-classification building change detection based on semantic edges as claimed in claim 1, characterized in that: In step 2, the image areas where the building changes need to be identified in the two phases, where the size of the 18-level remote sensing image is 600*600 and the size of the 19-level remote sensing image is 1110*1110, are respectively input into their respective building edge models to obtain the edge intensity maps of the two phases of building targets; since the building target edge intensity map obtained from the model is a grayscale map with pixel values ranging from 0 to 255, it is necessary to convert the edge intensity map into a binary map according to the threshold; binary_image(x,y) is used to represent the edge judgment of the ground object target at the image (x,y), where 1 indicates an edge and 0 indicates no edge, which is expressed as: Since the acquired edge intensity map is a bimodal map, the threshold cv2.THRESH_OTSU used automatically calculates the appropriate threshold based on its histogram in a bimodal image.
Citation Information
Patent Citations
Image splicing method based on improved image fusion
CN107146201A
A method and system for detecting building changes in an unmanned aerial vehicle image
CN109670515A