Device and method for posture recognition and grasping based on binocular vision

Through the binocular vision system and image processing algorithm, it solves the problem of workpiece identification and grabbing that cannot be loaded by traditional vibrating plates, achieves efficient pose identification and grabbing of workpieces, and improves industrial production efficiency.

CN110509281BInactive Publication Date: 2024-10-11CHINA JILIANG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910870880.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-09-16
Publication Date
2024-10-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In industrial production, traditional vibrating plates are not suitable for loading weak impact tough materials such as soft magnets and ceramic sheets, and manipulators based on monocular vision can only perform simple positioning-grabbing-placement operations, failing to effectively consider The initial and final poses of parts lead to low production efficiency.

Method used

A posture recognition and grasping device based on binocular vision is used. Through the binocular vision system and related image processing and three-dimensional reconstruction algorithms, the posture recognition of the workpiece and the motion trajectory planning of the manipulator are realized, and the workpiece that cannot be loaded on the vibrating plate is completed. Pose recognition and grabbing. The device includes a workpiece transfer module, an image acquisition module and a target workpiece grabbing module. It uses industrial cameras, four-axis manipulators and image processing algorithms to perform image collection, preprocessing, stereo matching and trajectory planning to ensure that the manipulator can efficiently grab workpieces.

Benefits of technology

It achieves pose recognition and efficient grasping of workpieces that cannot be loaded on the vibrating plate, improves industrial production efficiency, and ensures optimal attitude and position handling of workpieces during the grabbing process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110509281B_ABST
    Figure CN110509281B_ABST
Patent Text Reader

Abstract

The present invention discloses a device and method for posture recognition and grasping based on binocular vision. It includes a workpiece transmission module, an image acquisition module and a target workpiece grasping module. The workpiece transmission module transmits the target workpiece to the bottom of the binocular camera through a conveyor belt. When the proximity sensor installed under the binocular vision camera bracket receives the workpiece arrival signal, the conveyor belt stops working, which is convenient for the left and right industrial cameras to collect images; the image acquisition module collects the image and transmits it to the computer, and obtains the posture information of the target workpiece after processing by the image preprocessing algorithm and the posture recognition algorithm, and then processes the posture information, plans the trajectory, and transmits the data to the grasping device; the manipulator in the grasping device grasps the workpiece and places it in the designated area. The present invention can detect the posture information of the target workpiece and perform trajectory planning, and use the grasping device to grasp the target workpiece to improve efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of machine vision, and in particular relates to a device and method for posture recognition and grasping based on binocular vision. Background Art

[0002] Binocular stereo vision is an important form of machine vision. It is based on the principle of parallax and uses imaging equipment to obtain two images of the object under test from different positions. It calculates the position deviation between corresponding points in the images to obtain the three-dimensional geometric information of the object.

[0003] With the rapid development of information technology and robotics, the content covered by robot control technology is becoming more and more abundant. As an emerging digital control device, industrial robots have received widespread attention since their launch. After continuous exploration by experts, scholars and scientific researchers at home and abroad, their functions have been gradually improved. Among them, binocular stereo vision technology is widely used in object recognition, virtual reality, industrial inspection and other fields. Binocular stereo vision technology can flexibly obtain stereo information of objects under various conditions, which has incomparable advantages over monocular vision.

[0004] In industrial production lines, the traditional feeding equipment is a vibration plate, but for soft magnets, ceramic sheets and other weak impact toughness materials, the vibration plate cannot be used for feeding, otherwise it will cause the material to break, crack and other consequences. In the use of industrial manipulators, the general action of the monocular vision manipulator is to adopt the "grab-and-place" action, use monocular vision to perform two-dimensional measurement of parts, and obtain the rotation angle and posture of parts through fixed parameters to achieve the grasping of parts. In the scenario of using binocular vision industrial manipulators, the manipulator's grasping of parts and products only stays at the level of "positioning-grabbing-placing", and the initial and final postures of the products are not considered. Therefore, based on binocular vision, the research on posture recognition of workpieces and robot trajectory planning has great positive significance for improving industrial production efficiency. Summary of the invention

