A method, device, electronic device and storage medium for generating a workpiece gluing trajectory

By using a binocular structured light camera to obtain point cloud data of the workpiece and perform point cloud matching, the problem of low accuracy in gluing trajectory generation is solved, accurate correction of deviations and local deformations of the workpiece to be glued is achieved, and the accuracy of gluing is improved. .

CN113643282BActive Publication Date: 2025-01-21GEER TECH CO LTD +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111013051.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-31
Publication Date
2025-01-21
Estimated Expiration
2041-08-31

AI Technical Summary

Technical Problem

The prior art has the problem of low accuracy when generating the workpiece glue coating trajectory, especially when there is deviation or local deformation of the workpiece to be glued, it is difficult to accurately correct the deviation, affecting the glue coating accuracy.

Method used

A binocular structured light camera is used to obtain point cloud data of the workpiece to be coated and the standard workpiece, and the template gluing trajectory is corrected through point cloud matching technology to generate an accurate workpiece gluing trajectory.

Benefits of technology

It improves the glue coating accuracy, can accurately handle the deviation and local deformation of the workpiece to be glued, and ensures the accuracy of the glue coating trajectory.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113643282B_ABST
    Figure CN113643282B_ABST
Patent Text Reader

Abstract

The present application discloses a method for generating a workpiece gluing trajectory, the method comprising: using a binocular structured light camera to obtain actual point cloud data of the workpiece to be glued; performing point cloud matching on the actual point cloud data and the standard point cloud data to obtain a matching result; wherein the standard point cloud data is the point cloud data obtained by scanning a standard workpiece with the binocular structured light camera; and according to the matching result, correcting the template gluing trajectory corresponding to the standard workpiece to generate a workpiece gluing trajectory, so as to perform a gluing operation on the workpiece to be glued using the workpiece gluing trajectory. The present application can generate an accurate workpiece gluing trajectory and improve the gluing accuracy. The present application also discloses a workpiece gluing trajectory generating device, an electronic device and a storage medium, which have the above beneficial effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of industrial manufacturing technology, and in particular to a method and device for generating a workpiece gluing trajectory, an electronic device and a storage medium. Background Art

[0002] The process of manufacturing products often involves gluing operations. Before performing the gluing operation, it is necessary to manually teach the template gluing trajectory of the standard workpiece so that the gluing operation can be performed on the workpiece to be glued using the template gluing trajectory in the actual production process. When the workpiece to be glued has deviations when placed on the tooling, or when the workpiece to be glued has slight local deformation, it is usually necessary to correct the template gluing trajectory.

[0003] In the related technology, laser line scanning is usually used to obtain the point cloud data of the workpiece to be glued, and then the template gluing trajectory is corrected. However, the above method requires the laser scanning equipment and the rotary axis and horizontal axis of the machine tool of the gluing equipment to be linked, which has very high hardware requirements for the lag of the machine tool servo system, linkage positioning accuracy, line laser signal acquisition delay, etc. Any problem in any link will directly lead to the failure of the gluing trajectory generation operation, affecting the gluing accuracy.

[0004] Therefore, how to generate an accurate workpiece gluing trajectory and improve the gluing accuracy is a technical problem that technicians in this field currently need to solve. Summary of the invention

[0005] The purpose of the present application is to provide a method and device for generating a workpiece gluing trajectory, an electronic device and a storage medium, which can generate an accurate workpiece gluing trajectory and improve the gluing accuracy.

[0006] In order to solve the above technical problems, the present application provides a method for generating a workpiece gluing trajectory, the method comprising:

[0007] Use a binocular structured light camera to obtain actual point cloud data of the workpiece to be glued;

[0008] Performing point cloud matching on the actual point cloud data and the standard point cloud data to obtain a matching result; wherein the standard point cloud data is point cloud data obtained by scanning a standard workpiece with the binocular structured light camera;

[0009] The template gluing track corresponding to the standard workpiece is corrected according to the matching result to generate a workpiece gluing track, so as to perform a gluing operation on the workpiece to be glued using the workpiece gluing track.

[0010] Optionally, before using a binocular structured light camera to obtain actual point cloud data of the workpiece to be glued, the method further includes:

[0011] Determine N photographing positions according to the field of view size of the binocular structured light camera and the size of the standard workpiece; wherein N is greater than or equal to the minimum number of photographing positions that satisfies a preset condition, and the preset condition is that the images taken at all the photographing positions include a complete image of the standard workpiece;

[0012] Acquire the standard point cloud data of the standard workpiece at N photographing positions using the binocular structured light camera;

[0013] Accordingly, the actual point cloud data of the workpiece to be glued is obtained by using a binocular structured light camera, including:

[0014] The binocular structured light camera is used to acquire the actual point cloud data of the workpiece to be glued at the N photographing positions.

[0015] Optionally, performing point cloud matching on the actual point cloud data and the standard point cloud data to obtain a matching result includes:

[0016] Performing point cloud matching on all actual point cloud data and all standard point cloud data corresponding to the same photographing position to obtain an overall point cloud matching result;

[0017] Correspondingly, the template gluing track corresponding to the standard workpiece is corrected according to the matching result to generate the workpiece gluing track, including:

[0018] The template gluing trajectory corresponding to the standard workpiece is corrected according to the overall point cloud matching result to generate the workpiece gluing trajectory.

[0019] Optionally, performing point cloud matching on the actual point cloud data and the standard point cloud data to obtain a matching result includes:

[0020] Selecting a target track point in the template gluing track;

[0021] Taking the target trajectory point as the center, intercepting a local actual point cloud from the actual point cloud data;

