A method for adaptive clustering and identification of light pollution species at a light emitting port of a navigation light

By combining adaptive clustering and simulated annealing algorithms, the types of contaminants in the light-emitting ports of navigation lights can be accurately identified, solving the problem of inaccurate contaminant identification in existing technologies, improving cleaning efficiency and reducing resource waste.

CN117132799BActive Publication Date: 2026-05-01CIVIL AVIATION UNIV OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CIVIL AVIATION UNIV OF CHINA
Filing Date
2023-09-07
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify the types of contaminants in the light-emitting ports of navigation lights, resulting in poor cleaning performance and failing to effectively consider the impact of contaminant type on cleaning difficulty.

Method used

By combining adaptive clustering and simulated annealing algorithms, image feature analysis is used to determine the number of pollutant types and select initial cluster centers. The Euclidean distance from pollutant pixels to cluster centers is calculated to achieve accurate identification of pollutant types.

Benefits of technology

It enables accurate identification of contaminants at the light-emitting nozzles of navigation lights, provides targeted cleaning solutions, improves cleaning effectiveness, reduces resource waste and cleaning costs, and avoids corrosion of the lights and runway.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117132799B_ABST
    Figure CN117132799B_ABST
Patent Text Reader

Abstract

The application discloses a kind of navigation light emitting port contaminant kind self-adapting cluster identification method, comprising the following steps: obtaining the contaminant image of the navigation light emitting port to be identified;Based on the contaminant image, the number of clusters is determined using self-adapting cluster algorithm;Based on at least two image features for distinguishing the contaminant species of navigation light emitting port, the initial cluster center is screened;Based on the number of clusters, the initial species is assigned to each contaminant pixel point in the contaminant image;The Euclidean distance of each contaminant pixel point in the contaminant image to the initial cluster center is calculated in turn;Judge whether convergence, otherwise, change the species of each contaminant pixel point in the contaminant image;If convergence, output cluster result;Based on the cluster result, the species of the contaminant of the navigation light emitting port to be identified is judged;The application realizes clustering by the obtained contaminant image feature data of the surface of navigation light emitting port, and achieves the effect of accurate identification of contaminant species.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image data mining technology, and more specifically to an adaptive clustering identification method for pollutant types at the light-emitting port of navigation lights. Background Technology

[0002] During the use of navigation lights, the light-emitting nozzles inevitably become contaminated, which can severely impair pilot judgment and threaten pilot safety. Therefore, it is necessary to regularly clean the contamination from the light-emitting nozzles of navigation lights to reduce the probability of aircraft accidents during takeoff and landing and ensure flight safety. Intelligent cleaning technology for navigation lights is gradually emerging. Identification of contaminant types and assessment of contamination levels in the light-emitting nozzles are crucial components of intelligent cleaning and are of great significance to the cleaning operation. Monitoring contaminants in the light-emitting nozzles of navigation lights is to determine their degree of contamination, and based on this, nozzles with different levels of contamination are cleaned differently to ensure that the lighting effect of the lights meets requirements.

[0003] Currently, there is very little research on the detection of contamination in the light-emitting nozzles of navigation lights. The few existing studies only roughly determine the degree of contamination in the light-emitting nozzles of navigation lights to judge whether the cleaning results meet the requirements. Existing cleaning methods are lacking in contamination assessment, that is, they do not consider the impact of the type of contaminant on the cleaning difficulty. Therefore, there is an urgent need for a method that can accurately distinguish the types of contaminants in the light-emitting nozzles of navigation lights in order to improve the cleaning effect in a targeted manner. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide an adaptive clustering identification method for pollutant types at the light-emitting opening of navigation lights. This method can detect and identify pollutants on the surface of the light-emitting opening of navigation lights and cluster them based on their image feature data, thereby achieving accurate identification of pollutant types. This will provide guidance for cleaning solutions and improve cleaning effectiveness.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] This invention provides an adaptive clustering identification method for pollutant types at the light-emitting nozzles of navigation lights, comprising the following steps:

[0007] S1. Obtain an image of the contaminants at the light-emitting port of the navigation lights to be identified;

[0008] S2. Based on the pollutant image, use an adaptive clustering algorithm to determine the number of clusters. The number of clusters is the number of pollutant species in the pollutant image.

