An aluminum alloy production control and management method based on image enhancement

The adaptive image enhancement method improves defect recognition in aluminum alloys by optimizing clustering centers through weighted distance adjustments, addressing inaccuracies in fixed cutoff distance methods and enhancing production control.

CN120147322BActive Publication Date: 2025-07-15SHAANXI DAQIN ALUMINUM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510629904.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-07-15
Estimated Expiration
2045-05-16

AI Technical Summary

Technical Problem

When the existing density peak clustering algorithm recognizes surface defects of aluminum alloys, the cluster center deviation caused by the fixed cutoff distance, which affects the accuracy of the defect recognition results.

Method used

By obtaining the grayscale image of the aluminum alloy surface, light source compensation is used to construct feature points, the weighting coefficient is calculated using the density peak clustering algorithm, the adaptive cutoff distance is determined, cluster clusters are generated, and production process parameters are adjusted based on the defect probability of the cluster clusters.

Benefits of technology

It improves the accuracy of defect identification, realizes accurate control of the aluminum alloy production process, and ensures product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147322B_ABST
    Figure CN120147322B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of image processing. More specifically, the present invention relates to an aluminum alloy production control method based on image enhancement. The method includes: performing light source compensation on the image to be measured, constructing feature points based on the position coordinates and compensated gray values of pixel points, and clustering all feature points using the density peak clustering algorithm. During the clustering process, the truncation distance is adaptively adjusted based on the distance characteristics between each feature point and its neighboring feature points, so as to obtain the clustering result based on the density peak clustering algorithm with an adaptive truncation distance. After that, the defect probability of each clustering cluster is determined based on the number of pixel points and the average gray value, and the clustering clusters with a defect probability greater than a preset threshold are screened for masking processing, so as to identify the defect area on the surface of the aluminum alloy to be measured based on the obtained target image. The present invention can accurately identify different types of defect areas, thereby realizing precise monitoring of the aluminum alloy production process.
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 processing. More specifically, the present invention relates to a method for controlling and managing aluminum alloy production based on image enhancement. Background Art

[0002] As a structural material widely used in the industrial field, the surface quality of aluminum alloy directly affects the mechanical properties and appearance quality of products. In production processes such as rolling, heat treatment, and stamping, if the temperature field distribution is uneven, the pressure parameters are mismatched, or the cooling rate is abnormal, it will cause distortion of the grain structure inside the material, and then form defects such as surface dents, cracks, and oxidation spots. Therefore, by identifying the types of these defects, it is possible to trace back to the specific abnormal production process links, and then timely adjust the production process of aluminum alloy to ensure product quality.

[0003] In the prior art, a clustering analysis method based on image gray-scale features has been applied to the field of surface defect detection, such as the Clustering by Fast Search and Find of Density Peaks algorithm. The principle of this algorithm for clustering is: by calculating the local density and relative distance of sample points, samples with both high density and long-distance characteristics are selected as clustering centers.

[0004] However, the conventional density peak clustering algorithm requires setting a cut-off distance to determine the calculation range of local density, which is usually a fixed value. The selection of the cut-off distance has a great influence on the clustering result. When the cut-off distance is small, the calculation range of local density is limited, resulting in insufficient density estimation for large-scale defects and unable to correctly identify their continuity characteristics; conversely, when the cut-off distance is large, the determined local density will be diluted by data in different surrounding regions, resulting in errors in clustering centers and affecting the accuracy of subsequent analysis results. Summary of the Invention

[0005] In order to solve the problem that when using the conventional density peak clustering algorithm to identify different defect types, due to the limitation of the fixed cut-off distance, the obtained clustering centers are deviated, which in turn affects the accuracy of defect recognition results, the present invention provides a method for controlling and managing aluminum alloy production based on image enhancement. The method includes:

[0006] Obtain a grayscale image of the surface of the aluminum alloy to be tested to obtain a to-be-tested image;

[0007] Perform light source compensation on the grayscale values of each pixel point in the to-be-tested image. After the compensation is completed, construct feature points for each pixel point, and each feature point is composed of the position coordinates of the pixel point and the compensated grayscale value;