[0005] In order to overcome the shortcomings of the prior art, the present invention proposes a device and method for posture recognition and grasping based on binocular vision, which can complete the posture recognition and grasping of workpieces that cannot be loaded on a vibration plate, including using a binocular vision system and related image processing and three-dimensional reconstruction algorithms, using related image algorithms to perform posture recognition of the workpiece, and planning the motion trajectory of the manipulator to achieve posture recognition and grasping of the workpiece.

[0006] The technical solution adopted by the present invention is as follows:

[0007] 1. A device for posture recognition and grasping based on binocular vision

[0008] It includes a workpiece transmission module, an image acquisition module and a target workpiece grabbing module;

[0009] The workpiece conveying module includes a belt conveyor, a belt conveyor motor driving device and a proximity sensor. A conveyor belt for conveying a target workpiece is installed on the belt conveyor, and a proximity sensor is installed on a belt conveyor frame located on one side of the conveyor belt.

[0010] The image acquisition module includes an industrial camera, a camera bracket, a strip light source and a binocular camera fixture. The camera bracket is fixed on the belt conveyor frame located on both sides of the conveyor belt. A height-adjustable binocular camera fixture is installed between the two sides of the camera bracket. Two CCD industrial cameras are slidably installed on the guide rails of the binocular camera fixture. The two industrial cameras are used to shoot the target workpiece passing through the proximity sensor. The two industrial cameras are a left camera and a right camera respectively; two symmetrically arranged strip light sources are installed at the bottom of both sides of the camera bracket, and the strip light sources are used to provide lighting during image acquisition; the proximity sensor is arranged close to the camera bracket.

[0011] The target workpiece grasping module includes a four-axis manipulator and a control cabinet. The control cabinet is located on one side of the belt conveyor and its height is consistent with the conveyor belt. The height consistency between the control cabinet and the conveyor belt ensures that the height of the target workpiece and the origin of the manipulator coordinate system are consistent, which facilitates coordinate conversion. The four-axis manipulator is fixed to the control cabinet through its base.

[0012] 2. A method for posture recognition and grasping based on binocular vision using the above device

[0013] The following steps are involved:

[0014] Step 1: Adjust the height, shooting angle and distance between the two industrial cameras so that the target workpiece is within the focal length range of the industrial camera;

[0015] The binocular camera fixture moves up and down along the vertical rods on both sides of the camera bracket to adjust the height of the industrial camera. The two industrial cameras move along the guide rails of the binocular camera fixture to adjust the distance between the two industrial cameras. The shooting angle of the industrial camera is adjusted by adjusting the installation angles of the two industrial cameras.

[0016] Step 2: Perform binocular calibration on the left and right cameras according to Zhang Zhengyou calibration method to obtain the camera's internal and external parameter matrix, and perform stereo calibration on the left and right cameras according to the parameter matrix to obtain the calibration map;

[0017] Step 3: Select the Eye-To-Hand calibration mode for the four-axis manipulator and the industrial camera to perform hand-eye calibration to obtain the posture transformation relationship between the camera coordinate system and the manipulator coordinate system;

[0018] Among them, the camera coordinate system is established with the left camera of the industrial camera as the origin, and the manipulator coordinate system is established with the four-axis manipulator base as the origin;

[0019] Step 4: The target workpiece to be grasped is conveyed to the position below the binocular camera through the belt conveyor, and when the proximity sensor receives the signal of the target workpiece, the belt conveyor motor driving device stops the operation of the belt conveyor;

[0020] Step 5: The left and right cameras capture images of the target workpiece passing through the proximity sensor, and transmit the captured images of the target workpiece to the computer;

[0021] Step 6: Use the correction map obtained in step 1 to correct the target workpiece image captured by the left and right cameras, and then perform image segmentation, grayscale transformation, median filtering and edge detection preprocessing on the image in sequence;