[0022] Taking the target trajectory point as the center, intercepting a local standard point cloud from the standard point cloud data;

[0023] Performing point cloud matching on the local actual point cloud and the local standard point cloud to obtain a local point cloud matching result;

[0024] Correspondingly, the template gluing track corresponding to the standard workpiece is corrected according to the matching result to generate the workpiece gluing track, including:

[0025] The template gluing trajectory corresponding to the standard workpiece is corrected according to the local point cloud matching result to generate the workpiece gluing trajectory.

[0026] Optionally, intercepting a local actual point cloud in the actual point cloud data with the target trajectory point as the center includes:

[0027] Taking the target trajectory point as the sphere center, using a spherical filter to intercept the local actual point cloud in the actual point cloud data;

[0028] Accordingly, a local standard point cloud is intercepted from the standard point cloud data with the target trajectory point as the center;

[0029] The target trajectory point is taken as the sphere center, and the local standard point cloud is intercepted from the standard point cloud data using the spherical filter.

[0030] Optionally, the template gluing trajectory corresponding to the standard workpiece is corrected according to the matching result to generate the workpiece gluing trajectory, including:

[0031] Determine a point cloud transformation matrix according to the matching result; wherein the point cloud transformation matrix is ​​used to describe the coordinate transformation relationship between the actual point cloud data and the standard point cloud data;

[0032] The point cloud transformation matrix is ​​used to correct the template gluing trajectory corresponding to the standard workpiece to generate the workpiece gluing trajectory.

[0033] Optionally, before using a binocular structured light camera to obtain actual point cloud data of the workpiece to be glued, the method further includes:

[0034] Scanning the standard workpiece using the binocular structured light camera to obtain initial point cloud data;

[0035] A spherical space is constructed with each track point in the template gluing track as the sphere center, and the initial point cloud data in all the spherical spaces are set as the standard point cloud data.

[0036] The present application also provides a workpiece gluing trajectory generating device, the device comprising:

[0037] Point cloud scanning module, used to obtain actual point cloud data of the workpiece to be glued using a binocular structured light camera;

[0038] A matching module, used for performing point cloud matching between the actual point cloud data and the standard point cloud data to obtain a matching result; wherein the standard point cloud data is the point cloud data obtained by scanning a standard workpiece with the binocular structured light camera;

[0039] The trajectory generation module is used to correct the template gluing trajectory corresponding to the standard workpiece according to the matching result to generate a workpiece gluing trajectory, so as to perform a gluing operation on the workpiece to be glued using the workpiece gluing trajectory.

[0040] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps of the workpiece gluing trajectory generation method are implemented.

[0041] The present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, the steps of the workpiece gluing trajectory generation method are implemented.

[0042] The present application provides a method for generating a workpiece gluing trajectory, comprising: using a binocular structured light camera to obtain actual point cloud data of the workpiece to be glued; performing point cloud matching on the actual point cloud data and standard point cloud data to obtain a matching result; wherein the standard point cloud data is point cloud data obtained by scanning a standard workpiece with the binocular structured light camera; and according to the matching result, correcting a template gluing trajectory corresponding to the standard workpiece to generate a workpiece gluing trajectory, so as to use the workpiece gluing trajectory to perform a gluing operation on the workpiece to be glued.

[0043] The present application uses a binocular structured light camera to obtain the actual point cloud data of the workpiece to be glued and the standard point cloud data of the standard workpiece. Since the binocular structured light camera obtains the corresponding point cloud data by collecting images within the field of view, the binocular structured light camera does not need to be linked with the machine tool of the glue coating equipment. The present application can improve the acquisition accuracy of the actual point cloud data and the standard point cloud data of the standard workpiece. The present application uses the actual point cloud data and standard point cloud data obtained by the binocular structured light camera to match, and corrects the template gluing trajectory according to the matching results to obtain the workpiece gluing trajectory. Therefore, the present application can generate an accurate workpiece gluing trajectory and improve the gluing accuracy. The present application also provides a workpiece gluing trajectory generation device, an electronic device and a storage medium, which have the above-mentioned beneficial effects and are not repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0045] Figure 1 A flow chart of a method for generating a workpiece gluing trajectory provided in an embodiment of the present application;

[0046] Figure 2 A flow chart of a method for correcting a local deviation of a gluing track provided in an embodiment of the present application;

[0047] Figure 3A flow chart of a method for correcting overall deviation and local deviation in a template gluing trajectory provided in an embodiment of the present application;

[0048] Figure 4 A flow chart of a method for correcting the gluing trajectory of eyeglass frames using 3D visual point cloud data provided in an embodiment of the present application;

[0049] Figure 5 A schematic diagram of point cloud data of a glue coating groove of a glasses frame provided in an embodiment of the present application;

[0050] Figure 6 A schematic diagram of a point cloud obtained from multiple shooting positions provided in an embodiment of the present application;

[0051] Figure 7 A schematic diagram of the result of image combination before coordinate system conversion provided by an embodiment of the present application;

[0052] Figure 8 A schematic diagram of the result of image combination after coordinate system conversion provided in an embodiment of the present application;

[0053] Fig. 9 A schematic diagram of the corresponding relationship between a template trajectory and a scan point cloud provided in an embodiment of the present application;

[0054] Fig.10 A schematic diagram of the comparison of a scanning point cloud before and after filtering provided in an embodiment of the present application;

[0055] Fig.11 A schematic diagram of using a transformation matrix to perform overall deviation correction on a template trajectory provided in an embodiment of the present application;

[0056] Fig.12 A schematic diagram of a rectangular parallelepiped filter provided in an embodiment of the present application intercepting a local small point cloud;

