Visual inspection method and system for automobile die surface machining cracks

By acquiring image sequences from the camera, performing grayscale value conversion and noise removal, calculating image edges, and applying stacked data aggregation and environmental adaptability testing, the problem of insufficient identification of deviation and robustness in complex lighting and background conditions is solved, and the stable and accurate identification of surface cracks of automobile molds is achieved.

CN119693366AActive Publication Date: 2025-03-25JILIN PROVINCE AXLE AUTO COMPONENTS & PARTS CO LTD

Patent Information

Application Number
CN202510205855.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-25
Publication Date
2025-03-25
Estimated Expiration
2045-02-25

AI Technical Summary

Technical Problem

The existing automotive mold surface processing crack visual detection technology lacks flexibility under complex lighting and background conditions, resulting in feature extraction distortion, identification bias and insufficient robustness.

Method used

By obtaining image sequences from the camera, extracting pixel data, performing grayscale value conversion and noise removal, calculating image edges, applying cascaded data aggregation and environmental adaptability testing, optimizing feature information and improving identification accuracy.

Benefits of technology

It realizes stable and accurate identification of surface cracks of automobile mold under various environmental conditions, and improves the robustness and reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693366A_ABST
    Figure CN119693366A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of crack detection, in particular to a visual detection method and system for cracks machined on the surface of an automobile mold, and the method comprises the following steps: obtaining an image sequence of the surface of the automobile mold from a camera, extracting pixel data of the image sequence, and generating an original pixel result; and carrying out gray value conversion and noise data elimination on the original pixel result to obtain a processed pixel result. According to the method, the basic information of each pixel point in the image is extracted and is converted into a form which is easier to analyze, so that the feature content is purer in a mode of eliminating noise points and refining gray features in the image. On the basis, a feature information accumulation and distribution correction means is adopted to enable edge features to be converted from a disordered state to a clear and ordered direction, the variation amplitude of parameters under various image conditions is coordinated, and feature parameters are not prone to large offset due to environmental differences.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of crack detection, and in particular to a method and system for visually detecting cracks on the surface of an automobile mold. Background Art

[0002] When processing automobile molds, visual crack detection is required for quality inspection. However, existing technologies often lack flexibility when facing complex and changing lighting and background conditions. They usually rely on a single quantitative standard or fixed threshold, which makes the feature extraction process easily distorted when encountering strong light reflections or dark areas. In high-brightness scenes, raised fine cracks are difficult to reasonably distinguish from background information, resulting in deviations in the determination of crack width and depth. In low-brightness scenes, key information is easily buried in noise, and the edges appear unclear, which destroys the stability of data comparison. In addition, the lack of multi-dimensional correlation data analysis capabilities makes it difficult to reasonably reflect the inherent correlation of crack features. When external interference factors continue to accumulate, the stability of feature positioning and classification decreases sharply, and the probability of misjudgment increases significantly, resulting in the detection process often not having sufficient robustness and continuous reliability when facing a multi-environment. Summary of the invention

[0003] The purpose of the present invention is to solve the shortcomings of the prior art and to propose a method and system for visually detecting cracks on the surface of an automobile mold.

[0004] In order to achieve the above object, the present invention adopts the following technical scheme, a method for visually detecting surface processing cracks of automobile molds, comprising the following steps: An image sequence of the surface of the automobile mold is obtained from a camera, pixel data of the image sequence is extracted, and an original pixel result is generated; grayscale value conversion and noise data elimination are performed on the original pixel result to obtain a processed pixel result.

[0005] The processed pixel result is used as input, the pixel difference of the image edge is calculated, the edge information is extracted, and the edge feature result is generated; the edge feature result is subjected to cascade data aggregation, the feature information is optimized by accumulating data, and the optimized feature result is obtained.

[0006] The optimized feature result is adjusted, and the recognition parameters are adjusted according to the statistical distribution of the feature to generate an adjusted feature result; the changing environmental factors, including illumination and background, are simulated, and an environmental adaptability test is applied to the adjusted feature result to output an environmental adaptability feature result.

[0007] The environmental adaptation feature results are used to identify crack features, integrate multi-angle data, and generate identification data.

[0008] Preferably, the steps of obtaining the original pixel result are: The camera is started and positioned on the surface of the automobile mold to continuously capture image sequences. Each frame of the image is sent to the data buffer through network transmission to form an image frame set and obtain an unprocessed image sequence. Based on the unprocessed image sequence, pixel data extraction is performed to identify the color and intensity value of each pixel point to obtain pixel data and obtain a complete pixel data set; Based on the complete pixel data set, the pixels in each frame of the image are standardized and encoded, the original data is converted into a unified data format, and arrayed so that the data is stored in an array form to obtain the original pixel result.

[0009] Preferably, the step of obtaining the processed pixel result is: Extracting grayscale values ​​pixel by pixel from the original pixel result, converting the RGB value of each pixel into a single grayscale value, and obtaining grayscale pixel data by calculating the grayscale intensity of each pixel; Based on the grayscale pixel data, the local variance of each pixel is calculated using the following formula: ; in, is the local variance of the pixel, is the number of pixels in the neighborhood, The first The gray value of a pixel, is the average gray value in the neighborhood; According to the local variance, the pixel points are screened using a set threshold value to remove noise data points to obtain a processed pixel result.

