Workpiece gap high-precision detection system and method

By designing a high-precision detection system for workpiece gaps, and using area coding and defining coding rules, automated detection of workpieces is achieved, the problems of low detection efficiency and poor consistency in the existing technology are solved, and the detection accuracy and intelligence level are significantly improved.

CN120102571APending Publication Date: 2025-06-06CHONGQING HONGJIANG MACHINERY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510270897.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-07
Publication Date
2025-06-06

AI Technical Summary

Technical Problem

The prior art has low intelligence, low detection efficiency and high labor costs in micron-level defect detection, which affects the consistency of product quality.

Method used

A high-precision detection system for workpiece gaps is designed, including control units, robots and microscopes. Through area coding and defining coding rules, the automated detection of workpieces is realized, and the coordinated work of robots and microscopes is used to perform segmented photography and photo decoding fitting.

Benefits of technology

It greatly improves detection efficiency, significantly improves shooting accuracy and quality, enhances detection consistency and reliability, improves intelligence, and expands application scenarios and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120102571A_ABST
    Figure CN120102571A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of automation, and particularly relates to a workpiece gap high-precision detection system and method. The microscope is used for magnifying and shooting the workpiece; the robot accurately moves the microscope according to an instruction of the control unit to shoot different areas of the workpiece; the control unit is configured to: set a parameter; according to the set parameters and the actual view field range shot by the microscope, coding calculation is conducted on the workpiece according to a preset defined coding rule or a region coding rule, and the X-direction step number m, the X-direction step pitch n, the Y-direction step number M and the Y-direction step pitch N are obtained; controlling the robot to coordinate with the microscope to carry out sectional photographing, storing each photo, and cutting the stored photos; and performing fitting splicing processing on the pictures according to a preset coding rule, and performing gap defect identification and marking based on the spliced pictures. According to the invention, the automatic amplification detection judgment of the workpiece can be realized, the detection efficiency is improved, and the quality consistency is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of automation, and in particular relates to a high-precision detection system and method for workpiece gaps. Background Art

[0002] With the development of society, each enterprise has a higher pursuit of quality. At present, the detection of micron-level defects mainly relies on the combination of microscopes and manual detection, which is not very intelligent, has low detection efficiency, and human subjective consciousness has a great impact on product quality and has high labor costs.

[0003] Therefore, it is necessary to develop a new high-precision detection system and method for workpiece gaps. Summary of the invention

[0004] The purpose of the present invention is to provide a high-precision detection system and method for workpiece gaps, which are used to realize automatic magnification detection and judgment of workpieces, thereby improving detection efficiency and quality consistency.

[0005] In a first aspect, a high-precision workpiece gap detection system according to the present invention is characterized by comprising: A control unit, which is used for overall control and data processing and is connected to the robot and the microscope respectively; A robot, which is used to precisely move the microscope to image different areas of the workpiece according to the instructions of the control unit; Microscope, used to magnify and photograph the workpiece; The control unit is configured to: set parameters, including the length L and width B of the workpiece; when regional coding is adopted, also include the regional number I; according to the set parameters and the actual field of view captured by the microscope, encode and calculate the workpiece according to the preset boundary coding rules or regional coding rules to obtain the X-direction step number m, the X-direction step distance n, the Y-direction step number M and the Y-direction step distance N; based on the calculated X-direction step number m, the X-direction step distance n, the Y-direction step number M and the Y-direction step distance N, control the robot to coordinate with the microscope to take segmented photos and save each photo; according to the X-direction repetition coefficient c and the Y-direction repetition coefficient d, crop the saved photos to remove the overlapping parts; according to the rules of the preset coding rules, fit and splice the photos, and identify and mark the gap defects based on the spliced ​​pictures; The delimited coding rule is used to encode the entire workpiece detection surface, and the area coding rule is used to encode a partial area of ​​the workpiece detection surface.

[0006] Preferably, it also includes a part suspension assembly for fixing and installing the workpiece, the part suspension assembly includes an upper part and a lower part, the internal rectangular dimensions of the upper part and the lower part are adapted to the dimensions of the workpiece, the internal rectangular dimension of the lower part is smaller than the internal rectangular dimension of the upper part, when the workpiece is placed into the part suspension assembly, due to the difference in the internal rectangular dimensions, the edge of the workpiece's surface to be inspected contacts the upper surface of the lower part, thereby preventing the workpiece's surface to be inspected from contacting the part suspension assembly placement plate, thereby achieving a suspension effect.