[0008] All feature points are clustered using the density peak clustering algorithm. During the clustering process, the sum of the distances between each feature point and its neighboring feature points is calculated, and the obtained cumulative sum is quantized into a preset range to obtain the weighting coefficient of each feature point. The feature point clustering is completed based on the adaptive cut-off distance determined by the weighting coefficient, and several clustering clusters are generated;

[0009] Based on the number of pixel points and the average gray value in the clustering cluster, the defect probability of each clustering cluster is calculated, and the clustering clusters with defect probabilities greater than the preset threshold are screened for masking processing to generate a target image, and the production process parameters of the aluminum alloy are adjusted based on the defect type identified from the target image.

[0010] The feature points constructed in the present invention can reflect the true situation of the surface of the aluminum alloy to be measured. For feature points with high similarity in position and gray value to neighboring feature points, by reducing their cut-off distance, the probability of selecting a clustering center in these regions can be increased; while for feature points with low similarity in position and gray value to surrounding neighboring feature points, by increasing their cut-off distance, the probability of selecting a clustering center in these regions can be reduced, so that a clustering center with higher accuracy can be obtained, providing an accurate data basis for subsequent defect identification, and thus the precise control of the aluminum alloy production process can be realized based on the defect identification result.

[0011] Preferably, light source compensation is performed on the gray values of each pixel point in the image to be measured, including:

[0012] Taking the gray value of the ambient light source color as the reference gray value, calculating the average difference between the gray values of the pixel points surrounding each pixel point in the image to be measured and the reference gray value, and mapping the average difference to the light source interference index of the pixel point through the negative natural exponential function;

[0013] Using the light source interference index, downward compensation is performed on the gray values of each pixel point in the image to be measured, and the compensated gray value is negatively correlated with the light source interference index of the corresponding pixel point.

[0014] The present invention can reduce the influence of light, so that the compensated gray value can better reflect the true situation of the surface of the aluminum alloy to be measured.

[0015] Preferably, using the light source interference index, downward compensation is performed on the gray values of each pixel point in the image to be measured, satisfying the following relationship:

[0016] ;

[0017] In the formula, is the compensation value of the gray value of the th pixel point; is the gray value of the th pixel point; is the The light source interference index of a pixel point; is the floor symbol.

[0018] Preferably, the light source interference index satisfies the following relational expression:

[0019] ;

[0020] In the formula, is the light source interference index of the th pixel point; is the reference gray value; is the gray value of the th pixel point within the eight-neighborhood range of the th pixel point; is the number of pixel points within the eight-neighborhood range of the th pixel point; is the natural exponential function; is the absolute value symbol.

[0021] The present invention can evaluate the influence of environmental light sources on each pixel point by using the characteristics that the gray values of pixel points in the strong light source area are relatively uniform and the gray values are relatively close to the gray value of the light source.

[0022] Preferably, the method for obtaining the neighboring feature points includes:

[0023] Obtain the preset initial truncation distance when clustering all feature points by the density peak clustering algorithm, calculate the distance between any two feature points, and take the feature points whose distance from any feature point is less than the initial truncation distance as the neighboring feature points of any feature point.

[0024] Preferably, the weighting coefficients of each feature point satisfy the following relational expression:

[0025] ;

[0026] In the formula, is the weighting coefficient of the th feature point; is the distance between the th feature point and the th neighboring feature point; is the number of selected neighboring feature points; is the normalization function.

[0027] The present invention can quantify the weighting coefficient between 0.5 and 1.5, limit the correction amplitude of the initial truncation distance, and thus avoid excessive correction of the initial truncation distance.

[0028] Preferably, the method for obtaining the adaptive truncation distance includes:

[0029] Perform a multiplication operation on the weighting coefficients of each feature point and the initial truncation distance to obtain the adaptive truncation distance of each feature point.

[0030] Preferably, the method for obtaining the initial truncation distance includes:

[0031] Sort the distances between any two feature points in ascending order, and intercept the distance values of the first preset quantile in the ordered sequence as the initial truncation distance.

