Illegal building detection method based on unmanned aerial vehicle image comparison

Through drone image comparison and deep learning technology, combined with YCrCb color space and YOLOv8 classification algorithm, the missed and misdetection problems of illegal buildings under construction are solved, and efficient and accurate identification of illegal buildings is achieved, and urban management is supported. Quick investigation and punishment.

CN119007039APending Publication Date: 2024-11-22XIAMEN OCEAN VOCATIONAL & TECH COLLEGE
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410996404.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The existing illegal building inspection technology is difficult to effectively identify illegal buildings under construction, and there are problems of missed inspection and missed inspection. Especially in the diverse urban scenarios, there is a lack of a complete range of large-scale illegal building labeling data sets.

Method used

Using a drone-based image comparison method, combined with image processing and deep learning technology, the difference operation and threshold segmentation of YCrCb color space is used to eliminate non-construction interference using YOLOv8 classification algorithm, combined with SSIM detection to eliminate shadows and lighting changes, and identify Areas of image changes caused by illegal buildings under construction.

Benefits of technology

It has achieved an accuracy rate of 86.3% and an error detection rate of 13.7%, and can quickly and accurately identify illegal buildings under construction, support timely investigation and punishment of urban management, and improve detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119007039A_ABST
    Figure CN119007039A_ABST
Patent Text Reader

Abstract

The invention provides an illegal building detection method based on unmanned aerial vehicle image comparison, and the method comprises the following steps: S1, carrying out the image collection through an unmanned aerial vehicle, and collecting the aerial photos of all streets; step S2, carrying out preprocessing on the collected image; s3, background differencing is carried out on the preprocessed image, three-channel color components are extracted from the image, difference operation and threshold processing are carried out on a new time phase and an old time phase of the same color component, and an image change area is detected; s4, applying a deep learning classification algorithm to a change area image classification task, and excluding image changes caused by non-construction reasons; s5, performing similarity comparison on new and old time phase change regions by using structural similarity detection; according to the invention, the illegal building under construction can be detected based on an unmanned aerial vehicle image comparison method in combination with an image processing and deep learning method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of illegal building detection, in particular to an illegal building detection method based on unmanned aerial vehicle image comparison. Background Art

[0002] Dynamic detection of urban land use and environmental changes is of great significance for urban planning, resource integration, environmental monitoring and sustainable development. The widespread distribution and high density of urban buildings require them to be stable and safe to protect the lives of residents and the healthy development of the city. With the urbanization process and the development of the real estate market, the number of illegal buildings is on the rise, which hinders the orderly development and unified planning and management of the city.

[0003] Traditionally, the detection of illegal buildings mainly relies on manual inspections, which is inefficient, requires a lot of manpower, and is prone to underreporting. Therefore, it is urgent to quickly and effectively detect illegal buildings in order to maintain urban order and promote healthy development. With the continuous advancement of drone photogrammetry technology, drone aerial images are gradually becoming a key tool for urban management inspections with their high resolution, superior data quality, and economical acquisition costs. Research and development of urban illegal building detection technology based on drone images has important theoretical and practical value for improving urban management efficiency, protecting the environment, and promoting sustainable development.

[0004] Currently, by utilizing the powerful feature extraction capabilities and image recognition technology of deep learning, researchers have developed a variety of algorithms and models to detect illegal buildings. In 2019, Li Changpeng extended the Siamese Neural Network to the detection of building scene changes in drone images and located the changed buildings. Based on the YOLO (You Only Look Once) model, Feng Xiaoyu combined the obvious features such as green protective nets, excavators, and steel bars in the construction site to realize the identification of construction sites, but this study is only suitable for large-scale construction site scenes, and there is no research on small-scale illegal additions and new scenes of ordinary buildings. In 2020, Chen Xiaofeng described the change area through multi-feature fusion under fixed-point monitoring and used the change area extraction algorithm based on fuzzy space Markov random field (Markov Random Field, MRF) to extract the change area, and finally used the neural network to determine whether the change area belongs to the building area. Yan Desai proposed to combine digital image processing technology with full convolutional network technology to establish a set of automatic detection methods for illegal buildings. Zhang Yi proposed a quadratic matching algorithm to align drone aerial images, and automatically learned to extract high-level complex features of aerial images through deep learning algorithms to construct a difference detection model. In 2021, Liang Zheheng and others trained 5,000 images through deep learning methods to directly extract illegal building areas from the images. Liu et al. used semantic segmentation and object-based change detection to detect potential illegal building roofs from drone images. Experiments showed that this method has better accuracy than other similar methods. In 2022, Ding Lizao used image processing and deep learning related algorithms as theoretical basis to achieve the removal of non-building areas and eliminate irrelevant interference under fixed-point monitoring. Building segmentation technology.