[0010] Preferably, the step of obtaining the edge feature result is: Applying a high-pass filter to extract image edges from the processed pixel results, amplifying the high-frequency portion of the pixel data to distinguish pixel changes, calculating the contrast between each pixel and neighboring pixels, identifying edge areas, and obtaining an edge-emphasized image; Based on the edge-emphasized image, the edge strength of each pixel is calculated using the following formula: ; in, is the edge strength, and is the gradient value of the image in the horizontal and vertical directions; The edge strength is utilized and a threshold is applied to extract edge information. The threshold is adjusted according to the edge strength distribution of the image to obtain an edge feature result.

[0011] Preferably, the steps of obtaining the optimization feature results are: Performing layered processing on the edge feature results, allocating each edge feature to a separate data layer, each layer representing an image region and edge density, to obtain layered edge feature data; Based on the layered edge feature data, the edge feature cumulative index of each layer is calculated, and the calculation formula is: ; in, represents the cumulative index, Represents the number of layers, Representative The characteristic strength of the layer, Represents the weight adjustment factor associated with the level; Based on the cumulative index, the cumulative impact of all data layers is combined to obtain an optimized feature result.

[0012] Preferably, the step of obtaining the adjustment feature result is: Performing statistical analysis on the optimized feature results, including calculating the mean value and standard deviation of each feature, and normalizing according to the mean value and standard deviation to obtain standardized feature data; Based on the standardized feature data, analyzing the statistical distribution, the statistical distribution includes skewness and kurtosis, adjusting the recognition parameters according to the statistical distribution, modifying the threshold and the scale factor, and obtaining the adjusted recognition parameters; The adjusted recognition parameters are used to re-evaluate the weight and classification criteria of each feature to obtain an adjusted feature result.

[0013] Preferably, the steps of obtaining the environmental adaptation feature result are: Using environmental simulation, setting lighting conditions and background, simulating lighting scenes of sunlight, shadows and artificial lighting, and changing the background complexity to obtain simulated environmental image data; Based on the simulated environment image data, the feature adjustment result is applied to the image in each simulated environment, the feature recognition accuracy under each recognition parameter is calculated, and the recognition test result under each environment is obtained; The recognition test results in various environments are integrated, and the adaptability and accuracy of the recognition parameters in the simulated environment are analyzed and compared to obtain the environmental adaptation characteristic results.

[0014] Preferably, the steps of obtaining the identification data are: Based on the environmental adaptation feature results, analysis is performed to identify crack features, including crack width, length, depth and position in the image, to obtain identification data, while recording parameters of each crack to establish an initial database of crack features; Based on the initial database of crack characteristics, performing data fusion to integrate the crack information collected from each environmental condition to obtain a comprehensive crack characteristic data set; Based on the comprehensive crack feature data set, pattern recognition is applied to identify and classify cracks, and the type and impact of each crack are analyzed and determined.

[0015] The present invention provides a crack visual detection system, comprising: The image acquisition module collects the image sequence of the automobile mold surface from the camera, records the pixel data of each frame of the image, and obtains the original pixel data; The image preprocessing module performs grayscale value conversion based on the original pixel data, removes noise, and generates processed pixel results; The edge detection module uses the processed pixel results to calculate the pixel difference of the image edge, extract the edge information, and obtain the edge feature results; The feature optimization module applies cascade data aggregation to the edge feature results, optimizes the feature information, analyzes the feature statistical distribution, adjusts the recognition parameters based on the analysis, and generates optimized feature results; then simulates the changing environmental factors, applies environmental adaptability tests, and obtains environmental adaptability feature results; The crack identification module uses the environmental adaptation feature results and combines multi-angle data analysis to identify crack features and generate identification data.

[0016] Compared with the prior art, the advantages and positive effects of the present invention are: The present invention extracts the basic information of each pixel in the image and converts it into a form that is easier to analyze, so that the feature content is purer by eliminating noise points and finely processing the grayscale features in the image. On this basis, the feature information accumulation and distribution correction method is used to transform the edge features from a chaotic and disordered state to a clear and orderly direction, coordinate the change amplitude of parameters under various image conditions, and make the feature parameters less likely to shift significantly due to environmental differences. By making adaptive adjustments to environmental factors such as light intensity and background complexity, the feature information can maintain a relatively stable presentation in a variety of scenes, avoiding sudden changes in feature parameters due to scene switching. The crack morphology is expressed in layers through multi-dimensional data fusion, so that subtle details and overall distribution together form a more measurable feature set. Multi-angle data comprehensive processing can maintain a relatively balanced recognition effect under complex conditions, avoid the feature recognition accuracy being significantly affected by specific conditions, enhance the reliability of the overall detection under multiple environmental conditions, and identify crack detail parameters closer to objective reality. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic diagram of the steps of the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0019] See also Figure 1 The present invention provides a technical solution, a method for visually detecting surface processing cracks of automobile molds, comprising the following steps: The image sequence of the automobile mold surface is obtained from the camera, and the pixel data of the image sequence is extracted to generate the original pixel result; the gray value conversion and noise data elimination are performed on the original pixel result to obtain the processed pixel result.

[0020] Taking the processed pixel results as input, the pixel differences of the image edge are calculated, the edge information is extracted, and the edge feature results are generated; cascade data aggregation is applied to the edge feature results, and the feature information is optimized by accumulating data to obtain the optimized feature results.