[0032] The way of determining the initial truncation distance in the present invention is the same as that in the conventional density peak clustering algorithm, which can ensure the rationality of the selection of the initial truncation distance.

[0033] Preferably, calculating the defect probability of each clustering cluster based on the number of pixel points and the average gray value in the clustering cluster includes:

[0034] Perform a multiplication operation on the number of pixel points and the average gray value in any clustering cluster, and take the normalized value of the reciprocal of the obtained product as the defect probability of any clustering cluster.

[0035] Preferably, screening the clustering clusters with defect probabilities greater than a preset threshold for masking processing to generate a target image includes:

[0036] Mark the pixel points in the clustering clusters with defect probabilities greater than the preset threshold as defect pixel points, and perform masking processing on all defect pixel points to highlight the area where the defect pixel points are located to obtain the target image.

[0037] The present invention has the following effects:

[0038] The present invention constructs feature points based on the positions of pixel points and the gray values after light compensation, reduces the influence of light, can reflect the real situation of the surface of the aluminum alloy to be measured, and thus different types of regions can be identified based on the clustering results of the feature points. When using the density peak clustering algorithm to cluster all feature points, an adaptive truncation distance is set based on the distance characteristics between each feature point and its neighboring feature points, which can ensure that the clustering centers are selected in relatively evenly distributed regions, so that different types of regions can be accurately found, providing a precise division basis for the subsequent identification of defect regions, and enabling precise control of the aluminum alloy production process based on the types of defects identified subsequently. Description of the Drawings

[0039] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features, and advantages of the exemplary embodiments of the present invention will become readily understandable. In the drawings, several embodiments of the present invention are shown in an exemplary rather than restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0040] Figure 1 is a schematic flow chart of the steps of a method for controlling and managing aluminum alloy production based on image enhancement according to an embodiment of the present invention. Detailed implementation manners

[0041] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0042] The following will describe in detail the specific implementation manners of the present invention with reference to the accompanying drawings.

[0043] Refer to Figure 1 , a method for controlling and managing aluminum alloy production based on image enhancement, including steps S1 - S4, specifically as follows:

[0044] S1: Obtain a grayscale image of the surface of the aluminum alloy to be measured to obtain a to-be-measured image.

[0045] First, fix the industrial camera at a suitable position, adjust the shooting angle and distance according to the size and shape of the aluminum alloy product to ensure that the surface details are fully captured; then, use the industrial camera to collect the surface image of the aluminum alloy to be measured; finally, perform grayscale processing on the collected color image to obtain the to-be-measured image.

[0046] S2: Perform light source compensation on the grayscale values of each pixel point in the to-be-measured image. After the compensation is completed, construct feature points for each pixel point, and each feature point is composed of the position coordinates of the pixel point and the compensated grayscale value.

[0047] In an exemplary embodiment of the present invention, the compensation for the grayscale values of each pixel point in the to-be-measured image can be achieved through the following steps:

[0048] Step 1: Take the grayscale value of the ambient light source color as the reference grayscale value, calculate the average difference between the grayscale values of the surrounding pixel points of each pixel point in the to-be-measured image and the reference grayscale value, and map the average difference to the light source interference index of the pixel point through the negative natural exponential function;

[0049] It should be noted that due to the strong reflectivity of the aluminum alloy surface and the linear propagation of light, there are differences in the degree of interference by the light source in different regions. In the area of strong light sources, a large amount of reflected light enters the imaging device, resulting in the color of this area being significantly affected by the color of the light source. The color mean is closer to the color of the light source and the local color distribution is relatively uniform. Therefore, by analyzing the difference characteristics between the gray-scale distribution of each pixel point and the color of the light source, the light source interference index of each pixel point can be evaluated.

[0050] Among them, the surrounding pixel points can be the pixel points within the eight-neighborhood range of the pixel point, or the pixel points within the four-neighborhood range.

[0051] Specifically, the light source interference index of each pixel point in the image to be measured satisfies the following relational expression:

[0052] ;

