An inspection and detection method and system based on UAV aerial images

By preprocessing and extracting feature points from drone aerial images, the problem of difficulty in recognizing building outlines caused by noise and occlusion was solved, enabling accurate extraction of building outlines and identification of illegal buildings, thus improving the accuracy and completeness of inspection and detection.

CN122135199APending Publication Date: 2026-06-02TIANJIN YUNSHENG INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TIANJIN YUNSHENG INTELLIGENT TECH CO LTD
Filing Date
2026-01-30
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing drone aerial image inspection methods struggle to accurately identify building outlines and perform pixel-level time-series analysis when faced with noise, occlusion, and changes in lighting, leading to misjudgments and difficulties in detecting illegal buildings.

Method used

By preprocessing and filtering the drone aerial images, extracting response feature points, filling the area to be repaired, smoothing and identifying the polygonal edge contours, and performing binarization, the coordinate detection is performed by combining the building area contours of adjacent monitoring periods, and the coordinate information of the illegal buildings is output.

Benefits of technology

It achieves accurate extraction and integrity restoration of building outlines under noise and occlusion conditions, ensuring the accuracy of pixel-level temporal analysis and enabling the identification and labeling of potentially illegal buildings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122135199A_ABST
    Figure CN122135199A_ABST
Patent Text Reader

Abstract

This invention discloses an inspection and detection method and system based on UAV aerial images. The method includes: acquiring aerial images of a target field area using a UAV according to a preset monitoring cycle; preprocessing the aerial images to obtain an aligned aerial image sequence; sliding a window for each aligned aerial image and filtering it to obtain a first denoised image set; extracting response feature points from the aligned aerial images in the first denoised image set to identify the area to be repaired; filling the area to be repaired with adjacent aligned aerial images to obtain a preliminary texture-filled area; smoothing and identifying the polygonal edge contours of the preliminary texture-filled area and binarizing them to obtain the contours of independent building areas. This scheme identifies the area to be repaired and the area with missing location information through density analysis; it also uses images from adjacent monitoring cycles for texture filling to ensure the accuracy and completeness of building contour extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of unmanned aerial vehicles (UAVs), and in particular to an inspection and detection method and system based on UAV aerial images. Background Technology

[0002] With the rapid development and widespread adoption of drone technology, drones equipped with high-resolution optical cameras have become an important technological tool for land and resources monitoring, urban and rural planning supervision, and especially for farmland protection. Compared to traditional manual ground patrols and satellite remote sensing monitoring, drone aerial photography has significant advantages such as maneuverability, low cost, high resolution, and the ability to acquire data at high frequency, making it possible to achieve "early detection and early prevention" of illegal construction.

[0003] However, current methods for inspecting illegal buildings based on UAV aerial imagery still face a series of technical bottlenecks and challenges in practical applications, resulting in room for improvement in their automation, intelligence, and actual detection effectiveness. Aerial images are inevitably affected by sensor noise, atmospheric disturbances, and temporary occlusions (such as moving vehicles, cloud shadows, and tree obstructions). These interferences lead to two problems: first, noise and blurring reduce the extraction quality of key features such as building edges and corners, making it difficult to accurately identify building outlines; second, temporary occlusions create information "holes" in the image, resulting in the loss of building texture in the occluded areas. Most existing methods directly extract or segment features from noisy or occluded images, often resulting in broken, overlapping, or distorted building outlines. In particular, when multiple buildings are too close together or connected by shadows, they are easily missegmented into a single large building, making it impossible to accurately separate independent building entities, which brings difficulties to subsequent analysis of violations by individual buildings.

[0004] Meanwhile, the core of determining illegal buildings lies in detecting "changes," namely, identifying new construction, expansion, and other such activities. This requires precise comparison of image sequences taken at different times in the same area. Due to differences in the flight attitude, altitude, and lighting conditions of drones each time, the raw images acquired directly are not aligned in geometric position and radiance. Without rigorous preprocessing, directly comparing pixels from different periods can lead to serious misjudgments—for example, comparing the roof of a building in the current period with adjacent farmland in the previous period due to flight offset, misjudging it as "farmland turned into a building"; or misjudging changes in shadows as changes in ground features due to different lighting conditions. Although existing methods generally mention image registration, they often do not sufficiently emphasize the decisive role of registration accuracy in subsequent pixel-level temporal analysis, failing to establish a reliable "pixel-level spatiotemporal alignment" analysis foundation. This is one of the fundamental reasons why subsequent change detection results are unreliable. Summary of the Invention

[0005] The purpose of this invention is to provide an inspection and detection method and system based on drone aerial images, which solves the above-mentioned technical problems pointed out in the prior art.

[0006] This invention provides an inspection and detection method based on UAV aerial images, comprising the following steps: Aerial images of the target field area are collected by drones according to a preset monitoring cycle. The aerial images are preprocessed to obtain an aligned aerial image sequence. The aligned aerial image sequence is slid-windowed and filtered to obtain a first denoised image set; response feature points are extracted from the aligned aerial images in the first denoised image set to identify the area to be repaired; adjacent aligned aerial images are used to fill the area to be repaired to obtain a preliminary texture-filled area; the polygonal edge contours of the preliminary texture-filled area are smoothed and binarized to obtain the contours of the independent building area; coordinate detection is performed using the contours of the independent building area in adjacent monitoring periods to output the coordinate information of the illegal building.

[0007] Preferably, the aligned aerial image sequence is slid-windowed and filtered to obtain a first denoised image set. The specific operation steps are as follows: For each aligned aerial image in the aligned aerial image sequence, a sliding window is created, and the standard deviation of the gray values ​​of all pixels in each sliding window is calculated. The gradient magnitude of the pixels in each neighboring sliding window is also calculated, and the average gradient magnitude of the gradient magnitudes of all pixels in each neighboring sliding window is further calculated. The mixed evaluation factor is obtained by multiplying the standard deviation of the pixel gray values ​​and the average gradient magnitude. Set a preset filtering threshold; determine whether the mixed evaluation factor of each sliding window is greater than the filtering threshold; If so, the center pixel of the sliding window is determined to be located in the edge region, and the sliding window is reset. Taking the center pixel as the center of the reset sliding window, all neighboring pixels in the sliding window are arranged in ascending order of gray value, and the gray value of the pixel at the middle position is taken as the median filter candidate value. The final filter value is obtained by weighting the gray value of the pixel at the middle position with the median filter candidate value. The final filtered value is used to filter the pixels in each aligned aerial image to obtain the first denoised image set.

[0008] Preferably, response feature points are extracted from the aligned aerial images in the first denoised image set to identify the area to be repaired. The specific operation steps are as follows: The SIFT algorithm is used to extract response feature points for each aligned aerial image in the first denoised image set; the aligned aerial images in the first denoised image set are divided into uniform grids, and the number of response feature points in each grid is calculated; the area of ​​each grid is calculated; the density of response feature points in the grid is calculated based on the number of response feature points in the grid and the area of ​​the grid. A preset feature density threshold is set; it is then determined whether the density of response feature points in each grid is less than the feature density threshold; if so, the grid is identified as a region to be repaired. If not, the grid is determined to be a non-filled area.

[0009] Preferably, adjacent aligned aerial images are used to fill the area to be repaired, resulting in a preliminary texture-filled area. The specific steps are as follows: Each area to be repaired is expanded according to a preset expansion range to form a ring-shaped analysis band; For each pixel in the annular analysis band, four directions are calculated, and pairs of pixels with the same gray value are selected to construct a gray-level co-occurrence matrix. The gray-level co-occurrence matrix is ​​used to calculate the directional contrast of pairs of pixels with the same gray-level value in each direction; The maximum directional contrast is taken as the dominant edge direction, and the dominant edge direction is further taken as the dominant direction angle of the annular analysis band; the mean gray value of the pixels in the annular analysis band is calculated as the texture complexity of the annular analysis band. Filter adjacent aligned aerial images and set a search window for the aligned aerial images of the unmarked area to be repaired in the same sliding window; set a sliding block of the same size as the area to be repaired inside the search window; repeat the above steps for each sliding block to calculate the dominant direction angle and texture complexity of the sliding block; Preset an angle consistency threshold and a complexity similarity threshold; calculate the directional difference between the dominant directional angle of the ring analysis band and the dominant directional angle of the sliding block; determine whether the directional difference is less than the angle consistency threshold; If so, it is determined that the texture direction of the ring analysis band and the sliding block is consistent; and the complexity difference between the texture complexity of the ring analysis band and the texture complexity of the sliding block is calculated; it is then determined whether the complexity difference is less than the complexity similarity threshold. If so, then the texture complexity of the annular analysis band and the sliding block is determined to be similar; The sliding blocks with the same texture direction and similar texture complexity are filled into the area to be repaired to obtain the preliminary texture filling area.

