A Visual Inspection Method and System for Surface Processing Cracks of Automobile Molds

By performing grayscale conversion, edge calculation and stacked data aggregation on the image sequence of the surface of the automobile mold, combined with environmental adaptability testing, the identification deviation problem of the existing technology under complex conditions is solved, and more stable and reliable crack feature recognition is achieved.

CN119693366BActive Publication Date: 2025-06-20JILIN PROVINCE AXLE AUTO COMPONENTS & PARTS CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

The existing automotive mold surface crack visual detection technology lacks flexibility under complex lighting and background conditions, resulting in feature extraction distortion, crack width and depth determination deviation, and insufficient multi-dimensional correlation data analysis capabilities, resulting in insufficient detection of insufficient robustness and continuous reliability.

Method used

By obtaining the image sequence of the surface of the car mold from the camera, extracting pixel data, performing grayscale value conversion and noise removal, calculating pixel differences at the edge of the image, applying stacked data aggregation and environmental adaptability testing, optimizing feature information and improving identification accuracy.

Benefits of technology

The crack feature recognition stability under various lighting and background conditions is achieved, the detection robustness and reliability are improved, the probability of misjudgment is reduced, and the objectivity of crack details parameters is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693366B_ABST
    Figure CN119693366B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of crack detection, and specifically to a visual inspection method and system for surface processing cracks of automobile molds, including the following steps: obtaining an image sequence of the surface of an automobile mold from a camera, extracting pixel data of the image sequence, and generating an original pixel result; performing gray value conversion and noise data elimination on the original pixel result to obtain a processed pixel result. The present invention makes the feature content purer by extracting the basic information of each pixel point in the image and converting it into a form that is easier to analyze, so as to eliminate noise points and refine the gray features in the image. On this basis, feature information accumulation and distribution correction means are adopted to transform the edge features from a chaotic and disorderly state to a clear and orderly direction, coordinate the change range of parameters under various image conditions, and make the feature parameters not easily deviate significantly 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 particularly to a visual crack detection method and system for the surface machining of automotive molds. Background Art

[0002] When machining automotive molds, visual crack detection is required for quality inspection. However, the existing technologies often lack flexibility when facing complex and variable lighting and background conditions. They usually rely on a single quantitative standard or fixed threshold, making the feature extraction process prone to distortion when encountering strong light reflection or dark areas. In high-brightness scenes, fine cracks protruding 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 are unclear, thus destroying the stability of data comparison. Moreover, the lack of multi-dimensional correlation data analysis ability makes it difficult to reasonably reflect the internal correlation of crack features. When external interference factors are continuously superimposed, the stability of feature positioning and classification decreases sharply, and the probability of misjudgment increases significantly, resulting in the detection process often lacking 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 deficiencies in the prior art and propose a visual crack detection method and system for the surface machining of automotive molds.

[0004] To achieve the above purpose, the present invention adopts the following technical solution. A visual crack detection method for the surface machining of automotive molds includes the following steps:

[0005] Obtain an image sequence of the surface of the automotive mold from a camera, extract the pixel data of the image sequence, and generate an original pixel result; perform grayscale value conversion and noise data elimination on the original pixel result to obtain a processed pixel result.

[0006] Taking the processed pixel result as input, calculate the pixel difference at the image edge, extract edge information, and generate an edge feature result; apply stacked data aggregation to the edge feature result, and optimize the feature information through cumulative data to obtain an optimized feature result.

[0007] Adjust the optimized feature result, adjust the recognition parameters according to the statistical distribution of the features, and generate an adjusted feature result; simulate changing environmental factors, including lighting and background, apply environmental adaptability testing to the adjusted feature result, and output an environmentally adapted feature result.

[0008] Utilize the environmentally adapted feature result to identify crack features, integrate multi-angle data, and generate recognition data.

[0009] Preferably, the step of obtaining the original pixel result is:

[0010] Start the camera and locate it on the surface of the automotive mold, continuously capture an image sequence. Each frame of the image is transmitted through the network and sent to the data buffer to form a set of image frames, obtaining an unprocessed image sequence;

