A method for accurately locating boundary features of UAV inspection images
By preprocessing the drone inspection images and pixel gradient processing, the image boundaries are quickly and accurately identified, and the problems of high costs and high resource requirements in the existing technology are solved. It is suitable for daily high-frequency power grid inspection and maintenance operations.
Patent Information
- Application Number
- CN202210655067.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-10
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2042-06-10
AI Technical Summary
In drone inspection, how to effectively obtain the boundaries of the target to be tested from the image is a core task, but the existing technology requires AI training through massive data, which leads to high implementation costs and is not suitable for daily high-frequency power grid inspection and maintenance operations.
Preprocessing is performed by acquiring the original image of the target to be tested, including image scaling, Gaussian filtering and scale normalization, and then using pixel gradient intercept box to calculate the pixel gradient amplitude, and precisely position the image boundaries through hierarchical smoothing processing and boundary generation algorithms.
It realizes fast and accurate identification of image boundaries of drone patrol inspection, reduces data processing volume, reduces the demand for hardware equipment and computing resources, makes the method suitable for mid- and low-end equipment, and improves the data processing efficiency of daily high-frequency patrol operations.
Smart Images

Figure CN114913440B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of drone inspection data application methods, and in particular, relates to a method for accurately locating boundary features of drone inspection images. Background Art
[0002] As a carrier with good applicability and large activity area, drone inspection has been widely used in power grid inspection operations in recent years. It has practical applications in power grid inspection operations, disaster assessment, site surveys and many other aspects. However, drones generally only undertake the task of image acquisition. In actual application, how to effectively obtain the boundaries of the target to be measured from the drone inspection images is the most core task. Due to the large amount of data, the efficiency of manual processing is low. Therefore, various automatic analysis and machine recognition technologies have emerged, but most of them require AI training and learning through massive basic data, and extract feature elements through massive calculation analysis, and achieve this through feature matching and screening. The cost is high, which is not economical and practical for daily inspection and maintenance operations of power grids. Summary of the invention
[0003] The purpose of this application is to provide a method for accurately locating the boundary features of drone inspection images, which is convenient for real-time, has a smaller data processing volume, and is suitable for boundary recognition and processing of daily high-frequency drone inspection images.
[0004] To achieve the above objectives, this application adopts the following technical solutions.
[0005] The method for accurately locating the boundary features of the drone inspection image of the present application includes the following steps:
[0006] Step 1. Steps for obtaining the original image of the target to be tested and performing preprocessing
[0007] Including step 1.1;
[0008] 1.1 Original image acquisition and preliminary processing; specifically, obtaining the drone inspection images to be analyzed, eliminating unclear images, images with blurred transitional image elements, and images with high recognition difficulty;
[0009] Step 2. Filtering the original image based on the image pixel gradient.
[0010] Comprising steps 2.1 to 2.2;
[0011] 2.1 Image pixel gradient calculation; Specifically, it means: according to the pixel size of the original image, a pixel gradient interception frame of a×a pixels is established to limit the amount of calculation; based on the aforementioned gradient frame, the pixel gradient of the original image is intercepted, and the pixel gradient amplitude T of each gradient frame in the orthogonal coordinate system xoy is calculated respectively. x,y ;
[0012]
[0013] where t x (x, y) is the pixel gradient value in the X direction of the gradient box with coordinates (x, y) in the orthogonal coordinate system; t y (x, y) is the pixel gradient value in the y direction of the gradient box with coordinates (x, y) in the orthogonal coordinate system; T(x, y) is the pixel gradient amplitude of the gradient box with coordinates (x, y) in the orthogonal coordinate system; is the pixel value of the gradient box with coordinates (x, y) in the orthogonal coordinate system, i a×a is the sum of the pixel values of all pixels in the gradient box;
[0014] 2.2 Hierarchical smoothing based on image pixel gradient amplitude; specifically: according to the pixel gradient amplitude T x,y Calculate the results, sort the pixel gradient amplitudes of all gradient frames in turn, determine the pixel gradient amplitude interception interval according to the maximum pixel gradient amplitude, and intercept the gradient frames in each pixel gradient amplitude interception interval in descending order for retention.
[0015] Step 3. Generate boundaries based on amplitude interception interval
[0016] Including steps 3.1 to 3.2;
[0017] 3.1 Intermediate amplitude gradient frame screening based on pixel gradient amplitude; specifically, based on the pixel gradient amplitudes of all gradient frames within the amplitude interception interval, the average gradient amplitude of the gradient frame within each amplitude interception interval is determined, and the corresponding gradient frame is located in each amplitude interception area as the central gradient frame;
[0018] 3.2 Boundary positioning based on the central gradient box,
[0019] It includes steps ①~⑤;
[0020] ① Locate all gradient boxes in the image and calculate the horizontal angle α of the gradient box;
[0021]
[0022] ② Based on the central gradient frame, several boundary areas are established, and the horizontal angle of the boundary area is defined as α r is the horizontal angle of the rth gradient frame in the boundary area; wherein the initial boundary area only contains one central gradient frame, and the horizontal angle of the initial boundary area is the horizontal angle of the central gradient frame;
[0023] ③ Locate the gradient box k that is adjacent to the boundary area j and is not the central gradient box, and calculate the horizontal angle α of the gradient box k kThe direction difference of the horizontal angle with the boundary area j According to the actual boundary characteristics of the object to be measured, specify the direction difference threshold Δα max ;
[0024] If Δα j,k ≤Δα max Then the gradient box k is divided into the boundary area j, otherwise it is not processed;
[0025] If the gradient box k has multiple adjacent boundary regions, then the direction difference The smallest is divided;
[0026] ④ After each update of the boundary area, recalculate the horizontal angles of all boundary areas, and repeat step 3) until all the divisible gradient boxes have been divided, and delete the remaining gradient boxes that are not divided into the boundary area;
[0027] ⑤ Arrange all boundary areas, clean up abnormal areas on the edge of the boundary area that are obviously out of the core range of the boundary area, and obtain the final boundary.
[0028] To further supplement and improve the above-mentioned method for accurately locating the boundary features of the drone inspection image, the step 1 also includes step 1.2 for performing noise reduction and scale standardization operations on the image;
[0029] 1.2 Preprocessing of original images; specifically including:
[0030] Image Scaling Anti-aliasing Scaling: Reduce the size of the original image to suppress the aliasing phenomenon in the image;
[0031] Gaussian filtering and smoothing: Use Gaussian function to filter the image, and then perform Gaussian downsampling after processing;
[0032] Image scale unification: Get all images and adjust all rectangular power area images to a uniform pixel height or width while maintaining the original aspect ratio.
[0033] To further supplement and improve the aforementioned method for accurately locating the boundary features of drone inspection images, the orthogonal coordinate system xoy refers to a coordinate system established with the height of the image as the vertical coordinate, the width of the image as the horizontal coordinate, and the lower left corner of the image as the coordinate origin, and each unit size in the coordinate system is a pixel.
[0034] To further supplement and improve the above-mentioned method for accurately locating the boundary features of drone inspection images, the step 2.2 specifically refers to:
[0035] According to the pixel gradient amplitude calculation results of all gradient boxes in the original image, the maximum pixel gradient amplitude T is determined. max , and based on the maximum pixel gradient magnitude T max Determine n amplitude interception intervals:
[0036]
[0037] Fill all gradient frames into the amplitude cutoff interval in sorted order; select gradient frames in each amplitude cutoff interval in the same proportion and in descending order to retain, delete the remaining gradient frames, and update the original image according to the results.
[0038] Its beneficial effects are:
[0039] The method for accurately locating the boundary features of drone inspection images in the present application has a short calculation process and does not require additional external data or historical experience data. It mainly realizes the extraction of internal boundary elements of the image through data fusion processing of the gradient element set in the original image. The method is easy to implement and has low requirements for hardware equipment and computing power resources. It is easy to implement on various mid- and low-end devices, which is beneficial to improving the data processing of daily high-frequency inspection operations at the grassroots level and realizing rapid boundary recognition and processing of large batches of data. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a schematic diagram of the gradient box and the pixel gradient amplitude calculation template. DETAILED DESCRIPTION
[0041] The present application is described in detail below in conjunction with specific embodiments.
[0042] The method for accurately locating boundary features of human-machine inspection images in the present application is mainly used to provide a fast boundary positioning and analysis method that has low requirements for calculation examples and hardware and can be applied to various mid- and low-end and portable or mobile terminals, so that during the inspection operation, real-time analysis and positioning can be used to help operators quickly analyze and obtain boundary element information.
[0043] The main steps include:
[0044] Step 1. A step for obtaining the original image of the target to be measured and performing preprocessing, including steps 1.1 to 1.2;
[0045] 1.3 Original image acquisition and preliminary processing; specifically, obtaining the drone inspection images to be analyzed, eliminating unclear images, images with blurred transitional image elements, and images with poor quality that are too difficult to identify;
[0046] 1.1 Preprocessing of original images:
[0047] Image Scaling Anti-aliasing Scaling: Reduce the size of the original image to suppress the aliasing phenomenon in the image;
[0048] Gaussian filtering and smoothing: Use Gaussian function to filter the image, and then perform Gaussian downsampling after processing;
[0049] Image scale unification: Get all images and adjust all rectangular power area images to a uniform pixel height or width while maintaining the original aspect ratio;
[0050] Since the present application mainly realizes boundary recognition based on the trend and gradient difference of pixels in the boundary elements in the image, the aliasing phenomenon in the image can be reduced through Gaussian filtering and downsampling, making the boundary more complete and easy to identify. By screening out the transitional blurred areas, it is helpful to reduce the images with low recognition efficiency or the inability to perform effective boundary recognition. The screening method can be implemented based on manual screening or existing methods such as average grayscale difference comparison method, and the specific selection is based on the characteristics of the corresponding object to be identified.
[0051] Step 2. The step of filtering the original image based on the image pixel gradient includes 2.1 to 2.2;
[0052] 2.1 Image pixel gradient calculation:
[0053] According to the pixel size of the original image, a pixel gradient interception frame of a×a pixels is established to limit the amount of calculation; based on the aforementioned gradient frame, the pixel gradient of the original image is intercepted, and the pixel gradient amplitude T of each gradient frame in the orthogonal coordinate system xoy is calculated respectively x,y ;
[0054] The gradient interception frame is established to simplify the operation according to the size of the original image and the average size of the object to be identified in the image, avoid the identification of unnecessary detail boundaries, reduce unnecessary calculations, and simplify the implementation process.
[0055]
[0056] where t x (x, y) is the pixel gradient value in the X direction of the gradient box with coordinates (x, y) in the orthogonal coordinate system; t y (x, y) is the pixel gradient value in the y direction of the gradient box with coordinates (x, y) in the orthogonal coordinate system; T(x, y) is the pixel gradient amplitude of the gradient box with coordinates (x, y) in the orthogonal coordinate system; is the pixel value of the gradient box with coordinates (x, y) in the orthogonal coordinate system, i a×a is the sum of the pixel values of all pixels in the gradient box;
[0057] In actual implementation, in order to facilitate processing and calculation, the established orthogonal coordinate system xoy generally takes the height of the image as the vertical coordinate, the width of the image as the horizontal coordinate, and the lower left corner of the image as the coordinate origin. Because the length and width of the gradient box are a pixels in size, when calibrating the pixel box coordinates, each unit size is a pixels.
[0058] The establishment of a gradient frame can effectively compress the data volume, provide a flexible feature screening solution, and avoid unnecessary workload of processing small boundaries.
[0059] 2.2 Hierarchical smoothing based on image pixel gradient amplitude
[0060] According to the pixel gradient amplitude T x,y Calculate the results, sort the pixel gradient amplitudes of all gradient frames in turn, determine the pixel gradient amplitude interception interval according to the maximum pixel gradient amplitude, and intercept the gradient frames in each pixel gradient amplitude interception interval in descending order for retention.
[0061] In specific implementation, the pixel gradient amplitude calculation results of all gradient frames in the original image are sorted to determine the maximum pixel gradient amplitude T max , and based on the maximum pixel gradient magnitude T max Determine n amplitude interception intervals:
[0062]
[0063] Fill all gradient frames into the amplitude interception interval in the sorted order; select the gradient frames in each amplitude interception interval in the same proportion and in the order from high to low to keep, delete the remaining gradient frames, and update the original image according to the result;
[0064] Step 3. Generate boundaries based on amplitude interception interval
[0065] 3.1 Intermediate Amplitude Gradient Box Screening Based on Pixel Gradient Amplitude
[0066] Based on the pixel gradient amplitudes of all gradient frames within the amplitude interception interval, determine the average gradient amplitude of the gradient frame within each amplitude interception interval, and locate the corresponding gradient frame from each amplitude interception area as the central gradient frame;
[0067] 3.2 Boundary positioning based on the central gradient box,
[0068] ①1) Locate all gradient boxes in the image and calculate the horizontal angle α of the gradient box;
[0069]
[0070] ② Based on the central gradient frame, several boundary areas are established, and the horizontal angle of the boundary area is defined as α r is the horizontal angle of the rth gradient frame in the boundary area; wherein the initial boundary area only contains one central gradient frame, and the horizontal angle of the initial boundary area is the horizontal angle of the central gradient frame;
[0071] ③ Locate the gradient box k that is adjacent to the boundary area j and is not the central gradient box, and calculate the horizontal angle α of the gradient box k k The direction difference of the horizontal angle with the boundary area j Specify the direction difference threshold Δα max ;
[0072] If Δα j,k ≤Δα max Then the gradient box k is divided into the boundary area j, otherwise it is not processed;
[0073] If the gradient box k has multiple adjacent boundary regions, then the direction difference The smallest is divided;
[0074] ④ After each update of the boundary area, recalculate the horizontal angles of all boundary areas, and repeat step 3) until all the divisible gradient boxes have been divided, and delete the remaining gradient boxes that are not divided into the boundary area;
[0075] ⑤ Arrange all boundary areas, clean up abnormal areas on the edge of the boundary area that are obviously out of the core range of the boundary area, and obtain the final boundary.
[0076] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application, rather than to limit the scope of protection of the present application. Although the present application has been described in detail with reference to the preferred embodiments, ordinary technicians in this field should understand that the technical solution of the present application can be modified or replaced by equivalents without departing from the essence and scope of the technical solution of the present application.
Claims
1. A method for accurately locating boundary features of drone inspection images, characterized in that: The steps include: Step 1. The steps for obtaining the original image of the target to be measured and preprocessing include step 1.1; 1.1 Original image acquisition and preliminary processing; specifically, obtaining the drone inspection images to be analyzed, eliminating unclear images, images with blurred transitional image elements, and images with high recognition difficulty; Step 2. The step of filtering the original image based on the image pixel gradient. Comprising steps 2.1 to 2.2; 2.1 Image pixel gradient calculation; Specifically, it means: according to the pixel size of the original image, a pixel gradient interception frame of a×a pixel size is established to limit the amount of calculation; based on the gradient frame of a×a pixel size, the pixel gradient of the original image is intercepted, and the pixel gradient amplitude T of each gradient frame in the orthogonal coordinate system xoy is calculated respectively. x,y ; where t x (x, y) is the pixel gradient value in the X direction of the gradient box with coordinates (x, y) in the orthogonal coordinate system; t y (x, y) is the pixel gradient value in the y direction of the gradient box with coordinates (x, y) in the orthogonal coordinate system; T(x, y) is the pixel gradient amplitude of the gradient box with coordinates (x, y) in the orthogonal coordinate system; is the pixel value of the gradient box with coordinates (x, y) in the orthogonal coordinate system, i a×a is the sum of the pixel values of all pixels in the gradient box; 2.2 Hierarchical smoothing based on image pixel gradient amplitude; specifically, according to the pixel gradient amplitude T x,y Calculate the results, sort the pixel gradient amplitudes of all gradient frames in turn, determine the pixel gradient amplitude interception interval according to the maximum pixel gradient amplitude, and intercept the gradient frames in each pixel gradient amplitude interception interval in descending order for retention. Step 3. Boundary generation based on amplitude interception interval Including steps 3.1 to 3.2; 3.1 Intermediate amplitude gradient frame screening based on pixel gradient amplitude; specifically, based on the pixel gradient amplitudes of all gradient frames within the amplitude interception interval, the average gradient amplitude of the gradient frame within each amplitude interception interval is determined, and the corresponding gradient frame is located in each amplitude interception area as the central gradient frame; 3.2 Boundary positioning based on the central gradient box, It includes steps ①~⑤; ① Locate all gradient boxes in the image and calculate the horizontal angle α of the gradient box; ② Based on the central gradient frame, several boundary areas are established, and the horizontal angle of the boundary area is defined as α r is the horizontal angle of the rth gradient frame in the boundary area; wherein the initial boundary area only contains one central gradient frame, and the horizontal angle of the initial boundary area is the horizontal angle of the central gradient frame; ③ Locate the gradient box k that is adjacent to the boundary area j and is not the central gradient box, and calculate the horizontal angle α of the gradient box k k The direction difference of the horizontal angle with the boundary area j According to the actual boundary characteristics of the object to be measured, specify the direction difference threshold Δα max ; If Δα j,k ≤Δα max Then the gradient box k is divided into the boundary area j, otherwise it is not processed; If the gradient box k has multiple adjacent boundary regions, then the direction difference The smallest is divided; ④ After each update of the boundary area, recalculate the horizontal angles of all boundary areas, and repeat step 3 until all the divisible gradient boxes have been divided, and delete the remaining gradient boxes that are not divided into the boundary area; ⑤ Arrange all boundary areas, clean up abnormal areas on the edge of the boundary area that are obviously out of the core range of the boundary area, and obtain the final boundary.
2. The method for accurately locating boundary features of an unmanned aerial vehicle inspection image according to claim 1 is characterized in that: The step 1 also includes step 1.2 for performing noise reduction and scale standardization operations on the image; 1.2 Preprocessing of original images; specifically including: Image Scaling Anti-aliasing Scaling: Reduce the size of the original image to suppress the aliasing phenomenon in the image; Gaussian filtering and smoothing: Use Gaussian function to filter the image, and then perform Gaussian downsampling after processing; Image scale unification: Get all images and adjust all rectangular power area images to a uniform pixel height or width while maintaining the original aspect ratio.
3. The method for accurately locating boundary features of an unmanned aerial vehicle inspection image according to claim 1 is characterized in that: The orthogonal coordinate system xoy refers to a coordinate system established with the height of the image as the ordinate, the width of the image as the abscissa, and the lower left corner of the image as the coordinate origin, and each unit size in the coordinate system is a pixel.
4. The method for accurately locating boundary features of an unmanned aerial vehicle inspection image according to claim 1 is characterized in that: The step 2.2 specifically refers to: According to the pixel gradient amplitude calculation results of all gradient boxes in the original image, the maximum pixel gradient amplitude T is determined. max , and based on the maximum pixel gradient magnitude T max Determine n amplitude interception intervals: Fill all gradient frames into the amplitude cutoff interval in sorted order; select gradient frames in each amplitude cutoff interval in the same proportion and in descending order to retain, delete the remaining gradient frames, and update the original image according to the results.
Citation Information
Patent Citations
Quick eye locating method based on integral projection and edge detection
CN103218605A
Abnormity identification method and system based on color gradient weight for cabinet equipment of transformer substation
CN111563556A