[0009] S3. Based on at least two image features used to distinguish the types of pollutants at the light-emitting ports of navigation lights, the simulated annealing algorithm is used to optimize and select the initial cluster centers.

[0010] S4. Based on the cluster number, assign an initial category to each pollutant pixel in the pollutant image;

[0011] S5. Calculate the Euclidean distance from each pollutant pixel in the pollutant image to the initial cluster center in turn, and assign each pollutant pixel in the pollutant image to the initial cluster center with the closest Euclidean distance.

[0012] S6. Determine if convergence has occurred. If not, return to step S4, change the type of each pollutant pixel in the pollutant image, and repeat step S5. If convergence has occurred, output the clustering result.

[0013] S7. Based on the clustering results, determine the types of pollutants in the light-emitting ports of the navigation lights to be identified.

[0014] Furthermore, in step S3, the method for determining the image features used to distinguish the types of pollutants at the light-emitting nozzles of navigation lights is as follows:

[0015] Collect images of single pollutants and statistically analyze their image features, including contrast, energy, entropy, inverse gap, and correlation features.

[0016] A scatter plot is drawn from certain image feature data of images of different pollutants, and the ability of this type of image feature to distinguish different pollutants is judged based on its distribution.

[0017] Image features with the best ability to distinguish pollutant types are selected for subsequent pollutant detection and differentiation.

[0018] Further, in step S2, based on the pollutant image, an adaptive clustering algorithm is used to determine the number of clusters, specifically including:

[0019] S21. Statistically analyze the gray-level frequency of pollutant images, plot a gray-level histogram, and smooth it to obtain the smoothed data y1.

[0020] S22. Take the first derivative of y1 and normalize the non-zero data to obtain array d1;

[0021] S23. Determine the position of the wave peak based on array d1, process the wave peak position within a certain range, and obtain the number of wave peaks p1.

[0022] S24. Calculate the inverse difference value of each pollutant pixel whose gray value is less than 155, scale it between 0 and 255, draw a histogram and smooth it to obtain data y2.

[0023] S25. Take the first derivative of y2 and normalize the non-zero data to obtain array d2;

[0024] S26. Determine the position of the wave peak based on array d2, process the position of the wave peak within a certain range, and obtain the number of wave peaks p2.

[0025] S27. The number of clusters is obtained as K = p1 + p2 - 1.

[0026] Further, the smoothing process in step S21 specifically includes: smoothing using a moving average method, with a window length set to 11, the original data being x, and the smoothed data being y. The expression for the smoothed data is:

[0027]

[0028] Where x(i) is the i-th x, and when x(i) does not exist, it is treated as 0;

[0029] In step S22, the normalization formula for the non-zero data in array d1 is as follows:

[0030]

[0031] In step S23, the peak position is processed within a certain range. Specifically, the peak is averaged within the range of 21. If a peak appears at ten gray levels before and after i, it is considered to be the same peak. The method to determine whether it is a peak is: solve the array d1 to obtain an array of 0, 1, -1. Then, judge three consecutive values ​​in it. The slope corresponding to the peak is first positive, then 0 and finally negative, that is, 1, 0, -1. Find the number of consecutive three numbers in the array that are arranged in [1, 0, -1] to get the number of peaks.

[0032] The smoothing process in step S24 specifically involves: using a moving average method to smooth the data, setting the window length to 11, with the original data as x and the smoothed data as y, resulting in the expression for the smoothed data:

[0033]

[0034] When x(i) does not exist, it is treated as 0; x(i) is the i-th number in the original data; finally, the array y2 is obtained.

[0035] In step S25, the formula for taking the first derivative of y2 and normalizing the non-zero data is as follows:

[0036]

[0037] In step S26, processing the position of the peak within a certain range specifically involves averaging the peak within the range of 21. If a peak appears at ten gray levels before and after i, it is considered to be the same peak.

[0038] In step S26, the method for determining the number of peaks is as follows: solve the array d2 to obtain an array of 0, 1, -1, and then judge three consecutive values ​​in it. The slope corresponding to the peak is first positive, then 0 and finally negative, that is, 1, 0, -1. The number of peaks can be obtained by finding the number of consecutive three numbers in the array arranged as [1, 0, -1].

