A foreign body detection method and system for overhead transmission lines based on image processing

Through image processing technology, pixels are screened in blocks and the image block size is adjusted, which solves the problem of low efficiency of foreign object detection in overhead transmission lines and achieves the effectiveness of image compression and real-time detection.

CN118400543BActive Publication Date: 2024-09-13HUBEI CENT CHINA TECH DEV OF ELECTRIC POWER
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202410824845.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-09-13
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

The detection efficiency of foreign objects on overhead transmission lines is low, and existing technology cannot achieve real-time detection, mainly due to the long image transmission time, which makes it unable to meet practical needs.

Method used

Using an image processing-based method, by dividing each channel image into blocks, filtering pixels and calculating the predicted loss ratio and loss difference, adjusting the image block size and filtering the number of pixels, image compression is performed to reduce transmission time and ensure that the compression loss is small. range to prevent regional under- or over-compression.

Benefits of technology

The data volume of image compression is achieved to meet the demand, while the compression loss is controlled within a small range, which improves the image compression effect and ensures the real-time and accuracy of foreign object detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118400543B
    Figure CN118400543B
Patent Text Reader

Abstract

The present invention relates to the field of image transmission technology, and in particular to a method and system for detecting foreign objects in overhead power transmission lines based on image processing. The method comprises the steps of: acquiring a first image block, screening a first number of pixels in the first image block, calculating an overall predicted loss ratio and a pixel predicted loss ratio; in response to the overall predicted loss ratio being greater than a preset loss ratio threshold, calculating the predicted regional loss difference; in response to the predicted regional loss difference being greater than a preset difference threshold, dividing the first image block again, recalculating the overall predicted loss ratio, and in response to the predicted regional loss difference being not greater than a preset difference threshold, adjusting the first number to a second number, and recalculating the overall predicted loss ratio; in response to the overall predicted loss ratio being not greater than a preset loss ratio threshold, vacating and compressing the non-screened pixels in the image block to obtain a compressed data sequence; to achieve foreign object detection. Transmission efficiency is improved by performing data compression.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image transmission, and in particular to a foreign body detection method and system for overhead power transmission lines based on image processing. Background Art

[0002] Foreign objects on overhead transmission lines can easily cause tripping accidents such as single-phase grounding and phase-to-phase short circuit of the ground wire, thus affecting the safe and stable operation of the power grid. Therefore, it is necessary to detect foreign objects on overhead transmission lines in a timely manner and remove them. Foreign object detection requires computer equipment with strong computing power, but overhead transmission lines are at a higher position. It is not realistic to set up computing equipment with strong computing power near overhead transmission lines at a higher position. Therefore, the surface image of the overhead transmission line currently collected by the camera can only be transmitted to a computer device with strong computing power for detection and analysis.

[0003] In order to accurately detect foreign objects on overhead transmission lines, the surface image of the overhead transmission line captured by the camera must clearly show the details of the overhead transmission line. Therefore, the camera can only capture the surface image of the current overhead transmission line captured in a local area of ​​the overhead transmission line at a time. To complete the foreign object detection of the entire overhead transmission line, a large number of surface images of the overhead transmission line need to be collected and transmitted. Due to the large amount of data contained in the image, it takes a lot of transmission time to complete the image transmission, resulting in the foreign object detection efficiency of the overhead transmission line cannot meet the actual needs.

[0004] The existing patent document CN115085087B shows an intelligent monitoring and inspection system for overhead power transmission lines based on the Internet of Things. The patent document only introduces how to detect foreign objects in overhead power transmission lines, but does not introduce the transmission of surface images. Therefore, based on the foreign object detection method in the patent document, it cannot realize real-time detection of foreign objects in overhead power transmission lines. Therefore, in order to save transmission time and realize real-time detection of foreign objects in overhead power transmission lines, it is necessary to compress the surface image of the overhead power transmission line. Summary of the invention

[0005] In order to solve the problem of real-time detection of foreign objects in overhead power transmission lines, the present invention provides a method and system for detecting foreign objects in overhead power transmission lines based on image processing.

[0006] In a first aspect, the present invention provides a method for detecting foreign objects in overhead power transmission lines based on image processing, which adopts the following technical solution:

[0007] A method for detecting foreign objects in an overhead power transmission line based on image processing comprises the following steps:

[0008] Divide each channel image into blocks to obtain a first image block, set the number of filtered pixels to a first number, filter the first number of pixels in the first image block, and calculate the overall prediction loss ratio and the pixel prediction loss ratio, wherein the overall prediction loss ratio and the pixel prediction loss ratio are positively correlated with the pixel value difference between the filtered pixels and the non-filtered pixels, the gradient direction angle, and the gradient value difference;

[0009] In response to the overall prediction loss ratio being greater than a preset loss ratio threshold, calculating a prediction region loss difference, wherein the prediction region loss difference is positively correlated with a first distance difference, wherein the first distance difference is a difference between an interval distance between non-screened pixels in which the pixel prediction loss ratio is in the same value subinterval and a distance between non-screened pixels when the pixels are uniformly distributed throughout the first image block;

[0010] In response to the difference in loss of the predicted region being greater than a preset difference threshold, the first image block is divided again, and the overall prediction loss ratio is recalculated; in response to the difference in loss of the predicted region being not greater than the preset difference threshold, the number of screened pixels is adjusted to a second number, and the overall prediction loss ratio is recalculated;

[0011] In response to the overall predicted loss ratio being no greater than a preset loss ratio threshold, non-filtered pixels in the image block are cleared to obtain a compressed data sequence, which is then transmitted for foreign body detection.

