An aerial image difference comparison method, device, equipment and medium

By using scale-invariant feature transformation algorithm and similarity index calculation, the differences in aerial images are automatically identified and labeled, solving the problem of time-consuming and labor-intensive manual comparison and realizing efficient image difference analysis.

CN116168307BActive Publication Date: 2026-03-03GUANGZHOU MUNICIPAL CONSTR PROJECT SUPERVISION CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310019259.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-06
Publication Date
2026-03-03
Estimated Expiration
2043-01-06

AI Technical Summary

Technical Problem

In existing technologies, comparing the differences between aerial images from different periods mainly relies on manual methods, which is time-consuming and labor-intensive.

Method used

Aerial images are processed using a scale-invariant feature transform algorithm. The similarity index of the feature images is calculated, and when the similarity index exceeds a threshold, the difference grayscale image is segmented and grayscale contour lines are marked. When the similarity index does not exceed the threshold, the difference of the grayscale matrix is ​​performed to identify the difference regions.

Benefits of technology

It can quickly identify and label the differences in aerial images from different periods, reducing manual workload and improving production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116168307B_ABST
    Figure CN116168307B_ABST
Patent Text Reader

Abstract

The application discloses a kind of aerial photograph image difference comparison method, device, equipment and medium, by obtaining the first original aerial photograph image and second original aerial photograph image to be compared, using scale invariant feature transform algorithm to the first original aerial photograph image after pre-processing and the second original aerial photograph image after pre-processing are handled, obtain first feature image and second feature image;The similarity index between the first feature image and the second feature image is calculated;When the similarity index exceeds preset similarity threshold, the difference gray scale chart between the first original aerial photograph image and the second original aerial photograph image is calculated, and the difference gray scale chart is segmented according to threshold value to obtain gray contour line, and is labeled according to gray contour line, obtains aerial photograph image difference comparison result, the difference point between the aerial photograph of different period can be quickly identified and labeled in the present application, reduce the workload of relevant personnel, improve production efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, terminal device, and computer-readable storage medium for aerial image difference comparison. Background Technology

[0002] Currently, comparisons of aerial images from different periods are primarily conducted manually. By comparing the differences between two images, changes in buildings, facilities, and the environment over time can be observed. However, this manual method is time-consuming and labor-intensive. Summary of the Invention

[0003] This invention provides a method, apparatus, terminal device, and computer-readable storage medium for aerial image difference comparison, which can quickly identify and mark the differences between aerial images from different periods, reducing the workload of relevant personnel and improving production efficiency.

[0004] The first aspect of this invention provides a method for aerial image difference comparison, comprising:

[0005] Acquire the first and second original aerial images to be compared, and preprocess the first and second original aerial images.

[0006] The scale-invariant feature transform algorithm is used to process the preprocessed first original aerial image and the preprocessed second original aerial image to obtain the first feature image and the second feature image.

[0007] Calculate the similarity index between the first feature image and the second feature image;

[0008] When the similarity index exceeds a preset similarity threshold, the difference grayscale image between the first original aerial image and the second original aerial image is calculated, and threshold segmentation is performed based on the difference grayscale image to obtain grayscale contour lines. The grayscale contour lines are then used to mark the first original aerial image and the second original aerial image to obtain the aerial image difference comparison result.

[0009] As an improvement to the above solution, the method further includes:

[0010] When the similarity index does not exceed the similarity threshold, the difference between the grayscale matrix of the first original aerial image and the grayscale matrix of the second original aerial image is calculated to obtain a difference matrix, and the difference region between the first original aerial image and the second original aerial image is obtained based on the difference matrix.

[0011] As an improvement to the above scheme, the step of calculating the difference grayscale image between the first original aerial image and the second original aerial image, performing threshold segmentation based on the difference grayscale image to obtain grayscale contour lines, and marking the first original aerial image and the second original aerial image based on the grayscale contour lines to obtain the aerial image difference comparison result specifically includes:

[0012] The first original aerial image and the second original aerial image are represented by computer image representation to obtain a first matrix and a second matrix;

[0013] Perform grayscale conversion on the first matrix and the second matrix to obtain a first grayscale matrix and a second grayscale matrix;

[0014] Calculate the difference grayscale image between the first grayscale matrix and the second grayscale matrix;

[0015] The difference grayscale image is binarized to obtain the difference grayscale matrix;