[0011] Based on the unprocessed image sequence, perform pixel data extraction, identify the color and intensity values of each pixel point to obtain pixel data, and obtain a complete pixel data set;

[0012] Based on the complete pixel data set, perform standardized encoding on the pixel points in each frame of the image, convert the original data into a unified data format, and arrayify it so that the data is stored in the form of an array, obtaining the original pixel result.

[0013] Preferably, the steps for obtaining the processed pixel result are as follows:

[0014] Extract the gray value pixel by pixel from the original pixel result, convert the RGB value of each pixel into a single gray value, and obtain the gray pixel data by calculating the gray intensity of each pixel;

[0015] Based on the gray pixel data, calculate the local variance of each pixel point. The calculation formula is:

[0016] ;

[0017] where, is the local variance of the pixel point, is the number of pixel points in the neighborhood, is the gray value of the th pixel in the neighborhood, is the average gray value in the neighborhood;

[0018] According to the local variance, use a set threshold to screen pixel points, remove noise data points, and obtain the processed pixel result.

[0019] Preferably, the steps for obtaining the edge feature result are as follows:

[0020] From the processed pixel result, apply a high-pass filter to extract the image edge, distinguish pixel changes by amplifying the high-frequency part in the pixel data, calculate the contrast of each pixel with its neighboring pixels, identify the edge area, and obtain an edge-emphasized image;

[0021] Based on the edge-emphasized image, calculate the edge intensity of each pixel point. The calculation formula is:

[0022] ;

[0023] where, is the edge intensity, and are the gradient values of the image in the horizontal and vertical directions;

[0024] Using the edge intensity, a threshold is applied to extract edge information, and the threshold is adjusted according to the edge intensity distribution of the image to obtain the edge feature result.

[0025] Preferably, the steps for obtaining the optimized feature result are as follows:

[0026] Perform hierarchical processing on the edge feature result, allocate each edge feature to a separate data layer, and each layer represents an image area and edge density to obtain hierarchical edge feature data;

[0027] Based on the hierarchical edge feature data, calculate the cumulative index of the edge feature for each layer, and the calculation formula is:

[0028] ;

[0029] where, represents the cumulative index, represents the number of layers, represents the th layer of feature intensity, represents the weight adjustment factor associated with the hierarchy;

[0030] Based on the cumulative index, combine the cumulative effects of all data layers to obtain the optimized feature result.

[0031] Preferably, the steps for obtaining the adjusted feature result are as follows:

[0032] Perform statistical analysis on the optimized feature result, including calculating the mean and standard deviation of each feature, and normalizing according to the mean and standard deviation to obtain standardized feature data;

[0033] Based on the standardized feature data, analyze the statistical distribution, and the statistical distribution includes skewness and kurtosis. Adjust the recognition parameters according to the statistical distribution, modify the threshold and scale factor to obtain the adjusted recognition parameters;

[0034] Use the adjusted recognition parameters to re-evaluate the weight and classification criteria of each feature to obtain the adjusted feature result.

[0035] Preferably, the steps for obtaining the environment adaptation feature result are as follows:

[0036] Use environment simulation to set the lighting conditions and background, simulate the lighting scenes of sunlight, shadow and artificial lighting, and at the same time change the background complexity to obtain simulated environment image data;

[0037] Based on the simulated environment image data, apply the adjusted feature results to the images in each simulated environment, calculate the feature recognition accuracy rate under each recognition parameter, and obtain the recognition test results in each environment;

[0038] Integrate the recognition test results in each environment, and by analyzing and comparing the consistency of each test data, the adaptability and accuracy of the recognition parameters in the simulated environment, obtain the environmental adaptation feature results.

[0039] Preferably, the steps for obtaining the recognition data are as follows:

[0040] Based on the environmental adaptation feature results, conduct an analysis to identify crack features, including the width, length, depth of the crack and its position in the image, obtain the recognition data, and at the same time record the parameters of each type of crack to establish an initial database of crack features;

[0041] Based on the initial database of crack features, perform data fusion to integrate the crack information collected under each environmental condition, and obtain a comprehensive crack feature data set;