[0012] The effect is that by analyzing image compression based on image blocks of different sizes and different numbers of filtered pixels, it predicts the loss and then selects the optimal image block size and number of filtered pixels, so that the image compression can meet the data compression requirements while controlling the compression loss within a smaller range. At the same time, when compressing the image, the loss uniformity is also analyzed to prevent under-compression in some areas of the image and over-compression in other areas, thereby improving the compression effect of all areas of the image.

[0013] Preferably, the method for obtaining the first quantity includes:

[0014] The first number is equal to the product of the first row screening number and the first column screening number. The first column screening number is positively correlated with the preset benchmark column screening number and negatively correlated with the number of blocks. The first row screening number is positively correlated with the preset benchmark row screening number and negatively correlated with the number of blocks.

[0015] Preferably, the method for obtaining the overall predicted loss ratio includes:

[0016] The ratio of the overall prediction loss amount to the number of pixels in the first image block is used as the overall prediction loss ratio;

[0017] The overall prediction loss is positively correlated with the pixel value difference between the screened pixels and the non-screened pixels, the gradient direction angle, and the gradient value difference.

[0018] Preferably, the overall predicted loss amount satisfies the relationship:

[0019] ;

[0020] Wherein, for a predicted compressed restored image of a first image block under a first number of filtered pixels, represents the pixel value difference between the first image block and the kth non-filtered pixel of the predicted compressed restored image, represents the gradient value difference between the first image block and the kth non-screened pixel of the predicted compressed restored image, represents the gradient value of the kth non-screened pixel of the first image block, represents the gradient direction angle between the first image block and the kth non-screened pixel of the predicted compressed restored image, represents the number of non-filtered pixels in the first image block, Represents the overall prediction loss of the first image block under the first quantity.

[0021] The effect is that by analyzing the difference in pixel values, gradient values, and gradient direction angles before and after image compression, the pixel information and texture information loss before and after image compression can be accurately described. At the same time, the gradient value of each pixel in the image is combined to reflect the impact of each pixel information loss, and then the information loss is supplemented to improve the accuracy of loss calculation.

[0022] Preferably, the pixel prediction loss ratio satisfies the relationship:

[0023] ;

[0024] in, Represents the pixel prediction loss ratio of the kth non-filtered pixel in the first image block under the first quantity.

[0025] Preferably, the method for obtaining the predicted compressed restored image comprises:

[0026] Taking the screened pixel as a marked pixel, in response to the existence of an unmarked pixel, if there is a marked pixel in the horizontal direction or in the vertical direction of an unmarked pixel, based on the pixel value of the marked pixel in the horizontal direction or in the vertical direction of the unmarked pixel, using a linear interpolation method to obtain a linear interpolation value of the unmarked pixel, recorded as a predicted pixel value of the unmarked pixel, taking the screened pixel and the unscreened pixel with the predicted pixel value as the marked pixel, and in response to the absence of the unmarked pixel, obtaining a predicted pixel value of each unscreened pixel;

[0027] An image composed of the pixel values ​​of the filtered pixels and the predicted pixel values ​​of the non-filtered pixels in the first image block is called a predicted compressed restored image.

[0028] The effect is that the pixel values ​​of non-filtered pixels are predicted by linear interpolation, which conforms to the theory that pixel values ​​in a smaller area have a linear relationship. The pixel values ​​estimated in this way can be closer to the actual pixel values, effectively reducing compression losses.

[0029] Preferably, the predicted regional loss difference satisfies the relationship:

[0030] ;

[0031] in, Indicates that the value of the pixel prediction loss ratio is in the distance between the i-th pair of adjacent non-screened pixels in the j-th value subinterval, The logarithm of the adjacent non-screened pixels whose value of the pixel prediction loss ratio is in the jth value subinterval, Indicates the number of non-screened pixels whose value of pixel prediction loss ratio is in the jth value subinterval, represents the number of pixels in the first image block, U represents the number of preset intervals, and the number of value sub-intervals is equal to the number of preset intervals. Represents the prediction region loss difference of the first image block under the first quantity.

[0032] The effect is that by analyzing the difference between the actual distance between non-screened pixels with high value similarity and the distance between non-screened pixels when uniformly distributed, the loss uniformity of different areas in the image block can be accurately described, thereby providing a basis for subsequently ensuring the compression effect of each area in the image.

[0033] Preferably, screening a first number of pixels in the first image block includes:

[0034] The number of rows is the first row screening number, the number of columns is the first column screening number, and the pixels evenly distributed in the entire first image block are recorded as screening pixels under the first number.

[0035] Preferably, the adjusting the number of screened pixels to a second number comprises:

[0036] ;

[0037] ;

[0038] in, represents the number of rows of the first image block, L represents the number of columns of the first image block, Indicates the number of filters in the second row. Indicates the number of filters in the second column. Indicates the number of filters in the first row. Indicates the number of filters in the first column. Indicates the rounding up symbol;

[0039] The product of the second row screening number and the second column screening number of the first image block is used as the second number of the first image block, and the second number is used as the screening pixel number of the first image block.

[0040] The effect is that, through the method for adjusting the number of filtered pixels, the adjustment step of the number of filtered pixels can be ensured to be small, thereby preventing the adjustment step from being too large and failing to obtain the optimal number of filtered pixels. At the same time, the number of filtered pixels obtained through the method for adjusting the number of filtered pixels can ensure that the filtered pixels are relatively evenly distributed in the entire image block, thereby providing a basis for accurately estimating the pixel values ​​of non-filtered pixels.