[0005] In summary, there have been many studies on illegal building detection technology, which can be mainly divided into two categories: research based on image recognition and research based on image change detection. Research based on image recognition uses deep learning neural networks to identify images and extract illegal building areas. Because there are many types of illegal buildings and the number of illegal buildings that have already been built is huge, the city management department is most concerned about the identification of illegal buildings under construction rather than the illegal buildings that have been built. This type of method mainly studies the detection of all illegal buildings, rather than illegal buildings under construction. In addition, the scenes of illegal buildings in cities are diverse and cannot be enumerated. So far, there is no large-scale illegal building annotation dataset with a complete range of types, so this type of algorithm is prone to problems such as missed detection. Research based on image change detection has made some progress at this stage, but there are incomplete methods for judging non-building areas and building areas, resulting in problems such as false detection and missed detection. Summary of the invention

[0006] In view of this, the purpose of the present invention is to provide an illegal building detection method based on drone image comparison, which can realize the detection of illegal buildings under construction by combining drone image comparison method with image processing and deep learning methods.

[0007] The present invention is implemented by the following method: a method for detecting illegal buildings based on drone image comparison, the detection method comprising the following steps:

[0008] Step S1: collect images by using drones to collect aerial photos of each street;

[0009] Step S2, preprocessing the collected image;

[0010] Step S3, performing background difference on the pre-processed image, extracting three-channel color components from the image, performing difference calculation and threshold processing on the new and old phases of the same color component, and detecting the image change area;

[0011] Step S4, applying the deep learning classification algorithm to the task of classifying the changed area images, and eliminating image changes caused by non-construction reasons;

[0012] Step S5: Use structural similarity detection to compare the similarity of the new and old phase change regions to eliminate image changes caused by factors such as shadows, brightness changes, and image jitter, and output the image change region caused by illegal buildings.

[0013] Furthermore, the step S1 is further specified as follows: using a drone to perform aerial photography operations on multiple streets multiple times, defining a route for each aerial photography mission, and each route contains a certain number of waypoints. Each time, the drone uses a vertical downward lens angle to perform aerial photography operations at the set waypoints to collect multiple photos.

[0014] Furthermore, the step S2 is further specified as follows: the image preprocessing includes image registration algorithm, image denoising, histogram equalization and adaptive gamma correction; the image registration algorithm is a process of matching two or more images acquired from different perspectives and at different times in the same scene, and its main purpose is to correct the two images to the same coordinate system through the correspondence relationship between the feature points of the two images; the image denoising is to use median filtering for image enhancement, and median filtering is a nonlinear smoothing filtering method that suppresses noise through sorting statistical theory, and is to construct an area within N×N adjacent to a certain pixel point as the center point, select the median of the pixel point, and replace all pixel values ​​centered on the point with the median; the histogram equalization is to change the grayscale of each pixel in the image by changing the histogram of the image, and enhance the contrast of the image with a small grayscale dynamic range; the adaptive gamma correction is to optimize the details of the dark and bright areas of the image, and the image maintains a high visual clarity and information transmission effect under various lighting conditions.

[0015] Furthermore, the step S3 is further specified as follows: the background difference includes YCrCb color components, difference operation and threshold segmentation, and candidate change area generation; the YCrCb color component, that is, Y represents brightness, Cr and Cb respectively represent the red and blue chromaticity information subtracted from the brightness value, separates the brightness and chromaticity information, and allows these signal components to perform independent analysis and processing; the difference operation and threshold segmentation, that is, using the absolute difference function to calculate the new and old phase images for difference operation, that is, calculating the difference and absolute value in turn; the candidate change area generation, that is, using the findContours function of the OpenCV function to perform contour extraction and area calculation, filtering areas less than 8 square meters, and using the boundingRect function to extract the outer rectangular frame of the contour as the candidate change area, so as to perform subsequent classification filtering and change judgment processes.

