A system and method for detecting surface defects of automobile engine cylinder head
Through global image acquisition and feature extraction, combined with adaptive adjustment detection methods, the problems of low efficiency and poor adaptability of the apparent quality detection of automobile engine cylinder heads in the prior art are solved, and efficient and accurate detection and classification of apparent defects are achieved.
Patent Information
- Application Number
- CN202510154611.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-02-12
AI Technical Summary
The existing methods for the apparent quality detection of automotive engine cylinder heads have problems such as low detection efficiency, strong subjectivity, and easy to miss inspection. The detection accuracy of the automated detection system is insufficient and has poor adaptability, making it difficult to achieve ideal results in the face of complex and changeable apparent defects.
An apparent defect detection method of the cylinder head of the automobile engine is adopted, and efficient and accurate detection of the apparent defect of the cylinder head through global image acquisition, feature extraction and adaptive adjustment. The specific steps include image acquisition of the cylinder head, extracting color, texture and shape features, identifying and classifying defects based on these features, and optimizing detection standards through adaptive adjustment.
It improves the accuracy and adaptability of the engine cylinder head detection, realizes efficient support for cylinder head detection under different batches and production conditions, and reduces the detection efficiency reduction caused by specific algorithms.
Smart Images

Figure CN119688702B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of apparent quality detection of automobile engine cylinder heads, and in particular relates to an apparent defect detection system and method for automobile engine cylinder heads. Background Art
[0002] With the rapid development of the automobile industry, automobile engine cylinder heads are important components of the engine, and their quality directly affects the performance and life of the engine. Traditional engine cylinder head surface quality inspection mainly relies on manual visual inspection, but this method has problems such as low detection efficiency, strong subjectivity, and easy missed detection. Therefore, it is particularly important to develop a system and method that can efficiently and accurately detect automobile engine cylinder head surface defects.
[0003] Although the automated inspection system in the prior art has improved the inspection efficiency to a certain extent, it still has problems such as insufficient inspection accuracy and poor adaptability. In particular, when faced with complex and changeable surface defects of engine cylinder heads, it is often difficult to achieve ideal inspection results. At the same time, its inspection is mostly based on a fixed reference benchmark, and lacks the ability to adaptively adjust sample data, which limits the efficiency of the inspection process. Based on this, the present invention proposes a method for detecting surface defects of automobile engine cylinder heads, aiming to solve the above problems. Summary of the invention
[0004] The purpose of the present invention is to provide a system and method for detecting surface defects of automobile engine cylinder heads, which can realize efficient and accurate detection of surface defects of automobile engine cylinder heads and improve detection accuracy and adaptability.
[0005] The technical solution adopted by the present invention is as follows:
[0006] A method for detecting surface defects of a cylinder head of an automobile engine, comprising:
[0007] Perform global image acquisition on the cylinder head of the automobile engine and output the appearance image data of the cylinder head of the automobile engine;
[0008] Extracting features from the appearance image data to obtain color features, texture features, and shape features of the automobile engine cylinder head;
[0009] Acquire a reference image of a cylinder head of an automobile engine, and perform surface defect recognition on the cylinder head of the automobile engine according to the color features, texture features, and shape features to determine a representation state of the cylinder head of the automobile engine, wherein the representation state includes a qualified state and an abnormal state;
[0010] Summarizing the appearance image data of the automobile engine cylinder head in the qualified state and outputting them as a sample data set, and then adaptively adjusting the defect recognition of the automobile engine cylinder head according to the sample data set;
[0011] The defect information of the automobile engine cylinder head in the abnormal state is collected, and the apparent defects of the automobile engine cylinder head are classified and recorded according to the defect information to form a defect detection report.
[0012] In a preferred embodiment, after the appearance image data of the automobile engine cylinder head is output, preprocessing is performed synchronously, and the preprocessing step includes:
[0013] Acquire the appearance image data of the automobile engine cylinder head, and perform denoising processing to eliminate noise interference in the appearance image data of the automobile engine cylinder head;
[0014] Performing contrast enhancement processing on the denoised appearance image data to enhance the clarity of the surface features of the cylinder head in the appearance image data;
[0015] Edge detection is performed on the appearance image data after contrast enhancement to highlight the edge information of the surface features of the automobile engine cylinder head.
[0016] In a preferred embodiment, the step of extracting features from the appearance image data to obtain color features, texture features and shape features of the automobile engine cylinder head comprises:
[0017] Acquire the appearance image data, and use color space conversion technology to convert the appearance image data from RGB color space to HSV color space to extract color features of the automobile engine cylinder head;
[0018] Using a gray level co-occurrence matrix method, the texture features of the appearance image data are calculated to obtain the texture features of the automobile engine cylinder head;
[0019] The shape features of the appearance image data are extracted through edge detection and contour extraction algorithms to obtain the shape features of the automobile engine cylinder head.
[0020] In a preferred embodiment, the step of identifying the surface defects of the automobile engine cylinder head according to the color features, texture features and shape features to determine the characterization state of the automobile engine cylinder head comprises:
[0021] Acquire appearance image data and reference images;
[0022] Vectorizing the color features, texture features, and shape features of the appearance image data and the color features, texture features, and shape features of a reference image to obtain a first feature vector corresponding to the appearance image data and a second feature vector corresponding to the reference image;
[0023] Obtaining a comparison function, and inputting the first feature vector and the second feature vector into the comparison function together, and recording an output result of the comparison function as a state evaluation parameter;
[0024] Obtaining an evaluation threshold, and comparing the state evaluation parameter with the evaluation threshold;
[0025] When the state evaluation parameter is greater than the evaluation threshold, it indicates that the appearance image data corresponding to the state evaluation parameter passes the defect recognition, and the representation state of the automobile engine cylinder head corresponding to the appearance image data is recorded as a qualified state;
[0026] When the state evaluation parameter is less than or equal to the evaluation threshold, it indicates that the appearance image data corresponding to the state evaluation parameter has not passed the defect recognition, and the representation state of the automobile engine cylinder head corresponding to the appearance image data is recorded as an abnormal state.
[0027] In a preferred embodiment, in the qualified state, the surface quality of the automobile engine cylinder head is re-inspected, and the specific process is as follows:
[0028] Extracting a color feature deviation region, a texture feature deviation region, and a shape feature deviation region between the appearance image data and the reference image;
[0029] If there is overlap between the color feature deviation area, the texture feature deviation area, and the shape feature deviation area, it indicates that there is an overlapping defect in the apparent quality of the corresponding automobile engine cylinder head, and the representation state of the corresponding automobile engine cylinder head is converted from a qualified state to an abnormal state;
[0030] If there is no overlap between the color feature deviation area, the texture feature deviation area, and the shape feature deviation area, the representation state of the automobile engine cylinder head corresponding to the appearance image data is maintained as a qualified state.
[0031] In a preferred embodiment, after the sample data set is output, the color features, texture features and shape features of the automobile engine cylinder head in the sample data set are classified to obtain multiple sample subsets;
[0032] Collecting the deviated regions in the appearance image data in each of the sample subsets, calculating the area of each of the deviated regions, and recording them as sample condition parameters;
[0033] Performing an offset process on each of the sample condition parameters, and outputting a corresponding sample evaluation interval according to the offset result;
[0034] Counting the number of sample condition parameters within each sample evaluation interval and recording them as parameters to be classified;
[0035] Arrange the parameters to be classified in descending order, and record the sample evaluation interval corresponding to the parameter to be classified with the largest value as the standard interval;
[0036] The color features, texture features and shape features corresponding to the sample condition parameters within the standard range are retained, and the color features, texture features and shape features corresponding to the sample condition parameters outside the standard range are screened out from the sample subset.
[0037] In a preferred embodiment, the step of adaptively adjusting the defect recognition of the automobile engine cylinder head comprises:
[0038] Obtaining color feature differences, texture feature differences, and shape feature differences between the appearance image data and the reference image in the sample subset;
[0039] The color feature difference, texture feature difference and shape feature difference are sorted in descending order respectively;
[0040] The color feature of the appearance image data corresponding to the color feature difference with the highest ranking is recorded as the color optimization feature, the texture feature of the appearance image data corresponding to the texture feature difference with the highest ranking is recorded as the texture optimization feature, and the shape feature of the appearance image data corresponding to the shape feature difference with the highest ranking is recorded as the shape optimization feature;
[0041] Constructing an evaluation interval based on the color optimization feature, texture optimization feature and shape optimization feature in combination with the color feature, texture feature and shape feature of the reference image;
[0042] The color features, texture features and shape features in the appearance image of the automobile engine cylinder head without performing defect recognition are compared, and when the color features, texture features and shape features in the appearance image of the automobile engine cylinder head without performing defect recognition are inconsistent with the corresponding evaluation interval, the representation state of the corresponding automobile engine cylinder head is directly recorded as an abnormal state.
[0043] In a preferred embodiment, the step of classifying and recording the apparent defects of the automobile engine cylinder head according to the defect information to form a defect detection report includes:
[0044] Acquire the defective area of the cylinder head of the automobile engine under the abnormal state;
[0045] Extracting the shortest distance between adjacent defective areas on the same automobile engine cylinder head, and recording the parameters to be evaluated;
[0046] Obtaining an evaluation threshold, and comparing the evaluation threshold with the parameter to be evaluated;
[0047] Counting the number of defective areas corresponding to when the parameter to be evaluated is greater than the evaluation threshold, and recording it as a primary condition parameter, and then calculating the proportion of the primary condition parameter in all defective areas, and recording it as a secondary condition parameter;
[0048] Obtaining a defect classification threshold, and comparing the defect classification threshold with a secondary condition parameter;
[0049] When the secondary condition parameter is higher than or equal to the defect classification threshold, the defect category of the automobile engine cylinder head is recorded as a dispersed defect, and is summarized into a defect detection report together with the area and location of the defect area;
[0050] When the secondary condition parameter is less than the defect classification threshold, the defect category of the automobile engine cylinder head is recorded as a concentrated defect, and is summarized into a defect detection report together with the area and location of the defect region;
[0051] Among them, the repair priority of the centralized defects is higher than the repair priority of the decentralized defects.
[0052] The present invention also provides a surface defect detection system for an automobile engine cylinder head, using the above-mentioned surface defect detection method for an automobile engine cylinder head, comprising:
[0053] An image acquisition module, wherein the image acquisition module is used to acquire a global image of the cylinder head of the automobile engine and output the image data of the appearance of the cylinder head of the automobile engine;
[0054] A feature extraction module, the feature extraction module is used to extract features from the appearance image data to obtain color features, texture features and shape features of the automobile engine cylinder head;
[0055] A state recognition module, the state recognition module is used to obtain a reference image of the automobile engine cylinder head, and perform apparent defect recognition on the automobile engine cylinder head according to the color features, texture features and shape features to determine the representation state of the automobile engine cylinder head, wherein the representation state includes a qualified state and an abnormal state;
[0056] An adaptive adjustment module, the adaptive adjustment module is used to summarize the appearance image data of the automobile engine cylinder head in the qualified state, and output it as a sample data set, and then adaptively adjust the defect recognition of the automobile engine cylinder head according to the sample data set;
[0057] A defect classification module is used to collect defect information of the automobile engine cylinder head in the abnormal state, and classify and record the apparent defects of the automobile engine cylinder head according to the defect information to form a defect detection report.
[0058] The present invention provides an electronic device, the electronic device comprising:
[0059] at least one processor;
[0060] and a memory communicatively coupled to the at least one processor;
[0061] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned method for detecting surface defects of a cylinder head of an automobile engine.
[0062] The technical effects achieved by the present invention are:
[0063] The present invention realizes accurate identification and classification of apparent defects of engine cylinder heads by comprehensively analyzing the appearance image data of automobile engine cylinder heads. The method not only improves the accuracy of defect detection, but also continuously optimizes the detection standard through an adaptive adjustment mechanism, so that it can better adapt to the detection needs of engine cylinder heads in different batches and under different production conditions. In addition, the optimization processing of the detection standard does not require the intervention of a specific algorithm to compare the appearance image data of different automobile engine cylinder heads, thereby reducing the phenomenon of reduced detection efficiency of automobile engine cylinder heads due to the execution of a specific algorithm, making the apparent defect detection of engine cylinder heads more efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1 It is a schematic flow chart of the method of the present invention;
[0065] Figure 2 It is a schematic diagram of the system module of the present invention;
[0066] Figure 3 It is a schematic diagram of the structure of an electronic device of the present invention. DETAILED DESCRIPTION
[0067] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0068] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0069] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure or characteristic that may be included in at least one implementation of the present invention. The phrase "in a preferred embodiment" that appears in different places in this specification does not refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.
[0070] See also Figure 1 As shown, the present invention provides a method for detecting surface defects of a cylinder head of an automobile engine, comprising:
[0071] S1, performing global image acquisition on the automobile engine cylinder head, and outputting the appearance image data of the automobile engine cylinder head;
[0072] In step S1, when performing surface defect detection on the automobile engine cylinder head, it is first necessary to perform comprehensive and detailed global image acquisition on the automobile engine cylinder head, and record the acquired image data as appearance image data of the automobile engine cylinder head for subsequent processing and analysis. After the appearance image data of the automobile engine cylinder head is output, preprocessing is performed synchronously, and the preprocessing steps include:
[0073] Acquire appearance image data of a cylinder head of an automobile engine, and perform denoising processing to eliminate noise interference in the appearance image data of the cylinder head of the automobile engine;
[0074] Perform contrast enhancement processing on the denoised appearance image data to enhance the clarity of the surface features of the cylinder head in the appearance image data;
[0075] Perform edge detection on the contrast-enhanced appearance image data to highlight the edge information of the surface features of the automobile engine cylinder head;
[0076] Specifically, after the appearance image data of the automobile engine cylinder head is successfully output, the preprocessing process will be started synchronously. First, the acquired appearance image data will be subjected to a denoising process. In this process, corresponding algorithms and tools (such as median filtering, mean filtering, etc.) will be used to eliminate various types of noise interference that may exist in the appearance image data of the automobile engine cylinder head to ensure the purity and accuracy of the image data. Then, for the appearance image data that has been denoised, contrast enhancement processing will be further implemented, which can effectively improve the contrast of the surface features of the cylinder head in the appearance image data, so that the surface features of the automobile engine cylinder head can be more clearly displayed, laying the foundation for subsequent analysis and identification work. Finally, after the contrast enhancement processing is completed, the image data will also be subjected to edge detection processing, the purpose of which is to accurately identify and highlight the edge information of the surface features of the automobile engine cylinder head, so that the contour and details of the cylinder head are clearer, thereby providing more accurate data support for subsequent defect detection, quality assessment and other links.
[0077] S2, extracting features from the appearance image data to obtain color features, texture features, and shape features of the automobile engine cylinder head;
[0078] In step S2, after the appearance image data is output, the obtained appearance image data is subjected to corresponding feature extraction, from which the color features, texture features and shape features of the automobile engine cylinder head are extracted, and the features are used as the basis for subsequent defect identification, wherein the step of extracting features from the appearance image data to obtain the color features, texture features and shape features of the automobile engine cylinder head includes:
[0079] Acquire appearance image data, and use color space conversion technology to convert the appearance image data from RGB color space to HSV color space to extract the color features of the automobile engine cylinder head;
[0080] The gray-level co-occurrence matrix method is used to calculate the texture features of the appearance image data and obtain the texture features of the automobile engine cylinder head.
[0081] Through edge detection and contour extraction algorithms, the shape features of the appearance image data are extracted to obtain the shape features of the automobile engine cylinder head;
[0082] Specifically, when performing detailed and systematic feature extraction on the appearance image data, firstly, the appearance image data of the automobile engine cylinder head is obtained, and the color space conversion technology is used to convert the obtained appearance image data from the commonly used RGB color space to the HSV color space that is more suitable for color analysis, so as to effectively extract the color features of the automobile engine cylinder head and ensure the accuracy and richness of the color information. Secondly, the gray level co-occurrence matrix method is used to conduct an in-depth analysis of the appearance image data. By calculating the spatial distribution and mutual relationship of the gray pixels in the image, the texture features of the automobile engine cylinder head can be obtained at one time, ensuring the detailed and comprehensive texture information. Finally, by using the edge detection algorithm and the contour extraction algorithm, the appearance image data is carefully processed, and the edge information and contour shape in the image are gradually extracted, so as to comprehensively obtain the shape features of the automobile engine cylinder head and ensure the accuracy and completeness of the shape information.
[0083] S3, obtaining a reference image of a cylinder head of an automobile engine, and identifying surface defects of the cylinder head of the automobile engine according to color features, texture features, and shape features, and determining a representation state of the cylinder head of the automobile engine, wherein the representation state includes a qualified state and an abnormal state;
[0084] In step S3, when it is necessary to perform defect recognition on the automobile engine cylinder head, firstly, a preset non-defective automobile engine cylinder head image is obtained and recorded as a reference image, and corresponding apparent defect recognition is performed on the automobile engine cylinder head according to the color features, texture features and shape features extracted from the appearance image data of the automobile engine cylinder head before, so as to determine the characterization state of the automobile engine cylinder head after defect recognition. In this embodiment, the characterization state of the automobile engine cylinder head is mainly divided into two categories: qualified state and abnormal state. Among them, the step of performing apparent defect recognition on the automobile engine cylinder head according to the color features, texture features and shape features to determine the characterization state of the automobile engine cylinder head includes:
[0085] Acquire appearance image data and reference images;
[0086] Vectorizing the color features, texture features, and shape features of the appearance image data and the color features, texture features, and shape features of the reference image to obtain a first feature vector corresponding to the appearance image data and a second feature vector corresponding to the reference image;
[0087] Obtaining a comparison function, and inputting the first eigenvector and the second eigenvector into the comparison function together, and recording the output result of the comparison function as a state evaluation parameter;
[0088] obtaining an evaluation threshold, and comparing the state evaluation parameter with the evaluation threshold;
[0089] When the state evaluation parameter is greater than the evaluation threshold, it indicates that the appearance image data corresponding to the state evaluation parameter passes the defect recognition, and the representation state of the automobile engine cylinder head corresponding to the appearance image data is recorded as a qualified state;
[0090] When the state evaluation parameter is less than or equal to the evaluation threshold, it indicates that the appearance image data corresponding to the state evaluation parameter has not passed the defect recognition, and the representation state of the automobile engine cylinder head corresponding to the appearance image data is recorded as an abnormal state;
[0091] Specifically, when the surface defects of the automobile engine cylinder head are identified based on the color features, texture features and shape features in the appearance image data and the reference image, the appearance image data of the automobile engine cylinder head and the reference image as a benchmark are first obtained, and the color features, texture features and shape features of the appearance image data and the color features, texture features and shape features of the reference image are vectorized. Through this processing, a first feature vector corresponding to the appearance image data and a second feature vector corresponding to the reference image can be obtained. The vectorization processing is to convert the various features of the appearance image data and the reference image into a computable numerical form to facilitate subsequent comparison and analysis. Then, a pre-set comparison function is obtained, and the first feature vector and the second feature vector are input into the comparison function together. The comparison function will comprehensively compare the two feature vectors, and output the comparison result, which is recorded as a state evaluation parameter. The calculation formula of the comparison function is: , where represents the state evaluation parameter, represents the number of feature points in the first eigenvector and the second eigenvector, and Respectively represent the first eigenvector and the second eigenvector, and then introduce a preset evaluation threshold, and compare the state evaluation parameter with the evaluation threshold. The evaluation threshold is a standard for determining whether there is a defect or not, and is usually set based on a large amount of experimental data and experience. When the state evaluation parameter is greater than the evaluation threshold, it indicates that the appearance image data corresponding to the state evaluation parameter has passed the defect recognition, that is, no significant defects are found. At this time, the representation state of the automobile engine cylinder head corresponding to the appearance image data is recorded as a qualified state, indicating that the cylinder head meets the quality requirements. On the contrary, when the state evaluation parameter is less than or equal to the evaluation threshold, it indicates that the appearance image data corresponding to the state evaluation parameter has not passed the defect recognition, that is, significant defects are found. At this time, the representation state of the automobile engine cylinder head corresponding to the appearance image data is recorded as an abnormal state, indicating that the cylinder head has quality problems and needs further inspection or processing. In addition, in the qualified state, the apparent quality of the automobile engine cylinder head is re-inspected. The specific process is as follows:
[0092] Extracting a color feature deviation region, a texture feature deviation region, and a shape feature deviation region between the appearance image data and the reference image;
[0093] If there is overlap between the color feature deviation area, the texture feature deviation area, and the shape feature deviation area, it indicates that there is an overlapping defect in the apparent quality of the corresponding automobile engine cylinder head, and the representation state of the corresponding automobile engine cylinder head is converted from a qualified state to an abnormal state;
[0094] If there is no overlap between the color feature deviation area, the texture feature deviation area, and the shape feature deviation area, then the representation state of the automobile engine cylinder head corresponding to the appearance image data is maintained as a qualified state;
[0095] Here, on the premise of ensuring that the automobile engine cylinder head meets the qualified standards, it is necessary to re-check its apparent quality. First, the area where there is a deviation in color features from the reference image is extracted from the collected appearance image data, and the difference in texture features and shape features is identified. Then, a comprehensive comparison and analysis is performed on the deviation area. If overlap is found between the color feature deviation area, the texture feature deviation area, and the shape feature deviation area, this clearly indicates that there are overlapping defects in the apparent quality of the automobile engine cylinder head. At this time, the engine cylinder head originally marked as qualified needs to be re-evaluated immediately, and its characterization status is updated to an abnormal state for subsequent targeted processing and improvement. On the contrary, if no overlap is found between the color feature deviation area, the texture feature deviation area, and the shape feature deviation area, it can be confirmed that the automobile engine cylinder head corresponding to the appearance image data still maintains a qualified state in terms of apparent quality. No additional adjustment or processing is required, and it can continue to maintain its original qualified state.
[0096] S4, summarizing the appearance image data of the automobile engine cylinder head in a qualified state and outputting it as a sample data set, and then adaptively adjusting the defect recognition of the automobile engine cylinder head according to the sample data set;
[0097] In step S4, for the automobile engine cylinder head in a qualified state, the appearance image data is systematically summarized and sorted out as a sample data set, and the defect recognition algorithm of the automobile engine cylinder head is adaptively adjusted using the sample data set to improve the accuracy and efficiency of detection. After the sample data set is output, the color features, texture features and shape features of the automobile engine cylinder head in the sample data set are classified to obtain multiple sample subsets;
[0098] Collecting the deviation regions in the appearance image data in each sample subset, calculating the area of each deviation region, and recording it as a sample condition parameter;
[0099] Perform offset processing on each sample condition parameter, and output the corresponding sample evaluation interval according to the offset result;
[0100] Count the number of sample condition parameters within each sample evaluation interval and record them as parameters to be classified;
[0101] Arrange the parameters to be classified in descending order, and record the sample evaluation interval corresponding to the parameter to be classified with the largest value as the standard interval;
[0102] The color features, texture features, and shape features corresponding to the sample condition parameters within the standard range are retained, and the color features, texture features, and shape features corresponding to the sample condition parameters outside the standard range are screened out from the sample subset;
[0103] Specifically, after the sample data set is output and processed, the color features, texture features and shape features of the automobile engine cylinder head in the sample data set are carefully classified, so as to divide a plurality of sample subsets with different features. Subsequently, the appearance image data in each sample subset is collected, with special attention paid to the deviation areas, and the area size of each deviation area is calculated (specifically, it can be calculated by the shoelace theorem), and the area of the deviation area is recorded as the sample condition parameter. Subsequently, the recorded sample condition parameters are offset (the offset method is bidirectional equidistant offset), and the corresponding sample evaluation interval is output according to the result after the offset processing. Furthermore, the number of samples in each sample evaluation area is counted. The number of sample condition parameters contained in the interval is counted and recorded as parameters to be classified. Then all parameters to be classified are arranged in descending order, and the sample evaluation interval corresponding to the parameter to be classified with the largest value is marked as the standard interval. Finally, for the sample condition parameters in the standard interval, their corresponding color features, texture features and shape features are retained, and for the sample condition parameters outside the standard interval, their corresponding color features, texture features and shape features are screened out from the corresponding sample subsets. The purpose is to eliminate feature data that deviates too much from the mainstream features and may be caused by abnormal factors, so as to ensure that the sample data set used for adaptive adjustment is more accurate and reliable.
[0104] In addition, the steps of adaptively adjusting the defect recognition of the automobile engine cylinder head include:
[0105] Obtaining color feature differences, texture feature differences, and shape feature differences between the appearance image data and the reference image in the sample subset;
[0106] The color feature difference, the texture feature difference and the shape feature difference are sorted in descending order respectively;
[0107] The color feature of the appearance image data corresponding to the color feature difference with the highest ranking is recorded as the color optimization feature, the texture feature of the appearance image data corresponding to the texture feature difference with the highest ranking is recorded as the texture optimization feature, and the shape feature of the appearance image data corresponding to the shape feature difference with the highest ranking is recorded as the shape optimization feature;
[0108] According to the color optimization features, texture optimization features and shape optimization features, an evaluation interval is constructed in combination with the color features, texture features and shape features of the reference image;
[0109] Comparing the color features, texture features, and shape features in the appearance image of the automobile engine cylinder head for which defect recognition has not been performed, and when the color features, texture features, and shape features in the appearance image of the automobile engine cylinder head for which defect recognition has not been performed are inconsistent with the corresponding evaluation interval, directly recording the representation state of the corresponding automobile engine cylinder head as an abnormal state;
[0110] Specifically, when adaptively adjusting the defect recognition of the automobile engine cylinder head, it is first necessary to count the amount of data collected in each sample subset, and execute it after the data amount reaches the preset standard. The purpose is to have sufficient data support when performing the adaptive adjustment operation to improve the accuracy and reliability of the adjustment result. Then, the appearance image data in the sample subset is obtained and compared with the reference image to extract the color feature difference, texture feature difference and shape feature difference. The purpose is to analyze the difference between the sample image and the reference image, so as to clarify the change of various features. Then, the extracted color feature difference, texture feature difference and shape feature difference are sorted in order from large to small, so that the maximum value of each feature difference can be clearly identified, providing a basis for further optimization feature selection. Then, according to the sorting result, the color feature of the appearance image data corresponding to the color feature difference with the highest ranking is recorded as the color optimization feature. Similarly, the texture feature of the appearance image data corresponding to the texture feature difference with the highest ranking is recorded as the texture optimization feature. The shape feature of the appearance image data corresponding to the highest-ranked shape feature difference is recorded as the shape optimization feature, thereby ensuring that the selected feature has the highest difference significance, which helps to improve the accuracy of defect recognition. On this basis, according to the determined color optimization features, texture optimization features and shape optimization features, combined with the color features, texture features and shape features of the reference image, a comprehensive evaluation interval is jointly constructed to provide a corresponding reference standard for subsequent defect recognition. Finally, the appearance image of the automobile engine cylinder head that has not yet performed defect recognition is compared, specifically including color features, texture features and shape features. If there is an inconsistency between the color features, texture features and shape features and the previously constructed evaluation interval, the representation state of the automobile engine cylinder head is directly recorded as an abnormal state. Based on this method, there is no need to calculate feature similarity, which reduces the complexity of automobile engine cylinder head defect recognition and improves recognition efficiency, ensuring that the automobile engine cylinder head on the production line can obtain accurate defect recognition results in a timely manner, thereby effectively avoiding potential quality problems.
[0111] S5. Collect defect information of the automobile engine cylinder head in an abnormal state, and classify and record the apparent defects of the automobile engine cylinder head according to the defect information to form a defect detection report;
[0112] In step S5, for the automobile engine cylinder head in an abnormal state, it is necessary to collect its defect information in detail, and classify and record the apparent defects of the automobile engine cylinder head according to the collected defect information, and finally output it as a defect detection report to facilitate subsequent maintenance and processing work. Among them, the steps of classifying and recording the apparent defects of the automobile engine cylinder head according to the defect information to form a defect detection report include:
[0113] Obtain the defective area of the automobile engine cylinder head under abnormal conditions;
[0114] Extract the shortest distance between adjacent defective areas on the same automobile engine cylinder head and record the parameters to be evaluated;
[0115] Obtaining an evaluation threshold, and comparing the evaluation threshold with the parameter to be evaluated;
[0116] Count the number of defective areas corresponding to when the parameter to be evaluated is greater than the evaluation threshold, and record it as the first-level condition parameter. Then calculate the proportion of the first-level condition parameter in all defective areas and record it as the second-level condition parameter.
[0117] obtaining a defect classification threshold, and comparing the defect classification threshold with a secondary condition parameter;
[0118] When the secondary condition parameter is higher than or equal to the defect classification threshold, the defect category of the automobile engine cylinder head is recorded as a dispersed defect, and is summarized into a defect detection report together with the area and location of the defect area;
[0119] When the secondary condition parameter is less than the defect classification threshold, the defect category of the automobile engine cylinder head is recorded as a concentrated defect, and is summarized into a defect detection report together with the area and location of the defect area;
[0120] Among them, the priority of repairing centralized defects is higher than that of repairing decentralized defects;
[0121] Specifically, when classifying the apparent defects of the automobile engine cylinder head according to the defect information, first obtain various defect areas on the surface of the automobile engine cylinder head under abnormal conditions to ensure that all possible defect points are fully captured, and then extract the shortest distance between adjacent defect areas for multiple defect areas on the same automobile engine cylinder head, and record them as parameters to be evaluated, and then obtain a pre-set evaluation threshold, and compare and analyze the evaluation threshold with the recorded parameters to be evaluated, and count the number of defect areas corresponding to when the parameters to be evaluated are greater than the evaluation threshold, and record the number of defect areas as the primary condition parameter, and further calculate the proportion of the primary condition parameter in all defect areas, and record the proportion as the secondary condition parameter, wherein the specific value of the evaluation threshold needs to be set according to actual needs. Taking 5 cm as an example, adjacent defect areas under the parameters to be evaluated that are greater than the evaluation threshold can be recorded as independent of each other. If there are two independent defect areas, otherwise, it is the same defect area by default. Then, the defect classification threshold is obtained, and the defect classification threshold is compared with the recorded secondary condition parameters. The defect classification threshold also needs to be set according to the actual detection requirements, preferably 60% to 80%. If the secondary condition parameter is higher than or equal to the defect classification threshold, the defect category of the automobile engine cylinder head is determined to be a dispersed defect, and this determination result is summarized together with the area and specific location information of the defect area to form a complete defect detection report. On the contrary, if the secondary condition parameter is less than the defect classification threshold, the defect category of the automobile engine cylinder head is determined to be a concentrated defect, and this determination result is summarized together with the area and specific location information of the defect area to form a complete defect detection report. It is particularly important to note that in the final defect detection report, the repair priority of concentrated defects should be higher than the repair priority of dispersed defects to ensure the effectiveness and pertinence of the repair work.
[0122] See also Figure 2 , a surface defect detection system for an automobile engine cylinder head, using the above-mentioned surface defect detection method for an automobile engine cylinder head, comprising:
[0123] An image acquisition module, the image acquisition module is used to acquire a global image of the automobile engine cylinder head and output the appearance image data of the automobile engine cylinder head;
[0124] A feature extraction module is used to extract features from the appearance image data to obtain the color features, texture features and shape features of the automobile engine cylinder head;
[0125] A state recognition module, which is used to obtain a reference image of a cylinder head of an automobile engine, and to identify surface defects of the cylinder head of the automobile engine according to color features, texture features, and shape features, and to determine a representation state of the cylinder head of the automobile engine, wherein the representation state includes a qualified state and an abnormal state;
[0126] The adaptive adjustment module is used to summarize the appearance image data of the automobile engine cylinder head in a qualified state and output it as a sample data set, and then adaptively adjust the defect recognition of the automobile engine cylinder head according to the sample data set;
[0127] The defect classification module is used to collect defect information of the automobile engine cylinder head in an abnormal state, and classify and record the apparent defects of the automobile engine cylinder head according to the defect information to form a defect detection report.
[0128] The main function of the image acquisition module is to perform comprehensive and detailed global image acquisition of the automobile engine cylinder head. Through high-precision cameras and image acquisition equipment, each detail of the automobile engine cylinder head is clearly captured, and the acquired automobile engine cylinder head image is output as the appearance image data of the automobile engine cylinder head, providing basic data support for subsequent defect detection. The function of the feature extraction module is to perform in-depth feature extraction and analysis on the acquired appearance image data. Through corresponding image processing algorithms and technical means, a variety of key feature information such as color features, texture features and shape features of the automobile engine cylinder head are extracted from the appearance image, and used as the basis for subsequent appearance defect recognition. The main task of the state recognition module is to obtain a reference image of the automobile engine cylinder head from the system, and compare and analyze it with the currently acquired image. According to the extracted color features, texture features and shape features, the state recognition module can identify the defects of the automobile engine cylinder head. The characterization state of the automobile engine cylinder head is mainly divided into two situations, qualified state and abnormal state, so as to facilitate the subsequent defect classification and processing. In addition, the function of the adaptive adjustment module is to summarize and organize the appearance image data of the automobile engine cylinder head when it is in a qualified state, and output it as a sample data set. Then, based on the sample data set, the defect recognition algorithm of the automobile engine cylinder head is adaptively adjusted and optimized to improve the accuracy and reliability of defect recognition. The defect classification module is specially used to process the automobile engine cylinder head in an abnormal state. By collecting the defect information in these abnormal states and classifying and recording the apparent defects of the automobile engine cylinder head in detail based on the defect information, a complete defect detection report is finally formed to facilitate the subsequent maintenance and processing work of relevant personnel.
[0129] See also Figure 3 , an electronic device, the electronic device comprising:
[0130] at least one processor;
[0131] and a memory communicatively coupled to the at least one processor;
[0132] The memory stores a computer program that can be executed by at least one processor, and the computer program is executed by at least one processor so that the at least one processor can execute the above-mentioned method for detecting surface defects of a cylinder head of an automobile engine.
[0133] The processor of the above-mentioned electronic device can be a central processing unit (CPU), a graphics processing unit (GPU) or a digital signal processor (DSP), etc. These processors have powerful computing power and data processing capabilities, and can quickly and accurately perform various calculation and analysis tasks in the surface defect detection method of the automobile engine cylinder head. At the same time, the memory, as an important component of the electronic device, is used to store various data and information, including the appearance image data, feature data, reference image data and defect detection report of the automobile engine cylinder head, so as to ensure the integrity and security of the data. In addition, the electronic device may also include an operator, an input device, an output device, a network interface, etc. The operator is used to perform various arithmetic and logical operations to assist the processor to complete more complex tasks; input devices such as keyboards, mice or touch screens are used to receive user input instructions and information; output devices such as displays, printers, etc. are used to display processing results and output information; the network interface is used to realize the connection between the electronic device and other devices or networks for data transmission and sharing.
[0134] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0135] The above is only a preferred embodiment of the present invention. It should be noted that, for those skilled in the art, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications should also be considered as the protection scope of the present invention. The structures, devices and operating methods not specifically described and explained in the present invention shall be implemented according to the conventional means in the art unless otherwise specified and limited.
Claims
1. A method for detecting surface defects of a cylinder head of an automobile engine, characterized in that: include: Perform global image acquisition on the cylinder head of the automobile engine and output the appearance image data of the cylinder head of the automobile engine; Extracting features from the appearance image data to obtain color features, texture features, and shape features of the automobile engine cylinder head; Acquire a reference image of a cylinder head of an automobile engine, and perform surface defect recognition on the cylinder head of the automobile engine according to the color features, texture features, and shape features to determine a representation state of the cylinder head of the automobile engine, wherein the representation state includes a qualified state and an abnormal state; Summarizing the appearance image data of the automobile engine cylinder head in the qualified state and outputting them as a sample data set, and then adaptively adjusting the defect recognition of the automobile engine cylinder head according to the sample data set; Collecting defect information of the automobile engine cylinder head in the abnormal state, and classifying and recording the apparent defects of the automobile engine cylinder head according to the defect information to form a defect detection report; After the sample data set is output, the color features, texture features and shape features of the automobile engine cylinder head in the sample data set are classified to obtain multiple sample subsets; Collecting the deviated regions in the appearance image data in each of the sample subsets, calculating the area of each of the deviated regions, and recording them as sample condition parameters; Performing an offset process on each of the sample condition parameters, and outputting a corresponding sample evaluation interval according to the offset result; Counting the number of sample condition parameters within each sample evaluation interval and recording them as parameters to be classified; Arrange the parameters to be classified in descending order, and record the sample evaluation interval corresponding to the parameter to be classified with the largest value as the standard interval; The color features, texture features and shape features corresponding to the sample condition parameters within the standard interval are retained, and the color features, texture features and shape features corresponding to the sample condition parameters outside the standard interval are screened out from the sample subset; The step of adaptively adjusting the defect recognition of the automobile engine cylinder head comprises: Obtaining color feature differences, texture feature differences, and shape feature differences between the appearance image data and the reference image in the sample subset; The color feature difference, texture feature difference and shape feature difference are sorted in descending order respectively; The color feature of the appearance image data corresponding to the color feature difference with the highest ranking is recorded as the color optimization feature, the texture feature of the appearance image data corresponding to the texture feature difference with the highest ranking is recorded as the texture optimization feature, and the shape feature of the appearance image data corresponding to the shape feature difference with the highest ranking is recorded as the shape optimization feature; Constructing an evaluation interval based on the color optimization feature, texture optimization feature and shape optimization feature in combination with the color feature, texture feature and shape feature of the reference image; The color features, texture features and shape features in the appearance image of the automobile engine cylinder head without performing defect recognition are compared, and when the color features, texture features and shape features in the appearance image of the automobile engine cylinder head without performing defect recognition are inconsistent with the corresponding evaluation interval, the representation state of the corresponding automobile engine cylinder head is directly recorded as an abnormal state.
2. The method for detecting surface defects of a cylinder head of an automobile engine according to claim 1, characterized in that: After the appearance image data of the automobile engine cylinder head is output, preprocessing is performed synchronously, and the preprocessing steps include: Acquire the appearance image data of the automobile engine cylinder head, and perform denoising processing to eliminate noise interference in the appearance image data of the automobile engine cylinder head; Performing contrast enhancement processing on the denoised appearance image data to enhance the clarity of the surface features of the cylinder head in the appearance image data; Edge detection is performed on the appearance image data after contrast enhancement to highlight the edge information of the surface features of the automobile engine cylinder head.
3. The method for detecting surface defects of a cylinder head of an automobile engine according to claim 1, characterized in that: The step of extracting features from the appearance image data to obtain color features, texture features and shape features of the automobile engine cylinder head comprises: Acquire the appearance image data, and use color space conversion technology to convert the appearance image data from RGB color space to HSV color space to extract color features of the automobile engine cylinder head; Using a gray level co-occurrence matrix method, the texture features of the appearance image data are calculated to obtain the texture features of the automobile engine cylinder head; The shape features of the appearance image data are extracted through edge detection and contour extraction algorithms to obtain the shape features of the automobile engine cylinder head.
4. The method for detecting surface defects of a cylinder head of an automobile engine according to claim 1, characterized in that: The step of identifying the surface defects of the automobile engine cylinder head according to the color features, texture features and shape features to determine the characterization state of the automobile engine cylinder head comprises: Acquire appearance image data and reference images; Vectorizing the color features, texture features, and shape features of the appearance image data and the color features, texture features, and shape features of a reference image to obtain a first feature vector corresponding to the appearance image data and a second feature vector corresponding to the reference image; Obtaining a comparison function, and inputting the first feature vector and the second feature vector into the comparison function together, and recording an output result of the comparison function as a state evaluation parameter; Obtaining an evaluation threshold, and comparing the state evaluation parameter with the evaluation threshold; When the state evaluation parameter is greater than the evaluation threshold, it indicates that the appearance image data corresponding to the state evaluation parameter passes the defect recognition, and the representation state of the automobile engine cylinder head corresponding to the appearance image data is recorded as a qualified state; When the state evaluation parameter is less than or equal to the evaluation threshold, it indicates that the appearance image data corresponding to the state evaluation parameter has not passed the defect recognition, and the representation state of the automobile engine cylinder head corresponding to the appearance image data is recorded as an abnormal state.
5. The method for detecting surface defects of a cylinder head of an automobile engine according to claim 4, characterized in that: Under the qualified state, the surface quality of the automobile engine cylinder head is re-inspected, and the specific process is as follows: Extracting a color feature deviation region, a texture feature deviation region, and a shape feature deviation region between the appearance image data and the reference image; If there is overlap between the color feature deviation area, the texture feature deviation area, and the shape feature deviation area, it indicates that there is an overlapping defect in the apparent quality of the corresponding automobile engine cylinder head, and the representation state of the corresponding automobile engine cylinder head is converted from a qualified state to an abnormal state; If there is no overlap between the color feature deviation area, the texture feature deviation area, and the shape feature deviation area, the representation state of the automobile engine cylinder head corresponding to the appearance image data is maintained as a qualified state.
6. The method for detecting surface defects of a cylinder head of an automobile engine according to claim 1, characterized in that: The step of classifying and recording the apparent defects of the automobile engine cylinder head according to the defect information to form a defect detection report includes: Acquire the defective area of the cylinder head of the automobile engine under the abnormal state; Extracting the shortest distance between adjacent defective areas on the same automobile engine cylinder head, and recording the parameters to be evaluated; Obtaining an evaluation threshold, and comparing the evaluation threshold with the parameter to be evaluated; Counting the number of defective areas corresponding to when the parameter to be evaluated is greater than the evaluation threshold, and recording it as a primary condition parameter, and then calculating the proportion of the primary condition parameter in all defective areas, and recording it as a secondary condition parameter; Obtaining a defect classification threshold, and comparing the defect classification threshold with a secondary condition parameter; When the secondary condition parameter is higher than or equal to the defect classification threshold, the defect category of the automobile engine cylinder head is recorded as a dispersed defect, and is summarized into a defect detection report together with the area and location of the defect area; When the secondary condition parameter is less than the defect classification threshold, the defect category of the automobile engine cylinder head is recorded as a concentrated defect, and is summarized into a defect detection report together with the area and location of the defect region; Among them, the repair priority of the centralized defects is higher than the repair priority of the decentralized defects.
7. A surface defect detection system for automobile engine cylinder head, characterized in that: The method for detecting surface defects of a cylinder head of an automobile engine according to any one of claims 1 to 6 comprises: An image acquisition module, wherein the image acquisition module is used to acquire a global image of the cylinder head of the automobile engine and output the image data of the appearance of the cylinder head of the automobile engine; A feature extraction module, the feature extraction module is used to extract features from the appearance image data to obtain color features, texture features and shape features of the automobile engine cylinder head; A state recognition module, the state recognition module is used to obtain a reference image of the automobile engine cylinder head, and perform apparent defect recognition on the automobile engine cylinder head according to the color features, texture features and shape features to determine the representation state of the automobile engine cylinder head, wherein the representation state includes a qualified state and an abnormal state; An adaptive adjustment module, the adaptive adjustment module is used to summarize the appearance image data of the automobile engine cylinder head in the qualified state, and output it as a sample data set, and then adaptively adjust the defect recognition of the automobile engine cylinder head according to the sample data set; A defect classification module, the defect classification module is used to collect defect information of the automobile engine cylinder head in the abnormal state, and classify and record the apparent defects of the automobile engine cylinder head according to the defect information to form a defect detection report; After the sample data set is output, the color features, texture features and shape features of the automobile engine cylinder head in the sample data set are classified to obtain multiple sample subsets; Collecting the deviated regions in the appearance image data in each of the sample subsets, calculating the area of each of the deviated regions, and recording them as sample condition parameters; Performing an offset process on each of the sample condition parameters, and outputting a corresponding sample evaluation interval according to the offset result; Counting the number of sample condition parameters within each sample evaluation interval and recording them as parameters to be classified; Arrange the parameters to be classified in descending order, and record the sample evaluation interval corresponding to the parameter to be classified with the largest value as the standard interval; The color features, texture features and shape features corresponding to the sample condition parameters within the standard interval are retained, and the color features, texture features and shape features corresponding to the sample condition parameters outside the standard interval are screened out from the sample subset; The step of adaptively adjusting the defect recognition of the automobile engine cylinder head comprises: Obtaining color feature differences, texture feature differences, and shape feature differences between the appearance image data and the reference image in the sample subset; The color feature difference, texture feature difference and shape feature difference are sorted in descending order respectively; The color feature of the appearance image data corresponding to the color feature difference with the highest ranking is recorded as the color optimization feature, the texture feature of the appearance image data corresponding to the texture feature difference with the highest ranking is recorded as the texture optimization feature, and the shape feature of the appearance image data corresponding to the shape feature difference with the highest ranking is recorded as the shape optimization feature; Constructing an evaluation interval based on the color optimization feature, texture optimization feature and shape optimization feature in combination with the color feature, texture feature and shape feature of the reference image; The color features, texture features and shape features in the appearance image of the automobile engine cylinder head without performing defect recognition are compared, and when the color features, texture features and shape features in the appearance image of the automobile engine cylinder head without performing defect recognition are inconsistent with the corresponding evaluation interval, the representation state of the corresponding automobile engine cylinder head is directly recorded as an abnormal state.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively coupled to the at least one processor; Wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for detecting surface defects of an automobile engine cylinder head as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Wafer defect detection method
CN113706490A
Systems and methods for image optimization
WO2024138719A1