Aluminum alloy production control method based on image enhancement

By using adaptive cutoff distance and light source compensation technology in density peak clustering algorithm, the problem of clustering center deviation in aluminum alloy surface defect recognition is solved, and the accurate identification of aluminum alloy surface defects and precise control of aluminum alloy production process is achieved.

CN120147322AActive Publication Date: 2025-06-13SHAANXI DAQIN ALUMINUM CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510629904.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2025-06-13
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 identification results.

Method used

By obtaining the grayscale image of the surface of the aluminum alloy to be tested, the light source compensation is used to construct feature points, and the density peak clustering algorithm is used to cluster feature points, calculate the sum of the distances between each feature point and the nearest feature point, quantize it to the preset range to obtain the weighting coefficient, and determine the adaptive truncation distance for clustering.

Benefits of technology

Accurate identification of surface defects of aluminum alloys is achieved, and accurate clustering centers are generated, providing a data basis for the precise control of subsequent aluminum alloy production processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120147322A_ABST
    Figure CN120147322A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to an aluminum alloy production management and control method based on image enhancement, and the method comprises the steps: carrying out the light source compensation of a to-be-detected image, constructing a feature point based on the position coordinate of a pixel point and a compensated gray value, all the feature points are clustered through a density peak value clustering algorithm, in the clustering process, based on the distance features of all the feature points and the adjacent feature points, the truncation distance is adjusted in a self-adaptive mode, and then a clustering result is obtained through the density peak value clustering algorithm based on the self-adaptive truncation distance; and determining the defect probability of each cluster based on the number of the pixel points and the average gray value, and screening the cluster with the defect probability greater than a preset threshold value for mask processing, thereby identifying a defect area on the surface of the to-be-detected aluminum alloy based on the obtained target image. According to the method, different types of defect areas can be accurately identified, so that the aluminum alloy production process can be accurately monitored.
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 lead to 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 biased, 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: Obtain a grayscale image of the surface of the aluminum alloy to be tested to obtain a to-be-tested image; 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; 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 weighted coefficient of each feature point. Feature point clustering is completed based on the adaptive cut-off distance determined by the weighted coefficient, generating several clustering clusters. 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.

[0006] 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 areas 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 areas can be reduced, enabling the acquisition of relatively accurate clustering centers, providing a precise data basis for subsequent defect identification, and thus enabling precise control of the aluminum alloy production process based on the defect identification results.

[0007] Preferably, light source compensation is performed on the gray values of each pixel point in the image to be measured, including: 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. 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.

[0008] The present invention can reduce the influence of illumination, making the compensated gray value better reflect the true situation of the surface of the aluminum alloy to be measured.

[0009] 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 relational expression: ; 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 function symbol.

[0010] Preferably, 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.

[0011] 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.

[0012] Preferably, the method for obtaining neighboring feature points includes: Obtain the preset initial truncation distance when clustering all feature points by using the density peak clustering algorithm, calculate the distance between any two feature points, and use 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.

[0013] Preferably, the weighting coefficients of each feature point satisfy the following relational expression: ; wherein 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.

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

[0015] Preferably, the method for obtaining the adaptive truncation distance includes: Perform a multiplication operation on the weighting coefficient of each feature point and the initial truncation distance to obtain the adaptive truncation distance of each feature point.

[0016] Preferably, 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 at the first preset quantile in the ordered sequence as the initial truncation distance.

[0017] The method for 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.

[0018] Preferably, calculate the defect probability of each clustering cluster based on the number of pixel points and the average gray value in the clustering cluster, including: 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.

[0019] Preferably, screen the clustering clusters with defect probabilities greater than a preset threshold for masking processing to generate a target image, including: 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.

[0020] The present invention has the following effects: 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, and can reflect the real situation of the surface of the aluminum alloy to be measured. Therefore, 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 an accurate 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

[0021] By referring to the accompanying drawings and reading the following detailed description, the above and other objects, features, and advantages of the exemplary embodiments of the present invention will become easy to understand. 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, where: Figure 1 is a schematic flowchart of the steps of a method for controlling aluminum alloy production based on image enhancement according to an embodiment of the present invention. Detailed Embodiments

