A method, device, equipment and medium for correcting a dispensing trajectory based on 3D vision
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QUNBIN INTELLIGENT MFG TECH (SUZHOU) CO LTD
- Filing Date
- 2023-07-11
- Publication Date
- 2026-07-24
Smart Images

Figure CN117816490B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automated processing technology, and in particular to a method, apparatus, equipment and medium for correcting dispensing trajectories based on 3D vision. Background Technology
[0002] Most smart wearable devices are made of non-metallic materials such as plastics. After manufacturing, they undergo overall or partial deformation. The dispensing trajectory of the teaching device is a rigid trajectory, which cannot accommodate the local deformation of the product, resulting in a low product yield.
[0003] In existing 3D vision solutions, the overall correction method used for smart wearable products is to use a 3D camera with a large field of view to capture images of the product in one go, confirm the scanning position, and use the captured image as a template. Based on the current template product, an executable dispensing trajectory is taught and used as the template trajectory. When the second product moves to the scanning position and captures an image, the second captured image is compared with the first image to calculate the three-dimensional spatial pose deviation between the two images. This deviation is then compensated onto the template trajectory to obtain a new dispensing trajectory.
[0004] The dispensing trajectory is obtained through teaching. However, due to the irregular structure of smart wearable devices, teaching becomes difficult and time-consuming. Therefore, there is an urgent need for a method that can correct the dispensing trajectory of smart wearable devices using 3D vision. Summary of the Invention
[0005] To address the shortcomings of the existing technology, the present invention aims to provide a method for correcting dispensing trajectories based on 3D vision. This invention enables flexible and rapid correction of dispensing trajectories even in the presence of screw holes.
[0006] According to an embodiment of the present invention, a first solution is provided: a method for correcting dispensing trajectory based on 3D vision, characterized in that the method includes: scanning a template product to obtain a template image corresponding to the template product; receiving multiple three-dimensional measurement frames of the template image; extracting feature points from the template image based on the multiple three-dimensional measurement frames to obtain a first set of feature points, wherein all feature points are within the three-dimensional measurement frames; drawing a first trajectory from the multiple feature points in the first set of feature points; scanning a product to be dispensed to obtain a three-dimensional image of the product to be dispensed, wherein the product to be dispensed is of the same type as the template product; obtaining the screw hole coordinates in the three-dimensional image of the product to be dispensed; correcting the first trajectory based on the screw hole coordinates to obtain a target trajectory, wherein a dispensing machine performs dispensing according to the target trajectory.
[0007] Furthermore, as a more preferred embodiment of the present invention, the step of correcting the first trajectory based on the screw hole coordinates to obtain the target trajectory includes: obtaining a first offset range based on the screw hole coordinates; acquiring the feature point corresponding to the screw hole; determining the coordinate offset range and offset direction of the feature point based on the first offset range; and correcting the position of the feature point in the first trajectory based on the coordinate offset range and offset direction to obtain the target trajectory.
[0008] Furthermore, as a more preferred embodiment of the present invention, obtaining the first offset range based on the screw hole coordinates includes: acquiring the size and general deformation of the template product; determining the offset range of the screw hole coordinates based on the size and general deformation of the template product, wherein the offset range is the first offset range.
[0009] Furthermore, as a more preferred embodiment of the present invention, after drawing the plurality of feature points in the first feature point set into a first trajectory, the method further includes: drawing the plurality of feature points in the first trajectory into a plurality of trajectory dots with the same radius, wherein the plurality of trajectory dots are adjacent to each other.
[0010] Furthermore, as a more preferred embodiment of the present invention, determining the coordinate offset range and offset direction of the feature point based on the first offset range includes: obtaining multiple target trajectory points corresponding to the screw hole coordinates; setting the feature point corresponding to the screw hole as the center point; comparing the angle difference between the center point and the multiple target trajectory points to obtain multiple target angle differences; and setting the angle difference with a positive value among the multiple target angles as the first offset direction and the angle difference with a negative value as the second offset direction.
[0011] Furthermore, as a more preferred embodiment of the present invention, the step of correcting the position of feature points in the first trajectory according to the coordinate offset range and offset direction to obtain the target trajectory includes: offsetting the plurality of target trajectory dots according to the first offset range, the first offset direction and the second offset direction; obtaining the center point of the offset trajectory dots and the center point of the unoffset trajectory dots; connecting the center point of the offset trajectory dots and the center point of the unoffset trajectory dots to obtain the target trajectory.
[0012] Furthermore, as a more preferred embodiment of the present invention, obtaining the screw hole coordinates in the three-dimensional image of the product to be glued includes: obtaining the screw hole image in the three-dimensional image of the product to be glued; and extracting the screw hole coordinates corresponding to the screw hole image according to a preset coordinate transformation.
[0013] According to an embodiment of the present invention, a second solution is provided: a device for correcting dispensing trajectories based on 3D vision, characterized in that the device comprises: a scanning module for scanning a template product to obtain a template image corresponding to the template product; a receiving module for receiving multiple three-dimensional measurement frames of the template image; an extraction module for extracting feature points from the template image based on the multiple three-dimensional measurement frames to obtain a first set of feature points, wherein all feature points are within the three-dimensional measurement frames; a drawing module for drawing multiple feature points in the first set of feature points into a first trajectory; the scanning module is further configured to scan a product to be dispensed to obtain a three-dimensional image of the product to be dispensed, wherein the product to be dispensed is of the same type as the template product; an acquisition module for acquiring the screw hole coordinates in the three-dimensional image of the product to be dispensed; and a correction module for correcting the first trajectory based on the screw hole coordinates to obtain a target trajectory, wherein a dispensing machine performs dispensing according to the target trajectory.
[0014] According to an embodiment of the present invention, a third solution is provided by the present invention: a computer device including a memory and a processor, the memory storing a computer program, the computer program being executed by the processor, the program including instructions for use as in the first solution.
[0015] According to an embodiment of the present invention, a fourth solution is provided by the present invention: a computer storage medium is provided, the computer storage medium storing one or more instructions, the one or more instructions being adapted to be loaded by a processor and executed as described in the first solution above and any possible implementation thereof.
[0016] This application scans a template product to obtain a template image corresponding to the template product, receives multiple 3D measurement frames from the template image, extracts feature points from the template image based on the multiple 3D measurement frames to obtain a first feature point set, and then draws multiple feature points from the first feature point set into a first trajectory. The application then scans the product to be glued to obtain a 3D image of the product to be glued, the product to be glued being of the same type as the template product. Next, it obtains the screw hole coordinates in the 3D image of the product to be glued, and finally corrects the first trajectory based on the screw hole coordinates to obtain a target trajectory. The glue dispensing machine then performs glue dispensing based on the target trajectory. Therefore, this solution enables full-coverage image acquisition of the product, captures feature points from the acquired 3D image, connects them to form a glue dispensing trajectory, and automatically identifies the position of screw holes. The trajectory near the screw holes is shifted outwards, correcting the glue dispensing trajectory and making the generated glue dispensing trajectory more accurate, thus improving glue dispensing efficiency. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the background art, the accompanying drawings used in the embodiments of this application or the background art will be described below.
[0018] Figure 1 A flowchart illustrating a method for correcting dispensing trajectories based on 3D vision, provided in an embodiment of this application;
[0019] Figure 2A A schematic diagram of a three-dimensional measurement frame point selection provided in an embodiment of this application;
[0020] Figure 2B This is another schematic diagram of a three-dimensional measurement frame point selection provided in an embodiment of this application;
[0021] Figure 2C A schematic diagram of feature points provided for an embodiment of this application;
[0022] Figure 2D A schematic diagram of a trajectory image provided in an embodiment of this application;
[0023] Figure 2E This is another schematic diagram of a trajectory image provided in an embodiment of this application;
[0024] Figure 2F This is another schematic diagram of a trajectory image provided in an embodiment of this application;
[0025] Figure 3 A flowchart illustrating a method for correcting dispensing trajectories based on 3D vision, provided in an embodiment of this application;
[0026] Figure 4 A schematic diagram of a device for correcting dispensing trajectories based on 3D vision, provided in an embodiment of this application;
[0027] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0028] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0029] It should be noted that when a component is referred to as being "fixed to" or "set on" another component, it can be directly on or indirectly set on the other component; when a component is referred to as being "connected to" another component, it can be directly connected to or indirectly connected to the other component.
[0030] It should be understood that the terms "length", "width", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", and "outer" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or component referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0031] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" or "several" means two or more, unless otherwise explicitly specified.
[0032] It should be noted that the structures, proportions, sizes, etc., shown in the accompanying drawings of this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed in the specification, and are not intended to limit the conditions under which this application can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size should still fall within the scope of the technical content disclosed in this application, provided that they do not affect the effects and purposes that this application can produce.
[0033] The embodiments of this application are described below with reference to the accompanying drawings.
[0034] Please see Figure 1 , Figure 1 This is a flowchart illustrating a method for correcting dispensing trajectories based on 3D vision, as provided in an embodiment of this application. The method may include:
[0035] 101. The computer equipment scans the template product to obtain a template image corresponding to the template product.
[0036] In this process, a visual tool is used to perform 3D scanning of the template product to obtain a template image. In one embodiment, the scope of a single scan is limited. For medium to large-sized products, multiple scans are required, and then the results of the multiple scans are stitched together to obtain a complete template image.
[0037] 102. Receive multiple three-dimensional measurement frames of the template image.
[0038] The three-dimensional measurement frame can be manually marked or automatically generated, and this is not the only limitation.
[0039] For example, a 3D measurement frame can be built centered on the image coordinates of a template product according to preset length, width, and height; the 3D measurement frame is a three-dimensional cuboid. See details for further information. Figure 2A and Figure 2B ,in, Figure 2A An image of points taken from the complete 3D measurement frame. Figure 2B An image of points taken from a local 3D measurement frame.
[0040] 103. Based on the plurality of three-dimensional measurement frames, feature points are extracted from the template image to obtain a first set of feature points, wherein all feature points are within the three-dimensional measurement frames.
[0041] Feature points refer to representative points in the template image, such as extracting representative points from the inner or outer contour of the product as feature points.
[0042] For example, when the feature point is a valid point searched within the 3D measurement frame, it is ensured that the searched valid point is a point that conforms to the local deformation of the product and must be a point on the actual product. The obtained valid points are then formed into a set of valid feature points.
[0043] For details, please refer to [link / reference]. Figure 2C , Figure 2C This is a schematic diagram of the image showing the feature points.
[0044] 104. Draw a first trajectory from multiple feature points in the first feature point set.
[0045] In an optional implementation, after drawing a plurality of feature points in the first feature point set into a first trajectory, the method further includes: drawing a plurality of feature points in the first trajectory into a plurality of trajectory dots with the same radius, the plurality of trajectory dots being adjacent to each other.
[0046] For details, please refer to [link / reference]. Figure 2D , Figure 2D It is a trajectory image formed by connecting points, and the image is composed of multiple trajectory circles connected together.
[0047] 105. Scan the product to be glued to obtain a three-dimensional image of the product to be glued to, wherein the product to be glued to and the template product are of the same type.
[0048] The product to be dispensed is the actual product to be dispensed, similar to the model product used for demonstration, except that it may have internal deformations. Our goal is to achieve high precision even with internal deformations in the product to be dispensed. The product to be dispensed also needs to be scanned to obtain a 3D image.
[0049] 106. Obtain the screw hole coordinates in the three-dimensional image of the product to be glued.
[0050] For details, please refer to [link / reference]. Figure 2E and Figure 2F , Figure 2E This is a diagram showing the offset range and angle. Figure 2F A diagram showing the area for identifying screw holes.
[0051] The aforementioned screw hole coordinates are not limited to the coordinates of a single screw hole. If there are multiple screw holes, multiple coordinates corresponding to multiple screw holes can be obtained.
[0052] 107. Correct the first trajectory according to the screw hole coordinates to obtain the target trajectory, wherein the dispensing machine performs dispensing according to the target trajectory.
[0053] In one optional implementation, the step of correcting the first trajectory based on the screw hole coordinates to obtain the target trajectory includes: obtaining a first offset range based on the screw hole coordinates; acquiring the feature point corresponding to the screw hole; determining the coordinate offset range and offset direction of the feature point based on the first offset range; and correcting the position of the feature point in the first trajectory based on the coordinate offset range and offset direction to obtain the target trajectory.
[0054] In one optional implementation, obtaining the first offset range based on the screw hole coordinates includes: acquiring the size and general deformation of the template product; determining the offset range of the screw hole coordinates based on the size and general deformation of the template product, wherein the offset range is the first offset range.
[0055] The aforementioned conventional deformation variables can be obtained from factory settings or experimental data statistics, and are not limited to a single variable here.
[0056] In one optional implementation, determining the coordinate offset range and offset direction of the feature point based on the first offset range includes: obtaining multiple target trajectory points corresponding to the screw hole coordinates; setting the feature point corresponding to the screw hole as the center point; comparing the angle difference between the center point and the multiple target trajectory points to obtain multiple target angle differences; and setting the angle difference with a positive value among the multiple target angles as the first offset direction and the angle difference with a negative value as the second offset direction.
[0057] The first and second offset directions mentioned above need to be offset outwards from the position of the screw hole itself. For example, the first offset direction can be offset upwards by 45 degrees and the second offset direction can be offset downwards by 45 degrees. There is no single limitation here.
[0058] The aforementioned offset direction varies depending on the position of each target trajectory dot, but what remains constant is that it must be far away from the position of the screw hole itself.
[0059] In one optional implementation, the step of correcting the position of feature points in the first trajectory according to the coordinate offset range and offset direction to obtain the target trajectory includes: offsetting the plurality of target trajectory dots according to the first offset range, the first offset direction and the second offset direction; obtaining the center point of the offset trajectory dots and the center point of the unoffset trajectory dots; connecting the center point of the offset trajectory dots and the center point of the unoffset trajectory dots to obtain the target trajectory.
[0060] The unoffset trajectory dots mentioned above represent other locations far from the screw holes. This means that the solution corrects the trajectory for the area where the screw holes are located, but does not require correction for areas other than the screw holes.
[0061] In one optional implementation, obtaining the screw hole coordinates in the three-dimensional image of the product to be glued includes: obtaining a screw hole image in the three-dimensional image of the product to be glued; and extracting the screw hole coordinates corresponding to the screw hole image according to a preset coordinate transformation.
[0062] The preset coordinate transformation can be achieved by acquiring a scanned image through camera scanning; using a vision tool to capture the image coordinates of N calibration points in the scanned image; moving the needle head to the position of the calibration block and recording the corresponding N mechanism coordinates; determining the transformation relationship between the image coordinates and the mechanism coordinates based on the image coordinates of the N calibration points and the N mechanism coordinates to obtain the screw hole coordinates.
[0063] This application scans a template product to obtain a template image corresponding to the template product, receives multiple 3D measurement frames from the template image, extracts feature points from the template image based on the multiple 3D measurement frames to obtain a first feature point set, and then draws multiple feature points from the first feature point set into a first trajectory. The application then scans the product to be glued to obtain a 3D image of the product to be glued, the product to be glued being of the same type as the template product. Next, it obtains the screw hole coordinates in the 3D image of the product to be glued, and finally corrects the first trajectory based on the screw hole coordinates to obtain a target trajectory. The glue dispensing machine then performs glue dispensing based on the target trajectory. Therefore, this solution enables full-coverage image acquisition of the product, captures feature points from the acquired 3D image, connects them to form a glue dispensing trajectory, and automatically identifies the position of screw holes. The trajectory near the screw holes is shifted outwards, correcting the glue dispensing trajectory and making the generated glue dispensing trajectory more accurate, thus improving glue dispensing efficiency.
[0064] Figure 3 This is a flowchart illustrating another method for correcting dispensing trajectories based on 3D vision provided in an embodiment of this application, as shown below. Figure 3 As shown, the method includes:
[0065] 301. Scan the template product to obtain a template image corresponding to the template product;
[0066] 302. Receive multiple three-dimensional measurement frames from the template image;
[0067] 303. Based on the plurality of three-dimensional measurement frames, feature points are extracted from the template image to obtain a first set of feature points, wherein all feature points are within the three-dimensional measurement frames;
[0068] 304. Draw a first trajectory from multiple feature points in the first feature point set;
[0069] 305. Scan the product to be glued to obtain a three-dimensional image of the product to be glued to, wherein the product to be glued to and the template product are of the same type.
[0070] 306. Obtain the screw hole coordinates in the three-dimensional image of the product to be glued;
[0071] 307. Obtain the size and general deformation of the template product;
[0072] 308. Determine the offset range of the screw hole coordinates based on the size and conventional deformation of the template product, wherein the offset range is the first offset range;
[0073] 309. Obtain the feature points corresponding to the screw holes;
[0074] 310. Based on the first offset range, determine the coordinate offset range and offset direction of the feature point;
[0075] 311. Correct the position of the feature points in the first trajectory according to the coordinate offset range and offset direction to obtain the target trajectory.
[0076] For example, you can refer to Figures 2A-2F ,in, Figure 2A An image of points taken from the complete 3D measurement frame. Figure 2B An image of points taken from a local 3D measurement frame. Figure 2C The image of the feature points is taken. Figure 2D It is a trajectory image formed by connecting points. Figure 2E This is a diagram showing the offset range and angle. Figure 2F A diagram showing the area for identifying screw holes.
[0077] This application scans a template product to obtain a template image corresponding to the template product, receives multiple 3D measurement frames from the template image, extracts feature points from the template image based on the multiple 3D measurement frames to obtain a first feature point set, and then draws multiple feature points from the first feature point set into a first trajectory. The application then scans the product to be glued to obtain a 3D image of the product to be glued, the product to be glued being of the same type as the template product. Next, it obtains the screw hole coordinates in the 3D image of the product to be glued, and finally corrects the first trajectory based on the screw hole coordinates to obtain a target trajectory. The glue dispensing machine then performs glue dispensing based on the target trajectory. Therefore, this solution enables full-coverage image acquisition of the product, captures feature points from the acquired 3D image, connects them to form a glue dispensing trajectory, and automatically identifies the position of screw holes. The trajectory near the screw holes is shifted outwards, correcting the glue dispensing trajectory and making the generated glue dispensing trajectory more accurate, thus improving glue dispensing efficiency.
[0078] Based on the description of the above embodiments of the method for correcting dispensing trajectories based on 3D vision, this application also discloses a device for correcting dispensing trajectories based on 3D vision, such as... Figure 4 As shown, the 3D vision-based dispensing trajectory correction device 400 includes:
[0079] The scanning module 401 is used to scan the template product to obtain a template image corresponding to the template product;
[0080] The receiving module 402 is used to receive multiple three-dimensional measurement frames of the template image;
[0081] The extraction module 403 is used to extract feature points from the template image based on the plurality of three-dimensional measurement frames to obtain a first set of feature points, wherein all feature points are within the three-dimensional measurement frames;
[0082] The drawing module 404 is used to draw multiple feature points in the first feature point set into a first trajectory;
[0083] The scanning module 401 is also used to scan the product to be glued to obtain a three-dimensional image of the product to be glued to, wherein the product to be glued to and the template product are of the same type.
[0084] The acquisition module 405 is used to acquire the screw hole coordinates in the three-dimensional image of the product to be glued;
[0085] The correction module 406 is used to correct the first trajectory according to the screw hole coordinates to obtain the target trajectory, wherein the dispensing machine performs dispensing according to the target trajectory.
[0086] This application scans a template product to obtain a template image corresponding to the template product, receives multiple 3D measurement frames from the template image, extracts feature points from the template image based on the multiple 3D measurement frames to obtain a first feature point set, and then draws multiple feature points from the first feature point set into a first trajectory. The application then scans the product to be glued to obtain a 3D image of the product to be glued, the product to be glued being of the same type as the template product. Next, it obtains the screw hole coordinates in the 3D image of the product to be glued, and finally corrects the first trajectory based on the screw hole coordinates to obtain a target trajectory. The glue dispensing machine then performs glue dispensing based on the target trajectory. Therefore, this solution enables full-coverage image acquisition of the product, captures feature points from the acquired 3D image, connects them to form a glue dispensing trajectory, and automatically identifies the position of screw holes. The trajectory near the screw holes is shifted outwards, correcting the glue dispensing trajectory and making the generated glue dispensing trajectory more accurate, thus improving glue dispensing efficiency.
[0087] This application also provides a computer storage medium (memory), which is a memory device in an electronic device used to store programs and data. It is understood that the computer storage medium here can include both built-in storage media in the electronic device and extended storage media supported by the electronic device. The computer storage medium provides storage space that stores the operating system of the electronic device. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device; optionally, it can also be at least one computer storage medium located remotely from the aforementioned processor.
[0088] In one embodiment, a processor may load and execute one or more instructions stored in a computer storage medium to implement the corresponding steps in the above embodiments; specifically, one or more instructions in the computer storage medium may be loaded and executed by a processor. Figure 1 And / or any step of the method in Figure 2, which will not be described in detail here.
[0089] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0090] In the embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the division of modules is merely a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. The coupling, direct coupling, or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, apparatuses, or modules, and may be electrical, mechanical, or other forms.
[0091] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0092] Figure 5 An internal structural diagram of a computer device is shown in one embodiment. This computer device may be a terminal. Figure 5As shown, the computer device includes a processor, memory, and network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium may store an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement the aforementioned method for correcting dispensing trajectories based on 3D vision. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to perform the aforementioned method for correcting dispensing trajectories based on 3D vision. Those skilled in the art will understand that... Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the device to which the present application is applied. Specific devices may include more or fewer components than those shown in the figure, or may combine certain components, or may have different component arrangements.
[0093] A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the method for correcting dispensing trajectories based on 3D vision in any of the above embodiments.
[0094] A computer device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method for correcting dispensing trajectories based on 3D vision in any of the above embodiments.
[0095] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer instructions. When these computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted through a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media can be read-only memory (ROM), random access memory (RAM), or magnetic media, such as floppy disks, hard disks, magnetic tapes, magnetic disks, or optical media, such as digital versatile discs (DVDs), or semiconductor media, such as solid state disks (SSDs).
[0096] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for correcting dispensing trajectories based on 3D vision, characterized in that, The method includes: The template product is scanned to obtain a template image corresponding to the template product; Receive multiple 3D measurement frames from the template image; Based on the plurality of three-dimensional measurement frames, feature points are extracted from the template image to obtain a first set of feature points, wherein all feature points are within the three-dimensional measurement frames; The first feature point set is plotted as a first trajectory. The product to be glued is scanned to obtain a three-dimensional image of the product to be glued, and the product to be glued is the same type of product as the template product. Obtain the screw hole coordinates in the 3D image of the product to be glued; The first trajectory is corrected according to the screw hole coordinates to obtain the target trajectory, wherein the dispensing machine performs dispensing according to the target trajectory; The step of correcting the first trajectory based on the screw hole coordinates to obtain the target trajectory includes: Based on the screw hole coordinates, the first offset range is obtained; Obtain the feature points corresponding to the screw holes; Based on the first offset range, determine the coordinate offset range and offset direction of the feature point; The position of feature points in the first trajectory is corrected according to the coordinate offset range and offset direction to obtain the target trajectory; The step of obtaining the first offset range based on the screw hole coordinates includes: Obtain the size and general shape of the template product; The offset range of the screw hole coordinates is determined based on the size and conventional deformation of the template product, and the offset range is the first offset range; By capturing feature points from the acquired 3D image, connecting them to form a dispensing trajectory, and automatically identifying the position of the screw hole, the trajectory near the screw hole is shifted outward to correct the dispensing trajectory, making the generated dispensing trajectory more accurate and improving dispensing efficiency.
2. The method for correcting dispensing trajectories based on 3D vision according to claim 1, characterized in that, After drawing the multiple feature points in the first feature point set into a first trajectory, the method further includes: Multiple feature points in the first trajectory are drawn as multiple trajectory dots with the same radius, and the multiple trajectory dots are adjacent to each other.
3. The method for correcting dispensing trajectories based on 3D vision according to claim 1 or 2, characterized in that, The step of determining the coordinate offset range and offset direction of the feature point based on the first offset range includes: Obtain multiple target trajectory dots corresponding to the screw hole coordinates; Set the feature point corresponding to the screw hole as the center point; By comparing the angle difference between the center point and the multiple target trajectory dots, multiple target angle differences are obtained; Among the multiple target angles, the angle difference with a positive value is set as the first offset direction, and the angle difference with a negative value is set as the second offset direction.
4. The method for correcting dispensing trajectories based on 3D vision according to claim 3, characterized in that, The step of correcting the position of feature points in the first trajectory based on the coordinate offset range and offset direction to obtain the target trajectory includes: The plurality of target trajectory dots are offset according to the first offset range, the first offset direction, and the second offset direction; Obtain the center point of the offset trajectory point and the center point of the unoffset trajectory point; Connect the center point of the offset trajectory point with the center point of the unoffset trajectory point to obtain the target trajectory.
5. The method for correcting dispensing trajectories based on 3D vision according to claim 1, characterized in that, The step of obtaining the screw hole coordinates in the 3D image of the product to be glued includes: Obtain the screw hole image from the 3D image of the product to be glued; Based on a preset coordinate transformation, the coordinates of the screw hole corresponding to the screw hole image are extracted.
6. A device for correcting dispensing trajectories based on 3D vision, characterized in that, The apparatus for correcting dispensing trajectories based on 3D vision using any one of claims 1 to 5, the apparatus comprising: The scanning module is used to scan the template product to obtain a template image corresponding to the template product; A receiving module is used to receive multiple three-dimensional measurement frames of the template image; The extraction module is used to extract feature points from the template image based on the plurality of three-dimensional measurement frames to obtain a first set of feature points, wherein all feature points are within the three-dimensional measurement frames; A drawing module is used to draw multiple feature points in the first feature point set into a first trajectory; The scanning module is also used to scan the product to be glued, and obtain a three-dimensional image of the product to be glued, wherein the product to be glued and the template product are of the same type. The acquisition module is used to acquire the screw hole coordinates in the three-dimensional image of the product to be glued; The correction module is used to correct the first trajectory according to the screw hole coordinates to obtain the target trajectory, wherein the dispensing machine performs dispensing according to the target trajectory.
7. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method for correcting dispensing trajectories based on 3D vision as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The device contains a computer program that, when executed by a processor, causes the processor to perform the steps of the 3D vision-based method for correcting dispensing trajectories as described in any one of claims 1 to 5.