An intelligent dispensing track generation method

By using an intelligent dispensing trajectory generation method, the shape and local features of the workpiece are automatically identified, and an optimized trajectory is generated. This solves the problems of uneven glue distribution and low automation in traditional dispensing processes, and achieves efficient and uniform dispensing results.

CN122453707APending Publication Date: 2026-07-24HANGZHOU SHIZAN TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HANGZHOU SHIZAN TECHNOLOGY CO LTD
Filing Date
2026-03-31
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Traditional dispensing processes require manual instruction or the use of fixed templates, which are not adaptable and cannot handle minor changes in the shape of the workpiece. In particular, it is difficult to ensure uniform glue distribution in sharp and protruding areas. Existing automatic trajectory generation systems cannot identify local features, resulting in unstable dispensing quality.

Method used

An intelligent dispensing trajectory generation method is adopted, which identifies the shape and local features of the workpiece through image processing to generate an optimized dispensing trajectory. In particular, supplementary trajectories are generated for sharp protrusions. Combined with morphological operations and B-spline curve fitting, automated trajectory planning is achieved.

Benefits of technology

It achieves uniform distribution of adhesive on the workpiece, improves dispensing quality and automation, reduces preparation time and increases production flexibility. The uniformity deviation of dispensing is reduced from ±25% to ±8%, and the preparation time is shortened from 30 minutes to within 2 minutes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure REF-OBJ-1774505156149-000001
    Figure REF-OBJ-1774505156149-000001
  • Figure REF-OBJ-1774505156149-000002
    Figure REF-OBJ-1774505156149-000002
  • Figure REF-OBJ-1774505156149-000003
    Figure REF-OBJ-1774505156149-000003
Patent Text Reader

Abstract

The present application relates to the field of automation manufacturing technology, in particular to a kind of smart dispensing trajectory generation method.It can automatically identify workpiece shape and local feature, generate optimized dispensing trajectory, especially in sharp convex part generates supplementary trajectory, ensure that glue is evenly distributed. Including obtaining the image of the workpiece to be dispensed;Extract the closed contour of each effective workpiece area, and extract the main steps such as the geometric center skeleton line of the effective workpiece area.The technical scheme can generate parallel supplementary dispensing trajectory independently, thereby accurately compensating the glue amount in such high-risk areas, realizing fully adaptive, template-free automatic trajectory generation, and greatly improving production flexibility and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated manufacturing technology, specifically to an intelligent dispensing trajectory generation method and system based on machine vision and motion control. Background Technology

[0002] In traditional dispensing processes, manual instruction or the use of fixed templates is usually required to define the dispensing path. This method has the following problems: (1) long preparation time, requiring reprogramming or template making for each new workpiece; (2) poor adaptability, unable to handle minor changes in workpiece shape; (3) for workpieces with complex geometric features, especially areas with sharp protrusions or depressions, it is difficult to ensure uniform distribution of adhesive, which can easily lead to adhesive accumulation or insufficient filling.

[0003] Existing technologies include visual positioning dispensing systems, but most only achieve workpiece positioning and alignment; trajectory generation still requires manual intervention. The few automatic trajectory generation systems that exist often rely on simple contour offset algorithms, failing to identify and process local workpiece features, leading to inconsistent dispensing quality. Particularly when dealing with sharp protrusions, existing methods either completely ignore them, resulting in incomplete glue coverage, or employ conservative global parameters, causing the glue to be too thin in flat areas.

[0004] Therefore, there is a need for a method and system that can automatically identify workpiece geometric features, especially sharp protrusions, and generate targeted dispensing trajectories to improve dispensing quality and automation. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide an intelligent dispensing trajectory generation method and system that can automatically identify the shape and local features of the workpiece and generate optimized dispensing trajectories, especially generating supplementary trajectories on sharp protrusions to ensure uniform glue distribution.

