Deep Drawing Wrinkling Detection Method Based on Computer Vision Technology

Through computer vision technology, the grayscale map of the surface of the deep-drawing part is analyzed, and abnormal pixel points and regional characteristics are identified, which solves the problems of low efficiency and low accuracy of wrinkle detection of existing deep-drawing parts, and achieves efficient and accurate wrinkle detection.

CN115018792BActive Publication Date: 2025-07-11SHAANXI SIRUN INTELLIGENT TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210645558.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-08
Publication Date
2025-07-11
Estimated Expiration
2042-06-08

AI Technical Summary

Technical Problem

The existing wrinkle detection methods for deep drawing parts are inefficient and have low accuracy, and mainly rely on manual testing, which has a strong subjectivity problem.

Method used

Using a detection method based on computer vision technology, the grayscale map of the surface of the deep-drawing part is obtained, the set of abnormal pixel points is analyzed, the possibility of wrinkling areas is calculated, and the number of mutations of the grayscale value difference value and the position relationship are used to judge the wrinkling area, and the adjacent areas are merged to obtain the complete wrinkling area.

Benefits of technology

The efficiency and accuracy of wrinkle detection of deep drawing parts are improved, and the wrinkle area on the surface of deep drawing parts can be effectively identified, reducing the subjectivity of manual detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115018792B_ABST
    Figure CN115018792B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of stamping manufacturing processes, and particularly relates to a wrinkling detection method for drawn parts based on computer vision technology, including: obtaining a grayscale image of the surface of the drawn part and a set of abnormal pixel points; calculating the final possibility that each set of abnormal pixel points belongs to the wrinkled area; obtaining a set of pixel points in the wrinkled area using the final possibility; obtaining the number of mutations in the gray value difference between adjacent pixel points in the set of pixel points in the wrinkled area by using the gray value difference between two pixel points on the perpendicular bisector of the longitudinal line segment in the set of pixel points in the wrinkled area; judging the set of pixel points in the wrinkled area by using the number of mutations in the gray value difference between adjacent pixel points to obtain another set of pixel points in the wrinkled area; calculating the final possibility that the other set of pixel points in the wrinkled area and its nearest set belong to the same wrinkled area, and obtaining the complete wrinkled area on the surface of the drawn part by using this final possibility. The above method is used for wrinkling detection of drawn parts, which can improve the efficiency of wrinkling detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of stamping manufacturing processes, and particularly to a method for detecting wrinkling of deep-drawn parts based on computer vision technology. Background Art

[0002] Deep-drawn parts are widely used in various industries due to their unique advantages. Deep-drawn parts are manufactured by stamping. In the production process of deep-drawn parts, wrinkling of deep-drawn parts is likely to occur due to improper operation and other reasons, and the wrinkling of deep-drawn parts will affect the use of deep-drawn parts. Therefore, it is necessary to detect the wrinkling of deep-drawn parts after production.

[0003] Currently, the commonly used method for detecting wrinkling of deep-drawn parts is mainly manual detection, which relies on the existing experience of inspectors to detect the wrinkling of deep-drawn parts after production.

[0004] However, the existing methods for detecting wrinkling of deep-drawn parts are highly subjective, and the detection efficiency and accuracy are relatively low. Therefore, there is an urgent need for a method to improve the detection efficiency and accuracy of wrinkling of deep-drawn parts. Summary of the Invention

[0005] The present invention provides a method for detecting wrinkling of deep-drawn parts based on computer vision technology to solve the problems of low efficiency and low accuracy of the existing methods for detecting wrinkling of deep-drawn parts.

[0006] The present invention provides a method for detecting wrinkling of deep-drawn parts based on computer vision technology, including: obtaining a grayscale image of the surface of the deep-drawn part and a set of abnormal pixel points; calculating the final possibility that each set of abnormal pixel points belongs to the wrinkled area; obtaining a set of pixel points in the wrinkled area by using the final possibility; obtaining the number of mutations of the gray value differences between adjacent pixel points in the set of pixel points in the wrinkled area by using the gray value differences between two pixel points on the perpendicular bisector of the longitudinal line segment in the set of pixel points in the wrinkled area; judging the set of pixel points in the wrinkled area by using the number of mutations of the gray value differences between adjacent pixel points to obtain another set of pixel points in the wrinkled area; calculating the final possibility that another set of pixel points in the wrinkled area and its nearest set belong to the same wrinkled area, and obtaining the complete wrinkled area on the surface of the deep-drawn part by using the final possibility. Compared with the existing technology, the present invention uses computer vision technology to obtain the abnormal gray area on the surface of the deep-drawn part, obtains the wrinkled area according to the characteristics of the abnormal gray area on the surface, and determines the complete wrinkled area on the surface of the deep-drawn part according to the gray change and position of the wrinkled area. The present invention is used for detecting wrinkling of deep-drawn parts and can effectively improve the detection efficiency and accuracy of wrinkling.

[0007] To achieve the above object, the present invention adopts the following technical solution. A method for detecting wrinkling of deep-drawn parts based on computer vision technology includes:

[0008] Obtaining a grayscale image of the surface of the deep-drawn part to be detected;

[0009] Obtain the abnormal pixel points in the grayscale image by using the grayscale values of each pixel point in the grayscale image;

[0010] Perform connected component analysis on the abnormal pixel points to obtain all sets of abnormal pixel points;

