A multi-feature fusion picture difference comparison method for low-altitude patrol
Patent Information
- Application Number
- CN202611058230.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-08-18
AI Technical Summary
为了克服上述现有技术中存在的缺陷,本发明公开了一种面向低空巡检的多特征融合图片差异比对方法,本发明的目的是解决针对低空巡检的现有技术中以像素差异为主导、对定位偏差和光照变化敏感、二值化阈值固定等问题
1、本发明不依赖GNSS坐标,而是采用ORB特征匹配与单应性变换相结合的几何校正方法。ORB特征具有良好的旋转不变性和尺度不变性,能够在不同航时的图像之间提取稳定的匹配点对,并通过单应性矩阵精确估计两幅图像之间的投影变换关系。经校正后的比对图像与模板图像在像素级别上实现精准对齐,从根本上解决了定位偏差对差异比对的干扰问题。
Smart Images

Figure CN122597936A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of UAV low-altitude inspection and image processing technology, and in particular to a multi-feature fusion image difference comparison method for low-altitude inspection. Specifically, it relates to a method for low-altitude inspection that can perform multi-feature fusion difference comparison on images collected at the same waypoint at different times along the same route, after considering the influence of positioning deviation. Background Technology
[0002] Currently, in the field of low-altitude UAV inspection, some preliminary technical solutions exist for image comparison of the same waypoints across different flight sorties along the same route. These solutions typically follow these steps: (1) Route planning and waypoint setting Operators pre-set the drone inspection route and mark several key waypoints along the route. The drone automatically flies and collects images at the set waypoints based on the positioning information provided by the Global Navigation Satellite System (GNSS).
[0003] (2) Image acquisition and storage During each inspection mission, the drone triggers a shooting action upon reaching a preset waypoint, acquiring the corresponding inspection image. Inspection images from different times are stored according to waypoint classification, forming a time-series image dataset.
[0004] (3) Image registration based on geographic coordinates For two images acquired at different times from the same waypoint, existing methods typically first use the latitude, longitude, altitude, and camera attitude information (gimbal pitch, yaw, etc.) recorded by GNSS to map the image pixel coordinates to the geographic coordinate system for preliminary alignment. Some schemes further employ local feature matching algorithms such as Scale Invariant Feature Transform (SIFT), Speed-Up Robust Feature Transform (SURF), or ORB to calculate the homography matrix between the two images, thus completing the geometric registration of the images.
[0005] (4) Image difference calculation After registration is completed, existing technologies mostly use pixel-level difference calculation methods, such as performing pixel-by-pixel difference on two registered grayscale images and then extracting the change area by setting a threshold; or using indicators such as structural similarity index (SSIM) to measure the brightness, contrast and structural differences of local areas of the image, thereby determining whether there are any anomalies.
[0006] (5) Output of difference results The calculated difference regions are marked on the image in the form of a binary mask or bounding box, and a difference report is generated for inspection personnel to review.
[0007] However, the aforementioned existing technical solutions still have the following shortcomings in practical low-altitude inspection applications: (1) Poor robustness to positioning deviation: UAVs rely on GNSS positioning, which is affected by signal multipath effect, atmospheric delay and civilian accuracy limitations (meter level to ten-meter level). Even at the same waypoint, there is still obvious spatial misalignment between images taken at different times. It is difficult to completely eliminate the deviation by simply relying on geographic coordinates or conventional feature matching.
[0008] (2) Single feature utilization: Most methods only use grayscale or local texture features for matching and difference calculation, ignoring the complementarity between various image features such as color, edge, and depth. This leads to a decrease in the accuracy and recall of difference comparison in complex environments such as changes in lighting, shadows, or cluttered backgrounds.
[0009] (3) Lack of targeted processing for low-altitude inspection scenarios: Existing methods are mostly general image registration and difference methods, which do not specifically consider special problems such as large target scale changes, complex backgrounds, and small differences in perspective in low-altitude inspection, which can easily lead to a large number of false changes or missed detections.
[0010] Therefore, there is an urgent need for an image difference comparison method that can effectively overcome positioning errors, integrate multi-dimensional image features, and adapt to complex low-altitude inspection scenarios. Summary of the Invention To overcome the shortcomings of existing technologies, this invention discloses a multi-feature fusion image difference comparison method for low-altitude inspection. The purpose of this invention is to address the problems of existing low-altitude inspection technologies, such as pixel-based differences, sensitivity to positioning deviations and lighting changes, and fixed binarization thresholds. The core idea of this invention is to extract robust difference features from three dimensions—structure, texture, and color—without relying on pixel-by-pixel differencing, and then perform binarization and fusion using an adaptive percentile threshold, ultimately outputting accurate and stable defect regions.
[0011] To achieve the above objectives, the technical solution adopted by the present invention is as follows: A multi-feature fusion image difference comparison method for low-altitude inspection includes the following steps: I. Image Geometric Correction S1. Obtain the template image and comparison image from the low-altitude UAV inspection, and use ORB feature matching and homography transformation to perform geometric correction on the comparison image; Preferably, in step S1, the geometric correction is based on the spatial misalignment problem between images of the same waypoint at different flight times caused by positioning errors of the Global Navigation Satellite System during low-altitude UAV inspections, and performs precise geometric correction on the two input images; The spatial misalignment problem is due to the fact that UAVs rely on the Global Navigation Satellite System for positioning and flight. Due to signal multipath effects, atmospheric delay, and limitations in civilian positioning accuracy, even if the flight path and waypoint settings are exactly the same, there is still spatial misalignment between images taken at different times. The spatial misalignment includes translation, rotation, and scale changes.
[0012] Preferably, in step S1, the template image and the comparison image are two photos taken by the UAV at different flight times along the same route and at the same waypoint; wherein, the template image is an image taken at a specified waypoint during a certain flight time, serving as a comparison benchmark, and the comparison image is an image taken at the same route and at the same waypoint during another flight time, serving as the image to be detected; wherein, the certain flight time is the flight time during the first inspection or during the historical normal state, and the other flight time is the flight time during subsequent inspections.
[0013] Preferably, in step S1, the geometric correction of the image using ORB feature matching and homography transformation comparison includes: S11. Detect ORB feature points in the template image and the comparison image. Add orientation information to each feature point using the gray-scale centroid method, and combine it with the image pyramid to achieve multi-scale detection. S12. Calculate the Hamming distance of the BRIEF descriptors between feature points in the template image and the comparison image, and use the nearest neighbor distance ratio strategy for preliminary matching. S13. Eliminate incorrect matching pairs in the initial matching, and use the fast sampling consensus algorithm to filter and retain interior point matching pairs with good geometric consistency; S14. Based on the filtered interior point matching pairs, calculate the homography transformation matrix H between the template image and the comparison image; Preferably, in step S14, the homography transformation matrix H describes the projection transformation relationship between the template image and the comparison image plane, and is used to correct translation, rotation, scaling, and slight perspective distortion. The matrix form is as follows:
[0014] in, and Indicates the amount of translation. , , , Indicates rotation and scaling. , This indicates perspective distortion.
[0015] S15. Perform perspective transformation on the comparison image according to the homography transformation matrix H to obtain the geometrically corrected comparison image.
[0016] II. Image Preprocessing S2. Preprocess the template image and the comparison image after geometric correction; Preferably, in step S2, the preprocessing includes denoising and color space conversion; wherein, the denoising uses Gaussian filtering to remove sensor noise introduced during image acquisition; and the color space conversion converts the image from RGB space to Lab color space.
[0017] III. Extracting the ROI region from the comparison image and the template image S3. Identify and locate the inspection targets in the preprocessed comparison image using the target detection model, and extract the ROI region of the comparison image; then, through the inverse transformation of the homography matrix, accurately map the ROI bounding box in the comparison image to the corresponding position in the preprocessed template image, and extract the ROI region of the template image. Preferably, in step S3, the target detection model is a YOLO series target detection model based on a deep convolutional neural network. This model is pre-trained using a large number of labeled images in low-altitude inspection scenarios. The training samples cover different lighting, weather, angles and target states. The ROI region retains only detection boxes with a confidence level greater than a preset threshold, discards low-quality detection results, and expands each retained bounding box outward by a preset number of pixels to form the final ROI region.
[0018] IV. Image Multi-Feature Difference Extraction and Multi-Feature Difference Fusion S4. Calculate the structural differences, texture differences, and color differences between the ROI regions of the template image and the ROI regions of the comparison image respectively, obtain the pixel-wise absolute difference, local standard deviation, and pixel-wise Euclidean distance, and perform normalization and weighted summation to obtain the fused difference map. Preferably, in step S4, the structural difference reflects the edge, contour, and shape geometric structure information of the image and is obtained by gradient calculation; the texture difference reflects the gray-level distribution pattern and roughness of local areas of the image, targeting areas insensitive to global illumination changes and highlighting local texture abrupt changes; the color difference adopts a color space based on Log-Chromaticity, which can achieve illumination invariance through logarithmic ratio calculation.
[0019] Preferably, step S4 includes: S41. Calculate the gradient magnitude of the ROI region in the template image and the ROI region in the comparison image respectively, and use the gradient magnitude to calculate the pixel-by-pixel absolute difference between the two images. Preferably, in step S41, the gradient magnitude and the pixel-by-pixel absolute difference are:
[0020]
[0021]
[0022] in, The gradient magnitude of the ROI region in the template image. The horizontal gradient of the ROI region in the template image. The vertical gradient of the ROI region in the template image. To compare the gradient magnitude of the ROI region in the image, To compare the horizontal gradient of the ROI region in the image, To compare the vertical gradient of the ROI region in the image, The absolute difference per pixel. x and y It represents the coordinate position of a pixel in the image.
[0023] S42. Slide a fixed-size window pixel by pixel on the ROI region of the template image and the ROI region of the comparison image respectively, calculate the standard deviation of all pixel values in the window, and then use the standard deviation to calculate the local standard deviation of the two images. Preferably, in step S42, the standard deviation and local standard deviation are:
[0024]
[0025] in, Standard deviation The total number of pixels within the window. The value of the i-th pixel within the window. The average pixel value within the window. For local standard deviation, The standard deviation of the ROI region in the template plot. To compare the standard deviation of the ROI region in the graph, x and y It represents the coordinate position of a pixel in the image.
[0026] S43. Calculate the Log-Chromaticity images of the ROI regions in the template image and the ROI regions in the comparison image, and use the Log-Chromaticity images to calculate the pixel-wise Euclidean distance between the two images. Preferably, in step S43, the calculation of the Log-Chromaticity image involves converting the RGB three-channel values... Taking the logarithm, we get Based on eliminating the influence of illumination, a two-dimensional vector is further obtained. The constructed Log-Chromaticity image:
[0027]
[0028] The pixel-by-pixel Euclidean distance is:
[0029] in, The distance is the pixel-by-pixel Euclidean distance. The template image is the Log-Chromaticity image of the ROI region. To compare the Log-Chromaticity images of the ROI regions in the graph, x and y It represents the coordinate position of a pixel in the image.
[0030] S44. Normalize the pixel-wise absolute difference, local standard deviation and pixel-wise Euclidean distance to map the numerical range of each image to a unified interval. S45. The normalized pixel-wise absolute difference, local standard deviation and pixel-wise Euclidean distance are weighted and summed to obtain the fused difference map. The weights can be dynamically configured according to the actual scene.
[0031] V. Post-processing, contour extraction and filtering, and drawing defect targets S5. Post-process the fusion difference map to obtain candidate defect regions, then extract and filter the contours of the candidate defect regions to obtain defect contours, and finally draw the defect contours on the original comparison map and output them.
[0032] Preferably, in step S5, the post-processing includes: Sort all non-zero pixel values in the fusion difference map, take the value of the a-th percentile as the threshold, mark the pixels with difference values greater than b as 1, i.e. the change area, and mark the rest as 0, to obtain a binary mask map; where the values of a and b can be adjusted based on experience or dynamically. The binary mask image is subjected to closing and opening operations in sequence to obtain smooth and connected candidate defect regions; wherein the closing operation is to first dilate and then erode to fill the holes; the opening operation is to first erode and then dilate to remove isolated noise points.
[0033] Preferably, in step S5, the step of extracting and filtering the candidate defect region to obtain the defect contour, and then plotting the defect contour on the original comparison image and outputting it includes: Extract the contours of all connected regions in the candidate defect region, perform area filtering according to actual application requirements, treat regions with an area smaller than the threshold as noise and remove them, and retain regions that conform to the actual defect scale range. The final retained contours are plotted on the original comparison image, and the resulting image with defect markers and a difference report are output.
[0034] The beneficial effects of this invention are: 1. This invention does not rely on GNSS coordinates, but instead employs a geometric correction method combining ORB feature matching and homography transformation. ORB features possess excellent rotational and scale invariance, enabling the extraction of stable matching point pairs between images from different flight times. Furthermore, the homography matrix accurately estimates the projection transformation relationship between the two images. The corrected comparison image achieves precise alignment with the template image at the pixel level, fundamentally solving the problem of positioning deviations interfering with difference comparisons.
[0035] 2. This invention introduces a deep learning object detection model to automatically identify and locate the inspected target and extract the Region of Interest (ROI). Through the inverse transformation of the homography matrix, the ROI bounding boxes in the comparison image are accurately mapped to the corresponding positions in the template image, ensuring that the ROI regions in the two images describe the same physical target. This allows subsequent difference comparisons to focus solely on the target region, completely eliminating background interference, while significantly reducing computational overhead and improving processing efficiency.
[0036] 3. This invention abandons the traditional single-pixel grayscale difference mode and constructs a three-dimensional complementary difference detection framework of structure, texture, and color. The three features are independent and complementary to each other, which can cover a more comprehensive range of defect types. Through a weighted fusion strategy, the change area is comprehensively judged, which reduces false detections caused by environmental interference of single features and avoids false detections caused by the insensitivity of a certain feature. The Log-Chromaticity color space eliminates the influence of light intensity and color temperature changes through logarithmic ratio calculation, so that the color difference detection maintains consistent performance under different lighting conditions such as cloudy days, sunny days, mornings, and dusks, which cannot be achieved by existing RGB space difference methods. Attached Figure Description
[0037] Figure 1 This is a flowchart illustrating the multi-feature fusion image difference comparison method for low-altitude inspection according to the present invention. Detailed Implementation
[0038] The following will provide a clear and complete description of the concept, specific structure, and technical effects of the present invention in conjunction with the embodiments and accompanying drawings, so as to fully understand the purpose, features, and effects of the present invention.
[0039] A multi-feature fusion image difference comparison method for low-altitude inspection, such as Figure 1 As shown, it includes the following steps: Step S1: Image geometric correction In low-altitude UAV inspections, due to the spatial misalignment between images of the same waypoint at different times caused by GNSS positioning errors, precise geometric correction is performed on the two input images.
[0040] The aforementioned spatial misalignment problem is due to the fact that UAVs rely on GNSS positioning for flight, and are limited by signal multipath effect, atmospheric delay and civilian positioning accuracy. Even if the flight path and waypoint settings are exactly the same, there are still spatial misalignments such as translation, rotation and scale changes between images taken at different times. The two images are two photos taken by the UAV at the same waypoint and flight time on the same route. They are a template image and a comparison image, respectively. The template image is an image taken at a specified waypoint during a certain flight time (first inspection or historical normal state) and is used as a comparison benchmark. The comparison image is an image taken at the same waypoint and flight time during another flight time (subsequent inspection) and is used as the image to be tested. The geometric correction mentioned above is performed on the two images using the ORB (Oriented FAST and Rotated BRIEF) feature matching algorithm.
[0041] Step S1.1: Detect ORB feature points in the template image and the comparison image. Add orientation information to each feature point using the gray-scale centroid method, and achieve multi-scale detection in conjunction with the image pyramid.
[0042] Step S1.2: Calculate the Hamming distance of the BRIEF descriptors between feature points in the template image and the comparison image, and use the nearest neighbor distance ratio strategy for preliminary matching.
[0043] Step S1.3: Eliminate incorrect matching pairs and use the fast sampling consensus algorithm to filter and retain interior point matching pairs with good geometric consistency.
[0044] Step S1.4: Based on the selected matching point pairs, calculate the homography transformation matrix H between the two images. This matrix describes the projection transformation relationship between the two image planes and can effectively correct translation, rotation, scaling, and slight perspective distortion. The matrix form is as follows:
[0045] in, and Indicates the amount of translation. , , , Indicates rotation and scaling. , This indicates perspective distortion.
[0046] Step S1.5: Perform perspective transformation on the comparison image according to the matrix H obtained in step S1.4 to obtain the geometrically corrected comparison image. The corrected comparison image and the template image are pixel-level aligned in spatial geometric position.
[0047] Step S2: Image Preprocessing Preprocess the two images.
[0048] The two images are a template image and a geometrically corrected comparison image; The preprocessing includes noise reduction and color space conversion; The noise reduction process described uses Gaussian filtering to remove sensor noise introduced during image acquisition. The color space conversion described herein converts the image from RGB color space to Lab color space.
[0049] Step S3: Extract the Region of Interest (ROI) from the comparison map. Using a pre-trained AI target detection model, target recognition is performed on the comparison map after geometric correction in step S1, and the region of interest (ROI) is extracted as the search range for multi-feature difference comparison. The AI model is a YOLO series target detection model based on deep convolutional neural networks. The model is pre-trained using a large number of labeled images in low-altitude inspection scenarios. The training samples cover different lighting, weather, angles and target states to ensure the model's generalization ability in actual inspection environments.
[0050] The ROI region retains only detection boxes with a confidence level greater than a preset threshold, discards low-quality detection results, and expands each retained bounding box outward by a certain number of pixels to form the final ROI region. For the ROI area of the template diagram, This is the ROI region in the comparison image after geometric correction.
[0051] Step S4: Extraction of multiple features from the image For the ROI regions of the template image and the comparison image extracted in step S3, difference features are calculated from three dimensions: structure, texture, and color. These three dimensions are independent and complementary, together forming a multi-perspective description of image changes.
[0052] Extract the difference features between the template image and the comparison image after geometric correction in step S1 in three dimensions; The differences include structural differences, texture differences, and color differences; Step S4.1: The structural differences described reflect the geometric structure information of the image, such as edges, contours, and shapes. The gradient, being the first derivative of image intensity, can effectively capture these structural features and is robust to changes in global illumination, because illumination changes mainly affect the low-frequency components of the image, while the gradient belongs to high-frequency information.
[0053] To each and Calculate the gradient magnitude:
[0054]
[0055] in, The gradient magnitude of the template image. The horizontal gradient of the template graph. The vertical gradient of the template image. The gradient magnitudes of the comparison chart after geometric correction. The horizontal gradient of the comparison image after geometric correction. The vertical gradient is shown in the comparison image after geometric correction.
[0056] Calculate the pixel-by-pixel absolute difference between two gradient magnitude maps. :
[0057] Here, x and y represent the coordinates of a pixel in the image.
[0058] Step S4.2: The texture differences reflect the grayscale distribution pattern and roughness of local areas of the image, targeting areas that are not sensitive to global illumination changes, and highlighting abrupt changes in local texture.
[0059] Slide a fixed-size window across the image pixel by pixel, and evaluate all pixel values within the window. Calculate the standard deviation:
[0060] in, The average pixel value within the window. This represents the total number of pixels within the window.
[0061] To each and calculate ,get and .
[0062] Calculate the local standard deviation of the two graphs. :
[0063] Here, x and y represent the coordinates of a pixel in the image.
[0064] Step S4.3: The color difference is achieved using a color space based on Log-Chromaticity, which can achieve illumination invariance through logarithmic ratio calculations.
[0065] The input image is converted from RGB space to Log-Chromaticity space. First, the RGB three-channel values are... Taking the logarithm, we get To eliminate the influence of lighting, a two-dimensional vector is obtained. The constructed Log-Chromaticity image.
[0066]
[0067]
[0068] They were obtained respectively and Log-Chromaticity image and .
[0069] Calculate the pixel-by-pixel Euclidean distance between the two images. :
[0070] Here, x and y represent the coordinates of a pixel in the image.
[0071] Step S4.4: right , , Normalization is performed to map the numerical ranges of each graph to a unified interval, eliminating dimensional differences between different feature dimensions.
[0072] Step S5: Multi-feature difference fusion Normalized , , A weighted summation is performed, and the weights can be dynamically configured according to the actual scenario.
[0073] Step S6: Post-processing Sort all non-zero pixel values in the fusion difference map obtained in step S5, and take the value of the a-th percentile as the threshold. Mark pixels with a difference value greater than b as 1, i.e., the change region, and mark the rest as 0, to obtain a binary mask map. The values of a and b can be adjusted empirically or dynamically.
[0074] The binary mask image is subjected to closing operations (dilation followed by erosion to fill holes) and opening operations (erosion followed by dilation to remove isolated noise points) in sequence to obtain smooth and connected candidate defect regions.
[0075] Step S7: Contour Extraction and Filtering Extract the contours of all connected regions, perform area filtering according to actual application requirements, discard regions with excessively small areas as noise, and retain regions that conform to the actual defect scale range.
[0076] Step S8: Draw the defect target The final retained contours are plotted on the original comparison image, and the resulting image with defect markers and a difference report are output.
[0077] The key points of this invention are as follows: This invention proposes a complete technical solution to address the problem of comparing differences between images taken at different times along the same route and at the same waypoint during low-altitude UAV inspections. The key differences from existing technologies are as follows: 1. To address the spatial misalignment problem caused by GNSS positioning errors, without relying on coordinate information, ORB feature matching and homography transformation are used for pixel-level geometric correction to eliminate translation, rotation, scaling and slight perspective distortion.
[0078] 2. Utilize a deep learning target detection model to automatically identify inspection targets, extract ROI regions, and inversely map the ROI coordinates to the template image using a homography matrix to achieve accurate correspondence between the ROIs of the two images and eliminate background interference.
[0079] 3. Abandoning the traditional pixel-by-pixel grayscale difference, the difference structure is calculated separately from three complementary dimensions: structural difference, texture difference, and color difference. The three difference maps are then weighted and fused to comprehensively judge the change area, reducing the risk of false detection or false negative detection of single features.
[0080] The embodiments of the present invention have been described in detail above, but the present invention is not limited to the described embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalents or substitutions are all included within the scope defined by the claims of the present invention.
Claims
1. A multi-feature fusion image difference comparison method for low-altitude inspection, characterized in that, Includes the following steps: S1. Obtain the template image and comparison image from the low-altitude UAV inspection, and use ORB feature matching and homography transformation to perform geometric correction on the comparison image; S2. Preprocess the template image and the comparison image after geometric correction; S3. Identify and locate the inspection targets in the preprocessed comparison map using the target detection model, and extract the ROI region of the comparison map; Then, by performing an inverse transformation of the homography matrix, the ROI bounding boxes in the alignment image are accurately mapped to the corresponding positions in the preprocessed template image, and the ROI regions in the template image are extracted. S4. Calculate the structural differences, texture differences, and color differences between the ROI regions of the template image and the ROI regions of the comparison image respectively, obtain the pixel-wise absolute difference, local standard deviation, and pixel-wise Euclidean distance, and perform normalization and weighted summation to obtain the fused difference map. S5. Post-process the fusion difference map to obtain candidate defect regions, then extract and filter the contours of the candidate defect regions to obtain defect contours, and finally draw the defect contours on the original comparison map and output them.
2. The multi-feature fusion image difference comparison method for low-altitude inspection as described in claim 1, characterized in that, In step S1, the geometric correction is based on the spatial misalignment problem between images of the same waypoint at different flight times caused by the positioning error of the Global Navigation Satellite System during low-altitude UAV inspections, and performs precise geometric correction on the two input images. The spatial misalignment problem is due to the fact that UAVs rely on the Global Navigation Satellite System for positioning and flight. Due to the limitations of signal multipath effect, atmospheric delay and civilian positioning accuracy, even if the flight path and waypoint settings are exactly the same, there is still spatial misalignment between images taken at different times. The spatial misalignment includes translation, rotation and scale changes. In step S1, the template image and the comparison image are two photos taken by the UAV at different flight times along the same route and at the same waypoint. The template image is an image taken at a specified waypoint during a certain flight time, serving as the comparison benchmark. The comparison image is an image taken at the same route and at the same waypoint during another flight time, serving as the image to be detected. The certain flight time is the flight time during the first inspection or during the historical normal state, and the other flight time is the flight time during subsequent inspections.
3. The multi-feature fusion image difference comparison method for low-altitude inspection as described in claim 1, characterized in that, In step S1, the geometric correction of the image by comparing ORB feature matching and homography transformation includes: S11. Detect ORB feature points in the template image and the comparison image. Add orientation information to each feature point using the gray-scale centroid method, and combine it with the image pyramid to achieve multi-scale detection. S12. Calculate the Hamming distance of the BRIEF descriptors between feature points in the template image and the comparison image, and use the nearest neighbor distance ratio strategy for preliminary matching. S13. Eliminate incorrect matching pairs in the initial matching, and use the fast sampling consensus algorithm to filter and retain interior point matching pairs with good geometric consistency; S14. Based on the filtered interior point matching pairs, calculate the homography transformation matrix H between the template image and the comparison image; In step S14, the homography transformation matrix H describes the projection transformation relationship between the template image and the comparison image plane, and is used to correct translation, rotation, scaling, and slight perspective distortion. The matrix form is as follows: in, and Indicates the amount of translation. , , , Indicates rotation and scaling. , Indicates perspective distortion; S15. Perform perspective transformation on the comparison image according to the homography transformation matrix H to obtain the geometrically corrected comparison image.
4. The multi-feature fusion image difference comparison method for low-altitude inspection as described in claim 1, characterized in that, In step S2, the preprocessing includes denoising and color space conversion; wherein, the denoising uses Gaussian filtering to remove sensor noise introduced during image acquisition; and the color space conversion converts the image from RGB space to Lab color space.
5. The multi-feature fusion image difference comparison method for low-altitude inspection as described in claim 1, characterized in that, In step S3, the target detection model is a YOLO series target detection model based on a deep convolutional neural network. This model is pre-trained using a large number of labeled images in low-altitude inspection scenarios. The training samples cover different lighting, weather, angles and target states. The ROI region retains only detection boxes with a confidence level greater than a preset threshold, discards low-quality detection results, and expands each retained bounding box outward by a preset number of pixels to form the final ROI region.
6. The multi-feature fusion image difference comparison method for low-altitude inspection as described in claim 1, characterized in that, In step S4, the structural differences reflect the edge, contour, and shape geometric structure information of the image and are obtained using gradient calculation; the texture differences reflect the gray-level distribution pattern and roughness of local areas of the image, targeting areas insensitive to global illumination changes and highlighting local texture abrupt changes; the color differences adopt a color space based on Log-Chromaticity, which can achieve illumination invariance through logarithmic ratio calculation.
7. The multi-feature fusion image difference comparison method for low-altitude inspection as described in claim 1, characterized in that, Step S4 includes: S41. Calculate the gradient magnitude of the ROI region in the template image and the ROI region in the comparison image respectively, and use the gradient magnitude to calculate the pixel-by-pixel absolute difference between the two images. S42. Slide a fixed-size window pixel by pixel on the ROI region of the template image and the ROI region of the comparison image respectively, calculate the standard deviation of all pixel values in the window, and then use the standard deviation to calculate the local standard deviation of the two images. S43. Calculate the Log-Chromaticity images of the ROI regions in the template image and the ROI regions in the comparison image, and use the Log-Chromaticity images to calculate the pixel-wise Euclidean distance between the two images. S44. Normalize the pixel-wise absolute difference, local standard deviation and pixel-wise Euclidean distance to map the numerical range of each image to a unified interval. S45. The normalized pixel-wise absolute difference, local standard deviation and pixel-wise Euclidean distance are weighted and summed to obtain the fused difference map. The weights can be dynamically configured according to the actual scene.
8. The multi-feature fusion image difference comparison method for low-altitude inspection as described in claim 7, characterized in that, In step S41, the gradient magnitude and the pixel-by-pixel absolute difference are: in, The gradient magnitude of the ROI region in the template image. The horizontal gradient of the ROI region in the template image. The vertical gradient of the ROI region in the template image. To compare the gradient magnitude of the ROI region in the image, To compare the horizontal gradient of the ROI region in the image, To compare the vertical gradient of the ROI region in the image, The absolute difference per pixel. x and y It represents the coordinate position of a pixel in the image; In step S42, the standard deviation and local standard deviation are: in, Standard deviation, The total number of pixels within the window. The value of the i-th pixel within the window. The average pixel value within the window. For local standard deviation, The standard deviation of the ROI region in the template plot. To compare the standard deviation of the ROI region in the graph, x and y It represents the coordinate position of a pixel in the image; In step S43, the calculation of the Log-Chromaticity image involves converting the RGB three-channel values... Taking the logarithm, we get Based on eliminating the influence of illumination, a two-dimensional vector is further obtained. The constructed Log-Chromaticity image: The pixel-by-pixel Euclidean distance is: in, The distance is the pixel-by-pixel Euclidean distance. The template image is the Log-Chromaticity image of the ROI region. To compare the Log-Chromaticity images of the ROI regions in the graph, x and y It represents the coordinate position of a pixel in the image.
9. The multi-feature fusion image difference comparison method for low-altitude inspection as described in claim 1, characterized in that, In step S5, the post-processing includes: Sort all non-zero pixel values in the fusion difference map, take the value of the a-th percentile as the threshold, mark the pixels with difference values greater than b as 1, i.e. the change area, and mark the rest as 0, to obtain a binary mask map; where the values of a and b can be adjusted based on experience or dynamically. The binary mask image is subjected to closing and opening operations in sequence to obtain smooth and connected candidate defect regions; wherein the closing operation is to first dilate and then erode to fill the holes; the opening operation is to first erode and then dilate to remove isolated noise points.
10. The multi-feature fusion image difference comparison method for low-altitude inspection as described in claim 1, characterized in that, In step S5, the process of extracting and filtering the candidate defect region to obtain the defect contour, and then plotting the defect contour on the original comparison image and outputting it, includes: Extract the contours of all connected regions in the candidate defect region, perform area filtering according to actual application requirements, treat regions with an area smaller than the threshold as noise and remove them, and retain regions that conform to the actual defect scale range. The final retained contours are plotted on the original comparison image, and the resulting image with defect markers and a difference report are output.