A vision-based workpiece inspection apparatus
By using vision-based workpiece inspection equipment, and utilizing components such as a box frame, a lead screw slide conveyor mechanism, a turntable, and a six-degree-of-freedom robotic arm, multi-dimensional comprehensive inspection of bent sheet metal parts is achieved. This solves the problems of low inspection efficiency and high false detection rate in existing technologies, improves inspection accuracy and efficiency, and is suitable for rapid specification switching of punched and bent sheet metal parts.
Patent Information
- Application Number
- CN202611427290.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-15
- Publication Date
- 2026-11-27
AI Technical Summary
Existing manual inspection methods and visual inspection solutions are insufficient to efficiently, accurately, and flexibly meet the comprehensive inspection needs of punched and bent sheet metal parts. Especially in production scenarios where workpiece specifications are frequently changed, problems such as low inspection efficiency, high changeover costs, and high false detection rates are prominent.
The vision-based workpiece inspection equipment includes a box-type frame, a screw slide conveyor mechanism, a turntable, a six-degree-of-freedom robotic arm, a vision inspection system, and a control and image processing system. Through the cooperation of the screw slide conveyor mechanism and the turntable, the workpiece can be accurately positioned and rotated at multiple angles. Combined with the six-degree-of-freedom robotic arm driving the vision inspection system to acquire images from multiple perspectives, and through hand-eye calibration and multi-view coordinate unification, multi-dimensional inspection can be achieved.
It enables multi-dimensional comprehensive inspection of bent sheet metal parts, improving inspection accuracy and efficiency, reducing changeover time and costs, avoiding inconsistencies and missed inspection risks associated with manual inspection, and supporting full inspection and automatic sorting.
Smart Images