[0039] Furthermore, in step S3, based on at least two image features used to distinguish the types of pollutants at the light-emitting nozzles of navigation lights, a simulated annealing algorithm is used for optimization to select initial cluster centers, specifically including:

[0040] S31. Calculate the gray level, feature 1, and feature 2 of each pixel in the pollutant image. Feature 1 and feature 2 are image features that distinguish the types of pollutants at the light outlet of navigation lights. Store the three data of each pixel as a vector v, and combine the feature vectors of all pixels to obtain an n×3 feature vector matrix vec, where n is the number of pixels in the image, and the three elements of each row are the gray level, feature 1, and feature 2 of that pixel, respectively.

[0041] S32. Set the starting temperature, ending temperature and number of iterations, select the initial cluster center C, assign the initial type to each pollutant pixel in the pollutant image, and calculate the initial objective function J(C).

[0042] S33. Change the type of each pollutant pixel in a part of the pollutant image to cause perturbation, obtain a new solution C', and calculate the objective function J(C');

[0043] S34. Calculate the objective function difference ΔT = J(C') - J(C);

[0044] S35. When △T < 0, accept the new solution; otherwise, accept the new solution according to the Metropolis criterion.

[0045] S36. Determine if the number of iterations has been reached. If the number of iterations has been reached, determine if the termination condition is met. If the number of iterations has not been reached, return to step S33. If the termination condition is met, return the optimal solution. If the termination condition is not met, decrease the temperature value and return to step S33.

[0046] S37. Return the optimal solution.

[0047] Furthermore, in step S32, the starting temperature, ending temperature, and number of iterations are set, specifically including: setting the starting temperature T = 100, the ending temperature Ts = 1, and the number of iterations L = 300.

[0048] Further, in step S32, selecting the initial cluster center C specifically includes: when setting the initial K=3 cluster centers, the first cluster center is the first row element of vec, the second cluster center is the second row element of vec, and the third cluster center is the column mean of all remaining row elements of vec.

[0049] Furthermore, in step S32, an initial category is assigned to each pollutant pixel in the pollutant image, specifically including: there are K categories in total, that is, the number of clusters is K, the first pixel is the first category, the second pixel is the second category, and the remaining pixels are the third category.

[0050] Furthermore, in step S32, the initial objective function J(C) is calculated as follows:

[0051]

[0052] Where k is the number of clusters, C i Let p be the cluster center of the i-th class, and p be the data contained in the i-th class. In the process of calculating the objective function, only the first two data of each row are used, namely the gray level and the inverse gap data.

[0053] In the initial objective function, J1 = 0, J2 = 0, and J3 is calculated according to the formula. The total objective function is J = J1 + J2 + J3.

[0054] The termination condition in step S36 is: reaching the termination temperature, the type of each pollutant pixel in the pollutant image no longer changing, the cluster center no longer changing, and the overall objective function J reaching a local minimum. Any one of these four conditions must be met.

[0055] Furthermore, in step S6, the convergence condition is: the type of each pollutant pixel in the pollutant image no longer changes, the cluster center no longer changes, and the sum of squared errors is locally minimized; any one of these three conditions must be met; wherein, the sum of squared errors is the overall objective function J.

[0056] As can be seen from the above technical solution, compared with the prior art, the technical effects of the present invention are as follows:

[0057] In this invention, an adaptive clustering algorithm is used to determine the number of clusters in the pollutant image of the navigation light's luminous outlet, thus identifying the number of pollutant types in the image. Then, a simulated annealing algorithm is used for optimization, selecting cluster centers and assigning initial types to each pollutant pixel in the image. Further, by calculating the Euclidean distance from each pollutant pixel to the initial cluster center, each pollutant pixel is assigned to the initial cluster center with the closest Euclidean distance. The types of each pollutant pixel are continuously changed until convergence, yielding the final type of each pollutant. This invention performs pollutant removal before the cleaning operation of navigation light equipment. The assessment of contaminants allows for the identification of various types of pollution that may affect the light-emitting nozzles of navigation lights, including but not limited to oil stains, adhesive residues, smog and dust accumulation, water stains, and salt deposits. This provides a strong basis for setting cleaning parameters for cleaning equipment. In this invention, the image feature data of contaminants on the surface of the light-emitting nozzles of navigation lights are clustered to achieve accurate identification of contaminant types. Different cleaning intensities can be applied to contaminants of different levels of pollution at the light-emitting nozzles of navigation lights. While improving the performance and efficiency of cleaning equipment, this invention also has the advantages of reducing resource waste and lowering costs, effectively solving the problem of erosion and damage to the lights and surrounding runways and roads caused by excessive cleaning pressure. Attached Figure Description

[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0059] The adaptive clustering identification method for pollutant types at the light-emitting port of the navigation lights of the present invention will be further described below with reference to the accompanying drawings;

[0060] Figure 1 This is the overall flowchart of the adaptive clustering identification method for pollutant types at the light-emitting ports of navigation lights in this invention;

[0061] Figure 2 This is a flowchart illustrating the adaptive clustering algorithm used to obtain the number of clusters in the adaptive clustering identification method for pollutant types at the light-emitting port of navigation lights in this invention.

[0062] Figure 3 This is a flowchart illustrating the adaptive selection of cluster centers using the simulated annealing algorithm in the adaptive clustering identification method for pollutant types at the light-emitting port of navigation lights in this invention. Detailed Implementation

[0063] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0064] To better understand the purpose, structure, and function of this invention, the invention will be described in further detail below with reference to the accompanying drawings.