[0016] Find the grayscale contour lines in the difference grayscale matrix, and mark them on the first original aerial image and the second original aerial image to obtain the aerial image difference comparison results.

[0017] As an improvement to the above scheme, the calculation of the similarity index between the first feature image and the second feature image is specifically as follows:

[0018] The similarity index is obtained by performing a structural similarity analysis between the first feature image and the second feature image.

[0019] As an improvement to the above scheme, after annotating the first original aerial image and the second original aerial image according to the grayscale contour lines, the method further includes:

[0020] Irrelevant features are filtered out from the first and second original aerial images after annotation based on a pre-trained irrelevant feature recognition model.

[0021] A second aspect of the present invention provides an aerial image difference comparison device, comprising:

[0022] An image preprocessing module is used to acquire a first original aerial image and a second original aerial image to be compared, and to preprocess the first original aerial image and the second original aerial image.

[0023] The image feature matching module is used to process the preprocessed first original aerial image and the preprocessed second original aerial image using the scale-invariant feature transformation algorithm to obtain the first feature image and the second feature image.

[0024] The similarity calculation module is used to calculate the similarity index between the first feature image and the second feature image;

[0025] The comparison module is used to calculate the difference grayscale image between the first original aerial image and the second original aerial image when the similarity index exceeds a preset similarity threshold, and to perform threshold segmentation based on the difference grayscale image to obtain grayscale contour lines, and to mark the first original aerial image and the second original aerial image based on the grayscale contour lines to obtain the aerial image difference comparison result.

[0026] As an improvement to the above solution, the comparison module is further configured to:

[0027] When the similarity index does not exceed the similarity threshold, the difference between the grayscale matrix of the first original aerial image and the grayscale matrix of the second original aerial image is calculated to obtain a difference matrix, and the difference region between the first original aerial image and the second original aerial image is obtained based on the difference matrix.

[0028] As an improvement to the above scheme, the gray contrast module calculates the difference grayscale map between the first original aerial image and the second original aerial image, performs threshold segmentation based on the difference grayscale map to obtain grayscale contour lines, and marks the first original aerial image and the second original aerial image based on the grayscale contour lines to obtain the aerial image difference comparison result, specifically including:

[0029] The first original aerial image and the second original aerial image are represented by computer image representation to obtain a first matrix and a second matrix;

[0030] Perform grayscale conversion on the first matrix and the second matrix to obtain a first grayscale matrix and a second grayscale matrix;

[0031] Calculate the difference grayscale image between the first grayscale matrix and the second grayscale matrix;

[0032] The difference grayscale image is binarized to obtain the difference grayscale matrix;

[0033] Find the grayscale contour lines in the difference grayscale matrix, and mark them on the first original aerial image and the second original aerial image to obtain the aerial image difference comparison results.

[0034] A third aspect of the present invention provides a terminal device, including 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 terminal device implements the aerial image difference comparison method provided in the first aspect above.

[0035] A fourth aspect of the present invention provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the aerial image difference comparison method provided in the first aspect above.

[0036] Compared with existing technologies, the aerial image difference comparison method provided by this invention acquires a first original aerial image and a second original aerial image to be compared, and preprocesses the first original aerial image and the second original aerial image; it then uses a scale-invariant feature transform algorithm to process the preprocessed first original aerial image and the preprocessed second original aerial image to obtain a first feature image and a second feature image; it calculates a similarity index between the first feature image and the second feature image; when the similarity index exceeds a preset similarity threshold, it calculates a difference grayscale image between the first original aerial image and the second original aerial image, and performs threshold segmentation based on the difference grayscale image to obtain grayscale contour lines; and it annotates the first original aerial image and the second original aerial image based on the grayscale contour lines to obtain the aerial image difference comparison result. This embodiment can quickly identify and annotate the differences between aerial images from different periods, reducing the workload of relevant personnel and improving production efficiency. Accordingly, this invention also provides an aerial image difference comparison device, a terminal device, and a computer-readable storage medium. Attached Figure Description

[0037] Figure 1 This is a flowchart illustrating the aerial image difference comparison method provided in an embodiment of the present invention. Detailed Implementation

[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0039] See Figure 1 , Figure 1 This is a flowchart illustrating the aerial image difference comparison method provided in this embodiment of the invention. Specifically, the aerial image difference comparison method provided in this embodiment of the invention includes S11~S15:

[0040] S11, acquire the first original aerial image and the second original aerial image to be compared, and preprocess the first original aerial image and the second original aerial image; wherein, the first original aerial image and the second original aerial image are aerial images of the same building / scenic spot, etc., taken at two different times.

[0041] S12, the scale-invariant feature transform algorithm is used to process the preprocessed first original aerial image and the preprocessed second original aerial image to obtain the first feature image and the second feature image.

[0042] S13, calculate the similarity index between the first feature image and the second feature image.

[0043] S14, when the similarity index exceeds a preset similarity threshold, calculate the difference grayscale image between the first original aerial image and the second original aerial image, perform threshold segmentation based on the difference grayscale image to obtain grayscale contour lines, and mark the first original aerial image and the second original aerial image based on the grayscale contour lines to obtain the aerial image difference comparison result.

[0044] In one optional implementation, the method further includes:

[0045] When the similarity index does not exceed the similarity threshold, the difference between the grayscale matrix of the first original aerial image and the grayscale matrix of the second original aerial image is calculated to obtain a difference matrix, and the difference region between the first original aerial image and the second original aerial image is obtained based on the difference matrix.

[0046] In one optional implementation, the preprocessing in S11 includes image standardization, which can be achieved through binarization and grayscale conversion.

[0047] In this embodiment of the invention, the first original aerial image and the second original aerial image, along with probability standardization processing, can improve the image quality and thus enhance the accuracy of image positioning.

[0048] In step S12, scale-invariant feature transformation is performed on the preprocessed first original aerial image and the preprocessed second original aerial image to achieve coordinate point and feature point matching. For example, step S12 includes:

[0049] (1) According to the Gaussian function A Gaussian pyramid for the image is constructed using fuzzy sampling. The Gaussian function is... ;

[0050] For image matrix Its scale space is the convolution of the image matrix and a Gaussian function:

[0051]

[0052] in The scale space factor is the smaller the value, the clearer the sampling effect, and vice versa.

[0053] (2) Image difference The image Gaussian difference pyramid is obtained, where and These are two consecutive image smoothing scales;

[0054] (3) Selecting extreme points: Select the maximum and minimum points in the difference pyramid formed in the previous step;

[0055] (4) Locate the feature points and remove unstable extreme points;

[0056] (5) Calculate the direction of the feature point;

[0057] (6) Normalize to form feature description vectors for all images;

[0058] In an optional implementation, S13, "calculating the similarity index between the first feature image and the second feature image," specifically involves:

[0059] The similarity index is obtained by performing a structural similarity analysis between the first feature image and the second feature image.

[0060] For example, the steps for image similarity analysis using a structural similarity index include:

[0061] (1) For the first feature image x Second feature image y Calculate the mean of both, denoted as . , .

[0062] (2) Calculate the first feature image x variance The variance of the second feature image y and the first feature image x Second feature image y Covariance between .

[0063] (3) For the first feature image respectively x Second feature image y Compare brightness, contrast, and structure.

[0064] (4) Given brightness Contrast and structure weights Calculate the similarity index.

[0065] (5) Judge the degree of difference between images based on the similarity index.

[0066] In an optional implementation, step S14, "calculating the difference grayscale image between the first original aerial image and the second original aerial image, performing threshold segmentation based on the difference grayscale image to obtain grayscale contour lines, and marking the first original aerial image and the second original aerial image based on the grayscale contour lines to obtain the aerial image difference comparison result," specifically includes:

[0067] The first feature image and the second feature image are represented by computer image representation to obtain a first matrix A and a second matrix B;

[0068] Perform grayscale conversion on the first matrix A and the second matrix B to obtain the first grayscale matrix M and the second grayscale matrix N;

[0069] Calculate the difference grayscale image D between the first grayscale matrix M and the second grayscale matrix N;

[0070] The difference grayscale image D is binarized to obtain the difference grayscale matrix E;

[0071] Find the grayscale contour lines in the difference grayscale matrix E, and mark them on the first original aerial image and the second original aerial image to obtain the aerial image difference comparison results.

[0072] For example, the first grayscale matrix M and the second grayscale matrix N can be input into the image similarity processing function simm to obtain the difference grayscale image D.

[0073] For example, the difference grayscale matrix E can be input into the imcontour function for processing to obtain grayscale contour lines. In this embodiment of the invention, all grayscale contour lines constitute a contour line set C. For each contour line in set C, it is marked with a specific color in S14 (such as a red rectangle) to form a difference point identifier.