[0053] In the formula, is the light source interference index of the th pixel point; is the reference gray value. It should be noted that the ambient light source in the aluminum alloy production process is usually an incandescent lamp, and the color of the incandescent lamp is usually white. Therefore, in this embodiment, ; is the gray value of the th pixel point within the eight-neighborhood range of the th pixel point; is the number of pixel points within the eight-neighborhood range of the th pixel point; is the natural exponential function. Among them, the natural exponential function is an exponential function with the natural constant as the base; is the absolute value symbol.

[0054] Among them, reflects the average difference between the gray values of all pixel points within the eight-neighborhood range of the th pixel point and the reference gray value. The smaller this value is, the more uniform the distribution of pixel points in the surrounding area of the th pixel point is, and the closer it is to the reference gray value. Furthermore, it indicates that there is a greater possibility that the surrounding area of the th pixel point is in the area of strong light sources, and the corresponding light source interference index is larger.

[0055] Step 2: Use the light source interference index to perform downward compensation on the gray value of each pixel point in the image to be measured. The compensated gray value is negatively correlated with the light source interference index of the corresponding pixel point.

[0056] It should be noted that in the area of strong light sources, the average gray value tends to be closer to the gray value of the light source. In this case, if the defective area happens to be in these highly reflective areas (strong light source areas), it will cause this area to be too bright, and the obtained gray value cannot truly reflect the actual characteristics of the aluminum alloy surface (such as defects, etc.). Therefore, by using the light source interference index of each pixel point to downward adjust the gray value, the interference of the light source on the gray value of the pixel point can be eliminated or weakened, so that the corrected gray value can better reflect the real situation of the aluminum alloy surface.

[0057] Specifically, using the light source interference index of each pixel point, downward compensation is performed on the gray value of the corresponding pixel point, satisfying the following relational expression:

[0058] ;

[0059] In the formula, is the compensation value of the gray value of the th pixel point; is the gray value of the th pixel point; is the light source interference index of the th pixel point; is the floor symbol.

[0060] Among them, when the value is larger, it indicates that the gray value distortion caused by the influence of the light source in the area around the th pixel point is more serious. At this time, a larger degree of downward correction needs to be performed on the gray value of this pixel point to weaken the influence of the light source.

[0061] Furthermore, after determining the compensation value of the gray value of each pixel point in the image to be measured, based on the two-dimensional position coordinates of the pixel point (i.e., the row and column ordinal numbers of the pixel point in the image to be measured), and the compensation value of the gray value of the pixel point, characteristic points corresponding to each pixel point can be constructed, thereby providing a data basis for subsequent analysis.

[0062] S3: Use the density peak clustering algorithm to cluster all the characteristic points. During the clustering process, calculate the sum of the distances between each characteristic point and its neighboring characteristic points, and quantize the obtained sum to a preset range to obtain the weighted coefficient of each characteristic point, and complete the clustering of the characteristic points based on the adaptive cut-off distance determined by the weighted coefficient to generate several clustering clusters.

[0063] It should be noted that during the production process of aluminum alloy, improper control of parameters in each link may lead to different defects on the surface. For example, too fast cooling speed or uneven pressure during casting will cause inconsistent shrinkage of the aluminum alloy, resulting in cracks; unreasonable grinding and polishing process parameters will lead to surface scratches. Therefore, reasonably distinguishing different defect areas in the image is crucial for determining problems in the production control link. Since there are differences in the gray-scale performance of different defect areas, it is possible to divide different defect areas through clustering.

[0064] It should be further noted that during the process of clustering all feature points using the density peak clustering algorithm, the conventional density peak clustering algorithm usually obtains the local density of each feature point based on a fixed cut-off distance. Among them, in the density peak clustering algorithm, the cut-off distance is a key parameter for determining the local density of the data points to be clustered.