[0057] Fig.13 A schematic diagram of a spherical filter provided in an embodiment of the present application intercepting a local small point cloud;

[0058] Fig.14 A schematic diagram of a trajectory segment combination provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0060] See below Figure 1 , Figure 1 A flow chart of a method for generating a workpiece gluing trajectory provided in an embodiment of the present application.

[0061] Specific steps may include:

[0062] S101: using a binocular structured light camera to obtain actual point cloud data of the workpiece to be glued;

[0063] Among them, this embodiment can be applied to a workpiece gluing device or an electronic device connected to the workpiece gluing device. The above-mentioned electronic device connected to the workpiece gluing device can send the generated workpiece gluing trajectory to the workpiece gluing device, so that the workpiece gluing device performs corresponding gluing operations on the workpiece to be glued.

[0064] This embodiment does not limit the type of workpiece to be glued, and may include, for example, AR (Augmented Reality) glasses frames, VR (Virtual Reality) helmets, Bluetooth headsets, smart wrist-worn devices and other products. In this step, a binocular structured light camera may be set at a fixed position to shoot the workpiece to be glued, so as to obtain the actual point cloud data of the workpiece to be glued. The actual point cloud data obtained by the binocular structured light camera is 3D point cloud data.

[0065] S102: performing point cloud matching on the actual point cloud data and the standard point cloud data to obtain a matching result;

[0066] Before this step, there may be an operation of obtaining standard point cloud data. Specifically, the standard point cloud data is the point cloud data obtained by scanning the standard workpiece by the binocular structured light camera. The standard workpiece is a workpiece that is correctly placed on the tooling and has no local deformation. For the standard workpiece, the template gluing trajectory can be obtained by manual teaching. That is, the template gluing trajectory is a standard trajectory on the standard workpiece without gluing deviation. The standard workpiece and the workpiece to be glued are the same type of workpiece.

[0067] Specifically, the binocular structured light camera can be set at a fixed position to shoot the standard workpiece, so as to obtain the standard point cloud data of the standard workpiece. The standard point cloud data obtained by the binocular structured light camera belongs to 3D point cloud data.

[0068] As a feasible implementation method, based on obtaining the standard point cloud data and the template gluing trajectory, this embodiment can save the standard point cloud data and the template gluing trajectory so as to be directly called in the subsequent gluing process.

[0069] On the basis of obtaining the actual point cloud data and the standard point cloud data, this embodiment can perform point cloud matching on the actual point cloud data and the standard point cloud data to obtain a matching result. This embodiment can set the points in the actual point cloud data and the standard point cloud data whose distance is less than a preset value as matching points. The above matching results may include the overall matching degree of all actual point cloud data and all standard point cloud data (such as the proportion of the number of all matched points in all points), and the above matching results may include the local matching degree of local actual point cloud data and local standard point cloud data (such as the proportion of the number of matched points within the same local point cloud range). According to the matching results, the deviation information between the workpiece to be glued and the standard workpiece can be determined, and the above deviation information includes overall deviation and / or local deviation. When the placement positions of the workpiece to be glued and the standard workpiece on the tooling are inconsistent, the overall deviation can be detected; when the workpiece to be glued is locally deformed relative to the standard workpiece, the local deviation can be detected.

[0070] S103: Correcting the template gluing trajectory corresponding to the standard workpiece according to the matching result to generate a workpiece gluing trajectory, so as to perform a gluing operation on the workpiece to be glued using the workpiece gluing trajectory.

[0071] Among them, after obtaining the matching result, the position deviation and shape deviation between the standard workpiece and the workpiece to be glued can be determined according to the matching result, and then the template gluing trajectory corresponding to the standard workpiece can be adaptively corrected according to the matching result, so that the obtained workpiece gluing trajectory conforms to the actual tooling placement position and workpiece shape of the workpiece to be glued, and then the workpiece gluing trajectory is used to perform the gluing operation on the workpiece to be glued.

[0072] As a feasible implementation method, this embodiment can correct and generate the workpiece gluing trajectory in the following manner: determine the point cloud transformation matrix according to the matching result; and use the point cloud transformation matrix to correct the template gluing trajectory corresponding to the standard workpiece to generate the workpiece gluing trajectory. The point cloud transformation matrix is ​​used to describe the coordinate transformation relationship between the actual point cloud data and the standard point cloud data.

[0073] This embodiment uses a binocular structured light camera to obtain the actual point cloud data of the workpiece to be glued and the standard point cloud data of the standard workpiece. Since the binocular structured light camera obtains the corresponding point cloud data by collecting images in the field of view, the binocular structured light camera does not need to be linked with the machine tool of the glue coating equipment. This embodiment can improve the acquisition accuracy of the actual point cloud data and the standard point cloud data of the standard workpiece. This embodiment uses the actual point cloud data and standard point cloud data obtained by the binocular structured light camera to match, and corrects the template gluing trajectory according to the matching result to obtain the workpiece gluing trajectory. Therefore, this embodiment can generate an accurate workpiece gluing trajectory and improve the gluing accuracy.

[0074] As for Figure 1 Further introduction to the corresponding embodiment, the field of view of the binocular structured light camera is limited. When the workpiece is small, the binocular structured light camera can obtain complete point cloud data of the workpiece at a single photographing position; conversely, when the workpiece is large, the binocular structured light camera can obtain complete point cloud data of the workpiece at multiple photographing positions. Therefore, before using the binocular structured light camera to obtain the actual point cloud data of the workpiece to be coated with glue, there can also be an operation of setting the photographing position of the binocular structured light camera, specifically as follows: determine N photographing positions according to the field of view of the binocular structured light camera and the size of the standard workpiece; wherein N is greater than or equal to the minimum number of photographing positions that satisfies the preset condition, and the preset condition is that the images taken at all the photographing positions include the complete image of the standard workpiece; the images taken at the N photographing positions include the complete image of the standard workpiece.