[0007] Preferably, the control unit calculates the number of X-direction steps m and Y-direction steps M according to the input length L, width B of the workpiece and the actual field of view a, b captured by the microscope, wherein m= ⌈L / a⌉, M=⌈B / b⌉, ⌈•⌉ represents rounding up, and then calculates the X-direction step n and Y-direction step N according to the calculated number of X-direction steps m, number of Y-direction steps M, and the length L, width B of the workpiece, wherein n=L / m, N=B / M, and the workpiece is defined and encoded according to the calculated X-direction step n and Y-direction step N.

[0008] Preferably, the control unit calculates the number of X-steps m and Y-steps M according to the input length L, width B, area number I of the workpiece and the actual field of view a and b captured by the microscope, wherein m= ⌈L / a⌉, M=⌈B / b⌉, ⌈•⌉ represents rounding up, and calculates the number of X-steps n and Y-steps N according to the calculated number of X-steps m and Y-steps M, as well as the length L and width B of the workpiece, wherein n=L / m, N=B / M, and then performs area coding on the workpiece according to the area number I and the calculated number of X-steps n and Y-steps N.

[0009] Preferably, the control unit calculates the X-direction repetition coefficient c and the Y-direction repetition coefficient d of a single photo according to the X-direction step n and the Y-direction step N calculated by the defined coding rules and the actual field of view a and b captured by the microscope, and crops, rotates and splices the captured photos to fit them into a complete overall photo of the workpiece surface to be inspected.

[0010] Preferably, the control unit calculates the X-direction repetition coefficient c and the Y-direction repetition coefficient d of a single photograph according to the X-direction step n, the Y-direction step N, the area number I and the actual field of view a and b captured by the microscope based on the area coding rules, crops the single photo, and then rotates and splices the photo according to the rules of the area coding rules to obtain an overall photo of each area, which is then combined with the set plate in the control unit to form a complete photo of the workpiece inspection surface.

[0011] In a second aspect, a method for high-precision detection of workpiece gaps according to the present invention adopts a high-precision detection system for workpiece gaps according to the present invention, and the method comprises the following steps: Step 1. Set parameters, including the length L and width B of the workpiece; when area coding is used, also include the area number I; Step 2. According to the setting parameters and the actual field of view captured by the microscope, the workpiece is coded and calculated according to the preset boundary coding rules or area coding rules to obtain the X-direction step number m, the X-direction step distance n, the Y-direction step number M and the Y-direction step distance N; Step 3. Based on the calculated X-direction step number m, X-direction step distance n, Y-direction step number M, and Y-direction step distance N, control the robot to coordinate with the microscope to take segmented photos, and save each photo; Step 4. Crop the saved photos according to the X-direction repetition coefficient c and the Y-direction repetition coefficient d to remove the overlapping parts; fit and splice the photos according to the preset coding rules, and identify and mark the gap defects based on the spliced ​​pictures.

[0012] The present invention has the following advantages: 1. Significantly improve detection efficiency: The automated device of the present invention realizes rapid detection of workpiece gap defects and greatly shortens the detection cycle. The overall detection efficiency is significantly improved through the coordinated work of the six-axis robot and the microscope, as well as the efficient photo decoding and fitting algorithm.

[0013] 2. Significantly improve shooting accuracy and quality: The present invention successfully achieves high-precision focal length maintenance between the inspection surface of the workpiece to be inspected and the microscope by means of a parts suspension assembly. This innovative design avoids the adverse effects of focal length fluctuation or workpiece contact on the shooting quality, thereby ensuring high-definition shooting. At the same time, through the segmented photography fitting control method, combined with high-precision calculation and control, it is possible to accurately capture the tiny defects of the workpiece gap, further improving the accuracy of detection.

[0014] 3. Enhance detection consistency and reliability: The boundary coding and area coding methods provided by the present invention ensure that each inspection can be carried out according to the preset rules, thereby improving the consistency of the inspection. At the same time, through precise cropping, rotation and splicing operations, a complete overall photo of the workpiece surface to be inspected can be fitted, avoiding errors caused by improper photo splicing and enhancing the reliability of the inspection.

