Artificial Intelligence-Based Intelligent Inspection Method and System for Unmanned Aerial Vehicles
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-08-14
AI Technical Summary
然而,现有无人机巡检方案在复杂施工场景下面临自主飞行稳定性不足、避障能力有限等技术瓶颈,易受复杂风场、施工动态干扰、尘土雨雾等多源因素影响,导致采集图像出现抖动模糊、区域纹理失真等问题;同时,现有图像处理方法多依赖固定尺度像素矩阵进行关键点检测与多帧平均对齐,忽略了不同区域内特征尺度的差异性,易造成特征相似或像素矩阵高度重叠的关键点定位失准,进而导致高频细节丢失、图像融合模糊,最终影响脚手架倾斜程度识别的准确性与实时性,无法实现倾斜风险的精准预警与施工动态的闭环管控
本发明通过量化跨帧像素差异与纹理结构稳定性的波动,能够精准区分由物体真实运动引起的纹理变化与由飞行抖动导致的模糊失真,有效解决了连续抖动帧误判为正常运动图像而未进行对齐修正的问题,显著提升了图像去抖的准确性。其次,在特征匹配环节,本发明提出基于灰度值与梯度幅值标准差乘积最大化的自适应定位尺度,能够根据不同区域的特征丰富程度动态调整匹配范围,避免了特征相似区或低纹理区的关键点定位失准及高频细节丢失,确保了图像融合的清晰度。
Smart Images

