An automatic method and system for recognizing the cap of a slotted screw based on visual recognition technology
The visual recognition-based method and system address alignment issues in one-sided slotted screws by establishing a coordinated relationship between screw and driver bit systems, ensuring precise and efficient automatic screw cap recognition and reduced wear.
Patent Information
- Application Number
- CN202210730688.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-24
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-06-24
AI Technical Summary
The existing cap recognition technology is difficult to effectively solve the eccentric error and easy slippage of the flat screw, which affects the automatic assembly of the flat screw.
The automatic cap recognition method based on visual recognition technology is adopted. By building an automatic cap recognition device, using the robotic arm and the visual recognition system, an angle and coordinate conversion relationship is established to achieve accurate docking between the batch head and the square screw.
The automatic cap recognition of the flat screws is realized, which improves assembly accuracy and efficiency, reduces screw wear, enhances the suitability of various tolerance screws, and ensures that the batch head is accurately inserted into the flat slot.
Smart Images

Figure CN115222803B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method and system for automatically recognizing the head of a flat-head screw based on vision recognition technology, and belongs to the field of automatic assembly. Background Art
[0002] The technology of automatically tightening screws is the basis for realizing automatic assembly, and has become a key link to improve the productivity of the entire mechanical manufacturing system, reduce costs, and stabilize product quality. It can effectively improve the consistency of assembly accuracy, get rid of simple and heavy manual assembly labor, and avoid harsh or dangerous assembly environments and other advantages. In order to realize the automatic tightening and assembly of screws, screw head recognition needs to be carried out first. The existing head recognition technologies mainly target screws of types such as cross and hexagon socket. Due to problems such as large alignment errors and easy slippage of flat-head screws, it is easy to scratch the screws or parts, and there is still a lack of a stable and reliable head recognition method, thus affecting the research and application of the automatic assembly of flat-head screws. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to overcome the problems of eccentric error of the flat groove of the screw and easy slippage of head recognition, and provide a method and system for recognizing the head of a flat-head screw based on vision recognition technology to realize the automatic head recognition and automatic tightening and assembly of flat-head screws.
[0004] The technical solution of the present invention is as follows:
[0005] A method for automatically recognizing the head of a flat-head screw based on vision recognition technology includes:
[0006] (1) Build the hardware environment of the automatic head recognition device, including a robotic arm and a workbench for assembling products; a screw vision recognition system and an automatic tightening tool are fixed on the robotic arm. There is a connection port for placing a bit at the end of the automatic tightening tool. The relative positions between the screw vision recognition system and the automatic tightening tool remain fixed and move synchronously with the robotic arm; a bit vision recognition system is fixed on the workbench for assembling products, and the lens of the bit vision recognition system is vertically upward.
[0007] (2) Place a bit of any specification on the connection port at the end of the automatic tightening tool, control the movement of the robotic arm to make the bit within the field of view of the bit vision recognition system; take pictures and recognize the bit to obtain the rectangular contour template of this bit at different angles; take pictures and recognize the flat-head screw to obtain the minimum circumscribed rectangular contour template of this flat-head screw at different angles.
[0008] (3) Establish the angle conversion relationship between the bit vision recognition system and the screw vision recognition system to obtain the angle difference Δα' between the bit vision recognition system and the screw vision recognition system; establish the coordinate conversion relationship between the screw vision recognition system and the robotic arm.
[0009] (4) Replace the bit of the cap to be recognized. The specification of the bit is the same as that of the slotted screw of the cap to be recognized, and calculate the angular value α1 of this bit in the bit vision recognition system;
[0010] (5) Calculate the angular value α2 and the position coordinates (x, y) of the slotted screw of the cap to be recognized in the screw vision recognition system;
[0011] (6) Calculate the initial angular difference between the bit and the slotted screw, and calculate the angular compensation value according to the angular difference obtained in step (3); According to the coordinate conversion relationship obtained in step (3), calculate the position coordinates (X, Y) of the slotted screw in the robot arm coordinate system; Control the bit to rotate to compensate for the angular difference, control the robot arm to move to the coordinate position (X, Y) in the robot arm coordinate system, and insert the bit into the slotted screw to achieve automatic cap recognition for the first slotted screw;
[0012] (7) For other slotted screws with the same specification as the currently recognized screw, repeat steps (5) and (6) to achieve automatic cap recognition; For slotted screws with different specifications from the currently recognized screw, it is necessary to replace the corresponding bit, and then repeat steps (4), (5), and (6) to achieve automatic cap recognition.
[0013] Preferably, step (2) includes:
[0014] (21) Photograph the bit on the robot arm, and intercept the area containing the bit in the photographed picture; Rotate the intercepted area from 0 degrees to 180 degrees, rotate the same degree each time and the degree is not greater than 1 degree, and recognize the rectangular contour of the bit after each rotation; Store all the rectangular contours as bit templates, and record the rotation angle of each template relative to 0 degrees;
[0015] (22) Photograph the slotted screw, and intercept the area containing the screw slot of the screw in the photographed picture; Rotate the intercepted area from -180 degrees to 180 degrees, the degree of rotation each time is the same as the degree of rotation of the bit intercepted area in (21), recognize the contour of the screw slot after each rotation, and find the minimum circumscribed rectangle of the contour; Store all the minimum circumscribed rectangles as slotted screw templates, and record the rotation angle of each template relative to 0 degrees.
[0016] Preferably, step (3) includes:
[0017] (31) Without rotating the angle of the bit, manually adjust the angle of the slotted screw, and control the robot arm to insert the bit into the slotted screw; Keep the angle between the bit and the slotted screw unchanged, and then control the robot arm to place the slotted screw within the field of view of the screw recognition system;
[0018] (32) The screw recognition system takes a photo of the straight slot screw, intercepts the area containing the straight slot of the screw in the captured image, and recognizes the minimum circumscribed rectangle of the contour of the straight slot of the screw;
[0019] (33) Perform an image pyramid operation on this minimum circumscribed rectangle, separately perform model matching between the completed image and all straight slot screw templates, obtain multiple corresponding matching results, and find the maximum value among the matching results;
[0020] (34) The rotation angle corresponding to this maximum value is the angle value of the screw under the screw recognition system, denoted as α'2;
[0021] (35) According to the minimum circumscribed rectangle recognized in (32), calculate the center point coordinates of the minimum circumscribed rectangle, which are the position coordinates of the screw under the screw recognition system, denoted as (x1, y1);
[0022] (36) Calculate the coordinate system angle difference between the bit visual recognition system and the screw visual recognition system, Δα' = 0 - α'2, and Δα' is the coordinate system angle difference between the above two recognition systems;
[0023] (37) Control the robotic arm to move a distance of ΔX' along the X-axis of the robotic arm coordinate system, perform step (32), calculate the center point coordinates of the minimum circumscribed rectangle, which are the position coordinates of the screw under the screw recognition system, denoted as (x2, y2), the abscissa difference Δx = x2 - x1, and the ordinate difference Δy = y2 - y1;
[0024] (38) Calculate the offset angle α and calibration value k of the robotic arm coordinate system according to the following formula:
[0025] Offset angle:
[0026]
[0027] Calibration value:
[0028]
[0029] (39) Obtain the conversion relationship between the coordinates (X, Y) of the robotic arm coordinate system and the coordinates (x, y) of the screw visual recognition system, as shown below:
[0030] X = k * (y * sinα + x * cosα)
[0031] Y = k * (y * cosα - x * sinα).
[0032] Preferably, the step (4) includes:
[0033] (41) Control the robotic arm to move the bit into the field of view of the bit vision recognition system. The bit vision recognition system takes a photo of the bit, intercepts the area containing the bit in the captured picture, and recognizes the rectangular contour of the bit.
[0034] (42) Perform image pyramid operation on the rectangular contour, and perform model matching calculation on the image after the operation with all bit templates to obtain the matching result.
[0035] (43) Find the maximum value in the matching result. The rotation angle corresponding to this maximum value is the angle value of the bit in the coordinate system of the bit vision recognition system, denoted as α1.
[0036] Preferably, the step (5) includes:
[0037] Repeat steps (32) and (33). The rotation angle corresponding to the maximum value is the angle value of the slotted screw in the coordinate system of the screw vision recognition system, denoted as α2, and calculate the center point coordinates of the minimum circumscribed rectangle, which is the position coordinate of the screw in the screw recognition system, denoted as (x, y).
[0038] Preferably, the step (6) includes:
[0039] (61) Calculate the initial angle difference between the bit and the slotted screw: Δα = α1 - α2;
[0040] (62) According to the position coordinates (x, y) in the screw recognition system, calculate through the formula deduced in (39) of step (3) to obtain the position coordinates (X, Y) of the screw in the robotic arm coordinate system;
[0041] (63) Control the bit to rotate by the angle compensation value of Δα - Δα' for compensation;
[0042] (64) Control the robotic arm to move to the position of coordinates (X, Y), insert the slotted screw, and realize cap recognition.
[0043] Preferably, the screw is a slotted screw that meets the national standard requirements.
[0044] Preferably, the bit vision recognition system includes a camera, a light source, and a lens, and the camera resolution is not less than 1920×1200.
[0045] Preferably, the screw vision recognition system includes a camera, a light source, and a lens, and the camera resolution is not less than 1920×1200.
[0046] A slotted screw automatic cap recognition system based on vision recognition technology includes the above-mentioned hardware environment and a controller, and the controller is used to control the automatic operations in the above steps (2) to (7) except for manual operations.
[0047] The present invention has the following beneficial effects compared with the prior art:
[0048] (1) The cap recognition method and system provided by the present invention can automatically recognize and cap the slotted screws, without any requirements for the material of the screws and the position accuracy of the slotted grooves, and can accurately and automatically recognize and cap the slotted screws with various tolerances.
[0049] (2) For the cap recognition method and system provided by the present invention, only the first screw needs to be recognized and calibrated for capping, and then the screws of the same specification can be quickly recognized and capped; for the screws of different specifications, the bit needs to be manually replaced, and after re-identifying the bit angle, they can also be quickly recognized and capped.
[0050] (3) The cap recognition method and system provided by the present invention can effectively reduce the wear of the screws during the cap recognition process and improve the torque control accuracy of the screws. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 is a flowchart of the automatic cap recognition method provided by the present invention.
[0052] Figure 2 is a schematic diagram of the positions of the screw vision recognition system and the automatic tightening device in the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0053] The following will describe in detail a method for automatically recognizing and capping slotted screws based on vision recognition technology according to the present invention in conjunction with the drawings and specific embodiments.
[0054] A method and system for automatically recognizing and capping slotted screws based on vision recognition technology provided by the present invention controls the robotic arm to complete automatic calibration and compensation through machine vision recognition and coordinate transformation, so as to realize the automatic capping of slotted screws. This method has strong adaptability and can accurately recognize and cap slotted screws with various tolerances.
[0055] A method for automatically recognizing and capping slotted screws based on vision recognition technology, the method for recognizing and capping the first slotted screw is as Figure 1 shown, and the specific steps are as follows:
[0056] Step 1: Build the hardware of the automatic cap recognition device. As Figure 2As shown in the figure, it includes a robotic arm and a workbench for assembling products; a screw vision recognition system and an automatic screwing tool are fixed on the robotic arm. There is a connection port for placing a bit at the end of the automatic screwing tool. The relative positions between the screw vision recognition system and the automatic screwing tool remain fixed and move synchronously with the robotic arm. A bit vision recognition system is fixed on the workbench for assembling products, and the lens of the bit vision recognition system is vertically upward. Among them, on the assembled product, at the position where a slotted screw needs to be installed, a slotted screw of the corresponding specification that needs to recognize the cap is placed loosely; the slotted screw is a slotted screw that meets the national standard requirements. Both the bit vision recognition system and the vision recognition system include a camera, a light source, and a lens, and the resolution of the camera is not less than 1920×1200.
[0057] Step 2: Place a bit of any specification on the connection port at the end of the automatic screwing tool, control the movement of the robotic arm to make the bit within the field of view of the bit vision recognition system; take pictures and recognize the bit to obtain the rectangular contour template of this bit at different angles; take pictures and recognize the slotted screw to obtain the minimum circumscribed rectangle contour template of this slotted screw at different angles. The specific content is as follows:
[0058] (21) Take pictures of the bit on the robotic arm, intercept the area containing the bit in the taken picture; rotate the intercepted area from 0 degrees to 180 degrees, rotate the same degree each time and the degree is not greater than 1 degree, and recognize the rectangular contour of the bit after each rotation; store all the rectangular contours as the bit template, and record the rotation angle of each template relative to 0 degrees; according to this bit template, the bit angle recognition accuracy can be better than 1 degree.
[0059] (22) Take pictures of the slotted screw, intercept the area containing the screw slot in the taken picture; rotate the intercepted area from -180 degrees to 180 degrees, the degree of rotation each time is the same as the degree of rotation of the bit intercepted area in (21), recognize the screw slot contour after each rotation, and find the minimum circumscribed rectangle of the contour; store all the minimum circumscribed rectangles as the slotted screw template, and record the rotation angle of each template relative to 0 degrees. According to this slotted screw template, the bit angle recognition accuracy can be better than 1 degree.
[0060] Step 3: Establish the angle conversion relationship between the bit vision recognition system and the screw vision recognition system to obtain the angle difference Δα' between the bit vision recognition system and the screw vision recognition system; establish the coordinate conversion relationship between the screw vision recognition system and the robotic arm. The specific content is as follows:
[0061] (31) Without rotating the angle of the bit, manually adjust the angle of the slotted screw, and control the robotic arm to insert the bit into the slotted screw; keeping the angle between the bit and the slotted screw unchanged, control the robotic arm again to place the slotted screw within the field of view of the screw recognition system;
[0062] (32) The screw recognition system takes a photo of the slotted screw, intercepts the area containing the screw slot in the captured image, and recognizes the minimum circumscribed rectangle of the contour of the screw slot;
[0063] (33) Perform an image pyramid operation on this minimum circumscribed rectangle, respectively perform model matching between the image after the operation and all slotted screw templates, obtain multiple corresponding matching results, and find the maximum value among the matching results;
[0064] By using the image pyramid operation, it can meet the requirements that slotted screws of different sizes to be recognized can be accurately matched with a screw template of a certain specification in the template. Therefore, the size specifications of the slotted screws to be recognized for matching and the slotted screws used in the screw templates do not need to be the same, enhancing the applicability.
[0065] (34) The rotation angle corresponding to this maximum value is the angle value of the slotted screw under the screw recognition system, denoted as α'2;
[0066] (35) According to the minimum circumscribed rectangle recognized in (32), calculate the center point coordinates of the minimum circumscribed rectangle, which are the position coordinates of the slotted screw under the screw recognition system, denoted as (x1, y1);
[0067] The vision recognition system coordinate system refers to a two-dimensional rectangular coordinate system that reflects the pixel arrangement of the camera. The origin O is located at the upper left corner of the image, and the x-axis and y-axis are respectively parallel to the two sides of the image plane. This coordinate system is the coordinate system owned by the screw recognition system. In this step, since the center point coordinates of the minimum circumscribed rectangle of the slotted screw are recognized, the recognition accuracy of the slotted screw position coordinates is better than 50μm, and the bit cap recognition accuracy is independent of the eccentricity error of the screw slot and can be unaffected by the eccentricity error.
[0068] (36) Calculate the angle difference between the bit vision recognition system and the screw vision recognition system, Δα' = 0 - α'2, and Δα' is the angle difference between the above two recognition systems;
[0069] (37) Control the robotic arm to move a distance of ΔX' along the X-axis of the robotic arm coordinate system, perform step (32), calculate the center point coordinates of the minimum circumscribed rectangle, which are the position coordinates of the screw under the screw recognition system, denoted as (x2, y2), the abscissa difference Δx = x2 - x1, and the ordinate difference Δy = y2 - y1;
[0070] The robotic arm coordinate system refers to the coordinate system with the robotic arm mounting base as the reference. It varies slightly depending on the robotic arm brand. Generally, the positive direction of the X-axis is the front of the base, and the positive direction of the Y-axis is the left side of the robotic arm base.
[0071] (38) The offset angle α and calibration value k of the robotic arm coordinate system are calculated according to the following formula:
[0072] Offset angle:
[0073]
[0074] Calibration value:
[0075]
[0076] (39) The conversion relationship between the coordinates (X, Y) of the robotic arm coordinate system and the coordinates (x, y) of the screw vision recognition system is obtained as follows:
[0077] X = k * (y * sinα + x * cosα)
[0078] Y = k * (y * cosα - x * sinα)
[0079] Step Four: Replace the bit of the cap to be recognized. The specification of the bit is the same as that of the slotted screw of the cap to be recognized, and calculate the angle value α1 of this bit in the bit vision recognition system.
[0080] (41) Control the robotic arm to move the bit into the field of view of the bit vision recognition system. The bit vision recognition system takes a photo of this bit, intercepts the area containing the bit in the captured picture, and recognizes the rectangular contour of the bit;
[0081] (42) Perform image pyramid operation on the rectangular contour, and perform model matching calculation on the image after the operation with all bit templates to obtain the matching result;
[0082] (43) Find the maximum value in the matching result. The rotation angle corresponding to this maximum value is the angle value of the bit in the bit vision recognition system coordinate system, denoted as α1;
[0083] Step Five: Calculate the angle value α2 and position coordinates (x, y) of the slotted screw of the cap to be recognized in the screw vision recognition system.
[0084] Repeat steps (32)(33). The rotation angle corresponding to the maximum value is the angle value of the slotted screw in the screw vision recognition system coordinate system, denoted as α2, and calculate the center point coordinates of the minimum bounding rectangle, which is the position coordinates of the screw in the screw recognition system, denoted as (x, y).
[0085] Step 6: Calculate the initial angle difference between the bit and the slotted screw, and calculate the angle compensation value according to the coordinate conversion relationship obtained in Step 3; according to the coordinate conversion relationship obtained in Step 3, calculate the position coordinates (X, Y) of the slotted screw in the robot coordinate system; control the bit to rotate by the compensated angle difference, and control the robot to move to the coordinate position (X, Y) in the robot coordinate system, and insert the bit into the slotted screw to achieve automatic cap recognition of the first slotted screw. Since the angle recognition accuracy of the bit and the screw angle recognition accuracy are both better than 1°, after compensating the angle difference, the angle difference between the bit and the screw is less than 2°. The specific content is as follows:
[0086] (61) Calculate the initial angle difference between the bit and the slotted screw: Δα = α1 - α2;
[0087] (62) According to the position coordinates (x, y) in the screw recognition system, calculate through the formula derived in (39) of step (3) to obtain the position coordinates (X, Y) of the screw in the robot coordinate system;
[0088] (63) Control the bit to rotate by the angle compensation value of Δα - Δα' for compensation;
[0089] (64) Control the robot to move to the coordinate position (X, Y), insert the bit into the slotted screw to achieve cap recognition, and tighten the first slotted screw according to the required torque. After tightening, the automatic tightening device rotates the bit back to the bit angle obtained in Step 4, that is, when the bit is not angle-compensated, the angle α1 of the bit in the bit vision recognition system.
[0090] For other slotted screws with the same specification as the currently cap-recognized screw, automatic cap recognition is achieved by repeating Steps 5 and 6; for slotted screws with different specifications from the currently cap-recognized screw, the corresponding bit needs to be replaced, and then Steps 4, 5, and 6 are repeated to achieve automatic cap recognition.
[0091] An automatic cap recognition system for slotted screws based on vision recognition technology, including the hardware environment and controller described in Step 1. The controller is used to control the robot movement, the recognition and angle value calculation of the bit photo to be cap-recognized, the recognition and angle value and position coordinate calculation of the bit photo to be cap-recognized, the calculation of the angle conversion relationship between the bit vision recognition system and the screw vision recognition system, the coordinate conversion calculation between the screw vision recognition system and the robot, and the operation of the automatic tightening device, except for manual operations, in Steps 2 to 6.
[0092] The slotted screw cap recognition method and system proposed by the present invention have a screw center coordinate recognition accuracy better than 50 μm and an angle difference less than 2°, which can meet the cap recognition accuracy of national standard screws. Therefore, during the automatic cap recognition process, the bit will not rub against the inner side of the slotted groove and the top of the nut, and can accurately enter the slotted groove without slipping.
[0093] As described above, it is only the best specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
[0094] The content not described in detail in the specification of the present invention belongs to the well-known technology of those skilled in the art.
Claims
1. An automatic method for recognizing the head of a straight screw based on visual recognition technology, characterized in that, The method includes: (1) Building the hardware environment of the automatic cap recognition device, including a robotic arm and a workbench for assembling products; a screw vision recognition system and an automatic tightening tool are fixed on the robotic arm, and there is a connection port for placing a bit at the end of the automatic tightening tool. The relative positions between the screw vision recognition system and the automatic tightening tool remain fixed and move synchronously with the robotic arm; a bit vision recognition system is fixed on the workbench for assembling products, and the lens of the bit vision recognition system is vertically upward. (2) Place a bit of any specification on the connection port at the end of the automatic tightening tool, control the movement of the robotic arm to make the bit within the field of view of the bit vision recognition system; take a photo and recognize the bit to obtain a bit template; take a photo and recognize a slotted screw to obtain a slotted screw template. (3) Establish the angle conversion relationship between the bit vision recognition system and the screw vision recognition system to obtain the angle difference Δα' between the bit vision recognition system and the screw vision recognition system; establish the coordinate conversion relationship between the screw vision recognition system and the robotic arm. (4) Replace the bit to be recognized for capping, where the specification of the bit is the same as that of the slotted screw to be recognized for capping, and calculate the angle value α1 of this bit in the bit vision recognition system. (5) Calculate the angle value α2 and the position coordinates (x, y) of the slotted screw to be recognized for capping in the screw vision recognition system. (6) Calculate the initial angle difference between the bit and the slotted screw, and calculate the angle compensation value based on the angle difference obtained in step (3); calculate the position coordinates (X, Y) of the slotted screw in the robotic arm coordinate system according to the coordinate conversion relationship obtained in step (3); control the bit to rotate to compensate for the angle difference, control the robotic arm to move to the coordinate position (X, Y) in the robotic arm coordinate system, insert the bit into the slotted screw to achieve automatic capping of the first slotted screw, and tighten the screw according to the required torque. (7) For other slotted screws with the same specification as the currently capped screw, achieve automatic capping by repeating steps (5) and (6); for slotted screws with a different specification from the currently capped screw, replace the corresponding bit and then repeat steps (4), (5), and (6) to achieve automatic capping.
2. The method for automatically recognizing the cap of a cross-recessed screw according to claim 1, characterized in that The step (2) includes: (21) Take a photo of the bit on the robotic arm, and intercept the area containing the bit in the taken photo; rotate the intercepted area from 0 degrees to 180 degrees, rotate the same degree each time and the degree is not greater than 1 degree, and recognize the rectangular contour of the bit after each rotation; store all the rectangular contours as the bit template, and record the rotation angle of each template relative to 0 degrees. (22) Take a photo of the slotted screw, and intercept the area containing the screw slot in the taken photo; rotate the intercepted area from -180 degrees to 180 degrees, the degree of rotation each time is the same as that of the bit intercepted area rotation in (21), recognize the contour of the screw slot of the slotted screw after each rotation, and find the minimum circumscribed rectangle of the contour; store all the minimum circumscribed rectangles as the slotted screw template, and record the rotation angle of each template relative to 0 degrees.
3. The automatic cap recognition method for a cross recessed screw according to claim 2, characterized in that, The step (3) includes: (31) Without rotating the angle of the bit, manually adjust the angle of the slotted screw, and control the robotic arm to insert the bit into the slotted screw; while keeping the angle between the bit and the slotted screw unchanged, control the robotic arm again to place the slotted screw within the field of view of the screw recognition system. (32) The screw recognition system takes a photo of the slotted screw, intercepts the area containing the slotted groove of the slotted screw in the captured image, and recognizes the minimum circumscribed rectangle of the contour of the slotted groove of the screw. (33) Perform an image pyramid operation on this minimum circumscribed rectangle, respectively perform model matching between the completed image and all slotted screw templates, obtain multiple corresponding matching results, and find the maximum value among the matching results. (34) The rotation angle corresponding to this maximum value is the angle value of the slotted screw under the screw recognition system, denoted as α'2. (35) According to the minimum circumscribed rectangle recognized in (32), calculate the center point coordinates of the minimum circumscribed rectangle, which are the position coordinates of the slotted screw under the screw recognition system, denoted as (x1, y1). (36) Calculate the coordinate system angle difference between the bit vision recognition system and the screw vision recognition system, Δα' = 0 - α'2, and Δα' is the coordinate system angle difference between the above two recognition systems. (37) Control the robotic arm to move a distance of ΔX' along the X-axis of the robotic arm coordinate system, perform step (32), calculate the center point coordinates of the minimum circumscribed rectangle, which are the position coordinates of the slotted screw under the screw recognition system, denoted as (x2, y2), the abscissa difference Δx = x2 - x1, and the ordinate difference Δy = y2 - y1. (38) Calculate the offset angle α and calibration value k of the robotic arm coordinate system according to the following formula: Offset angle: Calibration value: (39) Obtain the conversion relationship between the coordinates (X, Y) of the robotic arm coordinate system and the coordinates (x, y) of the screw vision recognition system, as shown below: X = k * (y * sinα + x * cosα) Y = k * (y * cosα - x * sinα).
4. The automatic cap recognition method for a slotted screw based on visual recognition technology according to claim 3, characterized in that, The said step (4) includes: (41) Control the robotic arm to move the bit into the field of view of the bit vision recognition system. The bit vision recognition system takes a photo of this bit, intercepts the area containing the bit in the captured image, and recognizes the rectangular contour of the bit. (42) Perform an image pyramid operation on the rectangular contour, perform model matching calculation between the completed image and all bit templates, and obtain the matching results. (43) Find the maximum value among the matching results. The rotation angle corresponding to this maximum value is the angle value of the bit under the bit vision recognition system coordinate system, denoted as α1.
5. The automatic cap recognition method for a straight screw based on visual recognition technology according to claim 3, characterized in that The said step (5) includes: Repeat steps (32) and (33). The rotation angle corresponding to the maximum value is the angle value of the slotted screw under the screw vision recognition system coordinate system, denoted as α2, and calculate the center point coordinates of the minimum circumscribed rectangle, which are the position coordinates of the slotted screw under the screw recognition system, denoted as (x, y).
6. The automatic cap recognition method for a slotted screw based on visual recognition technology according to claim 3, characterized in that, The said step (6) includes: (61) Calculate the initial angle difference between the bit and the slotted screw: Δα = α1 - α2; (62) Calculate the position coordinates (X, Y) of the slotted screw in the robotic arm coordinate system according to the position coordinates (x, y) under the screw recognition system through the formula deduced in (39) of step (3). (63) Control the angle compensation value of the bit rotation by Δα - Δα' for compensation. (64) Control the robotic arm to move to the position of coordinates (X, Y), insert the slotted screw, and achieve cap recognition.
7. A method for automatically recognizing the cap of a slotted screw based on visual recognition technology according to claim 1, characterized in that, The slotted screw is a slotted screw that meets the national standard requirements.
8. A method for automatically recognizing the cap of a straight screw based on visual recognition technology according to claim 1, characterized in that, The bit vision recognition system includes a camera, a light source, and a lens, and the camera resolution is not less than 1920×1200.
9. A method for automatically recognizing the cap of a straight screw based on visual recognition technology according to claim 1, characterized in that, The screw vision recognition system includes a camera, a light source, and a lens, and the camera resolution is not less than 1920×1200.
10. An automatic cap recognition system for straight screws based on visual recognition technology, characterized in that, It includes the hardware environment and the controller described in claim 1, and the controller is used to control the automatic operations other than manual operations in steps (2) to (7) of claim 1.