Ground object change detection method, electronic device and storage medium
Through the combination of block image processing and deep learning network model, the problem of low efficiency of ground object change detection in high-resolution remote sensing images is solved, efficient ground object change detection is achieved, and detection efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202010946543.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-10
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2040-09-10
AI Technical Summary
In the existing technology, the detection efficiency of ground object changes based on high-resolution remote sensing images is low. The deep learning model requires a large amount of computer resources and time when processing high-resolution images, resulting in low detection efficiency.
The block image processing method is used to segment high-resolution remote sensing images into multiple block images, and a deep learning network model is used to process each image group separately to generate change detection block images and ground object type segmentation block images, and then Splice into a complete change detection image and surface object type image, and determine the surface object change area and type change results through the circumscribed rectangle and confusion matrix.
It improves the efficiency of ground object change detection, reduces the demand for computer resources, can effectively process high-resolution remote sensing images, and improves the accuracy and efficiency of ground object change detection.
Smart Images

Figure CN112233062B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, an electronic device and a storage medium for detecting changes in ground objects. Background Art
[0002] In high-resolution remote sensing image algorithms, most software focuses on how to parse saved remote sensing image files in tiff format, display tiff files, and calculate GPS. However, there are few software that perform intelligent analysis on images in tiff.
[0003] Related technologies usually combine GIS data to extract features of objects in remote sensing images, but it is not easy to obtain and update GIS data. Some related technologies also use deep learning methods to automatically extract features of objects in remote sensing images and detect changes in objects in remote sensing images. However, the resolution of high-resolution remote sensing images may reach hundreds of thousands or even millions. If deep learning models are used to process such high-resolution remote sensing images, the prediction stage of the deep learning model will consume a lot of computer resources and time, resulting in low efficiency in detecting changes in objects based on high-resolution remote sensing images. Summary of the invention
[0004] The embodiments of the present application provide a method for detecting changes in land objects, an electronic device, and a storage medium to at least solve the problem of low efficiency of detecting changes in land objects based on high-resolution remote sensing images in the related art.
[0005] In a first aspect, an embodiment of the present application provides a method for detecting changes in land objects, including: acquiring a first remote sensing image and a second remote sensing image of a target area at different periods; acquiring a plurality of first block images from the first remote sensing image, acquiring a plurality of second block images corresponding one-to-one to the plurality of first block images from the second remote sensing image, and treating each pair of corresponding first block images and second block images as an image group to obtain a plurality of image groups; using a first deep learning network model to process the plurality of image groups respectively to obtain a plurality of change detection block images corresponding one-to-one to the plurality of image groups, wherein the change detection block images are used to represent the land object change area between the image groups; and splicing the plurality of change detection block images to obtain a change detection image used to represent the land object change area between the first remote sensing image and the second remote sensing image.
[0006] In some embodiments, after taking each pair of corresponding first block images and second block images as an image group to obtain multiple image groups, the method further includes: using a second deep learning network model to process the multiple image groups respectively to obtain multiple first land object type segmented block images and multiple second land object type segmented block images corresponding one by one to the multiple image groups, wherein the first land object type segmented block images are used to represent the segmentation results of the land object type in the first block images in the image group, and the second land object type segmented block images are used to represent the segmentation results of the land object type in the second block images in the image group; splicing the multiple first land object type segmented block images to obtain a first land object type segmented image for representing the segmentation results of the land object type of the first remote sensing image, and splicing the multiple second land object type segmented block images to obtain a second land object type segmented image for representing the segmentation results of the land object type of the second remote sensing image.
[0007] In some embodiments, after splicing a plurality of first land object type segmented and block images to obtain a first land object type segmented image for representing the segmentation result of the land object type of the first remote sensing image, and splicing a plurality of second land object type segmented and block images to obtain a second land object type segmented image for representing the segmentation result of the land object type of the second remote sensing image, the method further includes: determining a land object change area between the first remote sensing image and the second remote sensing image based on the change detection image; determining a land object type change result of the land object change area based on the first land object type segmented image and the second land object type segmented image; and marking the land object change area and the land object type change result in the first remote sensing image and / or the second remote sensing image.
[0008] In some embodiments, determining the area where land objects have changed between the first remote sensing image and the second remote sensing image based on the change detection image includes: searching for a connected area in the change detection image, wherein a first pixel value in the change detection image represents the area where land objects have changed, and a second pixel value in the change detection image that is different from the first pixel value represents other areas except the area where land objects have changed; generating a bounding rectangle of the connected area, and obtaining coordinate information of the bounding rectangle, wherein the coordinate information of the bounding rectangle is used to represent the area where land objects have changed.
[0009] In some embodiments, determining the result of the land feature type change in the land feature change area based on the first land feature type segmentation image and the second land feature type segmentation image includes: obtaining first land feature type information before the change of at least one land feature change point in the connected area where land feature change exists from the first land feature type segmentation image, and obtaining second land feature type information after the change of at least one land feature change point in the connected area from the second land feature type segmentation image; and determining, based on the first land feature type information and the second land feature type information, the same land feature type change mode with the largest number of land feature change points as the land feature type change result of the land feature change area.
[0010] In some embodiments, determining, based on the first land feature type information and the second land feature type information, the same land feature type change mode with the largest number of land feature change points as the land feature type change result of the land feature change area includes: generating a confusion matrix, wherein the rows and columns of the confusion matrix represent the land feature type before the change and the land feature type after the change, respectively, and each element position of the confusion matrix corresponds to a land feature type change mode; traversing the first land feature type information and the second land feature type information of each land feature change point, determining the land feature type change mode of each land feature change point, and recording the number of land feature change points of the corresponding land feature type change mode at the corresponding element position in the confusion matrix; after traversing all land feature change points in the connected area, determining the element with the largest value in the confusion matrix, and the land feature type change mode corresponding to the element position is the land feature type change result of the land feature change area.
[0011] In some of the embodiments, after determining the area where the land object has changed between the first remote sensing image and the second remote sensing image based on the change detection image, the method further includes: obtaining the longitude and latitude coordinate information of four non-collinear positions of the first remote sensing image and / or the second remote sensing image; determining the longitude and latitude coordinate information of the area where the land object has changed by a bilinear interpolation method; and marking the longitude and latitude coordinate information of the area where the land object has changed in the first remote sensing image and / or the second remote sensing image.
[0012] In some embodiments, adjacent first block images in the plurality of first block images have overlapping areas; and adjacent second block images in the plurality of second block images have overlapping areas.
[0013] In some of the embodiments, after acquiring the first remote sensing image and the second remote sensing image of the target area at different periods, the method further includes: preprocessing the first remote sensing image and the second remote sensing image, wherein the preprocessing includes but is not limited to at least one of the following: image alignment, image cropping, image downsampling, and image format conversion.
[0014] In some embodiments, the first deep learning network model includes a U-Net model; the second deep learning network model includes a HR-Net model.
[0015] In a second aspect, an electronic device is provided in an embodiment of the present application, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for detecting changes in land objects as described in the first aspect above is implemented.
[0016] In a third aspect, an embodiment of the present application provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the method for detecting changes in ground objects as described in the first aspect above is implemented.
[0017] Compared with related technologies, the ground object change detection method, electronic device and storage medium provided in the embodiments of the present application solve the problem of low efficiency of ground object change detection based on high-resolution remote sensing images and improve the efficiency of ground object change detection.
[0018] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 is a hardware structure block diagram of a terminal of the method for detecting changes in land features according to an embodiment of the present invention;
[0021] Figure 2 is a flow chart of a method for detecting changes in ground objects according to an embodiment of the present application;
[0022] Figure 3 is a flow chart of a method for detecting changes in ground objects according to a preferred embodiment of the present application;
[0023] Figure 4 is a schematic diagram of continuously cropping remote sensing images according to a preferred embodiment of the present application;
[0024] Figure 5 is a schematic diagram of cropping a remote sensing image with 50% overlap according to a preferred embodiment of the present application;
[0025] Figure 6 is a schematic diagram of expansion splicing according to a preferred embodiment of the present application;
[0026] Figure 7is a schematic diagram of the structure of a U-Net network according to a preferred embodiment of the present application;
[0027] Figure 8 is a schematic diagram of the structure of the HR-Net network according to the preferred embodiment of the present application;
[0028] Fig. 9 is a schematic diagram of a ground feature change detection result according to a preferred embodiment of the present application;
[0029] Fig.10 is a schematic diagram of the segmentation result of the ground feature type according to the preferred embodiment of the present application;
[0030] Fig.11 is a schematic diagram of a confusion matrix according to a preferred embodiment of the present application;
[0031] Fig.12 It is a schematic diagram of a remote sensing image with annotated detection results according to a preferred embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments provided in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application. In addition, it can also be understood that although the efforts made in this development process may be complex and lengthy, for ordinary technicians in the field related to the contents disclosed in the present application, some changes such as design, manufacturing or production based on the technical contents disclosed in the present application are only conventional technical means, and should not be understood as insufficient contents disclosed in the present application.
[0033] Reference to "embodiment" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those of ordinary skill in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0034] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to greater than or equal to two. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The terms "first", "second", "third" and the like involved in the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0035] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. Taking running on a terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a terminal of a method for detecting ground feature changes according to an embodiment of the present invention. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0036] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for detecting changes in land objects in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0037] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0038] This embodiment provides a method for detecting ground object changes. Figure 2 is a flow chart of a method for detecting ground feature changes according to an embodiment of the present application. Figure 2 As shown, the process includes the following steps:
[0039] Step S201: Acquire a first remote sensing image and a second remote sensing image of a target area at different times.
[0040] In this step, the first remote sensing image and the second remote sensing image are images of the same target area acquired by aerial photography, aerial scanning, or microwave radar.
[0041] Remote sensing images are usually saved as image files in tiff format, but deep learning networks currently have better processing effects on image files in RGB format. Therefore, after obtaining the remote sensing images, the remote sensing images can also be preprocessed for image format conversion, thereby converting the remote sensing images in tiff format into remote sensing images in RGB format.
[0042] In addition to format conversion preprocessing, remote sensing images can also be subjected to one or more preprocessing such as image alignment, image cropping, image downsampling, etc.
[0043] Image alignment can be performed by rigid transformation or affine transformation, so that the first remote sensing image and the second remote sensing image can be aligned without affecting the relative shape of the image content in the image. The purpose of image alignment is to ensure that the obtained block images strictly correspond to the same real area position and range when the image is segmented and processed by the deep learning network model in the subsequent steps, thereby improving the accuracy of the prediction results of the deep learning network model.
[0044] Image cropping refers to cropping the first remote sensing image and the second remote sensing image into images of the same size; in particular, cropping the images into images whose length and width are both integer multiples of 2 pixels can improve the utilization of computer resources and improve the processing efficiency of the deep learning network model.
[0045] In an embodiment of the present application, when the image resolutions of the first remote sensing image and the second remote sensing image are the same, image downsampling processing is usually not performed, so as to use remote sensing images with higher image resolutions for ground object change detection as much as possible, thereby ensuring the accuracy of image processing and the accuracy of ground object change detection. However, in cases where the resolution of the remote sensing image reaches the million level, if the same resolution is maintained for ground object detection processing, the remote sensing image may also be downsampled, subject to limitations such as the maximum resolution supported by RGB format images. In other cases, such as when the resolutions of the first remote sensing image and the second remote sensing image are different, the resolution of the remote sensing image with the higher resolution is reduced through downsampling processing to ensure that the resolutions of the two remote sensing images are the same.
[0046] Step S202, obtaining a plurality of first block images from the first remote sensing image, obtaining a plurality of second block images corresponding to the plurality of first block images from the second remote sensing image, and taking each pair of corresponding first block images and second block images as an image group to obtain a plurality of image groups.
[0047] In this step, the first remote sensing image and the second remote sensing image of the same size and resolution are divided into blocks using the same image cropping or segmentation method, and the two block images in each image group obtained are from the first remote sensing image and the second remote sensing image, respectively, and the two block images correspond to actual areas of the same size and the same range.
[0048] When performing image segmentation, it is preferred to segment each remote sensing image into segmented images of exactly the same shape and size; it can also be segmented into segmented images of different sizes, but the sizes and shapes of two segmented images of the same image group will remain consistent. In some embodiments, the shapes of the segmented images obtained in the same remote sensing image may also be different.
[0049] In some embodiments, the remote sensing image is continuously cropped to obtain multiple block images, and there is no overlapping area between adjacent block images. In other embodiments, the remote sensing image is obtained according to a set size. There may be overlapping areas between adjacent block images, and the non-overlapping area is located in the center of the block image as much as possible. The total image size of the multiple block images obtained by continuous cropping is the same as the size of the original remote sensing image, which can reduce the total amount of processed images in subsequent processing and ensure the efficiency of subsequent image processing. The existence of overlapping areas between adjacent block images can ensure the image stitching quality in subsequent image processing.
[0050] Step S203: Use the first deep learning network model to process the multiple image groups respectively to obtain a plurality of change detection block images corresponding to the multiple image groups one by one, wherein the change detection block images are used to represent the area where the ground objects change between the image groups.
[0051] In this embodiment, the first deep learning network model is trained to predict the area of ground object changes between two block images based on the two block images in the image group. The first deep learning network model can be trained in a supervised learning manner, and its training sample set includes multiple pairs of remote sensing images. The ground object change area annotation information is used as supervision to update the parameters of the first deep learning network model.
[0052] The first deep learning network model of this embodiment is not limited to any deep learning network model in the related art, and preferably adopts a U-Net model.
[0053] Step S204 , stitching a plurality of change detection block images to obtain a change detection image for representing a ground object change region between the first remote sensing image and the second remote sensing image.
[0054] After using the first deep learning network model to obtain the change detection block images corresponding to each group of images, these change detection block images are spliced in a splicing method corresponding to the blocking method, so as to obtain a change detection image for representing the area where the ground objects change between the first remote sensing image and the second remote sensing image.
[0055] Through the above steps S201 to S204, the high-resolution remote sensing image is divided into block images, and then processed by the first deep learning network model. Theoretically, remote sensing images of any resolution can be processed, and the requirements for computer processing performance are not high. The problem of low efficiency of ground object change detection based on high-resolution remote sensing images is solved, and the efficiency of ground object change detection is improved.
[0056] The above-mentioned method of processing remote sensing images into blocks can also be applied to other aspects of ground object change detection, for example, in the detection of ground object types in ground object change detection. In some embodiments, after step S202, a second deep learning network model can also be used to process multiple image groups respectively to obtain multiple first ground object type segmented block images and multiple second ground object type segmented block images corresponding to the multiple image groups one by one, wherein the first ground object type segmented block images are used to represent the segmentation results of the ground object type in the first block images in the image group, and the second ground object type segmented block images are used to represent the segmentation results of the ground object type in the second block images in the image group; then, multiple first ground object type segmented block images are spliced to obtain a first ground object type segmented image for representing the segmentation results of the ground object type of the first remote sensing image, and multiple second ground object type segmented block images are spliced to obtain a second ground object type segmented image for representing the segmentation results of the ground object type of the second remote sensing image.
[0057] The second deep learning network model in this embodiment is trained to predict the segmentation result of the object type of the block image based on the block image. The second deep learning network model can be trained in a supervised learning manner, and its training sample set includes multiple remote sensing images. The object type annotation information is used as supervision to update the parameters of the second deep learning network model. The second deep learning network model in this embodiment is not limited to any deep learning network model in the relevant technology, and the HR-Net model is preferably used.
[0058] Through the above-mentioned manner, the ground object type segmentation result of the first remote sensing image and the ground object type segmentation result of the second remote sensing image can be obtained respectively, which also improves the efficiency of ground object type segmentation.
[0059] In the above embodiments, a change detection image for representing the area of land object change between the first remote sensing image and the second remote sensing image, a first land object type segmentation image for representing the segmentation result of the land object type of the first remote sensing image, and a second land object type segmentation image for representing the segmentation result of the land object type of the second remote sensing image can be obtained. On this basis, the land object type change result can also be marked on the remote sensing image to facilitate viewing the detection result of the remote sensing image. For example, in some of the embodiments, first, based on the change detection image, the land object change area between the first remote sensing image and the second remote sensing image is determined; then, based on the first land object type segmentation image and the second land object type segmentation image, the land object type change result of the land object change area is determined; finally, the land object change area and the land object type change result are marked in the first remote sensing image and / or the second remote sensing image.
[0060] After obtaining the change detection image, the connected domain algorithm can be used to determine each continuous area of land object change. For example, when determining the area of land object change between the first remote sensing image and the second remote sensing image based on the change detection image, the connected area can be searched in the change detection image, wherein the first pixel value in the change detection image represents the area of land object change, and the second pixel value in the change detection image that is different from the first pixel value represents other areas except the area of land object change; the bounding rectangle of the connected area is generated, and the coordinate information of the bounding rectangle is obtained, wherein the coordinate information of the bounding rectangle is used to represent the area of land object change. In the above embodiment, the bounding rectangle can be represented by using the coordinate information of the two diagonal corners of the bounding rectangle.
[0061] In some embodiments, when determining the result of the feature type change in the feature change area based on the first feature type segmentation image and the second feature type segmentation image, the first feature type information before the change of at least one feature change point in the connected area where the feature change exists can be obtained from the first feature type segmentation image, and the second feature type information after the change of at least one feature change point in the connected area can be obtained from the second feature type segmentation image; based on the first feature type information and the second feature type information, the same feature type change mode with the largest number of feature change points is determined as the feature type change result of the feature change area. Since the feature type change modes of each feature change point in the same connected area may be different, through the above method, the feature type change mode corresponding to the feature type change point with the largest number of features and the same feature type change mode in the connected area is used as the feature type change result of the connected area. Each feature change point can be a pixel point.
[0062] In some embodiments, the same feature type change mode with the largest number of feature change points can be determined based on the confusion matrix as the feature type change result of the feature change area. For example, a confusion matrix is generated, wherein the rows and columns of the confusion matrix represent the feature type before the change and the feature type after the change, respectively, and each element position of the confusion matrix corresponds to a feature type change mode; the first feature type information and the second feature type information of each feature change point are traversed to determine the feature type change mode of each feature change point, and the number of feature change points of the corresponding feature type change mode is recorded at the corresponding element position in the confusion matrix; after traversing all the feature change points in the connected area, the element with the largest value in the confusion matrix is determined, and the feature type change mode corresponding to the element position is the feature type change result of the feature change area.
[0063] The detection results marked on the remote sensing image may also include longitude and latitude coordinate information. In some embodiments, after determining the area of land object change between the first remote sensing image and the second remote sensing image according to the change detection image, the longitude and latitude coordinate information of four non-collinear positions of the first remote sensing image and / or the second remote sensing image may also be obtained; the longitude and latitude coordinate information of the area of land object change is determined by the bilinear interpolation method; and the longitude and latitude coordinate information of the area of land object change is marked in the first remote sensing image and / or the second remote sensing image. In the above manner, it is not necessary to obtain the longitude and latitude coordinate information of each position on the remote sensing image in advance, but the longitude and latitude coordinate information of the area of land object change is determined by the bilinear interpolation method according to the longitude and latitude coordinate information of the four non-collinear positions on the remote sensing image. The four non-collinear positions are preferably selected from the four corners of the remote sensing image, and the longitude and latitude coordinate information of the four corners is easier to obtain, and after the longitude and latitude coordinate information of the four corners is selected, it is more convenient to use the bilinear interpolation method to calculate the longitude and latitude coordinate information of any position in the remote sensing image.
[0064] It should be noted that, when the longitude and latitude are evenly distributed on the remote sensing image, the longitude and latitude coordinate information of any position on the remote sensing image can also be calculated only by using the longitude and latitude coordinate information of two positions on the remote sensing image.
[0065] It should be noted that the steps shown in the above process or the flowchart of the attached figure can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here. For example, the step of marking the area where the object changes and the result of the change of the object type in the first remote sensing image and / or the second remote sensing image, and the step of marking the latitude and longitude coordinate information of the area where the object changes in the first remote sensing image and / or the second remote sensing image, these two steps can be performed successively or simultaneously.
[0066] The present application is described and illustrated below through a preferred embodiment. In this preferred embodiment, the first deep learning network model adopts a U-Net model, and the second deep learning network model adopts a HR-Net model.
[0067] In the preferred embodiment, a method for detecting changes in land objects based on high-resolution remote sensing images is provided. The method is used to detect the difference between two high-resolution remote sensing images in tiff format of the same target area at different periods, and to detect the change mode of land object types.
[0068] Figure 3 FIG. 1 is a flow chart of a method for detecting ground feature changes according to a preferred embodiment of the present application. Figure 3As shown, the input of the flowchart includes two parts, an early high-resolution remote sensing image (equivalent to the first remote sensing image in the above embodiment) and a recent high-resolution remote sensing image (equivalent to the second remote sensing image in the above embodiment). In the flowchart, first, the high-resolution remote sensing image is cropped into a small-resolution RGB image according to the cropping method; then the continuous small-block image is predicted using the semantic segmentation and change detection network in deep learning, and all the prediction results are spliced into a high-resolution large image according to the splicing method, and then the connected areas in the change detection results are calculated, and according to the ranking of the connected areas, the original type, the changed type, and the real longitude and latitude information of each coordinate in the connected area in the world coordinates are output.
[0069] The following is a description of each step of the flowchart. The process includes the following steps:
[0070] Step S300, acquiring early high-resolution remote sensing images and recent high-resolution remote sensing images.
[0071] Step S301 , selecting a cropping and splicing method for a high-resolution image, and using the selected cropping method to crop and obtain a plurality of block images.
[0072] In this embodiment, high-resolution remote sensing images are used as input. Due to image type restrictions, only 32768 pixels × 32768 pixels are currently supported. In theory, high-resolution images of 100,000 or 1 million levels can be supported. Since high-resolution images occupy a large amount of memory space, using a deep learning network for prediction on the CPU will greatly reduce efficiency. Therefore, in this embodiment, a cropping method is used to crop the high resolution in a continuous or overlapping manner. The size of the overlapping area and the size of the cropped block image can be manually customized.
[0073] In this preferred embodiment, a target length and width of 512 pixels × 512 pixels is used for cropping, and the deep learning model has higher computing efficiency for images with integer multiples of 2 pixels.
[0074] Figure 4 is a schematic diagram of continuously cropping remote sensing images according to a preferred embodiment of the present application, such as Figure 4 As shown in FIG. 1 , there is no overlapping area between the block images obtained by continuously cropping the remote sensing images. Figure 5 is a schematic diagram of cropping remote sensing images with 50% overlap according to a preferred embodiment of the present application, such as Figure 5 As shown, the thick solid line and the thick dashed line represent two block images respectively, and there is a 50% area overlap between adjacent block images.
[0075] Step S302, the cropped block images are grouped, each image group is sent to a change detection network based on the U-Net model for ground object change detection, and each block image is sent to a semantic segmentation network based on the HR-Net model for semantic segmentation detection.
[0076] Step S303, stitching the result images output by the deep learning network.
[0077] The output result of each network is also an image, and its size and resolution are the same as those of the input image. According to the stitching method corresponding to the cropping method selected in step S301, the result image can be stitched into an image of the same size as the initial remote sensing image.
[0078] Considering the existence of seams in stitching, the overlapping stitching method can be selected, and the expansion stitching method can be used accordingly to eliminate the seams. If the continuous cropping method is selected, since there is no overlapping area between adjacent block images, there is no need to use the expansion stitching method, but there may be seams caused by image stitching.
[0079] Figure 6 This is a schematic diagram of expansion splicing according to a preferred embodiment of the present application. As shown in the figure, considering that the outermost circle of small images cannot be expanded, the outermost circle of small images are directly spliced during expansion splicing. Except for the outermost circle of small images, each image takes a small piece of the image located in the center for splicing, such as Figure 6 The black square in the figure represents the image area. When the size of the block image is 512 pixels × 512 pixels, using 256 pixels × 256 pixels for image expansion and splicing can effectively remove the seams generated during splicing.
[0080] In the above step S302, the U-Net network is used as the main network for change detection. Figure 7 is a schematic diagram of the structure of a U-Net network according to a preferred embodiment of the present application, such as Figure 7 As shown in the figure, the U-Net network is mainly composed of two parts: the encoder and the decoder. The encoder part uses an improved version of the VGG network as the main feature extraction network. Each time it passes through a pooling layer, it reduces a scale, and finally obtains five feature layers of different scales. The decoder part consists of a series of upsampling layers. One upsampling layer corresponds to one pooling layer. The feature layer not only comes from the upsampling of the high-dimensional feature layer, but also fuses the feature layer of the same scale from the encoder. Such an encoder-decoder integrates more high-dimensional semantic information and low-dimensional spatial information.
[0081] In addition, in order to adapt to the input of change detection, the U-Net network uses dual image input. Superimposing the dual image images together as the input of the U-Net network can better compare the change information at the same position.
[0082] In the above step S302, the HR-Net network is used as the network for semantic segmentation. The application of the HR-Net network in semantic segmentation has achieved the best results on public datasets. Figure 8 is a schematic diagram of the structure of the HR-Net network according to the preferred embodiment of the present application, such as Figure 8 As shown in the figure, the HR-Net network uses parallel connection of high-resolution and low-resolution feature layers. All feature layers in the first row maintain high-resolution features, and the network does not lose the original high-resolution information due to downsampling due to memory and other reasons. When upsampling the second and third layers, it is not restored by interpolation, but directly fused with the original high-resolution features. It is better and more accurate in extracting spatial feature information than deep learning networks such as ResNet that discard high resolution. In addition, at different stages, the HR-Net network fuses low-resolution feature images of the same depth and similarity to improve high-resolution semantic feature information. In the final stage, the HR-Net network fuses information of different scales for the final prediction, which not only makes full use of low-resolution features, but also retains high-precision spatial features, making the final result even better.
[0083] Step S304, calculating the connected areas of the area where the ground objects change.
[0084] In step S301, the high-resolution remote sensing image is segmented, and the segmented block images are subjected to change detection and semantic segmentation in step S302 to obtain a series of change detection results and semantic segmentation results, which are then spliced accordingly in step S303 to obtain a large map for ground object change detection and a large map for semantic segmentation. Fig. 9 is a schematic diagram of the ground feature change detection result according to the preferred embodiment of the present application, Fig. 9 It is a binary image, the white area represents the area where the object has changed, and the black area represents the area where the object has not changed. Fig.10 is a schematic diagram of the segmentation result of the ground feature type according to the preferred embodiment of the present application, Fig.10 Different colors are used to mark different types of features.
[0085] In this embodiment, based on the high-resolution result of change detection, a connected domain algorithm is used to extract all connected regions in the image.
[0086] Step S305: statistics and annotation of ground feature change information.
[0087] The following information is calculated in this step:
[0088] 1. The circumscribed rectangle is the minimum and maximum x and y coordinates of the connected area.
[0089] 2. GPS coordinates (i.e. longitude and latitude coordinates). For example, based on the geographic information and mapping method in the high-resolution remote sensing image, the GPS coordinates of the upper left gps_ul, upper right gps_ur, lower left gps_dl, and lower right gps_dr of the high-resolution remote sensing image with a width of width and a height of height are calculated. Then, based on the distance from the image coordinates (x, y) of the change point to the above four corner points, the GPS information (longitude, latitude) of the center point of each connected area is calculated using the bilinear interpolation method. The formula is as follows:
[0090] up_long=(gps_ul*longitude-gps_ur*longitude) / width*x
[0091] down_long=((gps_dl*latitude-gps_dl*longitude)) / width*x
[0092] longitude=((up_long+down_long)) / 2+gps_ul*longitude
[0093] left_lat=(gps_ul*latitude-gps_dl*latitude) / height*y
[0094] right_lat=((gps_ur*latitude-gps_dr*latitude)) / height*y
[0095] latitude=((left_lat+right_lat)) / 2+gps_ul*latitude
[0096] 3. Types of land features before and after the change: In this embodiment, a confusion matrix is used to calculate the change mode of land feature types. Fig.11 is a schematic diagram of a confusion matrix according to a preferred embodiment of the present application, with reference to Fig.11 In this embodiment, a single connected area is traversed, and the type of each change point is recorded in the confusion matrix confMatrix. The row represents the semantic type before the change, and the column represents the semantic type after the change. The confusion matrix position p=Max(confMatrix) at the 1st row and the 3rd column is taken. Then the semantic type of the region as a whole before the change is the semantic type (residential point) represented by the row where p is located, and the semantic type after the change is the semantic type (river) represented by the column where p is located.
[0097] Finally, each changed connected region is sorted in order from large to small in area and marked in the remote sensing image after the change. Fig.12 is a schematic diagram of a remote sensing image with annotated detection results according to a preferred embodiment of the present application, such as Fig.12 As shown, the thick solid line represents the connected area where the ground object changes, and its circumscribed rectangle represents the detection result output by the change detection network. The black dot in the circumscribed rectangle represents the center of the connected area, and the text represents the longitude and latitude coordinate information of the center position and the ground object type information before and after the change.
[0098] In summary, the embodiments and preferred implementations provided in the present application realize a method for detecting changes in land objects based on high-resolution remote sensing images. The method can be applied to high-resolution remote sensing images, automatically calculate the change area, and display the real-world location information of the change area and the land object information before and after the change; in this embodiment, it is proposed to use a neural network to perform change detection and semantic segmentation on remote sensing images. When there is sufficient data, it can effectively avoid the reduction of the accuracy of change detection due to changes in the remote sensing area, and improve the robustness and accuracy of the entire project; in this embodiment, a bilinear interpolation method is used to quickly calculate GPS, which improves the calculation efficiency with a small loss of accuracy; and a confusion matrix is also used to calculate the overall change type of the change area; in this embodiment, an expansion splicing method is used to splice the cropped remote sensing small images, which can effectively eliminate the problem of splicing seams after splicing.
[0099] This embodiment also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0100] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0101] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0102] S1, obtaining a first remote sensing image and a second remote sensing image of a target area at different times.
[0103] S2, obtaining a plurality of first block images from the first remote sensing image, obtaining a plurality of second block images corresponding to the plurality of first block images from the second remote sensing image, and treating each pair of corresponding first block images and second block images as an image group to obtain a plurality of image groups.
[0104] S3, using the first deep learning network model to process the multiple image groups respectively, to obtain a plurality of change detection block images corresponding to the multiple image groups one by one, wherein the change detection block images are used to represent the area where the ground objects change between the image groups.
[0105] S4, stitching a plurality of change detection block images to obtain a change detection image for representing a ground object change region between the first remote sensing image and the second remote sensing image.
[0106] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, which will not be repeated here.
[0107] In addition, in combination with the ground object change detection method in the above embodiments, the present application embodiment can provide a storage medium for implementation. The storage medium stores a computer program; when the computer program is executed by a processor, any ground object change detection method in the above embodiments is implemented.
[0108] Those skilled in the art should understand that the technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0109] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for detecting ground object changes, characterized in that include: Acquire a first remote sensing image and a second remote sensing image of a target area at different times; Acquire a plurality of first block images from the first remote sensing image, acquire a plurality of second block images corresponding to the plurality of first block images from the second remote sensing image, and take each pair of corresponding first block images and second block images as an image group to obtain a plurality of the image groups; Using the first deep learning network model to process the plurality of image groups respectively, to obtain a plurality of change detection block images corresponding to the plurality of image groups one by one, wherein the change detection block images are used to represent the area where the ground objects change between the image groups; Use a second deep learning network model to process the plurality of image groups respectively, and obtain a plurality of first land object type segmented block images and a plurality of second land object type segmented block images corresponding one by one to the plurality of image groups, wherein the first land object type segmented block images are used to represent the segmentation results of the land object type in the first block images in the image group, and the second land object type segmented block images are used to represent the segmentation results of the land object type in the second block images in the image group; splicing a plurality of the change detection block images to obtain a change detection image for representing a ground object change area between the first remote sensing image and the second remote sensing image; splicing a plurality of the first land object type segmented and block images to obtain a first land object type segmented image for representing a segmentation result of the land object type of the first remote sensing image, and splicing a plurality of the second land object type segmented and block images to obtain a second land object type segmented image for representing a segmentation result of the land object type of the second remote sensing image; Determining a ground object change area between the first remote sensing image and the second remote sensing image according to the change detection image; Determining a ground object type change result of the ground object change area according to the first ground object type segmentation image and the second ground object type segmentation image; The ground object change area and the ground object type change result are marked in the first remote sensing image and / or the second remote sensing image.
2. The method according to claim 1, characterized in that Determining, according to the change detection image, a ground object change area between the first remote sensing image and the second remote sensing image comprises: Searching for a connected region in the change detection image, wherein a first pixel value in the change detection image represents the ground feature change region, and a second pixel value in the change detection image that is different from the first pixel value represents other regions except the ground feature change region; A bounding rectangle of the connected area is generated, and coordinate information of the bounding rectangle is obtained, wherein the coordinate information of the bounding rectangle is used to represent the area where the land feature changes.
3. The method according to claim 2, characterized in that Determining a ground object type change result of the ground object change area according to the first ground object type segmentation image and the second ground object type segmentation image includes: Acquire first feature type information before the change of at least one feature change point where the feature changes in the connected area from the first feature type segmented image, and acquire second feature type information after the change of at least one feature change point in the connected area from the second feature type segmented image; According to the first land feature type information and the second land feature type information, a land feature type change mode having the largest number of land feature change points is determined as a land feature type change result of the land feature change area.
4. The method according to claim 3, characterized in that Determining, according to the first feature type information and the second feature type information, that the feature type change mode with the largest number of feature change points is the feature type change result of the feature change area includes: Generate a confusion matrix, wherein the rows and columns of the confusion matrix represent the type of the feature before the change and the type of the feature after the change, respectively, and each element position of the confusion matrix corresponds to a change mode of the feature type; Traversing the first land feature type information and the second land feature type information of each land feature change point, determining a land feature type change mode of each land feature change point, and recording the number of land feature change points of the corresponding land feature type change mode at the corresponding element position in the confusion matrix; After traversing all the ground object change points in the connected area, the element with the largest value in the confusion matrix is determined, and the ground object type change mode corresponding to the element position is the ground object type change result of the ground object change area.
5. The method according to claim 1, characterized in that After determining the area of ground object changes between the first remote sensing image and the second remote sensing image according to the change detection image, the method further includes: Acquire latitude and longitude coordinate information of four non-collinear positions of the first remote sensing image and / or the second remote sensing image; Determine the longitude and latitude coordinate information of the area where the land feature changes by a bilinear interpolation method; The longitude and latitude coordinate information of the area where the land object changes is marked in the first remote sensing image and / or the second remote sensing image.
6. The method according to any one of claims 1 to 5, characterized in that Adjacent first block images among the plurality of first block images have overlapping areas; and adjacent second block images among the plurality of second block images have overlapping areas.
7. The method according to any one of claims 1 to 5, characterized in that After acquiring the first remote sensing image and the second remote sensing image of the target area at different times, the method further includes: The first remote sensing image and the second remote sensing image are preprocessed, wherein the preprocessing includes but is not limited to at least one of the following: image alignment, image cropping, image downsampling, and image format conversion.
8. The method according to any one of claims 1 to 5, characterized in that The first deep learning network model includes a U-Net model; the second deep learning network model includes a HR-Net model.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the ground object change detection method according to any one of claims 1 to 8.
10. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the ground feature change detection method according to any one of claims 1 to 8 when running.