[0075] On the basis of determining the photographing position of the binocular structured light camera, this embodiment can use the binocular structured light camera to obtain the standard point cloud data of the standard workpiece at N photographing positions. Accordingly, the actual point cloud data can be obtained in the following manner: using the binocular structured light camera to obtain the actual point cloud data of the workpiece to be glued at N photographing positions. Among them, the photographing position of the binocular structured light camera when obtaining the standard point cloud data and the photographing position when obtaining the actual point cloud data are the same.

[0076] It can be understood that when the value of N in the N photographing positions is greater than 1, all actual point cloud data of the workpiece to be glued includes actual point cloud data of at least two photographing positions, and all standard point cloud data of the standard workpiece includes standard point cloud data of at least two photographing positions. In this embodiment, the actual point cloud data and the standard point cloud data can be matched by point cloud matching in the following manner: all actual point cloud data and all standard point cloud data corresponding to the same photographing position are matched by point cloud matching to obtain an overall point cloud matching result. According to the overall point cloud matching result, the overall deviation caused by the deviation of the workpiece to be glued in the tooling placement position can be determined. In this embodiment, the overall deviation in the template gluing trajectory can be corrected in the following manner: the template gluing trajectory corresponding to the standard workpiece is corrected according to the overall point cloud matching result to generate the workpiece gluing trajectory.

[0077] See also Figure 2 , Figure 2 A flowchart of a method for correcting a local deviation of a gluing track provided in an embodiment of the present application. Figure 1 The further description of S102 and S103 in the corresponding embodiment can be used to compare this embodiment with Figure 1 The corresponding embodiments are combined to obtain a further implementation method. This embodiment may include the following steps:

[0078] S201: Selecting a target track point in the template gluing track;

[0079] Among them, the template gluing trajectory may include multiple trajectory points. In this embodiment, the target trajectory points can be selected in sequence from the template gluing trajectory to perform related operations of S201 to S204, and the related operation of S205 can be performed after the local point cloud matching results corresponding to all trajectory points in the template gluing trajectory are obtained.

[0080] S202: intercepting a local actual point cloud from the actual point cloud data with the target trajectory point as the center;

[0081] In this step, the coordinate position of the target trajectory point can be used as the interception center to intercept the point cloud data of a preset shape (such as a cuboid or a sphere) in the actual point cloud data to obtain a local actual point cloud.

[0082] S203: intercepting a local standard point cloud from the standard point cloud data with the target trajectory point as the center;

[0083] In this step, the coordinate position of the target trajectory point can be used as the interception center to intercept the point cloud data of a preset shape (such as a cuboid or a sphere) in the standard point cloud data to obtain a local standard point cloud.

[0084] S204: performing point cloud matching on the local actual point cloud and the local standard point cloud to obtain a local point cloud matching result;

[0085] S205: Correcting the template gluing trajectory corresponding to the standard workpiece according to the local point cloud matching result to generate the workpiece gluing trajectory.

[0086] This embodiment can correct the local deviation caused by the local deformation of the workpiece to be glued according to the local point cloud matching result, and obtain the workpiece gluing trajectory with the local deviation eliminated.

[0087] Furthermore, the above-mentioned embodiment can use a filter of a specific shape to intercept a local standard point cloud and a local actual point cloud. When a rectangular filter is used to intercept a point cloud, the interception direction needs to be controlled, and the interception efficiency is low when the shape of the workpiece is irregular. In order to improve the efficiency of intercepting local point clouds, the present embodiment can intercept local actual point clouds in the following manner: taking the target trajectory point as the center of the sphere, and using a spherical filter to intercept the local actual point cloud in the actual point cloud data. Correspondingly, the present embodiment can also intercept local standard point clouds in the following manner: taking the target trajectory point as the center of the sphere, and using the spherical filter to intercept the local standard point cloud in the standard point cloud data. When using a spherical filter to intercept a local point cloud, there is no need to consider the directionality of the sphere, which can improve the interception efficiency.

[0088] The above embodiments provide a solution for correcting the overall deviation in the template gluing track, and a solution for correcting the local deviation in the template gluing track. Figure 3 , Figure 3 A flowchart of a method for correcting overall deviation and local deviation in a template gluing track provided in an embodiment of the present application. Figure 1 The further description of S102 and S103 in the corresponding embodiment can be used to compare this embodiment with Figure 1 The corresponding embodiments are combined to obtain a further implementation method. This embodiment may include the following steps:

[0089] S301: performing point cloud matching on all actual point cloud data and all standard point cloud data corresponding to the same photographing position to obtain an overall point cloud matching result.

[0090] S302: Correcting the template gluing trajectory corresponding to the standard workpiece according to the overall point cloud matching result to generate a gluing trajectory to be fine-tuned;

[0091] S303: Selecting a target track point in the template gluing track;

[0092] S304: intercepting a local actual point cloud from the actual point cloud data with the target trajectory point as the center;

[0093] S305: intercepting a local standard point cloud in the standard point cloud data with the target trajectory point as the center;

[0094] S306: performing point cloud matching on the local actual point cloud and the local standard point cloud to obtain a local point cloud matching result;

[0095] S307: Correcting the gluing trajectory to be fine-tuned according to the local point cloud matching result to generate the workpiece gluing trajectory.