[0021] Adjust the optimized feature results, adjust the recognition parameters according to the statistical distribution of the features, and generate adjusted feature results; simulate changing environmental factors, including lighting and background, apply environmental adaptability tests to the adjusted feature results, and output environmental adaptation feature results.

[0022] The crack characteristics are identified by using the environmental adaptation feature results, and multi-angle data are integrated to generate identification data.

[0023] The steps to obtain the original pixel results are: The camera is started and positioned on the surface of the automobile mold to continuously capture image sequences. Each frame of the image is transmitted to the data buffer through the network to form an image frame set and obtain an unprocessed image sequence. Based on the unprocessed image sequence, pixel data extraction is performed to identify the color and intensity value of each pixel to obtain pixel data and obtain a complete pixel data set; Based on the complete pixel data set, the pixels in each frame of the image are standardized and encoded, the original data is converted into a unified data format, and arrayed so that the data can be stored in an array form to obtain the original pixel results.

[0024] Specifically, based on the camera device fixed on the surface of the automobile mold, according to the pre-recorded camera installation parameters (for example, the camera focal length is set to a fixed integer value averaged from multiple focus tests, such as 10 mm, and the exposure time is determined to be 1 / 100 second based on the on-site illumination measurement, and the aperture size is fixed to f / 2.8 based on the light distribution), the collection process is started using the set network connection parameters (for example, in a local area network environment, a fixed IP address of 192.168.1.100 is specified, and the maximum transmission rate is agreed to be 10MB / s in the parameter table), and the camera is continuously called. The image acquisition function grabs image frames at a fixed timing (for example, it is called once every 1 / 30 second). Each frame of the image is first temporarily stored in the camera's own cache unit, and then it is transferred sequentially into the data buffer composed of the memory by calling the network sending function. The capacity of the data buffer is obtained by combining the estimated single-frame data size with the planned frame rate (for example, each frame occupies about 0.5MB based on the image resolution and color depth, and the buffer can take 20MB if 30 frames / second is set). After continuously receiving all incoming image frames, they are arranged and stored in sequence without additional format conversion and data calculation. In this way, an unprocessed image sequence is obtained.

[0025] Based on the obtained unprocessed image sequence, the original pixel data of each frame is extracted point by point, and the pixel values ​​are read in sequence directly from the byte sequence of the image frame stored in the memory. Each pixel value is composed of multiple channel bytes (for example, the RGB format contains three values ​​of the red channel, green channel and blue channel, and each channel value ranges from 0 to 255). These channel values ​​are read in sequence by traversing the image pixel index (such as continuously increasing from the 0th pixel to the last pixel of the frame), and the color and intensity information corresponding to all pixels are integrated and recorded. When the pixel data of all frames are read and recorded, the complete pixel data set is obtained.

[0026] In the acquired complete pixel data set, the channel value of each pixel is uniformly and standardizedly encoded, and the original channel integer values ​​​​from 0 to 255 are converted into floating-point numbers between 0 and 1 through simple division operations (for example, division with a fixed value of 255, which is determined by the previous statistics of the maximum pixel value of typical image samples), and each channel value is converted to the same numerical scale. Then, the standardized results of each pixel are assembled into an array structure of a fixed length (such as a floating-point array of length 3 corresponding to the three RGB channels). Repeat this step for all pixels in the same frame to form two-dimensional array data. Repeat this process for multiple frames of images to expand the data into a three-dimensional or higher-dimensional array. When all pixels are standardized and arrayed, the original pixel results are obtained.

[0027] The steps to obtain the processed pixel results are: Extract the grayscale value pixel by pixel from the original pixel result, and convert the RGB value of each pixel into a single grayscale value, and obtain the grayscale pixel data by calculating the grayscale intensity of each pixel; Based on the grayscale pixel data, the local variance of each pixel is calculated using the following formula: ; in, is the local variance of the pixel, is the number of pixels in the neighborhood, The first The gray value of a pixel, is the average gray value in the neighborhood; According to the local variance, the set threshold is used to filter the pixels, remove the noise data points, and obtain the processed pixel results.

[0028] Specifically, based on the original pixel results obtained, the RGB channel values ​​of each internal pixel are read one by one, and the R, G, and B channel values ​​are linearly weighted according to fixed proportional coefficients (for example, the R channel value is multiplied by 0.299, the G channel value is multiplied by 0.587, and the B channel value is multiplied by 0.114. These coefficients are derived from the statistical analysis results of the visual perception characteristics of the human eye and are extracted from the image engineering standard data set. The coefficient values ​​have a fixed reference range in the field of professional image processing), and the weighted sum is used as the grayscale value of the pixel, and the grayscale values ​​of all pixels are recorded one by one to form grayscale pixel data.

[0029] The benefit of the formula is that by quantifying the cubic deviation between the grayscale value of the neighborhood pixels and the average value, it is helpful to accurately express the discrete degree of grayscale distribution in the local area, thereby realizing the subsequent operation of filtering pixels according to the local variance; The parameter acquisition steps are as follows: select the location of the target pixel in the obtained grayscale pixel data, and determine the pixel range of its adjacent area (for example, take a total of 9 pixels in the surrounding 3×3 area, and obtain N=9 by actually counting the 3×3 area). The steps to obtain the parameters are: read the grayscale values ​​of the 9 adjacent pixels point by point (obtained by directly indexing the recorded grayscale pixel data), The steps for obtaining the parameters are as follows: add the grayscale values ​​of the 9 pixels and divide by 9 to obtain the average grayscale value; Calculation process: For example, select a group of neighboring pixel gray values ​​from the grayscale pixel data , The average gray value is calculated from this : ; Then calculate The cube value of: ; ; ; ; ; ; The second 119 points are the same as the first 119 points, which is 9.4; The second 120 points is the same as the first 120 points, which is 1.3717; The third 122 points are the same as the first 122 points, which is 0.7; Sum all the above cubic differences: ; Divide this sum by : ; The result shows that the local variance value of the neighborhood is about 5.9768. This value indicates that the greater the third-order deviation between the pixel and the average grayscale value of the neighborhood, the more dispersed the grayscale distribution in the local area. By comparing with the threshold set in the subsequent steps, pixels with excessively large local variance can be screened out.