[0022] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of the present invention.

[0023] The following will describe in detail the specific implementation manners of the present invention in conjunction with the accompanying drawings.

[0024] Refer to Figure 1 , an aluminum alloy production control method based on image enhancement, including steps S1 - S4, specifically as follows: S1: Obtain a grayscale image of the surface of the aluminum alloy to be measured to obtain the image to be measured.

[0025] 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 image to be measured.

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

[0027] In an exemplary embodiment of the present invention, the compensation for the grayscale values of each pixel point in the image to be measured can be achieved through the following steps: 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 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; It should be noted that due to the strong reflectivity of the aluminum alloy surface and the linear propagation of light, the degree of interference by the light source varies in different regions. In the strong light source region, a large amount of reflected light enters the imaging device, resulting in a significant influence of the light source color on the color of this region. The color mean is closer to the light source color and the local color distribution is relatively uniform. Therefore, by analyzing the difference characteristics between the grayscale distribution of each pixel point and the light source color, the light source interference index of each pixel point can be evaluated.

[0028] 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 of the pixel point.

[0029] Specifically, the light source interference index of each pixel point in the image to be measured satisfies the following relational expression: ; In the formula, is the light source interference index of the th pixel; 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 within the eight-neighborhood range of the th pixel; is the number of pixels within the eight-neighborhood range of the th pixel; is the natural exponential function, where the natural exponential function is an exponential function with the natural constant as the base; is the absolute value symbol.

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

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

[0032] It should be noted that in a strong light source area, the gray mean value tends to be closer to the light source gray value. In this case, if the defect area happens to be in these high-reflection 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 (such as defects) of the aluminum alloy surface. Therefore, by using the light source interference index of each pixel to downward adjust the gray value, the interference of the light source on the pixel gray value can be eliminated or weakened, so that the corrected gray value can better reflect the real situation of the aluminum alloy surface.

[0033] Specifically, use the light source interference index of each pixel to perform downward compensation on the gray value of the corresponding pixel, satisfying the following relational expression: ; In the formula, is the compensation value of the gray value of the th pixel; is the gray value of the th pixel; is the The light source interference index of a pixel point; Is the floor function symbol.

[0034] Where, when The larger the value, the more serious the gray-scale distortion caused by the influence of the light source in the area around the th pixel point. At this time, it is necessary to perform a greater degree of downward correction on the gray-scale value of this pixel point to weaken the influence of the light source.

[0035] Furthermore, after determining the compensation values of the gray-scale values 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 ordinates of the pixel point in the image to be measured) and the compensation value of the gray-scale value of the pixel point, characteristic points corresponding to each pixel point can be constructed, thereby providing a data basis for subsequent analysis.

[0036] 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, generating several clustering clusters.

[0037] It should be noted that during the aluminum alloy production process, 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 and generate cracks; unreasonable grinding and polishing process parameters will result in surface scratches; therefore, reasonably distinguishing different defect areas in the image is crucial for determining problems in the production control link. Since the gray-scale manifestations of different defect areas are different, clustering can be used to divide different defect areas.

[0038] It should be further noted that during the process of clustering all the characteristic points using the density peak clustering algorithm, the conventional density peak clustering algorithm usually obtains the local density of each characteristic 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.

[0039] However, since the defects on the aluminum alloy surface may have different scales and shapes, such as scratches and cracks of different degrees, if too large a cut-off distance is used, it may include characteristic points that do not belong to 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 characteristic point and its neighboring characteristic points, determine the weighted coefficient, and use the weighted coefficient to determine the adaptive cut-off distance of the corresponding characteristic point, so as to obtain a more flexible and accurate cut-off distance to improve the accuracy of the obtained local density.

[0040] Next, the determination of the adaptive truncation distance for each feature point will be described in detail: First, find the neighboring feature points of each feature point.

[0041] 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: 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 use the feature points whose distance from any one feature point is less than the initial truncation distance as the neighboring feature points of any one feature point.

[0042] In an exemplary embodiment of the present invention, the determination of the initial truncation distance can be achieved through the following steps: 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.

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