[0096] In the above embodiment, the overall deviation in the template gluing trajectory is first corrected using the overall point cloud matching result, and then the local deviation in the template gluing trajectory is corrected using the local point cloud matching result, thereby improving the matching degree between the workpiece gluing trajectory and the workpiece to be glued and improving the gluing quality.

[0097] As a further introduction to the above embodiment, the present embodiment can obtain standard point cloud data in the following manner: utilize the binocular structured light camera to scan the standard workpiece to obtain initial point cloud data; construct a spherical space with each track point in the template gluing track as the center of the sphere, and set the initial point cloud data in all the spherical spaces as the standard point cloud data.

[0098] It can be understood that in the above method, a spherical space is constructed with each trajectory point in the template gluing trajectory as the center of the sphere, and the initial point cloud data in all spherical spaces are set as the standard point cloud data; since the template gluing trajectory corresponds to the position of the glue groove in the workpiece, this embodiment uses the point cloud data corresponding to the glue groove in the standard workpiece as the standard point cloud data for correcting the template gluing trajectory. The above method can remove the influence of tooling information and non-essential positions in the workpiece, thereby improving the accuracy of the workpiece gluing trajectory.

[0099] The process described in the above embodiment is explained below through an embodiment in actual application.

[0100] In the mass production of VR / AR products, gluing of eyeglass frames is extremely important. Poor gluing will directly lead to a decrease in the waterproofness and adhesion of the product. A slight bump may cause cracking in the NG (not good) places. NG glue refers to the situation where the glue at a certain position does not meet the relevant requirements. In actual production, it is first necessary to manually teach a complete set of template gluing trajectories. If the consistency of the eyeglass frames to be glued is good and the eyeglass frames to be glued are placed on the tooling without deviation, the manually taught template gluing trajectory can successfully complete the gluing work; on the contrary, if there is a placement deviation of the eyeglass frames to be glued, or there is a slight local deformation of the eyeglass frames to be glued, it is necessary to introduce 3D vision through point cloud data to complete the glue trajectory correction work.

[0101] The existing gluing track correction mainly includes the following two solutions:

[0102] The first glue-coating trajectory correction scheme is to obtain point cloud data at each moment through laser line scanning for point cloud splicing, and then extract the template glue-coating trajectory for analysis, and finally complete the glue-coating trajectory correction work. The above method requires real-time linkage between the laser scanning equipment and the rotation axis and translation axis of the machine tool, and has very high hardware requirements such as machine tool servo system lag, linkage positioning accuracy, and line laser signal acquisition delay. Problems in any link will directly lead to errors in the glue-coating correction work, and it is easy to introduce splicing errors when splicing point clouds, which directly affects the accuracy of guiding glue coating.

[0103] The second solution for correcting the gluing track is to add a laser scanner and a 2D camera to the tooling for placing the eyeglass frames. This solution can only achieve overall correction of the gluing track, but cannot correct the track of local deformation of the frame, and the correction accuracy is low.

[0104] In order to solve the various defects of the conventional glue coating track correction scheme in the field, the present application provides a scheme for correcting the overall deviation and local deviation of the template glue coating track respectively using a binocular structured light camera. In this embodiment, the binocular structured light camera is used to obtain 3D point cloud data of multiple shooting positions, and the overall deviation of the glue coating track is corrected after rough matching with the template point cloud, and then a small point cloud is intercepted on the complete point cloud data for precise matching to complete the local deviation correction. This embodiment provides a scheme for obtaining 3D point cloud data of multiple shooting positions using a binocular structured light camera. The scheme corrects the overall deviation of the glue coating track after rough matching with the template point cloud, and then intercepts a small point cloud on the complete point cloud data for precise matching to complete the local deviation correction. The algorithm has a certain tolerance for the accuracy of the glue coating machine tool. The machine tool only needs to meet the repeat positioning accuracy, and there is no special requirement for the absolute positioning accuracy. The above embodiment also provides a scheme for intercepting small point clouds during point cloud matching. When intercepting small point clouds for local deviation correction, the scheme has a better effect of intercepting spherical point cloud data, because spherical point cloud data does not need to consider the influence of directionality and can be applied in any direction. The above embodiment also provides a solution for automatically combining the gluing track segments under multiple shooting positions. The above embodiment also provides a solution for making a template point cloud, that is, when making the template, only valid information is retained as much as possible, and all interference parts are removed to increase the accuracy of the algorithm. The above embodiment processes the point cloud data corresponding to each shooting position separately. After the processing is completed, only a certain section of the gluing track is corrected, and there is no need to perform point cloud splicing, thereby avoiding the track correction error caused by splicing.

[0105] See also Figure 4 , Figure 4 A flowchart of a method for correcting the gluing trajectory of eyeglass frames using 3D visual point cloud data provided in an embodiment of the present application. This embodiment may include the following steps:

[0106] Step 1: Template making.

[0107] Among them, this step is used to make a 3D model of a standard eyeglass frame. In this embodiment, a binocular structured light camera can be used to obtain point cloud data of a standard eyeglass frame. In the process of making the template, only valid information can be retained as much as possible, and interference parts can be removed to increase the accuracy of the algorithm. After the eyeglass frame is fixed on the tooling, the tooling is fixed for all eyeglass frames, but different eyeglass frames are different. Therefore, the template made this time can only retain the eyeglass frame information, and the tooling information cannot be attached. In addition, to ensure the effect of the algorithm, the final template can only retain the glue tank information. Please refer to Figure 5 , Figure 5 A schematic diagram of point cloud data of a glue groove of a glasses frame provided in an embodiment of the present application.

[0108] Step 2: Input template point cloud, calibration matrix, scanned point cloud and template trajectory.