[0010] Preferably, the polygonal edge contours of the preliminary texture-filled area are smoothly identified and binarized to obtain the contours of the independent building areas; coordinate detection is performed using the contours of the independent building areas from adjacent monitoring periods to output the coordinate information of the illegal buildings. The specific operation steps are as follows: The strip-shaped region is identified by the outline boundary of the initial texture-filled region; the initial texture-filled region is smoothed by the strip-shaped region to identify the polygonal edge contour of the smoothed initial texture-filled region; the polygonal edge contour is binarized to obtain the contour of the independent building region; the coordinate detection of the independent building region contour in adjacent monitoring cycles is performed to obtain the contour of the abnormal event; the distance between the abnormal event contour and the fields in the target field region is calculated to identify the illegal buildings.

[0011] 6. The inspection and detection method based on UAV aerial images according to claim 5, characterized in that: a strip-shaped region is identified by the contour boundary of the preliminary texture-filled region; the preliminary texture-filled region is smoothed by the strip-shaped region, and the polygonal edge contour of the smoothed preliminary texture-filled region is identified. The specific operation steps are as follows: The contour boundary of the preliminary texture filling region is identified, and n pixels inside and outside the contour boundary of the preliminary texture filling region are taken as a strip region; the Euclidean distance from each pixel in the strip region to the contour boundary of the non-filled region is calculated; the maximum Euclidean distance and the minimum Euclidean distance are selected to calculate the normalized distance; a threshold for the distance to the contour boundary of the non-filled region is preset; and it is determined whether the normalized distance is less than the threshold for the distance to the contour boundary of the non-filled region. If so, then take each pixel of the outline boundary of the initial texture filling region as the center, take the neighboring pixels as the center window, and calculate the average gray value of the pixels in the initial texture filling region and the average gray value of the pixels in the non-filled region within each center window. The average gray value of the pixels in the initial texture-filled area is compared with the average gray value of the pixels in the non-filled area to calculate the similarity, which is then used as the color similarity. The normalized distance and color similarity are weighted and fused to obtain the fusion weight; Bilateral filtering is applied to each pixel in the initial texture filling region and the strip region. The value range kernel in the bilateral filtering is adjusted using the fusion weight to obtain a smooth initial texture filling region. Gabor filters in different directions are pre-constructed; each pixel in the smoothed preliminary texture filling area is filtered in different directions using the Gabor filters to obtain a set of directional response values, and the maximum absolute value among all directional response values ​​is taken as the edge intensity of the pixel. Preset edge strength threshold; determine whether the edge strength of each pixel is greater than the edge strength threshold; If so, the pixel is determined to be a linear edge with a clear direction within the initial texture filling area and is designated as an edge point. The gradient direction of the selected edge point is calculated, and an edge point is randomly selected as the starting edge point. The next edge point is searched in its neighborhood according to the gradient direction of the starting edge point. The search for edge points according to the gradient direction is repeated until the starting edge point is returned or there are no edge points, thus obtaining the polygonal edge outline of the initial texture filling area.

[0012] Preferably, the polygonal edge contour is binarized to obtain the contour of an independent building area; the contour of the independent building area is subjected to coordinate detection of adjacent monitoring periods to obtain the contour of anomalies; the distance between the contour of the anomalies and the fields in the target field area is calculated to identify illegal buildings. The specific operation steps are as follows: The polygonal edge contour is divided into each edge contour to form an edge contour set; A minimum distance threshold is preset; the distance from each response feature point in the aligned aerial image to all edge points in each edge contour set is calculated, and the shortest distance is filtered; it is determined whether the shortest distance is less than the minimum distance threshold. If so, the response feature point is included in the edge contour set to enhance the polygon edge contour; foreground pixels and background pixels are defined; the enhanced polygon edge contour is binarized to obtain the contour of the independent building area. The spatial overlap area of ​​the independent building area contours in adjacent monitoring periods is calculated to identify new contour events and associated contour pairs corresponding to the spatial overlap area in adjacent monitoring periods; a set of sampling points is obtained for the independent building area contours in the current monitoring period in the associated contour pairs, and the displacement vectors are calculated between the sampling points and the edge points of the independent building area contours to identify abnormal event contours; the shortest distance is calculated between the digital farmland map coordinates of the target field area and the edge point coordinates of the abnormal event contours to determine the illegal buildings; The abnormal event profile includes new profile events, profile expansion events, and profile irregularity change events.

[0013] Preferably, the spatial overlap area of ​​the independent building area contours in adjacent monitoring periods is calculated to identify new contour events and the associated contour pairs corresponding to the spatial overlap area in adjacent monitoring periods. The specific operation steps are as follows: Calculate the spatial overlap area between the outlines of all independent building areas in the t-th monitoring period and the outlines of all independent building areas in the (t-1)-th monitoring period; preset a matching degree threshold; determine whether each spatial overlap area is greater than the matching degree threshold; if so, determine that the outline of the independent building area corresponding to the spatial overlap area in the t-th monitoring period did not appear in the (t-1)-th monitoring period, and mark the outline of the independent building area as a new outline event; if not, associate the outline of the independent building area corresponding to the spatial overlap area in the t-th monitoring period with the outlines of the independent building areas in the (t-1)-th monitoring period to form an associated outline pair.

[0014] Preferably, a set of sampling points is obtained for the independent building area contours of the current monitoring period in the associated contour pair. The displacement vectors are calculated between the sampling points and the edge points of the independent building area contours to identify the abnormal event contours. The shortest distance is calculated between the digital farmland map coordinates of the target field area and the edge point coordinates of the abnormal event contours to determine the illegal buildings. The specific operation steps are as follows: The contours of independent building areas in the t-th monitoring period of the associated contour pair are sampled to obtain a set of sampling points; for each sampling point, the nearest edge point on the contour of the independent building area in the (t-1)-th monitoring period is found; the displacement vector is calculated using the coordinates of the sampling point and the distance to the nearest edge point; the average displacement and the standard deviation of the displacement are calculated by statistically analyzing all displacement vectors. Preset minimum significant displacement threshold and displacement consistency threshold; Determine whether the average displacement is less than the minimum significant displacement threshold; If so, the relative fluctuation value is calculated using the average displacement and the standard deviation of the displacement; and it is determined whether the relative fluctuation value is less than or equal to the displacement consistency threshold. If so, the outline of the independent building area is determined to be an event with no change in outline; If any of the above judgments are not met, the outline of the independent building area is determined to be an abnormal event outline. Collect the coordinates of the digital farmland map of the target field area; find the coordinates of the anomaly contour in the digital farmland map coordinate system; calculate the distance between the coordinates of the anomaly contour and the coordinates of the digital farmland map, and filter the shortest distance; preset the shortest distance threshold; determine whether the intersection distance is less than the shortest distance threshold; If so, the outline of the abnormal event is determined to be an illegal building.

[0015] Accordingly, this invention also proposes an inspection and detection system based on UAV aerial images, comprising: an acquisition module; and an identification module; The acquisition module is used to acquire aerial images of the target field area using a drone according to a preset monitoring cycle, and to preprocess the aerial images to obtain an aligned aerial image sequence. The identification module is used to slide a window through the aligned aerial image sequence and filter it to obtain a first denoised image set; extract response feature points from the aligned aerial images in the first denoised image set to identify the area to be repaired; fill the area to be repaired with adjacent aligned aerial images to obtain a preliminary texture-filled area; smooth and identify the polygonal edge contours of the preliminary texture-filled area and binarize them to obtain the contours of the independent building area; use the contours of the independent building area in adjacent monitoring periods to perform coordinate detection and output the coordinate information of the illegal building.

[0016] Compared with the prior art, the embodiments of the present invention have at least the following technical advantages: Analysis of the inspection and detection method and system based on UAV aerial images provided by the present invention shows that, in specific applications, the method uses a UAV to periodically collect regional aerial images according to a preset cycle. After radiometric correction and high-precision geometric registration, the pixel alignment of images from different periods is ensured. The purpose of this is to enable subsequent data analysis to truly reflect the changes in the same small area without being affected by the deviation of the aerial angle. Furthermore, this method employs a sliding window to perform local filtering on the denoised image, effectively removing noise from the image (adaptive filtering based on a hybrid evaluation of local noise and structure (flatness, noise, edges) is used, such as dynamically adjusting the filtering intensity to protect edge characteristics, suppressing noise while preserving the structural features of the building to the greatest extent; subsequently, innovative cross-temporal texture transfer, i.e., texture filling, is used), while protecting the building edge features, making the extraction of response feature points more accurate. The scheme identifies the areas to be repaired through density analysis (used for supplementary filling of occluded areas), thereby locating areas with missing information; the method also performs texture filling on images from adjacent monitoring periods, effectively restoring these missing parts, further ensuring the accuracy and completeness of building outline extraction; at the same time, each building is clearly identified through connected region processing, which helps with subsequent spatial analysis, such as identifying illegal buildings by comparing building outlines in adjacent images; and the scheme can identify and mark potentially illegal buildings by calculating the distance between buildings and fields. Attached Figure Description