[0016] Furthermore, the step S4 is further specified as follows: applying the YOLOv8 classification algorithm to the change area image classification task, excluding interference targets such as cars, trucks, trees, grass and solar panels, and screening out target information of buildings and engineering vehicles suspected of illegal construction or construction behavior, in preparation for the final change judgment.

[0017] The beneficial effects of the present invention are as follows: the method of the present invention innovatively uses the three components of the YCrCb color space for differential operations and threshold segmentation, combines the YOLOv8s classification algorithm to eliminate the interference of image changes caused by non-construction activities, and calculates the similarity of the new and old phase change regions through SSIM detection, thereby identifying the image change regions caused by illegal buildings under construction. The experimental results show that this method has no missed detection phenomenon, the detection accuracy rate reaches 86.3%, the false detection rate is 13.7%, and the detection time for each pair of photos is about 4.08 seconds; this method can effectively and quickly identify the illegal building area under construction, support the accurate discovery and timely investigation of illegal construction phenomena; optimize the system's automated operation process from the directions of scheduled inspections by drones, automatic uploading of aerial photography data, and automatic calling of comparison algorithms, and continuously iterate the accuracy of the classification and filtering algorithm to improve the accuracy and automation of illegal building detection, and provide certain technical support for urban management. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a schematic diagram of the method flow of the present invention.

[0019] Figure 2 This is the background difference structure block diagram.

[0020] Figure 3 This is the network structure diagram of the YOLOv8 classification algorithm.

[0021] Figure 4 This is a diagram of the YOLOv8s classification model training process. DETAILED DESCRIPTION

[0022] The present invention will be further described below in conjunction with the accompanying drawings.

[0023] See also Figure 1 As shown, the present invention provides five major steps: drone image acquisition, image preprocessing, background difference, classification filtering, and change determination.

[0024] (1) UAV image acquisition: This paper uses a DJI Airport Matrice 3TD drone with 48 million effective pixels to conduct aerial photography operations on multiple streets. Each aerial photography mission defines a route, and each route contains a certain number of waypoints. The drone uses a vertical downward lens angle to perform aerial photography operations at the set waypoints each time. This paper defines a total of 15 routes, each route contains 50 to 120 waypoints, and a total of more than 4,500 photos with a resolution of 4032×3024 are taken.

[0025] (2) Image preprocessing: Perform image registration, image denoising, histogram equalization, adaptive gamma correction, etc. on the collected images.

[0026] (3) Background difference: The three-channel color components YCrCb are extracted from the preprocessed image, and the new and old phases of the same color component are subjected to difference calculation and threshold processing to detect the image change area.

[0027] (4) Classification and filtering: The YOLOv8 deep learning classification algorithm is applied to the task of classifying images of changed areas, filtering out seven interference targets such as cars, trees, and solar panels, and eliminating image changes caused by non-construction reasons.

[0028] (5) Change determination: Use the structural similarity index measure (SSIM) test to compare the similarity of the new and old phase change regions to eliminate image changes caused by factors such as shadows, brightness changes, and image jitter, and output the image change regions caused by illegal buildings.

[0029] 1 Image preprocessing

[0030] 1.1 Image Registration Algorithm

[0031] During the shooting process, drones are easily affected by natural and human factors such as wind speed, wind direction, complex terrain, battery capacity, aircraft attitude, and flight altitude, which usually cause non-rigid distortion of the collected images. Therefore, the old and new phase images taken at the same waypoint, the same heading, the same lens shooting angle, different time and weather conditions cannot be directly used for change detection. Image registration is the process of matching two or more images (i.e., the image to be registered and the reference image) acquired from different perspectives and at different times in the same scene. Its main purpose is to correct the two images to the same coordinate system through the correspondence between the feature points of the two images. Therefore, image registration is the premise and key step of the comparison application in this paper.

[0032] With the development of image registration technology, many scholars have proposed many feature extraction algorithms, such as the classic Scale-Invariant Feature Transform (SIFT) algorithm, Speeded Up Robust Features (SURF) algorithm and oriented FAST and rotated BRIEF (ORB) algorithm based on features from accelerated segment test (FAST). Since the distortion of the old and new phase images in this method is only caused by wind speed, wind direction, flight altitude errors, etc., this paper uses the ORB algorithm for feature point detection, which has the advantages of rotation and scale invariance, and also has excellent performance in terms of time consumption, and is very popular in real-time applications.