[0109] The template point cloud in this step is the standard point cloud data, the scanned point cloud is the actual point cloud data, and the template trajectory is the template gluing trajectory. The template point cloud and scanned point cloud data in the camera coordinate system can be converted to the machine tool coordinate system through the calibration matrix. Figure 6 and Figure 7 , Figure 6 This is a schematic diagram of a point cloud obtained from multiple shooting positions provided in an embodiment of the present application. Figure 6 The point cloud data obtained from the ten shooting positions ① to ⑩ are shown. Figure 7 A schematic diagram of the result of image combination before coordinate system conversion provided by an embodiment of the present application is shown as follows: Figure 7 As shown in the figure, if the 10 images are placed in the same position before the coordinate system conversion, they cannot be combined into a complete eyeglass frame. Figure 8 , a schematic diagram of the result of image combination after coordinate system conversion provided in an embodiment of the present application, the converted images can be spliced ​​into a complete glasses frame.

[0110] See also Fig. 9 , Fig. 9 A schematic diagram of the corresponding relationship between a template trajectory and a scanning point cloud provided in an embodiment of the present application, wherein the template trajectory includes a plurality of trajectory points (i.e. Fig. 9 The white dots in the figure), the scanned point cloud is Fig. 9 Middle black part.

[0111] Step 3: Filter the scanned point cloud to remove interference.

[0112] Since the scanned point cloud contains tooling information and has a lot of interference, it is necessary to filter out the redundant information to increase the matching efficiency and accuracy of the algorithm. The main process of the filtering method is: input the scanned point cloud and the coordinates of the diagonal vertices of the minimum rectangular filter box that needs to be filtered; use the minimum rectangular filter box to perform a straight-through filtering operation on the scanned point cloud, output the filtered point cloud, and compare the combined point cloud before and after filtering. Fig.10 As shown, Fig.10 A schematic diagram of the comparison of a scanning point cloud before and after filtering provided in an embodiment of the present application.

[0113] Step 4: Roughly match the point cloud of the single-shot position (overall deviation correction of the gluing track).

[0114] If the position of the glasses frame on the tooling changes, this step can correct the template trajectory as a whole to meet the actual gluing requirements. The main process of point cloud rough matching is: input the template point cloud and scan point cloud corresponding to the single-shot position, use the ICP (Iterative Closest Point) algorithm to match the input point cloud to obtain the transformation matrix of the template point cloud, and correct the template trajectory as a whole based on the transformation matrix. Please refer to Fig.11 , Fig.11 A schematic diagram of using a transformation matrix to perform overall deviation correction on a template trajectory provided in an embodiment of the present application is shown in FIG. Fig.11 Schematic diagram of the template trajectory corresponding to the 1st to 10th photographing positions before and after overall deviation correction is shown in FIG. 1, where 1<n<10.

[0115] Step 5: Precise matching of small point clouds (local deviation correction of gluing track).

[0116] Among them, there are two purposes of precise matching: 1) to further correct the template trajectory after overall correction; 2) to deal with the situation of local slight deformation of the eyeglass frame. The small point cloud precise matching algorithm process includes: inputting the template trajectory fragment, the scanning point cloud at the single-shot position, and the template point cloud at the single-shot position, and intercepting the local small point cloud on the template point cloud and the scanning point cloud with the coordinate position of the template trajectory point. The local small point cloud is matched by the ICP algorithm to obtain the transformation matrix corresponding to the gluing control point. The gluing control point is the trajectory point in the template trajectory. One gluing control point corresponds to one local small point cloud, and one local small point cloud corresponds to one transformation matrix.

[0117] See also Fig.12 , Fig.12 A schematic diagram of a rectangular filter provided in an embodiment of the present application intercepting a local small point cloud, such as Fig.12 The following figure shows the use of a cuboid filter to perform affine transformation to intercept a small point cloud. The transformed cuboid filter can only ensure that the top surface is perpendicular to the tool axis vector. Due to the limited available information, only the coordinates of the glue control points and the tool axis vector are available, which makes it difficult to control the direction of the cuboid filter. Fig.13 , Fig.13 A schematic diagram of a spherical filter intercepting a local small point cloud provided in an embodiment of the present application, such as Fig.13 As shown, the operation of intercepting small point clouds using a spherical filter does not need to consider the directionality of the sphere, and uses less information. Only the coordinates of the glue control points are needed, and there is no need to use the tool axis vector.

[0118] Step 6: Transform the template trajectory according to the transformation matrix;

[0119] Step 7: Combine the track segments and output the complete glue-coating track;

[0120] According to the matching results of step 4 and step 5, two sets of transformation matrices can be obtained, and the template trajectories are transformed in turn. Then, the transformed template trajectories can be combined to obtain the workpiece gluing trajectory for guiding the gluing operation. The combined trajectory process includes: inputting multiple trajectory segments, automatically sorting the trajectory segments according to the trajectory name and the corresponding index, and outputting the final trajectory. Fig.14 A schematic diagram of a trajectory segment combination provided in an embodiment of the present application is shown in FIG. Fig.14 As shown, by combining the trajectory segments corresponding to the 10 groups of photographing positions, 4 complete trajectories can be output, and the trajectories guide the machine tool to apply glue.

[0121] The above embodiments can solve the problem of VR / AR product gluing NG caused by product placement and local deformation. The operation is simple and has a certain tolerance and stability for the absolute positioning accuracy of the gluing machine. The above embodiments have certain guidance for the visual guidance gluing industry, and the technology mentioned in the above embodiments has been found to have a high guidance gluing accuracy through actual verification, which is basically around ±0.07mm (the diameter of the gluing needle is 5mm).