[0017] Figure 1 This is a flowchart of the main process of an inspection and detection method based on UAV aerial images, as shown in Example 1. Figure 2 This is a flowchart of the preliminary texture filling region of an inspection and detection method based on UAV aerial images, as described in Embodiment 1. Figure 3 This is a schematic diagram of the annular analysis band of an inspection and detection method based on UAV aerial images, as described in Embodiment 1. Figure 4 This is a flowchart illustrating the outline of an independent building area in an inspection and detection method based on UAV aerial images, as described in Example 1. Figure 5 This is a flowchart illustrating the anomaly event profile of an inspection and detection method based on UAV aerial images, as described in Embodiment 1. Figure 6 This is a schematic diagram of a newly added building in an inspection and detection method based on UAV aerial images, as described in Embodiment 1. Figure 7 This is a flowchart of an inspection and detection system based on UAV aerial images, as described in Embodiment 2. Labels: Acquisition module 10; Recognition module 20. Detailed Implementation

[0018] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. 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.

[0019] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings.

[0020] Example 1 like Figure 1 As shown, this embodiment of the invention provides an inspection and detection method based on UAV aerial images, including the following steps: S10: Use drones to collect aerial images of the target field area according to a preset monitoring cycle, preprocess the aerial images to obtain an aligned aerial image sequence; It should be noted that the preset monitoring cycle, such as monitoring the target field area every other day, collects aerial images; radiometric correction (unifying imaging conditions) and high-precision geometric registration (ensuring pixel alignment in images from different periods; pixel alignment at different times is common knowledge and will not be elaborated here) are performed on the collected aerial images from each period to form aligned aerial images; only after alignment can it be confirmed that the i-th pixel represents the exact same area in the field in all periods; in this way, when analyzing the changes of the i-th pixel over time, the comparison is of the actual changes in the same small area, rather than comparing crops and the adjacent dirt road because the aircraft was slightly off-center; S20: Slide a window through the aligned aerial image sequence and filter it to obtain a first denoised image set; extract response feature points from the aligned aerial images in the first denoised image set to identify the area to be repaired; fill the area to be repaired with adjacent aligned aerial images to obtain a preliminary texture-filled area; smooth and identify the polygonal edge contours of the preliminary texture-filled area and binarize them to obtain the contours of the independent building area; use the contours of the independent building area in adjacent monitoring periods to perform coordinate detection and output the coordinate information of the illegal building. It should be noted that the sliding window filtering obtains the first set of denoised images. Local adaptive filtering is then applied to each aligned image to preserve building edge features while denoising. The adaptive filtering can select different filtering intensities based on local characteristics (flat areas, edge areas). Response feature points are extracted to identify areas to be repaired. Response feature points (corner points, edge points) are detected from the denoised images. The above-mentioned response feature point density analysis identifies areas with missing information (areas to be repaired), because dense areas of response feature points usually correspond to rich structures such as buildings and roads; sparse areas of response feature points may be truly flat areas (such as regular farmland, which is normal) or areas temporarily occluded (such as parked vehicles, moving shadows, cloud shadows, which need repair). The above-mentioned density threshold is used to identify areas that need repair, locating areas where information is missing due to temporary occlusion (or blurring caused by noise), providing targets for repair. Adjacent images are used to fill the areas to be repaired. Images from the same location in other monitoring periods (adjacent monitoring periods) are used to find areas with similar textures to fill the missing parts of the current image. The above-mentioned methods... Texture matching ensures that the filled content is coordinated with the surrounding environment, restores image integrity, eliminates interference from occlusion (or blurring) on ​​building contour extraction, and ensures that the subsequently extracted building contours are realistic and complete; smooth recognition of polygonal contours and binarization are performed on the repair area to eliminate possible seams, extract edges and connect them into closed polygonal contours, and convert the contours into a binary mask (building = 1, non-building = 0). Repair may introduce unnatural boundaries, which need to be smoothly transitioned; buildings need to be represented as geometric objects (polygons) in image analysis, rather than sets of pixels. Binarization is the standard output of image segmentation, and each connected region represents an independent building; the buildings in the image are transformed into geometric objects that can be spatially analyzed to solve the problem of building adhesion. Contour processing ensures that each building is independently identified; adjacent period coordinate detection outputs the coordinate information of illegal buildings, compares the building contours in two adjacent periods of images, and identifies illegal buildings through spatial analysis (i.e., spatial analysis refers to the distance between the building and the field, and if it is less than a preset distance, it is considered an illegal building); Specifically, such as Figure 2As shown, in step S20, each aligned aerial image slides a window and is filtered to obtain a first denoised image set; response feature points are extracted from the aligned aerial images in the first denoised image set to identify the area to be repaired; adjacent aligned aerial images are used to fill the area to be repaired to obtain a preliminary texture-filled area; the polygonal edge contours of the preliminary texture-filled area are smoothed and binarized to obtain the contours of the independent building area; coordinate detection is performed using the contours of the independent building areas in adjacent monitoring periods to output the coordinate information of the illegal building. The specific operation steps are as follows: S21: For each aligned aerial image in the aligned aerial image sequence, a sliding window (size w1 or w2) is created, and the standard deviation of the gray values ​​of all pixels is calculated for each sliding window. And calculate the gradient magnitude of each pixel in the neighborhood sliding window (i.e., first calculate the gradient in the x and y directions of each pixel, and the gradient magnitude). ;in, Furthermore, the average gradient magnitude of all pixels in each neighborhood sliding window is calculated (i.e., a high average gradient magnitude indicates that the edge structure of the sliding window is clear and strong; a low average gradient magnitude indicates that the sliding window is flat or has weak texture). The standard deviation of the pixel's grayscale value is multiplied by the average gradient magnitude to obtain the hybrid evaluation factor (i.e., the hybrid evaluation factor is a feature value of the pixel at the center of the sliding window, which is calculated based on a sliding window centered on the pixel and reflects the degree of noise and structure mixing (i.e., the three structures of noise region, flat region, and edge region) of the sliding window where the pixel is located). Set a preset filtering threshold; determine whether the mixed evaluation factor of each sliding window is greater than the filtering threshold; If so, the center pixel corresponding to the sliding window is determined to be located in the edge region, and the sliding window is reset (i.e., a smaller sliding window size W2 is used, and a small window is used for filtering to avoid the edge details becoming blurred and the positioning inaccurate due to the smoothing of a large window; if the mixing evaluation factor > the filtering threshold, a small window w2 (e.g., 3×3) is used; otherwise, a large window w1 (e.g., 7×7) is used). It should be noted that the standard deviation σ (representing the degree of grayscale fluctuation) and the average gradient magnitude of each local window are calculated. (This represents edge strength, i.e., the edge sharpness of a local window); a high standard deviation σ indicates large variations in grayscale in the area, which may be noise or an edge. High indicates sharp edges; combining both can distinguish between high-noise flat areas and true edge areas; calculate the mixed evaluation factor M = σ × A high M value corresponds to a strong edge region, while a low M value corresponds to a flat or noisy region, accurately identifying the image feature structure that needs to be protected; dynamic window filtering based on the M value uses a small window for gentle filtering in edge regions and a large window for strong denoising in flat / noisy regions. A large window will cause blurring at the edge, while a small window has poor denoising effect in flat regions. This method removes noise to the maximum extent while protecting key features such as the edges and corners of buildings; it determines whether the mixing evaluation factor M of each sliding window is greater than the filtering threshold: if M> the filtering threshold, it is determined that the center pixel is located in the edge region, and a smaller sliding window size W2 (such as 3×3) is used; otherwise, a larger sliding window size W1 (such as 7×7) is used; S22: using the center pixel as the center of the reset sliding window, all neighboring pixels in the sliding window are arranged in ascending order of gray value, and the gray value of the pixel in the middle position is taken as the median filtering candidate value (that is, median filtering can remove noise very well, and at the same time, it has better edge preservation than mean filtering). The final filtered value is obtained by weighting the gray value of the pixel at the middle position with the median filter candidate value. The final filter value is used to filter the pixels in each aligned aerial image to obtain the first denoised image set; the gray values ​​of the pixels are weighted with the median filter candidate values ​​to give more trust to the original pixel values ​​in edge regions (large M) and more trust to the filtering results in flat regions (small M) to output a high-quality denoised image. It should be noted that in the above steps, if the region experiences drastic grayscale value jumps due to noise (high standard deviation) but is not a true structural edge (low average gradient magnitude), the mixing evaluation factor value will be at a medium or low level. For example, a few noise points appear on a flat background. If the region is a true building edge, roof corner, etc. (high average gradient magnitude), and its grayscale value does change on both sides of the edge (high standard deviation), the mixing evaluation factor value will be very high. For example, the boundary between a white roof and a black road (strong structure / edge area). If both the standard deviation and average gradient magnitude are low, the mixing evaluation factor value will be very low (flat and uniform area). A high mixing evaluation factor may correspond to different image feature structures; a low mixing evaluation factor may correspond to flat areas or isolated noise points, used for stronger smoothing. S23: Use the SIFT algorithm to extract response feature points (i.e., response feature points are corner points and edge intersections) for each aligned aerial image in the first denoised image set. The aligned aerial images in the first denoised image set are divided into uniform grids (e.g., each 50×50 pixel point is a statistical unit), and the number of response feature points in each grid is calculated. Calculate the area of ​​each grid (i.e., 50×50 pixels); calculate the density of response feature points within the grid based on the number of response feature points within the grid and the area of ​​the grid (i.e., divide the number by the area of ​​the grid). Preset feature density threshold; determine whether the response feature point density of each grid is less than the feature density threshold; If so, then the grid is identified as the area to be repaired; If not, the grid is determined to be a non-filled area (in the subsequent process, the texture of the area to be repaired needs to be corrected, and the area to be repaired is filled with the area in the normal aligned aerial image, so the normal grid is regarded as a non-filled area). It should be noted that for each image in the first denoised image set, the number of layers in the scale pyramid (e.g., 3-4 layers), the scale coefficient of each layer (e.g., 1.2), and the initial Gaussian blur σ value are set; a response threshold for response feature point detection is set to control the quantity and quality of response feature points (i.e., the higher the threshold, the fewer but more stable response feature points; the lower the threshold, the more response feature points but may contain noise); each image in the input first denoised image set is subjected to continuous Gaussian blur to obtain images with different blur levels at the same scale; the image is downsampled (size halved), and the Gaussian blur step is repeated to form a Gaussian difference pyramid; in the current scale image, each pixel is compared with its 8 neighboring pixels at the same scale and 9×2 pixels at adjacent scales (a total of 26 neighboring pixels); if the response value of the pixel (e.g., DoG value, Hessian determinant value, or FAST score) is the maximum or minimum value among these 26 pixels, it is marked as a response feature point (i.e., the SIFT algorithm extracts response feature points of the image, which is common knowledge and will not be elaborated further). Based on the calculated density of response feature points, areas with sparse response feature points are selected, which are the areas to be repaired. In UAV aerial images, areas with dense response feature points usually correspond to rich structures such as buildings, roads, and trees; areas with sparse response feature points may be areas obscured by temporarily parked vehicles, moving shadows, thin clouds, sensor malfunction points, etc. (which are the areas that need to be repaired). S24: Expand each area to be repaired according to a preset expansion range to form a ring-shaped analysis band (that is, the area to be repaired is a sparse region of response feature points that needs to be repaired, while the area outside the area to be repaired is a complete texture region (i.e., the ring-shaped analysis band, such as...). Figure 3 As shown, the expansion rule (such as expanding outward by N pixels), the role of the annular analysis band is to provide the texture context required for repair), analyze the texture features of the area to be repaired through the intact texture area (i.e., the annular analysis band). For each pixel in the annular analysis band, calculations are performed in four directions (i.e., 0°, 45°, 90°, and 135° directions). The same grayscale value is searched for in each of these four directions to form identical pairs. Pairs of pixels with the same grayscale value are then selected, and a grayscale co-occurrence matrix is ​​constructed (i.e., each pair of pixels with the same grayscale value is an N×N matrix (where N is the grayscale value), and element p(i, j) represents the probability that a pair of pixels with grayscale values ​​i and j appear simultaneously in a specified direction). The gray-level co-occurrence matrix is ​​used to calculate the directional contrast of pairs of pixels with the same gray-level value in each direction (i.e., directional contrast represents the direction of drastic gray-level change (i.e., adjacent directions), which is usually also the direction of texture edges; the calculation formula is as follows). Where i and j are grayscale values ​​(for example, for an 8-bit image, the values ​​of i and j range from 0 to 255); Given a direction and distance, the grayscale value is... The pixel and grayscale value The probability of pixels appearing simultaneously); The direction with the highest directional contrast is taken as the dominant edge direction (i.e., the 90° direction has the highest directional contrast, indicating that in this local area of ​​the image, the grayscale change along the 90° direction (vertical direction) is the most dramatic, and the edge is the most obvious). Furthermore, the dominant edge direction is taken as the dominant direction angle of the annular analysis band (i.e., the dominant texture direction; the direction with the strongest directional contrast is itself a key directional indicator obtained through GLCM analysis. In most texture analysis applications, this direction with the strongest directional contrast is directly interpreted or defined as the dominant direction of the texture in that area because it most accurately captures the strongest and most significant axis of change in the texture pattern; therefore, the dominant direction angle is directly equal to the direction angle with the strongest directional contrast. If the 90° direction has the highest directional contrast, then the dominant direction angle = 90°). The mean gray value of the pixels in the annular analysis band is calculated and used as the texture complexity of the annular analysis band. The search window (i.e., adjacent image frames) is set for the unmarked areas to be repaired within the same sliding window of the aligned aerial images. "Adjacent image frames" refers to images at the same geographical location but different shooting times (e.g., period t-1 and period t+1; if there are blurred areas at the same geographical location in periods t-1 and t+1, the search continues until the next adjacent period is found. For example, if there is a car in period t, and there is also a car that has not been driven away in the same location in periods t-1 and t+1, then the search continues until periods t-2 and t+2 are found). Images that are not marked as areas to be repaired at the corresponding locations are selected as the search window. This is because adjacent period images have undergone high-precision registration, and the positions of corresponding objects remain basically unchanged, but there may be slight shifts due to viewing angle and lighting. It should be noted that the above calculation of directional contrast is performed by pairing pixels with the same grayscale value in each direction (i.e., calculating the grayscale difference (difference) of adjacent pixels in different directions; by comparing the grayscale differences in different directions (0°, 45°, 90°, 135°), the direction with the largest value is found, which is the direction of the most drastic grayscale jump, usually corresponding to the direction of the texture edge); a complete texture region ring is created around the area to be repaired. The information inside the area to be repaired is missing, and its features cannot be analyzed. The surrounding complete area contains the texture pattern information required for repair, providing a reliable source of "texture samples" for the area to be repaired; the grayscale co-occurrence matrix analyzes the texture direction and complexity, quantifying the dominant texture direction of the ring analysis band ( ) and texture complexity ( It can effectively capture the spatial statistical characteristics of textures, with direction indicating texture arrangement patterns and complexity indicating texture disorder. It sets a search window in adjacent images and defines the search range near the corresponding position in images from other periods. Occlusion is usually temporary (such as moving vehicles), and the same position may not be occluded in other periods. It provides usable texture sources, realizes cross-period texture migration, and is the key to repairing temporarily occluded areas. S25: Set a sliding block of the same size as the area to be repaired inside the search window; repeat the above steps for each sliding block to calculate the dominant direction angle and texture complexity of the sliding block; Preset thresholds for consistent angles and similar complexity; Calculate the directional difference between the dominant direction angle of the annular analysis zone and the dominant direction angle of the sliding block; Determine whether the direction difference is less than the angle consistency threshold; If so, it is determined that the texture direction of the ring analysis band and the sliding block is consistent; and the complexity difference between the texture complexity of the ring analysis band and the texture complexity of the sliding block is calculated; it is then determined whether the complexity difference is less than the complexity similarity threshold. If so, then the texture complexity of the annular analysis band and the sliding block is determined to be similar; The sliding blocks with the same texture direction and similar texture complexity are filled into the area to be repaired to obtain the initial texture filling area. It should be noted that the search window searches for candidate blocks with the same texture direction and similar complexity as the ring analysis strip. The consistency of direction ensures the matching of texture arrangement patterns (such as the direction of bricklaying); the similarity of complexity ensures the matching of texture "roughness", ensuring that the found texture blocks are visually compatible with the surrounding environment of the area to be repaired; filling the area to be repaired involves transferring the content of the best matching texture block to the area to be repaired, filling the information gaps, and restoring the visual continuity and structural integrity of the image in the occluded area. S26: Identify a strip-shaped region through the contour boundary of the initial texture-filled region; smooth the initial texture-filled region through the strip-shaped region to identify the polygonal edge contour of the smoothed initial texture-filled region; binarize the polygonal edge contour to obtain the contour of an independent building region; perform coordinate detection on the contour of the independent building region for adjacent monitoring cycles to obtain the contour of anomalies; calculate the distance between the contour of the anomalies and the fields in the target field region to identify illegal buildings; It should be noted that the process involves extracting closed, continuous building outline polygons from the restored images to obtain independent building entities that can be used for binarization analysis; coordinate detection between adjacent monitoring periods to compare the outline changes (position, shape, size) of the same building in multiple image periods; identifying events such as new construction, expansion, and renovation through temporal analysis to detect dynamic changes and transform static building outlines into "abnormal event outlines" with temporal behavior labels; distance analysis with farmland areas to calculate the closest distance between the building outline and the red line of cultivated land or farmland plots, as one of the core criteria for determining illegal buildings is whether they encroach on cultivated land; and finally, by combining temporal change events (such as new construction and expansion) and spatial location (encroachment on cultivated land), illegal buildings are identified. Regarding the annular analysis band, it should be noted that it includes the most relevant textures, colors, and edges around the missing area. This band is used to infer statistical characteristics such as the dominant texture direction and texture complexity within the missing area. The analyzed features are used as a "search template" to find the most matching intact area in images from other periods (adjacent monitoring cycles), and its contents are "copied" to the area to be repaired. This environment-based repair maximizes the smooth visual transition between the repaired area and the original image, avoiding obvious "patchwork" or seams. (Refer to steps S24-S25 in the original text). The working principle of the annular analysis band is specifically reflected in the following calculations: First, based on the outline of the area to be repaired, N pixels are extended outwards (or simultaneously outwards and inwards) to define a set of pixels. Pixels within this set do not belong to the area to be repaired but are adjacent to it. Furthermore, the dominant texture direction is extracted, and the gray-level co-occurrence matrix is ​​calculated for pixels within the annular band (i.e., the strip-shaped region). The co-occurrence probability of pixel pairs in directions such as 0°, 45°, 90°, and 135° is analyzed. The direction with the highest contrast is usually the dominant direction of texture arrangement (e.g., the direction of furrows in farmland). The dominant direction angle = θ (contrast of each direction). The texture inside the area to be repaired is likely arranged along this angle. The texture complexity of pixels within the annular band is calculated, with smooth cement ground (low complexity) and overgrown wasteland (high complexity). The dominant orientation angle and texture complexity, two "feature fingerprints" obtained from the annular zone analysis, are used to search for images in adjacent periods (images that may not be occluded at the corresponding positions). Within the search window, a slider of the same size as the area to be repaired is slid, and for each slider position, its dominant texture orientation and complexity are calculated. Then, by comparing the angle difference (whether it is less than the angle consistency threshold) and the complexity difference (whether it is less than the complexity similarity threshold), the best texture source block is selected, and the content of the best matching block is filled into the area to be repaired in the current image. Specifically, such as Figure 4 As shown, in step S26, a strip-shaped region is identified through the contour boundary of the initial texture-filled region; the initial texture-filled region is smoothed through the strip-shaped region to identify the polygonal edge contour of the smoothed initial texture-filled region; the polygonal edge contour is binarized to obtain the contour of the independent building region; the coordinate detection of the independent building region contour for adjacent monitoring cycles is performed to obtain the contour of the abnormal event; the distance between the abnormal event contour and the fields in the target field region is calculated to identify illegal buildings. The specific operation steps are as follows: S261: Identify the contour boundary of the preliminary texture filling area (i.e., identify the contour of the preliminary texture filling area according to the edge algorithm, which is common knowledge and will not be elaborated here), and take the n pixels inside and outside the contour boundary of the preliminary texture filling area as a strip area (i.e., transition zone, which eliminates the possible "seam" or color change at the junction of the filling area and the original area to achieve a smooth transition). For each pixel in the strip region, calculate the Euclidean distance to the contour boundary of the non-filled region (i.e., the strip region may not contain pixels from the non-filled region because the initial texture filling region may have seams, so the strip region performs seam elimination smoothing; if the filling region has no seams, then the Euclidean distance is equal to 0). Calculate the normalized distance by selecting the maximum and minimum Euclidean distances; A preset threshold for the distance to the contour boundary of the non-filled region is established; it is then determined whether the normalized distance is less than the threshold for the distance to the contour boundary of the non-filled region. If so (i.e., it means that it is close to the outline boundary of the non-filled area, or it is on the outline boundary of the non-filled area), then take each pixel of the outline boundary of the preliminary texture filling area as the center, take the neighboring pixels as the center window (i.e., the neighboring pixels are also a 3×3 window), and calculate the average gray value of the pixels in the preliminary texture filling area and the average gray value of the pixels in the non-filled area respectively inside each center window. It should be noted that n pixels are taken both inside and outside the outline boundary of the initial texture-filled area to form a transition zone. There may be abrupt changes in color and texture ("seams") at the boundary between the repaired area and the original area. The transition zone is the operating area for handling this issue. The normalized distance from each pixel within the transition zone to the boundary of the unfilled area is calculated. The "depth" of pixels in the repair area is quantized; pixels near the boundary should retain more original information, while pixels deeper inside can be trusted more about the repair result; the color similarity between the filled and unfilled areas within a local window is calculated. If the fill texture harmonizes with the surrounding colors, the repair result can be trusted more; if it does not, caution should be exercised; calculate the blending weights. = σ(α + β ), where α and β are preset weighting coefficients used to adjust the importance of the distance factor and the color similarity factor; The value range is (0, 1), combining distance and color information. A value close to 1 indicates complete trust in the repair result, while a value close to 0 indicates that the original information should be preserved. σ represents the Sigmoid function; the closer it is to 1, the more information from the filled region should be adopted in subsequent filtering; the closer it is to 0, the more information from the original unfilled region should be preserved. S262: Calculate the similarity between the average gray value of the pixels in the initially texture-filled region and the average gray value of the pixels in the non-filled region (for the center window where pixel i is located, e.g., ...). (Window), calculate the average grayscale value of each pixel within the initial texture-filled area of ​​the window. (i) The average gray value of pixels belonging to the original unfilled region (i); utilizing (i) with (i) Calculate the pixel point Local color similarity The formula is ;in, The maximum grayscale value of the image (for an 8-bit grayscale image). ); The range of values ​​is The closer to 1, the more likely the filled area is to be closer to the original area in pixels. The more consistent the colors within a local neighborhood, the greater the difference (the closer to 0, the greater the difference), which is used as the color similarity (i.e., used to measure the consistency of color between the repaired area and the original area; the closer the value is to 1, the more similar they are). The normalized distance and color similarity are weighted and fused together (i.e.) ), to obtain the fusion weight (i.e. used to dynamically adjust the smoothing intensity in bilateral filtering, taking into account both distance weight and color consistency); Bilateral filtering is applied to each pixel in the initial texture filling region and the strip region. The value range kernel in the bilateral filtering is adjusted using the fusion weight to obtain a smooth initial texture filling region. Gabor filters in different directions are pre-constructed (i.e., 6 directions: 0°, 30°, 60°, 90°, 120°, and 150°); the Gabor filters are used to filter each pixel in the smoothed preliminary texture filling area in different directions to obtain a set of directional response values, and the maximum absolute value among all directional response values ​​is taken as the edge intensity of the pixel. Preset edge strength threshold; determine whether the edge strength of each pixel is greater than the edge strength threshold; If so, the pixel is determined to be a linear edge with a clear direction (such as the wall boundary or roof outline of a building) within the initial texture filling area, and is thus identified as an edge point. Calculate the gradient direction for the selected edge points, and randomly select one edge point as the starting edge point; search for the next edge point in its neighborhood based on the gradient direction of the starting edge point. The search for edge points in the gradient direction is repeated based on the next edge point until the starting edge point or no edge point is found, thus obtaining the polygonal edge contour of the preliminary texture-filled area (i.e., no more edge point search is needed; this step also connects any seams that may exist in the filled area, making the filled area smoother, and also obtaining the edge contour of the repaired area (including seams); in step S261, the preliminary texture-filled area obtains a contour boundary, which is the boundary of the preliminary texture-filled area where there are no smooth seams, and this contour boundary does not perform edge enhancement on the seams, which is enhanced in step S263). It should be noted that the fusion weight is obtained by fusing normalized distance and color phase velocity, while color similarity represents the color similarity between two regions (i.e., their grayscale values ​​are close, meaning their colors are similar). Bilateral filtering filters pixels jointly using spatial weights and range weights (i.e., range kernels). The range kernel is calculated based on the color similarity of adjacent pixels (i.e., their grayscale values ​​are close, representing color similarity). The role of the range kernel is to ensure that only pixels with similar colors contribute significantly to the center pixel; pixels with large color differences on the edges have smaller range weights, thus protecting the edges from being smoothed. Therefore, the range kernel is adjusted using the color similarity in the fusion weights, and its range kernel weight... The calculation formula is: ;in, and The center pixel is respectively and its neighboring pixels grayscale value; It is the range and standard deviation parameter, which controls the degree to which grayscale differences are considered "similar"; It is the center pixel. The corresponding fusion weights; bilateral filtering is performed on each pixel p in the initial texture filling region and the strip region; S263: Divide the polygonal edge contour into each edge contour to form an edge contour set (that is, each boundary forms an edge point set). A minimum distance threshold is preset; the distance from each response feature point in the aligned aerial image to all edge points (i.e., edge pixels) in each edge contour set is calculated, and the shortest distance is filtered; it is determined whether the shortest distance is less than the minimum distance threshold. If so, the response feature point is included in the edge contour set to enhance the polygon edge contour (i.e., when searching for edge points, the seams in the denoised or filled areas may be more subtle and difficult to identify, causing potential edge points to be missed at the seams. The response feature point is then used to fill in the missing positions using the shortest distance. If the shortest distance is less than the threshold, it means that the position of the response feature point is close to the edge contour or is on the boundary line of the contour. Therefore, the response feature point is used to fill in the edge contour. At the same time, the response feature point can also be used to enhance the edge contour). Define foreground pixels (i.e., pixels with a gray value of 1, representing buildings) and background pixels (i.e., pixels with a gray value of 0, representing non-buildings, such as ground, vegetation, and roads); binarize the enhanced polygon edge contours to obtain the contours of independent building regions; It should be noted that points close to the contour (distance < threshold) from the response feature points (extracted by SIFT, etc.) are added to the contour point set. Response feature points (corner points, spots) are usually located at key locations such as corners, doors, and windows of real buildings, and have high positioning accuracy. Including response feature points close to the contour is equivalent to correcting the contour with high-precision control points, especially at locations prone to errors such as corners. The enhanced contour is converted into a binary mask, where each connected region represents an independent building. The vector contour is rasterized to generate a building / non-building classification mask, which is the standard output form for image segmentation. The sub-pixel-level positioning advantage of response feature points is used to improve the accuracy of the contour at key locations. These enhanced contour points and response feature points are used as constraints to better separate interconnected buildings. S264: Calculate the spatial overlap area of ​​the independent building area contours in adjacent monitoring periods, identify new contour events and associated contour pairs corresponding to the spatial overlap area in adjacent monitoring periods (associated contour pairs formed by the independent building area contours of two periods); obtain a set of sampling points for the independent building area contours in the current monitoring period (the t-th period) in the associated contour pairs, calculate the displacement vector between the sampling points and the edge points of the independent building area contours, and identify abnormal event contours; obtain the digital farmland map coordinates of the target field area and calculate the shortest distance between the coordinates of the edge points of the abnormal event contours to determine the illegal buildings; The abnormal event profile includes new profile events (i.e., new illegal constructions), profile expansion events (i.e., profile deformation (expansion)), and profile irregular change events (i.e., only the east side was expanded, while the west side remained unchanged; a new doorway was opened; some ancillary structures were demolished). In this abnormal event profile, profile expansion events and profile irregular change events are determined by the average displacement and the standard deviation of the displacement. New profile events are determined by the monitoring cycle. Together, they form the abnormal event profile. It should be noted that when comparing the degree of overlap of building outlines in two adjacent image periods, outlines with low overlap and newly appearing are marked as (new events); those with high overlap form associated pairs. The displacement vector field of the associated outline pairs is analyzed. For the associated outlines, the displacement vector is sampled and calculated to obtain the average displacement. and standard deviation Event classification, The minimum significant displacement threshold ξ and / ≤ Displacement consistency threshold η, the contour expansion event is systematic and uniform; / > η indicates that irregular changes in the outline are local modifications or complex changes; spatial analysis (i.e., distance calculation) is performed on all abnormal event outlines and digital farmland maps to determine the shortest distance and encroachment distance, indicating that illegal buildings were built in or near the farmland; simple overlap or area changes cannot distinguish between overall expansion and local modifications, but the statistical characteristics of the displacement field (mean, standard deviation) can reveal the spatial pattern of change. Specifically, such as Figure 5 As shown, in step S264, the spatial overlap area of ​​the independent building area contours in adjacent monitoring periods is calculated to identify new contour events and associated contour pairs corresponding to the spatial overlap area in adjacent monitoring periods (associated contour pairs formed by the independent building area contours of two periods); a set of sampling points is obtained for the independent building area contours of the current monitoring period (the t-th period) in the associated contour pairs, and the displacement vectors are calculated between the sampling points and the edge points of the independent building area contours to identify abnormal event contours; the shortest distance is calculated between the digital farmland map coordinates of the target field area and the edge point coordinates of the abnormal event contours to determine the illegal buildings. The specific operation steps are as follows: S2641: Calculate the spatial overlap area between the contours of all independent building regions in the t-th monitoring period and the contours of all independent building regions in the (t-1)-th monitoring period (i.e., the period preceding t). (First, determine the position of each independent building region contour (by determining the position of the edge points, thus determining the approximate position of the entire independent building region contour), then calculate the intersection area of ​​the independent building region contours in the two monitoring periods as the spatial overlap area; the number of pixels within the contour is used as the area, i.e., "area expressed in terms of the number of pixels" or "pixel area"). Preset matching threshold; determine whether the overlapping area of ​​each space is greater than the matching threshold; If so, it is determined that the outline of the independent building area corresponding to the spatial overlap area in the t-th monitoring period did not appear in the (t-1)-th monitoring period (that is, a building appeared in the t-th monitoring period, but not in the (t-1)-th monitoring period), and the outline of this independent building area is marked as a new outline event (that is, directly corresponding to illegal construction, such as...). Figure 6 (as shown) If not, then associate the outline of the independent building area corresponding to the spatial overlap area in the t-th monitoring period with the outline of the independent building area in the (t-1)-th monitoring period to form an associated outline pair; It should be noted that in the above steps, the spatial overlap area of ​​the independent building area contours extracted in the t-th monitoring period and the (t-1)-th monitoring period is calculated to effectively quantify the changes in these buildings. The number of overlapping pixels is used as an indicator of area, so that the state changes of buildings between two monitoring periods can be clearly defined. The matching degree threshold is set to quantify and judge the degree of overlap of this contour. The setting of the threshold can help identify which buildings are newly appearing and which existed before, thereby reducing the risk of misjudgment. When the spatial overlap area is greater than the matching degree threshold, it means that the buildings in the t-th monitoring period and the buildings in the (t-1)-th monitoring period do not overlap in location, indicating that a new building appeared in the t-th monitoring period. This can be marked as a new contour event, which intuitively points to possible illegal construction behavior. If the spatial overlap area does not exceed the preset threshold, the contours of the two monitoring periods are correlated. This helps to analyze whether these buildings exist continuously or undergo state changes (such as expansion, reconstruction, etc.). The resulting correlated contour pairs are used to further study the changes in buildings (i.e., illegal expansion is also part of the violation). In this scheme, the overlap area change rate + centroid displacement is not used to screen correlated contour pairs because if a new building is adjacent to an existing old building, their overlap area is almost 0, but their centroids may be very close. Using the overlap area change rate + centroid displacement will incorrectly associate the new building with the adjacent old building because it is close and the area has changed (from 0 to 1), and the new contour event will be lost. That is, if two buildings are adjacent, and one of them expands, the centroid displacement will misidentify and associate the other building, while the expanded part will not be associated. S2642: Sample the independent building area contours of the t-th monitoring period in the associated contour pair to obtain a set of sampling points; For each sampling point, find the nearest edge point on the outline of the independent building area in the (t-1)th monitoring period (i.e., first determine the coordinates of the sampling point and the coordinates of the edge point of the independent building area outline in the (t-1)th monitoring period, calculate the distance between the sampling point and the edge point, and filter out the nearest edge point of the sampling point). The displacement vector is calculated using the distance between the sampling point coordinates and the nearest edge point (i.e., the point displacement is obtained by subtracting the sampling point from the nearest edge point). Calculate the average displacement and standard deviation of all displacement vectors (i.e., the average displacement represents the average outward expansion distance of the outline of an independent building area; the standard deviation of displacement represents the consistency of the displacement at each point). It should be noted that for each associated contour pair, the difference in contour shape between the two periods is analyzed by densely sampling the displacement vectors from the nearest edge point of the previous contour on the current contour boundary, and then calculating the overall characteristic average displacement and displacement standard deviation of all displacement vectors. Comparing only a few response feature points (such as corner points) will miss a lot of boundary information. Dense sampling points ensure that every change in the contour is fully captured, whether it is a straight line segment or a curved segment. The more sampling points, the more the analysis results can reflect the true changes. S2643: Preset minimum significant displacement threshold and displacement consistency threshold; Determine whether the average displacement is less than the minimum significant displacement threshold (i.e., whether the displacement causes deformation of the overall outline, which is illegal expansion; for example, adding a balcony to the entire building, moving the entire wall outward, or adding a regular outer canopy to a warehouse are other typical violations). If so, the relative fluctuation value is calculated using the average displacement and the standard deviation of the displacement (i.e., standard deviation divided by mean). This value reflects the consistency of point displacement and is also used to measure the uniformity of contour displacement; the smaller the value, the more consistent the displacement. The relative fluctuation value is then determined to be less than or equal to the displacement consistency threshold (i.e., it reflects whether the overall displacement of all edge points of the contour is uniform). If so, the outline of the independent building area is determined to be an event of no change in outline (that is, the outline is not deformed, and all edge points of the outline are uniformly displaced; only when the displacement is uniform will the outline be undeformed). If any of the above judgments are not met, the outline of the independent building area is determined to be an abnormal event outline. It should be noted that, based on the average displacement and displacement standard deviation calculated in the previous step, this step categorizes building changes into: no significant changes (i.e., average displacement is less than the threshold, considered as measurement error or normal fluctuation, normal buildings, no need to pay attention), systematic expansion (i.e., average displacement is significant and the change is uniform, representing planned and large-scale expansion), and irregular changes (i.e., average displacement is significant but the change is uneven, representing local modifications or complex changes, usually premeditated illegal expansion, such as overall additions or moving walls outwards; this could be legal modifications (such as opening doors and windows) or complex violations). The reason for setting a minimum significant displacement threshold is that there are unavoidable errors in UAV image processing: registration errors, segmentation errors, sensor noise, etc. These errors may cause slight changes in the outline, but are not actual building changes; setting a threshold (usually 0.3-0.5 meters) filters out these noises, focusing only on real significant changes. The coefficient of variation (standard deviation divided by the mean) measures the relative volatility of the change; a small value indicates that all boundary points move almost equidistantly, like a balloon inflating uniformly; a large value indicates that some points move more, some move less, or even in different directions. S2644: Collect the digital farmland map coordinates of the target field area (i.e., show which area is farmland on the map); Locate the coordinates of the abnormal event contours (i.e., the contours of independent building areas) in the digital farmland map coordinate system. The abnormal event contours are located in the digital farmland map coordinate system based on the coordinates of each edge point, thus displaying the coordinates of all abnormal event contours. Calculate the distance between the coordinates of the anomaly event profile and the coordinates of the digital farmland map, and filter for the shortest distance; A preset shortest distance threshold is established; it is then determined whether the intersection distance is less than the shortest distance threshold. If so, the outline of the abnormal event is determined to be an illegal building; It should be noted that the abnormal building outlines identified in the previous steps are spatially analyzed with the legally protected farmland data to calculate the shortest distance between the building outline and the farmland red line. If the distance is less than the threshold, it is judged as an illegal building. The output includes the precise location. Only spatial analysis can determine whether there is a violation. The accuracy of the distance calculation and the shortest distance threshold are the most stringent judgment criteria, which can accurately determine whether the building is built in or near the farmland and is therefore an illegal building.