[0030] Based on the calculated local variance data, the variance value of each pixel is first read, and a comparison step is established. By analyzing multiple typical crack-free mold surface images in the previously recorded image statistical samples, the distribution characteristics of the local variance of pixels in these abnormal images are extracted, and a threshold value that can calibrate the noise boundary is determined by statistical methods (for example, by analyzing hundreds of crack-free surface images, counting the local variance means and variance distribution intervals of all pixels, and selecting the mean of the interval plus twice the standard deviation of about 10 as the threshold value). Subsequently, the local variance value of the current pixel is checked. When the local variance value is greater than 10, the pixel is calibrated as a noise pixel and its grayscale data is removed. At the same time, no removal operation is performed on pixels with variance values ​​lower than 10. Through this screening step, all pixels that do not meet the requirements are removed and the grayscale data of the remaining pixels are recorded, so as to finally obtain the processed pixel results.

[0031] The steps to obtain edge feature results are: From the processed pixel results, a high-pass filter is applied to extract the image edge, and the high-frequency part in the pixel data is amplified to distinguish the pixel changes, and the contrast between each pixel and the neighboring pixels is calculated to identify the edge area and obtain an edge-emphasized image; Based on the edge-emphasized image, the edge strength of each pixel is calculated using the following formula: ; in, is the edge strength, and is the gradient value of the image in the horizontal and vertical directions; Using edge strength, a threshold is applied to extract edge information. The threshold is adjusted according to the edge strength distribution of the image to obtain edge feature results.

[0032] Specifically, based on the previously obtained processed pixel results, the pixel data therein is directly called as input, and by selecting the high-pass filter parameter value and the filter kernel size in a fixed two-dimensional sampling window, the brightness difference of several pixels around each pixel is calculated point by point, the data value of the lower frequency component is eliminated by numerical subtraction, and the value of the remaining higher frequency component is enhanced. These parameter values ​​can be determined by statistically analyzing dozens of standard images with clear boundary lines in advance. For example, the distribution of brightness gradient values ​​of edge points in the standard image is measured and the average enhancement ratio is calculated, and the ratio is used as the magnification. The contrast calculation process is executed on each pixel point one by one, and the contrast value is calculated by the pixel grayscale difference. When the contrast is greater than the threshold determined by the mean grayscale difference of a typical edgeless area obtained by statistics plus one standard deviation, the pixel point is marked as a potential edge pixel point, and all potential edge pixels are further compared and compared with adjacent pixels, so that the misjudged non-edge pixels are eliminated, and finally the remaining high-brightness difference pixels are merged and marked to obtain an edge-emphasized image.

[0033] The benefit of the formula is that by considering the gradient values ​​in the horizontal and vertical directions at the same time and introducing the logarithmic transformation of the gradient sum, the edge strength is kept in a dynamic balance between the larger gradient and the smaller gradient, so that there is a more flexible judgment space when the threshold is used to filter the edge feature data later; The parameters are obtained by using the fixed-scale differential filtering method for each pixel in the horizontal direction in the edge-emphasized image obtained above, measuring the brightness change of adjacent pixels, and obtaining The value is obtained by measuring the horizontal gradient distribution of multiple standard reference images, and then combining the statistical average of the brightness gradient of the on-site processing object image (check the image edge gradient statistics manual, where the horizontal gradient average is mostly between 10 and 50) to finally select , The steps to obtain the parameters are: The same method is used but the differential measurement is performed in the vertical direction, and the vertical gradient statistical average (also between 10 and 50) is used to obtain the ; Calculation process: First calculate : ; ; Then calculate the denominator: ; By looking up the standard logarithm table, ; So the denominator is ; Finally, we divide 25 by 4.8287: ; The result shows that the edge strength of the current pixel is about 5.1757. When this value is significantly higher than the threshold defined by the standard edge strength mean and standard deviation in the statistical distribution (for example, for ordinary metal mold surfaces, the typical threshold is around 3), it means that there are obvious edge features in the area near this pixel. If it is less than the threshold, it is judged as a non-edge pixel.

[0034] Using the edge strength data calculated previously, the edge strength value of each pixel is used as the basis for judgment. By performing centralized statistical analysis on the edge strength distribution of multiple standard images in the sample image set, the median and variance values ​​of the values ​​in the overall distribution are extracted, and the threshold data is selected at the position where the cumulative frequency reaches 80%. For example, by counting the edge strength of dozens of images with known edge areas on the surface, it is found that the median is about 4.5 and the standard deviation is about 1.5. Therefore, the threshold can be set to the sum of the median and the standard deviation, that is, 6.0. When the edge strength of a pixel is greater than 6.0 in the actual calculation, it is marked as an edge pixel, otherwise it is calibrated as a non-edge pixel. Finally, by summarizing the calibration results of all pixels and analyzing the continuous pixel area, isolated pixels are eliminated and adjacent high edge strength pixel groups are connected. Finally, all areas that meet the conditions are recorded to obtain edge feature results.