[0065] However, since the defects on the aluminum alloy surface may have different scales and shapes, such as scratches and cracks of different degrees, if an overly large cut-off distance is used, it may include feature points that are not in the same type of area but are slightly closer in distance in the calculation, thus affecting the accuracy of the local density. Therefore, the present invention improves the conventional density peak clustering algorithm. The specific improvement content is: based on the distance characteristics between each feature point and its neighboring feature points, a weighting coefficient is determined, and the adaptive cut-off distance of the corresponding feature point is determined using the weighting coefficient, so as to obtain a more flexible and accurate cut-off distance to improve the accuracy of the obtained local density.

[0066] Next, the determination of the adaptive cut-off distance of each feature point will be described in detail:

[0067] First, find the neighboring feature points of each feature point.

[0068] In an exemplary embodiment of the present invention, the determination of the neighboring feature points of each feature point can be achieved through the following steps:

[0069] Obtain the preset initial cut-off distance when the density peak clustering algorithm clusters all feature points, calculate the distance between any two feature points, and take the feature points whose distance from any feature point is less than the initial cut-off distance as the neighboring feature points of any feature point.

[0070] In an exemplary embodiment of the present invention, the determination of the initial cut-off distance can be achieved through the following steps:

[0071] Sort the distances between any two feature points in ascending order, and intercept the distance values of the first preset quantile in the ordered sequence as the initial cut-off distance.

[0072] Optionally, the distance between any two feature points can be the Euclidean distance or the Manhattan distance, and this embodiment does not make a special limitation on the selected distance type.

[0073] Exemplarily, the distance value at the first 2% quantile in the ordered sequence can be intercepted as the initial truncation distance. It should be noted that the setting method of the initial truncation distance is the same as the determination method of the truncation distance in the conventional density peak clustering algorithm.

[0074] Furthermore, the initial truncation distance can be denoted as , for any feature point, if the Euclidean distance between another feature point and this any feature point is less than , then this another feature point is taken as the neighboring feature point of this any feature point. Thus, the neighboring feature points of each feature point can be obtained.

[0075] Then, calculate the distances between each feature point and all its neighboring feature points, and sum them up. Quantify the obtained cumulative sum into a preset range to obtain the weighted coefficient of each feature point.

[0076] Specifically, the weighted coefficients of each feature point satisfy the following relational expression:

[0077] ;

[0078] In the formula, is the weighted coefficient of the th feature point; is the distance between the th feature point and the th neighboring feature point; is the number of selected neighboring feature points; is the normalization function.

[0079] Among them, reflects the sum of the distances between the th feature point and all its neighboring feature points. The smaller this value is, it indicates that the th feature point and its neighboring feature points are relatively similar in gray value and spatial position, and further indicates that the th feature point is more likely to be in a relatively uniform area (such as a large normal area or inside a certain type of defect area). At this time, setting a smaller truncation distance can avoid the influence of feature points in other areas when determining the local density of this feature point, so as to increase the possibility of obtaining a clustering center in the area where the th feature point is located, which helps to more accurately identify and distinguish different regional features in the image. Therefore, the smaller the value of, the lower the corresponding weighted coefficient, so as to reduce the initial truncation distance.

[0080] On the contrary, when The larger the value, the greater the difference in gray value and spatial position between the th feature point and its neighboring feature points, which means that this pixel point may be at the boundary line between the defective area and the normal area, or in the transition area between different types of defects. At this time, setting a larger truncation distance can avoid the possibility of obtaining a clustering center in such areas. Therefore, the smaller the value, the larger the corresponding weighting coefficient, so as to increase the initial truncation distance.

[0081] It should be noted that in the present invention, after normalizing the sum of the distances between the th feature point and all its neighboring feature points, and then adding , it is to quantify the value range of the weighting coefficient to (0.5, 1.5), so as to realize the upward and downward adjustment of the initial truncation distance while controlling the adjustment amplitude of the initial truncation distance. Thus, the determination of the weighting coefficient for each feature point is completed.

[0082] Finally, based on the weighting coefficients of each feature point, the adaptive truncation distance of each feature point is determined.

[0083] In an exemplary embodiment of the present invention, the determination of the adaptive truncation distance can be achieved through the following steps:

[0084] Perform a multiplication operation on the weighting coefficient and the initial truncation distance of each feature point to obtain the adaptive truncation distance of each feature point.