[0011] Calculate the final possibility that each set of abnormal pixel points belongs to the wrinkling area by using the possibility that each set of abnormal pixel points belongs to the wrinkling area in terms of area, shape, and aggregation;

[0012] Obtain the set of pixel points of the wrinkling area by using the final possibility that each set of abnormal pixel points belongs to the wrinkling area;

[0013] Calculate the difference in grayscale values between two pixel points on the perpendicular bisector of the longitudinal line segment in each set of pixel points of the wrinkling area, and obtain the number of mutations in the difference in grayscale values of adjacent pixel points in each set of pixel points of the wrinkling area by using this difference in grayscale values;

[0014] Judge each set of pixel points of the wrinkling area according to the number of mutations in the difference in grayscale values of adjacent pixel points in each set of pixel points of the wrinkling area: when the number of mutations in the difference in grayscale values of adjacent pixel points in the set of pixel points of the wrinkling area is 2, then the set of pixel points of the wrinkling area is a complete set of pixel points of the wrinkling area; when the number of mutations in the difference in grayscale values of adjacent pixel points in the set of pixel points of the wrinkling area is not 2, then the set of pixel points of the wrinkling area is a set of pixel points of other wrinkling areas;

[0015] Calculate the final possibility that a set of pixel points of other wrinkling areas and its nearest set of pixel points of other wrinkling areas belong to the same wrinkling area by using the possibility that they belong to the same wrinkling area in terms of distance and direction;

[0016] Merge the set of pixel points of other wrinkling areas and its nearest set of pixel points of other wrinkling areas by using the final possibility that they belong to the same wrinkling area to obtain all complete wrinkling areas on the surface of the drawn part to be detected.

[0017] Further, for the method for detecting wrinkling of a drawn part based on computer vision technology, the abnormal pixel points in the grayscale image are obtained in the following manner:

[0018] Calculate the mean grayscale value and the standard deviation of the grayscale values of all pixel points in the grayscale image by using the grayscale values of each pixel point in the grayscale image of the surface of the drawn part to be detected;

[0019] Determine the range of grayscale values of normal area pixel points in the grayscale image by using the mean grayscale value and the standard deviation of the grayscale values of all pixel points in the grayscale image;

[0020] Judge the drawn part to be detected by using the gray value range of the pixel points in the normal area of the grayscale image;

[0021] When the gray values of all pixel points in the surface grayscale image of the drawn part to be detected are within the gray value range of the pixel points in the normal area of the grayscale image, then there is no wrinkling defect in the drawn part to be detected;

[0022] When there are pixel points in the surface grayscale image of the drawn part to be detected whose gray values are not within the gray value range of the pixel points in the normal area of the grayscale image, then the pixel points whose gray values are not within the gray value range of the pixel points in the normal area in the surface grayscale image of the drawn part to be detected are used as abnormal pixel points.

[0023] Further, for the method for detecting wrinkling of a drawn part based on computer vision technology, the set of all abnormal pixel points is obtained in the following manner:

[0024] Perform connected component analysis on the abnormal pixel points to obtain all connected components of the abnormal pixel points;

[0025] Count the number of pixel points in each connected component of the abnormal pixel points;

[0026] Set a threshold, and use the connected components of the abnormal pixel points with the number of pixel points greater than the threshold as the set of abnormal pixel points to obtain the set of all abnormal pixel points.

[0027] Further, for the method for detecting wrinkling of a drawn part based on computer vision technology, the final possibility of each set of abnormal pixel points belonging to the wrinkled area is obtained in the following manner:

[0028] Calculate the possibility of each set of abnormal pixel points belonging to the wrinkled area in terms of area by using the number of pixel points in each set of abnormal pixel points;

[0029] Calculate the distance between every two pixel points in each set of abnormal pixel points, and use the maximum distance as the longitudinal length of the set of abnormal pixel points;

[0030] Use the line connecting the two pixel points corresponding to the longitudinal length as the longitudinal line segment, obtain the distance between every two pixel points on the perpendicular bisector of the longitudinal line segment, and use the maximum distance as the transverse length of the set of abnormal pixel points;

[0031] Calculate the possibility of each set of abnormal pixel points belonging to the wrinkled area in terms of shape by using the longitudinal length and transverse length of each set of abnormal pixel points;

[0032] Obtain the central position of each set of abnormal pixel points;

[0033] Cluster the central positions of all sets of abnormal pixel points to obtain all clusters and the cluster center points of each cluster;

[0034] Calculate the distance between the central position of each set of abnormal pixel points and its corresponding cluster center point, and use this distance to calculate the possibility that each set of abnormal pixel points belongs to the wrinkled area in terms of aggregation;

[0035] Calculate the final possibility that each set of abnormal pixel points belongs to the wrinkled area by using the possibilities that each set of abnormal pixel points belongs to the wrinkled area in terms of area, shape, and aggregation.

[0036] Further, for the above-mentioned deep-drawing part wrinkling detection method based on computer vision technology, the set of pixel points in the wrinkled area is obtained in the following manner:

[0037] Set a threshold to judge the final possibility that each set of abnormal pixel points belongs to the wrinkled area: when the final possibility that the set of abnormal pixel points belongs to the wrinkled area is greater than or equal to the threshold, then this set of abnormal pixel points is the set of pixel points in the wrinkled area; when the final possibility that the set of abnormal pixel points belongs to the wrinkled area is less than the threshold, then this set of abnormal pixel points does not belong to the wrinkled area.