[0022] Step 7: Use the NCC similarity measurement algorithm to perform stereo matching on the image preprocessed in step 6, find matching points through the pyramid model of binocular stereo vision, and form a point cloud image formed by collecting the coordinates of all matching points to form a depth map. Perform average depth calculation on the depth map to obtain the three-dimensional coordinates of the target workpiece in the camera coordinate system;

[0023] Step 8: Estimating the attitude of the target workpiece based on Halcon to obtain the attitude information Q of the target workpiece;

[0024] Step 9: Given the initial position and initial posture of the end effector of the four-axis manipulator (i.e., the three-dimensional coordinates and posture information of the end effector in the initial state), the Cartesian position control mode is used for trajectory planning. The Cartesian position control mode performs trajectory planning based on the azimuth angle of the target workpiece relative to the end effector and the three-dimensional coordinates of the target workpiece. The end effector of the four-axis manipulator moves from the initial position to the vicinity of the target workpiece according to the planned trajectory, and during the movement, the end effector is always pointed to the target workpiece, so that the grasping can be performed more efficiently.

[0025] Step 10: When the buffer distance between the end effector of the four-axis manipulator and the target workpiece is d, the posture information of the end effector of the four-axis manipulator is adjusted, and then the end effector of the four-axis manipulator is gradually approached to complete the grasping of the target workpiece;

[0026] Step 11: When the four-axis manipulator grasps the target workpiece, the four-axis manipulator first grasps the target workpiece and moves upward along the Z axis of the manipulator coordinate system by a set distance H. Then, the four-axis manipulator controls the end effector to move to the initial position. Then, after performing inverse kinematic solution on the posture information Q and the posture information of the end effector in the initial state, the manipulator end effector is adjusted back to the initial posture of the end effector. At this time, the target workpiece completes the transfer process from the initial posture to the intermediate posture.

[0027] Step 12: The four-axis manipulator continues to grab the target workpiece to the target stacking table, and the target workpiece is in the end posture, completing the positioning-grasping-placing process of the target workpiece.

[0028] The step eight is specifically as follows: first, SolidWorks is used to draw a 3D image of the target workpiece, and the target workpiece posture in the 3D image is an ideal posture; the 3D image of the workpiece is imported into Halcon and read, and a 3D shape matching template is generated by the create_model_3d() operator in Halcon, and the preprocessed image obtained in step five is matched with the 3D shape matching template by the operator find_shape_model_3d() to obtain the posture information Q of the target workpiece relative to the robot coordinate system.

[0029] The azimuth angle of the target workpiece relative to the end effector in step nine is obtained by the following calculation: first, the three-dimensional coordinates of the target workpiece in the camera coordinate system are converted into the three-dimensional coordinates of the target workpiece in the robot coordinate system through the posture conversion relationship in step two, and the azimuth angle of the target workpiece relative to the end effector is calculated according to the three-dimensional coordinates of the target workpiece and the end effector in the robot coordinate system.

[0030] According to the parameters m, n, and q, the posture information of the end effector of the four-axis manipulator in step 10 is adjusted. The calculation method of the parameters m, n, and q is as follows:

[0031] In the robot coordinate system, the counterclockwise rotation angles of the four-axis robot end effector around the x-axis, y-axis, and z-axis are set to m, n, and q, where m, n, and q are the parameters for controlling the up-down, left-right, and rotational motions of the end effector, respectively.

[0032] Since the end effector always points to the object during the grasping process, the parameter m = α;

[0033] Wherein, m is the rotation angle of the end effector around the x-axis of the manipulator coordinate system (the starting position of the rotation is the z-axis), and α is the azimuth angle of the target workpiece relative to the end effector along the x-axis;

[0034] The parameters n and q are calculated based on the target workpiece's posture information Q, which contains the Euler angles θ of the target workpiece rotating around the x, y, and z axes of the robot coordinate system. x ,θ y ,θ z , so that the rotation angle n of the end effector around the y-axis of the manipulator coordinate system is θ y , the rotation angle q around the z-axis of the robot coordinate system is θ z :