[0041] In a second aspect, the present invention provides a foreign body detection system for overhead power transmission lines based on image processing, which adopts the following technical solution:

[0042] A foreign body detection system for overhead power transmission lines based on image processing comprises: 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 foreign body detection method for overhead power transmission lines based on image processing is implemented.

[0043] By adopting the above technical solution, the above-mentioned method for detecting foreign objects in overhead transmission lines based on image processing is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a terminal device based on the memory and the processor for easy use.

[0044] The present invention has the following technical effects:

[0045] By analyzing the predicted loss of image compression based on image blocks of different sizes and different numbers of filtered pixels, the optimal image block size and number of filtered pixels are selected, so that image compression can meet the data compression requirements while keeping the compression loss within a smaller range.

[0046] Furthermore, when analyzing the information loss before and after image compression, not only the pixel value loss and texture loss are taken into account, but also the impact of information loss is considered, so as to more accurately describe the information loss before and after image compression.

[0047] Furthermore, when compressing the image, the loss uniformity is also analyzed to prevent under-compression in some areas of the image and over-compression in other areas, thereby improving the compression effect of all areas of the image.

[0048] Furthermore, when analyzing the uniformity of loss in each region during image compression, the difference between the distance when the loss value is uniformly distributed and the actual distance is considered, and a more accurate description is given of the uniformity of loss in each region during image compression. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts.

[0050] Figure 1 is a method flow chart of a method for detecting foreign objects in an overhead power transmission line based on image processing in an embodiment of the present invention;

[0051] Figure 2 A structural block diagram of a compression method provided by an embodiment of the present invention;

[0052] Figure 3 A schematic diagram of distribution characteristics of screening pixels provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0054] It should be understood that when the terms "first", "second", etc. are used in the claims, descriptions, and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections.

[0055] The embodiment of the present invention discloses a method for detecting foreign objects in overhead power transmission lines based on image processing, referring to Figure 1 , comprising steps S1 to S7:

[0056] S1: Acquire a currently acquired surface image of an overhead power transmission line and a historically acquired surface image of an overhead power transmission line.

[0057] Specifically, a camera and an embedded system with relatively low computing power are installed on an aerial photography drone, and the aerial photography drone is made to fly along an overhead power transmission line. The surface image of the overhead power transmission line captured in real time by the camera on the aerial photography drone is recorded as the currently captured surface image of the overhead power transmission line. The surface image of the overhead power transmission line captured historically is obtained from the memory of the foreign object detection server.

[0058] The surface image of the overhead power transmission line currently collected is compressed using the compression method in the embedded system on the aerial photography drone. The specific compression method is shown in steps S2-S7. Figure 2 The structural block diagram of the compression method provided in this embodiment is shown, and the entire compression processing process is introduced below in conjunction with the structural block diagram.

[0059] S2: Divide each channel image of the surface image of the overhead transmission line currently collected into blocks to obtain a first image block, screen a first number of pixels in the first image block, and calculate the overall predicted loss ratio and the pixel predicted loss ratio.

[0060] It should be noted that the pixel values ​​in the local area of ​​the image satisfy a linear relationship, that is, the pixel values ​​of some pixels can be estimated by linear interpolation using the pixel values ​​of the surrounding pixels. Therefore, based on this theory, the pixel values ​​of some pixels can be set to blank to achieve data compression.

[0061] It needs to be further explained that in some areas of the image, there are more textures. In the areas with more textures, only a small local range satisfies the linear relationship; while in some areas, there are fewer textures. In the areas with fewer textures, the linear relationship can be satisfied in a larger range. In order to prevent excessive compression loss, it is necessary to set a suitable regional segmentation size and the number of retained pixels. In this embodiment, the image is divided into blocks to reflect the regional segmentation, and the screened pixels are used as the assumed retained pixels. Since it is not yet possible to determine which size to use for block division and how many pixel values ​​to retain for empty compression, the compression loss is small, and the compression amount is still large; it is necessary to analyze the loss of the image after decompression compared to before compression under the preset block size and the pixel values ​​of the preset number of screened pixels, and continuously adjust the block size and the number of screened pixels according to the image loss, so as to obtain a better block size and a better number of screened pixels. First, the image needs to be divided into blocks according to the preset size, and the pixels are screened according to the preset number.

[0062] S20: Divide each channel image of the currently acquired surface image of the overhead transmission line into blocks to obtain a first image block.

[0063] Optionally, as an example, the method for acquiring the first image block includes:

[0064] Each channel image of the surface image of the overhead transmission line currently collected is evenly divided into N first image blocks, where N represents the preset number of blocks. This embodiment is described by taking N as 16 as an example, and other embodiments may take other values, which are not specifically limited in this embodiment.

[0065] S21: Screening a first number of pixels in a first image block.

[0066] First, the number of filtered pixels of the first image is set.

[0067] Optionally, as an example, the method for obtaining the first quantity includes: presetting a reference row screening quantity and a reference column screening quantity. This embodiment is described by taking the reference row screening quantity as 3 and the reference column screening quantity as 2 as an example. Other embodiments may take other values. This embodiment does not impose any specific restrictions. The reference row screening quantity and the reference column screening quantity are respectively used as the first row screening quantity and the first column screening quantity of the first image block. The product of the first row screening quantity and the first column screening quantity of the first image block is used as the first quantity of the first image block, and the first quantity of the first image block is used as the number of screened pixels of the first image block.

[0068] Then, a first number of pixels are filtered in the first tile.

[0069] Preferably, screening a first number of pixels in the first image block includes:

[0070] The number of rows is the first row screening number, the number of columns is the first column screening number, and the pixels evenly distributed in the entire first image block are recorded as the screening pixels under the first number, Figure 3 A schematic diagram of the distribution characteristics of the screened pixels is shown in FIG.

[0071] S22: Calculate the overall prediction loss ratio and the pixel prediction loss ratio.

[0072] It should be noted that in order to understand the compression effect under a preset block size and retaining the pixel values ​​of a preset number of filtered pixels, it is necessary to first obtain the decompressed image of each image block. This embodiment represents the decompressed image of each image block with a predicted compressed restoration image.

[0073] S220: Obtain a predicted compressed restored image of the image block.

[0074] Optionally, as an example, a method for obtaining a predicted compressed restored image includes:

[0075] The pixel value average of all filtered pixels in the image block is used as the predicted pixel value of the non-filtered pixels, and the image composed of the pixel values ​​of all filtered pixels in the first image block and the predicted pixel values ​​of the non-filtered pixels is used as the predicted compressed restored image.

[0076] Preferably, as an example, a method for obtaining a predicted compressed restored image includes:

[0077] Taking the screened pixel as a marked pixel, in response to the existence of an unmarked pixel, if there is a marked pixel in the horizontal direction or in the vertical direction of an unmarked pixel, based on the pixel values ​​of the two nearest marked pixels in the horizontal direction or in the vertical direction of the unmarked pixel, using a linear interpolation method to obtain a linear interpolation value of the unmarked pixel, recorded as a predicted pixel value of the unmarked pixel, taking the screened pixel and the unscreened pixel with the predicted pixel value as a marked pixel, and in response to the absence of the unmarked pixel, obtaining a predicted pixel value of each unscreened pixel;

[0078] An image composed of the pixel values ​​of the filtered pixels and the predicted pixel values ​​of the non-filtered pixels in the first image block is called a predicted compressed restored image.

[0079] In order to better illustrate how to obtain the predicted pixel value of each non-filtered pixel by linear interpolation, the specific calculation process is given as an example below, specifically:

[0080] Assume that the coordinates of the two nearest marked pixels in the horizontal or vertical direction to the unmarked pixel at coordinate (3,3) are (2,3) and (4,3) respectively. The marked pixels at coordinates (2,3) and (4,3) are located directly above and below the unmarked pixel at coordinate (3,3), and their pixel values ​​are 2 and 8 respectively. With the unmarked pixel at coordinate (3,3) as the origin (0,0), adjust the coordinates of the marked pixels at coordinates (2,3) and (4,3) to (-1,0) and (1,0), and input the coordinate value (-1,0) and the corresponding pixel value 2 into the linear equation Get , input the coordinate value (1,0) and the corresponding pixel value 8 into the linear equation Get ,Will The combined solution is , so we get the equation , input the coordinate origin (0,0) into We get y=5, so the linear interpolation value of the non-marked pixel at the original coordinate (3,3) is 5. In other words, the predicted pixel value of the non-marked pixel at the original coordinate (3,3) is 5.

[0081] It should be noted that predicting the pixel values ​​of non-filtered pixels by linear interpolation is consistent with the theory that pixel values ​​in a smaller area have a linear relationship. The pixel values ​​estimated in this way can be closer to the actual pixel values, effectively reducing compression losses.

[0082] S221: Calculate the overall prediction loss ratio and the pixel prediction loss ratio.

[0083] It should be noted that compression loss is not only reflected in the deviation of pixel values, but also in the loss of texture information. Compression loss is analyzed based on this. In this embodiment, the overall prediction loss ratio is used to reflect the compression loss of each image block, and the pixel prediction loss ratio is used to reflect the compression loss of each non-screened pixel.

[0084] Preferably, as an example, the method for obtaining the overall predicted loss ratio includes:

[0085] ;

[0086] Wherein, for a predicted compressed restored image of a first image block under a first number of filtered pixels, represents the pixel value difference between the first image block and the kth non-filtered pixel of the predicted compressed restored image, It represents the gradient value difference between the first image block and the kth non-screened pixel of the predicted compressed restored image. The larger the value, the greater the gradient information loss in the first image block. When the information of the pixel is lost, the possibility of texture disappearance is greater. Therefore, when the information of the pixel is lost, the accuracy of subsequent foreign body detection is greatly affected. It represents the gradient value of the kth non-screened pixel of the first image block. The larger the value, the greater the possibility that the kth pixel in the first image block is an edge or texture pixel. Therefore, when the information of the pixel is lost, the accuracy of the subsequent foreign body detection is greatly affected. It represents the gradient direction angle between the first image block and the kth non-screened pixel of the predicted compressed restored image. The larger the value, the greater the difference in the gradient direction of the kth pixel of the first image block. Therefore, when the information of the pixel is lost, the possibility of changing the texture direction is greater. Therefore, when the information of the pixel is lost, the accuracy of the subsequent foreign body detection is greatly affected. represents the number of non-filtered pixels in the first image block, represents the overall prediction loss of the first image block under the first quantity, Represents a linear normalization function. In this embodiment, As a weight pair Perform weighted summation.

[0087] The ratio of the overall prediction loss to the number of pixels in the first image block is taken as the overall prediction loss ratio.

[0088] Preferably, as an example, the pixel prediction loss ratio satisfies the relationship:

[0089] ;

[0090] in, Represents the pixel prediction loss ratio of the kth non-filtered pixel in the first image block under the first quantity.

[0091] It should be noted that when analyzing the information loss before and after image compression, not only the pixel value loss and texture loss are taken into account, but also the impact of information loss is considered, so as to more accurately describe the information loss before and after image compression.