[0038] Further, for the above-mentioned deep-drawing part wrinkling detection method based on computer vision technology, the number of sudden changes in the gray value difference of adjacent pixel points of each set of pixel points in the wrinkled area is obtained in the following manner:

[0039] Calculate the gray value difference between two pixel points on the perpendicular bisector of the longitudinal line segment in each set of pixel points in the wrinkled area;

[0040] Set a threshold according to the average gray value and the standard deviation of the gray values of all pixel points on the surface gray image of the deep-drawing part to be detected;

[0041] Judge the relationship between the gray value difference between two pixel points on the perpendicular bisector of the longitudinal line segment in each set of pixel points in the wrinkled area and the set threshold: when there is a gray value difference greater than the threshold between two pixel points on the perpendicular bisector of the longitudinal line segment in the set of pixel points in the wrinkled area, then it is judged that there is a sudden change in the gray value difference of adjacent pixel points in this set of pixel points in the wrinkled area, and the number of times the gray value difference between two pixel points on the perpendicular bisector of the longitudinal line segment in this set of pixel points in the wrinkled area is greater than the threshold is used as the number of sudden changes in the gray value difference of adjacent pixel points of this set of pixel points in the wrinkled area;

[0042] Obtain the number of sudden changes in the gray value difference of adjacent pixel points of each set of pixel points in the wrinkled area in the above manner.

[0043] Further, for the above-mentioned method for detecting wrinkling of a drawn part based on computer vision technology, all complete wrinkling regions on the surface of the drawn part to be detected are obtained in the following manner:

[0044] Calculate the distance between the center positions of the pixel point sets of each other wrinkling region and the center positions of the pixel point sets of other wrinkling regions, and use the pixel point set of the other wrinkling region corresponding to the minimum distance as the nearest set of the pixel point set of this other wrinkling region;

[0045] Using the distance between the center position of each other wrinkling region pixel point set and the center position of its corresponding nearest set, and the longitudinal length of each other wrinkling region pixel point set, calculate the possibility that each other wrinkling region pixel point set and its corresponding nearest set belong to the same wrinkling region in terms of distance;

[0046] Take the straight line where the longitudinal line segment of each other wrinkling region pixel point set is located as the longitudinal line of this set, and obtain the slope of the longitudinal line of each other wrinkling region pixel point set;

[0047] Using the slopes of the longitudinal lines of each other wrinkling region pixel point set and its corresponding nearest set, calculate the possibility that each other wrinkling region pixel point set and its corresponding nearest set belong to the same wrinkling region in terms of direction;

[0048] Using the possibilities that each other wrinkling region pixel point set and its corresponding nearest set belong to the same wrinkling region in terms of distance and direction, calculate the final possibility that each other wrinkling region pixel point set and its corresponding nearest set belong to the same wrinkling region;

[0049] Set a threshold. When the final possibility that an other wrinkling region pixel point set and its corresponding nearest set belong to the same wrinkling region is greater than the threshold, then merge this other wrinkling region pixel point set and its corresponding nearest set to obtain a complete wrinkling region, and obtain all complete wrinkling regions on the surface of the drawn part to be detected according to the above steps.

[0050] Further, for the above-mentioned method for detecting wrinkling of a drawn part based on computer vision technology, the grayscale image of the surface of the drawn part to be detected is obtained in the following manner:

[0051] Collect the surface image of the drawn part to be detected;

[0052] Perform semantic segmentation on the surface image of the drawn part to be detected to obtain the surface image of the region of the drawn part to be detected;

[0053] Perform grayscale processing on the surface image of the region of the drawn part to be detected to obtain the grayscale image of the surface of the drawn part to be detected.

[0054] The beneficial effects of the present invention are as follows: By using computer vision technology, the present invention obtains the surface gray-scale abnormal area of the drawn part, acquires the wrinkling area based on the characteristics of the surface gray-scale abnormal area, and determines the complete wrinkling area on the surface of the drawn part according to the gray-scale change and position of the wrinkling area. The present invention is used for detecting wrinkles on drawn parts, which can effectively improve the efficiency and accuracy of wrinkle detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0056] Figure 1 It is a schematic flowchart of a method for detecting wrinkles on a drawn part based on computer vision technology provided in Embodiment 1 of the present invention;

[0057] Figure 2 It is a schematic flowchart of a method for detecting wrinkles on a drawn part based on computer vision technology provided in Embodiment 2 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0059] Embodiment 1

[0060] The embodiment of the present invention provides a method for detecting wrinkles on a drawn part based on computer vision technology. As Figure 1 shown, it includes:

[0061] S101. Obtain the surface gray-scale image of the drawn part to be detected.

[0062] Among them, the gray-scale image is also called a gray-level image. The white and black are divided into several levels according to the logarithmic relationship, which is called gray-scale. The gray-scale is divided into 256 levels.

[0063] S102. Use the gray-scale value of each pixel point in the gray-scale image to obtain the abnormal pixel points in the gray-scale image.

[0064] Among them, the pixel points not within the normal area gray-scale value range are used as the abnormal pixel points in the gray-scale image.

[0065] S103. Perform connected component analysis on the abnormal pixel points to obtain all sets of abnormal pixel points.

[0066] Among them, connected component analysis refers to finding and labeling each connected component in the image.

[0067] S104. Calculate the final probability that each set of abnormal pixel points belongs to the wrinkling area by using the probabilities that each set of abnormal pixel points belong to the wrinkling area in terms of area, shape, and aggregation.