[0065] This invention discloses an embodiment of an adaptive clustering identification method for pollutant types at the light-emitting port of a navigational lighting fixture, comprising the following steps:

[0066] S1. Obtain an image of the contaminants at the light-emitting port of the navigation lights to be identified;

[0067] S2. Based on the pollutant image, use an adaptive clustering algorithm to determine the number of clusters. The number of clusters is the number of pollutant species in the pollutant image.

[0068] S3. Based on at least two image features used to distinguish the types of pollutants at the light-emitting ports of navigation lights, the simulated annealing algorithm is used to optimize and select the initial cluster centers.

[0069] S4. Based on the cluster number, assign an initial category to each pollutant pixel in the pollutant image;

[0070] S5. Calculate the Euclidean distance from each pollutant pixel in the pollutant image to the initial cluster center in turn, and assign each pollutant pixel in the pollutant image to the initial cluster center with the closest Euclidean distance.

[0071] S6. Determine if convergence has occurred. If not, return to step S4, change the type of each pollutant pixel in the pollutant image, and repeat step S5. If convergence has occurred, output the clustering result.

[0072] S7. Based on the clustering results, determine the types of pollutants in the light-emitting ports of the navigation lights to be identified.

[0073] This addresses various types of contamination that may occur to the light-emitting ports of embedded navigation lights, including but not limited to oil stains, adhesive residue, smog and dust accumulation, water stains, and salt condensation.

[0074] In step S3, the method for determining the image features used to distinguish the types of pollutants at the light-emitting nozzles of navigation lights is as follows:

[0075] Collect images of single pollutants and statistically analyze their image features, including contrast, energy, entropy, inverse gap, and correlation features.

[0076] A scatter plot is drawn from certain image feature data of images of different pollutants, and the ability of this type of image feature to distinguish different pollutants is judged based on its distribution.

[0077] Image features with the best ability to distinguish pollutant types are selected for subsequent pollutant detection and differentiation.

[0078] The pollutant detection differentiation includes (1) adaptively determining the number of clusters and (2) adaptively determining the initial cluster centers.

[0079] (1) Adaptive determination of cluster number

[0080] For a contaminated image to be clustered, the first step is to determine the number of clusters K, that is, to determine how many types of contaminants are in the image.

[0081] In this invention, the number of clusters K is determined using the histogram approach.

[0082] First, count the grayscale frequency in the image, draw a grayscale histogram, and then smooth the histogram.

[0083] If there is contamination in the image, due to the difference between the gray-scale distribution of the contaminants and the gray-scale distribution of the background, it will be reflected in the form of peaks at different locations in the image.

[0084] Next, the derivative of the smoothed histogram is calculated and the resulting values ​​are normalized, resulting in an array containing only 0, 1, and -1. Then, three consecutive numbers are analyzed, and the slope corresponding to the peak value is first positive, then 0, and finally negative, i.e., 1, 0, -1. This allows us to determine the location of the peak value. The number of peak values ​​is then counted and recorded.