[0092] S3: In response to the overall predicted loss ratio being greater than a preset loss ratio threshold, calculating the predicted regional loss difference.

[0093] S30: Setting a preset loss ratio threshold.

[0094] Optionally, as an example, a preset loss ratio threshold is set, including: This embodiment is described by taking the preset loss amount threshold of 2 as an example, other embodiments may take other values, and this embodiment does not make specific restrictions.

[0095] S31: Calculate the difference in loss in the predicted area.

[0096] It should be noted that, when the preset block size is not the optimal block size, the compression effect of the first image block obtained by the block size may be such that some areas in the first image block have a larger loss and some areas have a smaller loss. In other words, in some areas of the first image block, the preset number of filter pixels is sufficient to meet the compression effect, while in some areas, the preset number of filter pixels cannot meet the compression effect. Therefore, if more pixels are added directly by increasing the filter pixels, the data compression amount will be less, and some areas do not need to increase the filter pixels at all to meet the compression effect, so adding filter pixels in these areas will result in data waste. Therefore, it is necessary to further analyze the uniform distribution of compression loss in the first image block.

[0097] Preferably, as an example, calculating the predicted regional loss difference includes:

[0098] ;

[0099] in, Indicates that the value of the pixel prediction loss ratio is in the distance between the i-th pair of adjacent non-screened pixels in the j-th value subinterval, The logarithm of the adjacent non-screened pixels whose value of the pixel prediction loss ratio is in the jth value subinterval, Reflects the distance between non-screened pixels whose values ​​of pixel prediction loss ratio are in the jth value subinterval. Indicates the number of non-screened pixels whose value of pixel prediction loss ratio is in the jth value subinterval, represents the number of pixels in the first image block, It reflects the distance between every two adjacent non-screened pixels when the value of the pixel prediction loss ratio is uniformly distributed in the non-screened pixels in the j-th value subinterval. It reflects the difference between the actual distance and the uniform distribution distance of two adjacent non-screened pixels whose pixel prediction loss ratio is in the jth value subinterval. The larger the value, the greater the difference in loss in the first image block. U represents the number of preset intervals, and the number of value subintervals is equal to the number of preset intervals. Represents the prediction region loss difference of the first image block under the first quantity.

[0100] Optionally, as an example, the method for obtaining the value sub-interval includes:

[0101] The maximum value and the minimum value of the pixel prediction loss ratio of all non-screened pixels in the first image block are obtained, and the maximum value and the minimum value of the pixel prediction loss ratio of all non-screened pixels in the first image block constitute a value interval, and the value interval is evenly divided into a preset number of sub-intervals, which are recorded as value sub-intervals. This embodiment is described by taking 16 as an example, and other embodiments may take other values, which are not specifically limited in this embodiment.

[0102] It should be noted that the adjacent non-screening pixels are: in the horizontal direction or the vertical direction, when there is no other non-screening pixel between every two non-screening pixels, the two non-screening pixels are recorded as adjacent non-screening pixels.

[0103] It should be further explained that, when analyzing the uniformity of loss in each region during image compression, the difference between the distance when the loss value is uniformly distributed and the actual distance is taken into account, which more accurately describes the uniformity of loss in each region during image compression.

[0104] S4: In response to the prediction region loss difference being greater than a preset difference threshold, the first image block is divided into blocks again, and the overall prediction loss ratio is recalculated.

[0105] It should be noted that when the compression loss is evenly distributed, it means that the loss distribution in each area of ​​the first image block is the same, and adding filtering pixels to each area will not lead to data waste in some areas of the first image block. When the compression loss is not evenly distributed, it means that different areas in the first image block require different numbers of filtering pixels. If the filtering pixels are directly added to all areas in the first image block, some areas will retain too many filtering pixels, resulting in data waste. Therefore, the first image block needs to be divided into blocks again.

[0106] S40: Setting a preset difference threshold.

[0107] Optionally, as an example, setting a preset difference threshold includes:

[0108] This embodiment is described by taking the preset difference threshold of 5 as an example. Other embodiments may take other values, and this embodiment does not make any specific limitation.

[0109] S41: Divide the first image block into blocks again.

[0110] Optionally, as an example, each first image block is evenly divided into second image blocks, and N represents the preset number of blocks.

[0111] S42: Recalculate the overall prediction loss ratio.

[0112] S420: Setting the number of filtered pixels of the second image block.

[0113] Optionally, as an example, a method for acquiring the first number of first image blocks includes:

[0114] Divide the base row filter quantity by Then, the first row screening number of the second image block is obtained by rounding down, and the base column screening number is divided by Then, the first column screening number of the second image block is obtained by rounding down, and the product of the first row screening number and the first column screening number of the second image block is used as the first number of the second image block, and the first number of the second image block is used as the screening pixel number of the second image block.

[0115] S421: Calculate the prediction region loss difference of the second image block. In response to the prediction region loss difference being greater than a preset difference threshold, divide the second image block into blocks again. In response to the prediction region loss difference being not greater than the preset difference threshold, calculate the overall prediction loss ratio of the second image block.

[0116] Optionally, as an example, each second image block is evenly divided into A third image block, where N represents the preset number of blocks.

[0117] It should be noted that when the number of pixels in the second image block is less than 2N, there is no need to further divide the second image block.

[0118] Preferably, as an example, calculating the prediction region loss difference of the second image block includes:

[0119] According to the method of obtaining the first number of screening pixels in the first image block, the first number of screening pixels are obtained in the second image block. According to the calculation method of calculating the difference of loss of the prediction area of ​​the first image block under the first number, the difference of loss of the prediction area of ​​the second image block under the first number is calculated based on the screening pixels obtained in the second image block.