[0006] A method for generating intelligent dispensing trajectories includes the following steps: Acquire an image of the workpiece to be glued, perform binarization and connected component analysis on the image, and mark at least one connected region in the image as a candidate workpiece region. Based on the preset minimum area threshold and minimum size threshold, the candidate workpiece regions are filtered out, and regions with an area smaller than the minimum area threshold and a minimum bounding rectangle side length smaller than the minimum size threshold are excluded, thus obtaining the effective workpiece regions. Extract the closed contour of each effective workpiece region and denote it as the initial contour C0; Based on the initial contour C0 and the preset glue line width W, an outer glue dosing trajectory T1 is generated by offsetting outwards at equal intervals, where the offset distance D satisfies: D=W / 2+Δ, where Δ is an empirical compensation value set based on the glue flowability, and the value ranges from 1.5mm to 2.5mm. For the effective workpiece area, its geometric center skeleton line is extracted, and the skeleton line is subjected to three morphological dilation operations using a circular structuring element with a fixed radius of 3 pixels to obtain the first dilated region R_dilated; The same circular structuring element is used to perform two morphological erosion operations on the effective workpiece area to obtain the second eroded area R_eroded. Calculate the set difference between the first dilated region R_dilated and the second eroded region R_eroded to obtain the difference region R_diff; Extract the boundary contour of the difference region R_diff, calculate the center line of the boundary contour, and use it as the supplementary dispensing trajectory T2 corresponding to the sharp protrusion; The discrete point sequences of the outer dispensing trajectory T1 and the supplementary dispensing trajectory T2 are merged, and the merged point sequence is fitted with a cubic B-spline curve with the tension factor set to 0.7 to generate a smooth final execution trajectory T_final. The final execution trajectory T_final is converted into G-code format containing X, Y, Z coordinates, feed speed F, and dispensing control command M code, and then sent to the three-axis motion control card for execution.

[0007] Preferably, the method further includes a shape screening step for candidate workpiece regions: calculating the roundness index F for each candidate workpiece region, where F = 4π * S / L 2 S represents the area of ​​the region, and L represents the perimeter of the region. Based on different ranges of F values, the workpieces are divided into three categories: circular features, polygonal features, and irregular shapes, and different dispensing parameters are used.

[0008] Preferably, the method further includes the step of generating an internal filling trajectory: taking the initial contour C0 as the starting contour, setting the shrinkage step size S=W*0.8; performing iterative equidistant shrinkage along the inner normal direction to generate a series of inner contours, until the length of the latest generated inner contour is less than 10mm.

[0009] Preferably, the geometric center skeleton line is extracted using a morphological thinning algorithm, which iteratively removes boundary pixels using eight 3×3 structural templates to finally obtain a center skeleton line with a width of one pixel.

[0010] Preferably, after generating the smooth trajectory, a speed planning step is also included: based on the radius of curvature of each point on the trajectory, the execution speed is dynamically adjusted using the hyperbolic tangent function, with the maximum speed used for straight segments, the minimum speed used for sharp corners, and the speed adjusted according to the curvature for arc segments.

[0011] Preferably, the method further includes a glue quantity control step: calculating the total glue quantity based on the workpiece area and the glue quantity per unit area, calculating the glue quantity per unit length based on the total length of the trajectory, and controlling the opening flow rate and duration of the dispensing valve in combination with the length and speed of each trajectory segment.

[0012] An intelligent dispensing trajectory generation system includes an image acquisition unit, an image processing unit, a trajectory generation unit, a motion control unit, an actuator unit, and a human-computer interaction unit.

[0013] Preferably, each line of G-code instructions received by the motion control unit includes an instruction type identifier, coordinate values, and feed speed, where M08 indicates that the dispensing valve is open and M09 indicates that the dispensing valve is closed.

[0014] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described intelligent dispensing trajectory generation method.

[0015] It has the following beneficial effects: For these identified areas, parallel replenishment dispensing trajectories are generated separately, thereby accurately compensating for the amount of adhesive in these high-risk areas. This achieves fully adaptive, template-free automated trajectory generation, greatly improving production flexibility and efficiency. Detailed Implementation

[0016] The embodiments of the present invention will be described in further detail below with reference to examples. These examples are for illustrative purposes only and should not be construed as limiting the scope of the invention.