[0035] The steps to obtain the optimization feature results are: The edge feature results are processed in layers, and each edge feature is assigned to a separate data layer. Each layer represents an image area and edge density, and layered edge feature data is obtained. Based on the layered edge feature data, the edge feature cumulative index of each layer is calculated using the following formula: ; in, represents the cumulative index, Represents the number of layers, Representative The characteristic strength of the layer, Represents the weight adjustment factor associated with the level; Based on the cumulative index, the cumulative impact of all data layers is combined to obtain the optimized feature results.

[0036] Specifically, based on the edge feature results obtained previously, all the pixels marked as edge features are classified, and these pixels are divided into several regions according to their positions in the image coordinate system. The number of edge pixels and the positional relationship are counted point by point in each region. According to the spatial distribution density of edge pixels in the region, the density value is quantified by measuring the distance between adjacent pixels and the change in grayscale gradient, thereby forming a comparable density value. Then, the data layers are divided step by step according to these density values, and each layer corresponds to a different density range. The edge feature pixels with higher density are assigned to the high-level sequence, and the edge feature pixels with lower density are assigned to the low-level sequence. In this process, the edge features of each level are recorded, and all regions are uniformly processed by repeating this process. The edge feature parameter information contained in each layer is summarized so that each layer has a clear feature strength and density distribution, thereby completing the stratification operation, and finally arranged in hierarchical order to form stratified edge feature data.

[0037] The benefit of the formula is that by summing the ratio of the squared value of the feature intensity of each layer to the corresponding weight adjustment factor and then taking the square root, quantitative comparison can be achieved among multiple levels of features, thereby obtaining a measure of the comprehensive impact of each layer; The steps for obtaining the parameters are as follows: Count the number of layers through the previously obtained layered edge feature data. For example, the three different density layers obtained after analysis are , The steps for obtaining the parameters are as follows: measure the intensity of the edge feature points recorded in each layer, and use the average intensity of all feature points in the layer as Values, such as those measured by the acquired layered edge feature data (The intensity unit is obtained by normalizing the edge grayscale gradient and the value range is between 0 and 100). The steps of obtaining parameters are as follows: perform multi-layer feature analysis on the standard reference image, calculate the stability parameters of the feature strength of each layer, use the stability parameters as the basis for weight adjustment, assign a larger weight value to the more stable layer and a smaller weight value to the unstable layer, and determine the weight value through actual measurement. (This range is obtained by analyzing the feature distribution of multiple standard images, and is generally between 5 and 20); Calculation process: ; ; ; ; The results show that the cumulative index is about 24.35. If this value is compared with a standard threshold (e.g., 20) in subsequent analysis, a value greater than 20 indicates a high strength of the multi-layer integrated features, while a value less than 20 indicates a low strength of the integrated features.

[0038] Based on the cumulative index data obtained previously, the eigenvalue table previously recorded in each data layer is compared with the cumulative index. The determined intensity values ​​in each layer are checked layer by layer and matched by numerical comparison. When the cumulative index corresponding to any eigenvalue in the layer obviously deviates from the average value of the layer, the feature data of the layer is re-archived. According to the feature distribution table previously obtained from the standard image set, the numerical differences between the eigenvalues ​​in the current layer and the eigenvalues ​​of the upper and lower layers are compared. Then, a progressive screening step is performed for the eigenvalues ​​with large differences. The features whose eigenvalues ​​are distributed in the same gradient range are merged into the same merged sequence. In this way, multi-layer features are gradually mapped to a single optimized sequence, and each merged eigenvalue is compared twice. By repeatedly checking the intensity difference and distribution density, the features of each layer are finally merged in a unified manner, and all processed feature data are recorded to obtain the optimized feature results.

[0039] The steps to obtain the adjustment feature results are: Performing statistical analysis on the optimized feature results, including calculating the mean and standard deviation of each feature, and normalizing according to the mean and standard deviation to obtain standardized feature data; Based on the standardized feature data, the statistical distribution is analyzed, the statistical distribution includes skewness and kurtosis, the recognition parameters are adjusted according to the statistical distribution, the threshold and the scale factor are modified, and the adjusted recognition parameters are obtained; Using the adjusted recognition parameters, the weight and classification criteria of each feature are re-evaluated to obtain the adjusted feature results.

[0040] Specifically, quantified feature data is selected from the optimized feature results, each feature value is read point by point and the average value of the feature set is calculated, all the feature values ​​in the set are added up and divided by the number of features to obtain the average value, and then the variance is obtained by calculating the difference between each feature value and the average value, summing the squares of the differences and dividing by the number of features, and the square root of the variance is obtained to obtain the standard deviation, and then the difference between each feature value and the average value is divided by the standard deviation, and the result is used as the normalized feature value, and the above steps are repeated for all features, and the normalized results are recorded and compared. Through the above normalization process, all feature values ​​are included in a unified scale to obtain standardized feature data.