[0035] That is, n = θ y

[0036] q=θ z

[0037] The workpiece coordinate system is a coordinate system established with the target workpiece as the origin.

[0038] The posture information when the end effector of the four-axis manipulator 1 grasps the target workpiece 10 is the same as the posture information Q of the target workpiece 10 in step eight.

[0039] The posture information Q of the target workpiece is transmitted to the control system of the four-axis manipulator 1 based on the TCP / IP protocol SOCKET communication method, so that the four-axis manipulator can complete the grasping of the target workpiece.

[0040] Beneficial effects of the present invention:

[0041] The present invention can complete the posture recognition of workpieces that cannot be loaded on the vibration plate, and use the binocular vision system and related image processing algorithms and three-dimensional reconstruction algorithms to perform posture recognition of the target workpiece to obtain posture information. The posture information includes the posture parameters and position distance of the workpiece, and then the posture information is processed and trajectory planned, and the data is transmitted to the grasping device. The target workpiece is grasped in the optimal posture through trajectory planning and placed on the target stacking table, which improves the efficiency of grasping the target workpiece to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is a schematic diagram of the overall structure of the device of the present invention;

[0043] Figure 2 It is a flow chart of the workpiece conveying device of the present invention;

[0044] Figure 3 It is a flow chart of the binocular vision system working in the present invention;

[0045] Figure 4 is a work flow chart of the grabbing device for the target workpiece in the present invention;

[0046] Figure 5 It is a schematic diagram of the camera coordinate system.

[0047] Figure 6 It is a schematic diagram of the workpiece coordinate system.

[0048] Figure 7 It is a schematic diagram of the robot coordinate system.

[0049] Figure 8 This is a schematic diagram of the position of the four-axis manipulator end effector in the manipulator coordinate system.

[0050] In the figure: 1. Four-axis manipulator, 2. Industrial camera, 3. Camera bracket, 4. Belt conveyor motor drive device, 5. Strip light source, 6. Target workpiece stacking table, 7. Control cabinet, 8. Proximity sensor, 9. Belt conveyor, 10. Target workpiece, 11. Binocular camera fixture. DETAILED DESCRIPTION

[0051] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0052] like Figure 1 As shown, the present invention includes a workpiece conveying module, an image acquisition module and a target workpiece grabbing module; the workpiece conveying module includes a belt conveyor 9, a belt conveyor motor driving device 4 and a proximity sensor 8, a conveyor belt for conveying a target workpiece 10 is installed on the belt conveyor 9, and a proximity sensor 8 is installed on the frame of the belt conveyor 9 located on one side of the conveyor belt; the image acquisition module includes an industrial camera 2, a camera bracket 3, a strip light source 5 and a binocular camera fixture 11, a camera bracket 3 is fixed on the frame of the belt conveyor 9 located on both sides of the conveyor belt, and a binocular camera fixture 11 with adjustable height is installed between the two sides of the camera bracket 3. The binocular camera fixture 11 has two CCD industrial cameras 2 slidably mounted on the guide rail thereof, and the two industrial cameras 2 are used to photograph the target workpiece 10 passing through the proximity sensor 8, and the two industrial cameras 2 are respectively a left camera and a right camera; two symmetrically arranged strip light sources 5 are mounted on the bottom of both sides of the camera bracket 3, and the strip light sources 5 are used to provide lighting during image acquisition; the proximity sensor 8 is arranged close to the camera bracket 3; the target workpiece grasping module includes a four-axis manipulator 1 and a control cabinet 7, and the control cabinet 7 is located on one side of the belt conveyor 9 and its height is consistent with that of the conveyor belt; the four-axis manipulator 1 is fixed to the control cabinet through its base.

