Automobile part defect detection method and system based on image recognition
By matching and proportional adjustment of the surface image of the auto parts with the standard outline, calculating the burr coefficient and determining the burr range, combining information entropy and clustering algorithm for defect evaluation, the burr detection problem caused by uneven light is solved, and more accurate and robust burr detection.
Patent Information
- Application Number
- CN202510034253.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-02-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, when detecting burrs of automobile parts, uneven light illumination leads to inconspicuous shading of burrs, making it difficult to accurately identify and detect.
By obtaining the surface image of the part and the standard part profile, matching and proportional adjustments are performed, burr coefficients are calculated, and stop conditions are traversed to determine the burr range, and defect evaluation is performed in combination with information entropy and clustering algorithms.
It improves the accuracy of burr detection, reduces the limitation of lighting conditions, enhances the robustness of the detection system, and optimizes the accuracy of defect evaluation.
Smart Images

Figure CN119444748A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and more specifically, to an automobile parts defect detection method and system based on image recognition. Background Art
[0002] Burrs are a common problem in the production of automotive parts, especially stampings. Burrs refer to excess material produced during the stamping or cutting process, which can affect the quality and performance of parts. The quality of automotive parts is critical to the safety and performance of the car. Therefore, accurate detection of burrs on key parts such as stampings is an important part of the automotive manufacturing industry. The challenges faced by burr detection technology include how to accurately identify and measure small burrs, especially when they are not obvious on the image.
[0003] The existing Chinese patent application document with publication number CN118501159A discloses a method and system for defect detection of automobile parts based on machine vision, which relates to the field of defect detection technology, including: sampling defective products according to model information of target automobile parts to obtain a sample defective product set; performing defect distribution analysis, dividing the detection surface, and obtaining multiple defect detection surfaces; performing light source detection matching to obtain multiple light source detection strategies; scheduling a light source controller and an image collector to perform lighting adjustment and image acquisition to obtain multiple light source detection atlases; pre-building a defective judgment network, including multiple local defective judgment branches and defective judgment fusion branches; synchronizing multiple light source detection atlases to the defective judgment network, performing multi-level judgment, and obtaining target defect judgment results; and performing production management.
[0004] This application document solves the technical problem that the existing technology for automobile parts defect detection usually adopts fixed standards, resulting in frequent detection of defects that cause parts to be scrapped, leading to parts waste. At present, when using machine vision technology to detect parts, uneven or inappropriate lighting may cause the shadow of the burr to be unclear, and the burr on the edge of the part is difficult to be accurately identified and detected in the image, resulting in poor burr detection technology. Summary of the invention
[0005] In order to solve the problem that uneven or inappropriate lighting may cause the shadow of the burr to be unclear, and the burr on the edge of the part is difficult to be accurately identified and detected in the image, the present invention provides solutions in the following aspects.
[0006] In a first aspect, an automobile part defect detection method based on image recognition includes: obtaining a surface image of a part and a standard part contour, matching the surface image with the standard part contour, and determining the best matching position of the part; proportionally adjusting the standard part contour based on the best matching position, and calculating the burr coefficient between the surface image and the standard part contour to obtain a burr coefficient sequence of different proportions; taking any burr coefficient in the burr coefficient sequence as a target value, traversing the target value from large to small, setting a traversal stop condition, and completing the traversal in response to the stop condition reaching a minimum value; obtaining the standard part contour of the adjusted proportion corresponding to the minimum value of the stop condition as a burr range, wherein the burr range includes: an outer range and an inner range, calculating a defect evaluation value based on the burr range, and in response to the defect evaluation being greater than a defect threshold, the automobile part has a defect; wherein the traversal stop condition Satisfies the following relationship: ; In the formula, Indicates the first The serial number of the burr coefficient, Indicates the first The serial number of the burr coefficient, represents the total number of all burr coefficients in the burr coefficient sequence, , and Respectively represent the first , and The burr coefficient, Indicates the target value.
[0007] By obtaining the surface image of the part and the standard part contour and matching the two, the best matching position of the part can be accurately determined. The standard part contour is proportionally adjusted based on the best matching position so that the detection method can adapt to parts of different sizes. By taking any burr coefficient in the burr coefficient sequence as the target value and traversing from large to small, the optimal burr detection parameters can be found, and the standard part contour with the adjusted proportion corresponding to the minimum value of the traversal stop condition is obtained as the burr range, which helps to accurately identify the outer and inner ranges of the burr and provide accurate data for defect evaluation.
[0008] Preferably, determining the best matching position of the parts includes: The geometric center of the surface image is overlapped with the center of the standard part contour, the standard part contour is rotated clockwise, a rotation evaluation is constructed, and in response to the rotation evaluation being a minimum value, the rotation operation of the standard part contour is completed to determine the best matching position of the part; The rotation evaluation is calculated as follows: the Euclidean distance between the pixel points on the surface image and the pixel points on the standard part contour is calculated, the minimum distance value is obtained and summed, and the rotation evaluation of the pixel points on the surface image is obtained. In response to the minimum rotation evaluation, the best matching position of the part is determined.
[0009] By aligning the geometric centers, the alignment accuracy of the surface image and the standard part contour during the rotation process can be ensured. Through rotation evaluation, the rotation angle that best matches the surface image and the standard part contour can be found, which helps to correct part rotation errors caused by deviations in the manufacturing process. By accurately rotating and determining the best matching position, the accuracy of burr detection and other defect detection can be improved.
[0010] Preferably, the determining the best matching position of the parts further includes: The corner detection algorithm is used on the surface image and the standard part contour respectively, the detected corner points are obtained for matching, and the best matching position of the part is determined.
[0011] Corner points are feature points in an image. Their detection and matching can improve the accuracy of contour matching. Corner point detection is robust to illumination changes and image noise, which enables the matching process to maintain high accuracy under different imaging conditions. Corner point matching helps reduce errors caused by inaccurate contours, thereby improving the accuracy of the manufacturing process.
[0012] Preferably, the burr coefficient includes: The standard part outline is placed on the surface image, and the average pixel value of all pixel points in the pixel point set of the standard part outline on the surface image is obtained; Taking the pixel points of any standard part contour as the marking points, the average value of the cumulative sum of the deviations between the ratio of the pixel value of the standard point to the average pixel value and 1 is calculated to obtain the burr coefficient of the standard part contour and the surface image.
[0013] By calculating the ratio deviation between the pixel value and the average pixel value, the characteristics of the burrs can be quantified. The severity of the burrs can be reflected by the average value of the cumulative sum. By comparing the deviation between a single pixel point and the average pixel value, the detection sensitivity of subtle burrs can be improved.
[0014] Preferably, the burr coefficient further includes: The median of the pixel values of all pixels in the pixel point set on the standard part contour is obtained, and the average of the sum of the differences between each pixel in the pixel point set on the standard part contour and the median pixel value is calculated to obtain the burr coefficient of the standard part contour and the surface image.
[0015] Preferably, the defect evaluation value is calculated according to the burr range, comprising: The sum of the ratios of the outer and inner sides of the burr range is multiplied by the information entropy of the pixel values in the burr area to obtain the defect evaluation.
[0016] By combining the proportion of the burr range and the information entropy of the pixel value, a more comprehensive evaluation of the severity of the burr can be made. The calculation of the information entropy reflects the uniformity of the distribution of pixel values in the burr area. High information entropy indicates that the pixel values in the burr area vary greatly and there may be a variety of different defects. By considering the proportion of the burr area and the degree of confusion of the pixel values, burr defects can be identified and evaluated more accurately.
[0017] Preferably, the step of calculating the defect evaluation value according to the burr range further includes: The burr range is divided into several sub-areas based on any point in the burr range as a starting point, wherein the segmentation method is to use a clustering algorithm to segment the burr range to obtain several burr sub-areas, adjust the proportions of the burr sub-areas to obtain a significant burr range of the sub-area, calculate the defect evaluation for the significant burr range to obtain the defect evaluation of each sub-area, and when the maximum value of the defect evaluation is greater than the defect threshold, it is judged as a defective part, otherwise it is not.
[0018] By dividing the burr range into several sub-areas, detailed defect analysis can be performed on each sub-area instead of just evaluating the entire burr range. By adjusting the proportions and evaluating defects in each sub-area individually, local defects can be more accurately identified and evaluated, improving the accuracy of overall detection. Clustering algorithms can help identify local changes within the burr area, thereby discovering local defects that may be overlooked by the overall evaluation. For burrs of different shapes and sizes, the clustering algorithm can flexibly identify and segment them so that each sub-area can be properly processed.
[0019] In a second aspect, an automobile part defect detection system based on image recognition includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned automobile part defect detection method based on image recognition is implemented.
[0020] The present invention has the following effects: 1. The present invention matches the surface image with the standard part contour and adjusts the proportion at the best matching position, so that the burrs can be identified more accurately. The image difference caused by uneven lighting can be compensated by proportion adjustment and calculation of the burr coefficient, thereby improving the accuracy of burr detection and reducing the limitation of lighting conditions.
[0021] 2. The present invention can stably identify burrs under different lighting conditions by calculating the burr coefficient and the traversal stop condition. It not only considers the pixel value of a single pixel point, but also considers the pixel value distribution of the entire burr area, thereby enhancing the robustness of the detection system to different lighting conditions.
[0022] 3. The present invention obtains defect evaluation of sub-regions by calculating the information entropy of pixel values within the burr range or using a clustering algorithm to segment the burr range, thereby further optimizing the accuracy of defect evaluation and facilitating a more detailed analysis of the burr region, thereby more accurately evaluating the degree of defects of parts. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein: Figure 1 It is a method flow chart of steps S1 to S4 in the automobile parts defect detection method based on image recognition in an embodiment of the present invention.
[0024] Figure 2 It is a schematic diagram of the burr range in the automobile parts defect detection method based on image recognition in an embodiment of the present invention.
[0025] Figure 3 It is a structural block diagram of an automobile parts defect detection system based on image recognition according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0027] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0028] Specific implementation scenarios: During the actual stamping or cutting process of stamping parts, due to factors such as excessive, too small or uneven die blanking gap, edge wear, poor guiding accuracy, and different positions of male and female dies, burrs will appear on the parts, reducing the quality of the finished product.
[0029] Reference Figure 1 The automobile parts defect detection method based on image recognition includes steps S1 to S4, which are as follows: It should be noted that due to minor changes in the production process, the actual contour of the part may not be completely consistent with the standard part contour. Therefore, by rotating the standard part contour, these changes can be accommodated to ensure the flexibility and adaptability of the inspection process. In order to further align the standard part contour with the actual contour of the part, the following specific steps are performed: S1: Obtain the surface image of the part and the standard part contour, match the surface image with the standard part contour, and determine the best matching position of the part.
[0030] Determine the best fit position for the part, including the following steps: The corner detection algorithm is used on the surface image and the standard part contour respectively, the detected corner points are obtained for matching, and the best matching position of the part is determined.
[0031] It should be noted that in this embodiment, Harris corner detection or Shi-Tomasi corner detection is used, which is a well-known technology in the art and will not be described in detail; wherein, a corner point is a point in an image where the pixel intensity changes significantly, usually located at the intersection of an edge, and the detected corner points are matched, which usually involves finding the correspondence between the corner points in two sets. Matching can be based on the position, intensity or other features of the corner points.
[0032] In addition, another embodiment further includes: Due to the various shapes of parts, polygonal parts are often more suitable for corner point detection to confirm the best matching position. When the part type is a curved surface, it is difficult to identify the corner points. Therefore, the minimum distance from each pixel point of the part outline in the surface image to the standard part outline can be calculated. The specific steps are as follows: The geometric center of the surface image is overlapped with the center of the standard part contour, the standard part contour is rotated clockwise, a rotation evaluation is constructed, and in response to the rotation evaluation being a minimum value, the rotation operation of the standard part contour is completed to determine the best matching position of the part; The rotation evaluation is calculated as follows: the Euclidean distance between the pixel points on the surface image and the pixel points on the standard part contour is calculated, the minimum distance value is obtained and summed, and the rotation evaluation of the pixel points on the surface image is obtained. When the rotation evaluation is minimum, the best matching position of the part is determined.
[0033] Specifically, the rotation evaluation satisfies the following relationship: ; In the formula, Indicates rotation evaluation, Represents the surface image pixels, Indicates the first pixels, Indicates the number of pixels on the standard part outline. Represents the minimum function.
[0034] That is, this ensures that when the subsequent edge analysis is performed, the comparison between the two is accurate and meaningful, and by finding the minimum value of the rotation evaluation, the error between the standard part contour and the actual contour of the part can be minimized.
[0035] It should also be noted that by calculating the minimum distance between each pixel point of the part contour in the surface image and the standard part contour, the surface features can be effectively matched. Specifically, different implementation methods can be selected according to the part type, and the purpose is the same, that is, to determine the best matching position of the part.
[0036] In this embodiment, the surface image of the part is preprocessed, and a binary image of the part area in the surface image is obtained through Otsu's threshold segmentation, that is, the background area is 0 and the part area is 1, so as to further obtain the actual contour of the part.
[0037] S2: The standard part contour is proportionally adjusted based on the best matching position, and the burr coefficient between the surface image and the standard part contour is calculated to obtain a burr coefficient sequence with different proportions.
[0038] That is to say, the burrs of the parts are irregular and discontinuous, and the proportions are adjusted to enlarge and reduce them in equal proportions. One proportion adjustment will obtain at least one adjusted standard part contour; if there is one adjusted standard part contour on the actual contour of the part, it means that the part is consistent with the outer contour of the standard part and there are no burrs; if there are two adjusted standard part contours on both sides of the actual contour of the part or one is on the contour and the other is inside or outside the contour, it means that there are burrs on both sides of the actual contour of the part or there is burrs on one side of the actual contour of the part; therefore, the proportion of the standard part contour is adjusted to accommodate burrs or defects of different sizes and to improve the versatility and adaptability of the detection system.
[0039] Exemplarily, the proportions of the standard part profile are: In this embodiment, the size change of the default stamping part will not exceed Users can adjust the scale range according to the style of the actual part, but must ensure that the standard part outline is completely inside the part when the range is reduced.
[0040] The standard part outline is placed on the surface image, and the average pixel value of all pixel points in the pixel point set of the standard part outline on the surface image is obtained; Taking the pixel points of any standard part contour as the marking points, the average value of the cumulative sum of the deviations between the ratio of the pixel value of the standard point to the average pixel value and 1 is calculated to obtain the burr coefficient of the standard part contour and the surface image.
[0041] Specifically, the burr coefficient satisfies the following relationship: ; In the formula, represents the burr coefficient, Indicates the number of pixels where the surface image and the standard part contour coincide. Indicates the first The pixel value of a pixel, Represents a set of pixels on the outline of a standard part. represents the mean function.
[0042] That is to say, The smaller it is, the more consistent the pixel value of the marked point is with the average pixel value of all the pixels in the pixel set of the standard part contour. The larger the value, the smaller the pixel value in the pixel set of the standard part contour on the surface image. The pixel point falls exactly on the burr or defect. The smaller the burr coefficient is, the more normal the surface image of the part is. Otherwise, there is burr. Further analysis shows that when the pixel values of all pixels on the standard part contour in the surface image are the same, the standard part contour is completely inside the part or completely outside the part. By judging the consistency of the pixel values, it is possible to effectively determine whether there are burrs, which helps reduce the possibility of misjudgment. If all pixel values are the same, it means that there are no burrs or defects, which helps to improve the accuracy of detection.
[0043] In addition, another embodiment further includes: The median of the pixel values of all pixels in the pixel point set on the standard part contour is obtained, and the average of the sum of the differences between each pixel in the pixel point set on the standard part contour and the median pixel value is calculated to obtain the burr coefficient of the standard part contour and the surface image.
[0044] Specifically, the burr coefficient satisfies the following relationship: ; In the formula, represents the burr coefficient, Indicates the number of pixels where the surface image and the standard part contour coincide. Indicates the first The pixel value of a pixel, Represents a set of pixels on the outline of a standard part. Represents the median.
[0045] That is to say, It is used to measure the degree of deviation of the pixel value of the surface image on the standard part contour from the median. Using the median instead of the average can reduce the impact of outliers on the burr coefficient, making the burr coefficient more reflective of the general situation. The burr coefficient reflects the degree of deviation of the pixel value of the surface image on the standard part contour relative to the median. A larger burr coefficient may indicate the presence of surface defects.
[0046] S3: Taking any burr coefficient in the burr coefficient sequence as the target value, traverse the target value from large to small, set the traversal stop condition, and complete the traversal in response to reaching the minimum value under the stop condition.
[0047] In other words, the change of the burr coefficient reflects the matching degree between the standard part profile and the actual burr. When a minimum value point appears, it indicates the best matching ratio, that is, the most likely location of the burr. Therefore, traversing the burr coefficient sequence and setting the stop condition is to accurately determine the starting and ending points of the burr range. This method can avoid excessive expansion or reduction of the burr range and improve the accuracy of defect detection.
[0048] Specifically, the traversal stop condition satisfies the following relationship: ; In the formula, Indicates the traversal stop condition, Indicates the first The serial number of the burr coefficient, Indicates the first The serial number of the burr coefficient, represents the total number of all burr coefficients in the burr coefficient sequence, , and Respectively represent the first , and The burr coefficient, Indicates the target value.
[0049] That is to say, a standard part profile after adjustment corresponds to a burr coefficient. , and The burr coefficients reflect the profiles of standard parts at different scales. These coefficients can indicate the severity or existence of burrs in the image and identify where burrs are most likely to exist, which is crucial to improving the accuracy of defect detection.
[0050] Reference Figure 2In the figure, A represents the actual contour of the part in the surface image, B represents the outer range of the standard part contour after adjusting the proportion, and C represents the inner range of the standard part contour after adjusting the proportion. B and C constitute the burr range.
[0051] S4: Obtaining a standard part contour with an adjusted ratio corresponding to the minimum value of the stop condition as a burr range, wherein the burr range includes: an outer range and an inner range, and calculating a defect evaluation value according to the burr range for use in identifying automobile part defect detection.
[0052] The defect evaluation value is calculated based on the burr range, including: The sum of the ratios of the outer and inner sides of the burr range is multiplied by the information entropy of the pixel values in the burr area to obtain the defect evaluation.
[0053] Specifically, the defect evaluation satisfies the following relationship: ; In the formula, Defect evaluation, Indicates the ratio of the outer range of the burr range. Indicates the ratio of the inner range within the burr range. Indicates the first The pixel value of a pixel, Represents a logarithmic function.
[0054] That is to say, Indicates the size of the burr range of the part. Expresses the degree of disorder of pixel values within the rough edge range.
[0055] In addition, another embodiment further includes: It should be noted that since the size and shape of the burrs of parts are inconsistent, the defects of each area can be more finely identified and evaluated by dividing the burr range into sub-areas, rather than relying solely on the overall evaluation. This helps to find local minor defects. Defect evaluation of each sub-area separately can improve the sensitivity of the detection system, so that even small-scale burrs can be accurately identified. The specific steps are as follows: The burr range is divided into several sub-areas based on any point in the burr range as the starting point, wherein the segmentation method is to use a clustering algorithm to segment the burr range to obtain several burr sub-areas, adjust the proportions of the burr sub-areas to obtain a significant burr range of the sub-areas, calculate the defect evaluation for the significant burr range to obtain the defect evaluation of each sub-area, and when the maximum value of the defect evaluation is greater than the defect threshold, it is judged as a defective part, otherwise it is not.
[0056] It should be noted that, in this embodiment, the DBSCAN algorithm is used for clustering, and the defect threshold is 0.2. The implementer can set the defect threshold according to his own needs. When the defect evaluation is greater than the threshold, it is judged as a defective part, otherwise it is not.
[0057] The present invention also provides an automobile parts defect detection system based on image recognition. Figure 3 As shown, the system includes a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the automobile part defect detection method based on image recognition according to the first aspect of the present invention is implemented.
[0058] The system also includes other components familiar to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are known in the art and will not be described in detail here.
[0059] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in the present invention may be implemented by computer-readable / executable instructions stored or otherwise maintained by such a computer-readable medium.
[0060] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0061] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
Claims
1. The method for detecting defects in automobile parts based on image recognition is characterized in that: include: Obtain the surface image of the part and the standard part contour, match the surface image with the standard part contour, and determine the best matching position of the part; The standard part profile is proportionally adjusted based on the best matching position, and the burr coefficient between the surface image and the standard part profile is calculated to obtain a burr coefficient sequence with different proportions; Taking any burr coefficient in the burr coefficient sequence as a target value, traversing the target value from large to small, setting a traversal stop condition, and completing the traversal in response to reaching a minimum value under the stop condition; Obtaining a standard part contour of an adjusted proportion corresponding to the minimum value of the stop condition as a burr range, wherein the burr range includes: an outer range and an inner range, calculating a defect evaluation value according to the burr range, and in response to the defect evaluation being greater than a defect threshold, indicating that the automobile part has a defect; Among them, the traversal stop condition Satisfies the following relationship: ; In the formula, Indicates the first The serial number of the burr coefficient, Indicates the first The serial number of the burr coefficient, represents the total number of all burr coefficients in the burr coefficient sequence, , and Respectively represent the first , and The burr coefficient, Indicates the target value.
2. The method for detecting automobile parts defects based on image recognition according to claim 1, characterized in that: Determining the best matching position of the parts includes: The geometric center of the surface image is overlapped with the center of the standard part contour, the standard part contour is rotated clockwise, a rotation evaluation is constructed, and in response to the rotation evaluation being a minimum value, the rotation operation of the standard part contour is completed to determine the best matching position of the part; The rotation evaluation is calculated as follows: the Euclidean distance between the pixel points on the surface image and the pixel points on the standard part contour is calculated, the minimum distance value is obtained and summed, and the rotation evaluation of the pixel points on the surface image is obtained. In response to the minimum rotation evaluation, the best matching position of the part is determined.
3. The method for detecting automobile parts defects based on image recognition according to claim 1, characterized in that: The determining of the best matching position of the parts also includes: The corner detection algorithm is used on the surface image and the standard part contour respectively, the detected corner points are obtained for matching, and the best matching position of the part is determined.
4. The method for detecting defects in automobile parts based on image recognition according to claim 1, characterized in that: The burr coefficient includes: The standard part outline is placed on the surface image, and the average pixel value of all pixel points in the pixel point set of the standard part outline on the surface image is obtained; Taking the pixel points of any standard part contour as the marking points, the average value of the cumulative sum of the deviations between the ratio of the pixel value of the standard point to the average pixel value and 1 is calculated to obtain the burr coefficient of the standard part contour and the surface image.
5. The method for detecting automobile parts defects based on image recognition according to claim 1, characterized in that: The burr coefficient also includes: The median of the pixel values of all pixels in the pixel point set on the standard part contour is obtained, and the average of the sum of the differences between each pixel in the pixel point set on the standard part contour and the median pixel value is calculated to obtain the burr coefficient of the standard part contour and the surface image.
6. The method for detecting automobile parts defects based on image recognition according to claim 1, characterized in that: The step of calculating the defect evaluation value according to the burr range includes: The sum of the ratios of the outer and inner sides of the burr range is multiplied by the information entropy of the pixel values in the burr area to obtain the defect evaluation.
7. The method for detecting automobile parts defects based on image recognition according to claim 1, characterized in that: The calculation of the defect evaluation value according to the burr range also includes: The burr range is divided into several sub-areas based on any point in the burr range as a starting point, wherein the segmentation method is to use a clustering algorithm to segment the burr range to obtain several burr sub-areas, adjust the proportions of the burr sub-areas to obtain a significant burr range of the sub-area, calculate the defect evaluation for the significant burr range to obtain the defect evaluation of each sub-area, and when the maximum value of the defect evaluation is greater than the defect threshold, it is judged as a defective part, otherwise it is not.
8. The automobile parts defect detection system based on image recognition is characterized by: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method for detecting defects in automobile parts based on image recognition according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Automobile part defect detection method and system based on machine vision
CN118501159A
Method and device for detecting burr of casting
CN109035236A
Titanium metal segmentation method and system for image processing
CN117893553A
Defect detection method and apparatus, and electronic device and storage medium
WO2024040856A1
Cited By
Method and system for detecting appearance defects of automobile parts
CN120374600A