[0074] In an optional implementation, step S15, after annotating the first original aerial image and the second original aerial image according to the grayscale contour lines, further includes:

[0075] Irrelevant features are filtered out from the first and second original aerial images after annotation based on a pre-trained irrelevant feature recognition model.

[0076] In this embodiment of the invention, after the difference points of the first and second original images are labeled, a pre-trained irrelevant feature recognition model is used to filter out irrelevant features from the first and second original images to avoid the influence of irrelevant features on the difference comparison results, thereby further improving the accuracy of difference point recognition. For example, an irrelevant feature recognition model can be obtained by training a neural network algorithm using an irrelevant feature training set. Of course, the training method for the irrelevant feature recognition model is not limited in this embodiment of the invention.

[0077] Accordingly, embodiments of the present invention also provide an aerial image difference comparison device, comprising:

[0078] An image preprocessing module is used to acquire a first original aerial image and a second original aerial image to be compared, and to preprocess the first original aerial image and the second original aerial image.

[0079] The image feature matching module is used to process the preprocessed first original aerial image and the preprocessed second original aerial image using the scale-invariant feature transformation algorithm to obtain the first feature image and the second feature image.

[0080] The similarity calculation module is used to calculate the similarity index between the first feature image and the second feature image;

[0081] The comparison module is used to calculate the difference grayscale image between the first original aerial image and the second original aerial image when the similarity index exceeds a preset similarity threshold, and to perform threshold segmentation based on the difference grayscale image to obtain grayscale contour lines, and to mark the first original aerial image and the second original aerial image based on the grayscale contour lines to obtain the aerial image difference comparison result.

[0082] In one optional implementation, the comparison module is further configured to:

[0083] When the similarity index does not exceed the similarity threshold, the difference between the grayscale matrix of the first original aerial image and the grayscale matrix of the second original aerial image is calculated to obtain a difference matrix, and the difference region between the first original aerial image and the second original aerial image is obtained based on the difference matrix.

[0084] In one optional implementation, the grayscale contrast module calculates the difference grayscale map between the first original aerial image and the second original aerial image, performs threshold segmentation based on the difference grayscale map to obtain grayscale contour lines, and marks the first original aerial image and the second original aerial image based on the grayscale contour lines to obtain the aerial image difference comparison result, specifically including:

[0085] The first original aerial image and the second original aerial image are represented by computer image representation to obtain a first matrix and a second matrix;

[0086] Perform grayscale conversion on the first matrix and the second matrix to obtain a first grayscale matrix and a second grayscale matrix;

[0087] Calculate the difference grayscale image between the first grayscale matrix and the second grayscale matrix;

[0088] The difference grayscale image is binarized to obtain the difference grayscale matrix;

[0089] Find the grayscale contour lines in the difference grayscale matrix, and mark them on the first original aerial image and the second original aerial image to obtain the aerial image difference comparison results.

[0090] In one optional implementation, the similarity calculation module is specifically used for:

[0091] The similarity index is obtained by performing a structural similarity analysis between the first feature image and the second feature image.

[0092] In an optional implementation, after the comparison module identifies and labels the set of pixels whose grayscale values ​​belong to the grayscale contour lines in the first and second original aerial images, it is further configured to:

[0093] Irrelevant features are filtered out from the first and second original aerial images after annotation based on a pre-trained irrelevant feature recognition model.

[0094] It should be noted that the aerial image difference comparison device provided in this embodiment of the invention is used to execute all the steps and processes of the aerial image difference comparison method provided in the above embodiment. The working principles and effects of the two are one-to-one, and will not be described in detail here.

[0095] Furthermore, the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0096] This invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the terminal device implements the aerial image difference comparison method provided in the above embodiments, for example... Figure 1 S11~S14.

[0097] The terminal device can be a desktop computer, laptop, handheld computer, vehicle head-up display, vehicle central control device, or other computing device. The vehicle terminal device may include, but is not limited to, a processor and a memory.

[0098] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.

[0099] The memory can be used to store the computer programs and / or modules. The processor, by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory, realizes various functions of the aerial image difference comparison device / terminal equipment. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0100] Wherein, if the modules / units integrated into the aerial image difference comparison device / terminal equipment are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms, etc.

[0101] This invention also provides a computer-readable storage medium, which includes a stored computer program, wherein the computer program, when running, controls the device where the computer-readable storage medium is located to execute the aerial image difference comparison method provided in the above embodiments.