[0042] According to the comprehensive crack feature data set, apply pattern recognition to identify and classify the cracks, and analyze and judge the type and impact of each type of crack.

[0043] The present invention provides a crack vision detection system, including:

[0044] An image acquisition module, which acquires an image sequence of the surface of an automotive mold from a camera, records the pixel data of each frame of the image, and obtains the original pixel data;

[0045] An image preprocessing module, based on the original pixel data, performs grayscale value conversion, eliminates noise, and generates processed pixel results;

[0046] An edge detection module, using the processed pixel results, calculates the pixel difference at the image edge, extracts the edge information, and obtains the edge feature results;

[0047] A feature optimization module, which applies stacked data aggregation to the edge feature results, optimizes the feature information, conducts an analysis of the feature statistical distribution, adjusts the recognition parameters according to the analysis, and generates optimized feature results; then simulates changing environmental factors and applies environmental adaptability tests to obtain environmental adaptation feature results;

[0048] A crack recognition module, which uses the environmental adaptation feature results and combines multi-angle data analysis to identify the crack features and generate recognition data.

[0049] Compared with the prior art, the advantages and positive effects of the present invention are as follows:

[0050] The present invention makes the feature content purer by extracting the basic information of each pixel point in the image and converting it into a more easily analyzable form, so as to eliminate noise points and refine the gray-scale features in the image. On this basis, feature information accumulation and distribution correction means are adopted to transform the edge features from a chaotic and disorderly state to a clear and orderly direction, coordinate the change range of parameters under various image conditions, and make the feature parameters not prone to large deviations due to environmental differences. By means of adaptive adjustment of environmental factors such as light intensity and background complexity, the feature information is kept in a relatively stable presentation state in various scenarios, avoiding sudden changes in feature parameters due to scene switching. The crack morphology is hierarchically expressed by means of multi-dimensional data fusion, so that the fine details and the overall distribution jointly form a more easily measurable feature set. Comprehensive processing of multi-angle data can maintain a relatively balanced recognition effect under complex conditions, avoid obvious influence on the feature recognition accuracy due to specific condition limitations, enhance the reliability of the overall detection under multi-environment conditions, and make the identified crack detail parameters closer to the objective reality. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a schematic diagram of the steps of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0052] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to 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 used to limit the present invention.

[0053] Please refer to Figure 1 , the present invention provides a technical solution, a visual inspection method for cracks on the surface of an automotive mold, including the following steps:

[0054] Obtain an image sequence of the surface of the automotive mold from a camera, extract the pixel data of the image sequence, and generate an original pixel result; perform gray-scale value conversion and noise data elimination on the original pixel result to obtain a processed pixel result.

[0055] Taking the processed pixel result as input, calculate the pixel difference at the image edge, extract the edge information, and generate an edge feature result; apply stacked data aggregation to the edge feature result, and optimize the feature information by accumulating data to obtain an optimized feature result.

[0056] Adjust the optimized feature result, adjust the recognition parameters according to the statistical distribution of the features, and generate an adjusted feature result; simulate changing environmental factors, including light and background, apply environmental adaptability testing to the adjusted feature result, and output an environmentally adapted feature result.

[0057] Utilize the environmentally adapted feature result to identify the crack features, integrate multi-angle data, and generate recognition data.

[0058] The steps for obtaining the original pixel results are as follows:

[0059] Start the camera and position it on the surface of the automotive mold, continuously capture an image sequence, and each frame of the image is transmitted through the network and sent to the data buffer to form a set of image frames, obtaining an unprocessed image sequence;

[0060] Based on the unprocessed image sequence, perform pixel data extraction, identify the color and intensity values of each pixel point to obtain pixel data, and obtain a complete pixel data set;

[0061] Based on the complete pixel data set, perform standardized encoding on the pixel points in each frame of the image, convert the original data into a unified data format, and arrayify it so that the data is stored in the form of an array, obtaining the original pixel results.