[0068] Among them, the greater the probabilities that each set of abnormal pixel points belong to the wrinkling area in terms of area, shape, and aggregation, the greater the final probability.

[0069] S105. Obtain the set of pixel points of the wrinkling area by using the final probability that each set of abnormal pixel points belongs to the wrinkling area.

[0070] Among them, set a threshold, and judge the magnitudes of the final probability and the threshold to obtain the set of pixel points of the wrinkling area.

[0071] S106. Calculate the difference in gray-scale values between two pixel points on the perpendicular bisector of the longitudinal line segment in each set of pixel points of the wrinkling area, and use this difference in gray-scale values to obtain the number of mutations in the difference in gray-scale values of adjacent pixel points in each set of pixel points of the wrinkling area.

[0072] Among them, when the number of mutations in the difference in gray-scale values of adjacent pixel points of the pixel points is 2, it indicates that this set of pixel points of the wrinkling area is a complete set of pixel points of the wrinkling area.

[0073] S107. Judge the set of pixel points of the wrinkling area according to the number of mutations in the difference in gray-scale values of adjacent pixel points in each set of pixel points of the wrinkling area: when the number of mutations in the difference in gray-scale values of adjacent pixel points in the set of pixel points of the wrinkling area is 2, then this set of pixel points of the wrinkling area is a complete set of pixel points of the wrinkling area; when the number of mutations in the difference in gray-scale values of adjacent pixel points in the set of pixel points of the wrinkling area is not 2, then this set of pixel points of the wrinkling area is a set of pixel points of other wrinkling areas.

[0074] Among them, when the number of mutations in the difference in gray-scale values of adjacent pixel points of the pixel points is 0 or 1, it indicates that this set of pixel points of the wrinkling area is a set of pixel points of other wrinkling areas.

[0075] S108. Calculate the final probability that a set of pixel points of other wrinkling areas and its nearest set of pixel points of other wrinkling areas belong to the same wrinkling area by using the probabilities that they belong to the same wrinkling area in terms of distance and direction.

[0076] Among them, the final probability is used to obtain all complete wrinkling areas on the surface of the to-be-detected drawn part.

[0077] S109. Merge the two sets of other wrinkling region pixel points by using the final possibility that the set of other wrinkling region pixel points and its nearest neighboring set of other wrinkling region pixel points belong to the same wrinkling region, and obtain all complete wrinkling regions on the surface of the drawn part to be detected.

[0078] Among them, set a threshold. When the final possibility is greater than the threshold, it is determined that the set of other wrinkling region pixel points and its corresponding nearest neighboring set of other wrinkling region pixel points belong to the same wrinkling region.

[0079] The beneficial effect of this embodiment is as follows: This embodiment uses computer vision technology to obtain the surface gray anomaly region of the drawn part, obtains the wrinkling region according to the characteristics of the surface gray anomaly region, and determines the complete wrinkling region on the surface of the drawn part according to the gray change and position of the wrinkling region. This embodiment is used for the wrinkling detection of drawn parts, which can effectively improve the efficiency and accuracy of wrinkling detection.

[0080] Embodiment 2

[0081] The main purpose of this embodiment is: Using computer vision technology, obtain the surface gray anomaly of the drawn part, and determine the wrinkling region on the surface of the drawn part according to the gray change of the wrinkling region of the drawn part and the position of the abnormal pixel points.

[0082] In the production of stamping parts, the wrinkling phenomenon of drawn parts is the main reason for the quality defects of drawn parts. Generally, the wrinkling phenomenon of drawn parts is manifested as the protrusions on the surface of the drawn part, and the change of image gray level is formed due to the protrusions on the surface in the image. This embodiment analyzes different gray mutation situations through the change of the surface gray level of the drawn part image to determine the wrinkling region on the surface of the drawn part.

[0083] An embodiment of the present invention provides a method for detecting wrinkling of a drawn part based on computer vision technology, as Figure 2 shown, including:

[0084] S201. Obtain the image of the drawn part.

[0085] In the stamping manufacturing process, the detection of each step is a key step to control the quality of the finished product. The wrinkling detection of drawn parts is particularly important to determine the wrinkling of drawn parts, prevent cracks in subsequent finished products, and ensure the quality of finished products.

[0086] After the drawing step is completed, the drawn part is transferred to the detection table, and a camera is installed directly above the drawn part to capture the image of the drawn part to be detected.

[0087] Preprocess the obtained image:

[0088] First, perform semantic segmentation to obtain the image of the drawn part.

[0089] Gray-scale the drawn part image obtained by semantic segmentation to obtain a grayscale image, which is convenient for subsequent calculations.

[0090] For the wrinkled area on the surface of the drawn part, first determine the abnormal pixel points according to the change of the image grayscale. The abnormal pixel points may be the wrinkled area. Then, according to the distribution of the abnormal pixel points, obtain the set of abnormal pixel points. The grayscale change of the wrinkled area on the surface of the drawn part has certain characteristics. Determine the pixel position relationship according to the grayscale change to determine the wrinkled area on the surface of the drawn part.

[0091] S202. Determine the abnormal pixel points.

[0092] For the obtained drawn part image, since the raw material of the drawn part is metal, when there is no wrinkling phenomenon on the surface of the drawn part, the obtained image is uniform and the grayscale in the image basically does not change. Therefore, according to the change of the grayscale in the image, the wrinkled area can be initially identified.