[0015] 4. Improve the level of intelligence: The present invention combines advanced automation technology, image processing technology and precise mechanical control to achieve intelligent detection of workpiece gap defects. The device can automatically identify the type of workpiece, set detection parameters, and make judgments and marks based on the detection results, greatly improving the degree of intelligence.

[0016] 5. Expand application scenarios and flexibility: The present invention is not only suitable for the detection of the entire workpiece surface, but also flexibly supports the detection of partial areas of the workpiece. By adjusting the input parameters and control program, different detection requirements can be easily met. At the same time, the device also has high versatility and can be applied to the detection of workpieces of various types and sizes, further expanding the application scenarios.

[0017] In summary, the present invention not only significantly improves the shooting accuracy and quality, but also greatly improves the detection efficiency, enhances the detection consistency and reliability, improves the intelligence level, and expands the application scenarios and flexibility. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a schematic structural diagram of a high-precision workpiece gap detection system according to an embodiment of the present application; Figure 2 An exploded schematic diagram of the structure of the parts suspension assembly according to an embodiment of the present application; Figure 3 A schematic diagram of the definition coding logic of an embodiment of the present application; Figure 4 A schematic diagram of the regional coding logic of an embodiment of the present application; Figure 5 This is a flowchart of the specific implementation process of the system in the embodiment of this application; Figure 6 This is a logic diagram of program 1 of an embodiment of the present application; Figure 7 This is a logic diagram of program 2 of an embodiment of the present application; Figure 8 This is a logic diagram of program 3 of an embodiment of the present application; Fig. 9 A schematic diagram of the definition decoding fitting logic of an embodiment of the present application; Fig.10 This is a schematic diagram of the regional decoding fitting logic of an embodiment of the present application.

[0019] In the figure: 1. robot, 2. control unit, 3. microscope, 4. parts suspension assembly, 41. upper assembly, 42. lower assembly. DETAILED DESCRIPTION

[0020] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.

[0021] like Figure 1 and Figure 2 As shown, in an embodiment of the present application, a high-precision detection system for workpiece gaps includes a control unit 2, a robot 1, and a microscope 3. The control unit 2 is used for overall control and data processing, and is connected to the robot 1 and the microscope 3 respectively. The robot 1 is used to accurately move the microscope 3 according to the instructions of the control unit 2 to photograph different areas of the workpiece. The microscope 3 is used to magnify and photograph the workpiece. The control unit 2 is configured to: set parameters, including the length L and width B of the workpiece; when regional coding is used, it also includes the regional number I; according to the set parameters and the actual field of view captured by the microscope 3, the workpiece is coded and calculated according to the preset boundary coding rules or regional coding rules to obtain the number of steps m in the X direction, the step length n in the X direction, the number of steps M in the Y direction and the step length N in the Y direction; based on the calculated number of steps m in the X direction, the step length n in the X direction, the number of steps M in the Y direction and the step length N in the Y direction, control the robot 1 to coordinate with the microscope 3 to take pictures in segments and save each photo; according to the X-direction repetition coefficient c and the Y-direction repetition coefficient d, the saved photos are cropped to remove the overlapping parts; the photos are fitted and spliced ​​according to the rules of the preset coding rules, and the gap defects are identified and marked based on the spliced ​​pictures. Among them, the boundary coding rules are used to encode the entire workpiece detection surface; the regional coding rules are used to encode a part of the workpiece detection surface.

[0022] like Figure 2 As shown, in the embodiment of the present application, a high-precision detection system for workpiece gaps also includes a part suspension component 4 for fixing and installing the workpiece. The part suspension component 4 can achieve high-precision distance determination of part suspension and improve the shooting quality. The part suspension component 4 is composed of an upper part 41, a lower part 42, and an M3 screw. The internal rectangular dimensions of the upper part 41 and the lower part 42 are customized according to the size of the workpiece to be detected. At the same time, the internal rectangular dimensions of the lower part 42 are smaller than the internal rectangular dimensions of the upper part 41. When the workpiece is placed in the part suspension component 4, due to the difference in internal rectangular dimensions, the edge of the part to be inspected surface contacts the upper surface of the lower part 42, so that the workpiece to be inspected surface does not contact the suspension component placement plate, achieving a suspension effect. Because the distance between the microscope and the part suspension component 4 is constant, therefore, when the workpiece is placed in the part suspension component 4, the distance between the workpiece to be inspected surface and the microscope is constant, thereby achieving high-precision distance determination between the workpiece to be inspected surface and the microscope.