[0062] Specifically, based on the imaging device that has been fixed at the position on the surface of the automotive mold, according to the pre-recorded camera installation parameters (for example, setting the camera focal length value to a fixed integer value obtained by averaging multiple focus tests, such as 10 mm, and determining the exposure time to be 1 / 100 second based on on-site illuminance measurement, and fixing the aperture size to f / 2.8 according to the light distribution situation), use the set network connection parameters (such as specifying a fixed IP address 192.168.1.100 in a local area network environment and agreeing on a maximum transmission rate of 10 MB / s in the parameter table) to start the acquisition process, continuously call the image acquisition function in the camera to capture image frames at a fixed time sequence (for example, call once every 1 / 30 second), each frame of the image is first temporarily stored in the built-in cache unit of the camera, and then it is flowed into the data buffer formed by the memory in sequential transmission mode by calling the network sending function. The capacity of this data buffer is obtained by combining the estimated single-frame data size and the planned frame rate (for example, calculating that each frame occupies about 0.5 MB according to the image resolution and color depth, and setting 30 frames per second, then the buffer can take 20 MB). After continuously receiving all the incoming image frames, arrange them in sequence and store them without performing additional format transformation and data operation. In this way, an unprocessed image sequence is obtained.

[0063] Based on the obtained unprocessed image sequence, extract the original pixel data of each frame point by point, directly read the pixel values in sequence from the byte sequence where the image frame is stored in the memory. Each pixel value is composed of multiple channel bytes (for example, in the RGB format, it contains three values of the red channel, green channel, and blue channel, and the value range of each channel is an integer from 0 to 255). By traversing the image pixel index (such as continuously incrementing from the 0th pixel to the last pixel of this frame) to read these channel values in sequence, integrate and record the color and intensity information corresponding to all pixel points. When the pixel data of all frames is completed in reading and recording, a complete pixel data set is obtained.

[0064] In the obtained complete pixel dataset, the channel values of each pixel are uniformly standardized and encoded. The original channel integer values from 0 to 255 are converted into floating-point numbers between 0 and 1 through a simple division operation (for example, dividing by a fixed value of 255, which is determined from the statistics of the maximum pixel values of typical image samples in the early stage), so that the channel values are transformed into the same numerical scale. Subsequently, the standardized results of each pixel are assembled into an array structure with a fixed length (for example, a floating-point array of length 3 corresponds to the RGB three channels). This step is repeated for all pixels in the same frame to form two-dimensional array data, and this process is repeated for multiple frames of images to expand the data into a three-dimensional or higher-dimensional array. When all pixels are completed with standardization and array formation, the original pixel results are obtained.

[0065] The steps to obtain the processed pixel results are as follows:

[0066] Extract the grayscale values pixel by pixel from the original pixel results, and convert the RGB values of each pixel into a single grayscale value to obtain grayscale pixel data by calculating the grayscale intensity of each pixel.

[0067] Based on the grayscale pixel data, calculate the local variance of each pixel point. The calculation formula is:

[0068] ;

[0069] Among them, is the local variance of the pixel point, is the number of pixel points in the neighborhood, is the th pixel grayscale value in the neighborhood, is the average grayscale value in the neighborhood;

[0070] According to the local variance, use the set threshold to screen pixel points and remove noise data points to obtain the processed pixel results.

[0071] Specifically, based on the obtained original pixel results, the RGB channel values of each pixel point inside are read item by item. Through linear weighted calculation of its R, G, B channel values according to fixed proportional coefficients (for example, multiplying the R channel value by 0.299, the G channel value by 0.587, and the B channel value by 0.114. These coefficients are obtained from the statistical analysis results of the human eye visual perception characteristics and extracted from the image engineering standard dataset, and the coefficient values have a fixed reference range in the professional image processing field), the obtained weighted sum is used as the grayscale value of this pixel, and then the grayscale values of all pixels are recorded item by item to form grayscale pixel data.

[0072] The advantage of the formula is that by quantifying the cubic deviation between the gray values of neighboring pixels and the average value, it is beneficial to accurately represent the degree of dispersion of the gray distribution in the local area, thus enabling the subsequent operation of screening pixels based on the local variance;