[0122] An embodiment of the present application provides a device for generating a gluing trajectory of a workpiece, the device may include:

[0123] Point cloud scanning module, used to obtain actual point cloud data of the workpiece to be glued using a binocular structured light camera;

[0124] A matching module, used for performing point cloud matching between the actual point cloud data and the standard point cloud data to obtain a matching result; wherein the standard point cloud data is the point cloud data obtained by scanning a standard workpiece with the binocular structured light camera;

[0125] The trajectory generation module is used to correct the template gluing trajectory corresponding to the standard workpiece according to the matching result to generate a workpiece gluing trajectory, so as to perform a gluing operation on the workpiece to be glued using the workpiece gluing trajectory.

[0126] This embodiment uses a binocular structured light camera to obtain the actual point cloud data of the workpiece to be glued and the standard point cloud data of the standard workpiece. Since the binocular structured light camera obtains the corresponding point cloud data by collecting images in the field of view, the binocular structured light camera does not need to be linked with the machine tool of the glue coating equipment. This embodiment can improve the acquisition accuracy of the actual point cloud data and the standard point cloud data of the standard workpiece. This embodiment uses the actual point cloud data and standard point cloud data obtained by the binocular structured light camera to match, and corrects the template gluing trajectory according to the matching result to obtain the workpiece gluing trajectory. Therefore, this embodiment can generate an accurate workpiece gluing trajectory and improve the gluing accuracy.

[0127] Furthermore, it also includes:

[0128] A standard point cloud data acquisition module is used to determine N photographing positions according to the field size of the binocular structured light camera and the size of the standard workpiece before using the binocular structured light camera to acquire the actual point cloud data of the workpiece to be glued; wherein N is greater than or equal to the minimum number of photographing positions that satisfies a preset condition, and the preset condition is that the images taken at all the photographing positions include a complete image of the standard workpiece; and is also used to acquire the standard point cloud data of the standard workpiece at the N photographing positions using the binocular structured light camera;

[0129] Correspondingly, the point cloud scanning module is used to obtain the actual point cloud data of the workpiece to be glued at N photographing positions using the binocular structured light camera.

[0130] Furthermore, the matching module is used to perform point cloud matching on all actual point cloud data and all standard point cloud data corresponding to the same photographing position to obtain an overall point cloud matching result;

[0131] Correspondingly, the trajectory generation module is used to correct the template gluing trajectory corresponding to the standard workpiece according to the overall point cloud matching result to generate the workpiece gluing trajectory, so as to perform a gluing operation on the workpiece to be glued using the workpiece gluing trajectory.

[0132] Furthermore, the matching module includes:

[0133] A track point selection unit, used for selecting a target track point in the template gluing track;

[0134] A local actual point cloud interception unit, used for intercepting a local actual point cloud in the actual point cloud data with the target trajectory point as the center;

[0135] A local standard point cloud interception unit, used for intercepting a local standard point cloud in the standard point cloud data with the target trajectory point as the center;

[0136] A local matching unit, used for performing point cloud matching between the local actual point cloud and the local standard point cloud to obtain a local point cloud matching result;

[0137] Correspondingly, the trajectory generation module is used to correct the template gluing trajectory corresponding to the standard workpiece according to the local point cloud matching result to generate the workpiece gluing trajectory, so as to perform a gluing operation on the workpiece to be glued using the workpiece gluing trajectory.

[0138] Furthermore, the local actual point cloud interception unit is used to intercept the local actual point cloud in the actual point cloud data using a spherical filter with the target trajectory point as the sphere center;

[0139] Correspondingly, the local standard point cloud interception unit is used to intercept the local standard point cloud in the standard point cloud data using the spherical filter with the target trajectory point as the sphere center.

[0140] Furthermore, a trajectory generation module is used to determine a point cloud transformation matrix according to the matching result; wherein the point cloud transformation matrix is ​​used to describe the coordinate transformation relationship between the actual point cloud data and the standard point cloud data; and is also used to use the point cloud transformation matrix to correct the template gluing trajectory corresponding to the standard workpiece to generate the workpiece gluing trajectory.

[0141] Furthermore, it also includes:

[0142] The standard point cloud data screening module is used to scan the standard workpiece with the binocular structured light camera to obtain initial point cloud data before using the binocular structured light camera to obtain the actual point cloud data of the workpiece to be glued; it is also used to construct a spherical space with each trajectory point in the template gluing trajectory as the center of the sphere, and set the initial point cloud data in all the spherical spaces as the standard point cloud data.

[0143] Since the embodiments of the apparatus part correspond to the embodiments of the method part, please refer to the description of the embodiments of the method part for the embodiments of the apparatus part, which will not be repeated here.

[0144] The present application also provides a storage medium on which a computer program is stored, and when the computer program is executed, the steps provided in the above embodiment can be implemented. The storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0145] The present application also provides an electronic device, which may include a memory and a processor, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the steps provided in the above embodiment may be implemented. Of course, the electronic device may also include various network interfaces, power supplies and other components.

[0146] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of this application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of this application.

[0147] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

Claims