[0023] like Figure 3 As shown, in a possible embodiment, a high-precision workpiece gap detection system can realize splitting and encoding the entire workpiece to be detected surface into multiple regular areas for shooting by defining coding rules, specifically: By inputting the length L and width B of the workpiece and the actual field of view a and b captured by the microscope 3 into the control unit 2, the X-axis step number m and the Y-axis step number M are calculated, where m=⌈L / a⌉, M=⌈B / b⌉, and ⌈•⌉ represents rounding up. Then, based on the calculated X-axis step number m and Y-axis step number M, as well as the length L and width B of the workpiece, the X-axis step n and the Y-axis step N are calculated, where n=L / m and N=B / M, and the workpiece is defined and coded based on the calculated X-axis step n and Y-axis step N.

[0024] like Fig. 9 As shown, for the case where the bounded coding rule is used for encoding, the system uses the bounded decoding fitting method to implement decoding fitting of the photos taken after the bounded coding, specifically: The control unit 2 calculates the X-direction repetition coefficient c and the Y-direction repetition coefficient d of a single photo according to the X-direction step n and the Y-direction step N calculated by the defined coding rules and the actual field of view a and b captured by the microscope 3, and crops, rotates and splices the captured photos to fit them into a complete overall photo of the workpiece surface to be inspected.

[0025] like Figure 4 As shown, in a possible embodiment, a high-precision workpiece gap detection system uses a regional coding rule to split and encode the entire workpiece to be detected area into multiple regular areas for shooting in the case where the entire surface of the workpiece does not need to be detected, specifically: By inputting the length L, width B, area number I of the workpiece, and the actual field of view a and b captured by the microscope 3 into the control unit 2, the X-axis step number m and the Y-axis step number M are calculated, wherein m=⌈L / a⌉, M=⌈B / b⌉, and ⌈•⌉ represents rounding up. According to the calculated X-axis step number m and Y-axis step number M, as well as the length L and width B of the workpiece, the X-axis step n and the Y-axis step N are calculated, wherein n=L / m, N=B / M. Then, the workpiece is area-coded according to the area number I and the calculated X-axis step n and Y-axis step N.

[0026] In the case of regional surface detection of the workpiece, the workpiece detection area is marked, and corresponding encoding processing is performed on each area.

[0027] like Fig.10 As shown, in the case of encoding using regional encoding rules, the system uses a regional decoding fitting method to decode and fit the photos taken after regional encoding, specifically: The control unit 2 calculates the X-axis step n, Y-axis step N, area number I and actual field of view a, b captured by the microscope 3 according to the area coding rule, calculates the X-axis repetition coefficient c, Y-axis repetition coefficient d of a single photo, crops the single photo, and then rotates and splices the photo according to the area coding rule to obtain an overall photo of each area, which is then combined with the set plate in the control unit 2 to form a complete photo of the workpiece inspection surface.

[0028] In a possible embodiment, the robot is a 6-axis robot.

[0029] like Figure 5 , Figure 6 , Figure 7 and Figure 8 As shown, the specific implementation process of this system is described in detail below with reference to specific examples: The operator applies the relevant parameters in the control unit 2, for example: length L 48mm, width B 34.5mm, coding area number I=0, gap width 50um, gap length 300um, number of tray parts 40 pieces, and then clicks Apply.

[0030] The control unit 2 automatically and quickly calculates the X-direction step number m=L / a=48 / 6.9=7 (rounded up) and the Y-direction step number M=B / b=34.5 / 5.1=7 (rounded up) according to the input parameters and the actual field of view a=6.9, b=5.1 photographed by the microscope (9); then the control unit 2 calculates the X-direction step n=L / m=48 / 7=6.857mm and the Y-direction step N=B / M=34.5 / 7=4.929mm according to the X-direction step number m=7, the Y-direction step number M=7 and L=48, B=34.5; then the control unit encodes the workpiece detection surface into 49 6.857*4.929 photos. After the calculation and encoding are completed, the control unit displays "application successful", and then clicks "loop start" to start program 1.

[0031] like Figure 6 As shown, program 1 is specifically as follows: The control unit controls robot 1 to cooperate with the robot gripper to take the material (i.e. the workpiece to be inspected) from the material tray and place it in the part suspension assembly 4. After it is placed in place, the robot gripper is switched to a flexible downward pressing gripper to press the workpiece and move it to the specified position, and then a "placement signal" is sent to the control unit 2. After receiving the signal, the control unit activates program 2.