[0044] Exemplarily, the distance values of 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.

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

[0046] Then, calculate the distances between each feature point and all its neighboring feature points and sum them up, and quantize the obtained sum to a preset range to obtain the weighting coefficient of each feature point.

[0047] Specifically, the weighting coefficient of each feature point satisfies the following relational expression: ; 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.

[0048] Among them, reflects the sum of the distances from the th feature point to all its neighboring feature points. The smaller this value is, the more similar the th feature point is to its neighboring feature points in terms of gray value and spatial position. Furthermore, it 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 on determining the local density of this feature point, thereby increasing 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

[0049] value is, the lower the corresponding weighting coefficient is, and thus the initial truncation distance can be reduced. On the contrary, when the value is larger, it indicates that the th feature point has a large difference from its neighboring feature points in terms of gray value and spatial position, meaning that this pixel point may be on the boundary line between the defect 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,

[0050] It should be noted that in the present invention, after normalizing the sum of the distances from the th feature point to 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 adjust the initial truncation distance upward and downward while controlling the adjustment range of the initial truncation distance. Thus, the determination of the weighting coefficient for each feature point is completed.

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

[0052] In an exemplary embodiment of the present invention, the determination of the adaptive truncation distance can be achieved through the following steps: Perform a multiplication operation on the weighting coefficient of each feature point and the initial truncation distance to obtain the adaptive truncation distance of each feature point.

[0053] Specifically, the adaptive truncation distance of each feature point satisfies the following relational expression: ; In the formula, is the Adaptive truncation distance of feature points; is the distance between the feature point and its th nearest neighbor feature point; is the selected number of nearest neighbor feature points; is the normalization function; is the initial truncation distance.

[0054] Furthermore, after determining the adaptive truncation distance of each feature point, based on the density peak clustering algorithm with the adaptive truncation distance, all feature points can be clustered to obtain several 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 elaborate on it here.

[0055] S4: Based on the number of pixel points and the average gray value in the cluster, calculate the defect probability of each cluster, and screen the 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 the aluminum alloy based on the defect type identified from the target image.

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

[0057] In an exemplary embodiment of the present invention, the determination of the defect probability of each cluster can be achieved through the following steps: Perform a multiplication operation on the number of pixel points and the average gray value in any cluster, and use the normalized value of the reciprocal of the obtained product as the defect probability of any cluster.

[0058] Optionally, the function can be used for normalization processing, or the maximum-minimum normalization method can be used for normalization processing. This embodiment does not make a special limitation on the selected normalization processing method.

[0059] Specifically, when calculating the reciprocal of the product of the number of pixel points and the average gray value, a relatively 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.

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

[0061] Further, after determining the defect probabilities of each clustering cluster, clustering clusters with defect probabilities greater than a preset threshold, such as 0.6, can be screened, and then the pixel points within these screened clustering clusters can be masked.

[0062] In an exemplary embodiment of the present invention, the masking process for clustering clusters with defect probabilities greater than a preset threshold can be implemented through the following steps: Mark the pixel points in the clustering clusters with defect probabilities greater than the preset threshold as defect pixel points, and perform masking on all defect pixel points to highlight the areas where the defect pixel points are located, obtaining a target image.

[0063] Optionally, through the masking process, the gray value of the defect pixel points can be increased, so that the defect pixel points are highlighted in the image, obtaining a target image in which the defect areas can be highlighted. Furthermore, the defect types on the surface of the aluminum alloy to be measured can be recognized based on this target image, and combined with the association between the surface defects of the aluminum alloy and the production links, the production parameters of the relevant links can be adjusted in a timely manner to achieve effective control of the aluminum alloy production process.

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

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