[0017] First, the system hardware was configured. The image acquisition unit uses a Baslerac A2440-75µm industrial camera, equipped with a 35mm lens and a 100mm diameter white ring LED light source. The camera is mounted on the side of the Z-axis of the dispensing machine, 300mm from the workpiece surface, shooting vertically downwards. The image resolution is 2592×1944 pixels, the pixel size is 3.45μm×3.45μm, and the field of view is approximately 150mm×112mm.

[0018] The image processing unit uses an Intel Core i7-10700 processor with a clock speed of 2.9GHz, equipped with 16GB of DDR4 memory and a 512GB SSD. The operating system is Ubuntu 20.04LTS, and the image processing library is OpenCV 4.5.1.

[0019] The trajectory generation unit runs self-developed trajectory planning software, written in C++ and featuring a graphical interface based on the Qt 5.15 framework. The software comprises four main modules: outer trajectory generation module, sharpness recognition module, inner layer filling module, and trajectory optimization module.

[0020] The motion control unit uses the Leadshine HBS606 three-axis motion control card, based on FPGA design, and supports 4-axis linkage control. The maximum pulse output frequency is 4MHz, supporting linear interpolation, circular interpolation, and continuous trajectory modes. The control card communicates with the host computer via EtherCAT bus.

[0021] The actuator unit utilizes a HIWINKK60 linear module to build a three-axis platform, with X and Y axis travel of 600mm and Z axis travel of 200mm. The motor is a 400W servo motor paired with a 20-bit absolute encoder. The dispensing head uses a Nordson Ultimus V high-pressure dispensing valve with a minimum dispensing volume of 0.001ml and a response time of 2ms.

[0022] The system workflow is as follows: The operator places the workpiece on the worktable and clicks the "Start" button.

[0023] An industrial camera captures images of the workpiece and transmits them to a host computer.

[0024] The image processing unit executes the following algorithm: a. Convert the color image to a grayscale image and binarize it using the Otsu adaptive thresholding method.

[0025] b. Perform 8-neighborhood connectivity analysis on the binary image and label all connected regions.

[0026] c. Set the minimum area threshold to 500 pixels and the minimum size threshold to 10 pixels to filter out small areas.

[0027] d. For each valid region, use the Suzuki85 algorithm to extract the outermost contour.

[0028] e. Calculate the roundness F of each region and classify the workpieces according to the range of F values.

[0029] The trajectory generation unit generates the dispensing trajectory based on the extracted contour: a. Select the glue line width W according to the workpiece classification: W=1.2mm for round workpieces, W=1.0mm for polygonal workpieces, and W=0.8mm for irregular workpieces.

[0030] b. Calculate the offset distance D = W / 2 + Δ, where Δ is selected according to the type of adhesive: 2.0 mm for UV adhesive, 1.5 mm for silicone adhesive, and 2.5 mm for epoxy resin adhesive.

[0031] c. Offset the contour outwards at equal intervals to generate the outer trajectory T1.

[0032] d. Extract the center skeleton line of the workpiece region using a morphological thinning algorithm. The specific execution process of the thinning algorithm is as follows: Define eight 3×3 structural templates, corresponding to the eight directions of the skeleton. In each iteration, use these eight templates to scan the image sequentially, marking matching pixels as to be deleted. Iterate until no pixels can be deleted, resulting in a skeleton line with a width of one pixel.

[0033] e. Use a circular structuring element with a radius of 3 pixels to expand the skeleton line 3 times to obtain the region R_dilated.

[0034] f. Use the same structural element to perform two erosions on the workpiece area to obtain the region R_eroded.

[0035] g. Calculate the difference R_diff between R_dilated and R_eroded.

[0036] h. Extract the boundary of R_diff, and refine it again to obtain the centerline as the supplementary trajectory T2.

[0037] i. If internal filling is required, perform internal shrinkage with a step size S=W*0.8 to generate an inner contour sequence until the contour length is less than 10mm.

[0038] j. Merge all trajectory points and perform a smooth fit using a cubic B-spline curve, with the tension factor set to 0.7.