[0033] 1.1.1 ORB algorithm

[0034] The ORB algorithm combines two different feature detection and description technologies, consisting of an improved FAST feature detection algorithm and an improved BRIEF (Binary Robust Independent Elementary Features) binary descriptor, and has good real-time performance.

[0035] FAST is a fast feature detection algorithm used to detect corners in an image. The improved FAST not only detects corners, but also assigns a main direction to each corner, which enables the algorithm to capture the characteristic direction information in the image. BRIEF is an algorithm that generates feature descriptors by comparing the grayscale value differences of pixel pairs. The improved BRIEF generates a 128-bit binary descriptor by comparing the pixel pairs around the feature points, which is used to identify and match image feature points, and finally forms a local image feature description of the feature points. Therefore, combining the ORB of the two algorithms can create a powerful feature extraction algorithm that can not only quickly detect key points in an image, but also generate descriptors that are robust to rotation and scale changes.

[0036] 1.1.2 Feature Point Matching

[0037] In order to improve the accuracy of feature point matching, this paper uses the Random Sample Consensus (Ransac) algorithm to remove mismatched points. Ransac determines the intrinsic model of the data by randomly selecting data points to find the best fitting parameters and ensure that the maximum number of data points conform to the model. The algorithm steps include: randomly selecting four pairs of points to derive the homography matrix, evaluating the distance between the projected coordinates and the original coordinates, and if it is less than the threshold, the match is considered valid; repeat this process and select the homography matrix with the most valid matches as the final result.

[0038] The ORB feature point Ransac matching results of the old and new phase images show that the feature points with larger grayscale values ​​of the surrounding pixels, such as corners and edges in the image, are detected and correctly registered. After feature matching, the image to be registered is transformed into the reference image coordinate system, and the transformation relationship between the two images is calculated through affine transformation to ensure accurate alignment of the registered image with the reference image. The transformed images can be overlapped, fused, and background-differentiated to achieve comparison and analysis of the two images.

[0039] 1.2 Image Denoising

[0040] The noise in drone aerial photos will affect the accuracy of image segmentation. In order to improve the image quality, this paper uses median filtering for image enhancement. Median filtering is a nonlinear smoothing filtering method that suppresses noise through sorting statistical theory. It constructs an N×N adjacent area with a certain pixel as the center point, selects the median of the pixel point, and replaces all pixel values ​​​​centered on the point with the median. The median filtering algorithm is not only easy to implement, but also can well preserve the details and edge information of the image while eliminating image noise. This paper uses a 3×3 median filter to achieve denoising.

[0041] 1.3 Histogram Equalization

[0042] The original image may lack a sense of hierarchy because its grayscale distribution may be concentrated in a narrow range, and many details may be compressed or lost. Histogram equalization is a simple and effective image enhancement technology that changes the grayscale of each pixel in the image by changing the histogram of the image, thereby enhancing the contrast of images with a small grayscale dynamic range. The basic principle is to widen the grayscale values ​​of the image with a large number of pixels (i.e., the grayscale values ​​that play a major role in the picture) and merge the grayscale values ​​of the image with a small number of pixels (i.e., the grayscale values ​​that do not play a major role in the picture).

[0043] When drones shoot under different lighting conditions, they may encounter shadows or uneven lighting. Histogram equalization can increase the dynamic range of grayscale value differences between pixels and make the image clear. The histogram equalization transformation formula used in this article is:

[0044]

[0045] Among them, s represents the grayscale of the image after histogram equalization, r represents the grayscale of the original image, and both r and s are normalized values; P r (r) is the probability density function of r, N k is the total number of gray levels that appear in the entire image, N is the total number of all pixels in the image, and L is the total number of gray levels that appear in the image.

[0046] 1.4 Adaptive Gamma Correction

[0047] In the processing of drone aerial images, uneven lighting environments are often encountered. Adaptive Gamma correction technology is particularly critical for enhancing the visibility and readability of images. It can optimize the details of dark and bright areas of the image, and the image maintains high visual clarity and information transmission effect under various lighting conditions. "Adaptive" correction technology can dynamically adjust according to the local characteristics of the image, rather than simply applying a uniform Gamma value. This intelligent correction method can enhance the brightness of the dark part of the image while preventing the loss of details in the bright part due to overexposure, especially for the shadow area in the drone aerial image, the corrected details are clearly visible. Through image denoising, histogram equalization, and adaptive Gamma correction, the difference between the old and new phase images is significantly reduced, the building features are more prominent, and the contrast is enhanced, which can achieve the expected effect of the experiment.