[0021] Example 2 like Figure 5 As shown, this embodiment also discloses an inspection and detection system based on UAV aerial images, including: an acquisition module 10; and an identification module 20. The acquisition module 10 is used to acquire aerial images of the target field area using a drone according to a preset monitoring cycle, and to preprocess the aerial images to obtain an aligned aerial image sequence. The identification module 20 is used to slide a window through the aligned aerial image sequence and filter it to obtain a first denoised image set; extract response feature points from the aligned aerial images in the first denoised image set to identify the area to be repaired; fill the area to be repaired with adjacent aligned aerial images to obtain a preliminary texture-filled area; smooth and identify the polygonal edge contours of the preliminary texture-filled area and binarize them to obtain the contours of the independent building area; use the contours of the independent building area in adjacent monitoring periods to perform coordinate detection and output the coordinate information of the illegal building.

[0022] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; those skilled in the art can modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An inspection and detection method based on UAV aerial images, characterized in that, The following steps are included: Aerial images of the target field area are collected by drones according to a preset monitoring cycle. The aerial images are preprocessed to obtain an aligned aerial image sequence. The aligned aerial image sequence is slid-windowed and filtered to obtain a first denoised image set; response feature points are extracted from the aligned aerial images in the first denoised image set to identify the area to be repaired; adjacent aligned aerial images are used to fill the area to be repaired to obtain a preliminary texture-filled area; the polygonal edge contours of the preliminary texture-filled area are smoothed and binarized to obtain the contours of the independent building area; coordinate detection is performed using the contours of the independent building area in adjacent monitoring periods to output the coordinate information of the illegal building.