[0085] Following the same approach, the inverse gap information of the image was statistically analyzed using a histogram. Due to the differences in the inverse gap values ​​of different pollutants, the number of pollutants would also be reflected in the form of peaks, and the number of these peaks was also recorded.

[0086] The required number of clusters, K, is obtained by adding the two peak numbers and subtracting one.

[0087] (2) Adaptive determination of initial cluster centers

[0088] Clustering is highly sensitive to the selection of initial cluster centers; poor initial cluster centers can lead to unsatisfactory clustering results. The simulated annealing algorithm aims to find the global optimum.

[0089] This invention uses a simulated annealing algorithm to optimize and select initial cluster centers.

[0090] After setting the initial parameters and assigning the initial categories, determine the initial objective function to be used.

[0091] The initial objective function calculation only considers two feature values: grayscale and the feature with the best ability to distinguish pollutant types. However, when storing the feature vector, three are required: grayscale, the feature with the best ability to distinguish pollutant types (feature one), and the feature with the second best ability to distinguish pollutant types (feature two). The reason for this is that if only the features used in the calculation are stored as feature vectors, meaning only grayscale and feature one are used, the cluster centers output by the simulated annealing algorithm will only have two numbers [grayscale and feature one]. Since grayscale is not used for pollutant type distinction, and only feature one is used to distinguish pollutant types, the subsequent clustering process will not effectively distinguish pollutant types. Therefore, at least two features are needed, meaning the cluster centers output by the simulated annealing algorithm need to have three numbers [grayscale feature one and feature two], so that the output cluster centers can be used for subsequent clustering. Therefore, in the simulated annealing stage for selecting initial center points, the feature vector uses three columns of data, but only the first two columns are used in the calculation.

[0092] In this embodiment of the invention, taking oil stains and adhesive residues as examples, in order to determine the image features that can effectively distinguish between adhesive residues and oil stains, single-pollutant test pieces are collected or made, that is, the pollution images contain only adhesive residue pollution or oil stain pollution. A sufficient number of single pollution images of different pollutants are collected, their texture feature data are statistically analyzed, and a scatter plot is drawn. Based on their distribution, the two types of features with the best distinguishability are selected.

[0093] In this embodiment, 50 images each of oil stains and adhesive residues were taken as single contaminants, and their contrast, energy, entropy, inverse difference, and correlation characteristics were statistically analyzed. The inverse difference was found to be the most effective distinguishing feature for different contaminants, followed by correlation. These two features were selected for contaminant detection and identification. Inverse difference and correlation were designated as feature one and feature two, respectively.

[0094] In this embodiment of the invention, step S2, which involves determining the number of clusters based on the pollutant image using an adaptive clustering algorithm, specifically includes:

[0095] S21. Statistically analyze the gray-level frequency of pollutant images, plot a gray-level histogram, and smooth it to obtain the smoothed data y1.

[0096] S22. Take the first derivative of y1 and normalize the non-zero data to obtain array d1;

[0097] S23. Determine the position of the wave peak based on array d1, process the wave peak position within a certain range, and obtain the number of wave peaks p1.

[0098] S24. Calculate the inverse difference value of each pollutant pixel whose gray value is less than 155, scale it between 0 and 255, draw a histogram and smooth it to obtain data y2.

[0099] S25. Take the first derivative of y2 and normalize the non-zero data to obtain array d2;

[0100] S26. Determine the position of the wave peak based on array d2, process the position of the wave peak within a certain range, and obtain the number of wave peaks p2.

[0101] S27. The number of clusters is obtained as K = p1 + p2 - 1.

[0102] Further, the smoothing process in step S21 specifically includes: smoothing using a moving average method, with a window length set to 11, the original data being x, and the smoothed data being y. The expression for the smoothed data is:

[0103]

[0104] Where x(i) is the i-th x, and when x(i) does not exist, it is treated as 0: finally, the smoothed array y1 is obtained;

[0105] In step S22, the normalization formula for the non-zero data in array d1 is as follows:

[0106]