[0053] like Figure 2 As shown, the workpiece conveying device conveys the target workpiece 10 to the vicinity of the proximity sensor 8. The proximity sensor 8 detects the approach of the target workpiece 10, generates a signal, and transmits the signal to the belt conveyor motor drive device 4 to stop the conveyor belt motor and the brake, thereby finally stopping the conveyor belt. At this time, the workpiece is near the bottom of the left and right CCD industrial cameras 2, which is convenient for the camera to work and capture images of the workpiece.

[0054] In the image acquisition module, the left and right CCD industrial cameras 2 are fixed on the binocular camera fixture 11, and there is a guide rail on the fixture. The left and right distance and angle of the two CCD industrial binocular cameras 2 can be adjusted manually or using other tools. The left and right CCD industrial cameras 2 in this device are based on the horizontal binocular view.

[0055] Specific implementation method (such as Figure 3 and Figure 4 shown):

[0056] like Figure 5 The gray coordinate system (X, Y, Z) is the camera coordinate system, and the two black two-dimensional coordinate systems are the pixel coordinate systems (x, y) of the left and right cameras. The pixel coordinate system of the left camera is located at (0, 0, 0) of the camera coordinate system, and the pixel coordinate system of the right camera is located at (Tx, 0, 0) of the camera coordinate system. (X, Y, Z) in the figure is a point in the camera coordinate system.

[0057] like Figure 6 The workpiece coordinate system is shown, which is established with the bottom center of the target workpiece as the base point.

[0058] like Figure 7 The figure shows the robot coordinate system, which is established with the center origin of the robot base.

[0059] Step 1: by adjusting the height, shooting angle and distance between the two industrial cameras 2, the target workpiece 10 is located within the focal length range of the industrial camera 2;

[0060] The binocular camera fixture 11 moves up and down along the vertical rods on both sides of the camera bracket 3 to adjust the height of the industrial camera 2. The two industrial cameras 2 move along the guide rails of the binocular camera fixture 11 to adjust the distance between the two industrial cameras 2. The shooting angle of the industrial camera 2 is adjusted by adjusting the installation angles of the two industrial cameras 2.

[0061] Step 2: Perform binocular calibration on the left and right cameras according to Zhang Zhengyou calibration method to obtain the camera's internal and external parameter matrix, and perform stereo calibration on the left and right cameras according to the parameter matrix to obtain the calibration mapping image.

[0062] Step 3: Select the hand-to-eye calibration mode for the four-axis manipulator 1 and the industrial camera 2 to perform hand-eye calibration to obtain the posture transformation relationship between the camera coordinate system and the manipulator coordinate system;

[0063] The camera coordinate system is established with the left camera of the industrial camera as the origin, and the manipulator coordinate system is established with the base of the four-axis manipulator 1 as the origin.

[0064] Step 4: The target workpiece 10 to be grasped is conveyed to the position below the binocular camera by the belt conveyor 9 , and when the proximity sensor 8 receives the signal of the target workpiece 10 , the belt conveyor motor driving device 4 stops the operation of the belt conveyor 9 .

[0065] Step 5: The left and right cameras capture images of the target workpiece 10 passing the proximity sensor 8, and transmit the captured images of the target workpiece to the computer.

[0066] Step 6: Use the correction map obtained in step 1 to correct the target workpiece image captured by the left and right cameras, and then perform image segmentation, grayscale transformation, median filtering and edge detection preprocessing on the image in sequence.

[0067] Step 7: Use the NCC similarity measurement algorithm to perform stereo matching on the image preprocessed in step 6; find matching points through the pyramid model of binocular stereo vision, and form a point cloud image formed by collecting the coordinates of all matching points to form a depth map, and calculate the average depth of the depth map to obtain the three-dimensional coordinates of the target workpiece 10 in the camera coordinate system;

[0068] The NCC similarity measurement algorithm can overcome the effects of uneven lighting in images.

[0069] Step 8: Estimating the posture of the target workpiece 10 based on Halcon to obtain the posture information Q of the target workpiece 10;