2. The inspection and detection method based on UAV aerial images according to claim 1, characterized in that, The aligned aerial image sequence is processed by sliding a window and filtered to obtain the first denoised image set. The specific operation steps are as follows: For each aligned aerial image in the aligned aerial image sequence, a sliding window is created, and the standard deviation of the gray values ​​of all pixels in each sliding window is calculated. The gradient magnitude of the pixels in each neighboring sliding window is also calculated, and the average gradient magnitude of the gradient magnitudes of all pixels in each neighboring sliding window is further calculated. The mixed evaluation factor is obtained by multiplying the standard deviation of the pixel gray values ​​and the average gradient magnitude. Set a preset filtering threshold; determine whether the mixed evaluation factor of each sliding window is greater than the filtering threshold; If so, the center pixel of the sliding window is determined to be located in the edge region, and the sliding window is reset. Taking the center pixel as the center of the reset sliding window, all neighboring pixels in the sliding window are arranged in ascending order of gray value, and the gray value of the pixel at the middle position is taken as the median filter candidate value. The final filter value is obtained by weighting the gray value of the pixel at the middle position with the median filter candidate value. The final filtered value is used to filter the pixels in each aligned aerial image to obtain the first denoised image set.

3. The inspection and detection method based on UAV aerial images according to claim 2, characterized in that, The responsive feature points are extracted from the aligned aerial images in the first denoised image set to identify the area to be repaired. The specific steps are as follows: The SIFT algorithm is used to extract response feature points for each aligned aerial image in the first denoised image set; the aligned aerial images in the first denoised image set are divided into uniform grids, and the number of response feature points in each grid is calculated; the area of ​​each grid is calculated; the density of response feature points in the grid is calculated based on the number of response feature points in the grid and the area of ​​the grid. Preset feature density threshold; determine whether the response feature point density of each grid is less than the feature density threshold; If so, then the grid is identified as the area to be repaired; If not, the grid is determined to be a non-filled area.