[0102] The storage medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0103] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method of aerial image difference comparison, characterized in that, The method comprises the following steps: obtain a first original aerial image and a second original aerial image to be compared, and pre-process the first original aerial image and the second original aerial image; process the pre-processed first original aerial image and the pre-processed second original aerial image by using a scale-invariant feature transform algorithm to obtain a first feature image and a second feature image; calculate a similarity index between the first feature image and the second feature image; when the similarity index exceeds a preset similarity threshold, calculate a difference gray image between the first original aerial image and the second original aerial image, and perform threshold segmentation according to the difference gray image to obtain a gray contour line, and label the first original aerial image and the second original aerial image according to the gray contour line to obtain an aerial image difference comparison result; comprising: perform computer image representation on the first original aerial image and the second original aerial image to obtain a first matrix and a second matrix; perform gray scale conversion on the first matrix and the second matrix to obtain a first gray matrix and a second gray matrix; calculate a difference gray image of the first gray matrix and the second gray matrix; perform binaryzation on the difference gray image to obtain a difference gray matrix; find a gray contour line in the difference gray matrix, and label the first original aerial image and the second original aerial image according to the gray contour line to obtain an aerial image difference comparison result; perform irrelevant ground object filtering on the labeled first original aerial image and the labeled second original aerial image based on a pre-trained irrelevant ground object recognition model.

2. The aerial image difference comparison method of claim 1, wherein, The method further comprises: when the similarity index does not exceed the similarity threshold, perform difference operation on the gray matrix of the first original aerial image and the gray matrix of the second original aerial image to obtain a difference matrix, and obtain a difference region between the first original aerial image and the second original aerial image according to the difference matrix.

3. The aerial image difference comparison method of claim 1, wherein, The calculation of the similarity index between the first feature image and the second feature image is specifically: perform similarity analysis between the first feature image and the second feature image by using a structural similarity index to obtain a similarity index.

4. An aerial image difference comparison device, characterized by, comprising: an image pre-processing module for obtaining a first original aerial image and a second original aerial image to be compared, and pre-processing the first original aerial image and the second original aerial image; an image feature matching module for processing the pre-processed first original aerial image and the pre-processed second original aerial image by using a scale-invariant feature transform algorithm to obtain a first feature image and a second feature image; a similarity calculation module for calculating a similarity index between the first feature image and the second feature image; The comparison module is configured to, when the similarity index exceeds a preset similarity threshold, calculate a difference gray scale map between the first original aerial image and the second original aerial image, perform threshold segmentation on the difference gray scale map to obtain a gray scale contour, and perform labeling on the first original aerial image and the second original aerial image according to the gray scale contour to obtain an aerial image difference comparison result. perform computer image representation on the first original aerial image and the second original aerial image to obtain a first matrix and a second matrix; perform gray scale conversion on the first matrix and the second matrix to obtain a first gray scale matrix and a second gray scale matrix; calculate a difference gray scale map of the first gray scale matrix and the second gray scale matrix; perform binarization on the difference gray scale map to obtain a difference gray scale matrix; find a gray scale contour in the difference gray scale matrix, and perform labeling on the first original aerial image and the second original aerial image according to the gray scale contour to obtain an aerial image difference comparison result; perform irrelevant ground object filtering on the labeled first original aerial image and the labeled second original aerial image based on a pre-trained irrelevant ground object recognition model.

5. The aerial image difference comparison apparatus according to claim 4, wherein The comparison module is further configured to: when the similarity index does not exceed the similarity threshold, perform a difference operation on a gray scale matrix of the first original aerial image and a gray scale matrix of the second original aerial image to obtain a difference matrix, and obtain a difference region between the first original aerial image and the second original aerial image according to the difference matrix.

6. A terminal device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program comprises instructions for causing the processor to perform the method of any one of claims 1 to 5. The processor, when executing the computer program, causes the terminal device to implement the aerial image difference comparison method according to any one of claims 1 to 3.

7. A computer readable storage medium characterized by The computer readable storage medium comprises a stored computer program, wherein the computer readable storage medium controls a device in which the computer readable storage medium is located to implement the aerial image difference comparison method according to any one of claims 1 to 3 when the computer program is running.

Citation Information

Patent Citations

  • A street scene image difference comparison method and a device

    CN109034185A

  • Ultra-high voltage transmission line channel hidden danger early warning method based on SSIM algorithm

    CN110610485A