[0066] Although this specification has shown and described multiple embodiments of the present invention, it is obvious to those skilled in the art that such embodiments are provided only by way of example. 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 aluminum alloy production control based on image enhancement, characterized in that: include: Acquire a grayscale image of the surface of the aluminum alloy to be tested to obtain an image to be tested; Performing light source compensation on the grayscale value of each pixel in the image to be measured, and constructing feature points of each pixel after the compensation, each feature point consisting of the position coordinates of the pixel and the compensated grayscale value; All feature points are clustered using a 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 accumulated sum is quantized to a preset range to obtain a weighting coefficient for each feature point. The feature points are clustered based on an adaptive cutoff distance determined based on the weighting coefficient to generate a number of clusters. Based on the number of pixels and the average grayscale value in the clusters, the defect probability of each cluster is calculated, and the clusters with defect probabilities greater than a preset threshold are screened for masking to generate a target image, so as to adjust the production process parameters of the aluminum alloy based on the defect type identified in the target image.

2. The aluminum alloy production control method based on image enhancement according to claim 1 is characterized in that: The performing light source compensation on the grayscale value of each pixel in the image to be measured includes: Taking the grayscale value of the ambient light source color as a reference grayscale value, calculating the average difference between the grayscale values ​​of the pixels around each pixel in the image to be tested and the reference grayscale value, and mapping the average difference to a light source interference index of the pixel through a negative natural exponential function; The light source interference index is used to downwardly compensate the grayscale value of each pixel in the image to be measured, and the compensated grayscale value is negatively correlated with the light source interference index of the corresponding pixel.

3. The aluminum alloy production control method based on image enhancement according to claim 2 is characterized in that: The light source interference index is used to downwardly compensate the grayscale value of each pixel in the image to be measured, satisfying the following relationship: ; In the formula, For the Compensation value of the gray value of each pixel; For the The gray value of each pixel; For the Light source interference index of each pixel; The floor symbol.

4. The aluminum alloy production control method based on image enhancement according to claim 3 is characterized in that: The light source interference index satisfies the following relationship: ; In the formula, For the Light source interference index of each pixel; is the reference gray value; For the The eight-neighborhood range of the pixel The gray value of each pixel; For the The number of pixels within the eight-neighborhood range of a pixel; is the natural exponential function; is the absolute value symbol.

5. The aluminum alloy production control method based on image enhancement according to claim 1 is characterized in that: The method for obtaining the neighbor feature points includes: The preset initial truncation distance when the density peak clustering algorithm clusters all feature points is obtained, and the distance between any two feature points is calculated, and the feature point whose distance to any feature point is less than the initial truncation distance is used as the neighboring feature point of any feature point.

6. The aluminum alloy production control method based on image enhancement according to claim 5 is characterized in that: The weighted coefficients of the feature points satisfy the following relationship: ; In the formula, For the The weighting coefficient of feature points; For the The feature point and The distance between neighboring feature points; is the number of selected neighbor feature points; is the normalization function.

7. The aluminum alloy production control method based on image enhancement according to claim 5 is characterized in that: The method for obtaining the adaptive cutoff distance comprises: The weighted coefficient of each feature point and the initial cutoff distance are multiplied to obtain an adaptive cutoff distance of each feature point.

8. The aluminum alloy production control method based on image enhancement according to claim 7 is characterized in that: The method for obtaining the initial cutoff distance comprises: The distances between any two feature points are sorted in ascending order, and the distance value of the first preset quantile in the ordered sequence is truncated as the initial truncation distance.

9. The aluminum alloy production control method based on image enhancement according to claim 1, characterized in that: The defect probability of each cluster is calculated based on the number of pixels and the average gray value in the cluster, including: The number of pixels in any cluster and the average gray value are multiplied, and the normalized value of the reciprocal of the obtained product is used as the defect probability of any cluster.

10. The aluminum alloy production control method based on image enhancement according to claim 9, characterized in that: The screening of clusters with defect probabilities greater than a preset threshold and performing mask processing to generate a target image includes: The pixels in the clusters whose defect probability is greater than the preset threshold are marked as defective pixels, and mask processing is performed on all defective pixels to highlight the area where the defective pixels are located, thereby obtaining 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

  • Aluminum alloy sheet welding defect detection method based on improved YOLOv5

    CN116912165A

  • PET high-temperature flame-retardant adhesive tape flaw extraction method and system based on image segmentation

    CN117237646A

  • Method for detecting defect on surface of copper clad laminate on basis of multi-scale gridding

    WO2025007949A1