[0093] In the preprocessed image, identify the grayscale value of each pixel point as F i , first calculate the average value f of the grayscale values of all pixel points and the standard deviation S of the grayscale values:

[0094]

[0095]

[0096] where n is the total number of pixel points in the drawn part image.

[0097] For the image of the drawn part without wrinkling, it is uniform, so the change of the grayscale is extremely small and fluctuates around a standard value. At this time, with the help of the idea of normal distribution, the grayscale value range of the normal area is determined as:

[0098] F i ∈(f - 3*S, f + 3*S)

[0099] Because the materials of the drawn parts are different, it is not certain whether the pixel points in the wrinkled area of the drawn part are high-brightness pixel points or low-brightness pixel points. Therefore, identify the pixel points whose grayscale values do not conform to this range to obtain abnormal pixel points, that is, obtain the pixel points that may belong to the wrinkled area. Then analyze the positions of the abnormal pixel points, the positions, sizes and shapes of the abnormal pixel point sets, and finally determine the wrinkled area.

[0100] S203. Determine the set of abnormal pixel points.

[0101] For the wrinkled area of the drawn part, it is manifested as a set of pixel points in the image. Therefore, perform an aggregation analysis on the selected abnormal pixel points. For the set of abnormal pixel points, it can be judged as a wrinkled area.

[0102] According to the connected component analysis method, the connected components of abnormal pixel points are obtained, that is, the set of abnormal pixel points.

[0103] Select an abnormal pixel point t, and analyze the 8-neighborhood pixel points of the abnormal pixel point t. If the 8-neighborhood pixel points are abnormal pixel points, they are in the same connected component as the abnormal pixel point t. Search all abnormal pixel points in the same connected component as t to form a set of abnormal pixel points.

[0104] After the set of pixel points of the abnormal pixel point t is searched, select another abnormal pixel point in the image and repeat the above steps until all abnormal pixel points are searched to obtain all sets of abnormal pixel points.

[0105] Then, according to the size of the set of abnormal pixel points, the influence of isolated noise points is excluded. For each set of abnormal pixel points, the number of abnormal pixel points represents the area of the set. The area of the set Z of abnormal pixel points is denoted as m, and at this time, a threshold θ is set to exclude isolated noise points.

[0106] R = {Z|m > θ}

[0107] Where R represents the set of abnormal pixel points after excluding isolated noise points, and m represents the area of the set Z of abnormal pixel points.

[0108] S204. Obtain the set of pixel points in the wrinkling area.

[0109] For the obtained set of abnormal pixel points after excluding isolated noise points, analyze the possibility of the wrinkling area.

[0110] For the wrinkling area, it has a certain area. Therefore, the set of pixel points in the wrinkling area also has a certain area. At the same time, the larger the area of the obtained set of abnormal pixel points, the more likely it belongs to the wrinkling area. Therefore, according to the area of the set of abnormal pixel points, judge the possibility that it belongs to the wrinkling area:

[0111]

[0112] Where A j represents the possibility that the j-th set of abnormal pixel points belongs to the wrinkling area in terms of area, m j represents the area of the j-th set of abnormal pixel points, and ∑m j represents the total area of all sets of abnormal pixel points in the image.

[0113] The wrinkling of the drawn part appears as a strip-shaped protrusion in the image. Therefore, the set of abnormal pixel points as the wrinkling area also has characteristics in terms of shape.

[0114] For the set of abnormal pixel points, first determine its longitudinal direction. In a set of abnormal pixel points, calculate the distance between every two pixel points to obtain the maximum distance d max , because generally the wrinkles are formed as strip-shaped protrusions, so d max represents the longitudinal length of the set of abnormal pixel points. At the same time, according to the line segment where the longitudinal length is located, obtain the maximum distance h between every two pixel points on the perpendicular bisector of the line segment max , then h max represents the transverse length of the set of abnormal pixel points. Therefore, the possibility that the set of abnormal pixel points is a wrinkling area is as follows:

[0115]

[0116] where B j represents the possibility that the j-th set of abnormal pixel points belongs to the wrinkling area in terms of shape.

[0117] For the wrinkling of the drawn part, it is formed by local extrusion. Generally, in actual production, the generation of wrinkles is often aggregative, that is, wrinkles will occur in a certain area or several areas. Therefore, the set of abnormal pixel points as the wrinkling area also has a certain degree of aggregation.

[0118] In the analysis of the aggregation of the set of abnormal pixel points, first use the position of the center O of the set of abnormal pixel points to represent the position of the set of abnormal pixel points. At this time, use the mean shift clustering algorithm to obtain the number of clustering clusters and the clustering center points of all current O. Then use the k-means algorithm to assign all O to the corresponding clustering centers.

[0119] Obtain all the clustering centers, and judge the aggregation of O according to the distance from O to the corresponding clustering center, so as to judge the possibility that the corresponding set of abnormal pixel points belongs to the wrinkling area:

[0120]

[0121] where C j represents the possibility that the j-th set of abnormal pixel points belongs to the wrinkling area in terms of aggregation, D j represents the center point O of the j-th set of abnormal pixel points j to the distance from the corresponding clustering center, D max represents the maximum value of the distances from all O in the image to the corresponding clustering centers.

[0122] According to the above method, the possibility that all sets of abnormal pixel points belong to the wrinkling area is as follows:

[0123]

[0124] where respectively represent the influence factors of the area of the abnormal pixel point set, the shape of the abnormal pixel point set, and the aggregation of the abnormal pixel point set on the judgment of the abnormal pixel point set belonging to the wrinkled area They are respectively assigned values according to experience

