A transmission line inspection image deduplication method
By combining block feature extraction and Sobel operator with grayscale conversion, the problem of high complexity and poor accuracy in deduplication of approximately duplicate images in UAV inspection images is solved, achieving efficient deduplication and accurate preservation of centroid images.
Patent Information
- Application Number
- CN202310815441.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-05
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2043-07-05
AI Technical Summary
Existing deduplication methods for inspection images suffer from high complexity and poor accuracy, making it difficult to effectively handle near-repeating images in power line inspection images collected by UAVs.
We employ a coarse grouping process based on block feature extraction and a finer grouping process based on perceptual hashing using the Sobel operator. By combining grayscale conversion and hash indexing, we retain centroid images and remove non-centroid images through global and local feature evaluation of the image.
It improves the accuracy and efficiency of image deduplication, ensuring that redundancy in the image set is reduced while removing nearly duplicate images.
Smart Images

Figure CN117011703B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of inspection image processing, and particularly relates to a power transmission line inspection image deduplication method. BACKGROUND
[0002] Unmanned aerial vehicle power inspection has become a future trend of inspection, and a large number of inspection images collected by the unmanned aerial vehicle still bring a series of challenges to subsequent processing work. Among them, there are a large number of approximately repeated images in the inspection data collected by the unmanned aerial vehicle; the existing data deduplication methods include file level and block level. The file level deduplication takes a file as a unit, uses a hash function to obtain the hash value of each file, and can delete redundant repeated files. The block level deduplication divides the file into a plurality of data blocks according to a certain method, calculates the hash value of each data block, and judges whether the data blocks are repeated through the hash value. These methods are very effective for text files, but images are often based on visual content to judge whether they are repeated, and two images with different hash values may be the same in visual content.
[0003] In the Computer Journal, there is a "Client image fuzzy deduplication method supporting ownership authentication", the authors are Li Danping, Yang Chao, Jiang Qi, Ma Jianfeng and Li Chengzhou, which proposes a similar image deduplication method. The method introduces the mean hash algorithm to generate the signature of the image. The algorithm performs well in measuring the similarity of perceptual similar images. The images and signatures stored in the cloud service are encrypted using a shared group key through a symmetric cipher system to prevent data leakage. It calculates the hash distance and performs a duplicate check on the encrypted hash to determine whether to upload a new image. However, since the mean hash algorithm only considers the global image grayscale feature, the method is simple and efficient, but the deduplication accuracy is too poor. SUMMARY
[0004] The present application solves the problems of high deduplication complexity and poor deduplication accuracy of existing approximate image deduplication methods, proposes a power transmission line inspection image deduplication method, combines a coarse grouping step based on block feature extraction and a fine grouping step based on a Sobel operator perceptual hash, and constructs a hash index structure after the two steps to improve matching efficiency; in the approximate repeated image removal step, the image content and attributes are comprehensively evaluated to accurately find the centroid image; the method of the present application improves the overall efficiency while ensuring the image deduplication accuracy.
[0005] In order to achieve the above purpose, the technical scheme adopted by the present application is as follows: a power transmission line inspection image deduplication method, comprising the following steps:
[0006] S1, obtaining an inspection image and forming an image set, performing color system conversion based on the inspection image, and generating a grayscale image with a uniform size;
[0007] S2, extracting the block features of the image, obtaining the binary hash code according to the average gray value of the image sub-block and the quantization rule, and performing coarse grouping of the image through clustering of the hash code;
[0008] S3, for the images in the same group in the coarse grouping, extracting the image edge feature vector by using the Sobel operator, extracting the image low-frequency coefficient based on DCT, obtaining a multi-dimensional feature vector, and completing fine grouping;
[0009] S4, performing quality evaluation on the images, retaining the best centroid image, and deleting non-centroid images.
[0010] In the present application, before any detection processing is performed on the image, all color images in the image set are first subjected to gray scale processing, because the information processing amount of color images is much larger than that of gray scale images, and the feature parameters representing image information can still be obtained through processing of the gray scale images; subsequently, similar images are detected by using coarse grouping and fine grouping, and a hash index structure is constructed at each detection stage; in the coarse grouping step, the image set is preliminarily divided by using image color features, in which step the images are divided into k clusters, and the image contents in each cluster are approximately similar; subsequently, the images in each cluster are subjected to fine grouping by using the coarse grouping step, in which step the Sobel operator is used to extract image edge features, these features appear as high-frequency information, which is complementary to the low-frequency DCT coefficient in perceptual hashing, and is conducive to improving the accuracy of approximate data aggregation; finally, the best image in each group after grouping is obtained, which is defined as the centroid image, and the non-centroid images are deleted, so as to achieve the purpose of approximate image deduplication.
[0011] As a preferred, the step S1 comprises the following steps:
[0012] S11, after obtaining the inspection image, converting the image from the RGB color system to the HSI color system;
[0013] S12, selecting the intensity component in the HSI color space to generate a gray scale image, and then adjusting all images in the image set to m*m size by using the double three interpolation method.
[0014] In the present application, due to the high correlation between the three color components in the RGB color space, the stability and robustness of the features extracted from the RGB components are easily affected. At the same time, it is known that the HSI color space is based on the human visual system and can be described by a cone-shaped space model; it can clearly show the changes of hue, saturation and intensity. Hue and saturation are often referred to as chroma, and human vision is much more sensitive to intensity than to chroma. In order to facilitate color processing and recognition, the HSI color space is often considered, which is more consistent with human visual perception than the RGB color space.
[0015] As a preferred, the step S2 comprises the following steps:
[0016] S21, the original image is divided into four equal parts by two different division methods, together with the original image, 9 image sub-blocks are formed, and each image sub-block is sequentially marked;
[0017] S22, the average gray value of each image sub-block is calculated and combined to form a 9-dimensional vector, the 9-dimensional vector is binary coded, and a 9-dimensional binary hash code is obtained according to the quantization rule, and after hash coding, a plurality of images are allocated in each hash bucket.
[0018] In the present application, the block feature extraction considers extracting the color features of the image, which is simple and can quickly cluster the image set. In addition, in order to avoid the influence of image segmentation and complex background on global feature matching, the division method of step S21 is used for each image in the image set.
[0019] As a preferred, the step S3 comprises the following steps:
[0020] S31, after using the Sobel operator to extract the edge features of the image, the image features are recorded, the edge features of each image are recorded by calculating the number of intersection points of concentric circles and image edges, and a 10-dimensional quantization result is obtained;
[0021] S32, in the upper left corner of the 32*32 DCT matrix, an 8*8 sub-matrix is found, the average value of the elements of the sub-matrix is calculated, and each pixel is quantized and hashed to obtain a 64-dimensional feature vector quantization result;
[0022] S33, a hash index is constructed to construct the generated 74-dimensional feature vector, and images containing the same hash value are mapped to the same hash bucket.
[0023] In the present application, the image edge detection can well reflect the local texture features of the image, and the image edge detection result based on the Sobel algorithm often appears in high-frequency information, which is complementary to the low-frequency DCT coefficient, and is conducive to improving the approximate repeated image de-duplication accuracy; The steps of the present application well integrate the global features and local features, high-frequency coefficients and low-frequency coefficients of the image, and mainly use low-frequency coefficients. Experiments have proved that the use of Sobel operator is not sensitive to image brightness, so the robustness of the image detection of different time period aerial transmission line images is better.
[0024] As a preferred, the image quality evaluation comprises the following steps:
[0025] S41, the edge sharpness algorithm is used to evaluate the sharpness P(I k ) of the image I k ); combined with the R, G and B three channel values of the image I k , the image Ik the luminance value of the image I k ; k );
[0026] S42, for the quality of the image I k , the image sharpness P(I k ), the image average luminance value AL(I k ) and the image information entropy D(I k ) are normalized;
[0027] S43, the weighted value of the normalized value is calculated to obtain the final image comprehensive quality evaluation value Q(I k ).
[0028] In the application, after the image is grouped twice, the similarity of the images in the final group is extremely high. In order to retain the highest quality image in each group as much as possible, the other approximate duplicate versions are deleted; the approximate duplicate image evaluation is the key in this stage, and the quality of the image in each group is evaluated to ensure that the centroid image with the optimal quality is retained subsequently.
[0029] As a preferred, the step S4 comprises: quality measurement of the images in each group of duplicate images according to the image comprehensive quality evaluation value, the images are sorted from high to low according to the evaluation value, and the image ranked at the forefront is called the centroid image; for each group of approximate duplicate images, the centroid image is retained, and the remaining non-centroid images are deleted.
[0030] In the application, after the non-centroid images of all the approximate duplicate image groups are deleted, only one optimal centroid image is left in each group, which greatly reduces the redundancy of the image set.
[0031] As a preferred, the calculation of the average gray value of each image sub-block and the combination to form a 9-dimensional vector is specifically:
[0032] The calculation formula of the average gray value of each image sub-block is as follows:
[0033] Wherein k=(2, 3, 4, 5, 6, 7, 8, 9)
[0034] Wherein M*M represents the resolution of the whole image, f(x, y) represents the pixel value at the image point (x, y), A k represents the kth image block; the 9-dimensional feature vector is represented as: I={i1, i2,..., i9}.
[0035] In the application, after the average gray value of each image sub-block is calculated, the 9-dimensional vector formed can describe the global gray distribution characteristics of an image.
[0036] As a preference, the definition P(I k ) of the sharpness is as follows:
[0037]
[0038] In the formula, w, h represent the width and height of the image, and di / dx represents the rate of change of the gray scale.
[0039] The R, G and B three-channel values of the image I k and the luminance value of the image I k are calculated as follows:
[0040] L(x, y) = 0.299 * R + 0.587 * G + 0.114 * B
[0041]
[0042] In the formula, w, h represent the width and height of the image, and x, y represent the pixel coordinates of the image.
[0043] The calculation formula of the image information entropy D(I k ) is as follows:
[0044]
[0045] In the formula, p i is the probability of the occurrence of the pixel with the gray scale value i in the image, and L is the total number of the gray scales.
[0046] In the present application, the image sharpness, the image average luminance value and the image information entropy are calculated respectively for subsequent analysis and processing.
[0047] As a preference, the normalized value is represented as:
[0048] P(I k ) * = P(I k ) / P max
[0049]
[0050] D(I k ) * = D(I k ) / D max
[0051] In the formula, D max represents the maximum value of the image information entropy in the same near-duplicate image group, and P max represents the maximum value of the image sharpness in the same near-duplicate image group.
[0052] In the application, the subsequent image comprehensive quality evaluation value is calculated according to the normalized value and the weight factor.
[0053] As preferred, the image comprehensive quality evaluation value Q(I k ) is calculated according to the following formula:
[0054] Q(I k ) = λ1×D(I k ) * + λ2×P(I k ) * + λ3×AL(I k ) *
[0055] Wherein, λ1, λ2, λ3 are weight factors, and λ1+λ2+λ3=1.
[0056] In the application, the final image comprehensive quality evaluation value can be obtained by calculating the weighted value of the three normalized values.
[0057] The application has the following beneficial effects:
[0058] The power transmission line inspection image deduplication method provided by the application combines a coarse grouping step based on block feature extraction and a fine grouping step based on a Sobel operator perceptual hash, and constructs a hash index structure after the two steps to improve matching efficiency; in the step of removing approximately repeated images, the image content and attributes are comprehensively evaluated to accurately find a centroid image; the method provided by the application improves overall efficiency while ensuring image deduplication accuracy. BRIEF DESCRIPTION OF DRAWINGS
[0059] Figure 1 is a scheme diagram of the power transmission line inspection image deduplication method provided by the application;
[0060] Figure 2 is an actual diagram of block feature extraction of the power transmission line inspection image deduplication method provided by the application;
[0061] Figure 3 is a marking diagram of block feature extraction of the power transmission line inspection image deduplication method provided by the application;
[0062] Figure 4 is a flowchart of step S2 of the power transmission line inspection image deduplication method provided by the application;
[0063] Figure 5 is a diagram of extracting an image edge feature vector in step S3 of the power transmission line inspection image deduplication method provided by the application;
[0064] Figure 6It is a power transmission line inspection image deduplication method DCT transform and inverse transform image schematic diagram. DETAILED DESCRIPTION
[0065] To make the purpose, technical scheme and advantages of the present application clearer, the present application is further described in detail below in combination with the drawings and examples. It should be understood that the specific embodiments described herein are only the best mode of the present application, which are used to explain the present application and do not limit the protection scope of the present application. All other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.
[0066] Example 1
[0067] The present embodiment proposes a power transmission line inspection image deduplication method, referring to Figure 1 , including the following steps.
[0068] Step S1, obtaining an inspection image and forming an image set, performing color system conversion based on the inspection image, and generating a gray scale image with a uniform size; this step includes the following sub-steps.
[0069] Step S11, after obtaining the inspection image, the image is converted from RGB color system to HSI color system; specifically, an image is converted from RGB color system to HSI color system, and the specific conversion rule is as follows:
[0070]
[0071]
[0072] The saturation is calculated as follows:
[0073]
[0074] The intensity component is calculated as follows:
[0075]
[0076] Step S12, selecting the intensity component in the HSI color space to generate a gray scale image, and then adjusting all images in the image set to m*m size by the double three interpolation method; specifically, the image with a uniform size can improve the accuracy of image detection.
[0077] Referring to Figure 4 , step S2, extracting the block features of the image, obtaining the binary hash code according to the average gray scale value of the image sub-block and the quantization rule, and performing coarse grouping of the image through clustering of the hash code; specifically, the following sub-steps are included.
[0078] Step S21, the original image is divided into four equal parts by two different ways, together with the original image forming 9 image sub-blocks, and each image sub-block is labeled in order; for the specific division, refer to Figure 2 and Figure 3 , the image (a) as shown in Figure 2 is divided into blocks, and two different division methods are used to form images (b) and (c) as shown in Figure 2 ; each image sub-block after division is labeled, which can be referred to in detail Figure 3 , represented by {A1, A2,..., A9}.
[0079] Step S22, calculate the average gray value of each image sub-block and combine to form a 9-dimensional vector, binary encode the 9-dimensional vector, and get a 9-dimensional binary hash code according to the quantization rule. After hash coding, a number of images will be allocated in each hash bucket. Specifically, the images allocated in each hash bucket are roughly the same in color distribution.
[0080] Specifically, the calculation formula of the average gray value of each image sub-block is as follows:
[0081] where k = (2, 3, 4, 5, 6, 7, 8, 9)
[0082] where M*M represents the resolution of the whole image, f(x,y) represents the pixel value at the image point (x,y), and A k represents the kth image block; the 9-dimensional feature vector is represented as: I = {i1, i2,..., i9}.
[0083] Then the obtained 9-dimensional feature vector is binary coded, and the quantization rule is as follows:
[0084]
[0085] If x mod 6 == 0, then x mod 6 = 2,
[0086] If y mod 10 == 0, then y mod 10 = 6.
[0087] Reference Figure 5 and Figure 6S3, for the images of the same group in the coarse group, an image edge feature vector is extracted by using a Sobel operator, a low frequency coefficient of the image is extracted based on DCT, a multi-dimensional feature vector is obtained, and a fine group is completed; after step S2, some images with approximately same color distribution are divided into the same group, but only the color feature of the image is considered, and the local feature of the image is not analyzed, so that the images in the group still exist the approximate repetition; therefore, after the grouping is completed, a method with richer description ability and better robustness is used again in each group to further cluster.
[0088] The DCT based perceptual hash algorithm (DCT-phash) has high resolution for images, especially for JPEG compressed images. The low frequency coefficient of an image discrete cosine transform is very small, and the low frequency coefficient cannot be large unless the image changes significantly, so the low frequency coefficient is often used to judge the image similarity. However, a large number of tests on the DCT-phash algorithm show that it still has inaccurate situations. Through analysis, it is found that the deficiency is that the 8*8 matrix in the upper left corner of the 32*32 coefficient matrix is taken to achieve the effect of removing high frequency and retaining low frequency, which makes some parts with obvious differences in high frequency features between images be removed, resulting in error clustering. Image edge detection can well reflect the local texture features of the image, and the image edge detection result based on the Sobel algorithm often appears in high frequency information, which is complementary to the low frequency DCT coefficient, and is conducive to improving the precision of approximate repeated image de-duplication.
[0089] Specifically, step S3 includes the following sub-steps.
[0090] Step S31, after the image edge features are extracted by using the Sobel operator, the image features are recorded, the edge features of each image are recorded by calculating the intersection points of concentric circles and the image edge, and a 10-dimensional quantization result is obtained; specifically, reference can be made to Figure 5 With the image center point as the center, 10 annular rings are formed by increasing the radius, the intersection points of each annular ring and the image edge are recorded, the total number of intersection points of each image is divided by the total number of rings to obtain the mean value of the image feature points. The number of intersection points of each ring is compared with the mean value for quantization, and the quantization rule is as follows:
[0091]
[0092] Wherein C i represents the intersection points of the i-th annular ring and the edge, C mean represents the mean value of the image feature points, R i represents the value of the i-th annular ring after quantization.
[0093] Reference Figure 6, step S32, find the 8*8 sub-matrix in the upper left corner of the 32*32 DCT matrix, calculate the average value of the sub-matrix elements, and quantize and hash each pixel to obtain a 64-dimensional feature vector quantization result. Specifically, for Figure 6 , from left to right, there are gray processed images, DCT transformed images, and images recovered by inverse transformation of the low frequency coefficients of the DCT transformation matrix. It can be seen that the energy of the DCT transformed image is mainly concentrated in the upper left corner, i.e. the low frequency region. Although this part of the region only accounts for a small part of the image, it concentrates most of the energy of the image. Selecting this part of the low frequency region for DCT inverse transformation to obtain the image after inverse transformation of the low frequency coefficients, it can be seen from the image that this part of the coefficient has basically recovered the main content of the image. In addition, the specific calculation formula of the quantization and hashing is as follows:
[0094]
[0095] h i , x represents the pixel value of the 8*8 matrix, and mean represents the average value of all pixel values. Thus, an 8*8 = 64-dimensional feature vector quantization result can be obtained.
[0096] Step S33, construct a hash index to generate a 74-dimensional feature vector, and map images containing the same hash value to the same hash bucket. In this embodiment, in order to reduce the amount of calculation and speed up the calculation, a hash index structure is constructed.
[0097] Step S4, quality evaluation is performed on the image, and the best centroid image is retained and the non-centroid image is deleted; by analyzing the characteristics of the power line inspection image, it is found that the factors that most affect the quality of the inspection image are the image content definition and the image exposure degree. Therefore, during the quality evaluation stage of the near-duplicate image, the image content definition and the image exposure degree are comprehensively judged.
[0098] Specifically, the quality evaluation of the image includes the following sub-steps.
[0099] Step S41, the edge sharpness algorithm is used to evaluate the definition P(I k ) of the image I k ; the brightness value of the image I k is calculated by combining the R, G and B three channel values of the image I k ; the information entropy D(I k ) of the image I k is calculated; specifically, each group of images is marked as {I1, I2,......,I k , I m}, the definition P(I kThe calculation formula of P(I) is as follows:
[0100]
[0101] In the formula, w and h represent the width and height of the image, and di / dx represents the gray scale variation rate;
[0102] The image I k The R, G and B three-channel values of the image I k The calculation formula of the brightness value of the image I
[0103] L(x, y) = 0.299 * R + 0.587 * G + 0.114 * B
[0104]
[0105] In the formula, w and h represent the width and height of the image, and x and y represent the pixel coordinates of the image;
[0106] The calculation formula of the image information entropy D(I k ) is as follows:
[0107]
[0108] In the formula, p i is the probability of the occurrence of a pixel with a gray scale value of i in the image, and L is the total number of gray scales, which is 256 in the embodiment.
[0109] Step S42, for the quality of the image I k , the image definition P(I k ), the image average brightness value AL(I k ) and the image information entropy D(I k ) are normalized; specifically, the normalized value is represented as:
[0110] P(I k ) * = P(I k ) / P max
[0111]
[0112] D(I k ) * = D(I k ) / D max
[0113] Wherein, D max is the maximum value of the image information entropy in the same near-duplicate image group, and P maxThe maximum value of the image sharpness in the same near-duplicate image group. In this embodiment, the image sharpness, the image average brightness value and the image information entropy are calculated respectively for subsequent analysis and processing.
[0114] Step S43, the final image comprehensive quality evaluation value Q(I k ) is obtained by calculating the weighted value of the normalized value. k The calculation formula of the image comprehensive quality evaluation value Q(I k ) is as follows:
[0115] Q(I k ) = λ1×D(I k ) * + λ2×P(I k ) * + λ3×AL(I k ) *
[0116] Wherein, λ1, λ2, λ3 are weight factors, λ1+λ2+λ3=1. In this embodiment, the final image comprehensive quality evaluation value can be obtained by calculating the weighted value of the three normalized values.
[0117] Step S4 further includes: quality measurement of the images in each group of duplicate images according to the image comprehensive quality evaluation value, the images are sorted from high to low according to the evaluation value, and the image at the forefront is called the centroid image; for each group of near-duplicate images, the centroid image is retained and the remaining non-centroid images are deleted. In this embodiment, after the deletion of the non-centroid images in all near-duplicate image groups, only one optimal centroid image is left in each group, which greatly reduces the redundancy of the image set.
[0118] In this embodiment, before any detection and processing of the images, all color images in the image set are first subjected to grayscale processing, because the information processing amount of color images is much larger than that of grayscale images, and the characteristic parameters representing image information can still be obtained through the processing of grayscale images; subsequently, coarse grouping and fine grouping are used to detect similar images, and a hash index structure is constructed at each detection stage; in the coarse grouping step, the image set is preliminarily divided by using image color features, in which step the images are divided into k clusters, and the image contents in each cluster are approximately similar; subsequently, the images in each cluster are subjected to fine grouping by using the coarse grouping step, in which step the Sobel operator is used to extract image edge features, these features appear as high-frequency information, which is complementary to the low-frequency DCT coefficients in perceptual hashing, and is conducive to improving the accuracy of approximate data aggregation; finally, the best image in each group after grouping is obtained, which is defined as the centroid image, and the non-centroid images are deleted, thereby achieving the purpose of removing approximate images.
[0119] In the embodiment, due to the high correlation between the three color components in the RGB color space, the stability and robustness of the feature extracted from the RGB components are easily affected. Meanwhile, it is known that the HSI color space is based on the human visual system and can be described by a cone-shaped space model; it can clearly show the changes of hue, saturation and intensity. The hue and saturation are often referred to as chroma, and the human vision is much more sensitive to intensity than to chroma. In order to facilitate color processing and recognition, the HSI color space is often considered, which is more consistent with human visual perception than the RGB color space.
[0120] In the embodiment, the block feature extraction considers extracting the color features of the image, is simple, and can quickly cluster the image set. In addition, in order to avoid the influence of image segmentation and complex background on global feature matching, the division mode of step S21 is adopted for each image in the image set.
[0121] In the embodiment, the image edge detection can well reflect the local texture features of the image, and the image edge detection result based on the Sobel algorithm often appears in high-frequency information, which is complementary to the low-frequency DCT coefficient, and is beneficial to improve the approximate duplicate image redundancy removal precision; the steps of the application well integrate the global features and local features, high-frequency coefficients and low-frequency coefficients of the image, and mainly use low-frequency coefficients. Experiments prove that the Sobel operator is not sensitive to image brightness, so the robustness of detecting the power transmission line images in different time periods is better.
[0122] In the embodiment, after the image is grouped twice, the similarity of the images in the final group is very high. In order to keep one image with the highest quality in each group as much as possible, the other approximate duplicate versions are deleted; the approximate duplicate image evaluation is the key in this stage, and the quality of the images in each group is evaluated to ensure that the centroid image with the optimal quality is reserved in the subsequent stage.
[0123] In the embodiment, after the gray average value of each image sub-block is calculated, the 9-dimensional vector formed can describe the global gray distribution features of an image.
[0124] There are a large number of approximate duplicate images in the image set collected by the unmanned aerial vehicle during power inspection, which is caused by the following reasons:
[0125] (1) The time interval of taking multiple images is short, causing multiple shooting of the same target at the same angle;
[0126] (2) In order to prevent image blur caused by the movement of the unmanned aerial vehicle, the unmanned aerial vehicle is set to take multiple continuous images in a specific area;
[0127] (3) When the unmanned aerial vehicle shoots the target, there are approximate duplicate images in the image set due to the change of the shooting angle.
[0128] The image approximate repetitions caused by the above reasons are not caused by complex transformations, but a large number of image approximate repetitions caused by some color changes, resolution changes and slight noises. For these images, simple block feature matching can be used for filtering first, which is specifically referred to step S2 of the present application.
Claims
1. A method for deduplicating images during power transmission line inspection, characterized in that, Includes the following steps: S1. Acquire inspection images and form an image set. Perform color system conversion based on the inspection images and generate grayscale images of uniform size. S2, extract the block features of the image, obtain the binary hash code based on the average gray value and quantization rules of the image sub-blocks, and perform coarse grouping of the image by clustering the hash codes; S3. For images in the same group within the coarse group, the Sobel operator is used to extract image edge feature vectors, and low-frequency coefficients of the image are extracted based on DCT to obtain multi-dimensional feature vectors and complete the subgrouping. S4: Evaluate the quality of the images, retain the centroid images with the best quality, and delete the non-centroid images; The quality of each group of repeated images is measured based on the overall image quality evaluation value. The images are sorted from high to low according to the evaluation value, and the image at the top is called the centroid image. For each group of nearly repeated images, the centroid image is retained and the other non-centroid images are deleted.
2. The method for deduplicating transmission line inspection images according to claim 1, characterized in that, Step S1 includes the following steps: S11, After obtaining the inspection image, convert the image from the RGB color system to the HSI color system; S12, select the intensity component in the HSI color space to generate a grayscale image, and then use bitriarch interpolation to adjust all images in the image set to an m*m size.
3. A method for deduplicating transmission line inspection images according to claim 1 or 2, characterized in that, Step S2 includes the following steps: S21, the original image is divided into four equal parts by two different division methods, forming 9 image sub-blocks together with the original image, and each image sub-block is marked in sequence; S22, calculate the average gray value of each image sub-block and combine them to form a 9-dimensional vector. Encode the 9-dimensional vector into binary and obtain a 9-dimensional binary hash code according to the quantization rules. After the hash encoding and clustering, several images will be allocated in each hash bucket.
4. A method for deduplicating transmission line inspection images according to claim 1 or 2, characterized in that, Step S3 includes the following steps: S31. After extracting the edge features of the image using the Sobel operator, the image features are recorded. The edge features of each image are recorded by calculating the number of intersections between concentric circles and the image edges, and a 10-dimensional quantization result is obtained. S32: In the top left corner of the 32*32 DCT matrix, find an 8*8 submatrix, calculate the average value of the submatrix elements, and perform quantization hashing on each pixel to obtain the 64-dimensional feature vector quantization result. S33 uses a hash index to construct a 74-dimensional feature vector, mapping images with the same hash value into the same hash bucket.
5. The method for deduplicating transmission line inspection images according to claim 1, characterized in that, The image quality assessment includes the following steps: S41 uses an edge sharpness algorithm to evaluate the image. Clarity Combined with images Calculate the R, G, and B channel values of the image. Brightness value; calculate image Information entropy ; S42, for image The quality of the image sharpness Average image brightness value and image information entropy Perform normalization processing; S43, calculate the weighted sum of the normalized values to obtain the final overall image quality evaluation value. .
6. The method for deduplicating transmission line inspection images according to claim 3, characterized in that, The specific steps for calculating the average gray value of each image sub-block and combining them to form a 9-dimensional vector are as follows: The formula for calculating the average gray value of each image sub-block is as follows: Where M*M represents the resolution of the entire image. This represents the pixel value at the image point (x, y). This represents the k-th image block; the 9-dimensional feature vector is represented as: .
7. The method for deduplicating transmission line inspection images according to claim 5, characterized in that, The clarity The calculation formula is as follows: , In the formula, , Indicates the width and height of the image. This represents the grayscale change rate. image R, G, and B channel values and image The formula for calculating the brightness value is as follows: , In the formula, , The x and y values represent the width and height of the image, respectively, and the x and y values represent the pixel coordinates of the image. Image information entropy The calculation formula is as follows: , In the formula, It represents the probability of a pixel with grayscale value i appearing in the image. L This represents the total number of gray levels.
8. The method for deduplicating transmission line inspection images according to claim 5, characterized in that, The normalized numerical value is expressed as follows: , , , in, It refers to the maximum value of image information entropy within the same group of nearly duplicated images. It refers to the maximum image sharpness within the same group of nearly identical images.
9. A method for deduplicating transmission line inspection images according to claim 8, characterized in that, The overall image quality evaluation value The calculation formula is as follows: , in, As a weighting factor, .
Citation Information
Patent Citations
Detection method of transmission line inspection image homologous file
CN114708447A
Image deduplication method and device, electronic equipment and storage medium
CN114764863A