Method, device and system for detecting workpiece quality
By acquiring the model set and real-time images of the workpiece, combining edge detection and point cloud image analysis, the problem of workpiece quality detection in the prior art is solved, and fast and accurate quality judgment is achieved, which is suitable for high-precision requirements. industry.
Patent Information
- Application Number
- CN202210048948.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-17
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-01-17
AI Technical Summary
The existing workpiece quality inspection methods take a long time and are not accurate enough, making it difficult to quickly and accurately determine whether the workpiece is qualified, especially when the large machinery industry has high requirements for appearance shape and dimensional accuracy.
By obtaining the model set and real-time images of the workpiece, extracting edge information, performing edge detection and fusion, matching the model to calculate the actual size, and combining the normal and curvature of the point cloud image to determine whether the quality of the workpiece is qualified.
It realizes fast and accurate workpiece quality inspection, improves production efficiency and product qualification rate, and is especially suitable for high-precision requirements in the national infrastructure, heavy industry, aerospace and other industries.
Smart Images

Figure CN114549412B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of production line quality detection, and in particular to a method, device and system for detecting workpiece quality based on image recognition. Background Art
[0002] In recent years, with the rapid development of national infrastructure, heavy industry, aerospace, shipbuilding, automobile and other industries, the demand for large-scale machinery has also increased day by day, and the requirements for the appearance, shape and dimensional accuracy of workpieces have also continued to increase. Taking the cutting machine cutting steel plates as an example, due to human operation, control errors, hardware loss and other factors, the cut workpieces often fail to meet the preset requirements in terms of appearance, shape, dimensional accuracy, etc., and quality inspection is required.
[0003] The existing quality inspection methods are: first, manually or by machine, using measuring tools to measure the appearance dimensions of the workpiece, which is not only time-consuming but also fails to meet the requirements of accurate measurement accuracy, and is prone to missed inspections or false inspections; second, using image recognition technology to identify the appearance dimensions of the workpiece, but the existing inspection methods cannot be well integrated with the production line to quickly and accurately determine whether the workpiece is qualified. Therefore, how to provide a fast and accurate quality inspection method is a technical problem that needs to be solved in the quality inspection and sampling link of workpiece production. Summary of the invention
[0004] In order to solve the above technical problems, the present invention provides a method for detecting the quality of a workpiece, comprising:
[0005] T1: Obtain the model set of the workpiece to be detected;
[0006] T2: Collect real-time images of the workpiece to be inspected;
[0007] T3: Extract edge images of real-time images based on real-time images;
[0008] T4: Fusing the edge image of the real-time image with the real-time image to obtain a fused real-time image;
[0009] T5: Match the fused real-time image with the model set, and obtain a matching model that matches the workpiece to be detected in the model set;
[0010] T6: Calculate the actual size of the workpiece to be inspected based on the size corresponding to the matching model;
[0011] T7: Determine whether the quality of the workpiece to be inspected is qualified based on the actual size.
[0012] Furthermore, step T3 includes:
[0013] T31: Perform smoothing and noise reduction preprocessing on the real-time image to obtain the preprocessed real-time image;
[0014] T32: construct an edge detection operator, perform edge detection on the preprocessed real-time image, and determine the edge block of the real-time image;
[0015] T33: Connect the edge blocks of the real-time image through threshold binarization processing to obtain the edge image of the real-time image.
[0016] Furthermore, step T7 includes:
[0017] T71: Determine whether the actual size is within the design range;
[0018] T72: If it is within the design range, the quality of the workpiece to be tested is considered qualified;
[0019] T73: If it is not within the design range, the quality of the workpiece to be tested is judged to be unqualified.
[0020] Furthermore, the method further comprises:
[0021] S1: Obtain a point cloud image of the workpiece to be inspected;
[0022] S2: Calculate the normal and curvature of each point in the point cloud image relative to the local plane;
[0023] S3: Segment different planes in the point cloud image based on normals and curvatures;
[0024] S4: Calculate the angles between different planes of the workpiece to be inspected and its adjacent planes in the point cloud image;
[0025] S5: Determine whether the workpiece to be inspected is of qualified quality according to the angles between different planes of the workpiece to be inspected and their adjacent planes.
[0026] Furthermore, step S1 includes:
[0027] S11: Collecting a color image and a depth image of the workpiece to be detected;
[0028] S12: Synthesize the color image and the depth image to obtain a point cloud image.
[0029] Further, step S3 includes:
[0030] S31: Select the point with the lowest curvature as the seed point;
[0031] S32: Determine whether the normal angle and curvature difference between the seed point and the surrounding points centered on the seed point exceed a set threshold;
[0032] S33: If the set threshold is not exceeded, the surrounding points and the seed point are determined to be in the same plane, and the range of the surrounding points is expanded, and the process returns to step S32 until all points in the point cloud image are traversed;
[0033] S34: If it exceeds the set threshold, it is determined that the surrounding points and the seed point are not in the same plane, and they are split into new planes. The points exceeding the set threshold are used as new seed points, and the process returns to step S32 until all points are traversed.
[0034] Further, step S5 includes:
[0035] S51: Determine whether the angles between different planes of the workpiece to be inspected and their adjacent planes are within a set range;
[0036] S52: If it is within the set range, the quality of the workpiece to be inspected is determined to be qualified;
[0037] S53: If it is not within the set range, the quality of the workpiece to be inspected is determined to be unqualified.
[0038] Furthermore, the method further comprises:
[0039] O1: Grab the workpiece to be inspected to the inspection point;
[0040] O2: When citing claims 1-3, execute steps S1-S5; when citing claims 4-7, execute steps S1-S5 and / or T1-T7;
[0041] O3: Grab the workpiece to be inspected and return it from the inspection point.
[0042] Furthermore, the present invention also provides a device for detecting workpiece quality, which executes any of the above methods for detecting workpiece quality.
[0043] Furthermore, the present invention also provides a system for detecting the quality of a workpiece, comprising the above-mentioned device for detecting the quality of a workpiece, a gripping device, and a detection box;
[0044] The grabbing device is used to grab the workpiece to be inspected and put it into the inspection box;
[0045] The device for detecting the quality of the workpiece is used to detect the quality of the workpiece to be detected in the detection box;
[0046] The grabbing device is also used to grab the workpiece to be inspected and return it.
[0047] The method, device and system for detecting the quality of workpieces provided by the present invention first train to obtain a model set of various specifications of the workpiece to be detected, then collect a real-time image of the workpiece to be detected, extract edge information, and convert its actual size by matching the real-time image with edge information and the model set, and use this as an evaluation index to evaluate whether the quality of the workpiece to be detected is qualified. The calculation is convenient, fast and accurate, and has important significance in the batch workpiece processing and production process of the assembly line. On the one hand, it can ensure the quality of the workpieces leaving the factory, especially effectively applied to industries with high requirements for the appearance accuracy of the workpiece, such as national infrastructure, heavy industry, and aerospace; on the other hand, it can provide timely feedback and quickly detect the actual size of the workpiece during the workpiece processing and production process, manually or automatically adjust the operating parameters of the processing equipment, avoid the waste of materials and manpower caused by the increase of unqualified workpieces, and improve the product qualification rate and production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A flow chart of an embodiment of a method for detecting workpiece quality according to the present invention;
[0049] Figure 2 A flowchart of an embodiment of step S1 of the method for detecting workpiece quality of the present invention;
[0050] Figure 3 A structural diagram of an embodiment of a detection box of a device for detecting workpiece quality according to the present invention;
[0051] Figure 4 This is a diagram showing the effect of plane segmentation in step S3 of the method for detecting workpiece quality of the present invention;
[0052] Figure 5 A flowchart of an embodiment of step S3 of the method for detecting workpiece quality of the present invention;
[0053] Figure 6 A flowchart of an embodiment of step S4 of the method for detecting workpiece quality of the present invention;
[0054] Figure 7 The image before smoothing in step S4 of the method for detecting workpiece quality of the present invention;
[0055] Figure 8 The image after smoothing in step S4 of the method for detecting workpiece quality of the present invention;
[0056] Fig. 9 A flowchart of an embodiment of step S5 of the method for detecting workpiece quality of the present invention;
[0057] Fig.10 A flow chart of another embodiment of the method for detecting workpiece quality of the present invention;
[0058] Fig.11 A flowchart of an embodiment of step T3 of the method for detecting workpiece quality of the present invention;
[0059] Fig.12 A flowchart of an embodiment of step T7 of the method for detecting workpiece quality of the present invention;
[0060] Fig.13 A flow chart of another embodiment of the method for detecting workpiece quality of the present invention;
[0061] Fig.14 A structural block diagram of an embodiment of a device for detecting workpiece quality according to the present invention;
[0062] Fig.15 A structural block diagram of another embodiment of the device for detecting workpiece quality of the present invention;
[0063] Fig.16 The figure is a schematic structural diagram of an embodiment of a system for detecting workpiece quality according to the present invention. DETAILED DESCRIPTION
[0064] like Figure 1 As shown, a method for detecting workpiece quality is provided, which may include but is not limited to:
[0065] S1: Obtain the point cloud image of the workpiece to be inspected. Specifically, Figure 2 As shown, the optional but not limited to include: S11: collecting the color image and depth map of the workpiece to be detected; S12: synthesizing the color image and depth map to obtain a point cloud image. More specifically, it is optional but not limited to using image acquisition devices such as 3D cameras to collect the color image and depth map of the workpiece to be detected to synthesize its point cloud image. More specifically, it is optional but not limited to grabbing the workpiece to be detected into the detection box before detection to optimize the working environment of the image acquisition device, further improve the detection accuracy of the color image and depth map, and synthesize a high-precision point cloud image to lay the foundation for the high accuracy of subsequent quality detection. More specifically, the image acquisition device is preferably set above a corner of the workpiece to be detected to obtain an image at a certain angle to further improve the accuracy of quality detection. More specifically, the image acquisition device is optional but not limited to one or more units, which are set at one or more angles of the workpiece to be detected to further improve the accuracy of quality detection.
[0066] S2: Calculate the normal and curvature of each point in the point cloud image relative to the local plane. Specifically, it is optional but not limited to use a straight-through filter to filter out irrelevant areas before calculation to further improve the accuracy of subsequent quality inspection.
[0067] S3: According to the normal and curvature of each point relative to the local plane, the point cloud image is segmented to obtain different planes (such as Figure 4The figure shows the effect after plane segmentation. Figure 5 As shown, step S3 may optionally include but is not limited to:
[0068] S31: Select the point with the lowest curvature as the seed point;
[0069] S32: Determine whether the normal angle and curvature difference between the seed point and the surrounding points centered on the seed point exceed the set threshold; specifically, the surrounding points can be optionally but not limited to being defined as the points within the area with the seed point as the center, r as the radius or a as the side length, etc., and the range of the surrounding points is expanded in the subsequent S33, that is, the value of r or a is increased. More specifically, the set threshold value (first threshold value) of the normal angle and the set threshold value (second threshold value) of the curvature difference can be arbitrarily set by those skilled in the art based on whether it can be identified as the same plane, the error size, the accuracy requirements, etc.
[0070] S33: If the set threshold is not exceeded, the surrounding points and the seed point are determined to be in the same plane, and the range of the surrounding points is expanded, and the process returns to step S32 until all points in the point cloud image are traversed;
[0071] S34: If it exceeds the set threshold, it is determined that the surrounding points and the seed point are not in the same plane, and they are split into new planes. The points exceeding the set threshold are used as new seed points, and the process returns to step S32 until all points are traversed.
[0072] S4: Calculate the angles between different planes of the workpiece to be detected and its adjacent planes in the point cloud image; specifically, Figure 6 As shown, step S4 may optionally include but is not limited to:
[0073] S41: Smoothing different planes of the workpiece to be inspected. Specifically, it is optional but not limited to distinguishing which planes of the workpiece to be inspected and which planes do not belong to the workpiece to be inspected (such as the plane of the inspection table where the workpiece to be inspected is placed) among the different planes obtained by segmentation in the point cloud image before calculation, and then further smoothing the different planes of the workpiece to be inspected in the point cloud image obtained by segmentation in step S3 using the minimum multiplication method (such as Figure 7 The image before smoothing is shown. Figure 8 The figure shows the image after smoothing. It is worth noting that the smoothing step is not a necessary step and is only set to further improve the accuracy of subsequent quality detection. The least square method used is not the only method. Other methods for improving image accuracy that can be understood by those skilled in the art can be used for further optimization of this step.
[0074] S42: Take the normals of different planes (each different plane) of the workpiece to be detected in the point cloud image after smoothing, calculate the angles between the normals of the different planes of the workpiece to be detected and its adjacent planes, and obtain the angles between the different planes of the workpiece to be detected and its adjacent planes (such as the angle between each side surface and the top surface or the bottom surface).
[0075] S5: Determine whether the quality of the workpiece to be inspected is qualified based on the angles between different planes and their adjacent surfaces. Specifically, the angle of adjacent surfaces that can be understood by those skilled in the art is the actual angle of the groove of the workpiece to be inspected (i.e., the cut angle). Using the angle of adjacent surfaces as a quality indicator can ensure whether the groove (cut) angle of the workpiece to be inspected meets the design requirements, and whether the cut is smooth and free of burrs and jams. For example, taking the segmentation of steel plates as an example, when the cutter segments the steel plate at a certain angle, its groove (cut) - any side surface and the upper surface or lower surface will form a groove angle. If the cutting angle of the cutter is inaccurate or the segmentation is not smooth, resulting in an uneven cut, the angle of the adjacent surfaces segmented under the point cloud image will deviate from the actual designed angle. The quality of the workpiece to be inspected can be determined based on whether the angle of the adjacent surfaces is equal to the set value or within the set range. Specifically, if Fig. 9 As shown, step S5 may optionally include but is not limited to:
[0076] S51: Determine whether the angles between different planes of the workpiece to be inspected and their adjacent planes are within a set range (design angle ± allowable error accuracy);
[0077] S52: If it is within the set range, the quality of the workpiece to be inspected is determined to be qualified;
[0078] S53: If it is not within the set range, the quality of the workpiece to be inspected is determined to be unqualified.
[0079] In this embodiment, the present invention provides a method for detecting the quality of a workpiece, which first collects a point cloud image of the workpiece to be detected, and then calculates the normal and curvature of each point relative to the local plane, and segmentation obtains different planes of the workpiece to be detected in the point cloud image accordingly, and by calculating the relationship between different planes and their adjacent planes (if the acquired point cloud image is an image of a side of the workpiece to be detected, only two different planes of the workpiece to be detected (a side surface and a top surface or a bottom surface) can be segmented), an angle is calculated to reflect the actual angle of a side cut, that is, only one cut of the workpiece to be detected is sampled for quality inspection. Qualified; if the images of multiple sides of the workpiece to be inspected are obtained from multiple angles, multiple different planes of the workpiece to be inspected (multiple sides and the top or bottom surface respectively) can be segmented, and multiple angles can be calculated to reflect the actual angles of multiple side cuts, that is, to detect whether the multiple cuts of the workpiece to be inspected are of qualified quality from multiple dimensions to avoid missed inspections) and reflect the actual angles of the grooves of the workpiece to be inspected (cut angle and flatness). This is used as an evaluation index for evaluating whether the quality of the workpiece to be inspected is qualified. The calculation is convenient, fast and accurate, and has important significance in the batch workpiece processing and production process of the assembly line. On the one hand, it can ensure the quality of the workpieces leaving the factory, especially effectively applied to industries with high requirements for the appearance accuracy of the workpiece, such as national infrastructure, heavy industry, aerospace, etc.; on the other hand, it can timely feedback the adjacent surface angles detected quickly during the workpiece processing and production process, manually or automatically adjust the operating parameters of the processing equipment (such as the cutting angle, speed, and strength of the cutter; replace the segmentation cutter head; adjust the segmentation process), avoid the waste of materials and manpower caused by the increase of unqualified workpieces, and improve the product qualification rate and production efficiency. It is worth noting that the quality inspection accuracy is related to the accuracy of the collected point cloud image, the image analysis recognition, the accuracy of the angle calculation, etc., which can provide effective guarantee for quality sampling (especially the sampling of one or more sides of the workpiece to be inspected).
[0080] like Fig.10 As shown, the present invention also provides a method for detecting the quality of a workpiece, step T: using the appearance size of the workpiece to be detected as a quality indicator to determine whether its quality is qualified. Specifically, optional but not limited to include:
[0081] T1: Obtain a model set of the workpiece to be inspected; specifically, it is optional but not limited to pre-extracting features or automatically scaling different models and specifications of the workpiece to train models of corresponding models and specifications to form a model set; more specifically, taking the analogy of steel cutting as an easy-to-understand cake making as an example, it is optional but not limited to using 5-inch, 8-inch, and 10-inch cake models as training sets, collecting images of various models and specifications as a model set, or automatically scaling to obtain images of different models and specifications as a model set.
[0082] T2: Collect real-time images of the workpiece to be inspected; specifically, it is optional but not limited to using image acquisition devices such as 2D cameras to collect real-time images of the workpiece to be inspected. More specifically, it is optional but not limited to grabbing the workpiece to be inspected into the inspection box before inspection to optimize the working environment of the image acquisition device, further improve the detection accuracy of the real-time image, and lay the foundation for the high accuracy of subsequent quality inspection;
[0083] T3: Extract the edge image of the real-time image based on the real-time image. Specifically, the real-time image may optionally but not limited to include the workpiece to be detected, the detection table for placing the workpiece to be detected, etc., and may optionally but not limited to use edge detection technology to detect the edge area in the real-time image and extract the edge information of the real-time image, thereby obtaining the edge image of the real-time image. It is worth noting that the edge image (edge information) extracted from the real-time image may not only include the edge information of the workpiece to be detected, but may also include the edge information of other objects within the field of view, such as the detection table. Step T5 matching is required to obtain the edge information belonging only to the workpiece to be detected. Specifically, if Fig.11 As shown, step T3 may optionally include but is not limited to:
[0084] T31: Perform smoothing and noise reduction preprocessing on the real-time image to obtain the preprocessed real-time image;
[0085] T32: construct an edge detection operator, perform edge detection on the preprocessed real-time image, and determine the edge block of the real-time image;
[0086] T33: Connect the edge blocks of the real-time image through threshold binarization processing to obtain the edge image of the real-time image.
[0087] T4: Fusing the edge image of the real-time image with the real-time image to obtain a fused real-time image. Specifically, the real-time image is corrected and fused with the edge image obtained in T3 to obtain a fused real-time image.
[0088] T5: Match the fused real-time image with the model set, and obtain a matching model that matches the workpiece to be detected in the model set; specifically, taking the above cake making as an example, it is optional but not limited to matching the fused real-time image with a model set of 5-inch, 8-inch, 10-inch and other specifications to obtain a matching model corresponding to the workpiece to be detected (8 inches in the example). More specifically, it is also optional but not limited to setting a model set near the standard specification according to the accuracy requirements of the workpiece to be detected, the error size of the image acquisition, etc. (taking an 8-inch cake as an example, it is optional but not limited to setting a model set of sizes such as 7.5, 7.8, 7.9, 8.1, 8.2, 8.5, etc.) to obtain a matching model that more accurately corresponds to the workpiece to be detected in the model set.
[0089] T6: Calculate the actual size of the workpiece to be detected according to the size corresponding to the matching model; specifically, it is optional but not limited to converting the real-time size of the workpiece to be detected according to the proportional relationship between the pixel points of the model set and the actual workpiece size.
[0090] T7: Determine whether the quality of the workpiece to be inspected is qualified based on the actual size. Fig.12 As shown, step T7, optionally but not limited to, includes:
[0091] T71: Determine whether the actual size is within the design range (design size ± allowable error accuracy); specifically, it is optional but not limited to calculating the difference or quotient between the actual size and the preset size, and making further judgments based on whether the difference exceeds a preset threshold or whether the quotient is less than a preset range;
[0092] T72: If it is within the design range, the quality of the workpiece to be tested is considered qualified;
[0093] T73: If it is not within the design range, the quality of the workpiece to be tested is judged to be unqualified.
[0094] In this embodiment, the present invention provides another method for detecting workpiece quality, which first trains to obtain a model set of various specifications of the workpiece to be detected, then collects a real-time image of the workpiece to be detected, extracts edge information, and converts its actual size by matching the real-time image that integrates the edge information and the model set. This is used as an evaluation indicator for evaluating whether the quality of the workpiece to be detected is qualified. Like the above-mentioned evaluation indicator of the actual angle of the groove, its calculation is convenient, fast and accurate, and is of great significance in the batch workpiece processing and production process of the assembly line.
[0095] It is worth noting that the method for detecting workpiece quality provided by the present invention can optionally but is not limited to comprehensively evaluating whether the workpiece to be inspected is qualified based on multi-dimensional evaluation indicators such as the above-mentioned adjacent surface angle (actual groove angle) and actual size. Steps S1-S5 and steps T1-T7 can optionally but are not limited to being performed sequentially or simultaneously.
[0096] More specifically, Fig.13 As shown, the method for detecting workpiece quality of the present invention may also optionally include but is not limited to:
[0097] O1: Grab the workpiece to be inspected to the inspection point;
[0098] O2: Execute steps S1-S5 and / or T1-T7;
[0099] O3: Grab the workpiece to be inspected and return it from the inspection point.
[0100] In this embodiment, if Fig.13As shown, it is optional but not limited to apply the method of detecting the quality of workpieces of the present invention to the production line, grab the workpiece to be detected from the conveyor line to the detection point (optionally but not limited to the detection box), and return it to the conveyor line after completing the quality inspection. The quality inspection method of the present invention is well integrated into the production line, and the workpiece can be quickly inspected and the inspection results can be fed back to adjust the cutting process in time without affecting the production process and efficiency. Specifically, it is optional but not limited to using a gripping device in the form of a robot, first obtain the state information of the gripping device and take a photo to identify and calculate the gripping point, detection point and running trajectory of the workpiece to be detected, then grab the workpiece to be detected according to the gripping point and place it in the detection point (detection box), and move it to a safe position, then the system sends an instruction to start detecting the workpiece to be detected and obtain the detection result, and finally the gripping device grabs the workpiece after the inspection is completed from the detection box, and completes the inspection after placing it on the conveyor line. More preferably, step O3, it is optional but not limited to returning the workpiece to be detected to different positions according to the quality inspection results. For example, qualified products and unqualified products are classified and placed.
[0101] like Fig.14 As shown, the present invention also provides a device for detecting the quality of a workpiece based on the above method, comprising:
[0102] The acquisition module 100 is used to acquire a point cloud image of the workpiece to be detected. Specifically, the acquisition module 100 may optionally include, but is not limited to, an acquisition unit 110 and a synthesis unit 120. The acquisition unit 110 may optionally include, but is not limited to, an image acquisition device such as a 3D camera, to acquire a color image and a depth image of the workpiece to be detected, and send the image to the synthesis unit 120 to synthesize the point cloud image;
[0103] A normal and curvature calculation module 200, connected to the acquisition module 100, for calculating the normal and curvature of each point in the point cloud image relative to the local plane;
[0104] A plane segmentation module 300, connected to the normal and curvature calculation module 200, for segmenting different planes in the point cloud image according to the normal and curvature;
[0105] An angle calculation module 400, connected to the plane segmentation module 300, is used to calculate the angles between different planes of the workpiece to be detected and its adjacent planes in the point cloud image;
[0106] The angle quality determination module 500 is connected to the angle calculation module 400 and is used to determine whether the quality of the workpiece to be inspected is qualified according to the angles between different planes of the workpiece to be inspected and their adjacent planes.
[0107] In this embodiment, a device for detecting the quality of a workpiece is provided, which is created based on the above-mentioned method for detecting the quality of a workpiece, and is used to execute steps S1 to S5, and the combination of its technical features and technical effects are not repeated here. For example, according to steps S11-S12, the acquisition module 100 may optionally but not limited to include a collection unit 110 and a synthesis unit 120; according to steps S31-S34, the plane segmentation module 300 may optionally but not limited to include: a seed point selection unit 310, a first judgment unit 320, a first plane judgment unit 330, and a second plane judgment unit 340 to complete the corresponding functions; according to steps S51-S53, the angle quality judgment module 500 may optionally but not limited to include a second judgment unit 510, a first quality judgment unit 520, and a second quality judgment unit 530 to complete the corresponding functions.
[0108] Similarly, with respect to steps T1-T7, Fig.15 As shown, the above-mentioned device for detecting the quality of a workpiece may optionally include, but is not limited to: a model acquisition module 10, for acquiring a model set of the workpiece to be detected;
[0109] A real-time image acquisition module 20, used to acquire a real-time image of the workpiece to be inspected;
[0110] The edge image extraction module 30 is used to extract the edge image of the real-time image according to the real-time image;
[0111] The image fusion module 40 is connected to the real-time image acquisition module 20 and the edge image extraction module 30, and is used to fuse the edge image of the real-time image with the real-time image to obtain a fused real-time image;
[0112] The model matching module 50 is connected to the image fusion module 40 and the model acquisition module 10, and is used to match the fused real-time image with the model set, and obtain a matching model that matches the workpiece to be detected in the model set;
[0113] The size calculation module 60 is connected to the model matching module 50 and is used to calculate the actual size of the workpiece to be detected according to the size corresponding to the matching model;
[0114] The size quality determination module 70 is connected to the size calculation module 60 and is used to determine whether the quality of the workpiece to be inspected is qualified according to the actual size.
[0115] Similarly, the device for detecting the quality of a workpiece is created based on the above-mentioned method for detecting the quality of a workpiece, and is used to perform steps T1 to T7. The combination of its technical features and technical effects are not repeated here. For example, according to steps T31 to T33, the edge image extraction module 30 may optionally include but is not limited to: a real-time image preprocessing unit 31, an edge block determination unit 32, and an edge image acquisition unit 33; according to steps T71 to T73, the size quality determination module 70 may optionally include but is not limited to: a third judgment unit 71, a fourth quality determination unit 72, and a fifth quality determination unit 73.
[0116] More specifically, Fig.16 As shown, the present invention also provides a system for detecting the quality of workpieces, including any of the above-mentioned devices for detecting the quality of workpieces and a gripping device B and a test box C. The gripping device B is used to grab the workpiece to be tested to the test box, and after the quality test is completed by the device for detecting the quality of the workpiece, the workpiece is grabbed and returned to the original place (on the production line) by the gripping device. Specifically, the gripping device may be selected but not limited to a gripping module in the form of a suction cup, a clamp, etc., a control module in the form of a single-chip microcomputer, etc., a driving module in the form of a motor hydraulic device, etc., and its specific structural form and control process can be arbitrarily set by those skilled in the art according to the shape, size, etc. of the workpiece to be grasped.
[0117] More specifically, Figure 3 As shown, the detection box C may optionally include but is not limited to: a box body C1 (optionally but is not limited to a square structure, with all surfaces except one surface for entering and exiting the workpiece to be detected being a closed structure), a detection table C2 (optionally but is not limited to being set in the middle of the box body), an acquisition module 100 (optionally but is not limited to being set at one or more corners of the detection table to facilitate photographing the position of the workpiece to be detected; optionally but not limited to being one or more tables to collect multi-dimensional images of the workpiece to be detected from different angles and detect the quality of the workpiece to be detected from multiple angles), a real-time image acquisition module 20 (optionally but is not limited to being set above the detection table, preferably at a position of 1 meter, to comprehensively collect real-time images of the workpiece to be detected), a light source C3 (optionally but is not limited to being set above the detection table to improve shooting accuracy), etc.
[0118] The above-mentioned device and system for detecting the quality of workpieces are created based on the above-mentioned method, and their technical functions and beneficial effects are no longer repeated here. The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above-mentioned embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0119] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A method for detecting the quality of a workpiece, characterized in that: include: T1: Obtain the model set of the workpiece to be detected; T2: Collect real-time images of the workpiece to be inspected; T3: Extract edge images of real-time images based on real-time images; T4: Fusing the edge image of the real-time image with the real-time image to obtain a fused real-time image; T5: Match the fused real-time image with the model set, and obtain a matching model that matches the workpiece to be detected in the model set; T6: Calculate the actual size of the workpiece to be inspected based on the size corresponding to the matching model; T7: Determine whether the quality of the workpiece to be inspected is qualified based on the actual size; S1: Obtain a point cloud image of the workpiece to be inspected; S2: Calculate the normal and curvature of each point in the point cloud image relative to the local plane; S3: Segment different planes in the point cloud image based on normals and curvatures; S4: Calculate the angles between different planes of the workpiece to be inspected and its adjacent planes in the point cloud image; S5: Determine the incision angle of the workpiece to be inspected according to the angles between different planes of the workpiece to be inspected and their adjacent planes, and determine whether the workpiece to be inspected is of qualified quality according to the incision angle.
2. The method according to claim 1, characterized in that Step T3 comprises: T31: Perform smoothing and noise reduction preprocessing on the real-time image to obtain the preprocessed real-time image; T32: construct an edge detection operator, perform edge detection on the preprocessed real-time image, and determine the edge block of the real-time image; T33: Connect the edge blocks of the real-time image through threshold binarization processing to obtain the edge image of the real-time image.
3. The method according to claim 1, characterized in that Step T7 comprises: T71: Determine whether the actual size is within the design range; T72: If it is within the design range, the quality of the workpiece to be tested is considered qualified; T73: If it is not within the design range, the quality of the workpiece to be tested is judged to be unqualified.
4. The method according to claim 1, characterized in that Step S1 includes: S11: Collecting a color image and a depth image of the workpiece to be detected; S12: Synthesize the color image and the depth image to obtain a point cloud image.
5. The method according to claim 1, characterized in that Step S3 includes: S31: Select the point with the lowest curvature as the seed point; S32: Determine whether the normal angle and curvature difference between the seed point and the surrounding points centered on the seed point exceed a set threshold; S33: If the set threshold is not exceeded, the surrounding points and the seed point are determined to be in the same plane, and the range of the surrounding points is expanded, and the process returns to step S32 until all points in the point cloud image are traversed; S34: If it exceeds the set threshold, it is determined that the surrounding points and the seed point are not in the same plane, and they are split into new planes. The points exceeding the set threshold are used as new seed points, and the process returns to step S32 until all points are traversed.
6. The method according to claim 1, characterized in that Step S5 includes: S51: Determine whether the angles between different planes of the workpiece to be inspected and their adjacent planes are within a set range; S52: If it is within the set range, the quality of the workpiece to be inspected is determined to be qualified; S53: If it is not within the set range, the quality of the workpiece to be inspected is determined to be unqualified.
7. The method according to any one of claims 1 to 6, characterized in that: Also includes: O1: Grab the workpiece to be inspected to the inspection point; O2: Execute steps T1-T7 and S1-S5; O3: Grab the workpiece to be inspected and return it from the inspection point.
8. A device for detecting the quality of a workpiece, characterized in that: Execute the method according to any one of claims 1 to 7.
9. A system for detecting the quality of a workpiece, characterized in that: It includes the device for detecting the quality of workpieces, the grasping device and the detection box as described in claim 8; The grabbing device is used to grab the workpiece to be inspected and put it into the inspection box; The device for detecting the quality of the workpiece is used to detect the quality of the workpiece to be detected in the detection box; The grabbing device is also used to grab the workpiece to be inspected and return it.