[0073] The steps to obtain the parameter are as follows: Select the position of the target pixel point in the obtained gray pixel data, and determine the pixel range of its adjacent area (for example, take a total of 9 pixel points in the surrounding 3×3 area, and obtain N = 9 by actual counting in the 3×3 area), The steps to obtain the parameter are as follows: Read the gray values of these 9 adjacent pixels point by point (obtained directly by indexing the recorded gray pixel data), The steps to obtain the parameter are as follows: Add up the gray values of these 9 pixels and divide by 9 to obtain the average gray value;

[0074] Calculation process:

[0075] For example, select a set of neighboring pixel gray values from the gray pixel data as , and calculate the average gray value :

[0076] ;

[0077] Then calculate The cubic value of:

[0078] ;

[0079] ;

[0080] ;

[0081] ;

[0082] ;

[0083] ;

[0084] The second 119th point is the same as the first 119th point, which is 9.4;

[0085] The second 120th point is the same as the first 120th point, which is 1.3717;

[0086] The third 122nd point is the same as the first 122nd point, which is 0.7;

[0087] Sum up all the above cubic differences:

[0088] ;

[0089] Divide the sum by :

[0090] ;

[0091] The result shows that the local variance value of the neighborhood is approximately 5.9768. This value indicates that the greater the third-order deviation of the pixel from the average gray value of the neighborhood, the more dispersed the gray distribution in the local area. By comparing with the threshold set in the subsequent steps, pixels with too large local variance can be screened out.

[0092] Based on the calculated local variance data, first read the variance value of each pixel point and establish a comparison step. By analyzing multiple typical crack-free die surface images in the pre-recorded image statistical samples, extract the distribution characteristics of the local variance of pixels in these anomaly-free images, and determine a threshold value that can calibrate the noise boundary by statistical methods (for example, by analyzing hundreds of crack-free surface images, statistically calculating the distribution intervals of the mean and variance of all pixel local variances, and selecting a value of about 10, which is the mean of the interval plus twice the standard deviation, as the threshold value). Subsequently, check the local variance value of the current pixel point. When the local variance value is greater than 10, label the pixel point as a noise pixel and remove its gray data. At the same time, do not perform any removal operations on pixel points with variance values lower than 10. Through this screening step, all non-compliant pixel points are removed and the gray data of the remaining pixel points are recorded, thus finally obtaining the processed pixel results.

[0093] The steps to obtain the edge feature results are as follows:

[0094] From the processed pixel results, apply a high-pass filter to extract the image edges. By amplifying the high-frequency part in the pixel data to distinguish pixel changes, calculate the contrast of each pixel with its neighboring pixels, identify the edge regions, and obtain an edge-emphasized image;

[0095] Based on the edge-emphasized image, calculate the edge intensity of each pixel point. The calculation formula is:

[0096] ;

[0097] where, is the edge intensity, and are the gradient values of the image in the horizontal and vertical directions;

[0098] Utilize the edge intensity and apply a threshold to extract the edge information. The threshold is adjusted according to the edge intensity distribution of the image to obtain the edge feature results.

[0099] Specifically, based on the processed pixel results obtained previously, the pixel data therein is directly called as input. By selecting high-pass filter parameter values and filter kernel sizes in a fixed two-dimensional sampling window, the brightness differences of several pixels around each pixel are calculated point by point. The data values of the lower frequency components are eliminated by numerical subtraction, and the values of the remaining higher frequency components are enhanced. These parameter values can be determined by statistical analysis of dozens of standard images with clear boundary lines in advance. For example, the brightness gradient value distribution of the edge points in the standard images is measured and the average enhancement ratio is calculated, and this ratio is used as the magnification factor. The calculation process of the contrast is performed successively on each pixel point, and the contrast value is obtained by calculating the pixel gray difference. When the contrast is greater than the threshold determined by adding one standard deviation to the average gray difference of the typical non-edge region obtained by statistics, the pixel point is marked as a potential edge pixel point. All potential edges are further compared with adjacent pixels, so as to eliminate the misjudged non-edge pixel points. Finally, the remaining high-brightness difference pixels are merged and marked to obtain an edge-emphasized image.

[0100] The advantage of the formula is that by simultaneously considering the gradient values in the horizontal and vertical directions and introducing the logarithmic transformation of the gradient sum, the edge intensity maintains a dynamic balance between large gradients and small gradients, so that there is a more flexible determination space when using the threshold to screen edge feature data in the subsequent process;