4. The inspection and detection method based on UAV aerial images according to claim 3, characterized in that, The adjacent aligned aerial images are used to fill the area to be repaired, resulting in a preliminary texture-filled area. The specific steps are as follows: Each area to be repaired is expanded according to a preset expansion range to form a ring-shaped analysis band; For each pixel in the annular analysis band, four directions are calculated, and pairs of pixels with the same gray value are selected to construct a gray-level co-occurrence matrix. The gray-level co-occurrence matrix is ​​used to calculate the directional contrast of pairs of pixels with the same gray-level value in each direction; The maximum directional contrast is taken as the dominant edge direction, and the dominant edge direction is further taken as the dominant direction angle of the annular analysis band; the mean gray value of the pixels in the annular analysis band is calculated as the texture complexity of the annular analysis band. Filter adjacent aligned aerial images and set a search window for aligned aerial images of unmarked areas to be repaired within the same sliding window; set a sliding block of the same size as the area to be repaired within the search window; repeat the above steps for each sliding block to calculate the dominant direction angle and texture complexity of the sliding block; Preset thresholds for consistent angles and similar complexity; Calculate the directional difference between the dominant directional angle of the annular analysis zone and the dominant directional angle of the sliding block; determine whether the directional difference is less than the angle consistency threshold. If so, then the texture direction of the annular analysis band is consistent with that of the sliding block; And continue to calculate the complexity difference between the texture complexity of the ring analysis band and the texture complexity of the sliding block; determine whether the complexity difference is less than the complexity similarity threshold; If so, then the texture complexity of the annular analysis band and the sliding block is determined to be similar; The sliding blocks with the same texture direction and similar texture complexity are filled into the area to be repaired to obtain the preliminary texture filling area.