[0107] In step S23, the peak position is processed within a certain range. Specifically, the peak is averaged within the range of 21. If a peak appears at ten gray levels before and after i, it is considered to be the same peak. The method to determine whether it is a peak is: solve the array d1 to obtain an array of 0, 1, -1. Then, judge three consecutive values ​​in it. The slope corresponding to the peak is first positive, then 0 and finally negative, that is, 1, 0, -1. Find the number of consecutive three numbers in the array that are arranged in [1, 0, -1] to get the number of peaks.

[0108] The smoothing process in step S24 specifically involves: using a moving average method to smooth the data, setting the window length to 11, with the original data as x and the smoothed data as y, and obtaining the expression for the smoothed data as follows:

[0109]

[0110] Where x(i) is the i-th number in the original data. When x(i) does not exist, it is treated as 0. Finally, the array y2 is obtained.

[0111] In step S25, the formula for taking the first derivative of y2 and normalizing the non-zero data is as follows:

[0112]

[0113] In step S26, processing the position of the peak within a certain range specifically involves averaging the peak within the range of 21. If a peak appears at ten gray levels before and after i, it is considered to be the same peak.

[0114] In step S26, the method for determining the number of peaks is as follows: solve the array d2 to obtain an array of 0, 1, -1, and then judge three consecutive values ​​in it. The slope corresponding to the peak is first positive, then 0 and finally negative, that is, 1, 0, -1. The number of peaks can be obtained by finding the number of consecutive three numbers in the array arranged as [1, 0, -1].

[0115] In this embodiment of the invention, step S3, based on at least two image features used to distinguish the types of pollutants at the light-emitting nozzles of navigation lights, uses a simulated annealing algorithm to optimize and select initial cluster centers, specifically including:

[0116] S31. Calculate the gray level, inverse difference, and correlation of each pixel in the pollutant image. Store the three data of each pixel as a vector v. Combine the feature vectors of all pixels to obtain an n×3 feature vector matrix vec, where n is the number of pixels in the image, and the three elements of each row are the gray level, inverse difference, and correlation of the pixel, respectively.

[0117] S32. Set the starting temperature, ending temperature and number of iterations, select the initial cluster center C, assign the initial type to each pollutant pixel in the pollutant image, and calculate the initial objective function J(C).

[0118] S33. Change the type of each pollutant pixel in a part of the pollutant image to cause perturbation, obtain a new solution C', and calculate the objective function J(C');

