Stamping part defect detection method based on optical screening image processing
By adjusting the monitoring area of the machine vision equipment and generating standard images and comparison models, the relative position and optimality of stamping parts are calculated, and the existing stamping part defect detection methods are solved, and efficient and accurate detection results are achieved.
Patent Information
- Application Number
- CN202510436880.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-05-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing stamping parts defect detection methods are inefficient and have poor accuracy, and the monitoring probe is prone to damage, so it is impossible to effectively detect problems in the center point position acquisition caused by irregular shape machining parts and machining defects.
By adjusting the monitoring area of the machine vision equipment, setting a rectangular detection area and acquisition area, generating a standard image and a control model, calculating the relative position and optimal points of the machining parts, making offset, pouring and deformation judgments, and adjusting the monitoring probe based on the judgment results to improve detection accuracy.
It improves the efficiency and accuracy of stamping defect detection, reduces the risk of damage of monitoring probes, and can accurately determine the offset, pour and deformation of the machining parts, improving the reliability of detection.
Smart Images

Figure CN119985517A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of stamping part processing, and in particular to a stamping part defect detection method based on optical screening image processing. Background Art
[0002] During the relevant inspection process of stamping parts, in the initial stage of transmission, the position of the stamping parts on the conveyor belt will be offset due to the working oscillation relationship of certain working components. Since the changed position of the stamping parts is not determined, the acquisition direction of the corresponding probe cannot be determined, which will lead to differences in the clarity of the acquired stamping parts images. As a result, the image comparison accuracy of some stamping parts is poor during the subsequent image comparison. A stamping parts defect detection method is disclosed in the invention patent with application number CN. By limiting the relevant inspection area, based on the real-time acquired stamping parts surface image, it is preferentially identified whether the center point of the stamping parts is aligned with the midpoint of the inspection area, which solves the problem that the original probe cannot be moved based on the specific position of the stamping parts to ensure the accuracy of image comparison.
[0003] Although this defect detection method has the above advantages, it still has certain defects in actual use; first, photographing and analyzing the workpiece in the rectangular detection area requires a large number of calculation steps and calculation practices. However, the conveyor belt continuously transports the workpiece, which not only requires the monitoring probe to be adjusted quickly, which easily causes damage to the monitoring probe, but also has the problem of poor accuracy in photographing the surface of the workpiece after adjustment. Secondly, when comparing offset workpieces, the problem of difficulty in calculating the center point of irregular-shaped workpieces is not considered, and there are processing defects in the workpiece, which affects the acquisition of the center point position. Therefore, it leads to low efficiency and poor accuracy in actual detection and easy damage to the monitoring probe, which needs to be solved. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention provides a stamping part defect detection method based on optical screening image processing, which solves the problems of low efficiency, poor accuracy and easy damage to monitoring probes when implementing the existing stamping part defect detection method.
[0005] To achieve the above objectives, the present invention is implemented through the following technical solutions: a stamping part defect detection method based on optical screening image processing, specifically comprising the following steps: S1. Adjust the monitoring area of the machine vision equipment so that it covers the surface of the conveyor belt, and set a rectangular detection area in the monitoring area, generate a standard image of the standard punch corresponding to the surface to be detected, set the standard image in the rectangular detection area to form a comparison model, and generate a collection area based on the rectangular detection area; S2, photographing the workpiece in the acquisition area to obtain a plane image, so as to obtain its shape, size and relative position of the plane image in the acquisition area; S3, according to the relative position of the workpiece in the acquisition area, by comparing it with the relative position of the reference model in the acquisition area, determine whether the workpiece is offset, tilted, and deformed, and mark it as a offset part, a tilted part, and an error part respectively; S4. According to the obtained lateral offset distance and offset angle values of the workpiece, the monitoring probe inside the machine vision device is adjusted accordingly, so that the workpiece moves to the rectangular detection area and coincides with the standard image, and then the monitoring probe takes a picture of the surface of the workpiece for defect detection.
[0006] Preferably, in step S1, the specific method of generating the rectangular detection area and the collection area is: S11, obtaining the geometric center point of the rectangular detection area, and adjusting the monitoring probe so that its focus point coincides with the geometric center point; S12, generate a standard image of the front side corresponding to the surface to be inspected of the standard punching part, and obtain the positions of the corner points Bi and the optimal point on the surface to be inspected, where i=1, 2, 3, ..., n, n is a positive integer, and n represents that there are a total of n corner points on the surface, and obtain the length value of the line segment between the optimal point and each corner point Bi; S13, by aligning the optimal point of the standard image on the front side with the geometric center point and aligning with the focus point, a control model is formed in the rectangular detection area, and then the control model is locked in the monitoring area; S14, between the transmission start position and the rectangular detection area, copy the rectangular detection area with the reference model to form a collection area, and set a high-definition camera with a shooting range covering the collection area.
[0007] Preferably, the point corresponding to the minimum sum of the lengths of the line segments between the corner points Bi on the standard image in step S13 is the optimal point.
[0008] Preferably, the specific method of obtaining the relative position of the workpiece in the collection area in step S2 is: S21, placing the workpiece on a conveyor belt and conveying it to a collection area, and a high-definition camera photographs the surface of the workpiece to obtain a planar image; S22, establish a plane coordinate system, and obtain the relative position of the workpiece corner point Cj in the acquisition area and the corresponding coordinate value, where j=1, 2, 3, ..., m, m is a positive integer, and m indicates that there are a total of m corner points on the surface of the workpiece; S23. According to the coordinate value of the workpiece corner point Cj, the optimal point on the workpiece surface and its corresponding coordinate value are obtained on the plane image using the same processing method as the control model.
[0009] Preferably, in step S3, the specific method for determining whether the workpiece is offset, tilted, or deformed is as follows: S31, obtaining the line segment length value Lj between the optimal point of the workpiece and the corner point Cj, and obtaining the line segment length value Si between the optimal point of the reference model and the corner point Bi, and comparing the values and quantities corresponding to Lj and Si respectively. If the values and quantities are equal, it indicates that the workpiece has not been deformed, and the next step of analysis is carried out. Otherwise, it indicates that the workpiece has been deformed, and it is marked as a defective product for further analysis; S32, obtaining the coordinate value of the optimal point of the reference model in the acquisition area, and comparing the lateral coordinate values of the optimal point of the workpiece and the reference model to see whether they are the same. If they are the same, it indicates that the workpiece has not shifted. Otherwise, the workpiece is marked as a shifted part. S33, calculating the difference between the transverse coordinate values of the optimal points of the reference model and the offset part in the acquisition area, and obtaining the transverse offset distance value of the offset part. If the workpiece is not offset, this step is not performed; S34. Adjust the offset part and the optimal point of the reference model to coincide in the acquisition area, obtain the coordinate value of the corner point Bi on the surface of the reference model after the offset, and calculate the angle between the line segment corresponding to the corner point Cj and the line segment corresponding to the corner point Bi about the optimal point according to the coordinate values of the corner points Cj and Bi and the corresponding line segment length values Lj and Si, which is the offset angle value θi of the offset part, and obtain all the offset angle values θi corresponding to Cj for verification.
[0010] Preferably, in step S31, the specific method for re-analyzing the defective product is: S311, obtaining standard images of other sides of the standard punching part, and calculating the corresponding optimal point position, the position and number of corner points, and the length value of the line segment between the corner point and the optimal point according to the obtained standard images of the side; S312, selecting a standard image of one side and comparing it with the plane image of the defective product. If the optimal point position, the position and number of corner points of the standard image of the side and the plane image, and the number and value of the length of the line segments between the corner points and the optimal point are all equal, it indicates that the defective product has a tipping problem, and the defective product is marked as a tipping part. Otherwise, it indicates that the defective product has a processing error, and the defective product is marked as an error part. S313, taking the same treatment method as that for one of the side faces, respectively compare the standard images of the remaining side faces with the plane images of the defective product, and determine whether the defective product is a tilted part or an error part. If the determination in step S312 is completed, this step is not performed; S314, if the defective product is found to be an error part after comprehensive comparison, a screening signal is generated to remove the error part from the conveyor belt; S315. If the defective product is found to be a tilted part after comprehensive comparison, a flip signal is generated to flip the tilted part so that the surface to be inspected faces upward, and then a plane image of the surface to be inspected is acquired by photographing, and the relative position of the plane image in the acquisition area is acquired.
[0011] Preferably, the specific adjustment method of the monitoring probe in step S4 is: S41, the focus point of the monitoring probe moves laterally according to the offset distance value, and the reference model in the rectangular detection area follows the movement, so that the reference model and the optimal point of the offset member are at the same horizontal coordinate; S42, the focus point of the monitoring probe carries the control model and rotates with the optimal point as the center and according to the offset angle value θi; S43. Based on the consistency between the offset angle value θi and the lateral offset distance value, after the offset part is overlapped with the reference model, the monitoring probe takes a picture of the surface of the offset part and performs surface defect detection.
[0012] Preferably, S5, count the number of offset parts in the inspected workpieces, tilted parts in the defective products, and error parts, and generate a corresponding error signal when the number exceeds a threshold, and repair the corresponding mechanical equipment.
[0013] Preferably, in step S5, the specific method of generating the error signal is: S51, obtaining thresholds β1 and β2, wherein the values of β1 and β2 are preset by production personnel; S52, in a unit time, compare the sum of the real-time numbers of offset parts and dumped parts with the threshold value β1. If it is greater than the threshold value β1, generate an error signal and transmit it to the management background to remind the maintenance personnel to repair the conveyor belt; S53, within a unit time, the real-time number of error parts is compared with the threshold value β2. If the number is greater than the threshold value β2, an error signal is generated and transmitted to the management background to remind the maintenance personnel to repair the stamping equipment; S54, and record the locations of the offset parts and defective products, and analyze the operating conditions of the mechanical equipment based on the distribution of the offset parts and defective products.
[0014] Preferably, in step S54, the specific analysis method of the operating status of the mechanical equipment is: S541, marking the workpiece as Gx, where x=1, 2, 3, ..., d, where d is the number of workpieces, and G1 represents the first workpiece, and Gd represents the dth workpiece; S542, marking the offset component, the tipping component and the error component as Rx, Px and Kx respectively, and obtaining the specific value corresponding to x in the offset component Rx, the tipping component Px and the error component Kx; S543, establish a number axis, obtain d nodes set at equal distances in the positive direction of the number axis with the value of x, calibrate the offset part Rx, the tipping part Px, and the error part Kx on the corresponding nodes with the specific value of x, set a standard interval, and then move one side of the standard interval by aligning with the origin of the number axis, node 1, node 2, etc., respectively, until the other side of the standard interval is aligned with node d, and count the total number of error parts Kx in the standard interval during each movement, and take the position corresponding to when the number of error parts Kx in the standard interval is greater than or equal to the threshold β as the concentration range; S544, obtaining a ratio corresponding to the error part Kx according to the total number of processed parts Gx in a single concentrated range and the number of error parts Kx, and obtaining the ratios corresponding to the error parts Kx in different concentrated ranges. If the ratio is less than 10%, a common error signal is generated to remind the maintenance personnel, otherwise a risk error signal is generated to remind the maintenance personnel; S545. Use the same processing method for the error part Kx to obtain the ratio of the sum of the number of offset parts Rx and dumped parts Px to the total number of processed parts Gx in different concentration ranges. If the ratio is less than 10%, a normal error signal is generated to remind the maintenance personnel. Otherwise, a risk error signal is generated to remind the maintenance personnel.
[0015] Beneficial Effects The present invention provides a stamping part defect detection method based on optical screening image processing. Compared with the prior art, it has the following beneficial effects: (1) By setting up additional acquisition areas along the conveying direction to calculate the relative position of the workpiece, sufficient time can be provided for the monitoring probe in the machine vision equipment to make corresponding adjustments, thus avoiding the problem of damage to the monitoring probe caused by sudden adjustment. In addition, by pre-adjusting the position of the monitoring probe to match the workpiece, the accuracy of the workpiece surface imaging can be improved.
[0016] (2) By counting the positions and numbers of the corner points of the workpiece, calculating the position of the optimal point, and calculating the length of the line segment from the optimal point to the corner point, and comparing it with the standard model of the standard punching part, it is possible to accurately determine whether the workpiece is normal, whether it is an error part, an offset part, or a tilted part, and obtain accurate offset distance and angle values, so that the monitoring probe can drive the standard model to accurately adjust the corresponding position and angle.
[0017] (3) By counting the number of error parts, offset parts and tipped parts in the workpiece and obtaining their distribution, a corresponding error signal can be generated to remind maintenance personnel to repair the corresponding equipment, thereby reducing the number of error parts, offset parts and tipped parts, thereby improving the production quality, detection efficiency and detection accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a schematic diagram of the method flow of the present invention; Figure 2 It is a schematic diagram for determining the relative positions of the workpieces of the present invention. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] See also Figure 1-2 The present invention provides a technical solution: a stamping part defect detection method based on optical screening image processing: As the first embodiment of the present application, it specifically includes: S1. Obtain the position of the conveyor belt, adjust the monitoring area of the machine vision equipment and make it cover the surface of the conveyor belt, and set a relatively fixed rectangular detection area in the monitoring area, and align the two sides of the rectangular detection area with the two sides of the conveyor belt, obtain the shape and size of the surface to be detected of the standard punching part and generate a standard image, and set the standard image of the front side in the overlapping area of the rectangular detection area and the monitoring area to form a reference model, and copy the rectangular detection area with the reference model between the starting conveying position on the conveyor belt surface and the rectangular detection area to form a fixed collection area. The specific method is as follows: S11, obtaining the ground position of the conveyor belt, and adjusting the monitoring area of the machine vision device according to the position information of the conveyor belt so that it covers the surface of the conveyor belt used to transmit the workpiece; S12. On the surface of the conveyor belt used to transport the workpiece, a rectangular detection area is set with a fixed position and aligned with both sides thereof, and the rectangular detection area is within the monitoring area. Then, the position of the geometric center point of the rectangular detection area is obtained according to the shape and size of the rectangular detection area, and the monitoring probe is positioned and adjusted according to the position of the geometric center point, so that the focus point of the monitoring probe coincides with the geometric center point of the rectangular detection area; S13, obtaining the shape and size of the surface to be tested of the standard punching part and generating a standard image of the front side, and obtaining the position of the corner point Bi on the surface according to the standard image of the front side, wherein i=1, 2, 3, ..., n, n is a positive integer, and n indicates that there are n corner points on the surface in total, and they are marked as B1, ..., Bn in clockwise order, wherein the corner points are points corresponding to the corners on the surface to be tested of the standard punching part, and then selecting a point on the surface to be tested of the standard punching part as the optimal point, and obtaining the length value of the line segment between the optimal point and each corner point Bi; S131, the optimal point is selected by dividing the surface of the standard punch to be tested into a number of independent areas of equal size, and generating a point to be selected in each independent area, and the point to be selected covers the independent area corresponding to it, so as to obtain a number of points to be selected; S132, connecting one of the to-be-selected points with the corner point Bi to obtain n line segments, and summing the lengths of the n line segments to obtain a total distance value; S133, using the same processing method for the candidate point, obtaining the distance sum values corresponding to the remaining candidate points, and selecting the candidate point corresponding to the minimum value among several groups of distance sum values as the optimal point; When the workpiece surface is a regular shape such as a circle, an ellipse, or a regular polygon, the geometric center point of the surface is the optimal point of the workpiece surface; S14. The standard image of the front side is set in the rectangular detection area to form a control model by coinciding the optimal point with the geometric center point, and the control model is located in the rectangular detection area as a whole. Then, the control model is locked in the monitoring area by coinciding the optimal point with the focal point of the monitoring probe, so that when the focal point of the monitoring probe moves, the control model follows the synchronous movement by locking the optimal point and the focal point.
[0021] S15. On the surface of the conveyor belt used to transfer the workpiece, and between the starting position of the transfer and the rectangular detection area, copy the rectangular detection area with the reference model to form a fixed collection area, and set a corresponding high-definition camera outside the conveyor belt, and the shooting range of the high-definition camera covers the collection area.
[0022] S2. Mark the punched workpiece to be inspected after processing as a processed workpiece, place the workpiece on a conveyor belt with the surface to be inspected facing upward, and transfer the workpiece to the collection area via the conveyor belt. A high-definition camera takes a picture of the surface to be inspected of the workpiece to obtain a plane image, so as to collect its shape and size, and obtain the relative position of the plane image in the collection area: S21, placing the workpiece with the surface to be inspected facing upward on the conveyor belt surface, and when the conveyor belt completely conveys the workpiece to the collection area, a high-definition camera takes a picture of the surface of the workpiece to obtain a planar image; S22, generate a plane coordinate system with an edge corner of the acquisition area as the starting position (the plane coordinate system is generated with the conveying direction of the conveyor belt as the longitudinal direction and the width of the conveyor belt as the transverse direction), and obtain the relative position of the workpiece corner point Cj in the acquisition area according to the plane image, and then obtain its corresponding coordinate value through the relative position of the corner point Cj, where j=1, 2, 3, ..., m, m is a positive integer, and m indicates that there are a total of m corner points on the surface of the workpiece, and they are marked as C1, ..., Cm in clockwise order; S23. According to the coordinate value of the workpiece corner point Cj, the same processing method as the control model is adopted to obtain the optimal point on the workpiece surface and the coordinate value corresponding to the optimal point on the plane image.
[0023] S3. According to the relative position of the workpiece in the acquisition area, by comparing it with the relative position of the reference model in the acquisition area, it is determined whether the workpiece is offset, tilted or deformed. The specific determination method is as follows: S31, obtaining the line segment length value Lj between the optimal point of the workpiece and the corner point Cj, and obtaining the line segment length value Si between the optimal point of the reference model and the corner point Bi, respectively comparing the values and quantities corresponding to the line segment length value Lj and the line segment length value Si, if the values and quantities of the line segment length values are one-to-one corresponding, it indicates that the workpiece has not been deformed, and the workpiece is further analyzed, otherwise it indicates that the workpiece has been deformed, and it is marked as a defective product and no surface defect detection is performed, and the defective product is re-analyzed to determine whether the defective product has a rollover, resulting in the problem that the collected surface is inconsistent with the surface of the reference model in shape and size; S311, obtaining standard images of other sides of the standard punching part, and calculating surface information on the other sides according to the obtained standard images of the sides, the surface information including the optimal point position corresponding to a single side, the position and number of corner points, and the length value of the line segment between the corner point and the optimal point; S312, selecting the surface information of one side and comparing it with the plane image of the defective product, if the position of the optimal point in the standard image surface information of the side and the position and number of the corner points in the plane image surface information are equal, as well as the number and value of the length of the line segments between the corner points and the optimal point, it indicates that the defective product has a tipping problem, and the defective product is marked as a tipping part; otherwise, it indicates that the defective product has a processing error, and the defective product is marked as an error part; S313, taking the same treatment method as that for one of the side faces, respectively compare the standard images of the remaining side faces with the plane images of the defective product, and determine whether the defective product is a tilted part or an error part. If the determination in step S312 is completed, this step is not performed; S314. If the defective product is an error part after comprehensive comparison, a screening signal is generated and transmitted to an external robotic arm, and the error part is removed from the conveyor belt by the robotic arm; S315. If after comprehensive comparison, the defective product is found to be a tilted part, a flipping signal is generated and transmitted to an external robotic arm. Then, according to the relative position of the collected surface and the surface to be detected of the tilted part, the tilted part is flipped over by the robotic arm so that the surface to be detected of the tilted part faces upward. Then, a high-definition camera is used to take a picture of the surface to be detected of the tilted part to obtain a plane image again and obtain the relative position of the plane image in the collection area.
[0024] S32, performing offset determination on the workpiece that has not been deformed, specifically in the following manner: Obtain the coordinates of the optimal point of the reference model in the acquisition area, and compare the lateral coordinate value of the optimal point of the workpiece with the lateral coordinate value of the optimal point of the reference model in the acquisition area to see if they are the same. If they are the same, it indicates that the workpiece has not shifted. Otherwise, it indicates that the workpiece has shifted and is marked as a shifted part. S33, according to the lateral coordinate value of the optimal point of the reference model in the acquisition area and the lateral coordinate value of the optimal point of the offset part, by calculating the difference between the two, the lateral offset distance value of the offset part is obtained, if the workpiece is not offset, this step is not performed; S34. Based on the acquired lateral offset distance value of the offset part, the reference model and its optimal point in the acquisition area are moved laterally according to the lateral offset distance value, and the longitudinal coordinate values of the reference model and its optimal point are adjusted synchronously, so that the offset part and the optimal point of the reference model in the acquisition area coincide with each other, and the coordinate value of the corner point Bi on the surface of the reference model in the acquisition area after the offset is acquired. According to the coordinate values of the corner points Cj and Bi and the corresponding line segment length values Lj and line segment length values Si, the angle value between the line segment corresponding to the corner point Cj and the line segment corresponding to the corner point Bi about the optimal point is calculated, which is the offset angle value θi of the offset part, and the offset angle values θi corresponding to all Cj are acquired for verification.
[0025] For example: when the optimal points of the reference model and the offset part in the acquisition area coincide, there are 5 corner points on the surfaces of the reference model and the offset part, where the corner points Bi of the reference model and their corresponding line segment length values Si are recorded as (B1, 10), (B2, 7), (B3, 8), (B4, 6), (B5, 9), respectively; and the initial corner points Cj of the offset part and their corresponding line segment length values Lj are obtained as (C1, 7), (C2, 8), (C3, 6), (C4, 9), (C5, 10), select Compare the two corner points with the same length of line segment value corresponding to the two corner points. Take (B2, 7) and (C1, 7) as examples. At this time, the Cj corresponding to the workpiece is re-marked to form (C1, 10), (C2, 7), (C3, 8), (C4, 6), (C5, 9), and then the offset angle value of the offset part around the optimal point is calculated using the coordinate values corresponding to (B1, C1), (B2, C2), (B3, C3), (B4, C4), and (B5, C5). The specific calculation method is: In the first step, the coordinates of the optimal point, corner point B1 and corner point C1 are recorded as A (x1, y1), B (x2, y2), and C (x3, y3), respectively, and the included angle θ between line segment AB and line segment AC is obtained, which is the lower offset value θi of the offset component; Step 2: Calculate the coordinates of vector AB and vector AC according to the vector formula. , ; Step 3: Calculate the vector dot product and vector modulus: According to the formula , get the vector dot product; According to the formula and , get the vector modulus; Step 4: Use the vector dot product formula to calculate the angle θ (offset angle value): According to the vector motor formula , derive the formula , Then through the inverse cosine function formula , find the offset angle value, and the range of the offset angle value is (0, π).
[0026] As the second embodiment of the present application, it specifically includes: S4. According to the obtained lateral offset distance value and offset angle value, the monitoring probe inside the machine vision device is adjusted accordingly, so that the reference model in the rectangular detection area moves to the motion path of the offset part, and after the workpiece moves to the rectangular detection area and overlaps with the standard image, the monitoring probe takes a picture of the surface of the workpiece for defect detection. The specific adjustment method is as follows: S41, according to the obtained lateral offset distance value of the offset part, the focus point of the monitoring probe moves laterally, and the reference model follows the movement within the rectangular detection area, so that the optimal point of the reference model and the optimal point of the offset part are on the same lateral coordinate. If the optimal point of the workpiece is not offset, this step is not performed; S42, after the lateral coordinate value of the optimal point of the reference model in the rectangular detection area is the same as the lateral coordinate value of the optimal point of the offset member, according to the offset angle value θi of the offset member obtained, the focus point of the monitoring probe carrying the reference model is rotated with the optimal point as the center according to the offset angle value θi. If the offset angle value θi is zero, this step is not performed; S43. Based on the consistency between the offset angle value θi and the lateral offset distance value, after the offset part is completely overlapped with the reference model through the conveyor belt, the monitoring probe takes photos to collect surface information of the offset part and performs surface defect detection on the processed part.
[0027] When the workpiece moves between the collection area and the rectangular detection area, it not only provides sufficient time to analyze the relative position information of the workpiece, but also provides sufficient time for the monitoring probe to adjust the focus position and angle based on the pre-acquired relative position information of the workpiece, thereby ensuring the timeliness and accuracy of the surface information collection of the workpiece.
[0028] As the third embodiment of the present application, it specifically includes: S5. Obtain the real-time number of inspected workpieces, and obtain the number of offset parts in the number of workpieces, tilted parts in the defective products, and error parts, and then decide whether to generate a corresponding error signal according to the number, and repair the corresponding mechanical equipment; S51, obtaining thresholds β1 and β2, wherein the values of β1 and β2 are pre-set by production personnel based on the number of offset parts and defective products in previous batches and industry standards; S52, in a unit time, the real-time number of offset parts and dumped parts is compared with the threshold value β1 respectively. If it is less than the threshold value β1, no processing is performed. If it is greater than the threshold value β1, an error signal is generated and transmitted to the management background to remind the maintenance personnel to repair the conveyor belt; S53, in a unit time, compare the real-time number of error parts with the threshold value β2. If it is less than the threshold value β2, no processing is performed. If it is greater than the threshold value β2, an error signal is generated and transmitted to the management background to remind the maintenance personnel to repair the stamping equipment. Maintenance personnel set corresponding unit time for stamping equipment and conveyor belts as inspection standards according to the workpiece yield rate standard and equipment maintenance manual, as well as the efficiency requirements and standards for defect detection, so as to determine whether the stamping equipment and conveyor belts need to be repaired by calculating the quantity in the corresponding unit time; S54. Count the total inspection time, and record the locations of the offset parts and defective products. Analyze the operating conditions of the mechanical equipment based on the distribution of the offset parts and defective products. S541, marking the workpiece as Gx, where x=1, 2, 3, ..., d, where d is a positive integer, indicating that there are d workpieces in total, and G1 indicates the first workpiece, and Gd indicates the dth workpiece, for stacking and inspecting the workpiece Gx according to the processing sequence; S542, counting the offset parts, tilted parts and error parts in the processed part Gx, marking them as Rx, Px and Kx respectively, and obtaining the specific value corresponding to x in the offset part Rx, the tilted part Px and the error part Kx; S543, establish a number axis, obtain d nodes set at equal distances in the positive direction of the number axis with the value of x, calibrate the offset part Rx, the tipping part Px, and the error part Kx on the corresponding nodes with the specific value of x, set a standard interval with a length value that is several times the distance between two adjacent nodes, and the multiple value is a positive integer, and then move one side of the standard interval by aligning with the origin of the number axis, node 1, node 2..., respectively, until the other side of the standard interval is aligned with node d, and count the total number of error parts Kx in the standard interval during each movement, and take the position corresponding to when the number of error parts Kx in the standard interval is greater than or equal to the threshold β as the concentration range; S544, according to the total number of processed parts Gx in a single concentrated range and the corresponding number of error parts Kx, obtain the ratio of the number of error parts Kx in a single range to the total number of processed parts Gx, and obtain the ratios corresponding to the error parts Kx in different concentrated ranges. If the ratio is less than 10%, a common error signal is generated to remind the maintenance personnel to repair the stamping equipment according to the actual situation. Otherwise, a risk error signal is generated to remind the maintenance personnel to repair the stamping equipment as soon as possible. S545. Use the same processing method for the error part Kx to obtain the ratio of the sum of the offset parts Rx and the dumped parts Px to the total number of processed parts Gx in different concentration ranges. If the ratio is less than 10%, a common error signal is generated to remind maintenance personnel to repair the conveyor belt according to actual conditions. Otherwise, a risk error signal is generated to remind maintenance personnel to repair the conveyor belt as soon as possible.
[0029] When an error signal is generated here, the number of offset parts Rx, tipping parts Px, and error parts Kx is updated in real time, and after the error signal is generated, maintenance personnel shut down and repair the specific corresponding mechanical equipment according to the actual situation.
[0030] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A stamping parts defect detection method based on optical screening image processing, characterized in that: The specific steps include: S1. Adjust the monitoring area of the machine vision equipment so that it covers the surface of the conveyor belt, and set a rectangular detection area in the monitoring area, generate a standard image of the standard punch corresponding to the surface to be detected, set the standard image in the rectangular detection area to form a comparison model, and generate a collection area based on the rectangular detection area; S2, photographing the workpiece in the acquisition area to obtain a plane image, so as to obtain its shape, size and relative position of the plane image in the acquisition area; S3, according to the relative position of the workpiece in the acquisition area, by comparing it with the relative position of the reference model in the acquisition area, determine whether the workpiece is offset, tilted, and deformed, and mark it as a offset part, a tilted part, and an error part respectively; S4. According to the obtained lateral offset distance and offset angle values of the workpiece, the monitoring probe inside the machine vision device is adjusted accordingly, so that the workpiece moves to the rectangular detection area and coincides with the standard image, and then the monitoring probe takes a picture of the surface of the workpiece for defect detection.
2. According to claim 1, a stamping part defect detection method based on optical screening image processing is characterized in that: In step S1, the specific method of generating the rectangular detection area and the acquisition area is: S11, obtaining the geometric center point of the rectangular detection area, and adjusting the monitoring probe so that its focus point coincides with the geometric center point; S12, generate a standard image of the front side corresponding to the surface to be inspected of the standard punching part, and obtain the positions of the corner points Bi and the optimal point on the surface to be inspected, where i=1, 2, 3, ..., n, n is a positive integer, and n represents that there are a total of n corner points on the surface, and obtain the length value of the line segment between the optimal point and each corner point Bi; S13, by aligning the optimal point of the standard image on the front side with the geometric center point and aligning with the focus point, a control model is formed in the rectangular detection area, and then the control model is locked in the monitoring area; S14, between the transmission start position and the rectangular detection area, copy the rectangular detection area with the reference model to form a collection area, and set a high-definition camera with a shooting range covering the collection area.
3. The method for detecting stamping part defects based on optical screening image processing according to claim 2 is characterized in that: The point corresponding to the minimum sum of the lengths of the line segments between the corner points Bi on the standard image in step S13 is the optimal point.
4. The method for detecting stamping part defects based on optical screening image processing according to claim 1 is characterized in that: The specific method of obtaining the relative position of the workpiece in the acquisition area in step S2 is: S21, placing the workpiece on a conveyor belt and conveying it to a collection area, and a high-definition camera photographs the surface of the workpiece to obtain a planar image; S22, establish a plane coordinate system, and obtain the relative position of the workpiece corner point Cj in the acquisition area and the corresponding coordinate value, where j=1, 2, 3, ..., m, m is a positive integer, and m indicates that there are a total of m corner points on the surface of the workpiece; S23. According to the coordinate value of the workpiece corner point Cj, the optimal point on the workpiece surface and its corresponding coordinate value are obtained on the plane image using the same processing method as the control model.
5. The method for detecting stamping part defects based on optical screening image processing according to claim 1, characterized in that: In step S3, the specific method for determining whether the workpiece is offset, tilted, or deformed is as follows: S31, obtaining the line segment length value Lj between the optimal point of the workpiece and the corner point Cj, and obtaining the line segment length value Si between the optimal point of the reference model and the corner point Bi, and comparing the values and quantities corresponding to Lj and Si respectively. If the values and quantities are equal, it indicates that the workpiece has not been deformed, and the next step of analysis is carried out. Otherwise, it indicates that the workpiece has been deformed, and it is marked as a defective product for further analysis; S32, obtaining the coordinate value of the optimal point of the reference model in the acquisition area, and comparing the lateral coordinate values of the optimal point of the workpiece and the reference model to see whether they are the same. If they are the same, it indicates that the workpiece has not shifted, otherwise the workpiece is marked as a shifted part; S33, calculating the difference between the transverse coordinate values of the optimal points of the reference model and the offset part in the acquisition area, and obtaining the transverse offset distance value of the offset part. If the workpiece is not offset, this step is not performed; S34. Adjust the offset part and the optimal point of the reference model to coincide in the acquisition area, obtain the coordinate value of the corner point Bi on the surface of the reference model after the offset, and calculate the angle between the line segment corresponding to the corner point Cj and the line segment corresponding to the corner point Bi about the optimal point according to the coordinate values of the corner points Cj and Bi and the corresponding line segment length values Lj and Si, which is the offset angle value θi of the offset part, and obtain all the offset angle values θi corresponding to Cj for verification.
6. The method for detecting stamping part defects based on optical screening image processing according to claim 5 is characterized in that: In step S31, the specific method for re-analyzing the defective product is: S311, obtaining standard images of other sides of the standard punching part, and calculating the corresponding optimal point position, the position and number of corner points, and the length value of the line segment between the corner point and the optimal point according to the obtained standard images of the side; S312, selecting a standard image of one side and comparing it with the plane image of the defective product. If the optimal point position, the position and number of corner points of the standard image of the side and the plane image, and the number and value of the length of the line segments between the corner points and the optimal point are all equal, it indicates that the defective product has a tipping problem, and the defective product is marked as a tipping part. Otherwise, it indicates that the defective product has a processing error, and the defective product is marked as an error part. S313, taking the same treatment method as that for one of the side faces, respectively compare the standard images of the remaining side faces with the plane images of the defective product, and determine whether the defective product is a tilted part or an error part. If the determination in step S312 is completed, this step is not performed; S314, if the defective product is found to be an error part after comprehensive comparison, a screening signal is generated to remove the error part from the conveyor belt; S315. If the defective product is found to be a tilted part after comprehensive comparison, a flip signal is generated to flip the tilted part so that the surface to be inspected faces upward, and then a plane image of the surface to be inspected is acquired by photographing, and the relative position of the plane image in the acquisition area is acquired.
7. The method for detecting stamping part defects based on optical screening image processing according to claim 1 is characterized in that: The specific adjustment method of the monitoring probe in step S4 is: S41, the focus point of the monitoring probe moves laterally according to the offset distance value, and the reference model in the rectangular detection area follows the movement, so that the reference model and the optimal point of the offset member are at the same horizontal coordinate; S42, the focus point of the monitoring probe carries the control model and rotates with the optimal point as the center and according to the offset angle value θi; S43. Based on the consistency between the offset angle value θi and the lateral offset distance value, after the offset part is overlapped with the reference model, the monitoring probe takes a picture of the surface of the offset part and performs surface defect detection.
8. The method for detecting stamping part defects based on optical screening image processing according to claim 1, characterized in that: Also includes: S5. Count the number of offset parts in the inspected workpieces, tilted parts in the defective products, and error parts, and generate a corresponding error signal when the number exceeds a threshold, and repair the corresponding mechanical equipment.
9. The method for detecting stamping part defects based on optical screening image processing according to claim 8, characterized in that: In step S5, the specific method of generating the error signal is: S51, obtaining thresholds β1 and β2, wherein the values of β1 and β2 are preset by production personnel; S52, in a unit time, compare the sum of the real-time numbers of offset parts and dumped parts with the threshold value β1. If it is greater than the threshold value β1, generate an error signal and transmit it to the management background to remind the maintenance personnel to repair the conveyor belt; S53, within a unit time, the real-time number of error parts is compared with the threshold value β2. If the number is greater than the threshold value β2, an error signal is generated and transmitted to the management background to remind the maintenance personnel to repair the stamping equipment; S54, and record the locations of the offset parts and defective products, and analyze the operating conditions of the mechanical equipment based on the distribution of the offset parts and defective products.
10. According to the method for detecting stamping defects based on optical screening image processing according to claim 9, in step S54, the specific analysis method of the operating status of the mechanical equipment is: S541, marking the workpiece as Gx, where x=1, 2, 3, ..., d, where d is the number of workpieces, and G1 represents the first workpiece, and Gd represents the dth workpiece; S542, marking the offset component, the tipping component and the error component as Rx, Px and Kx respectively, and obtaining the specific value corresponding to x in the offset component Rx, the tipping component Px and the error component Kx; S543, establish a number axis, obtain d nodes set at equal distances in the positive direction of the number axis with the value of x, calibrate the offset part Rx, the tipping part Px, and the error part Kx on the corresponding nodes with the specific value of x, set a standard interval, and then move one side of the standard interval by aligning with the origin of the number axis, node 1, node 2, etc., respectively, until the other side of the standard interval is aligned with node d, and count the total number of error parts Kx in the standard interval during each movement, and take the position corresponding to when the number of error parts Kx in the standard interval is greater than or equal to the threshold β as the concentration range; S544, obtaining a ratio corresponding to the error part Kx according to the total number of processed parts Gx in a single concentrated range and the number of error parts Kx, and obtaining the ratios corresponding to the error parts Kx in different concentrated ranges. If the ratio is less than 10%, a common error signal is generated to remind the maintenance personnel, otherwise a risk error signal is generated to remind the maintenance personnel; S545. Use the same processing method for the error part Kx to obtain the ratio of the sum of the number of offset parts Rx and dumped parts Px to the total number of processed parts Gx in different concentration ranges. If the ratio is less than 10%, a normal error signal is generated to remind the maintenance personnel. Otherwise, a risk error signal is generated to remind the maintenance personnel.
Citation Information
Patent Citations
Edge detection method, defect detection method and detection device
CN115861351A
Wireless positioning system based on data processing
CN115906349A
Stamping part defect detection method
CN118735921A
Device and method for detecting dislocation, image measuring device and model registering device
JP1996240411A