[0085] Specifically, the adaptive truncation distance of each feature point satisfies the following relational expression:

[0086] ;

[0087] In the formula, is the adaptive truncation distance of the th feature point; is the distance between the th feature point and the th neighboring feature point; is the number of selected neighboring feature points; is the normalization function; is the initial truncation distance.

[0088] Furthermore, after determining the adaptive truncation distance of each feature point, all feature points can be clustered based on the density peak clustering algorithm with the adaptive truncation distance to obtain several clustering clusters. It should be noted that the process of clustering using the density peak clustering algorithm based on the truncation distance is a prior art, and this embodiment will not be described in detail here.

[0089] S4: Based on the number of pixel points and the average gray value in each clustering cluster, calculate the defect probability of each clustering cluster, and filter out the clustering clusters with defect probability greater than a preset threshold for masking processing to generate a target image, so as to adjust the production process parameters of aluminum alloy based on the defect types identified from the target image.

[0090] It should be noted that since most of the defect areas are crack or scratch areas, the number of pixel points in such areas is usually small and the gray value is low. Therefore, the present invention utilizes this feature, combined with the number of pixel points and the average gray value in each clustering cluster, to evaluate the probability that the area corresponding to each clustering cluster is a defect area.

[0091] In an exemplary embodiment of the present invention, the determination of the defect probability of each clustering cluster can be achieved through the following steps:

[0092] Perform a multiplication operation on the number of pixel points and the average gray value in any clustering cluster, and take the normalized value of the reciprocal of the obtained product as the defect probability of any clustering cluster.

[0093] Optionally, it can be normalized using a function, or normalized using the maximum-minimum normalization method. This embodiment does not make a special limitation on the selected normalization method.

[0094] Particularly, when calculating the reciprocal of the product of the number of pixel points and the average gray value, a small hyperparameter can be added to the denominator part, so as to avoid the situation of the denominator being zero and ensure the effectiveness of the defect probability determination method.

[0095] In another embodiment, the product of the number of pixel points and the average gray value in any clustering cluster can also be used as the power of a negative exponential function, and the result of the power operation is used as the defect probability of the any clustering cluster.

[0096] Furthermore, after determining the defect probabilities of each clustering cluster, all clustering clusters with defect probability greater than 0.6 can be filtered based on a preset threshold such as 0.6, so as to perform masking processing on the pixel points within these filtered clustering clusters.

[0097] In an exemplary embodiment of the present invention, the masking processing of the clustering clusters with defect probability greater than the preset threshold can be achieved through the following steps:

[0098] Mark the pixel points in the clustering clusters with defect probability greater than the preset threshold as defect pixel points, and perform masking processing on all defect pixel points to highlight the area where the defect pixel points are located, obtaining a target image.

[0099] Optionally, through masking, the gray value of the defective pixel points can be increased, so that the defective pixel points are highlighted in the image, and a target image in which the defective area can be highlighted is obtained. Furthermore, the defect type on the surface of the aluminum alloy to be measured can be identified based on the target image, and the production parameters of relevant links can be adjusted in a timely manner by combining the correlation between the surface defects of the aluminum alloy and the production links, so as to effectively control the aluminum alloy production process.

[0100] It should be noted that the process of masking the image is a prior art, and this embodiment will not be described in detail herein.

[0101] In the description of this specification, the meanings of "a plurality of" and "several" are at least two, such as two, three or more, etc., unless otherwise specifically defined.

[0102] Although this specification has shown and described multiple 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 think of many changes, alterations and alternative ways without departing from the spirit and scope of the present invention. It should be understood that various alternative solutions to the embodiments of the present invention described herein can be adopted in the practice of the present invention.

Claims