[0070] First, use SolidWorks to draw a 3D image of the target workpiece 10. The target workpiece posture in the 3D image is the ideal posture. Import the 3D image of the workpiece into Halcon and read it. Use the create_model_3d() operator in Halcon to generate a 3D shape matching template. Use the find_shape_model_3d() operator to match the preprocessed image obtained in step five with the 3D shape matching template to obtain the posture information Q of the target workpiece 10 relative to the robot coordinate system.

[0071] Step 9: The initial position and initial posture of the end effector of the four-axis manipulator 1 are known (i.e., the three-dimensional coordinates and posture information of the end effector in the initial state are known), and the Cartesian position control mode is used for trajectory planning. The end effector of the four-axis manipulator 1 moves from the initial position to the vicinity of the target workpiece 10 according to the planned trajectory, and the end effector is always pointed to the target workpiece 10 during the movement, so that the grasping can be performed more efficiently;

[0072] The Cartesian position control mode performs trajectory planning based on the azimuth of the target workpiece 12 relative to the end effector and the three-dimensional coordinates of the target workpiece 12 in the camera coordinate system; the azimuth of the target workpiece 12 relative to the end effector is obtained by the following calculation: first, the three-dimensional coordinates of the target workpiece 10 in the camera coordinate system are converted into the three-dimensional coordinates of the target workpiece 10 in the robot coordinate system through the posture conversion relationship in step 2, and the azimuth of the target workpiece 10 relative to the end effector is calculated based on the three-dimensional coordinates of the target workpiece 10 and the end effector in the robot coordinate system.

[0073] Step 10: When the four-axis manipulator 1 approaches the target workpiece 10 during the grasping process, a buffer distance d is set here to prevent the manipulator from touching the workpiece and changing its posture during the posture adjustment process. When the end of the manipulator reaches the vicinity of d, the posture adjustment begins, and then gradually reaches the target point position to complete the grasping. The posture of the end of the manipulator during grasping is Q. The posture information Q of the target workpiece is transmitted to the control system of the four-axis manipulator 1 based on the TCP / IP protocol SOCKET communication method, so that the four-axis manipulator completes the grasping of the target workpiece.

[0074] Adjust the posture information of the end effector of the four-axis manipulator 1 according to the parameters m, n, and q. The calculation method of the parameters m, n, and q is as follows:

[0075] like Figure 8 As shown, in the robot coordinate system, the counterclockwise rotation angles of the end effector of the four-axis robot 1 around the x-axis, y-axis, and z-axis are set to m, n, and q, where m, n, and q are the parameters for controlling the up-down, left-right, and rotational motions of the end effector, respectively;

[0076] Since the end effector always points to the object during the grasping process, the parameter m = α;

[0077] Wherein, m is the rotation angle of the end effector around the x-axis of the manipulator coordinate system with the z-axis as the reference, and α is the azimuth angle of the target workpiece relative to the end effector along the x-axis;

[0078] The parameters n and q are calculated based on the target workpiece's posture information Q, which contains the Euler angle θ of the workpiece coordinate system rotating around the x, y, and z axes of the robot coordinate system. x ,θ y ,θ z , so that the rotation angle n of the end effector around the y-axis of the manipulator coordinate system is θ y , the rotation angle q around the z-axis of the robot coordinate system is θ z :

[0079] That is, n = θ y

[0080] q=θ z

[0081] The workpiece coordinate system is a coordinate system established with the target workpiece as the origin.

[0082] Step 11: When the four-axis manipulator 1 grabs the target workpiece 10, the posture information of the target workpiece 10 is the same as the posture information Q of the target workpiece 10 in step 8. The four-axis manipulator 1 first grabs the target workpiece 10 and moves it upward along the Z axis of the manipulator coordinate system by a set distance H. Then, the four-axis manipulator 1 controls the end effector to move to the initial position, and then adjusts the manipulator end effector back to the initial posture of the end effector after performing inverse kinematic solution on the posture information Q and the posture information of the end effector in the initial state. At this time, the target workpiece 10 completes the transfer process from the initial posture to the intermediate posture.