[0032] like Figure 7 As shown, program 2 is specifically: The control unit 2 controls the robot 1, the robot gripper and the microscope 3 to coordinate the shooting of the inspection surface of the workpiece, and stores the picture with coded information. The X-direction step counter = 1, the Y-direction step counter = 1, moves to the first shooting position, and then the microscope 3 takes pictures. After the shooting is completed, the picture is stored by the control unit and named according to the counter content, and then the "photo shooting is completed" signal is transmitted. At this time, the X-direction counter + 1 (≤7), the Y-direction counter does not change, and then the robot moves to the next corresponding shooting position and sends a "moving to position" signal. At this time, the X-direction counter = 2, the Y-direction counter = 1, and then the microscope takes pictures, the control unit stores, and then transmits the "photo shooting is completed" signal again, and so on. The cycle continues until the X-direction counter = 7, the Y-direction counter = 7, and the area number I = 0, exits the cycle, and sends a "overall shooting is completed" signal to the control unit 2, and then calls program 3.

[0033] like Figure 8 As shown, program 3 is specifically: Taking the area coding as an example, the control unit 2 controls the robot 1 to take the workpiece out of the part suspension assembly 4 and put it back to the corresponding take-out position. At the same time, the control unit 2 performs definition decoding and fitting processing on the picture taken by the microscope 3. According to the X-axis step n=6.857mm, the Y-axis step N=4.929mm and the actual field of view a=6.9mm, b=5.1mm taken by the microscope 3, the X-axis repetition coefficient = 6.9-6.857=0.043mm, the Y-axis repetition coefficient = 5.1-4.929=0.171mm are calculated. According to the repetition coefficient and the definition coding rule, the 49 sub-photos are cut, spliced ​​and fitted, and finally become a photo of the workpiece detection surface L*B. At the same time, according to the definition size of the gap in the control unit 2, the gap defect is identified, and it is determined to be qualified or unqualified. If it is unqualified, the defect position and size need to be marked and displayed. At this time, the gap defect detection of a workpiece is completed, and the next part will be detected later, and this cycle will be carried out until all 40 workpieces are detected.

[0034] In an embodiment of the present application, a method for high-precision detection of workpiece gaps is provided, which uses a high-precision detection system for workpiece gaps as described in an embodiment of the present application, and the method comprises the following steps: Step 1. Set parameters, including the length L and width B of the workpiece; when area coding is used, also include the area number I; Step 2. According to the setting parameters and the actual field of view captured by the microscope, the workpiece is coded and calculated according to the preset boundary coding rules or area coding rules to obtain the X-direction step number m, the X-direction step distance n, the Y-direction step number M and the Y-direction step distance N; Step 3. Based on the calculated X-direction step number m, X-direction step distance n, Y-direction step number M, and Y-direction step distance N, control the robot to coordinate with the microscope to take segmented photos, and save each photo; Step 4. Crop the saved photos according to the X-direction repetition coefficient c and the Y-direction repetition coefficient d to remove the overlapping parts; fit and splice the photos according to the preset coding rules, and identify and mark the gap defects based on the spliced ​​pictures.

[0035] The above-mentioned embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above-mentioned embodiments. Any other changes, modifications, substitutions, combinations and simplifications made without departing from the spirit and principle of the present invention shall be equivalent replacement modes and shall be included in the protection scope of the present invention.

Claims

1. A high-precision workpiece gap detection system, characterized in that: include: A control unit (2), used for overall control and data processing, and connected to the robot (1) and the microscope (3) respectively; A robot (1) for accurately moving a microscope (3) to photograph different areas of a workpiece according to instructions from a control unit (2); A microscope (3), used for magnifying and photographing the workpiece; The control unit (2) is configured to: set parameters, including the length L and width B of the workpiece; when regional coding is used, also include the regional number I; according to the set parameters and the actual field of view captured by the microscope (3), perform coding calculation on the workpiece according to a preset boundary coding rule or regional coding rule to obtain an X-direction step number m, an X-direction step distance n, a Y-direction step number M, and a Y-direction step distance N; based on the calculated X-direction step number m, X-direction step distance n, Y-direction step number M, and Y-direction step distance N, control the robot (1) and the microscope (3) to coordinately take segmented photos and save each photo; crop the saved photos according to an X-direction repetition coefficient c and a Y-direction repetition coefficient d to remove overlapping parts; perform fitting splicing processing on the photos according to the rules of the preset coding rules, and perform gap defect recognition and marking based on the spliced ​​photos; The delimited coding rule is used to encode the entire workpiece detection surface, and the area coding rule is used to encode a partial area of ​​the workpiece detection surface.