[0125] According to the possibility E that the abnormal pixel point set belongs to the wrinkled area j , a threshold E0 is set to judge the pixel point set of the wrinkled area

[0126]

[0127] When F′ = 1, it means that the corresponding abnormal pixel point set belongs to the wrinkled area. When F′ = 0, it means that the corresponding abnormal pixel point set does not belong to the wrinkled area. All pixel point sets of the wrinkled area are relabeled as H j , j = 1, 2, 3, … nu

[0128] S205. Obtain all complete wrinkled areas

[0129] For an abnormal pixel point set, it may be a wrinkled area. Therefore, according to the shape of the abnormal pixel point set, the relative size of the wrinkle is determined to judge the pixel point set of the wrinkled area

[0130] Among the nu pixel point sets of the wrinkled area obtained in the image, calculate the distance between the jth pixel point set H of the wrinkled area j and other pixel point sets of the wrinkled area. Since different abnormal pixel point sets in the same wrinkled area are the closest in the image, the other pixel point set H closest to H j is selected j+1 , and the possibility that two abnormal pixel point sets belong to the same wrinkled area is judged

[0131]

[0132] where d′ represents the distance between H j and H j+1 , V j_j+1 represents the possibility that H j and H j+1 belong to the same wrinkled area in terms of distance, and d max represents the longitudinal length of H j

[0133] For abnormal pixel point sets in the same wrinkled area, the shape of the abnormal pixel point set also has certain characteristics. Since the wrinkled area appears as a strip-shaped protrusion, for abnormal pixel point sets in the same wrinkled area, their orientations are basically the same

[0134] Then, according to d max ​Determination method, obtaining the longitudinal direction of the set of abnormal pixel points, i.e., d max The direction is the longitudinal direction of the set of abnormal pixel points, d max The straight line L where it is located j Represents the longitudinal straight line of the set of abnormal pixel points

[0135] According to the longitudinal straight line of the set of abnormal pixel points, the possibility that different sets of abnormal pixel points belong to the same wrinkling area is as follows:

[0136]

[0137] Where X j_j+1 Represents H j And H j+1 The possibility of belonging to the same wrinkling area in the trend, K j , K j+1 Are respectively the straight lines L j , L j+1 's slopes, K max Is the maximum value of the slopes of the longitudinal straight lines of all sets of abnormal pixel points in the image. ||K j |-|K j+1 || Represents the slope difference value between the straight lines L j , L j+1 . The smaller the slope difference value, the greater the possibility of belonging to the same wrinkling area

[0138] When the slope of the straight line L j does not exist, assign its slope K j =K max .

[0139] Due to the different sizes, lights, and shapes of the wrinkles, "low brightness - high brightness - low brightness" or "low brightness - high brightness" may be formed in the wrinkling area. Based on this feature, determine the set of abnormal pixel points belonging to the same wrinkling area

[0140] For the set of pixel points H j in the j-th wrinkling area, first calculate the gray level distribution in H j . According to the determination method of d max , use the line segment where d max is located as the longitudinal line segment of this H j . According to the original image, obtain the change of the gray level of the wrinkling area in the horizontal direction. Therefore, use the vertical bisector l j of the longitudinal line segment to determine the number of gray level mutations of H j by the change value of the gray level between two pixel points in the direction

[0141] Set a threshold ρ. When l jWhen the gray - scale value change value on it is greater than the threshold ρ, it is judged as a gray - scale mutation. According to the gray - scale values of the pixel points in the whole image, the threshold ρ is set as:

[0142] ρ=(f + 3*S)-(f - 3*S)

[0143] where f and S respectively represent the average value of the gray - scale values and the standard deviation of the gray - scale values of all pixel points in the image.

[0144] For all the sets of pixel points in the wrinkled area, the number of gray - scale mutations obtained is NUM. According to the number of gray - scale mutations obtained, the range of the wrinkled area is judged.

[0145] When the number of gray - scale mutations NUM = 2 in a set of pixel points in a wrinkled area, it means that the set of abnormal pixel points is a complete wrinkled area, that is, the wrinkled area may form a "low - brightness - high - brightness - low - brightness" or "low - brightness - high - brightness" gray - scale change. When NUM={0,1}, it means that the set of abnormal pixel points may be a complete wrinkled area, or there may be a same wrinkled area divided into multiple sets of abnormal pixel points by normal gray - scales. Therefore, according to the gray - scale changes of adjacent sets of abnormal pixel points, a complete wrinkled area is judged.

[0146] For the j - th set of pixel points H in the wrinkled area j , when NUM j =1, judge the relationship between H j and H j+1 , that is, judge whether H j and H j+1 belong to the same wrinkled area.

[0147] In a wrinkled area, the maximum number of gray - scale mutations is 2 times. So when the number of gray - scale mutations NUM j of H j =1, the possibility that H j and H j+1 are in the same wrinkled area is:

[0148]

[0149] When the number of gray - scale mutations NUM j of H j =0, the possibility that H j and H j+1 are in the same wrinkled area is:

[0150]

[0151] where V j_j+1 , X j_j+1 respectively represent H j and H j+1The possibility of being the same wrinkling area in terms of distance and orientation. τ1 and τ2 are respectively V j_j+1 , X j_j+1 The degree of influence on Y j is taken as empirical values of 0.4 and 0.6 respectively. Y j represents H j and H j+1 belong to the same wrinkling area.