[0039] Plan the speed and amount of adhesive: a. Calculate the radius of curvature ρ at each point on the trajectory.

[0040] b. For straight segments with ρ>100mm, the velocity is set to V_max=300mm / s.

[0041] c. For a circular arc segment with 10mm≤ρ≤100mm, the speed is calculated as V_adj=300*tanh(ρ / 20).

[0042] d. For sharp angles with ρ < 10 mm, set the velocity to V_min = 50 mm / s.

[0043] e. Calculate the total area of ​​the workpiece S_total, and set the adhesive quantity per unit area q = 0.05 ml / cm². 2 .

[0044] f. Calculate the total glue output Q_total = S_total × q.

[0045] g. Calculate the total length of the trajectory L_total, and the glue output per unit length q_per_mm = Q_total / L_total.

[0046] h. For each trajectory segment, calculate the dispensing valve flow rate F_valve = q_per_mm × V_segment based on its length L_segment and velocity V_segment.

[0047] Generate G-code: Each line of G-code is formatted as: G01X[coordinate]Y[coordinate]Z[coordinate]F[velocity] Insert the M08 command at the start of the trajectory to open the dispensing valve, and insert the M09 command at the end of the trajectory to close the dispensing valve.

[0048] For internal filling trajectories, a "bow" shaped path is used to reduce empty travel.

[0049] The motion control card parses G-code and controls the three-axis platform and dispensing valve to work together.

[0050] After dispensing is completed, the Z-axis is raised to a safe height, the platform returns to the origin, and waits for the next workpiece.

[0051] System parameter settings are completed through a human-machine interface, allowing operators to set adhesive type, dispensing thickness, speed parameters, etc. The system also provides a simulation preview function, which allows users to preview the trajectory and estimate the amount of adhesive before actual dispensing.

[0052] This invention utilizes a unique skeleton line expansion corrosion difference method to accurately identify sharp protrusions on workpieces and generate targeted supplementary trajectories, solving the problem of glue accumulation on protrusions encountered by traditional methods. By combining geometric feature classification and adaptive parameter adjustment, the dispensing quality and consistency are improved. Experimental tests show that using the method of this invention, the dispensing uniformity deviation is reduced from ±25% of the traditional method to ±8%, and the preparation time is shortened from an average of 30 minutes to less than 2 minutes.

[0053] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0054] The embodiments of the present invention are given for illustrative and descriptive purposes only, and are not intended to be exhaustive or to limit the invention to the forms disclosed. Many modifications and variations will be apparent to those skilled in the art. The embodiments were chosen and described in order to better illustrate the principles and practical application of the invention, and to enable those skilled in the art to understand the invention and to design various embodiments with various modifications suitable for a particular purpose.

Claims

1. A method for generating intelligent dispensing trajectories, characterized in that, Includes the following steps: An image of the workpiece to be glued is acquired, and the image is binarized and connected component analysis is performed to mark at least one connected region in the image as a candidate workpiece region. The candidate workpiece regions are filtered according to preset minimum area threshold and minimum size threshold, and regions with an area smaller than the minimum area threshold and a minimum bounding rectangle side length smaller than the minimum size threshold are excluded to obtain the effective workpiece regions. Extract the closed contour of each effective workpiece region and denote it as the initial contour C0; Based on the initial contour C0 and the preset glue line width W, an outer glue dispensing trajectory T1 is generated by equidistant outward offset, wherein the offset distance D satisfies: , This is an empirical compensation value set based on the adhesive's flowability, ranging from 1.5mm to 2.5mm; For the effective workpiece area, its geometric center skeleton line is extracted. A circular structural element with a fixed radius of 3 pixels is used to perform three morphological dilation operations on this skeleton line to obtain the first dilated region R_dilated. The same circular structural element is used to perform two morphological erosion operations on the effective workpiece area to obtain the second eroded region R_eroded. The set difference between the first dilated region R_dilated and the second eroded region R_eroded is calculated to obtain the difference region R_diff. The boundary contour of the difference region R_diff is extracted, and the center line of this boundary contour is calculated as the supplementary dispensing trajectory T2 corresponding to the sharp protrusion. The discrete point sequences of the outer dispensing trajectory T1 and the supplementary dispensing trajectory T2 are merged. A cubic B-spline curve is used to fit the merged point sequence, with the tension factor set to 0.7, to generate a smooth final execution trajectory T_final. The final execution trajectory T_final is converted into G-code format containing X, Y, and Z coordinates, feed speed F, and dispensing control command M-code, and sent to the three-axis motion control card for execution.