[0083] Step 12: The four-axis manipulator 1 continues to grab the target workpiece 10 to the target stacking table 6, and the target workpiece 10 is in the end posture, completing the positioning-grasping-placing process of the target workpiece 10.

Claims

1. A method for posture recognition and grasping based on binocular vision, wherein the method adopts a device for posture recognition and grasping based on binocular vision, and the device for posture recognition and grasping based on binocular vision comprises a workpiece conveying module, an image acquisition module and a target workpiece grasping module; The workpiece conveying module comprises a belt conveyor (9), a belt conveyor motor driving device (4) and a proximity sensor (8); a conveyor belt for conveying a target workpiece (10) is installed on the belt conveyor (9); and a proximity sensor (8) is installed on a frame of the belt conveyor (9) located on one side of the conveyor belt; The image acquisition module comprises an industrial camera (2), a camera bracket (3), a strip light source (5) and a binocular camera fixture (11); the camera bracket (3) is fixed on a frame of a belt conveyor (9) located on both sides of the conveyor belt; the binocular camera fixture (11) is installed between the two sides of the camera bracket (3); two industrial cameras (2) are slidably installed on the guide rail of the binocular camera fixture (11); the two industrial cameras (2) are used to photograph a target workpiece (10) passing through a proximity sensor (8); the two industrial cameras (2) are respectively a left camera and a right camera; two strip light sources (5) arranged symmetrically are installed at the bottom of both sides of the camera bracket (3); the proximity sensor (8) is arranged close to the camera bracket (3); The target workpiece grasping module comprises a four-axis manipulator (1) and a control cabinet (7), wherein the control cabinet (7) is located on one side of the belt conveyor (9) and has a height consistent with that of the conveyor belt; the four-axis manipulator (1) is fixed to the control cabinet via its base; It is characterized in that The following steps are involved: Step 1: adjusting the height, shooting angle and distance between the two industrial cameras (2) so that the target workpiece (10) is located within the focal length range of the industrial cameras (2); Step 2: Perform binocular calibration on the left and right cameras according to Zhang Zhengyou calibration method to obtain the camera's internal and external parameter matrix, and perform stereo calibration on the left and right cameras according to the parameter matrix to obtain the calibration map; Step 3: Select the hand-to-eye calibration mode for the four-axis manipulator (1) and the industrial camera (2) to perform hand-eye calibration, and obtain the posture transformation relationship between the camera coordinate system and the manipulator coordinate system; The camera coordinate system is established with the left camera of the industrial camera as the origin, and the manipulator coordinate system is established with the base of the four-axis manipulator (1) as the origin; Step 4: The target workpiece (10) to be grasped is conveyed to the position below the binocular camera by the belt conveyor (9), and when the proximity sensor (8) receives a signal of the target workpiece (10), the belt conveyor motor driving device (4) stops the operation of the belt conveyor (9); Step 5: The left and right cameras capture an image of the target workpiece (10) passing the proximity sensor (8), and transmit the captured image of the target workpiece to a computer; Step 6: Use the correction map obtained in step 1 to correct the target workpiece image captured by the left and right cameras, and then perform image segmentation, grayscale transformation, median filtering and edge detection preprocessing on the image in sequence; Step 7: Use the NCC similarity measurement algorithm to perform stereo matching on the image preprocessed in step 6, find matching points through the pyramid model of binocular stereo vision, and form a point cloud image formed by collecting the coordinates of all matching points to form a depth map. Perform average depth calculation on the depth map to obtain the three-dimensional coordinates of the target workpiece (10) in the camera coordinate system; Step 8: Estimating the posture of the target workpiece (10) based on Halcon to obtain posture information Q of the target workpiece (10); Step 9: Given the initial position and initial posture of the end effector of the four-axis manipulator (1), a Cartesian position control mode is used for trajectory planning. The Cartesian position control mode performs trajectory planning based on the azimuth angle of the target workpiece (10) relative to the end effector and the three-dimensional coordinates of the target workpiece (10). The end effector of the four-axis manipulator (1) moves from the initial position to the vicinity of the target workpiece (10) according to the planned trajectory, and during the movement, the end effector is always pointed to the target workpiece (10); Step 10: When the buffer distance between the end effector of the four-axis manipulator (1) and the target workpiece (10) is d, the posture information of the end effector of the four-axis manipulator (1) is adjusted, and then the end effector approaches the target workpiece (10) in a gradual manner to complete the grasping; Step 11: When the four-axis manipulator (1) grasps the target workpiece (10), the four-axis manipulator (1) first grasps the target workpiece (10) and moves upward along the Z axis of the manipulator coordinate system by a set distance H, and then the four-axis manipulator (1) controls the end effector to move to the initial position, and then adjusts the manipulator end effector back to the initial posture of the end effector after performing inverse kinematic solution on the posture information Q and the posture information of the end effector in the initial state. At this time, the target workpiece (10) completes the transfer process from the initial posture to the intermediate posture; Step 12: The four-axis manipulator (1) continues to grab the target workpiece (10) to the target stacking platform (6), and the target workpiece (10) is in the end posture.