Figure CN122574701A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image data processing, and more particularly to an intelligent inspection method and system for unmanned aerial vehicles (UAVs) based on artificial intelligence. Background Technology
[0002] Drone inspection, through non-contact, close-range inspections, can effectively cover key parts of scaffolding, such as facades, nodes, uprights, horizontal bars, and scissor braces, significantly improving inspection efficiency and the objectivity of data collection. However, existing drone inspection solutions face technical bottlenecks in complex construction scenarios, including insufficient autonomous flight stability and limited obstacle avoidance capabilities. They are also susceptible to various factors such as complex wind fields, construction dynamics, dust, rain, and fog, leading to issues like image jitter, blurring, and regional texture distortion. Furthermore, existing image processing methods often rely on fixed-scale pixel matrices for key point detection and multi-frame averaging alignment, ignoring the differences in feature scales across different regions. This can easily cause inaccurate positioning of key points with similar features or highly overlapping pixel matrices, resulting in the loss of high-frequency details and blurred image fusion. Ultimately, this affects the accuracy and real-time performance of scaffolding tilt recognition, hindering precise early warning of tilt risks and closed-loop management of construction dynamics. Summary of the Invention
[0003] To address the aforementioned technical problems, the present invention provides solutions in the following aspects.
[0004] In a first aspect, the present invention provides an intelligent inspection method for unmanned aerial vehicles (UAVs) based on artificial intelligence, comprising: acquiring grayscale images of consecutive frames of scaffolding; segmenting any grayscale image to obtain several sub-regions; taking any sub-region as a target region and any frame interval as a target interval; calculating the dynamic score of the target region within the target interval; calculating the comprehensive texture steady-state score of the target interval; calculating the motion intensity of the target region based on the dynamic score and the comprehensive texture steady-state score; taking any grayscale image as a target image, taking any pixel in the target image as a target point, taking any grayscale image other than the target image as an image to be aligned; calculating the steady-state correlation between the target image and the image to be aligned based on the motion intensity; obtaining the effective frame interval of the target image based on the steady-state correlation; and obtaining the matching point of any grayscale image within the effective frame interval; calculating the correction score of the image to be aligned based on a preset number of matching points; performing image alignment and fusion on the image to be aligned based on the correction score to obtain a corrected image; calculating the tilt degree of the scaffolding based on the correction score of the corrected image; obtaining the judgment result of the scaffolding based on the tilt degree; and inspecting the scaffolding based on the judgment result.
[0005] Preferably, the calculation of the dynamic score of the target region in the target interval includes: acquiring a sub-image of any grayscale image in the target region, constructing a set of sub-images of the target region; calculating the negative exponent value of the cross-correlation value between any two sub-images in the sub-image set that satisfy the target interval, and taking the mean of all negative exponent values in the sub-image set of the target region as the dynamic score of the target region in the target interval, wherein the length of the target interval is not greater than half the number of grayscale images.
[0006] Preferably, the comprehensive texture steady-state score for calculating the target interval includes: acquiring sub-images of any grayscale image in the target region, and constructing a set of sub-images of the target region; using the Sobel operator to extract edges from any sub-image in the set of sub-images of the target region, obtaining an edge set corresponding to any sub-image, wherein an edge set contains several edge sequences composed of pixels in the corresponding sub-image; taking any two sub-images in the set of sub-images of the target region that satisfy the target interval as the first image and the second image, taking any edge sequence in the edge set of the first image as the first sequence, calculating the first cosine similarity between each edge sequence in the edge set of the second image and the first sequence, and obtaining the maximum value of the first cosine similarity, and traversing to obtain each edge sequence in the edge set of the first image as the first sequence. The maximum first cosine similarity of the column is used as the first mean. Any edge sequence in the edge set of the second image is taken as the second sequence. The second cosine similarity between each edge sequence in the edge set of the first image and the second sequence is calculated, and the maximum second cosine similarity is obtained. This process is repeated to obtain the maximum second cosine similarity of each edge sequence in the edge set of the second image, and the average of all the maximum second cosine similarities is taken as the second mean. The sum of the first and second means is taken as the texture steady-state score of the first and second images. The texture steady-state scores of any two sub-images in the sub-image set of the target region that satisfy the target interval are obtained through iteration. The average of all texture steady-state scores is taken as the comprehensive texture steady-state score of the target interval.
[0007] Preferably, the calculation of the motion intensity of the target region includes: traversing to obtain the dynamic score of the target region in all frame intervals, and calculating the average of all dynamic scores as the third average; traversing to obtain the comprehensive texture steady-state score for each frame interval, and calculating the average of all comprehensive texture steady-state scores as the fourth average; calculating the absolute difference between the comprehensive texture steady-state score of the target interval and the fourth average, traversing to obtain the absolute difference for each frame interval, calculating the cumulative value of all absolute differences, and multiplying the cumulative value by the third average as the motion intensity of the target region.
[0008] Preferably, the step of calculating the steady-state correlation between the target image and the image to be aligned includes: calculating the cross-correlation value between the target image and the image to be aligned in the sub-images of the target region, and calculating the first product of the motion intensity of the target region and the cross-correlation value after normalization, traversing to obtain the first product of each sub-region, and using the sum of all the first products as the steady-state correlation between the target image and the image to be aligned.
[0009] Preferably, the step of obtaining the effective frame interval of the target image based on the steady-state correlation degree and obtaining the matching point of any grayscale image within the effective frame interval includes: constructing a continuous image set, the continuous image set including the target image and several grayscale images that can form a continuous frame with the target image; obtaining the steady-state correlation degree between the target image and any grayscale image other than the target image in the continuous image set; calculating the fifth mean of all steady-state correlation degrees; traversing to obtain continuous image sets of different lengths, and taking the time interval of the continuous image set corresponding to the maximum value of the fifth mean as the effective frame interval of the target image; and calculating the neighborhood range centered on the target point. The standard deviation of gray values and the standard deviation of gradient magnitude of all pixels are calculated, and the second product of the standard deviation of gray values and the standard deviation of gradient magnitude is calculated. The second product of different size neighborhood ranges is obtained by traversing the neighborhood ranges. The neighborhood range corresponding to the maximum value of the second product is used as the localization scale of the target point. Any pixel in the image to be aligned is used as the comparison point. The first pixel matrix of the target point within the localization scale is obtained. Similarly, the second pixel matrix of the comparison point within the localization scale is obtained. The Manhattan distance between the first pixel matrix and the second pixel matrix is calculated. The comparison point corresponding to the minimum value of the Manhattan distance is used as the matching point of the target point.
[0010] Preferably, the calculation of the correction score of the image to be aligned includes: taking the ratio of the steady-state correlation between the target image and the image to be aligned to the fifth mean as the first ratio; taking a preset number of matching points in the target region of the image to be aligned as key points; obtaining the pixel matrix of any key point; calculating the reciprocal of the intersection-union ratio (IUR) of the pixels between any two key points; taking the mean of all IURs as the sixth mean; calculating the third product of the sixth mean and the motion intensity of the target region; traversing to obtain the third product of each sub-region in the image to be aligned; and obtaining the third multiplication cumulative sum; taking the sum of the first ratio and the third multiplication cumulative sum as the correction score of the image to be aligned.
[0011] Preferably, the calculation of the scaffold tilt degree based on the correction score of the corrected image includes: calculating the mean of the correction score of each image to be aligned in the corrected image as the seventh mean; using the Sobel operator to perform edge extraction on the corrected image to obtain the image edge of the corrected image, the image edge including a wall edge and several scaffold edges; using Hough transform to obtain the straight line segments of the image edge, calculating the absolute angle difference between the straight line segment of the wall edge and the straight line segment of any scaffold edge, traversing to obtain the absolute angle difference between the straight line segment of the wall edge and the straight line segment of each scaffold edge, calculating the eighth mean of all absolute angle differences; calculating the fourth product of the seventh mean and the eighth mean; traversing to obtain the fourth product of each corrected image, and accumulating the value of all fourth products as the tilt degree of the scaffold.
[0012] Secondly, the present invention also provides an artificial intelligence-based drone intelligent inspection system, comprising: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned artificial intelligence-based drone intelligent inspection method is implemented.
[0013] The present invention has the following effects: This invention, by quantifying the fluctuations in pixel differences across frames and the stability of texture structure, can accurately distinguish between texture changes caused by actual object motion and blurring distortion caused by flight jitter. This effectively solves the problem of misclassifying continuously jittery frames as normal motion images without alignment correction, significantly improving the accuracy of image stabilization. Secondly, in the feature matching stage, this invention proposes an adaptive positioning scale based on maximizing the product of grayscale value and the standard deviation of gradient magnitude. This dynamically adjusts the matching range according to the feature richness of different regions, avoiding inaccurate keypoint positioning and loss of high-frequency details in feature-similar areas or low-texture areas, ensuring the clarity of image fusion.
[0014] This invention introduces a correction score to weight image fusion, ensuring the dominance of high-resolution, low-jitter frames in the final imaging and suppressing noise interference. It achieves closed-loop control throughout the entire process, from image acquisition, motion quantization, alignment and fusion to tilt risk assessment, and can trigger multi-level early warning mechanisms in real time. This ensures both immediate response to potential risks and continuity of inspection operations, providing reliable technical support for dynamic monitoring of scaffolding structural safety at construction sites and possessing extremely high practical value. Attached Figure Description
[0015] Figure 1 This is a flowchart of an artificial intelligence-based intelligent inspection method for drones according to an embodiment of the present invention. Detailed Implementation
[0016] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0017] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0018] Reference Figure 1 The AI-based drone intelligent inspection method includes steps S1-S4, as detailed below: S1: Obtain grayscale images of consecutive frames of the scaffolding, segment any grayscale image to obtain several sub-regions, take any sub-region as the target region, take any frame interval as the target interval, and calculate the dynamic score of the target region in the target interval.
[0019] In one embodiment, a video sequence of scaffolding is captured by a drone, and multiple original images of consecutive frames are extracted from the video frame by frame. These images are then converted to grayscale to obtain grayscale images of the consecutive frames of the scaffolding. At the same time, a grayscale image of the wall is obtained through an inspection system as a reference. Subsequently, any grayscale image is segmented to obtain several sub-regions, and any sub-region is used as the target region.
[0020] After acquiring grayscale images of consecutive frames of the scaffolding, the process begins by extracting sub-images corresponding to the target region in all consecutive frames for any segmented target region in the grayscale image, thus constructing a sub-image set for the target region. Then, any frame interval is set as the target interval, with the length of the target interval constrained to no more than half the total number of grayscale images. This ensures that a sufficient number of pairs of sub-images satisfying the target interval can be selected from the sub-image set. Next, the negative exponent value of the cross-correlation between each pair of sub-images is calculated. The negative exponent value reflects the degree of difference between the sub-images. Finally, the mean of all negative exponent values in the sub-image set of the target region is used as the dynamic score of the target region within the target interval. This quantifies the cross-frame dynamic degree of the sub-region under different frame intervals, providing basic data for subsequent motion intensity analysis. It should be noted that the negative exponent value is calculated using... The function obtains the negative correlation mapping between the cross-correlation values of each pair of sub-images.
[0021] S2: Calculate the overall texture steady-state score of the target interval, and calculate the motion intensity of the target region based on the dynamic score and the overall texture steady-state score.
[0022] In one embodiment, sub-images of any grayscale image within the target region are acquired to construct a set of sub-images for the target region. The Sobel operator is then used to extract edges from any sub-image in the set, resulting in an edge set containing several edge sequences composed of pixels. Any two sub-images satisfying the target interval are selected from the sub-image set as the first and second images, respectively. A bidirectional maximum similarity matching strategy is used to calculate their texture steady-state scores.
[0023] Specifically, taking any edge sequence in the edge set of the first image as the first sequence, calculate the first cosine similarity between each edge sequence in the edge set of the second image and the first sequence, and obtain the maximum value of the first cosine similarity. Iterate through the edge set of the first image to obtain the maximum value of the first cosine similarity of each edge sequence in the first image, and take the average of all the maximum values of the first cosine similarity as the first mean. Taking any edge sequence in the edge set of the second image as the second sequence, calculate the second cosine similarity between each edge sequence in the edge set of the first image and the second sequence, and obtain the maximum value of the second cosine similarity. Iterate through the edge set of the second image to obtain the maximum value of the second cosine similarity of each edge sequence in the edge set of the second image, and take the average of all the maximum values of the second cosine similarity as the second mean. The sum of the first mean and the second mean is taken as the texture steady-state score of the first image and the second image.
[0024] The texture steady-state scores of any two sub-images that satisfy the target interval are obtained by traversing the set of sub-images of the target region. The average of all texture steady-state scores is taken as the comprehensive texture steady-state score of the target interval, thereby quantitatively evaluating the stability of the texture structure of the target region under the target interval.
[0025] For example, if there are 100 consecutive grayscale images, then the length of the target interval cannot exceed 50. When the target interval length is 20, any combination of two sub-images that satisfy the target interval includes the first frame and the twenty-first frame, the second frame and the twenty-second frame, ..., the eightieth frame and the one hundredth frame.
[0026] It should be noted that in the scenario of intelligent inspection by drones at construction sites, the flight process is easily affected by multiple environmental factors such as construction dust, strong winds, rain and fog, resulting in shaky and blurry images of scaffolding captured by drones. Existing technologies usually only analyze the motion state of objects in a local area to identify shaky frames by analyzing the pixel differences and gradient differences between adjacent frames, ignoring the false similarity between adjacent frames caused by the blurring effect of continuous shaky frames. This can easily lead to the misjudgment of actual shaky frames as normal moving images without alignment correction, resulting in inaccurate identification of the scaffolding tilt and potentially causing construction safety accidents.
[0027] This invention calculates the negative exponential mean of the cross-correlation values between sub-image pairs satisfying the specified interval in the target region's sub-image set as a dynamic score to characterize the degree of pixel difference across frames. Simultaneously, it uses the Sobel operator to extract edge sequences and calculates the texture steady-state score between any two sub-images satisfying the target interval using a bidirectional maximum cosine similarity matching strategy. Furthermore, it calculates the mean of the texture steady-state scores across all frame intervals as a comprehensive texture steady-state score to quantify the stability of the texture structure. Finally, it multiplies the cumulative fluctuation of the comprehensive texture steady-state score relative to the global mean with the mean of the dynamic score to obtain the motion intensity of the target region, thereby effectively distinguishing texture changes caused by actual object motion from blurring distortion caused by flight jitter.
[0028] Specifically, to accurately quantify the actual motion intensity of the target area during UAV inspection, the dynamic score of the target area is first obtained by traversing all frame intervals, and the mean of all dynamic scores is calculated as the third mean to characterize the overall pixel difference level. Secondly, the comprehensive texture steady-state score for each frame interval is obtained by traversing, and the mean of all comprehensive texture steady-state scores is calculated as the fourth mean to establish a baseline for texture stability. Next, for each frame interval, the absolute difference between the comprehensive texture steady-state score and the fourth mean is calculated. After obtaining the absolute differences for all frame intervals, their cumulative value is calculated to measure the fluctuation range of texture stability. Finally, the product of the cumulative value and the third mean is used as the motion intensity of the target area, thereby integrating cross-frame pixel differences and texture structure fluctuation characteristics to comprehensively characterize the actual motion or jitter level of the sub-region.
[0029] The formula for motion intensity is constructed as follows: The dynamic score is based on the negative exponential mean of the cross-correlation values between sub-images at different target intervals, quantifying the degree of pixel difference across frames in a grayscale image. A larger dynamic score indicates a more significant pixel difference in the sub-region, suggesting the presence of frequent motion states. However, relying solely on pixel differences is susceptible to image blurring caused by drone flight jitter. This is because consecutive jittery frames often exhibit false similarity between adjacent frames due to the blurring effect, causing the actual motion of the object to be misjudged as normal jitter and not corrected. Therefore, this invention introduces a texture steady-state score, which extracts edge sequences using the Sobel operator and calculates bidirectional cosine similarity. The maximum mean score is used to measure the stability of the texture structure in a sub-region. A higher texture steady-state score indicates a more significant difference in texture structure changes at different intervals, and a greater probability that the region represents real object motion rather than flight jitter. This makes it a key weighting factor in image alignment correction. Furthermore, by traversing multiple target intervals of different lengths instead of relying solely on adjacent frames, the problem of missing slow changes in pixel differences between adjacent images due to local motion is effectively avoided. Finally, the motion intensity is calculated by combining the fluctuation characteristics of the dynamic score and the texture steady-state score, which can accurately distinguish between flight jitter and real object motion, ensuring the accuracy of scaffolding image alignment correction.
[0030] S3: Take any grayscale image as the target image, any pixel in the target image as the target point, and any grayscale image other than the target image as the image to be aligned. Calculate the steady-state correlation between the target image and the image to be aligned based on motion intensity. Obtain the effective frame interval of the target image based on the steady-state correlation and obtain the matching point of any grayscale image within the effective frame interval. Calculate the correction score of the image to be aligned based on a preset number of matching points. Perform image alignment and fusion on the image to be aligned based on the correction score to obtain the corrected image.
[0031] In one embodiment, the cross-correlation value between the target image and the image to be aligned in the sub-images of the target region is calculated, and the first product of the normalized motion intensity of the target region and the cross-correlation value is calculated. The first product of each sub-region is obtained by traversing the region, and the accumulated value of all the first products is used as the steady-state correlation degree between the target image and the image to be aligned. The calculation of cross-correlation is a well-known technique to those skilled in the art and will not be described in detail here.
[0032] Construct a continuous image set, which includes the target image and several grayscale images that can form a continuous frame with the target image. Obtain the steady-state correlation degree between the target image and any grayscale image other than the target image in the continuous image set, and calculate the fifth mean of all steady-state correlation degrees. Traverse to obtain continuous image sets of different lengths, and take the time interval of the continuous image set corresponding to the maximum value of the fifth mean as the effective frame interval of the target image.
[0033] Calculate the standard deviation of gray values and the standard deviation of gradient magnitude for all pixels within the neighborhood of the target point, and calculate the second product of the standard deviation of gray values and the standard deviation of gradient magnitude. Iterate through the neighborhoods of different sizes to obtain the second product, and use the neighborhood corresponding to the maximum value of the second product as the localization scale of the target point.
[0034] Take any pixel in the image to be aligned as the comparison point, obtain the first pixel matrix of the target point within the positioning scale, and similarly obtain the second pixel matrix of the comparison point within the positioning scale. Calculate the Manhattan distance between the first pixel matrix and the second pixel matrix, and take the comparison point corresponding to the minimum value of the Manhattan distance as the matching point of the target point.
[0035] In calculating the correction score of the image to be aligned, a predetermined number of matching points are selected as keypoints from the effective frame interval. For example, the top 30% of matching points with the smallest Manhattan distance in the target region are selected as keypoints in the target region. This aims to construct a feature benchmark with high confidence and uniform spatial distribution. Selecting the minimum Manhattan distance ensures the high similarity of the keypoint pixel matrix, effectively eliminating mismatch noise to improve the reliability of alignment accuracy evaluation. The constraint of the predetermined number forces the keypoints to cover each sub-region after the target image is segmented, preventing feature points from being over-concentrated in local high-texture areas, which would lead to the loss of information in other regions.
[0036] Given that the calculation logic of the correction score requires traversing each sub-region and multiplying the inverse mean of the intersection-union ratio of key points with the motion intensity of the corresponding sub-region before summing them, if a sub-region lacks key points, the motion weight of that region will not be included in the total score, thereby weakening the ability of the correction score to represent local jitter differences. Therefore, this screening strategy not only ensures the quality of alignment features, but also ensures that the motion intensity of each sub-region can participate in the weighted calculation, and finally obtains a comprehensive correction score that can fully reflect the overall alignment quality and local motion stability of the image.
[0037] The first ratio is the ratio of the steady-state correlation between the target image and the image to be aligned to the fifth mean. A preset number of matching points in the target region of the image to be aligned are taken as key points. The pixel matrix of any key point is obtained, and the inverse of the intersection-union ratio (IUR) of the pixels between any two key points is calculated. The mean of all IURs is taken as the sixth mean. The third product of the sixth mean and the motion intensity of the target region is calculated. The third product of each sub-region in the image to be aligned is obtained by traversing the region to obtain the third product. The third product is accumulated and summed. The sum of the first ratio and the third product is taken as the correction score of the image to be aligned.
[0038] To generate a high-quality corrected image that eliminates jitter interference, the correction score of each image to be aligned within the effective frame range of the target image is first normalized and transformed into a relative fusion weight characterizing the alignment quality and motion stability of each frame, ensuring that high-reliability frames dominate the fusion process. Then, based on the key points selected within the effective frame range and their corresponding matching point coordinates in the image to be aligned, a bilinear interpolation algorithm is used to perform geometric transformations on the image to be aligned to achieve pixel-level precise spatial alignment, correcting geometric distortions caused by flight jitter. Finally, the aligned pixels of each frame are weighted and fused based on the normalized fusion weights. By highlighting the detail contribution of high-correction-score frames and suppressing noise interference from low-quality frames, a target image corrected image is synthesized that eliminates jitter blur while preserving high-frequency structural details, providing a clear and reliable image foundation for the subsequent accurate calculation of scaffold tilt.
[0039] S4: Calculate the tilt of the scaffolding based on the correction score of the corrected image, obtain the judgment result of the scaffolding based on the tilt, and conduct inspection of the scaffolding according to the judgment result.
[0040] In one embodiment, the mean of the correction scores of each image to be aligned in the corrected image is calculated as the seventh mean.
[0041] The Sobel operator is used to extract the image edges of the corrected image, which include a wall edge and several scaffold edges. The Hough transform is used to obtain the line segments of the image edges. The absolute angle difference between the line segment of the wall edge and the line segment of any scaffold edge is calculated. The absolute angle difference between the line segment of the wall edge and the line segment of each scaffold edge is obtained by iterating through the images. The eighth mean of all absolute angle differences is calculated.
[0042] Calculate the fourth product of the seventh mean and the eighth mean.
[0043] Iterate through each corrected image to obtain the fourth product, and sum the values of all fourth products as the degree of scaffold tilt.
[0044] After completing image acquisition, motion intensity quantification, effective frame interval filtering, key point matching, and image alignment and fusion, the system accurately calculates the tilt of the target scaffold based on the cumulative sum of the average correction score of the corrected image and the average absolute angle difference between the straight segments of the wall edge and the scaffold edge. This tilt is then fed back to the inspection system in real time and dynamically compared with a preset safety threshold (0.15 for example). When the tilt exceeds this threshold, the system immediately triggers a multi-level early warning mechanism, notifying on-site management personnel for risk intervention through audible and visual alarms, remote push notifications, and work order generation. After the warning is triggered, the drone does not terminate its mission but continues to collect and intelligently analyze subsequent frames of other areas of the scaffold or the same area according to the preset inspection path. This ensures both immediate response to potential risks and the continuity and full coverage of the inspection operation, effectively supporting dynamic monitoring and accurate early warning of scaffold structural safety at the construction site.
[0045] The AI-based drone intelligent inspection system includes a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement the AI-based drone intelligent inspection method according to the first aspect of the present invention.
[0046] The AI-based drone intelligent inspection system also includes other components well-known to those skilled in the art, such as communication buses and communication interfaces. Their settings and functions are known in the art and will not be described in detail here.
[0047] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
Claims
1. An AI-based intelligent inspection method for unmanned aerial vehicles (UAVs), characterized in that, include: Acquire grayscale images of consecutive frames of scaffolding, segment any grayscale image to obtain several sub-regions, take any sub-region as the target region, take any frame interval as the target interval, and calculate the dynamic score of the target region in the target interval. Calculate the overall texture steady-state score of the target interval, and calculate the motion intensity of the target region based on the dynamic score and the overall texture steady-state score; Using any grayscale image as the target image, any pixel in the target image as the target point, and any grayscale image other than the target image as the image to be aligned, the steady-state correlation between the target image and the image to be aligned is calculated based on motion intensity. The effective frame range of the target image is obtained based on the steady-state correlation, and the matching point of any grayscale image within the effective frame range is obtained. The correction score of the image to be aligned is calculated based on a preset number of matching points. The image to be aligned is then aligned and fused based on the correction score to obtain the corrected image. The degree of inclination of the scaffold is calculated based on the correction score of the corrected image, the judgment result of the scaffold is obtained based on the degree of inclination, and the scaffold is inspected according to the judgment result.
2. The AI-based intelligent inspection method for unmanned aerial vehicles according to claim 1, characterized in that, The calculation of the dynamic score of the target region within the target interval includes: Obtain sub-images of any grayscale image within the target region, and construct a set of sub-images of the target region; Calculate the negative exponent value of the cross-correlation between any two sub-images in the sub-image set that satisfy the target interval, and take the mean of all negative exponent values in the sub-image set of the target region as the dynamic score of the target region in the target interval, wherein the length of the target interval is no greater than half of the number of grayscale images.
3. The AI-based intelligent inspection method for unmanned aerial vehicles according to claim 1, characterized in that, The comprehensive texture steady-state score for calculating the target interval includes: Obtain sub-images of any grayscale image within the target region, and construct a set of sub-images of the target region; The Sobel operator is used to extract edges from any sub-image in the set of sub-images of the target region, and the edge set corresponding to any sub-image is obtained. An edge set contains several edge sequences composed of pixels in the corresponding sub-image. Take any two sub-images in the sub-image set of the target region that satisfy the target interval as the first image and the second image. Take any edge sequence in the edge set of the first image as the first sequence. Calculate the first cosine similarity between each edge sequence in the edge set of the second image and the first sequence, and obtain the maximum value of the first cosine similarity. Iterate through each edge sequence in the edge set of the first image and obtain the maximum value of the first cosine similarity of the first sequence. Take the mean of all the maximum values of the first cosine similarity as the first mean. Take any edge sequence in the edge set of the second image as the second sequence, calculate the second cosine similarity between each edge sequence in the edge set of the first image and the second sequence, and obtain the maximum value of the second cosine similarity. Iterate through each edge sequence in the edge set of the second image to obtain the maximum value of the second cosine similarity of the second sequence, and take the mean of all the maximum values of the second cosine similarity as the second mean. The sum of the first mean and the second mean is used as the texture steady-state score of the first image and the second image. The texture steady-state scores of any two sub-images that satisfy the target interval are obtained by traversing the sub-image set of the target region. The mean of all texture steady-state scores is used as the comprehensive texture steady-state score of the target interval.
4. The AI-based intelligent inspection method for unmanned aerial vehicles according to claim 1, characterized in that, The motion intensity of the target region is calculated as follows: The dynamic scores of the target region across all frame intervals are obtained by traversing the region, and the average of all dynamic scores is calculated as the third average. The overall texture steady-state score for each frame interval is obtained by iterating through the data, and the mean of all overall texture steady-state scores is calculated as the fourth mean. Calculate the absolute difference between the overall texture steady-state score of the target interval and the fourth mean. Iterate through each frame interval to obtain the absolute difference. Calculate the cumulative value of all absolute differences. Multiply the cumulative value by the third mean as the motion intensity of the target region.
5. The AI-based intelligent inspection method for unmanned aerial vehicles according to claim 1, characterized in that, The calculation of the steady-state correlation between the target image and the image to be aligned includes: Calculate the cross-correlation value between the target image and the image to be aligned in the sub-images of the target region, and calculate the first product of the motion intensity of the target region and the cross-correlation value after normalization. Iterate through each sub-region to obtain the first product, and use the sum of all the first products as the steady-state correlation between the target image and the image to be aligned.
6. The AI-based intelligent inspection method for unmanned aerial vehicles according to claim 1, characterized in that, The step of obtaining the effective frame range of the target image based on the steady-state correlation, and obtaining the matching point of any grayscale image within the effective frame range, includes: Construct a continuous atlas, which includes the target image and several grayscale images that can form a continuous frame with the target image. Obtain the steady-state correlation between the target image and any grayscale image other than the target image in the continuous atlas, and calculate the fifth mean of all steady-state correlations. Traverse to obtain continuous image sets of different lengths, and take the time interval of the continuous image set corresponding to the maximum value of the fifth mean as the effective frame interval of the target image; Calculate the standard deviation of gray values and the standard deviation of gradient magnitude for all pixels within the neighborhood of the target point, and calculate the second product of the standard deviation of gray values and the standard deviation of gradient magnitude. Iterate through the neighborhoods of different sizes to obtain the second product, and use the neighborhood corresponding to the maximum value of the second product as the localization scale of the target point. Take any pixel in the image to be aligned as the comparison point, obtain the first pixel matrix of the target point within the positioning scale, and similarly obtain the second pixel matrix of the comparison point within the positioning scale. Calculate the Manhattan distance between the first pixel matrix and the second pixel matrix, and take the comparison point corresponding to the minimum value of the Manhattan distance as the matching point of the target point.
7. The AI-based intelligent inspection method for unmanned aerial vehicles according to claim 6, characterized in that, The calculation of the correction score for the image to be aligned includes: The ratio of the steady-state correlation between the target image and the image to be aligned to the fifth mean is used as the first ratio. Use a preset number of matching points in the target area of the image to be aligned as key points; obtain the pixel matrix of any key point, calculate the reciprocal of the intersection-union ratio of the pixels between any two key points, and take the average of all the reciprocals of the intersection-union ratio as the sixth mean; Calculate the third product of the sixth mean and the motion intensity of the target region, iterate through each sub-region in the image to be aligned to obtain the third product, and obtain the cumulative sum of the third products; The sum of the first ratio and the third multiplication cumulative value is used as the correction score of the image to be aligned.
8. The AI-based intelligent inspection method for unmanned aerial vehicles according to claim 1, characterized in that, The calculation of the scaffold tilt degree based on the correction score of the corrected image includes: The mean of the correction scores of each image to be aligned in the corrected image is calculated as the seventh mean; The Sobel operator is used to extract the image edges of the corrected image. The image edges include a wall edge and several scaffold edges. The Hough transform is used to obtain the line segments of the image edges. The absolute angle difference between the line segment of the wall edge and the line segment of any scaffold edge is calculated. The absolute angle difference between the line segment of the wall edge and the line segment of each scaffold edge is obtained by traversing the line segments. The eighth mean of all absolute angle differences is calculated. Calculate the fourth product of the seventh mean and the eighth mean; Iterate through each corrected image to obtain the fourth product, and sum the values of all fourth products as the degree of scaffold tilt.
9. An AI-based unmanned aerial vehicle (UAV) intelligent inspection system, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions that, when executed by the processor, implement the AI-based intelligent inspection method for unmanned aerial vehicles according to any one of claims 1-8.