[0152] Set a threshold α. When Y j >α, it is determined that H j and H j+1 belong to the same wrinkling area.

[0153] According to the above method, in the drawing part image, each complete wrinkling area is obtained.

[0154] S206. Calculate the size of the wrinkling area.

[0155] In the drawing part image, each complete wrinkling area is obtained. The obtained complete wrinkling areas are respectively denoted as Q w , w = 1, 2, 3…num, where num represents the total number of complete wrinkling areas.

[0156] For the w-th complete wrinkling area Q w , the number of abnormal pixel points included in the wrinkling area is q. When q = 1, the size of the wrinkling area is the number of abnormal pixel points; when q>1, the size of the wrinkling area is the sum of the abnormal pixel point set and all pixel points between the abnormal pixel point sets.

[0157] H j and H j+1 Calculation of pixel points between: Connect any pixel point of H j and H j+1 . Any pixel point on the connecting line that does not belong to H j and H j+1 is denoted as the set H j_j+1 , representing the area size between H j and H j+1 .

[0158] Calculate the size of the wrinkling area on the image according to the above method, and complete the detection of the wrinkling area of the drawing part.

[0159] The beneficial effect of this embodiment is that this embodiment uses computer vision technology to obtain the surface gray abnormal area of the drawing part, obtains the wrinkling area according to the characteristics of the surface gray abnormal area, and determines the complete wrinkling area on the surface of the drawing part according to the gray change and position of the wrinkling area. This embodiment is used for wrinkling detection of drawing parts, which can effectively improve the efficiency and accuracy of wrinkling detection.

[0160] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A wrinkling detection method for deep-drawn parts based on computer vision technology, characterized in that, Including: Obtain the grayscale image of the surface of the drawn part to be detected; Obtain the abnormal pixel points in the grayscale image by using the grayscale values of each pixel point in the grayscale image; Perform connected component analysis on the abnormal pixel points to obtain all sets of abnormal pixel points; Calculate the final possibility that each set of abnormal pixel points belongs to the wrinkling area by using the possibility that each set of abnormal pixel points belongs to the wrinkling area in terms of area, shape, and aggregation; Obtain the set of pixel points of the wrinkling area by using the final possibility that each set of abnormal pixel points belongs to the wrinkling area; Calculate the difference in grayscale values between two pixel points on the perpendicular bisector of the longitudinal line segment in each set of pixel points of the wrinkling area, and obtain the number of mutations in the difference in grayscale values of adjacent pixel points in each set of pixel points of the wrinkling area by using this difference in grayscale values; Judge the set of pixel points of the wrinkling area according to the number of mutations in the difference in grayscale values of adjacent pixel points in each set of pixel points of the wrinkling area: when the number of mutations in the difference in grayscale values of adjacent pixel points in the set of pixel points of the wrinkling area is 2, then the set of pixel points of the wrinkling area is a complete set of pixel points of the wrinkling area; when the number of mutations in the difference in grayscale values of adjacent pixel points in the set of pixel points of the wrinkling area is not 2, then the set of pixel points of the wrinkling area is a set of pixel points of other wrinkling areas; Calculate the final possibility that a set of pixel points of other wrinkling areas and its nearest set of pixel points of other wrinkling areas belong to the same wrinkling area by using the possibility that they belong to the same wrinkling area in terms of distance and direction; Merge the set of pixel points of other wrinkling areas and its nearest set of pixel points of other wrinkling areas according to the final possibility that they belong to the same wrinkling area to obtain all complete wrinkling areas on the surface of the drawn part to be detected; The final possibility that each set of abnormal pixel points belongs to the wrinkling area is obtained in the following way: Calculate the possibility that each set of abnormal pixel points belongs to the wrinkling area in terms of area by using the number of pixel points in each set of abnormal pixel points; Calculate the distance between two pixel points in each set of abnormal pixel points, and take the maximum distance as the longitudinal length of the set of abnormal pixel points; Take the line connecting the two pixel points corresponding to the longitudinal length as the longitudinal line segment, obtain the distance between two pixel points on the perpendicular bisector of the longitudinal line segment, and take the maximum distance as the transverse length of the set of abnormal pixel points; Calculate the possibility that each set of abnormal pixel points belongs to the wrinkling area in terms of shape by using the longitudinal length and transverse length of each set of abnormal pixel points; Obtain the central position of each set of abnormal pixel points; Cluster the central positions of all sets of abnormal pixel points to obtain all clusters and the cluster center points of each cluster; Calculate the distance between the central position of each set of abnormal pixel points and its corresponding cluster center point, and calculate the possibility that each set of abnormal pixel points belongs to the wrinkling area in terms of aggregation by using this distance; Calculate the final possibility that each set of abnormal pixel points belongs to the wrinkling area by using the possibility that each set of abnormal pixel points belongs to the wrinkling area in terms of area, shape, and aggregation.