2. The intelligent dispensing trajectory generation method according to claim 1, characterized in that, The screening of the candidate workpiece areas further includes a shape screening step: calculating the circularity index F of each candidate workpiece area, where , S is the area of the region, and L is the perimeter of the region; when F > 0.85, determining that the region is a circular feature workpiece and adopting the first set of dispensing parameters; when 0.6 < F ≤ 0.85, determining that the region is a polygonal feature workpiece and adopting the second set of dispensing parameters; when F ≤ 0.6, determining that the region is an irregular shape workpiece and adopting the third set of dispensing parameters; the dispensing parameters include at least one of the glue line width W, the compensation value and the dispensing speed.

3. The intelligent dispensing trajectory generation method according to claim 1, characterized in that, The process also includes the step of generating internal fill trajectories: taking the initial contour C0 as the starting contour, setting the shrinkage step size S=W*0.8; performing iterative equidistant shrinkage along the inner normal direction of the initial contour C0, generating an inner contour C_i after each shrinkage, where i=1,2,3..., representing the number of shrinkages; discretizing each inner contour C_i and adding it to the set of internal fill trajectories; stopping the iteration when the length of the newly generated inner contour C_n is less than the preset termination length threshold L_min, where L_min=10mm; and sorting all the trajectory points in the set of internal fill trajectories in order from the outside to the inside to form continuous fill trajectories.

4. The intelligent dispensing trajectory generation method according to claim 1, characterized in that, The extraction of the geometric center skeleton line employs a morphological thinning algorithm, specifically including: representing the workpiece region as a binary image, where the workpiece pixel value is 1 and the background pixel value is 0; defining eight 3×3 structural templates, corresponding to the eight directions of the skeleton endpoints respectively; iteratively performing the following operations until the image no longer changes: applying all eight structural templates to the current binary image for matching; marking successfully matched pixels as points to be deleted; batch deleting all points to be deleted, but retaining pixels necessary to maintain connectivity; updating the binary image after each iteration; the set of remaining pixels after the iteration is complete is the single-pixel-wide center skeleton line.

5. The intelligent dispensing trajectory generation method according to claim 1, characterized in that, After generating the smooth final execution trajectory T_final, a velocity planning step is also included: calculating the radius of curvature at each point on the trajectory. ; Set the maximum permissible speed V_max = 300 mm / s and the minimum speed V_min = 50 mm / s; according to the formula The execution speed at this point is dynamically adjusted, where The curvature sensitivity coefficient is 20 mm, and tanh is the hyperbolic tangent function; for the straight line segment ( ), using uniform motion, maintaining a speed of V_max; for the circular arc segment ( The speed is calculated using the above formula; for the sharp corner portion ( The speed is reduced to V_min; the adjusted speed value is written to the feed rate F field of the G code.

6. The intelligent dispensing trajectory generation method according to claim 1, characterized in that, It also includes glue quantity control steps: Based on the area S_total of the effective workpiece region and the preset glue quantity q per unit area, calculate the total glue quantity Q_total = S_total × q; based on the total length L_total of the final execution trajectory T_final and the total glue quantity Q_total, calculate the glue quantity per unit length q_per_mm = Q_total / L_total; in the G-code, for each trajectory segment, based on the segment length L_segment and the planned speed V_segment, calculate the glue dispensing time t = L_segment / V_segment; set the dispensing valve opening flow rate to F_valve = q_per_mm × V_segment; synchronously send a dispensing valve opening command at the beginning of the trajectory segment and a dispensing valve closing command at the end of the trajectory segment.