An intelligent monitoring method and system for a stamping line of special-shaped parts based on machine vision
Through the intelligent monitoring method of stamping lines of special-shaped parts based on machine vision, the characteristic strength of parts is calculated and the descriptor is constructed, which solves the problem of poor monitoring accuracy of special-shaped parts, and achieves higher monitoring accuracy and defect recognition capabilities.
Patent Information
- Application Number
- CN202510322910.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-03-19
AI Technical Summary
In industrial production, the monitoring accuracy of special-shaped parts is poor, especially in complex and disturbing industrial environments, shape context algorithms are easily disturbed, affecting the recognition of part characteristics.
Using a smart monitoring method for stamping lines of special-shaped parts based on machine vision, the feature intensity of the part is calculated by obtaining the edge pixel point information in the image to be detected, and the edge pixel points are divided into two sets of point sets (first point sets and second point sets), the first descriptor and the second descriptor are constructed, and the feature matching degree is calculated to determine part defects.
This method can reduce the influence of image background and noise, improve the monitoring accuracy of special-shaped parts characteristics, and enhance the ability to identify part defects.
Smart Images

Figure CN119851215B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing, and in particular, to an intelligent monitoring method and system for a stamping line of special-shaped parts based on machine vision. Background Art
[0002] With the production and progress of processing technologies, the complexity of workpieces has gradually increased. In particular, some automotive components have irregular shapes. For some sheet metal parts, they are mostly processed through the cooperation of bending and stamping processes. Each process requires matching different process equipment, such as a bending machine, a stamping machine, etc.; each equipment is set independently, so the transfer of parts is often involved in the production process. If the parts are transferred in a chaotic manner during the transfer process, the phenomenon of missing processes will occur. In order to reduce the occurrence of the above situation, generally, workers will observe whether the previous processes of the workpiece are missing before loading to reduce the occurrence of missing processes. However, with the increase in the number of processes, the burden on workers has gradually increased, which is not conducive to improving production efficiency. In order to improve production efficiency, in related technologies, the monitoring of features on parts can be achieved by the method of edge extraction of the image of the workpiece.
[0003] The Shape Context algorithm is an effective method for describing two-dimensional shape features. It mainly describes the global features of the shape by statistically analyzing the relative position distribution of pixel points on the shape. It can be applied to the monitoring of the characteristic shapes of workpieces. However, the industrial environment is complex and has many interferences. Therefore, a large number of interference points unrelated to the parts will be collected during the operation of the Shape Context algorithm, affecting the recognition of part features; furthermore, it will affect the monitoring accuracy of the features of special-shaped parts. Summary of the Invention
[0004] In order to solve the problem of poor monitoring accuracy of special-shaped workpieces, the present application provides an intelligent monitoring method and system for a stamping line of special-shaped parts based on machine vision.
[0005] In a first aspect, the present application provides an intelligent monitoring method for a stamping line of special-shaped parts based on machine vision, adopting the following technical solution:
[0006] The intelligent monitoring method for a stamping line of special-shaped parts based on machine vision includes the steps of: obtaining edge pixel point information in the image to be detected, and calculating the part feature intensity of the edge pixel points;
[0007] Constructing a first point set and a second point set according to the part feature intensity of the edge pixel points; constructing first descriptors and second descriptors of the edge pixel points in the first point set, and calculating the feature matching degree of the pixel points in the first point set of the image to be detected and the standard image; determining part defects according to the feature matching degree; the calculation formula of the feature matching degree is: ;
[0008] In the formula, The feature matching degree between the th pixel point in the first point set of the image to be detected and the th pixel point in the first point set of the standard image, The first descriptor of the th pixel point in the first point set of the image to be detected; The second descriptor of the th pixel point in the first point set of the image to be detected; The first descriptor of the th pixel point in the first point set of the standard image; The second descriptor of the th pixel point in the first point set of the standard image; The information entropy of the gray values of the pixel points in the first point set of the standard image; The information entropy of the gray values of the pixel points in the second point set of the standard image; The cosine similarity function.
[0009] In this application, during the production process, if a special-shaped workpiece lacks a process, the shape of the special-shaped part will change, which will in turn affect the change of the information of the edge pixel points, such as the change of features such as the gray value or curvature of the edge pixel points. Utilizing this feature, the part feature strength of the image to be detected and the standard image is calculated. The pixel points with stronger part feature strength can reflect the key feature areas of the part. The pixel points with higher part feature strength are selected to reduce the interference of the background and noise, providing a more accurate data basis for subsequent analysis. The edge pixel points in the image to be detected are divided into two point sets with different part feature strengths, namely the first point set and the second point set; the first descriptor and the second descriptor are constructed according to the first point set and the second point set to obtain the distribution of the edge pixel points with higher and lower part feature strengths in the part, distinguishing different features of the special-shaped part. Subsequently, the feature matching degree is calculated, and it is determined whether the part is defective according to the feature matching degree. In the formula, when the information entropy of the first point set increases, the weight of the first descriptor increases when calculating the feature matching degree, and vice versa. When the information entropy of the second point set is large, the weight of the second descriptor increases. The weight is automatically adjusted according to the point set features to optimize the matching process, improve the matching accuracy, and further improve the accuracy of special-shaped workpiece monitoring.
[0010] Optionally, the steps for constructing the first descriptor and the second descriptor in the first point set include:
[0011] Dividing the sampling area;
[0012] Calculating the number of pixel points belonging to the first point set in each sampling area, and performing normalization processing to obtain the first descriptor of the pixel point;
[0013] Calculate the number of pixel points belonging to the second point set in each sampling area, and perform normalization to obtain the second descriptor of the pixel points.
[0014] Based on the pixel points in different point sets, construct descriptors that can reflect the key features and secondary features in the key image to be detected, and obtain the distribution state of pixel points with different part feature intensities in the part feature area.
[0015] Optionally, the method for dividing the sampling area includes: constructing multiple concentric circles with different radii centered on the edge pixel points;
[0016] Divide the concentric circles evenly into multiple parts along the circumferential scale to form multiple sampling areas.
[0017] Using the concentric circle method to divide the sampling area is simple and effective on the one hand; on the other hand, it can adapt to the complex and diverse shapes in the shaped parts, such as different shaped areas like protrusions and depressions on the parts. By reasonably setting the radii and numbers of the concentric circles, the sampling area can better fit the boundaries of these areas and effectively cover the feature areas of the parts.
[0018] Optionally, the construction methods of the first point set and the second point set include: sorting the part feature intensities of multiple edge pixel points from large to small, and taking the part of the edge pixel points with the largest part feature intensity according to the percentage to form the first point set, and the remaining edge pixel points form the second point set.
[0019] Divide the edge pixel points into two parts. The edge pixel points with stronger part feature intensities are concentrated in the first point set, and the edge pixel points with weaker part feature intensities are concentrated in the second point set.
[0020] Optionally, the calculation formula for the part feature intensity of the edge pixel points is:
[0021] ;
[0022] In the formula is the part feature intensity of any edge pixel point in the image, is the gray value of the edge pixel point, is the curvature of the edge pixel point, is the anomaly score of the pixel point of the edge pixel point calculated using the Isolation Forest algorithm, is the linear normalization function; is the pixel point gradient.
[0023] The part is formed by stamping or bending a metal sheet, and it requires a larger gray value in the image. Therefore, the gray value The larger it is, the more likely it indicates that the pixel is on the part, so the part feature intensity is also greater. The gray values of the pixels that do not belong to the part are smaller, so the part feature intensity is also smaller, which is convenient for removing the background and interference. At the same time, the key feature areas of the part mostly show as corners, that is, the edge pixels of the part have a larger curvature. The larger the curvature of the edge pixels, the greater the part feature intensity. The anomaly score reflects the degree of dispersion of the pixels. When the anomaly score of a certain pixel is large, it means that it is more isolated in the spatial distribution, that is, the probability that the pixel does not belong to the part is greater. Therefore The larger it is, the greater the part feature intensity of the part, which is convenient for distinguishing the key edge pixels in the part feature area.
[0024] Optionally, the steps of determining part defects according to the feature matching degree include:
[0025] Obtain the matching points corresponding to the edge pixels in the first point set of the standard image; obtain the feature matching degree corresponding to the matching points; obtain the feature matching degree difference according to the feature matching degree of the matching points; set the matching threshold; compare the feature matching degree difference with the matching threshold to determine part defects.
[0026] Optionally, the steps of obtaining the matching points corresponding to the edge pixels in the first point set of the standard image include: comparing the feature matching degrees between each edge pixel in the first point set of the standard image and each pixel in the first point set of the image to be detected;
[0027] Each edge pixel in the first point set of the standard image corresponds to multiple feature matching degrees. Take the edge pixel in the image to be detected with the largest feature matching degree in the standard image as the matching point.
[0028] Optionally, the steps of comparing the feature matching degree difference with the matching threshold to determine part defects include: in response to the absolute value of the feature matching degree difference among multiple matching points being greater than the matching threshold, determining that the part has defects.
[0029] Optionally, the steps of obtaining the feature matching degree difference include: calculating the mean value of the feature matching degrees corresponding to all the matching points in the image to be detected; calculating the difference between each matching point and the mean value to obtain the feature matching degree difference.
[0030] In a second aspect, the present application provides an intelligent monitoring system for a stamping line of special-shaped parts based on machine vision, adopting the following technical solutions:
[0031] An intelligent monitoring method and system for a stamping line of special-shaped parts based on machine vision, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned intelligent monitoring method for a stamping line of special-shaped parts based on machine vision is implemented.
[0032] Generate a computer program for the above-mentioned intelligent monitoring method of the stamping line for special-shaped parts based on machine vision and store it in a memory for being loaded and executed by a processor. Thus, a system is made according to the memory and the processor, which is convenient to use.
[0033] The present application has the following technical effects:
[0034] The material of the part and the characteristics of the key area affect the pixel points in the image to be detected. According to this feature, the edge pixel points of the part in the image to be detected are extracted, and the part feature intensity of the edge pixel points is calculated. The edge pixel points are divided into two different point sets according to the part feature intensity. The two point sets are: the first point set containing the edge pixel points with stronger part feature intensity and the second point set containing the edge pixel points with weaker part feature intensity. Construct the first descriptor and the second descriptor in the first point set to obtain the spatial distribution characteristics of the edge pixel points with higher and lower part feature intensities in the key feature area of the part. By comparing with the first descriptor and the second descriptor in the standard image, the defects of the part are determined. In the present application, the extraction of the part feature intensity can reduce the influence of the image background and noise. Combining the first descriptor and the second descriptor can realize the accurate monitoring of the part features. Description of the Drawings
[0035] Figure 1 is the method flow chart of the intelligent monitoring method of the stamping line for special-shaped parts based on machine vision in the present application.
[0036] Figure 2 is the method flow chart of step S1 of the intelligent monitoring method of the stamping line for special-shaped parts based on machine vision in the present application.
[0037] Figure 3 is the method flow chart of step S3 of the intelligent monitoring method of the stamping line for special-shaped parts based on machine vision in the present application.
[0038] Figure 4 is the example diagram of the sampling area division of the intelligent monitoring method of the stamping line for special-shaped parts based on machine vision in the present application. Detailed Embodiments
[0039] The embodiments of the present application disclose an intelligent monitoring method and system for the stamping line of special-shaped parts based on machine vision. The part feature intensity related to the workpiece features of the edge pixel points is obtained through the information of the edge pixel points in the image to be detected; the edge pixel points related to the part structure are screened out according to the physical signs intensity, and the background and noise interference in the background are eliminated. At the same time, multiple context descriptors of the edge pixel points are constructed to describe the features layer by layer, improving the robustness and accuracy of the system monitoring and enhancing the precision of the part process monitoring.
[0040] Refer to Figure 1, including steps S1 - S4:
[0041] S1: Obtain the edge pixel point information in the image to be detected, and calculate the part feature intensity of the edge pixel points.
[0042] The shape context algorithm is usually collected through the contour sampling points of the object in the image. The edge detection algorithm will collect the edges in the image background, and then the edges in the image background may be recognized as sampling points, which has a certain interference on the production monitoring of special-shaped parts. In order to reduce the influence of this phenomenon on the production monitoring of special-shaped parts, this application calculates the part feature intensity of the edge pixel points through the gray value, curvature, and anomaly score of the edge pixel points in the image.
[0043] Refer to Figure 2 , step S1 includes steps S10 - S13;
[0044] S10: Arrange the image acquisition device, and obtain the image to be detected of the special-shaped workpiece to be monitored through the image acquisition device.
[0045] S11: Obtain the edge pixel points of the object in the image to be detected;
[0046] Perform gray-scale processing on the image to be detected, obtain the gray value of each pixel point in the image to be detected, and obtain all the edge features in the image to be detected through the edge detection algorithm. The pixel points on the edge are used as the edge pixel points.
[0047] S12: Using the coordinates of the edge pixel points as features, calculate the anomaly score of each edge pixel point using the Isolation Forest algorithm.
[0048] S13: Calculate the part feature intensity according to the feature information of the edge pixel points; the calculation formula for the part feature intensity is:
[0049] ;
[0050] Among them, is the part feature intensity of any edge pixel point in the image, is the gray value of this edge pixel point, is the curvature of this edge pixel point, is the anomaly score of this pixel point, is the linear normalization function.
[0051] The special-shaped part is formed by metal stamping or bending. Metal products have a higher gray value in the image. Therefore, the greater the gray value of the edge pixel point, the more likely it is that the edge pixel point is on the part. In order to highlight the pixel points with prominent features on the part, the part feature intensity of this pixel point should be greater. The smaller the gray value, the less likely it is that the edge pixel point is on the part. In order to reduce the influence of the background part in the image on the part production monitoring, the part feature intensity of this pixel point should be smaller.
[0052] Special-shaped parts often have relatively unique structural features compared to conventional parts. If this feature in the image is missing, it can be judged that the stamping step of the part is missing. Therefore, the unique structural features of the special-shaped part can be used to calculate the part feature intensity for better part production monitoring. The unique features of the special-shaped part are manifested as the curvature of the edge in the image, and the curvature of the edge pixel point The greater the curvature, the more likely it is that the edge pixel point is at the complex edge in the image, and the more likely it is that the pixel point is at the unique structure of the part, and the greater the part feature intensity of this pixel point; the curvature of the edge pixel point The smaller the curvature, the less likely it is that the edge pixel point is at the complex edge in the image, and the smaller the part feature intensity of this pixel point.
[0053] The abnormal score of the edge pixel point reflects the degree of dispersion of the pixel point. The greater the abnormal score, the more isolated the pixel point is in the spatial distribution. The more isolated the pixel point is, the more likely it is that the edge pixel point is formed by the image background or noise. In order to reduce the influence of the background part in the image on the part production monitoring, the part feature intensity of this pixel point should be smaller. The abnormal score The smaller the abnormal score, the more concentrated the pixel point is in the spatial distribution. Since the pixel points on the part are concentratedly distributed, the edge pixel point is more likely to be on the part. In order to highlight the pixel points with unique features on the part, the part feature intensity of this edge pixel point should be greater.
[0054] Therefore The greater the value, the more likely it is that the pixel point is on the edge of the structural protrusion on the special-shaped part, and the greater the part feature intensity of the pixel point; The smaller the value, the less likely it is that the pixel point is on the edge of the structural protrusion on the special-shaped part, and the smaller the part feature intensity of the pixel point. For the convenience of subsequent calculation, a linear normalization function is used here to perform normalization processing.
[0055] In another embodiment, the calculation formula of the part feature intensity can also be expressed as:
[0056] ;
[0057] is the part feature intensity of any edge pixel point in the image, is the gray value of this edge pixel point, is the curvature of this edge pixel point, is the anomaly score of this pixel point, is the linear normalization function; is the gradient value of the pixel point.
[0058] In this formula, the gradient value of the pixel point reflects the change rate of this pixel point in the image. The larger the gradient value, the more it indicates that the pixel point corresponds to the area with a drastic change in brightness in the image, that is, the edge part of the object in the image. There may also be edges caused by noise in the image background. However, since the workpiece is usually photographed on a single background and the reflection of light is relatively consistent, the change in gray value in the background area is not large. Therefore, the gradient values of such edges are usually small. Therefore, the larger the gradient value the greater the possibility that the pixel point is on the special edge of the shaped part, and the greater the part feature intensity of this edge pixel point; the smaller the gradient value the smaller the possibility that the pixel point is on the special edge of the shaped part, and the greater the possibility that it is on the noise edge. Introducing the gradient value of the pixel point can, to a certain extent, suppress the noise interference in these non-part areas, so as to better focus on the key edges of the shaped part.
[0059] S2: Construct a first point set and a second point set according to the part feature intensity of the edge pixel points;
[0060] In one embodiment, the first point set and the second point set are constructed through the following steps:
[0061] It is necessary to sort the part feature intensities of multiple edge pixel points from large to small, and take the part of the edge pixel points with the largest part feature intensity according to a percentage to form the first point set; the remaining edge pixel points form the second point set. For example, if there are 100 edge pixel points, take (this percentage can be adjusted according to the actual situation), then 20 edge pixel points with the top part feature intensity are obtained, and these 20 edge pixel points form the first point set, and the other 80 edge pixel points form the second point set.
[0062] In another embodiment, the first point set and the second point set are constructed through the following steps:
[0063] Use the k-means clustering algorithm to divide the edge pixel points; in this embodiment, the edge pixel points are divided into two categories, and the category with a higher average feature intensity is used as the first point set, and the other category is used as the second point set.
[0064] By clustering, the edge pixels are divided into two categories, forming a point set with different characteristic intensity levels. This method is more targeted and improves the effectiveness and accuracy of part feature extraction.
[0065] S3: Construct the first descriptor and the second descriptor for the edge pixels in the first point set, and calculate the feature matching degree between the pixels in the first point set of the image to be detected and the standard image.
[0066] Refer to Figure 3 , step S3 includes steps S30 - S32.
[0067] S30: Divide the sampling area; construct concentric circles with the edge pixel as the center; use the radial direction of the concentric circles as the dividing line, and divide the concentric circles into parts along the circumferential direction of the concentric circles, and finally obtain sampling areas around the edge pixel. Combining Figure 4 , in this embodiment, , .
[0068] The radii of the concentric circles are equally divided within a certain range. For example, when it is necessary to construct 4 concentric circles with the minimum radius of 10 and the maximum radius of 100, the radii of the four concentric circles are 10, 40, 70, and 100 respectively.
[0069] S31: Construct the descriptor;
[0070] Calculate the number of edge pixels belonging to the first point set in each sampling area;
[0071] Calculate the number of edge pixels belonging to the second point set in each sampling area;
[0072] Normalize the number of edge pixels belonging to the first point set in each area to obtain the value of the position of the corresponding sampling area in the first descriptor of the edge pixels.
[0073] Normalize the number of edge pixels belonging to the second point set in each area to obtain the value of the position of the corresponding sampling area in the second descriptor of the edge pixels.
[0074] The method of normalization is to divide the number of pixels belonging to the first point set or the second point set in the sampling area by the number of pixels belonging to the first point set or the second point set in all sampling areas corresponding to the edge pixel.
[0075] Combining Figure 4, taking an edge pixel point in a first point set as an example, the surrounding area is divided into 48 sampling areas, and the concentric circles are numbered circumferentially from 1 to 12; the areas corresponding to the concentric circles are numbered radially as A, B, C, and D. Calculate the number of pixel points belonging to the first point set in each sampling area and sum them up. Suppose the sum is 100, and there are 5 pixel points belonging to the first point set in this pixel point in the sampling area, then the position in the first descriptor corresponding to the sampling area is =0.05.
[0076] S32: Calculate the feature matching degree;
[0077] The calculation of the first descriptor and the second descriptor of the edge pixel points in the first point set of the standard image is the same as that of the first descriptor and the second descriptor in the image to be detected, which will not be elaborated here.
[0078] The calculation formula for the feature matching degree between the edge pixel points in the first point set of the image to be detected and the edge pixel points in the first point set of the standard image is:
[0079] ;
[0080] is the feature matching degree between the th pixel point in the first point set of the image to be detected and the th pixel point in the first point set of the standard image, is the first descriptor of the th pixel point in the first point set of the image to be detected; is the second descriptor of the th pixel point in the first point set of the image to be detected; is the first descriptor of the th pixel point in the first point set of the standard image; is the second descriptor of the th pixel point in the first point set of the standard image; is the information entropy of the gray values of the pixel points in the first point set of the standard image; is the information entropy of the gray values of the pixel points in the second point set of the standard image; is the cosine similarity function; is and the cosine similarity between; is and the cosine similarity between.
[0081] represents the similarity degree of the edge pixel points in the first point set of the image to be detected and the edge pixel points in the first point set of the standard image on the first descriptor. The larger this value, the more similar the th pixel point in the image to be detected and the th pixel point in the standard image are in terms of features with high part feature intensity, and thus the feature matching degree between the two points is greater. Similarly, the smaller this value, the greater the difference between the th pixel point in the image to be detected and the th pixel point in the standard image in terms of features with high part feature intensity, and the smaller the feature matching degree between the two points. For the convenience of calculation, here is normalized by adding 1 and then dividing by 2.
[0082] is used to determine the weights of different context descriptors in the calculation of feature matching degree; The larger it is, the more complex the feature distribution of the first point set, the richer the information content, and the more valid information it contains. Consequently, the greater the influence of the first descriptor generated by the first point set on the matching correctness, the greater the weight. Similarly The smaller it is, the more single the feature distribution of the first point set, the poorer the information content, and the less valid information it contains, then the smaller the influence of the first descriptor generated by the first point set on the matching correctness, the smaller the weight.
[0083] and are the same for the calculation of feature matching degree and and , and will not be elaborated here.
[0084] In another embodiment, the calculation formula of feature matching degree is: ;
[0085] is the feature matching degree between the th pixel point in the first point set of the image to be detected and the th pixel point in the first point set of the standard image, and are respectively the first descriptor and the second descriptor of the th pixel point in the first point set of the image to be detected; and are respectively the first descriptor and the second descriptor of the th pixel point in the first point set of the standard image; and are respectively the information entropy of the gray values of the pixel points in the first point set of the standard image and the information entropy of the gray values of the pixel points in the second point set; The cosine similarity function between and is an exponential function with base .
[0086] In this formula, is introduced. According to the difference in the feature intensity of pixel points, the feature matching degree is adjusted. If and are close, then is close to 1, and the influence on the feature matching degree is small. Similarly, if and have a large difference, becomes smaller, reducing the feature matching degree, enabling the feature matching degree to accurately reflect the part feature differences and improving the detection accuracy of special-shaped parts.
[0087] S4: Determine part defects according to the feature matching degree;
[0088] Obtain the matching points corresponding to the edge pixel points in the first point set of the standard image according to the feature matching degree:
[0089] Compare the feature matching degrees between each edge pixel point in the first point set of the standard image and each pixel point in the first point set of the image to be detected; each edge pixel point in the first point set of the standard image corresponds to multiple feature matching degrees.
[0090] Take the edge pixel point in the image to be detected with the largest feature matching degree with the standard image as the matching point.
[0091] Obtain the feature matching degree corresponding to this matching point, and obtain the difference in feature matching degree according to the feature matching degree of the matching point;
[0092] Calculate the mean value of the feature matching degrees corresponding to all matching points in the image to be detected, denoted as ;
[0093] Calculate the absolute value difference between each matching point and the mean value to obtain the difference in feature matching degree corresponding to the matching point.
[0094] Set a matching threshold, and compare the difference in feature matching degree with the matching threshold to determine part defects.
[0095] When the absolute value of the difference in feature matching degree among multiple matching points is greater than the matching threshold, it is determined that the part has a defect. In this embodiment, the matching threshold is 0.1C. During the part monitoring process, when the difference in feature matching degree corresponding to multiple matching points is greater than 0.1C, the system alarms and the staff can review it in time.
[0096] The embodiment of the present application also discloses an intelligent monitoring system for a stamping line of special-shaped parts based on machine vision, which includes a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the intelligent monitoring method for the stamping line of special-shaped parts based on the present application is realized.
[0097] The above system also includes other components well-known to those skilled in the art, such as a communication bus and a communication interface. Their settings and functions are known in the art, so they will not be described in detail here.
[0098] The above are all the preferred embodiments of the present application. The protection scope of the present application is not limited thereby. Therefore, all equivalent changes made according to the structure, shape, and principle of the present application shall be covered within the protection scope of the present application.
Claims
1. An intelligent monitoring method for a special-shaped parts stamping line based on machine vision, characterized in that: The method includes the following steps: obtaining edge pixel information in the image to be detected, and calculating the part feature intensity of the edge pixel. The calculation formula is: ; In the formula is the part feature intensity of any edge pixel in the image, is the gray value of the edge pixel, is the curvature of the edge pixel, To calculate the anomaly score of edge pixels using the isolation forest algorithm, is a linear normalization function; is the pixel gradient; Constructing a first point set and a second point set according to the part feature strength of edge pixels, the construction method comprising: sorting the part feature strengths of multiple edge pixels from large to small, taking the edge pixels with the largest part feature strengths according to percentage to form the first point set, and the remaining edge pixels to form the second point set; Constructing the first descriptor and the second descriptor of the edge pixel points in the first point set, the construction steps include: Divide the sampling area; construct descriptors: calculate the number of edge pixels belonging to the first point set in each sampling area, and perform normalization processing to obtain the first descriptor of the edge pixel; calculate the number of edge pixels belonging to the second point set in each sampling area, and perform normalization processing to obtain the second descriptor of the edge pixel; and calculating the feature matching degree between the edge pixel points in the first point set of the image to be detected and the edge pixel points in the first point set of the standard image; and determining the part defect according to the feature matching degree; The calculation formula of feature matching is: ; In the formula, is the first point in the image to be detected. The edge pixel point and the first point in the standard image are The feature matching degree of edge pixels is is the first point in the image to be detected. The first descriptor of edge pixels; is the first point in the image to be detected. The second descriptor of edge pixels; is the first point in the standard image. The first descriptor of edge pixels; is the first point in the standard image. The second descriptor of edge pixels; is the information entropy of the grayscale values of edge pixels in the first point set of the standard image; is the information entropy of the grayscale values of edge pixels in the second point set of the standard image; is the cosine similarity function.
2. The intelligent monitoring method for special-shaped parts stamping line based on machine vision according to claim 1 is characterized in that: The method for dividing the sampling area includes: constructing multiple concentric circles with different radii with edge pixels as the center; The concentric circles are evenly divided into multiple parts along the circumferential scale to form multiple sampling areas.
3. The intelligent monitoring method for special-shaped parts stamping line based on machine vision according to claim 1 is characterized in that: The steps to determine part defects based on feature matching include: Obtain a matching point corresponding to an edge pixel point in a first point set in a standard image; obtain a feature matching degree corresponding to the matching point; obtain a feature matching degree difference according to the feature matching degree of the matching point; set a matching threshold; and compare the feature matching degree difference with the matching threshold to determine a part defect.
4. The intelligent monitoring method for special-shaped parts stamping line based on machine vision according to claim 3 is characterized in that: The step of acquiring matching points corresponding to edge pixel points in the first point set in the standard image comprises: comparing the feature matching degree between each edge pixel point in the first point set in the standard image and each edge pixel point in the first point set in the image to be detected; Each edge pixel point in the first point set of the standard image corresponds to multiple feature matching degrees, and the edge pixel point in the image to be detected with the maximum feature matching degree in the standard image is taken as the matching point.
5. The intelligent monitoring method for special-shaped parts stamping line based on machine vision according to claim 4 is characterized in that: The step of comparing the feature matching degree difference with the matching threshold to determine the part defect includes: in response to the absolute value of the feature matching degree difference among multiple matching points being greater than the matching threshold, determining that the part has a defect.
6. The intelligent monitoring method for special-shaped parts stamping line based on machine vision according to claim 5 is characterized in that: The step of obtaining the feature matching degree difference includes: calculating the mean value of the feature matching degrees corresponding to all matching points in the image to be detected; and calculating the difference between each matching point and the mean value to obtain the feature matching degree difference.
7. An intelligent monitoring system for special-shaped parts stamping line based on machine vision, characterized in that: 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 intelligent monitoring method for a special-shaped part stamping line based on machine vision according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Edge defect detection method and device, model, equipment and readable storage medium
CN111369545A
Method for quickly sorting defective workpieces through parallel robot
CN113102297A