2. The method for detecting wrinkling of a deep-drawn part based on computer vision technology according to claim 1, wherein The abnormal pixel points in the grayscale image are obtained in the following manner: Calculate the mean and standard deviation of the grayscale values of all pixel points in the grayscale image using the grayscale values of each pixel point in the grayscale image of the surface of the draw piece to be detected; Determine the range of grayscale values of the pixel points in the normal area of the grayscale image using the mean and standard deviation of the grayscale values of all pixel points in the grayscale image; Judge the draw piece to be detected using the range of grayscale values of the pixel points in the normal area of the grayscale image; When the grayscale values of all pixel points in the grayscale image of the surface of the draw piece to be detected are within the range of grayscale values of the pixel points in the normal area of the grayscale image, then the draw piece to be detected has no wrinkling defect; When there are pixel points in the grayscale image of the surface of the draw piece to be detected whose grayscale values are not within the range of grayscale values of the pixel points in the normal area of the grayscale image, then the pixel points in the grayscale image of the surface of the draw piece to be detected whose grayscale values are not within the range of grayscale values of the pixel points in the normal area are taken as abnormal pixel points.

3. A deep drawing wrinkling detection method based on computer vision technology according to claim 1, characterized in that, The set of all abnormal pixel points is obtained in the following manner: Perform connected component analysis on the abnormal pixel points to obtain all connected components of the abnormal pixel points; Count the number of pixel points in each connected component of the abnormal pixel points; Set a threshold, and take the connected components of the abnormal pixel points with the number of pixel points greater than the threshold as the set of abnormal pixel points to obtain the set of all abnormal pixel points.

4. A deep drawing wrinkling detection method based on computer vision technology according to claim 1, characterized in that The set of pixel points in the wrinkling area is obtained in the following manner: Set a threshold to judge the final possibility of each set of abnormal pixel points belonging to the wrinkling area: when the final possibility of the set of abnormal pixel points belonging to the wrinkling area is greater than or equal to the threshold, then the set of abnormal pixel points is the set of pixel points in the wrinkling area; When the final possibility of the set of abnormal pixel points belonging to the wrinkling area is less than the threshold, then the set of abnormal pixel points does not belong to the wrinkling area.

5. A method for detecting wrinkling of a deep-drawn part based on computer vision technology according to claim 1, characterized in that, The number of sudden changes in the grayscale value differences between adjacent pixel points of each set of pixel points in the wrinkling area is obtained in the following manner: Calculate the grayscale value differences between two pixel points on the perpendicular bisector of the vertical line segment in each set of pixel points in the wrinkling area; Set a threshold according to the mean and standard deviation of the grayscale values of all pixel points in the grayscale image of the surface of the draw piece to be detected; Judge the relationship between the grayscale value differences between two pixel points on the perpendicular bisector of the vertical line segment in each set of pixel points in the wrinkling area and the set threshold: when there are grayscale value differences between two pixel points on the perpendicular bisector of the vertical line segment in the set of pixel points in the wrinkling area that are greater than the threshold, then it is judged that there is a sudden change in the grayscale value differences between adjacent pixel points in the set of pixel points in the wrinkling area, and the number of times the grayscale value differences between two pixel points on the perpendicular bisector of the vertical line segment in the set of pixel points in the wrinkling area are greater than the threshold is taken as the number of sudden changes in the grayscale value differences between adjacent pixel points of the set of pixel points in the wrinkling area; Obtain the number of sudden changes in the grayscale value differences between adjacent pixel points of each set of pixel points in the wrinkling area in the above manner.

6. The method for detecting wrinkling of a deep-drawn part based on computer vision technology according to claim 1, wherein All complete wrinkling areas on the surface of the draw piece to be detected are obtained in the following manner: Calculate the distances between the central positions of each set of pixel points in other wrinkled regions and the central positions of the sets of pixel points in other wrinkled regions, and use the set of pixel points in the other wrinkled region corresponding to the minimum distance as the nearest set of the set of pixel points in this other wrinkled region; Use the distances between the central positions of each set of pixel points in other wrinkled regions and the central positions of their corresponding nearest sets, and the longitudinal lengths of each set of pixel points in other wrinkled regions to calculate the possibility that each set of pixel points in other wrinkled regions and their corresponding nearest sets belong to the same wrinkled region in terms of distance; Take the straight line where the longitudinal line segment of each set of pixel points in other wrinkled regions is located as the longitudinal line of this set, and obtain the slope of the longitudinal line of each set of pixel points in other wrinkled regions; Use the slopes of the longitudinal lines of each set of pixel points in other wrinkled regions and their corresponding nearest sets to calculate the possibility that each set of pixel points in other wrinkled regions and their corresponding nearest sets belong to the same wrinkled region in terms of direction; Use the possibilities that each set of pixel points in other wrinkled regions and their corresponding nearest sets belong to the same wrinkled region in terms of distance and direction to calculate the final possibility that each set of pixel points in other wrinkled regions and their corresponding nearest sets belong to the same wrinkled region; Set a threshold. When the final possibility that a set of pixel points in an other wrinkled region and its corresponding nearest set belong to the same wrinkled region is greater than the threshold, then merge this set of pixel points in the other wrinkled region and its corresponding nearest set to obtain a complete wrinkled region, and obtain all complete wrinkled regions on the surface of the to-be-detected drawing part according to the above steps.

7. A wrinkling detection method for deep-drawn parts based on computer vision technology according to claim 1, characterized in that The grayscale image of the surface of the to-be-detected drawing part is obtained in the following manner: Collect the surface image of the to-be-detected drawing part; Perform semantic segmentation on the surface image of the to-be-detected drawing part to obtain the surface image of the region of the to-be-detected drawing part; Perform grayscale processing on the surface image of the region of the to-be-detected drawing part to obtain the grayscale image of the surface of the to-be-detected drawing part.

Citation Information

Patent Citations

  • Vehicle stamping part defect detection method based on computer vision

    CN114627080A