[0048] 2 Background subtraction

[0049] "Background difference", also known as "background subtraction", is one of the most commonly used methods in image difference segmentation in the field of computer vision. This paper performs a difference operation on the old and new phase images to obtain the difference target area, thereby achieving a preliminary screening of illegal buildings. The old phase image represents the historical aerial image, hereinafter referred to as A; the new phase image represents the current aerial image, hereinafter referred to as B.

[0050] like Figure 2 As shown in the structural block diagram of the background difference method, the detection of image change areas is mainly achieved through the following three steps: extracting the color components of historical aerial images and current aerial images; performing difference operations on the same components in different phases; and performing threshold segmentation on the results of the difference operation to detect image change areas.

[0051] 2.1YCrCb color components

[0052] In the RGB color space, the coupled nature of color information and brightness information leads to the complexity of extracting these two types of information independently from the image. In contrast, the YUV color space separates brightness (Y) and chrominance (U, V) information, allowing these signal components to be analyzed and processed independently. The Y component represents the brightness information of the image, while the U and V components represent the color information of the image, and the U and V components are independent of each other. As a derivative color space of YUV, YCrCb is widely used in the field of image processing. It has the advantages of simple calculation, brightness information separation, and good clustering characteristics. In the YCrCb model, Y represents brightness, Cr and Cb represent the red and blue chrominance information subtracted from the brightness value, respectively.

[0053] Common illegal buildings may use iron sheets, colored steel tiles, tents and other materials. These materials may appear silver, blue and other colors. If only the brightness information (grayscale image) is used for detection, important color information will be lost. Based on the advantages of the YCrCb color space and the color characteristics of illegal building materials, this paper processes and analyzes the three independent components (Y, Cr, Cb) of the YCrCb color space.

[0054] 2.2 Difference operation and threshold segmentation

[0055] After obtaining the color components of the new and old phases, the new and old phase images of the same color component need to be differentially calculated. This paper uses the absolute difference function to calculate the difference between the new and old phase images, that is, to calculate the difference and absolute value in turn. If the two images are very similar in a certain area, the pixel value of the area in the result of the differential operation is close to zero; on the contrary, if there is a significant difference, the pixel value will be large.

[0056] Threshold segmentation can enhance the contrast of these difference features, filter out irrelevant details, and further reveal the key difference features in the image. Considering that most areas of the old and new phase images are not very different, but the difference in the changed areas is large, the use of the triangle method (Triangle Method) threshold segmentation can achieve more accurate threshold segmentation in local areas. The triangle method threshold segmentation result of the YCrCb three-component difference operation shows that the overall difference features are more obvious, and the changed areas of the image are detected more accurately.

[0057] 2.3 Generation of candidate change regions

[0058] There are a lot of small and irregular interference information in the threshold segmentation result map, and the result of threshold segmentation cannot be directly used for subsequent classification filtering and change determination. Therefore, the findContours function of OpenCV is used to extract contours and calculate the area, filter the area less than 8 square meters (the filter area is adjustable, and 8 square meters is approximately equal to the area of ​​a small car), and use the boundingRect function to extract the outer rectangular frame of the contour as the candidate change area for subsequent classification filtering and change determination process.

[0059] 3 Category Filter

[0060] To ensure the accuracy and reliability of the detection data, this paper applies the YOLOv8 classification algorithm to the task of classifying images in changed areas, excluding seven interfering targets such as cars, trucks, trees, grass, and solar panels, and screening out target information such as buildings and construction vehicles that are suspected of being illegal buildings or construction behaviors, in preparation for the final change judgment.

[0061] 3.1YOLOv8 Classification Algorithm