[0041] Based on the obtained standardized feature data, the skewness and kurtosis are calculated for each eigenvalue set. The skewness is obtained by summing the cubes of all eigenvalues ​​minus the mean value, dividing by the total number of samples and then dividing by the cube of the standard deviation. The kurtosis is obtained by summing the fourth power of all eigenvalues ​​minus the mean value, dividing by the total number of samples and then dividing by the fourth power of the standard deviation. The distribution form of the feature data is quantitatively described by recording the skewness and kurtosis values, and then the parameters are adjusted according to the skewness and kurtosis distribution. Multiple reference data sets with known distribution characteristics are selected from the sample database, and the current skewness and kurtosis results are compared to determine the threshold and proportional factor suitable for the data set. These thresholds and proportional factors are obtained through statistics of multiple groups of reference data. For example, under the condition that the eigenvalue range is 0 to 100, the threshold is 10 and the proportional factor is 1.5 according to statistics. After the parameter determination is completed, the recognition parameters are modified accordingly, and the newly determined threshold and proportional factor are recorded as the adjusted recognition parameters.

[0042] Using the adjusted recognition parameters obtained previously, each eigenvalue is compared with the threshold and proportional factor set in the adjustment parameters, and the eigenvalue is quantitatively evaluated based on the difference from the threshold and the deviation from the proportional factor. The position of the eigenvalue in the overall distribution of the standardized feature data is checked point by point, and lower weights are given to eigenvalues ​​with large differences, medium weights are given to eigenvalues ​​close to the average range, and higher weights are given to features with stable eigenvalues ​​close to the center of the reference range. Through repeated comparison and screening among multiple features, a feature set containing different weights and classification criteria is formed, and the eigenvalues ​​after evaluation and weighted classification are recorded, so as to finally obtain the adjusted feature results.

[0043] The steps to obtain the environmental adaptation feature results are: Using environmental simulation, setting lighting conditions and background, simulating lighting scenes of sunlight, shadows and artificial lighting, and changing the background complexity to obtain simulated environmental image data; Based on the simulated environment image data, the feature adjustment results are applied to the images in each simulated environment, the feature recognition accuracy under each recognition parameter is calculated, and the recognition test results under each environment are obtained; The recognition test results in various environments are integrated, and the adaptability and accuracy of the recognition parameters in the simulated environment are analyzed and compared to obtain the environmental adaptation characteristic results.

[0044] Specifically, the illumination intensity value of about 20,000 lux for daylight scenes, about 5,000 lux for shadow scenes, and about 800 lux for artificial lighting scenes are read from the reference illumination condition definition record. These values ​​are derived from statistics of actual measurement data. The graphic plates that can be used to change the background complexity in the shooting environment are quantified according to the number of lines per unit area. For example, 5 lines drawn in an area of ​​1 square centimeter are defined as low complexity, 10 lines are defined as medium complexity, and 20 lines are defined as high complexity. Then, the combination of illumination scenes and background graphic plates is sequentially replaced in the shooting area. Under each combination, continuous shooting is performed using a photographic device with a fixed focal length and exposure time. During shooting, multiple images are captured at the same position and the corresponding illumination and background parameters are recorded. The above shooting steps are repeated for multiple combinations. The image data sequences obtained from all shootings are summarized to finally obtain the simulated environment image data.

[0045] Image frames are selected one by one from the obtained simulated environment image data, and the adjusted feature results obtained before are called for each image. The feature data is compared value by value with the calibrated reference feature set in the corresponding environment, and the difference between the feature value in the reference feature set and the current feature value is recorded. When the difference is lower than the 5% difference threshold determined in advance by the statistical reference image set, the match is counted as a correct recognition. When the difference exceeds 5%, it is recorded as a recognition error. The recognition accuracy is calculated by calculating the percentage of the number of correct recognitions to the total number of features. The same calculation process is repeated for images under different lighting and background complexity conditions, and the recognition accuracy results under various environmental scenarios are summarized item by item to finally obtain the recognition test results under each environment.

[0046] The recognition test results in various environments were classified and counted, and the recognition accuracy values ​​in daylight scenes, shadow scenes, artificial lighting scenes, and different background complexity conditions were listed in a comparison table. The variance and range between these accuracy values ​​were calculated in turn, and compared with the 3% deviation threshold obtained from the reference data set. When the accuracy value deviation of multiple environmental scenes did not exceed 3%, it was recorded as high consistency, and when it exceeded 3%, it was recorded as low consistency. These numerical thresholds were derived from the statistical results of multiple groups of standardized control data. Subsequently, the recognition accuracy distribution characteristics under each environmental test condition were sorted and marked, and all processed data were recorded in the same summary sequence, thereby obtaining the adaptability and accuracy evaluation results of the recognition parameters in the simulated environment.

[0047] The steps to obtain identification data are: Based on the environmental adaptation feature results, analysis is performed to identify crack features, including crack width, length, depth and position in the image, to obtain identification data, while recording the parameters of each crack to establish an initial database of crack features; Based on the initial database of crack characteristics, data fusion is performed to integrate the crack information collected from each environmental condition to obtain a comprehensive crack characteristic dataset; Based on the comprehensive crack feature data set, pattern recognition is used to identify and classify cracks, and the type and impact of each crack are analyzed and determined.