[0101] The steps for obtaining the parameter are as follows: In the edge-emphasized image obtained previously, for each pixel point, a differential filtering method with a fixed scale is adopted in the horizontal direction to measure the change in brightness of adjacent pixels, so as to obtain the value of, which is obtained by measuring the horizontal gradient distribution of multiple standard reference images and finally selecting in combination with the statistical average value of the brightness gradient of the on-site processed object image (querying the image edge gradient statistics manual, where the average gradient value in the horizontal direction is mostly between 10 and 50); , The steps for obtaining the parameter are as follows: The same method as is adopted, but differential measurement is performed in the vertical direction, and is taken according to the vertical gradient statistical average value (also between 10 and 50);

[0102] Calculation process:

[0103] First, calculate :

[0104] ;

[0105] ;

[0106] Then, calculate the denominator:

[0107] ;

[0108] By looking up the standard logarithm table, ;

[0109] Therefore, the denominator is ;

[0110] Finally, divide 25 by 4.8287:

[0111] ;

[0112] The result shows that the edge intensity of the current pixel is approximately 5.1757. When this value is significantly higher than the threshold defined by the average and standard deviation of the standard edge intensity in the statistical distribution (for example, for the surface of an ordinary metal mold, 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 determined as a non-edge pixel.

[0113] Using the edge intensity data calculated previously, taking the edge intensity value of each pixel as the judgment basis, through centralized statistical analysis of the edge intensity distribution of multiple standard images in the sample image set, extract the median and variance values in the overall distribution, and select the threshold data at the position where the cumulative frequency reaches 80%. For example, by statistically analyzing the edge intensity of dozens of images with known edge regions on the surface, it is found that the median is approximately 4.5 and the standard deviation is approximately 1.5. So, the threshold can be set as the sum of the median and the standard deviation, which is 6.0. When the edge intensity of a certain pixel in the actual calculation is greater than 6.0, it is marked as an edge pixel, otherwise it is marked as a non-edge pixel. Finally, by summarizing the calibration results of all pixels and performing continuous pixel region analysis, isolated pixels are removed and adjacent high-edge intensity pixel groups are connected, and finally all regions meeting this condition are recorded to obtain the edge feature result.

[0114] The steps to optimize the acquisition of the feature result are as follows:

[0115] Perform hierarchical processing on the edge feature result, assign each edge feature to a separate data layer, and each layer represents an image region and edge density to obtain hierarchical edge feature data;

[0116] Based on the hierarchical edge feature data, calculate the cumulative index of the edge feature for each layer. The calculation formula is:

[0117] ;

[0118] Among them, represents the cumulative index, represents the number of layers, represents the th layer's feature intensity, Represents the weight adjustment factor associated with the hierarchy;

[0119] Based on the cumulative index, combine the cumulative effects of all data layers to obtain the optimized feature result.

[0120] Specifically, based on the edge feature results obtained previously, classify all pixel points marked as edge features among them, divide these pixel points into several regions according to their positions in the image coordinate system, count the number of edge pixels and their positional relationships point by point within each region, quantify the density value by measuring the distance between adjacent pixels and the change in gray-level gradient according to the spatial distribution density of edge pixels in the region, thereby forming comparable density values, and then divide the data layers step by step according to these density values. Each layer corresponds to a different density range. Assign the edge feature pixels with higher density to the high-level sequence and those with lower density to the low-level sequence. During this process, record the edge features of each level, and uniformly process all regions by repeating this process, summarize the edge feature parameter information contained in each layer, so that each layer has a clear feature intensity and density distribution, thereby completing the layering operation, and finally arrange them in hierarchical order to form the layered edge feature data.

[0121] The advantage of the formula is that by summing the ratios of the squared values of the feature intensities of each layer to the corresponding weight adjustment factors and then taking the square root, quantitative comparison can be achieved among multiple hierarchical features, thereby obtaining a measure of the comprehensive influence of each layer;

[0122] The steps for obtaining the parameter are: count the number of layers through the layered edge feature data obtained previously. For example, for the 3 different density layers obtained after analysis, it is , The steps for obtaining the parameter are: measure the intensity of the edge feature points already recorded in each layer, and take the average intensity of all feature points in this layer as the value. For example, it is measured through the obtained layered edge feature data (the intensity unit is obtained by normalizing the edge gray-level gradient, and the numerical range is between 0 and 100); The steps for obtaining the parameter are: perform multi-layer feature analysis on the standard reference image, count the stability parameters of the feature intensities of each layer, use this stability parameter 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 it through actual measurement (this range is obtained based on the analysis of the feature distributions of multiple standard images, generally between 5 and 20);

[0123] Calculation process:

[0124] ;

[0125] ;

[0126] ;

[0127] ;

[0128] The result shows that the cumulative index is approximately 24.35. If this value is compared with the standard threshold (e.g., 20) in subsequent analysis, a value greater than 20 indicates a higher intensity of multi-layer comprehensive features, while a value less than 20 indicates a lower intensity of comprehensive features.

[0129] Based on the cumulative index data obtained previously, the eigenvalue tables originally recorded for each data layer are compared with the cumulative index. For each layer, the determined intensity values are checked layer by layer and matched through numerical comparison. When the cumulative index corresponding to any feature value within a layer significantly deviates from the average value of its layer, the feature data of that layer is re-archived. According to the feature distribution table statistically obtained from the standard image set in advance, the numerical differences between each feature value in the current layer and the feature values of its upper and lower layers are compared. Then, a progressive screening step is performed on the feature values with larger differences. Features with eigenvalue distributions within the same gradient range are merged into the same merged sequence. In this way, the multi-layer features are gradually mapped into a single optimized sequence. Each merged eigenvalue is compared again, and by repeatedly checking the intensity difference and distribution density, the features of each layer are finally unified and merged, and all processed feature data is recorded to obtain the optimized feature result.

[0130] The steps to obtain the adjusted feature result are as follows:

[0131] Perform statistical analysis on the optimized feature result, including calculating the average value and standard deviation of each feature, and normalizing according to the average value and standard deviation to obtain the standardized feature data;

[0132] Based on the standardized feature data, analyze the statistical distribution, where the statistical distribution includes skewness and kurtosis. Adjust the recognition parameters according to the statistical distribution, modify the threshold and scale factor to obtain the adjusted recognition parameters;

[0133] Use the adjusted recognition parameters to re-evaluate the weight and classification criteria of each feature to obtain the adjusted feature result.

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

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

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

[0137] The steps to obtain the environmental adaptation feature results are:

[0138] 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;

[0139] Based on the image data of the simulation environment, apply the adjusted feature results to the images in each simulation environment, calculate the feature recognition accuracy rate under each recognition parameter, and obtain the recognition test results in each environment;

[0140] Integrate the recognition test results in each environment, and by analyzing and comparing the consistency of each test data, the adaptability and accuracy of the recognition parameters in the simulation environment, obtain the environmental adaptation feature results.

[0141] Specifically, read the daylight scene illumination intensity value of about 20000 lux, the shadow scene illumination intensity value of about 5000 lux, and the artificial lighting scene illumination intensity value of about 800 lux from the reference lighting condition definition record. These values are derived from the statistics of actual measurement data. Quantify the graphic board that can be used to change the background complexity in the shooting environment according to the number of lines per unit area. For example, drawing 5 lines in an area of 1 square centimeter is defined as low complexity, 10 lines as medium complexity, and 20 lines as high complexity. Then, orderly exchange the combination of the lighting scene and the background graphic board in the shooting area. Under each group of combinations, use a photographic device with a fixed focal length and exposure time to take continuous photos. When taking photos, capture multiple images at the same position and record the corresponding lighting and background parameters. Repeat the above shooting steps for multiple groups of combinations. By summarizing all the image data sequences obtained from the shooting, finally obtain the simulation environment image data.

[0142] Select image frames one by one from the obtained simulation environment image data. For each image, call the previously obtained adjusted feature results, compare the feature data value by value with the calibrated reference feature set in the corresponding environment, and record the difference between the feature value in the reference feature set and the current feature value. When the difference is lower than the 5% difference threshold determined in advance by the statistical reference image set, count this match as a correct recognition. When the difference exceeds 5%, it is recorded as an incorrect recognition. Calculate the recognition accuracy rate by calculating the percentage of the number of correct recognitions in the total number of features. Repeat the same calculation process for images under different lighting and background complexity conditions, and summarize the recognition accuracy rate results for each type of environmental scene item by item. Finally, obtain the recognition test results in each environment.

[0143] Classify and statistically analyze the recognition test results in each environment. List the recognition accuracy values in daylight scenes, shadow scenes, artificial lighting scenes, and under different background complexity conditions in a comparison table. Calculate the variance and range between these accuracy values in sequence, and compare them with the 3% deviation threshold statistically obtained from the reference dataset. When the deviation of the accuracy values in multiple environmental scenes does not exceed 3%, it is recorded as having a high consistency; when it exceeds 3%, it is recorded as having a low consistency. These numerical thresholds are derived from the statistical results of multiple groups of standardized control data. Subsequently, sort and label the distribution characteristics of the recognition accuracy under each environmental test condition, and record all the processed data in the same summary sequence, thereby obtaining the evaluation results of the adaptability and accuracy of the recognition parameters in the simulated environment.

[0144] The steps for obtaining recognition data are as follows:

[0145] Based on the results of environmental adaptation characteristics, perform analysis to identify crack characteristics, including the width, length, depth, and position in the image of the cracks, obtain recognition data, and at the same time record the parameters of each type of crack to establish an initial database of crack characteristics.

[0146] Based on the initial database of crack characteristics, perform data fusion to integrate the crack information collected from each environmental condition to obtain a comprehensive dataset of crack characteristics.

[0147] According to the comprehensive dataset of crack characteristics, apply pattern recognition to identify and classify the cracks, and analyze and judge the type and impact of each type of crack.

[0148] Specifically, based on the previously obtained results of environmental adaptation characteristics, extract the applicable light and background parameter values as input conditions from them, calibrate these parameter values corresponding to the recorded crack image data, process each image through a trained deep convolutional neural network model. The training process of this model uses multiple groups of labeled crack sample images, calibrates the crack area pixel by pixel and records the corresponding width, length, and depth information. In the training, use a fixed learning rate and batch size to perform multiple rounds of iterative updates on the network parameters. In each round of iteration, calculate the error by comparing the prediction result with the known annotation point by point, and then update the network parameters according to the error. When the error drops below the threshold determined by the mean plus twice the standard deviation of the stable interval obtained by statistically analyzing the crack-free samples, the training can be stopped. Subsequently, use the trained model to analyze the spatial distribution and geometric parameters of each crack in the current image, calculate the crack position by extracting the crack pixel coordinates, record and summarize the parameter values of each crack, establish entries for each crack as a unit after obtaining the recognition data, and load the corresponding width, length, depth, and position parameters item by item into the entries, finally forming an initial database of crack characteristics.

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

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

[0151] The present invention provides a crack visual detection system, comprising:

[0152] 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;

[0153] The image preprocessing module performs grayscale value conversion based on the original pixel data, removes noise, and generates processed pixel results;

[0154] 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;

[0155] 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;

[0156] The crack recognition module uses the environmental adaptation feature results, combines multi-angle data analysis to recognize crack features, and generates recognition data.

[0157] The above are only the preferred embodiments of the present invention, and do not limit the present invention in other forms. Any person skilled in the art may use the disclosed technical content to make changes or modifications into equivalent embodiments with equivalent changes and apply them to other fields. However, as long as it does not depart from the technical solution content of the present invention, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention still fall 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; Using the environmental adaptation feature results, crack features are identified, multi-angle data are integrated, and identification data is generated; 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.

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 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.

6. 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.

7. 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.

8. A crack visual detection system according to the method for visual detection of surface machining cracks of automobile molds according to any one of claims 1 to 7, 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

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

    CN113691798A

  • Chemical equipment fault diagnosis system

    CN119067982A

Cited By

  • Industrial visual detection method and system for cracks machined on surface of automobile casting mold

    CN120765577A