[0119] S34. Calculate the objective function difference ΔT = J(C') - J(C);

[0120] S35. When △T < 0, accept the new solution; otherwise, accept the new solution according to the Metropolis criterion.

[0121] S36. Determine if the number of iterations has been reached. If the number of iterations has been reached, determine if the termination condition is met. If the number of iterations has not been reached, return to step S33. If the termination condition is met, return the optimal solution. If the termination condition is not met, decrease the temperature value and return to step S33.

[0122] S37. Return the optimal solution.

[0123] In this embodiment of the invention, setting the initial parameters specifically includes: setting the starting temperature T = 100, the ending temperature Ts = 1, and the number of iterations L = 300.

[0124] In this embodiment of the invention, the selection of the initial cluster center C specifically includes: setting an initial K = 3 cluster centers, the first cluster center being the first row element of vec, the second cluster center being the second row element of vec, and the third cluster center being the column mean of all remaining row elements of vec.

[0125] In step S32, an initial category is assigned to each pollutant pixel in the pollutant image. Specifically, there are K categories in total, that is, the number of clusters is K. The first pixel is the first category, the second pixel is the second category, and the remaining pixels are the third category.

[0126] In step S32, the initial objective function J(C) is calculated as follows:

[0127]

[0128] Where k is the number of clusters, C i Let p be the cluster center of the i-th class, and p be the data contained in the i-th class. In the process of calculating the objective function, only the first two data of each row are used, namely the gray level and the inverse gap data.

[0129] In this embodiment of the invention, in the initial objective function, J1 = 0, J2 = 0, and J3 is calculated according to the formula, and the total objective function is J = J1 + J2 + J3.

[0130] In this embodiment of the invention, the termination condition in step S36 is: reaching the termination temperature, the type of each pollutant pixel in the pollutant image no longer changing, the cluster center no longer changing, and the objective function J reaching a local minimum; any one of these four conditions must be met.

[0131] In this embodiment of the invention, in step S6, the convergence condition is: the type of each pollutant pixel in the pollutant image no longer changes, the cluster center no longer changes, and the sum of squared errors is locally minimized; any one of these three conditions must be met; wherein, the sum of squared errors is the overall objective function J.

[0132] In this embodiment of the invention, after clustering is completed, the next step is to determine the category corresponding to the clustering results. A grayscale threshold is used to determine whether it is background or contaminant, and an inverse difference threshold is used to determine whether it is adhesive residue or oil stains.

[0133] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An adaptive clustering method for identifying pollutant types at the light-emitting port of a navigational lighting fixture, characterized in that, Includes the following steps: S1. Obtain an image of the contaminants at the light-emitting port of the navigation lights to be identified; S2. Based on the pollutant image, use an adaptive clustering algorithm to determine the number of clusters. The number of clusters is the number of pollutant species in the pollutant image. S3. Based on at least two image features used to distinguish the types of pollutants at the light-emitting ports of navigation lights, the simulated annealing algorithm is used to optimize and select the initial cluster centers. S4. Based on the cluster number, assign an initial category to each pollutant pixel in the pollutant image; S5. Calculate the Euclidean distance from each pollutant pixel in the pollutant image to the initial cluster center in turn, and assign each pollutant pixel in the pollutant image to the initial cluster center with the closest Euclidean distance. S6. Determine whether convergence has occurred. If not, return to step S4, change the type of each pollutant pixel in the pollutant image, and repeat step S5. If convergence is achieved, output the clustering results; S7. Based on the clustering results, determine the types of pollutants in the light-emitting ports of the navigation lights to be identified.

2. The adaptive clustering identification method for pollutant types at the light-emitting port of navigation lights according to claim 1, characterized in that, In step S3, the method for determining the image features used to distinguish the types of pollutants at the light-emitting nozzles of navigation lights is as follows: Collect images of a single pollutant and analyze its image features. Including contrast, energy, entropy, inverse gap, and correlation features; A scatter plot is drawn from certain image feature data of images of different pollutants, and the ability of this type of image feature to distinguish different pollutants is judged based on its distribution. Image features with the best ability to distinguish pollutant types are selected for subsequent pollutant detection and differentiation.

3. The adaptive clustering identification method for pollutant types at the light-emitting port of navigation lights according to claim 1, characterized in that, In step S2, based on the pollutant image, an adaptive clustering algorithm is used to determine the number of clusters, specifically including: S21. Statistically analyze the gray-level frequency of pollutant images, plot a gray-level histogram, and smooth it to obtain the smoothed data y1. S21, smoothing, specifically includes: smoothing using a moving average method, with a window length set to 11, the original data being x, and the smoothed data being y. The expression for the smoothed data is: ; Where x(i) is the i-th number in the original data. When x(i) does not exist, it is treated as 0. S22. Take the first derivative of y1 and normalize the non-zero data to obtain array d1; S23. Determine the position of the wave peak based on array d1, process the wave peak position within a certain range, and obtain the number of wave peaks p1. In step S23, determining the position of the peak based on array d1 specifically includes: solving array d1 to obtain an array of 0, 1, -1, and then judging three consecutive values ​​in it. The slope corresponding to the peak is first positive, then 0, and finally negative, i.e., 1, 0, -1. The number of peaks can be obtained by finding the number of consecutive three numbers in the array arranged as [1, 0, -1]. In S23, the peak positions are processed within a certain range to obtain the number of peaks p1. Specifically, the peaks are averaged within the range of 21. If a peak appears at ten gray levels before and after i, it is considered to be the same peak. The presence of pollutants in the pollutant image is determined based on the number of peaks p1. S24. Calculate the inverse difference value of each pollutant pixel whose gray value is less than 155, scale it between gray values ​​0-255, draw a histogram and smooth it to obtain data y2. S25. Take the first derivative of y2 and normalize the non-zero data to obtain array d2; S26. Determine the position of the peak based on array d2, and process the position of the peak within a certain range to obtain the number of peaks p2; determine whether there are pollutants in the pollutant image based on the number of peaks p2. In S26, the position of the peak is processed within a certain range. Specifically, the peak is averaged within the range of 21. If a peak appears at ten gray levels before and after i, it is considered to be the same peak. S27. The number of clusters is obtained as K = p1 + p2 - 1.

4. The adaptive clustering identification method for pollutant types at the light-emitting port of navigation lights according to claim 3, characterized in that, In step S22, the non-zero data in array d1 are normalized to obtain array d1, specifically including: ; In step S23, determining whether there are pollutants in the pollutant image based on the value of p1 specifically includes: when p1=1, there are no pollutants in the pollutant image; when p1=2, there are pollutants in the pollutant image.

5. The adaptive clustering identification method for pollutant types at the light-emitting port of navigation lights according to claim 1, characterized in that, In step S3, based on at least two image features used to distinguish the types of contaminants at the light-emitting nozzles of navigation lights, a simulated annealing algorithm is used to optimize and select initial cluster centers, specifically including: S31. Calculate the gray level, feature 1, and feature 2 of each pixel in the pollutant image. Feature 1 and feature 2 are image features that distinguish the types of pollutants at the light outlet of navigation lights. Store the three data of each pixel as a vector v, and combine the feature vectors of all pixels to obtain an n×3 feature vector matrix vec, where n is the number of pixels in the image, and the three elements of each row are the gray level, feature 1, and feature 2 of that pixel, respectively. S32. Set the starting temperature, ending temperature and number of iterations, select the initial cluster center C, assign the initial type to each pollutant pixel in the pollutant image, and calculate the initial objective function J(C). S33. Change the type of each pollutant pixel in a part of the pollutant image to cause perturbation, obtain a new solution C', and calculate the objective function J(C'). S34. Calculate the objective function difference ΔT = J(C') - J(C); S35. When △T < 0, accept the new solution; otherwise, accept the new solution according to the Metropolis criterion. S36. Determine if the number of iterations has been reached. If the number of iterations has been reached, determine if the termination condition is met. If the number of iterations has not been reached, return to step S33. If the termination condition is met, return the optimal solution. If the termination condition is not met, decrease the temperature value and return to step S33. S37. Return the optimal solution.

6. The adaptive clustering identification method for pollutant types at the light-emitting port of navigation lights according to claim 5, characterized in that, In step S32, the starting temperature, ending temperature, and number of iterations are set, specifically including: setting the starting temperature T=100, the ending temperature Ts=1, and the number of iterations L=300.

7. The adaptive clustering identification method for pollutant types at the light-emitting port of navigation lights according to claim 5, characterized in that, In step S32, selecting the initial cluster center C specifically includes: when setting the initial K=3 cluster centers, the first cluster center is the first row element of vec, the second cluster center is the second row element of vec, and the third cluster center is the column mean of all remaining row elements of vec.

8. The adaptive clustering identification method for pollutant types at the light-emitting port of navigation lights according to claim 5, characterized in that, In step S32, an initial category is assigned to each pollutant pixel in the pollutant image. Specifically, there are K categories in total, that is, the number of clusters is K. The first pixel is the first category, the second pixel is the second category, and the remaining pixels are the third category.

9. The adaptive clustering identification method for pollutant types at the light-emitting port of navigation lights according to claim 5, characterized in that, In step S32, the initial objective function J(C) is calculated as follows: in The number of clusters, For the first Cluster centers of classes For the first The data contained in the class only uses the first two data points of each row during the objective function calculation process, namely the grayscale and inverse gap data; In the initial objective function, J1=0, J2=0, and J3 is calculated according to the formula. The total objective function is J=J1+J2+J3. The termination condition in step S36 is: reaching the termination temperature, the type of each pollutant pixel in the pollutant image no longer changing, the cluster center no longer changing, and the overall objective function J reaching a local minimum. Any one of these four conditions must be met.

10. The adaptive clustering identification method for pollutant types at the light-emitting port of navigation lights according to claim 1, characterized in that, In step S6, the convergence condition is: The pollutant image should not change the type of each pollutant pixel, the cluster center should not change, and the sum of squared errors should be minimized locally. Satisfying any one of these three conditions is sufficient; wherein, the sum of squared errors is the overall objective function J.

Citation Information

Patent Citations

  • Image segmentation method based on improved whale optimal fuzzy clustering

    CN108389211A

  • Rainfall fuzzy clustering method based on double-link attenuation

    CN113111593A