[0120] Preferably, as an example, the overall prediction loss ratio of the second image block is calculated.

[0121] According to the calculation method of calculating the overall prediction loss ratio of the first image block under the first quantity, the overall prediction loss ratio of the second image block under the first quantity is calculated based on the filtered pixels obtained in the second image block.

[0122] S5: In response to the predicted regional loss difference being no greater than a preset difference threshold, adjusting the first number to a second number, and recalculating the overall predicted loss ratio.

[0123] S50: Adjusting the number of filtered pixels to a second number.

[0124] Optionally, as an example, adjusting the number of filtered pixels to a second number includes:

[0125] The product of twice the first row screening number and twice the first column screening number is taken as the second number, and the second number is taken as the screening pixel number.

[0126] Particularly, when the obtained second number is greater than the number of pixels in the first image block, the number of pixels in the first image block is directly used as the second number, and the second number is used as the number of screened pixels.

[0127] It should be noted that sometimes, after the number of screened pixels is adjusted once, the overall prediction loss ratio still cannot meet the requirements, and the number of screened pixels needs to be adjusted again. Therefore, it is necessary to give a general calculation formula for the number of screened pixels after each adjustment, and the calculation formula is: , , represents the rth number, Indicates the number of rows to be screened. Indicates the number of filters in the rth column, Indicates the number of filters in the first row. Indicates the number of filters in the first column.

[0128] It should be further explained that the number of filtered pixels increases exponentially. This adjustment span is large, so the optimal number of filtered pixels will be skipped, resulting in poor compression effect.

[0129] Preferably, as an example, the method for obtaining the second quantity includes:

[0130] ;

[0131] ;

[0132] in, represents the number of rows of the first image block, L represents the number of columns of the first image block, Indicates the number of filters in the second row. Indicates the number of filters in the second column. Indicates the number of filters in the first row. Indicates the number of filters in the first column. Indicates the rounding up symbol;

[0133] The product of the second row screening quantity and the second column screening quantity is taken as the second quantity.

[0134] It should be noted that sometimes, after the number of screened pixels is adjusted once, the overall prediction loss ratio still cannot meet the requirements, and the number of screened pixels needs to be adjusted again. Therefore, it is necessary to give a general calculation formula for the number of screened pixels after each adjustment, and the calculation formula is: , , , represents the rth number, represents the number of rows of the first image block, L represents the number of columns of the first image block, Indicates the number of rows to be screened. Indicates the number of filters in the rth column, Indicates the number of filters in the first row. Indicates the number of filters in the first column. Indicates the round-up symbol.

[0135] It should be noted that the formula is derived from the change in the number of screened pixels caused by subtracting r-1 from the uniform row spacing distance of each first image block under the first number.

[0136] The second number is used as the number of filtered pixels.

[0137] S51: Recalculate the overall prediction loss ratio.

[0138] Preferably, as an example, recalculating the overall prediction loss ratio includes:

[0139] According to the method of obtaining the first number of filtered pixels in the first image block, a second number of filtered pixels are obtained in the first image block. According to the calculation method of calculating the overall prediction loss ratio of the first image block under the first number, the overall prediction loss ratio of the first image block under the second number is calculated based on the second number of filtered pixels obtained in the first image block.

[0140] S6: In response to the overall prediction loss ratio being no greater than a preset loss ratio threshold, non-filtered pixels in the image block are compressed by blanking to obtain a compressed data sequence.

[0141] Preferably, as an example, the non-filtered pixels in the image block are compressed by setting them to zero to obtain a compressed data sequence, including steps S60-S62.

[0142] S60: performing blanking compression on the non-filtered pixels in the image block to obtain a reserved pixel value sequence of the image block.

[0143] Optionally, as an example, non-filtered pixels in an image block are cleared, and a sequence consisting of pixel values ​​of all pixels in the image block after the pixels are cleared is used as a reserved pixel value sequence of the image block.

[0144] S61: Arrange all image blocks to obtain an image block sequence.

[0145] It should be noted that the sizes of image blocks are different, and certain rules need to be set to place the reserved pixel value sequences of image blocks of different sizes together, so that the compressed data can be decompressed.

[0146] Optionally, all image blocks are arranged to obtain an image block sequence, including:

[0147] The first image block to which each image block belongs is obtained, and all image blocks belonging to the same first image block constitute a first set. Based on the order from left to right and from top to bottom, according to the position of the first image block corresponding to the first set, all the first sets are sorted to obtain a first temporary sequence, and for any first set in the first temporary sequence, the size of each image block in the first set is compared with the size of the first image block, and when the size of each image block in the first set is greater than or equal to the size of the first image block, no further sorting analysis is required.

[0148] When there is an image block in the first set whose size is smaller than the first image block size, the second image block to which each image block in the first set belongs is obtained, and the image blocks in the first set that belong to the same second image block constitute the second set in the first set. Based on the order from left to right and from top to bottom, according to the position of the second image block corresponding to each second set in the first set, all the second sets in the first set are sorted, and the sorting process of the second sets in all the first sets is completed in the same way to obtain a second temporary sequence.

[0149] For any second set of any first set, the size of each image block in the second set is compared with the size of the second image block. When the size of each image block in the second set is greater than or equal to the size of the second image block, no further sorting analysis is required.

[0150] When there is an image block in the second set whose size is smaller than the second image block size, the third image block to which each image block in the second set belongs is obtained, and the image blocks in the second set belonging to the same third image block constitute a third set in the second set.