[0062] YOLOv8 image classification uses the features extracted from image pixels by a deep learning model to estimate the probability distribution of objects belonging to various categories, thereby achieving image classification. Its classification principle is essentially the same as other deep convolutional neural networks such as Residual Neural Network (Resent) and Google Network (GoogLeNet), but it is fast and can achieve fast classification while maintaining a high accuracy rate. The model architecture is relatively simple and easy to implement and deploy. YOLOv8 has made significant improvements and optimizations on the basis of the previous generation YOLO algorithm to provide faster detection speed and higher accuracy. The network structure of its classification algorithm mainly consists of two parts: the backbone network (Backbone) and the head network (Head). Figure 3 As shown in the figure, Note: Concat means concatenation; Bottleneck means bottleneck layer; Conv2d means two-dimensional convolution layer; BatchNorm2d means two-dimensional batch normalization; SiLU means "S" type activation function; Classify means classification detection head.

[0063] The backbone network of YOLOv8 is mainly responsible for feature extraction and consists of CBS and C2f modules. The CBS module includes convolutional layers (Conv2d), batch normalization layers (BatchNorm2d) and linear unit layers (SiLU). It uses a variety of convolutional kernel sizes and step sizes to capture feature details at different scales and extract key features from input data. The C2f module, as an innovation in the YOLO series, undertakes the main feature extraction task. It increases the training speed and improves the gradient flow by merging the outputs of all bottleneck modules, processes images faster and extracts important features. The head network is responsible for classifying the detected objects (Classify), and contains convolutional layers and fully connected layers, which are used to extract high-level features on the feature map and output the corresponding category probabilities.

[0064] 3.2 Algorithm training and filtering detection

[0065] The dataset in this paper is taken from drone cruise photography of multiple streets in Nan'an City. By analyzing the collected images, the image change areas are divided into 9 categories: buildings, engineering vehicles, cars, trucks, buses, trees, grass, farmland, and solar panels, as shown in Table 1.

[0066] Table 1 Image classification categories and filtering principles

[0067]

[0068] Note: Engineering vehicles include excavators, bulldozers and other construction vehicles; trucks include trucks and trailers; buses include public buses, minibuses, medium buses and large buses.

[0069] Buildings and construction vehicles are typical targets involving illegal construction or illegal construction behaviors. When the image classification algorithm detects that the changed area of ​​the new phase image is a building or a construction vehicle, the changed area is retained for the subsequent change determination process; when the new phase image is detected as trees, grass, farmland, and solar panels, it means that the changed area is caused by non-construction activities, and the changed area is directly ignored; when the new and old phase images detect cars, trucks, and buses, it means that the changed area is caused by non-construction vehicles, and the changed area is directly ignored.

[0070] This paper uses the YOLOv8s classification model as the filter detection algorithm, and is trained in the Ubuntu 22.04.4LTS operating system. The CPU is Intel Xeon Gold 6240R CPU 2.4GHz, the GPU is NVIDIA GeForce RTX 409024G, the host memory is 512GB, and the programming environment is Python 3.11 and CUDA 12.1. The loss function and accuracy of the training process are shown in Figure 2. Figure 4 As shown. Figure 4 It can be seen that the training converges quickly and the highest detection accuracy reaches 95.9%.

[0071] 4 Change determination

[0072] In the UAV illegal building detection scenario, traditional change detection methods cannot effectively handle complex change detection problems including shadows, light intensity, image jitter and complex textures. This paper uses structural similarity (SSIM) detection to determine the change area of ​​the new and old phases of illegal buildings.

[0073] 4.1SSIM detection

[0074] SSIM is an evaluation model based on human visual perception and is widely used in the evaluation of the effects of image processing algorithms. It quantifies the similarity of two images at the pixel level by comparing their brightness, contrast, and structural features. In formula (2), SSIM(p1, p2) represents the structural similarity of image pixels p1 and p2:

[0075]

[0076] Among them, μ p1 is the average value of p1, μ p2 is the average value of p2, σ p1 2 is the variance of p1, σ p2 2 is the variance of p2, σ p1p2is the covariance of p1 and p2, c1 and c2 are constants, where c1 = 6.5025 and c2 = 58.5225. The value range of SSIM is between -1 and 1, and the larger the value, the more similar the images are. The SSIM threshold set in this paper is 0.5. When SSIM is greater than or equal to 0.5, it can be considered that the change between the old and new phases is mainly caused by non-substantial factors such as shadows, brightness changes, or image jitter. These changes can be regarded as unimportant and ignored; when SSIM is lower than 0.5, it is considered that the change is caused by engineering construction, and the information of illegal building areas is output.