1. A method for controlling and managing the production of aluminum alloys based on image enhancement, characterized in that, Including: Obtain a grayscale image of the surface of the aluminum alloy to be measured to obtain the image to be measured; Perform light source compensation on the grayscale values of each pixel point in the image to be measured. After the compensation is completed, construct feature points for each pixel point. Each feature point consists of the position coordinates of the pixel point and the compensated grayscale value; Use the density peak clustering algorithm to cluster all feature points. During the clustering process, calculate the sum of the distances between each feature point and its neighboring feature points, and quantize the obtained sum to a preset range to obtain the weighted coefficient of each feature point. Complete the feature point clustering based on the adaptive truncation distance determined by the weighted coefficient to generate several clustering clusters; wherein, the weighted coefficient of each feature point satisfies the following relational expression: ; In the formula, is the weighted coefficient of the th feature point; is the distance between the th feature point and the th nearest neighbor feature point; is the number of selected nearest neighbor feature points; is the normalization function; The method for obtaining the adaptive truncation distance includes: Perform a multiplication operation on the weighted coefficient of each feature point and the preset initial truncation distance to obtain the adaptive truncation distance of each feature point; Based on the number of pixel points and the average grayscale value in the clustering cluster, calculate the defect probability of each clustering cluster, and screen the clustering clusters with a defect probability greater than a preset threshold for masking processing to generate a target image, and adjust the production process parameters of the aluminum alloy based on the defect type identified by the target image.

2. The aluminum alloy production control method based on image enhancement according to claim 1, wherein The performing light source compensation on the grayscale values of each pixel point in the image to be measured includes: Take the grayscale value of the ambient light source color as the reference grayscale value, calculate the average difference between the grayscale values of the surrounding pixel points of each pixel point in the image to be measured and the reference grayscale value, and map the average difference to the light source interference index of the pixel point through the negative natural exponential function; Use the light source interference index to perform downward compensation on the grayscale values of each pixel point in the image to be measured. The compensated grayscale value is negatively correlated with the light source interference index of the corresponding pixel point.

3. A method for controlling and managing the production of aluminum alloy based on image enhancement according to claim 2, characterized in that The using the light source interference index to perform downward compensation on the grayscale values of each pixel point in the image to be measured satisfies the following relational expression: ; Wherein, is the compensation value of the gray value of the th pixel; is the gray value of the th pixel; is the light source interference index of the th pixel; is the floor symbol.

4. The aluminum alloy production control and management method based on image enhancement according to claim 3, wherein, The light source interference index satisfies the following relational expression: ; Wherein, is the light source interference index of the th pixel point; is the reference gray value; is the gray value of the th pixel point within the eight-neighborhood range of the th pixel point; is the number of pixel points within the eight-neighborhood range of the th pixel point; is the natural exponential function; is the absolute value symbol.

5. A method for controlling and managing aluminum alloy production based on image enhancement according to claim 1, characterized in that The method for obtaining the neighboring feature points includes: Obtain the preset initial truncation distance when the density peak clustering algorithm clusters all feature points, calculate the distance between any two feature points, and take the feature points whose distance from any one feature point is less than the initial truncation distance as the neighboring feature points of the any one feature point.

6. A method for controlling and managing aluminum alloy production based on image enhancement according to claim 1, characterized in that, The method for obtaining the initial truncation distance includes: Sort the distances between any two feature points in ascending order, and intercept the distance values of the first preset quantile in the ordered sequence as the initial truncation distance.

7. A method for controlling and managing aluminum alloy production based on image enhancement according to claim 1, characterized in that, The calculating the defect probability of each clustering cluster based on the number of pixel points and the average grayscale value in the clustering cluster includes: Perform a multiplication operation on the number of pixel points and the average grayscale value in any one clustering cluster, and take the normalized value of the reciprocal of the obtained product as the defect probability of the any one clustering cluster.

8. A method for controlling and managing aluminum alloy production based on image enhancement according to claim 7, characterized in that, The screening the clustering clusters with a defect probability greater than a preset threshold for masking processing to generate a target image includes: Mark the pixel points in the clustering clusters with a defect probability greater than the preset threshold as defect pixel points, and perform masking processing on all defect pixel points to highlight the area where the defect pixel points are located to obtain the target image.

Citation Information

Patent Citations

  • Clustering cluster acquisition method and device

    CN107563450A

  • Clustering integration system and method for adaptive density peak value

    CN116578893A