[0151] This process is repeated in this way until the size of each image block in each set is larger than the size of the image block at the corresponding level, thereby obtaining an image block sequence.

[0152] S62: Obtain a compressed data sequence according to the image block sequence and the reserved pixel value sequence of each image block.

[0153] It should be noted that the above process only solves the problem of arranging the corresponding data of the image blocks. Due to the different sizes of the image blocks, if a size mark value is not set for each image block, it is impossible to obtain the position of each retained pixel value in the image based on the retained pixel value sequence of each image block, and thus the data cannot be decompressed.

[0154] Preferably, as an example, obtaining a compressed data sequence according to the image block sequence and the reserved pixel value sequence of each image block includes:

[0155] The first mark value is preset. In this embodiment, the first mark value is Take as an example for description, other embodiments may take other values, which are not limited in this embodiment. The number of block operations experienced by each image block in the image block sequence is obtained, and recorded as the flag adjustment amount.

[0156] The cumulative sum of the mark adjustment amount and the first mark value of each image block is used as the block size mark value of each image block. Before the block size mark value of each image block is spliced ​​to the reserved pixel value sequence, a reserved pixel value sequence with a mark value is obtained for each image block.

[0157] According to the arrangement order of the image blocks in the image block sequence, the reserved pixel value sequences with flag values ​​of all the image blocks are arranged to obtain a comprehensive sequence.

[0158] Acquire the number of rows and columns of the first image block, and splice the two data of the number of rows and the number of columns of the first image block before the comprehensive sequence to obtain a compressed data sequence of each channel of the surface image of the overhead power transmission line currently collected;

[0159] A channel cutoff mark is inserted at the end of the transmission sequence of each channel, and then the transmission sequences of the three channels of the currently acquired surface image of the overhead transmission line are spliced ​​together to obtain a compressed data sequence of the currently acquired surface image of the overhead transmission line.

[0160] S7: Transmitting and decompressing the compressed data sequence of the surface image of the overhead transmission line currently collected to obtain a decompressed image of the surface image of the overhead transmission line currently collected, and performing foreign matter detection based on the decompressed image of the surface image of the overhead transmission line currently collected to obtain a foreign matter area.

[0161] S70: transmitting and decompressing the decompressed data sequence of the currently acquired surface image of the overhead power transmission line to obtain a decompressed image of the currently acquired surface image of the overhead power transmission line.

[0162] Specifically, the compressed data sequence of the surface image of the overhead transmission line currently collected is transmitted to the foreign object detection server on the ground, and the foreign object detection server decompresses the compressed data sequence of the surface image of the overhead transmission line currently collected to obtain the decompressed image of the surface image of the overhead transmission line currently collected.

[0163] Optionally, as an example, a method for acquiring a decompressed image of a currently acquired surface image of an overhead power transmission line includes:

[0164] According to the channel transmission cutoff mark, the compressed data sequences of the three channels are divided to obtain the compressed data sequence of each channel.

[0165] For the compressed data sequence of any channel, first obtain the number of rows and columns of the first image block in the compressed data sequence, obtain the number of rows and columns of each image block according to the number of rows and columns of the first image block and the block size flag value of each image block, apply for corresponding data storage space for each image block in the foreign object detection server according to the number of rows and columns of each image block, place all pixel values ​​in the retained pixel value sequence of each image block in the corresponding data storage space according to the distribution method of the screened pixels in step S2, and then use linear interpolation to obtain the predicted pixel values ​​of pixels that do not exist in the data storage space according to the existing pixel values, so as to obtain the decompressed image block of each image block.

[0166] According to the reverse process of obtaining the image block sequence in step S6, the decompressed image blocks of all image blocks are placed at corresponding positions of the image to obtain the decompressed image of the channel.

[0167] Similarly, the decompressed image of each channel is obtained. The decompressed images of all channels are combined to form the decompressed image of the surface image of the currently acquired overhead power transmission line.

[0168] S71: Performing foreign matter detection on the decompressed image of the currently collected surface image of the overhead power transmission line to obtain a foreign matter area.

[0169] Optionally, as an example, a method for obtaining a foreign body area includes: constructing a foreign body detection network, in this embodiment, the YoloV10 network is used as the foreign body detection network, other embodiments may set other networks, and this embodiment does not impose specific restrictions. The foreign body area in the surface image of the historically collected overhead transmission line is manually labeled, wherein the pixel position belonging to the foreign body area in the surface image of the historically collected overhead transmission line is labeled as 1, and the pixel position not belonging to the foreign body area in the surface image of the historically collected overhead transmission line is labeled as 0, thereby obtaining a surface image of the historically collected overhead transmission line with a label.

[0170] The foreign object detection network is trained using the surface image of the overhead power line collected historically with labels to obtain a trained foreign object detection network. The decompressed image of the surface image of the overhead power line currently collected is input into the trained foreign object detection network to obtain the foreign object area in the decompressed image of the surface image of the overhead power line currently collected.

[0171] An embodiment of the present invention also discloses a foreign object detection system for overhead transmission lines based on image processing, including a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, a foreign object detection method for overhead transmission lines based on image processing according to the present invention is implemented.

[0172] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.

[0173] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory, a dynamic random access memory, a static random access memory, an enhanced dynamic random access memory, a high bandwidth memory, a hybrid storage cube, etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of the device or accessible or connectable to the device.

[0174] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