[0077] In terms of detection time, the detection time of photos with a resolution of 4032×3024 in this experiment ranged from 2.9 to 4.6 seconds, with an average of 4.08 seconds per pair. Without considering fatigue, it takes at least 5 minutes for an adult to complete the comparison of each photo, so this method significantly improves the efficiency of illegal building detection.

[0078] In summary, this paper combines the comparison method of drone images with image processing and deep learning methods to detect illegal buildings under construction: first, perform preprocessing operations such as image registration and denoising; second, extract the three components of the new and old phase images based on the YCrCb color space, and perform differential operations and threshold processing respectively to detect the image change area; then, combine the deep learning image classification algorithm to classify the change area to filter out the image change area caused by non-construction reasons; finally, use structural similarity detection to compare the similarity of the new and old phase change areas, exclude the change areas caused by factors such as shadows, light intensity, and image jitter, and output the change areas caused by illegal buildings.

[0079] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.

Claims

1. A method for detecting illegal buildings based on drone image comparison, It is characterized in that The detection method comprises the following steps: Step S1: collect images by using drones to collect aerial photos of each street; Step S2, preprocessing the collected image; Step S3, performing background difference on the pre-processed image, extracting three-channel color components from the image, performing difference calculation and threshold processing on the new and old phases of the same color component, and detecting the image change area; Step S4, applying the deep learning classification algorithm to the task of classifying the changed area images, and eliminating image changes caused by non-construction reasons; Step S5: Use structural similarity detection to compare the similarity of the new and old phase change regions to eliminate image changes caused by factors such as shadows, brightness changes, and image jitter, and output the image change region caused by illegal buildings.

2. According to claim 1, a method for detecting illegal buildings based on drone image comparison, Features: The step S1 is further specified as follows: using a drone to perform aerial photography operations on multiple streets multiple times, defining a route for each aerial photography mission, and each route contains a certain number of waypoints. Each time, the drone uses a vertical downward lens angle to perform aerial photography operations at the set waypoints to collect multiple photos.

3. According to claim 1, a method for detecting illegal buildings based on drone image comparison, Features: The step S2 is further specified as follows: the image preprocessing includes image registration algorithm, image denoising, histogram equalization and adaptive gamma correction; the image registration algorithm is a process of matching two or more images acquired from different perspectives and at different times in the same scene, and its main purpose is to correct the two images to the same coordinate system through the correspondence relationship between the feature points of the two images; the image denoising is to use median filtering for image enhancement, and median filtering is a nonlinear smoothing filtering method that suppresses noise through sorting statistical theory, and is to construct an area within N×N adjacent to a certain pixel point as the center point, select the median of the pixel point, and replace all pixel values ​​centered on the point with the median; the histogram equalization is to change the grayscale of each pixel in the image by changing the histogram of the image, and enhance the contrast of the image with a small grayscale dynamic range; the adaptive gamma correction is to optimize the details of the dark and bright areas of the image, and the image maintains a high visual clarity and information transmission effect under various lighting conditions.

4. According to claim 1, a method for detecting illegal buildings based on drone image comparison, Features: The step S3 is further specifically as follows: the background difference includes YCrCb color components, difference operation and threshold segmentation and candidate change area generation; the YCrCb color components, that is, Y represents brightness, Cr and Cb represent red and blue chromaticity information subtracted from the brightness value, respectively, separate the brightness and chromaticity information, allowing these signal components to perform independent analysis and processing; The differential operation and threshold segmentation, that is, using the absolute difference function to calculate the new and old phase images for differential operation, that is, calculating the difference and absolute value in turn; the candidate change area generation, that is, using the findContours function of the OpenCV function to perform contour extraction and area calculation, filtering areas less than 8 square meters, and using the boundingRect function to extract the outer rectangular frame of the contour as the candidate change area, so as to carry out subsequent classification filtering and change judgment process.

5. According to claim 1, a method for detecting illegal buildings based on drone image comparison, Features: The step S4 is further specifically as follows: applying the YOLOv8 classification algorithm to the task of classifying images of changed areas, excluding interference targets such as cars, trucks, trees, grass, and solar panels, and screening out target information of buildings and engineering vehicles suspected of illegal construction or construction behavior, in preparation for the final change judgment.

Citation Information

Cited By

  • Multi-sensing information fusion old building safety detection method based on unmanned aerial vehicle

    CN119803569A

  • Patrol detection method and system based on aerial image of unmanned aerial vehicle

    CN122135199A