5. The inspection and detection method based on UAV aerial images according to claim 4, characterized in that, The initial texture-filled area is smoothed to identify polygonal edge contours, which are then binarized to obtain the contours of independent building areas. Coordinate detection is performed using the contours of independent building areas from adjacent monitoring periods to output the coordinate information of the illegal buildings. The specific operation steps are as follows: The strip-shaped region is identified by the contour boundary of the initial texture-filled region; the initial texture-filled region is smoothed by the strip-shaped region, and the polygonal edge contour of the smoothed initial texture-filled region is identified. The polygonal edge contour is binarized to obtain the contour of the independent building area; the contour of the independent building area is subjected to coordinate detection of adjacent monitoring cycles to obtain the contour of the abnormal event; the distance between the contour of the abnormal event and the fields in the target field area is calculated to identify the illegal buildings.

6. The inspection and detection method based on UAV aerial images according to claim 5, characterized in that, The strip-shaped region is identified by the contour boundary of the initial texture-filled region; the initial texture-filled region is smoothed by the strip-shaped region, and the polygonal edge contour of the smoothed initial texture-filled region is identified. The specific operation steps are as follows: The contour boundary of the preliminary texture filling region is identified, and n pixels inside and outside the contour boundary of the preliminary texture filling region are taken as a strip region; the Euclidean distance from each pixel in the strip region to the contour boundary of the non-filled region is calculated; the maximum Euclidean distance and the minimum Euclidean distance are selected to calculate the normalized distance; a threshold for the distance to the contour boundary of the non-filled region is preset; and it is determined whether the normalized distance is less than the threshold for the distance to the contour boundary of the non-filled region. If so, then take each pixel of the outline boundary of the initial texture filling region as the center, take the neighboring pixels as the center window, and calculate the average gray value of the pixels in the initial texture filling region and the average gray value of the pixels in the non-filled region within each center window. The average gray value of the pixels in the initial texture-filled area is compared with the average gray value of the pixels in the non-filled area to calculate the similarity, which is then used as the color similarity. The normalized distance and color similarity are weighted and fused to obtain the fusion weight; Bilateral filtering is applied to each pixel in the initial texture filling region and the strip region. The value range kernel in the bilateral filtering is adjusted using the fusion weight to obtain a smooth initial texture filling region. Pre-construct Gabor filters in different directions; The Gabor filter is used to filter each pixel in the smoothed initial texture filling area in different directions to obtain a set of directional response values. The maximum absolute value among all directional response values ​​is taken as the edge intensity of the pixel. Preset edge strength threshold; determine whether the edge strength of each pixel is greater than the edge strength threshold; If so, the pixel is determined to be a linear edge with a clear direction within the initial texture filling area and is designated as an edge point. The gradient direction of the selected edge point is calculated, and an edge point is randomly selected as the starting edge point. The next edge point is searched in its neighborhood according to the gradient direction of the starting edge point. The search for edge points according to the gradient direction is repeated until the starting edge point is returned or there are no edge points, thus obtaining the polygonal edge outline of the initial texture filling area.