2. A workpiece gap high-precision detection system according to claim 1, characterized in that: It also includes a part suspension assembly (4) for fixing and installing a workpiece, the part suspension assembly (4) including an upper part (41) and a lower part (42), the internal rectangular dimensions of the upper part (41) and the lower part (42) being adapted to the dimensions of the workpiece, the internal rectangular dimensions of the lower part (42) being smaller than the internal rectangular dimensions of the upper part (41), and when the workpiece is placed in the part suspension assembly (4), the edge of the workpiece surface to be inspected contacts the upper surface of the lower part (42), so that the workpiece surface to be inspected does not contact the part suspension assembly placement plate.

3. A workpiece gap high-precision detection system according to claim 1, characterized in that: The control unit (2) calculates the number of steps in the X direction m and the number of steps in the Y direction M according to the length L and width B of the input workpiece and the actual field of view a and b captured by the microscope (3), wherein m= ⌈L / a⌉, M=⌈B / b⌉, and ⌈•⌉ indicates rounding up, and then calculates the number of steps in the X direction n and the number of steps in the Y direction N according to the calculated number of steps in the X direction m and the number of steps in the Y direction M, as well as the length L and the width B of the workpiece, wherein n=L / m and N=B / M, and defines and codes the workpiece according to the calculated number of steps in the X direction n and the number of steps in the Y direction N.

4. The high-precision workpiece gap detection system according to claim 1, characterized in that: The control unit (2) calculates the number of steps in the X direction m and the number of steps in the Y direction M according to the input length L, width B, area number I of the workpiece and the actual field of view a and b captured by the microscope (3), wherein m= ⌈L / a⌉, M=⌈B / b⌉, ⌈•⌉ represents rounding up, and calculates the number of steps in the X direction n and the number of steps in the Y direction M according to the calculated number of steps in the X direction m and the number of steps in the Y direction M, as well as the length L and width B of the workpiece, wherein n=L / m and N=B / M, and then performs area coding on the workpiece according to the area number I and the calculated number of steps in the X direction n and the number of steps in the Y direction N.

5. The high-precision workpiece gap detection system according to claim 1, characterized in that: The control unit (2) calculates the X-direction repetition coefficient c and the Y-direction repetition coefficient d of a single photo based on the X-direction step n and the Y-direction step N calculated by the defined coding rules and the actual field of view ranges a and b captured by the microscope (3), and crops, rotates and splices the captured photos to fit a complete overall photo of the surface of the workpiece to be inspected.

6. A workpiece gap high-precision detection system according to claim 1, characterized in that: The control unit (2) calculates the X-direction repetition coefficient c and the Y-direction repetition coefficient d of a single photograph according to the X-direction step n, the Y-direction step N, the region number I and the actual field of view a and b captured by the microscope (3) based on the region coding rule, crops the single photograph, and then rotates and splices the photograph according to the region coding rule to obtain an overall photograph of each region, which is then combined with the set plate in the control unit (2) to form a complete photograph of the workpiece inspection surface.

7. A method for high-precision detection of workpiece gaps, characterized in that: Using the workpiece gap high-precision detection system as claimed in any one of claims 1 to 6, the method comprises the following steps: Step 1. Set parameters, including the length L and width B of the workpiece; when area coding is used, also include the area number I; Step 2. According to the setting parameters and the actual field of view captured by the microscope (3), the workpiece is coded and calculated according to the preset boundary coding rule or area coding rule to obtain the number of X-direction steps m, the X-direction step length n, the number of Y-direction steps M and the Y-direction step length N; Step 3. Based on the calculated X-direction step number m, X-direction step distance n, Y-direction step number M and Y-direction step distance N, control the robot (1) to coordinate with the microscope (3) to take segmented photos, and save each photo; Step 4. Crop the saved photos according to the X-direction repetition coefficient c and the Y-direction repetition coefficient d to remove the overlapping parts; fit and splice the photos according to the preset coding rules, and identify and mark the gap defects based on the spliced ​​pictures.