2. The method for posture recognition and grasping based on binocular vision according to claim 1, characterized in that: The step eight is specifically as follows: first, SolidWorks is used to draw a 3D image of the target workpiece (10); the 3D image of the workpiece is imported into Halcon and read, a create_model_3d() operator in Halcon is used to generate a 3D shape matching template, and the operator find_shape_model_3d() is used to match the preprocessed image obtained in step five with the 3D shape matching template to obtain the posture information Q of the target workpiece (10).

3. The method for posture recognition and grasping based on binocular vision according to claim 1, characterized in that: The azimuth angle of the target workpiece (12) relative to the end effector in step nine is obtained by the following calculation: first, the three-dimensional coordinates of the target workpiece (10) in the camera coordinate system are converted into the three-dimensional coordinates of the target workpiece (10) in the manipulator coordinate system through the posture conversion relationship in step two, and the azimuth angle of the target workpiece (10) relative to the end effector is calculated based on the three-dimensional coordinates of the target workpiece (10) and the end effector in the manipulator coordinate system.

4. The method for posture recognition and grasping based on binocular vision according to claim 1, characterized in that: According to the parameters m, n, q, the posture information of the end effector of the four-axis manipulator (1) in step 10 is adjusted. The calculation method of the parameters m, n, q is as follows: In the robot coordinate system, the counterclockwise rotation angles of the end effector of the four-axis robot (1) around the x-axis, y-axis, and z-axis are set to m, n, and q, where m, n, and q are the parameters for controlling the up-down, left-right, and rotational motions of the end effector, respectively; Since the end effector always points to the object during the grasping process, the parameter m = α; Wherein, m is the rotation angle of the end effector around the x-axis of the manipulator coordinate system, and α is the azimuth angle of the target workpiece relative to the end effector along the x-axis; The parameters n and q are calculated based on the target workpiece's posture information Q, which contains the Euler angles θ of the target workpiece rotating around the x, y, and z axes of the robot coordinate system. x ,θ y ,θ z , so that the rotation angle n of the end effector around the y-axis of the manipulator coordinate system is θ y , the rotation angle q around the z-axis of the robot coordinate system is θ z : That is, n=θ y q=θ z The workpiece coordinate system is a coordinate system established with the target workpiece as the origin.

5. The method for posture recognition and grasping based on binocular vision according to claim 1, characterized in that: The posture information of the end effector of the four-axis manipulator (1) when grasping the target workpiece (10) is the same as the posture information Q of the target workpiece (10) in step eight.

6. The method for posture recognition and grasping based on binocular vision according to claim 1, characterized in that: The posture information Q of the target workpiece is transmitted to the control system of the four-axis manipulator (1) based on the TCP / IP protocol SOCKET communication method.