7. The inspection and detection method based on UAV aerial images according to claim 6, characterized in that, The polygonal edge contour is binarized to obtain the contour of the independent building area; the contour of the independent building area is subjected to coordinate detection of adjacent monitoring periods to obtain the contour of abnormal events; the distance between the contour of abnormal events and the fields in the target field area is calculated to identify illegal buildings. The specific operation steps are as follows: The polygonal edge contour is divided into individual edge contours to form a set of edge contours; A minimum distance threshold is preset; the distance from each response feature point in the aligned aerial image to all edge points in each edge contour set is calculated, and the shortest distance is filtered; it is determined whether the shortest distance is less than the minimum distance threshold. If so, the response feature point is included in the edge contour set to enhance the polygon edge contour; foreground pixels and background pixels are defined. The enhanced polygonal edge contours are binarized to obtain the contours of independent building areas; The spatial overlap area of ​​the independent building area contours in adjacent monitoring periods is calculated to identify new contour events and associated contour pairs corresponding to the spatial overlap area in adjacent monitoring periods; a set of sampling points is obtained for the independent building area contours in the current monitoring period in the associated contour pairs, and the displacement vectors are calculated between the sampling points and the edge points of the independent building area contours to identify abnormal event contours; the shortest distance is calculated between the digital farmland map coordinates of the target field area and the edge point coordinates of the abnormal event contours to determine the illegal buildings; The abnormal event profile includes new profile events, profile expansion events, and profile irregularity change events.

8. The inspection and detection method based on UAV aerial images according to claim 7, characterized in that, The spatial overlap area of ​​independent building areas in adjacent monitoring periods is calculated to identify new contour events and associated contour pairs corresponding to the spatial overlap area in adjacent monitoring periods. The specific operation steps are as follows: Calculate the spatial overlap area between the outlines of all independent building areas in the t-th monitoring period and the outlines of all independent building areas in the (t-1)-th monitoring period; preset the matching degree threshold; Determine whether the overlapping area of ​​each space is greater than the matching degree threshold; If yes, then it is determined that the outline of the independent building area corresponding to the spatial overlap area in the t-th monitoring period did not appear in the (t-1)-th monitoring period, and the outline of the independent building area is marked as a new outline event; if no, then the outline of the independent building area corresponding to the spatial overlap area in the t-th monitoring period is associated with the outline of the independent building area in the (t-1)-th monitoring period to form an associated outline pair.

9. The inspection and detection method based on UAV aerial images according to claim 8, characterized in that, For the current monitoring period's independent building area contours in the associated contour pairs, a set of sampling points are obtained. Displacement vectors are calculated between the sampling points and the edge points of the independent building area contours to identify abnormal event contours. The shortest distance is calculated between the digital farmland map coordinates of the target field area and the edge point coordinates of the abnormal event contours to determine the illegal buildings. The specific operation steps are as follows: The contours of independent building areas in the t-th monitoring period of the associated contour pair are sampled to obtain a set of sampling points; for each sampling point, the nearest edge point on the contour of the independent building area in the (t-1)-th monitoring period is found; the displacement vector is calculated using the coordinates of the sampling point and the distance to the nearest edge point; the average displacement and the standard deviation of the displacement are calculated by statistically analyzing all displacement vectors. Preset minimum significant displacement threshold and displacement consistency threshold; Determine whether the average displacement is less than the minimum significant displacement threshold; If so, the relative fluctuation value is calculated using the average displacement and the standard deviation of the displacement; and it is determined whether the relative fluctuation value is less than or equal to the displacement consistency threshold. If so, the outline of the independent building area is determined to be an event with no change in outline; If any of the above judgments are not met, the outline of the independent building area is determined to be an abnormal event outline. Collect the coordinates of the digital farmland map of the target field area; locate the coordinates of the outline of the abnormal event in the digital farmland map coordinate system; Calculate the distance between the coordinates of the abnormal event contour and the coordinates of the digital farmland map, and filter for the shortest distance; preset a shortest distance threshold; determine whether the intersection distance is less than the shortest distance threshold; If so, the outline of the abnormal event is determined to be an illegal building.

10. An inspection and detection system based on UAV aerial imagery, characterized in that, include: Data acquisition module; Recognition module; The acquisition module is used to acquire aerial images of the target field area using a drone according to a preset monitoring cycle, and to preprocess the aerial images to obtain an aligned aerial image sequence. The identification module is used to slide a window through the aligned aerial image sequence and filter it to obtain a first denoised image set; extract response feature points from the aligned aerial images in the first denoised image set to identify the area to be repaired; fill the area to be repaired with adjacent aligned aerial images to obtain a preliminary texture-filled area; smooth and identify the polygonal edge contours of the preliminary texture-filled area and binarize them to obtain the contours of the independent building area; use the contours of the independent building area in adjacent monitoring periods to perform coordinate detection and output the coordinate information of the illegal building.