1. A method for generating a workpiece gluing trajectory, characterized in that: include: Use a binocular structured light camera to obtain actual point cloud data of the workpiece to be glued; Performing point cloud matching on the actual point cloud data and the standard point cloud data to obtain a matching result; wherein the standard point cloud data is point cloud data obtained by scanning a standard workpiece with the binocular structured light camera; According to the matching result, the template gluing track corresponding to the standard workpiece is corrected to generate a workpiece gluing track, so as to perform a gluing operation on the workpiece to be glued using the workpiece gluing track; Before using a binocular structured light camera to obtain actual point cloud data of the workpiece to be glued, it also includes: Scanning the standard workpiece using the binocular structured light camera to obtain initial point cloud data; A spherical space is constructed with each track point in the template gluing track as the sphere center, and the initial point cloud data in all the spherical spaces is set as the standard point cloud data; The actual point cloud data and the standard point cloud data are matched to obtain a matching result, including: Selecting a target track point in the template gluing track; Taking the target trajectory point as the center, intercepting a local actual point cloud from the actual point cloud data; Taking the target trajectory point as the center, intercepting a local standard point cloud from the standard point cloud data; Performing point cloud matching on the local actual point cloud and the local standard point cloud to obtain a local point cloud matching result; Among them, the template gluing trajectory corresponding to the standard workpiece is corrected according to the matching result to generate the workpiece gluing trajectory, including: The template gluing trajectory corresponding to the standard workpiece is corrected according to the local point cloud matching result to generate the workpiece gluing trajectory.

2. The method for generating a workpiece gluing trajectory according to claim 1, characterized in that: Before using the binocular structured light camera to obtain the actual point cloud data of the workpiece to be glued, it also includes: Determine N photographing positions according to the field of view size of the binocular structured light camera and the size of the standard workpiece; wherein N is greater than or equal to the minimum number of photographing positions that satisfies a preset condition, and the preset condition is that the images taken at all the photographing positions include a complete image of the standard workpiece; Acquire the standard point cloud data of the standard workpiece at N photographing positions using the binocular structured light camera; Accordingly, the actual point cloud data of the workpiece to be glued is obtained by using a binocular structured light camera, including: The binocular structured light camera is used to acquire the actual point cloud data of the workpiece to be glued at the N photographing positions.

3. The method for generating a workpiece gluing trajectory according to claim 2, characterized in that: Performing point cloud matching on the actual point cloud data and the standard point cloud data to obtain a matching result includes: Performing point cloud matching on all actual point cloud data and all standard point cloud data corresponding to the same photographing position to obtain an overall point cloud matching result; Correspondingly, the template gluing track corresponding to the standard workpiece is corrected according to the matching result to generate the workpiece gluing track, including: The template gluing trajectory corresponding to the standard workpiece is corrected according to the overall point cloud matching result to generate the workpiece gluing trajectory.

4. The method for generating a workpiece gluing trajectory according to claim 1, characterized in that: Taking the target trajectory point as the center, intercepting a local actual point cloud in the actual point cloud data comprises: Taking the target trajectory point as the sphere center, using a spherical filter to intercept the local actual point cloud in the actual point cloud data; Accordingly, a local standard point cloud is intercepted from the standard point cloud data with the target trajectory point as the center; The target trajectory point is taken as the sphere center, and the local standard point cloud is intercepted from the standard point cloud data using the spherical filter.

5. The method for generating a workpiece gluing trajectory according to claim 1, characterized in that: The template gluing track corresponding to the standard workpiece is corrected according to the matching result to generate the workpiece gluing track, including: Determine a point cloud transformation matrix according to the matching result; wherein the point cloud transformation matrix is ​​used to describe the coordinate transformation relationship between the actual point cloud data and the standard point cloud data; The point cloud transformation matrix is ​​used to correct the template gluing trajectory corresponding to the standard workpiece to generate the workpiece gluing trajectory.

6. A device for generating a workpiece gluing trajectory, characterized in that: include: Point cloud scanning module, used to obtain actual point cloud data of the workpiece to be glued using a binocular structured light camera; A matching module, used for performing point cloud matching between the actual point cloud data and the standard point cloud data to obtain a matching result; wherein the standard point cloud data is the point cloud data obtained by scanning a standard workpiece with the binocular structured light camera; A trajectory generation module, used for correcting the template gluing trajectory corresponding to the standard workpiece according to the matching result to generate a workpiece gluing trajectory, so as to perform a gluing operation on the workpiece to be glued using the workpiece gluing trajectory; The standard point cloud data screening module is used to scan the standard workpiece with the binocular structured light camera to obtain initial point cloud data before using the binocular structured light camera to obtain the actual point cloud data of the workpiece to be glued; it is also used to construct a spherical space with each track point in the template glue coating track as the sphere center, and set the initial point cloud data in all the spherical spaces as the standard point cloud data; Wherein, the matching module includes: A track point selection unit, used for selecting a target track point in the template gluing track; A local actual point cloud interception unit, used for intercepting a local actual point cloud in the actual point cloud data with the target trajectory point as the center; A local standard point cloud interception unit, used for intercepting a local standard point cloud in the standard point cloud data with the target trajectory point as the center; A local matching unit, used for performing point cloud matching between the local actual point cloud and the local standard point cloud to obtain a local point cloud matching result; Correspondingly, the trajectory generation module is used to correct the template gluing trajectory corresponding to the standard workpiece according to the local point cloud matching result to generate the workpiece gluing trajectory.

7. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the workpiece gluing trajectory generation method as claimed in any one of claims 1 to 5 when calling the computer program in the memory.

8. A storage medium, characterized in that: The storage medium stores computer executable instructions, and when the computer executable instructions are loaded and executed by the processor, the steps of the method for generating a workpiece gluing trajectory as claimed in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Depth camera-based shelf monitoring method

    CN110363703A

  • Robot milling system workpiece rapid positioning method based on laser tracker and binocular camera

    CN111941425A

  • Mechanical arm machining track correction method based on three-dimensional vision

    CN112223294A

  • Method for processing easy-deformable products

    RU2679860C1