[0048] Specifically, based on the environmental adaptation feature results obtained previously, the applicable illumination and background parameter values ​​are extracted as input conditions, and these parameter values ​​are calibrated with the recorded crack image data. Each image is processed by a trained deep convolutional neural network model. The training process of the model uses multiple sets of labeled crack sample images to calibrate the crack area pixel by pixel and record the corresponding width, length and depth information. During the training, the network parameters are iteratively updated for multiple rounds using a fixed learning rate and batch size. In each round of iteration, the predicted results are compared point by point with the known annotations. The error is calculated and the network parameters are updated according to the error. When the error drops below the threshold determined by the mean of the stable interval obtained by counting the crack-free samples plus twice the standard deviation, the training can be stopped. The trained model is then used to analyze the spatial distribution and geometric parameters of each crack in the current image. The crack position is calculated by extracting the crack pixel coordinates, and the parameter values ​​of each crack are recorded and summarized. After obtaining the identification data, an entry is established for each crack, and the corresponding width, length, depth and position parameters are loaded into the entry one by one, finally forming an initial database of crack features.

[0049] Based on the initial database of crack characteristics established previously, the data entries from different environmental conditions are numerically compared and matched for each crack parameter. For the matching process, the crack parameters, including width, length, depth and position, are read one by one from the initial database, and these parameters are compared with the crack records under different lighting and background conditions. When the difference between the same identified cracks in multiple sets of records is lower than the parameter deviation range of about 5% obtained by the statistical reference set analysis, these records are regarded as multi-environmental manifestations of the same crack, and the parameters with similar values ​​in multiple records are weighted averaged. The weight value is obtained by analyzing multiple sets of standard data sets. For example, a weight of 2 is assigned to high-credibility records, and a weight of 1 is assigned to medium-credibility records. Through this kind of item-by-item comparison and fusion processing, the multi-environment data are integrated into a unified data set, and the fused crack parameters are re-summarized and recorded to finally obtain a comprehensive crack feature data set.

[0050] According to the comprehensive crack feature data set obtained earlier, the parameter values ​​of each crack are organized by category, and the width, length, depth and position parameters are input as feature vectors into the trained classification model. The classification model has used a large number of known type crack samples for parameter fitting during the early training. The feature values ​​are extracted from the training data set class by class and compared with the type labels. A fixed classification threshold is used. The threshold is determined by taking the mean plus one standard deviation after statistically averaging the feature values ​​of hundreds of known crack types. The feature values ​​of the cracks to be classified are processed by the model to obtain the predicted type label, and the predicted type is compared with the reference type set. If the error is less than the above-mentioned threshold, the current type is matched, and the classification results of all cracks are summarized and marked one by one, and the corresponding type names and influencing indicators are recorded to obtain the final adjustment feature results.

[0051] The present invention provides a crack visual detection system, comprising: The image acquisition module collects the image sequence of the automobile mold surface from the camera, records the pixel data of each frame of the image, and obtains the original pixel data; The image preprocessing module performs grayscale value conversion based on the original pixel data, removes noise, and generates processed pixel results; The edge detection module uses the processed pixel results to calculate the pixel difference of the image edge, extract the edge information, and obtain the edge feature results; The feature optimization module applies cascade data aggregation to the edge feature results, optimizes the feature information, analyzes the feature statistical distribution, adjusts the recognition parameters based on the analysis, and generates optimized feature results; then simulates the changing environmental factors, applies environmental adaptability tests, and obtains environmental adaptability feature results; The crack identification module uses the environmental adaptation feature results and combines multi-angle data analysis to identify crack features and generate identification data.

[0052] The above are only preferred embodiments of the present invention and are not intended to limit the present invention in other forms. Any technician familiar with the profession may use the technical contents disclosed above to change or modify them into equivalent embodiments with equivalent changes and apply them to other fields. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the technical solution of the present invention still falls within the protection scope of the technical solution of the present invention.

Claims

1. A method for visually detecting cracks on the surface of an automobile mold, characterized in that: The following steps are involved: Acquire an image sequence of the surface of the automobile mold from a camera, extract pixel data of the image sequence, and generate an original pixel result; perform grayscale value conversion and noise data removal on the original pixel result to obtain a processed pixel result; Taking the processed pixel result as input, calculating the pixel difference of the edge of the image, extracting the edge information, and generating the edge feature result; applying cascade data aggregation to the edge feature result, optimizing the feature information by accumulating data, and obtaining the optimized feature result; Adjusting the optimized feature result, adjusting the recognition parameters according to the statistical distribution of the feature, and generating an adjusted feature result; Simulating changing environmental factors, including illumination and background, applying an environmental adaptability test to the adjustment feature result, and outputting an environmental adaptability feature result; The environmental adaptation feature results are used to identify crack features, integrate multi-angle data, and generate identification data.

2. The method for visually detecting surface machining cracks of automobile molds according to claim 1, characterized in that: The steps of obtaining the original pixel result are: The camera is started and positioned on the surface of the automobile mold to continuously capture image sequences. Each frame of the image is sent to the data buffer through network transmission to form an image frame set and obtain an unprocessed image sequence. Based on the unprocessed image sequence, pixel data extraction is performed to identify the color and intensity value of each pixel point to obtain pixel data and obtain a complete pixel data set; Based on the complete pixel data set, the pixels in each frame of the image are standardized and encoded, the original data is converted into a unified data format, and arrayed so that the data is stored in an array form to obtain the original pixel result.