[0175] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting foreign objects in overhead power transmission lines based on image processing, characterized in that: Includes steps: Divide each channel image into blocks to obtain a first image block, set the number of filtered pixels to a first number, filter the first number of pixels in the first image block, and calculate the overall prediction loss ratio and the pixel prediction loss ratio, wherein the overall prediction loss ratio and the pixel prediction loss ratio are positively correlated with the pixel value difference between the filtered pixels and the non-filtered pixels, the gradient direction angle, and the gradient value difference; In response to the overall prediction loss ratio being greater than a preset loss ratio threshold, calculating a prediction region loss difference, wherein the prediction region loss difference is positively correlated with a first distance difference, wherein the first distance difference is a difference between an interval distance between non-screened pixels in which the pixel prediction loss ratio is in the same value subinterval and a distance between non-screened pixels when the pixels are uniformly distributed throughout the first image block; In response to the difference in loss of the predicted region being greater than a preset difference threshold, the first image block is divided again, and the overall prediction loss ratio is recalculated; in response to the difference in loss of the predicted region being not greater than the preset difference threshold, the number of screened pixels is adjusted to a second number, and the overall prediction loss ratio is recalculated; In response to the overall predicted loss ratio being not greater than a preset loss ratio threshold, the non-screened pixels in the image block are blanked to obtain a compressed data sequence, and the compressed data sequence is transmitted for foreign body detection; The overall prediction loss ratio refers to the ratio of the overall prediction loss to the number of pixels in the first image block; The pixel prediction loss ratio refers to the compression loss of each non-screened pixel; The overall predicted loss amount satisfies the relationship: ; Wherein, for a predicted compressed restored image of a first image block under a first number of filtered pixels, represents the pixel value difference between the first image block and the kth non-filtered pixel of the predicted compressed restored image, represents the gradient value difference between the first image block and the kth non-screened pixel of the predicted compressed restored image, represents the gradient value of the kth non-screened pixel of the first image block, represents the gradient direction angle between the first image block and the kth non-screened pixel of the predicted compressed restored image, represents the number of non-filtered pixels in the first image block, Represents the overall prediction loss of the first image block under the first quantity.

2. The method for detecting foreign objects in overhead power transmission lines based on image processing according to claim 1, characterized in that: The method for obtaining the first quantity includes: The first number is equal to the product of the first row screening number and the first column screening number. The first column screening number is positively correlated with the preset benchmark column screening number and negatively correlated with the number of blocks. The first row screening number is positively correlated with the preset benchmark row screening number and negatively correlated with the number of blocks.

3. The method for detecting foreign objects in overhead power lines based on image processing according to claim 1, characterized in that: The pixel prediction loss ratio satisfies the relationship: ; in, Represents the pixel prediction loss ratio of the kth non-filtered pixel in the first image block under the first quantity.

4. The method for detecting foreign objects in overhead power lines based on image processing according to claim 1, characterized in that: The method for obtaining the predicted compressed restored image comprises: Taking the screened pixel as a marked pixel, in response to the existence of an unmarked pixel, if there is a marked pixel in the horizontal direction or in the vertical direction of an unmarked pixel, based on the pixel value of the marked pixel in the horizontal direction or in the vertical direction of the unmarked pixel, using a linear interpolation method to obtain a linear interpolation value of the unmarked pixel, recorded as a predicted pixel value of the unmarked pixel, taking the screened pixel and the unscreened pixel with the predicted pixel value as the marked pixel, and in response to the absence of the unmarked pixel, obtaining a predicted pixel value of each unscreened pixel; An image composed of the pixel values ​​of the filtered pixels and the predicted pixel values ​​of the non-filtered pixels in the first image block is called a predicted compressed restored image.

5. The method for detecting foreign objects in overhead power lines based on image processing according to claim 2, characterized in that: The predicted regional loss difference satisfies the relationship: ; in, Indicates that the value of the pixel prediction loss ratio is in the distance between the i-th pair of adjacent non-screened pixels in the j-th value subinterval, The logarithm of the adjacent non-screened pixels whose value of the pixel prediction loss ratio is in the jth value subinterval, Indicates the number of non-screened pixels whose value of pixel prediction loss ratio is in the jth value subinterval, represents the number of pixels in the first image block, U represents the number of preset intervals, and the number of value sub-intervals is equal to the number of preset intervals. Represents the prediction region loss difference of the first image block under the first quantity.

6. The method for detecting foreign objects in overhead power lines based on image processing according to claim 2, characterized in that: The step of screening a first number of pixels in the first image block comprises: The number of rows is the first row screening number, the number of columns is the first column screening number, and the pixels evenly distributed in the entire first image block are recorded as screening pixels under the first number.

7. The method for detecting foreign objects in overhead power lines based on image processing according to claim 2, characterized in that: The step of adjusting the number of filtered pixels to a second number includes: ; ; in, represents the number of rows of the first image block, L represents the number of columns of the first image block, Indicates the number of filters in the second row. Indicates the number of filters in the second column. Indicates the number of filters in the first row. Indicates the number of filters in the first column. Indicates the rounding up symbol; The product of the second row screening number and the second column screening number of the first image block is used as the second number of the first image block, and the second number is used as the screening pixel number of the first image block.

8. A foreign body detection system for overhead power transmission lines based on image processing, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a foreign body detection method for overhead transmission lines based on image processing according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • An Internet of Things-based intelligent monitoring and inspection system for overhead transmission lines

    CN115085087B

  • Power transmission channel safety online monitoring method based on artificial intelligence

    CN115995058A

  • Reversible information hiding method and system based on intra-block and intra-block pixel prediction complexity

    CN117596344A

  • Video coding method and device, electronic equipment and storage medium

    CN117956145A

  • Processing method for image data

    JP2007049594A