Figure CN123168086A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of product inspection technology, and in particular to a vision-based workpiece inspection device. Background Technology
[0002] In the fields of machining and sheet metal manufacturing, punched and bent sheet metal parts are widely used component types. During the production process, these workpieces require rigorous testing of the dimensions of the machined holes, the relative positional accuracy between the holes, and whether the workpiece has deformed along its length, to ensure that the product quality meets design standards.
[0003] Currently, the vast majority of manufacturing enterprises still use traditional manual inspection methods, which involve manual comparison and inspection using tools such as calipers, protractors, and specialized fixtures or gauges. This inspection mode is inefficient in practical applications. Manual inspection is limited by the operating speed of personnel and cannot meet the cycle time requirements of modern high-speed production lines. Studies have shown that the average daily inspection volume per person is extremely limited, and minute deviations in punching characteristics are often difficult to detect in a timely manner. Furthermore, manual sampling cannot achieve full coverage inspection of all products, posing a risk of missed inspections and batch defects.
[0004] Furthermore, the accuracy and stability of the inspection are greatly affected by human factors. The operator's skill level, fatigue, and subjective judgment differences can all lead to inconsistent inspection results. For minor defects such as low punching dimensional accuracy, positional deviation, and bending deformation, the recognition rate of manual inspection is difficult to guarantee.
[0005] When production tasks are switched between workpieces of different specifications, the inspection standards need to be re-trained for operators, and the specialized inspection tools and fixtures also need to be replaced accordingly. This not only increases training and time costs, but also, in the initial stage of specification conversion, a high error rate is likely to occur because operators are not yet familiar with the new inspection standards.
[0006] In recent years, with the development of machine vision technology, some companies have begun to try applying visual inspection technology to the quality inspection of sheet metal parts. However, there are problems with inaccurate inspection when used on sheet metal products. This is because most sheet metal products have a certain length, especially bent products. Sometimes it is necessary to inspect the distance between two holes on different planes. This leads to the problem that vision equipment, which can only inspect on a plane, has a large error in the inspection results. Furthermore, when multiple positions need to be inspected, multiple sets of inspection equipment need to be installed, which is difficult to manufacture.
[0007] Therefore, existing manual inspection methods and visual inspection solutions are insufficient to efficiently, accurately, and flexibly meet the comprehensive inspection needs of punched and bent sheet metal parts, especially in production scenarios where workpiece specifications frequently change, resulting in problems such as low inspection efficiency, high changeover costs, and high false detection rates. Therefore, this paper proposes a device capable of multi-dimensional comprehensive inspection. Summary of the Invention
[0008] The purpose of this invention is to overcome the shortcomings of the prior art in the detection of sheet metal products, such as inaccurate detection results and high production costs of detection equipment, and to provide a vision-based workpiece detection device.
[0009] This invention is achieved through the following technical solution: a vision-based workpiece inspection device, comprising:
[0010] Box-type rack;
[0011] The lead screw slide conveyor mechanism is horizontally arranged inside the box-type frame;
[0012] A turntable is installed on the slide of the lead screw slide conveyor mechanism, and the rotation axis of the turntable is perpendicular to the horizontal plane;
[0013] A mounting plate is fixed to the top of the turntable and is used to support the workpiece to be tested. A positioning fixture is provided on the mounting plate.
[0014] A six-degree-of-freedom robotic arm, the base of which is fixed to the top of the equipment box, the equipment box being located on one side of the box-type frame;
[0015] A vision inspection system is installed at the end of the robotic arm;
[0016] The control and image processing system is electrically connected to the lead screw slide conveyor mechanism, turntable, robotic arm and vision inspection system;
[0017] The robotic arm drives the vision inspection system to acquire images of the workpiece in multiple shooting postures. At the same time, the turntable rotates the mounting plate according to the inspection requirements, so that the surface of the workpiece to be inspected faces the vision inspection system, thereby realizing multi-angle recognition of the workpiece.
[0018] Furthermore, the lead screw slide conveying mechanism includes a lead screw, a linear guide rail, a slide, and a drive motor; the drive motor is connected to the lead screw, the lead screw is arranged parallel to the linear guide rail, the slide is fixedly connected to a nut on the lead screw and slides in cooperation with the linear guide rail, and the drive motor drives the lead screw to rotate through a coupling, thereby causing the slide to reciprocate along the linear guide rail.
[0019] Furthermore, the turntable is driven by a worm gear and can rotate at any angle in the horizontal plane by a servo motor, which is located at the bottom of the slide.
[0020] Furthermore, the mounting plate is vertically arranged, and a groove is provided on the upper part of the mounting plate for supporting the workpiece to be tested;
[0021] The positioning fixture includes a positioning pin and elastic jaws. The positioning pin is used to insert into a positioning hole or process hole on the workpiece, and the elastic jaws are used to clamp the edge of the workpiece.
[0022] Furthermore, the visual inspection system includes at least one industrial camera, a fixed-focus lens, and a light source; the light source is coaxially mounted on the front end of the lens.
[0023] Furthermore, a rejection mechanism is provided at the end of the lead screw slide conveyor mechanism. The rejection mechanism is located above the end of the lead screw slide's stroke and includes a horizontally moving linear motor, a vertically lifting cylinder, and a pneumatic gripper. The linear motor is fixed to the crossbeam of the box-type frame, the vertically lifting cylinder is mounted on the slider of the linear motor, and the pneumatic gripper is mounted on the lower end of the piston rod of the vertically lifting cylinder. It is used to clamp the workpiece from the mounting plate and transfer it to the qualified product station or the recycling bin.
[0024] Furthermore, it also includes a qualified product station and a recycling bin. The qualified product station is located on one side of the rejection station and is a conveyor belt or material rack used to receive qualified workpieces. The recycling bin is located below the other side of the rejection station and is used to collect unqualified workpieces.
[0025] Furthermore, the control and image processing system includes an industrial computer, which internally includes a detection task management module, a motion control module, an image acquisition and processing module, a coordinate calculation and comparison module, a judgment module, and a database module.
[0026] Furthermore, the robotic arm drives the vision inspection system to acquire images in at least three shooting postures: frontal view, upward view, and spatial hole position measurement perspective. In the frontal view, the camera optical axis is approximately perpendicular to the front of the workpiece; in the upward view, the camera optical axis is vertically downward to capture the top surface of the workpiece; in the spatial hole position measurement perspective, the camera optical axis is tilted to the bending surface, so that holes on two different planes enter the camera's field of view, or the hole positions on two planes are captured twice at different pitch angles, and then unified to the same coordinate system through coordinate transformation.
[0027] Furthermore, the control and image processing system is also used to perform the following calibration and detection steps:
[0028] During the calibration process, known qualified standard parts are clamped on the mounting plate, and the robotic arm and turntable are taught to move to multiple shooting postures to take pictures. Candidate feature points are automatically extracted and manually corrected. Then, they are converted to the robotic arm base coordinate system according to the hand-eye calibration relationship to form a standard part feature set and generate a detection path file.
[0029] During the inspection process, the robotic arm and turntable are controlled to move according to the inspection path file and images are acquired. The measured feature points are extracted, unified into the robotic arm base coordinate system, and compared with the feature set of standard parts. The hole diameter, hole spacing, spatial distance and deformation are calculated, and a comprehensive judgment is made based on the preset tolerance.
[0030] The beneficial effects of this invention are as follows:
[0031] 1. The workpiece is precisely positioned and rotated at multiple angles by means of a lead screw slide conveyor and a turntable. In conjunction with a six-degree-of-freedom robotic arm, the vision system acquires images from multiple perspectives, such as frontal view, top view, and spatial hole measurement. Combined with hand-eye calibration and multi-view coordinate unification, it can accurately measure the spatial distance between holes located on different planes after bending, overcoming the problem of large errors in traditional planar vision inspection.
[0032] 2. When the production task is switched to a new specification of workpiece, only a known qualified standard part needs to be shown and photographed and the feature points manually corrected to generate a new standard feature set and inspection path. There is no need to change the special inspection tool or retrain the operators, which can realize the rapid switching of different specifications of workpieces and greatly reduce the changeover time and cost.
[0033] 3. It automatically completes feeding and positioning, slide conveying, multi-position shooting, image processing, judgment and rejection sorting, with a fast detection cycle. It can perform online detection of all products, avoiding the risk of missed detection caused by manual sampling. Qualified and unqualified products are automatically separated by the rejection mechanism to achieve closed-loop control and improve the overall detection efficiency of the production line.
[0034] 4. By rotating the turntable and using a single vision inspection system, images of multiple sides, top surfaces, and bending surfaces of the workpiece can be acquired. This eliminates the need to install multiple vision devices at different inspection positions, simplifying the equipment structure, reducing manufacturing difficulty and hardware costs, while ensuring the stability of the distance between the camera and the workpiece and improving the consistency of image acquisition.
[0035] 5. The system employs machine vision and fixed algorithms for feature extraction and size calculation, avoiding the fluctuations caused by operator skill levels, fatigue, and subjective judgment differences in manual inspection. This results in high consistency and stability of inspection results. Simultaneously, the system saves inspection data, numbers, images, and judgment results to a database, supporting subsequent quality traceability and process improvement. It features high inspection accuracy, flexible model changeover, and supports full inspection and automatic sorting, making it suitable for multi-dimensional comprehensive inspection of punched and bent sheet metal parts. Attached Figure Description
[0036] Figure 1 This is a schematic diagram of the overall structure of the present invention;
[0037] Figure 2This is a schematic diagram of the overall structure of the present invention from another perspective;
[0038] Figure 3 This is a schematic diagram of the internal structure of the present invention;
[0039] Figure 4 This is an enlarged structural diagram of point A in the present invention;
[0040] Figure 5 This is an enlarged structural diagram of point B in the present invention;
[0041] The components include: 1. Box-type frame; 101. Linear guide rail; 102. Lead screw; 103. Drive motor; 104. Mounting plate; 105. Turntable; 106. Groove; 107. Elastic gripper; 2. Equipment box; 201. Industrial computer; 3. Robotic arm; 301. Industrial camera; 302. Ring light source; 4. Rejection mechanism; 401. Linear motor; 402. Vertical lifting cylinder; 403. Pneumatic gripper; 404. Servo motor. Detailed Implementation
[0042] In the description of this invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] Example 1
[0045] like Figure 1-5 As shown: This invention proposes a vision-based workpiece inspection device, including a box-type frame 1, a lead screw 102 slide table conveying mechanism, a mounting plate 104, a turntable 105, a positioning fixture, a six-degree-of-freedom robotic arm 3, a vision inspection system, an equipment box 2, a rejection mechanism 4, a qualified product station, a recycling bin, and a control and image processing system.
[0046] The box-type frame 1 has a frame structure and is covered with a protective panel, forming a semi-enclosed inspection area. The lead screw 102 slide table conveyor mechanism is horizontally set inside the box-type frame 1. An operation window is opened on one side wall of the box-type frame 1. The size of the operation window allows the end effector of the robotic arm 3 and the vision inspection system mounted on it to extend into the box-type frame 1 for multi-angle movement. A grating sensor can be installed at the operation window to prevent personnel from accidentally entering during inspection.
[0047] The lead screw 102 slide conveyor mechanism includes a lead screw 102, a linear guide rail 101, a slide, and a drive motor 103. The lead screw 102 is mounted on the bottom frame of the box-type frame 1 at both ends via bearing seats. The linear guide rail 101 is arranged parallel to both sides of the lead screw 102. The slide is fixedly connected to the nut on the lead screw 102 and slides in engagement with the linear guide rail 101. The drive motor 103 drives the lead screw 102 to rotate via a coupling, thereby causing the slide to reciprocate along the linear guide rail 101 between the inspection station and the rejection station. The lead of the lead screw 102 and the encoder accuracy of the drive motor 103 ensure that the positioning accuracy of the slide is within ±0.02mm.
[0048] The turntable 105 is mounted on the upper surface of the slide table and is a precision rotary platform driven by a worm gear or harmonic reducer. The rotation axis of the turntable 105 is perpendicular to the horizontal plane and is driven by a servo motor 404, allowing it to rotate at any angle within the horizontal plane. In this embodiment, the servo motor 404 is located at the lower part of the slide table, and a mounting plate 104 is fixed to the top of the turntable 105.
[0049] In this embodiment, the mounting plate 104 is vertically arranged, and a groove 106 is provided on the upper part of the mounting plate 104 for supporting the workpiece to be tested. A positioning fixture is disposed on the mounting plate 104 to fix the workpiece to be tested onto the mounting plate 104, ensuring it maintains a consistent fixed posture during the testing process. The positioning fixture includes a positioning pin and elastic grippers 107. The positioning pin is mounted on the mounting plate 104 and is used to insert into existing positioning holes or process holes on the plate material; the elastic grippers 107 are fixed to the threaded holes of the mounting plate 104 by bolts, clamping the edge of the workpiece and preventing displacement or shaking of the workpiece during the rotation and transport of the turntable 105. The position of the positioning fixture can be changed or adjusted according to the different specifications of the workpiece.
[0050] Robotic arm 3 is a six-degree-of-freedom articulated industrial robotic arm. Its base is fixed to the top of equipment box 2, which is located on one side of box-type frame 1. A vision inspection system is installed on the end flange of robotic arm 3. Through the coordinated movement of the joints of robotic arm 3, the vision inspection system can be driven to take pictures of the workpiece in different positions and postures.
[0051] The vision inspection system includes an industrial camera 301, a fixed-focus lens, a ring light source 302, and a bar light source. The industrial camera 301 is a high-resolution CMOS camera with a low-distortion industrial lens. The ring light source 302 is coaxially mounted at the front of the lens, and the bar light source can be adjusted in angle as needed to provide uniform illumination for features such as holes and edges.
[0052] Equipment box 2 is located outside the box frame 1, on one side of the lead screw 102 slide conveyor mechanism. Inside, it houses an industrial control computer 201, an image processor, a motion controller for the robotic arm 3, a servo driver, and I / O modules. The top of equipment box 2 serves as the mounting base for the robotic arm 3.
[0053] The rejection mechanism 4 is located above the end of the slide stroke of the lead screw 102. The rejection mechanism 4 includes a horizontally moving linear motor 401, a vertical lifting cylinder 402, and a pneumatic gripper 403. The linear motor 401 is fixed to the crossbeam of the box-type frame 1, the vertical lifting cylinder 402 is mounted on the slider of the linear motor 401, and the pneumatic gripper 403 is mounted on the lower end of the piston rod of the vertical lifting cylinder 402. The rejection mechanism 4 can move horizontally, gripping the workpiece from the mounting plate 104 and transferring it to the qualified product station or the recycling bin.
[0054] The qualified product station is a conveyor belt or rack located on one side of the rejection station, used to receive qualified workpieces and transport them to the next process.
[0055] The recycling bin is located below the rejection station on the other side and is used to collect workpieces that are deemed unqualified.
[0056] The control and image processing system runs within the industrial computer 201 and includes a detection task management module, a motion control module, an image acquisition and processing module, a coordinate calculation and comparison module, a judgment module, and a database module.
[0057] The robotic arm 3 drives the vision inspection system to acquire images in at least three shooting postures. At the same time, the turntable 105 rotates the mounting plate 104 according to the inspection requirements, so that the surface of the workpiece to be inspected faces the vision inspection system.
[0058] From a direct viewing angle, the turntable 105 determines the frontal view based on the shape of the workpiece, positioning the front of the workpiece directly opposite the robotic arm 3, with the camera's optical axis approximately perpendicular to the front of the workpiece, to capture its frontal outline. At this angle, the spacing, diameter, and numbering information between the side holes can be detected.
[0059] From an upward viewing angle, the turntable 105 resets the workpiece on a horizontal plane, and the mechanical action causes the camera's optical axis to point vertically downwards, capturing the top surface of the workpiece. At this angle, the position and diameter of the top holes, as well as the edge contour of the top surface, can be detected.
[0060] For spatial hole position measurement, the turntable 105 faces the bending surface towards the robotic arm 3. The second joint axis of the robotic arm 3 is adjusted to a position where the camera's optical axis is tilted towards the bending surface, for example, making the optical axis form an angle of 30° to 60° with the horizontal plane, while ensuring that holes on two different planes are both within the camera's field of view; or the holes on the two planes are photographed twice at different pitch angles, and then unified to the same coordinate system through coordinate transformation. This posture is used to detect the spatial distance between holes located on different planes after bending.
[0061] Furthermore, depending on the complexity of the workpiece, various shooting postures such as end face view and oblique side view can be added. The rotation of the turntable 105 allows the robotic arm 3 to capture images of all sides of the workpiece without significant movement, while ensuring a stable distance between the camera and the workpiece, improving the consistency of image acquisition. When the production task switches to a new workpiece specification, the following calibration steps are performed:
[0062] Step A1: Clamp a known qualified standard sheet metal part onto the positioning fixture on the mounting plate, maintaining the workpiece in the same fixed posture as during normal inspection. The operator enters the new workpiece model or number on the control interface, and the system creates a new inspection task.
[0063] Step A2: The operator controls the robotic arm via a teach pendant, causing the vision inspection system to move sequentially to multiple preset shooting postures, including frontal view, upward view, and spatial hole measurement angles. Simultaneously, the operator manually controls the turntable to rotate to the corresponding angle to photograph the standard part. After each photograph, the image processing program automatically extracts candidate feature points, including hole centers, edge intersections, and straight edges. The extraction of candidate feature points uses a sub-pixel precision algorithm: first, pixel-level edges are extracted using the Canny operator; then, grayscale interpolation is performed on the neighborhood of the edge points; and finally, sub-pixel-level edge coordinates are obtained using the grayscale centroid method or Gaussian fitting.
[0064] Step A3: The operator manually corrects the automatically extracted point data on the image through the human-machine interface, such as dragging the center crosshair cursor, modifying edge positions, deleting erroneous points, or adding auxiliary points. The corrected pixel coordinates are then transformed to the robotic arm's base coordinate system according to the hand-eye calibration relationship, forming a standard part feature set. ,in Indicates the first The three-dimensional coordinates of each feature point in the base coordinate system of the robotic arm.
[0065] The coordinate transformation relationship is as follows: Let the coordinates of the camera image point be... ,in The horizontal pixel coordinates of the image. These are the pixel coordinates in the vertical direction of the image, all with the top-left corner of the image as the origin. (This is derived from the camera intrinsic parameter matrix.) After distortion correction, normalized coordinates are obtained. Camera intrinsic parameter matrix. The definition of is:
[0066]
[0067] in , The camera is in direction and Focal length in direction (in pixels). , These are the coordinates of the camera's principal point (in pixels). A 3D point in the camera coordinate system is represented in homogeneous coordinates. Points in the robotic arm's base coordinate system are represented in homogeneous coordinates. Both conditions are met:
[0068] ;
[0069] in, This is the homogeneous transformation matrix of the robot arm's end-effector coordinate system relative to the base coordinate system, which is read out in real time by the robot arm controller and contains end-effector position and attitude information; The hand-eye transformation matrix relative to the robotic arm's end effector is obtained through hand-eye calibration, representing the camera's pose in the robotic arm's end effector coordinate system. The sampling positions of the standard part are then... By substituting the image feature points, the feature points can be unified into the same base coordinate system.
[0070] Step A4: The system records the feature set of standard parts. The system generates a detection path file by including the standard dimensions and tolerances corresponding to each feature point, baseline / datum plane information, and the robot arm joint angle and turntable angle corresponding to each sampling position. Standard dimensions and tolerances can be input from design drawings or obtained by averaging multiple measurements of standard parts. The detection threshold is set according to the workpiece design accuracy requirements, usually taking 1 / 3 to 1 / 5 of the design tolerance as the detection threshold to ensure detection sensitivity.
[0071] During automated inspection, the workpiece to be tested is placed onto the mounting plate at the starting position by a manual operator or by the upstream feeding equipment, and then fixed in place by a positioning fixture. The identified information is then linked to the corresponding standard part during inspection.
[0072] The servo motor of the lead screw conveyor mechanism drives the lead screw to rotate, and the slide moves the mounting plate to the inspection station. The robotic arm moves sequentially to each sampling position according to the stored inspection path file, and the turntable also rotates at a preset angle, triggering the vision inspection system to take a picture. The combined light source is lit at a preset angle and brightness to ensure image quality. The image processing algorithm includes the following steps:
[0073] Step B1: Perform Gaussian filtering and histogram equalization on the image to reduce noise and enhance contrast. The Gaussian filter kernel size is selected according to the image resolution, usually 5×5 or 7×7, and the standard deviation σ is 1.0 to 1.5.
[0074] Step B2: Use the Canny operator to extract edges and perform connected component analysis on the edges. The high and low thresholds of the Canny operator are automatically determined based on the image grayscale distribution. The Otsu method is used first to calculate the high threshold, and the low threshold is 0.4 times the high threshold.
[0075] Step B3: For hole-like features, fit an ellipse using the edge points. The general equation of an ellipse is:
[0076] ;
[0077] in, The coefficients of the equation of the ellipse are . Let be the pixel coordinates in the image coordinate system. The coefficients are solved using the least squares method, with the following constraints: To ensure the fitted result is an ellipse, the coordinates of the hole center image are:
[0078] ;
[0079] in, The pixel coordinates of the center of the fitted ellipse in the image coordinate system are given. The aperture is obtained by averaging the major and minor axes of the fitted ellipse, i.e. Then, the actual physical size is calculated based on the calibrated pixel equivalent.
[0080] Step B4: Extract the edge lines and bends using Hough transform or least squares line fitting. For bends, the bend region can be located first by detecting curvature abrupt change points, and then line fitting can be performed on the local edges to improve fitting accuracy.
[0081] When the same feature point is repeatedly observed from multiple viewpoints, triangulation is used to improve the accuracy of the three-dimensional coordinates. Let the three-dimensional coordinates of the feature point in the world coordinate system (i.e., the robot arm's base coordinate system) be... The homogeneous coordinates of the images in the two camera poses are respectively and The corresponding camera projection matrices are respectively and ,in and These are the rotation matrix and translation vector of the camera coordinate system relative to the world coordinate system in the two poses, respectively. Let be the camera intrinsic parameter matrix. The projection equation is:
[0082] ;
[0083] in, is the scale factor, representing the depth value of the feature point along the camera's optical axis; These are the homogeneous pixel coordinates of the feature points in the two images. After removing the scale factor, the coordinates are formed about... The linear equations are solved by singular value decomposition to obtain the least squares solution, thus obtaining the optimal three-dimensional coordinates of the feature points in the robot arm's base coordinate system.
[0084] Then, dimensional and positional accuracy calculations are performed. After unifying the extracted measured feature points to the robot arm's base coordinate system, various geometric parameters of the workpiece under test are calculated. All feature point coordinates are three-dimensional coordinates in the robot arm's base coordinate system, with units in millimeters.
[0085] For any two holes and ,in For the first The three coordinate components of the center of each hole in the base coordinate system. For the first The coordinate components of the center of each hole. Their spatial distance is:
[0086] ;
[0087] When two holes are located on different planes after bending, the coordinates of the two holes can be unified into the same coordinate system by multi-view measurement with a robotic arm. This formula is still applicable, thus accurately measuring the distance between holes on different planes.
[0088] Aperture measurement uses least-squares circle fitting, assuming the set of points at the aperture edge is... ,in For the first The three-dimensional coordinates of each edge point in the base coordinate system (for a planar hole, the edge points can be projected onto the plane of the hole and then fitted with two-dimensional coordinates). The center is... , radius is The objective function is obtained by minimizing it.
[0089] ;
[0090] in, Indicates the first From the edge point to the center of the circle The Euclidean distance. The actual aperture deviation is:
[0091] ;
[0092] in , is the measured aperture. For standard aperture, The hole number.
[0093] For the relative position deviation of the hole, the first definition is... Measured distance of each hole relative to the reference hole or reference edge Distance from standard The difference is:
[0094] ;
[0095] in, Calculated from spatial distance, This is the standard distance between two corresponding feature points in a standard part, recorded during model change calibration.
[0096] When performing deformation detection along the length direction, for the deformation of a bent sheet metal part along its length, multiple feature points or edge points along the workpiece's length direction are collected. The reference line along the workpiece's length direction is assumed to originate from the two endpoints of the standard part. , Confirmed, among which and These are the coordinates of the two endpoints in the base coordinate system, respectively. Direction vector. The reference straight line direction. Actual measurement of the first... edge points The spatial distance to the reference line is:
[0097] ;
[0098] in, The first measured The three-dimensional coordinates of each edge point in the base coordinate system Represents the cross product of vectors. Let represent the magnitude of the vector. The maximum deformation is: , Permissible deformation In comparison, if The workpiece's deformation along its length exceeds the tolerance. Standard allowable deformation amount. It is given by design tolerances or process specifications.
[0099] If flatness needs to be checked, let the standard plane equation be: ,in The unit normal vector of the plane The three components, This is the constant term of the plane equation. The unit normal vector. satisfy The distance from the detection point to the plane is:
[0100] ;
[0101] in, These are the coordinates of the measured point in the base coordinate system. represents vector dot product.
[0102] After data collection, template comparison and comprehensive judgment are performed, and the measured feature set is matched with the standard part feature set . The matching process adopts nearest neighbor search, that is, taking each measured feature point as the center, searching for the nearest standard feature point in the standard part feature set as the corresponding point; when the nearest distance is greater than a preset threshold (e.g., 3 mm), the measured point is considered an extra feature or mis-extracted and is removed. Calculate the spatial deviation for each corresponding feature:
[0103] ;
[0104] where is the base coordinate of the th feature point in the measured data, is the coordinate of the corresponding feature point in the standard part, is the Euclidean distance. Set the tolerance for each inspection item , which is set according to design accuracy requirements, and different feature types (e.g., hole diameter, hole spacing, deformation) correspond to different tolerance values. The individual judgment condition is:
[0105] ;
[0106] The comprehensive quality index is defined as:
[0107] ;
[0108] where is the total number of features participating in the evaluation, is the weight coefficient of the th feature item, satisfying . The weight coefficient is set according to the importance of the feature, for example, the weight of hole diameter can be set to 0.3, the weight of hole spacing to 0.4, and the weight of deformation to 0.3; for critical dimensions, the weight can be increased separately or a one-vote veto threshold can be set. When and all individual items meet the definition of the comprehensive quality index, the workpiece is judged as qualified; otherwise, it is judged as unqualified. The weights and tolerances can be set during model change according to the workpiece design requirements. In addition, the system can also set a one-vote veto item, that is, when the deviation of a certain item exceeds twice its tolerance, it is judged as unqualified regardless of the comprehensive index, to prevent missed detection of serious defects.
[0109] After the inspection is completed, the servo motor of the screw slide conveying mechanism drives the screw to rotate again, and the slide drives the mounting plate to move from the inspection station to the rejection station. The controller outputs a signal to the rejection mechanism according to the judgment result.
[0110] If the workpiece is deemed qualified, the linear motor and the vertical lifting cylinder work in coordination, and the pneumatic gripper picks up the workpiece from the mounting plate and transfers it to the conveyor belt or rack at the qualified product station, from where it is conveyed to the next process.
[0111] If the workpiece is deemed unqualified, the pneumatic gripper picks up the workpiece and moves it above the recycling bin. The gripper is then released, and the workpiece falls into the recycling bin.
[0112] After rejection, the slide table returns the mounting plate to its starting position, awaiting the loading of the next workpiece. Simultaneously, the system saves the inspection data, workpiece number, images, and judgment results to a database for traceability and statistical analysis. The database records include workpiece number, inspection time, measured values, standard values, deviations, judgment results, and corresponding image file paths, supporting subsequent quality traceability and process improvement.
[0113] The work process is as follows:
[0114] First, standard parts are installed, the imaging path and turntable angle are taught, feature points are manually calibrated, and standard parts and inspection paths are generated. Then, loading and positioning are performed; the workpiece to be tested is placed on the mounting plate manually or by the upstream loading equipment, and the positioning fixture is fixed. Next, number reading and position recognition are performed. Number reading involves recording the numbers; the first workpiece inspected from the front is numbered 1, and so on. Then, displacement is detected; the lead screw slide moves the mounting plate to the inspection station. Finally, multi-pose imaging is performed; the turntable rotates in conjunction with the robotic arm to positions such as frontal view, top view, and spatial hole measurement angles, and the vision system acquires images.
[0115] After the data acquisition is completed, image processing and coordinate calculation are performed to extract the hole center and edge features, unify the coordinates, and calculate the hole diameter, hole spacing, spatial distance, and deformation.
[0116] Based on the above comparison process, template comparison and judgment are performed. Finally, the installation plate is moved to the rejection station, and the rejection mechanism transfers qualified and unqualified products to the corresponding positions, and the data is entered into the database.
[0117] This embodiment achieves precise workpiece positioning and multi-angle rotation through a lead screw slide conveyor mechanism and a turntable. A six-degree-of-freedom robotic arm drives a vision system to capture images in multiple specific postures. Combined with hand-eye calibration and multi-view coordinate unification, it can accurately measure the spatial distance between holes on different planes after bending. By collecting standard parts and manually correcting them during changeovers, it enables rapid switching between workpieces of different specifications without the need to change special inspection tools. Through numbered auxiliary marking and automatic sorting, it achieves full inspection and closed-loop control, improving inspection efficiency and accuracy.
[0118] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A vision-based workpiece inspection device, characterized in that, include: Box-type rack; The lead screw slide conveyor mechanism is horizontally arranged inside the box-type frame; A turntable is installed on the slide of the lead screw slide conveyor mechanism, and the rotation axis of the turntable is perpendicular to the horizontal plane; A mounting plate is fixed to the top of the turntable and is used to support the workpiece to be tested. A positioning fixture is provided on the mounting plate. A six-degree-of-freedom robotic arm, the base of which is fixed to the top of the equipment box, the equipment box being located on one side of the box-type frame; A vision inspection system is installed at the end of the robotic arm; The control and image processing system is electrically connected to the lead screw slide conveyor mechanism, turntable, robotic arm and vision inspection system; The robotic arm drives the vision inspection system to acquire images of the workpiece in multiple shooting postures. At the same time, the turntable rotates the mounting plate according to the inspection requirements, so that the surface of the workpiece to be inspected faces the vision inspection system, thereby realizing multi-angle recognition of the workpiece.
2. The vision-based workpiece inspection device according to claim 1, characterized in that, The lead screw slide conveying mechanism includes a lead screw, a linear guide rail, a slide, and a drive motor. The drive motor is connected to the lead screw, the lead screw is arranged parallel to the linear guide rail, the slide is fixedly connected to a nut on the lead screw and slides in cooperation with the linear guide rail, and the drive motor drives the lead screw to rotate through a coupling, thereby causing the slide to reciprocate along the linear guide rail.
3. The vision-based workpiece inspection device according to claim 1, characterized in that, The turntable is driven by a worm gear and can rotate at any angle in the horizontal plane by a servo motor, which is located at the bottom of the turntable.
4. The vision-based workpiece inspection device according to claim 1, characterized in that, The mounting plate is vertically arranged, and a groove is provided on the upper part of the mounting plate for supporting the workpiece to be tested; The positioning fixture includes a positioning pin and elastic jaws. The positioning pin is used to insert into a positioning hole or process hole on the workpiece, and the elastic jaws are used to clamp the edge of the workpiece.
5. The vision-based workpiece inspection device according to claim 1, characterized in that, The visual inspection system includes at least one industrial camera, a fixed-focus lens, and a light source; the light source is coaxially mounted on the front end of the lens.
6. The vision-based workpiece inspection device according to claim 1, characterized in that, The end of the lead screw slide conveyor is equipped with a rejection mechanism, which is located above the end of the lead screw slide's stroke. The rejection mechanism includes a horizontally moving linear motor, a vertically lifting cylinder, and a pneumatic gripper. The linear motor is fixed to the crossbeam of the box-type frame, the vertically lifting cylinder is mounted on the slider of the linear motor, and the pneumatic gripper is mounted on the lower end of the piston rod of the vertically lifting cylinder. It is used to clamp the workpiece from the mounting plate and transfer it to the qualified product station or the recycling bin.
7. The vision-based workpiece inspection device according to claim 6, characterized in that, It also includes a qualified product station and a recycling bin. The qualified product station is located on one side of the rejection station and is a conveyor belt or material rack used to receive qualified workpieces. The recycling bin is located below the other side of the rejection station and is used to collect unqualified workpieces.
8. The vision-based workpiece inspection device according to claim 1, characterized in that, The control and image processing system includes an industrial computer, which internally includes a detection task management module, a motion control module, an image acquisition and processing module, a coordinate calculation and comparison module, a judgment module, and a database module.
9. The vision-based workpiece inspection device according to claim 1, characterized in that, The robotic arm drives the vision inspection system to acquire images in at least three shooting postures: frontal view, top view, and spatial hole position measurement view. In the frontal view, the camera optical axis is approximately perpendicular to the front of the workpiece; in the top view, the camera optical axis is vertically downward to capture the top surface of the workpiece; in the spatial hole position measurement view, the camera optical axis is tilted to the bending surface, so that holes on two different planes are both in the camera's field of view, or the hole positions on two planes are captured twice at different pitch angles, and then unified to the same coordinate system through coordinate transformation.
10. The vision-based workpiece inspection device according to claim 1, characterized in that, The control and image processing system is also used to perform the following calibration and detection steps: During the calibration process, known qualified standard parts are clamped on the mounting plate, and the robotic arm and turntable are taught to move to multiple shooting postures to take pictures. Candidate feature points are automatically extracted and manually corrected. Then, they are converted to the robotic arm base coordinate system according to the hand-eye calibration relationship to form a standard part feature set and generate a detection path file. During the inspection process, the robotic arm and turntable are controlled to move according to the inspection path file and images are acquired. The measured feature points are extracted, unified into the robotic arm base coordinate system, and compared with the feature set of standard parts. The hole diameter, hole spacing, spatial distance and deformation are calculated, and a comprehensive judgment is made based on the preset tolerance.