3. The method for visually detecting surface machining cracks of automobile molds according to claim 1, characterized in that: The steps of obtaining the processed pixel result are: Extracting grayscale values ​​pixel by pixel from the original pixel result, converting the RGB value of each pixel into a single grayscale value, and obtaining grayscale pixel data by calculating the grayscale intensity of each pixel; Based on the grayscale pixel data, the local variance of each pixel is calculated using the following formula: ; in, is the local variance of the pixel, is the number of pixels in the neighborhood, The first The gray value of a pixel, is the average gray value in the neighborhood; According to the local variance, the pixel points are screened using a set threshold value to remove noise data points to obtain a processed pixel result.

4. The method for visually detecting cracks on the surface of automobile molds according to claim 1, characterized in that: The steps for obtaining the edge feature result are: Applying a high-pass filter to extract image edges from the processed pixel results, amplifying the high-frequency portion of the pixel data to distinguish pixel changes, calculating the contrast between each pixel and neighboring pixels, identifying edge areas, and obtaining an edge-emphasized image; Based on the edge-emphasized image, the edge strength of each pixel is calculated using the following formula: ; in, is the edge strength, and is the gradient value of the image in the horizontal and vertical directions; The edge strength is utilized and a threshold is applied to extract edge information. The threshold is adjusted according to the edge strength distribution of the image to obtain an edge feature result.

5. The method for visually detecting surface machining cracks of automobile molds according to claim 1, characterized in that: The steps for obtaining the optimization feature results are: Performing layered processing on the edge feature results, allocating each edge feature to a separate data layer, each layer representing an image region and edge density, to obtain layered edge feature data; Based on the layered edge feature data, the edge feature cumulative index of each layer is calculated, and the calculation formula is: ; in, represents the cumulative index, Represents the number of layers, Representative The characteristic strength of the layer, Represents the weight adjustment factor associated with the level; Based on the cumulative index, the cumulative impact of all data layers is combined to obtain an optimized feature result.

6. The method for visually detecting surface machining cracks of automobile molds according to claim 1, characterized in that: The steps of obtaining the adjustment feature result are: Performing statistical analysis on the optimized feature results, including calculating the mean value and standard deviation of each feature, and normalizing according to the mean value and standard deviation to obtain standardized feature data; Based on the standardized feature data, analyzing the statistical distribution, the statistical distribution includes skewness and kurtosis, adjusting the recognition parameters according to the statistical distribution, modifying the threshold and the scale factor, and obtaining the adjusted recognition parameters; The adjusted recognition parameters are used to re-evaluate the weight and classification criteria of each feature to obtain an adjusted feature result.

7. The method for visually detecting surface machining cracks of automobile molds according to claim 1, characterized in that: The steps for obtaining the environmental adaptation feature result are: Using environmental simulation, setting lighting conditions and background, simulating lighting scenes of sunlight, shadows and artificial lighting, and changing the background complexity to obtain simulated environmental image data; Based on the simulated environment image data, the feature adjustment result is applied to the image in each simulated environment, the feature recognition accuracy under each recognition parameter is calculated, and the recognition test result under each environment is obtained; The recognition test results in various environments are integrated, and the adaptability and accuracy of the recognition parameters in the simulated environment are analyzed and compared to obtain the environmental adaptation characteristic results.

8. The method for visually detecting surface machining cracks of automobile molds according to claim 1, characterized in that: The steps for obtaining the identification data are: Based on the environmental adaptation feature results, analysis is performed to identify crack features, including crack width, length, depth and position in the image, to obtain identification data, while recording parameters of each crack to establish an initial database of crack features; Based on the initial database of crack characteristics, performing data fusion to integrate the crack information collected from each environmental condition to obtain a comprehensive crack characteristic data set; Based on the comprehensive crack feature data set, pattern recognition is applied to identify and classify cracks, and the type and impact of each crack are analyzed and determined.

9. A crack visual detection system according to the method for visually detecting cracks on the surface of an automobile mold according to any one of claims 1 to 8, characterized in that: include: The image acquisition module collects the image sequence of the automobile mold surface from the camera, records the pixel data of each frame of the image, and obtains the original pixel data; The image preprocessing module performs grayscale value conversion based on the original pixel data, removes noise, and generates processed pixel results; The edge detection module uses the processed pixel results to calculate the pixel difference of the image edge, extract the edge information, and obtain the edge feature results; The feature optimization module applies cascade data aggregation to the edge feature results, optimizes the feature information, analyzes the feature statistical distribution, adjusts the recognition parameters based on the analysis, and generates optimized feature results; then simulates the changing environmental factors, applies environmental adaptability tests, and obtains environmental adaptability feature results; The crack identification module uses the environmental adaptation feature results and combines multi-angle data analysis to identify crack features and generate identification data.

Citation Information

Patent Citations

  • Special in-situ toughened high-performance spherical tungsten powder for laser 3D printing and preparation method of special in-situ toughened high-performance spherical tungsten powder

    CN113020605A

  • Vehicle-mounted camera operation reliability detection system and method and computer equipment

    CN113691798A

  • Preparation method and device of composite heat conduction layer and manufacturing method of longitudinal heat conductor

    CN117341251A

  • Chemical equipment fault diagnosis system

    CN119067982A

  • Deep and far sea image transmission method

    CN119299054A

Cited By

  • Visual image-based welding seam defect detection method

    CN120352432A

  • Plant category determination method based on multispectral image

    CN120599457A

  • A plant class determination method based on multispectral images

    CN120599457B

  • Automobile brake assembly abnormity identification method and system based on image identification

    CN120689289A

  • Powder metallurgy invisible crack defect detection method and system

    CN121437990A