Dispensing robot motion control system based on template matching

By using a template-matching dispensing robot motion control system, combined with image preprocessing and optimized motion control, the problems of inaccurate positioning and trajectory optimization in the dispensing process of micro-sized workpieces are solved, achieving high-precision and flexible dispensing effects, which are suitable for efficient dispensing of micro-sized and complex workpieces.

CN121733600APending Publication Date: 2026-03-27HARBIN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-05
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In the current dispensing process for micro-small workpieces, there are issues such as inaccurate positioning, incorrect or missing dispensing, and the need to optimize the dispensing trajectory. Traditional methods cannot adapt to flexible manufacturing of small batches and multiple varieties, and existing vision dispensing solutions are costly and lack robustness in extremely precise scenarios.

Method used

A template-matching-based dispensing robot motion control system is adopted, which combines image preprocessing, intelligent template matching and optimized robot motion control. Through Haar wavelet transform denoising, HSV color space conversion, improved cockroach optimization algorithm and DH model, high-precision and flexible dispensing is achieved.

Benefits of technology

It improves dispensing positioning accuracy and system efficiency, enhances adaptability to changes in lighting and occlusion, ensures smooth dispensing trajectory and system stability, and is suitable for efficient dispensing of micro-sized and complex workpieces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The invention discloses a dispensing robot motion control system based on template matching, and belongs to the technical field of industrial automation and robot control. According to the invention, the problems of inaccurate positioning, wrong and leaked glue and track optimization existing in the existing micro object glue dispensing are solved. The method specifically comprises the following steps: preprocessing a collected image, carrying out denoising and feature enhancement on the collected image by adopting an improved bilateral filtering algorithm in combination with Haar wavelet transform, and then realizing accurate positioning by fusing color matching, gray mode matching and an improved dung beetle optimization algorithm; and finally, through D-H parametric method modeling and forward and inverse kinematics analysis of the robot, the motion trail of the robot is optimized. According to the invention, the dispensing positioning precision and matching efficiency can be effectively improved, the phenomena of glue mistake and glue leakage are reduced, and the method can be applied to high-precision dispensing operation of micro objects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial automation and robot control technology, specifically relating to a motion control system for a dispensing robot based on template matching, which is suitable for high-precision dispensing operations on micro-sized precision workpieces. Background Technology

[0002] Precision dispensing technology is an indispensable key process in modern high-tech industries such as precision electronics manufacturing, semiconductor packaging, microelectromechanical systems (MEMS) assembly, medical device packaging, and high-end consumer electronics (such as camera modules and miniature speakers). Its main function is to precisely apply micro-volume colloids (such as conductive adhesives, thermally conductive adhesives, epoxy resins, UV adhesives, and sealants) in specific shapes, volumes, and positions onto the surface of target workpieces to achieve component bonding, encapsulation protection, conductive connections, stress buffering, or environmental sealing. As electronic products continue to evolve towards miniaturization, thinness, high integration, and multifunctionality, the feature size of dispensing objects has entered the micrometer or even sub-micrometer level, and dispensing paths are becoming increasingly complex (such as chip dams as fine as tens of micrometers and irregularly shaped bottom fills), placing almost stringent requirements on the precision, consistency, reliability, and efficiency of the dispensing process. Even minor deviations in dispensing quality, such as insufficient adhesive volume, positional misalignment, broken adhesive lines, or shape distortion, can directly lead to electrical performance failure, insufficient mechanical strength, or long-term reliability degradation, resulting in significant economic losses.

[0003] Currently, dispensing technology in the industrial sector primarily relies on automated dispensing equipment. Traditional dispensing methods often employ a "teach-and-playback" model, where the coordinate sequence of the dispensing path is pre-recorded through manual guidance or offline programming, and the robot repeatedly executes this fixed path during production. This method is efficient for mass production with a single product type and fixed position. However, its inherent drawbacks are significant: it cannot compensate for positional drift caused by factors such as fixture assembly errors, workpiece material deviations, or thermal deformation of the production line, easily leading to dispensing misalignment. For micro-sized, high-density, or irregularly shaped workpieces, manual teaching has limited accuracy, making it difficult to meet sub-millimeter or even micrometer-level positioning requirements, and programming and debugging are time-consuming and labor-intensive. Furthermore, traditional methods lack flexibility; once the product model changes, tedious re-teaching or reprogramming is required, failing to adapt to the trend of flexible manufacturing with small batches and multiple product types.

[0004] To improve positioning accuracy and flexibility, machine vision-based guidance technology has been introduced into dispensing systems. These systems typically use industrial cameras to capture workpiece images, employing image processing algorithms to identify target feature locations and guide the robot for positioning compensation. However, existing vision-based dispensing solutions still face a series of serious challenges in practical industrial applications: uneven light sources, reflections, and shadows lead to low image contrast and unstable feature extraction; for micro-targets, the images contain few effective feature pixels, resulting in a low signal-to-noise ratio, and conventional image filtering and edge detection algorithms easily lose crucial detail information while denoising, affecting positioning accuracy; when the workpiece has installation angle deviations or is slightly occluded by other objects, the matching success rate and accuracy significantly decrease. Although some advanced equipment suppliers at home and abroad have launched high-performance dispensing platforms, these systems remain costly when dealing with the aforementioned extremely precise and highly dynamic dispensing scenarios, and the adaptability, robustness, and intelligence level of the core visual positioning and motion planning algorithms still have room for improvement. Therefore, developing a cost-effective automated system that deeply integrates highly robust visual recognition and high-precision motion control, and is particularly suitable for dispensing adhesive onto micro-sized and complex workpieces, has become an urgent need to improve the self-sufficiency level and technological competitiveness of my country's precision manufacturing equipment. This system aims to build an efficient, accurate, and stable dispensing robot motion control system by innovatively integrating improved image preprocessing, intelligent template matching algorithms, and optimized robot motion control models. Summary of the Invention

[0005] This invention aims to solve problems such as inaccurate positioning, incorrect or incomplete dispensing, and trajectory optimization in the dispensing process of micro-workpieces. It provides a motion control system for a dispensing robot based on template matching. Through multi-algorithm fusion and hardware-software co-design, it improves dispensing positioning accuracy and trajectory rationality, ensuring the stability of the dispensing process. The technical solution adopted by this invention to solve the above-mentioned technical problems is as follows:

[0006] According to one aspect of the present invention, a motion control system for a dispensing robot based on template matching is provided, the system comprising an image acquisition module, an image preprocessing module, a template matching module, and a motion control module;

[0007] The image acquisition module is used to acquire the original image of the micro-sized dispensing object;

[0008] The preprocessing module uses a weighted average method to grayscale the original image and removes mid-to-high frequency noise and enhances edge features using a bilateral filtering algorithm based on Haar wavelet transform.

[0009] The template matching module integrates HSV color space conversion for coarse positioning, normalized cross-correlation grayscale matching, and an improved cockroach optimization algorithm to achieve precise identification of the position and rotation angle of the dispensing target.

[0010] The trajectory planning includes joint space trajectory planning and Cartesian space trajectory planning. A uniform acceleration and deceleration algorithm is used to optimize the smoothness of the motion path and reduce vibration interference during the dispensing process. The specific process of trajectory planning is as follows: Transformation matrices for each coordinate system are obtained using the DH transformation method; matrix multiplication yields the total transformation between the robot base and the end effector; joint angle variables are substituted to solve for the robot's end effector position and orientation; and a reverse calculation algorithm is used to calculate the rotation angles of each joint of the robotic arm, enabling the end effector to accurately reach the specified position and orientation.

[0011] According to another aspect of the present invention, a motion control method for a dispensing robot based on template matching is provided, the method comprising the following steps:

[0012] Step 1: The image acquisition module acquires the original image of the dispensing object;

[0013] Step 2: The preprocessing module sequentially completes grayscale conversion and Haar wavelet transform bilateral filtering;

[0014] Step 3: The template matching module determines candidate regions through HSV color positioning, calculates similarity using normalized cross-correlation, and achieves accurate positioning through an improved cockroach optimization algorithm;

[0015] Step 4: Based on the positioning results, the motion control module calculates the joint rotation angles using the DH parameter model and drives the robot to complete the dispensing action by combining trajectory planning.

[0016] The beneficial effects of this invention are:

[0017] This invention proposes a motion control system for a dispensing robot based on template matching. Through deep integration of image preprocessing, intelligent template matching, and robot motion control, it effectively improves the accuracy, robustness, and overall system efficiency of dispensing positioning. The preprocessing module employs bilateral filtering based on Haar wavelet transform, significantly preserving the edge details of the target while efficiently removing noise. The template matching module creatively integrates coarse color positioning, fine grayscale matching, and an improved intelligent optimization algorithm, enabling the system to adapt well to rotation, lighting changes, and partial occlusion. The motion control module, based on an accurate DH model and an optimized trajectory planning algorithm, ensures the accuracy and smoothness of the dispensing motion. This invention features high system integration and automation, possessing significant potential for industrial applications and playing a positive role in improving the level of precision dispensing processes. (See attached figures.)

[0018] Figure 1 This is a flowchart of the algorithm for the motion control system of the dispensing robot based on template matching in this invention.

[0019] Figure 2 This is a schematic diagram of two-dimensional Haar wavelet transform decomposition;

[0020] Figure 3 This is a flowchart of the color positioning algorithm;

[0021] Figure 4 It is an optimization algorithm flowchart;

[0022] Figure 5 It is a grayscale image of a real object.

[0023] Figure 6 It is an image of a real object that has been smoothed.

[0024] Figure 7 This is a physical image of the template matching experiment results; Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this invention clearer, the invention is described in detail below. It should be noted that the following embodiments are for illustrative purposes only and are not intended to limit the invention. Furthermore, unless otherwise specified, specific conditions in the embodiments are performed under conventional conditions or conditions recommended by the manufacturer. Unless otherwise specified, the equipment, materials, and algorithms used are all commercially available conventional products or conventional technologies that can be implemented by those skilled in the art based on common knowledge.

[0026] Specific Implementation Method 1: This implementation method provides an overall architecture and working principle of a motion control system for a dispensing robot based on template matching.

[0027] This system is a hardware and software collaborative platform integrating machine vision, intelligent algorithms, and robot control technologies. Its core function is to automatically identify the precise position and orientation of micro-sized dispensing workpieces and drive the robot to complete high-precision, high-consistency dispensing operations. Physically, the system mainly consists of the following modules:

[0028] Image acquisition module: Composed of a high-resolution industrial camera, a telecentric lens, and a uniform backlight or coaxial light source. The camera is fixed to the robot's end effector or mounted above the dispensing area to ensure stable and clear image capture of the platform carrying the workpiece (such as a PCB carrier). The light source provides uniform illumination, minimizing shadows and reflections to ensure stable image quality.

[0029] The computing and processing unit, typically an industrial PC (IPC) or a high-performance embedded industrial computer, integrates the core algorithm software for image preprocessing, template matching, and motion control modules. This unit receives image data from the camera, performs a series of calculations, and ultimately generates robot motion commands.

[0030] Motion execution module: Typically a six-axis high-precision dispensing robot (robotic arm) and its servo drive system. This module receives control commands from the processing unit, precisely controls the movement of each joint, and drives the dispensing valve to complete the trajectory movement in three-dimensional space.

[0031] The system's workflow is briefly described as follows: The image acquisition module captures an original image containing the target to be dispensed under a trigger signal (such as a workpiece positioning sensor signal). This image is transmitted to the computing and processing unit. The preprocessing module performs grayscale conversion and bilateral filtering based on Haar wavelet transform on the image to obtain a feature image with low noise and clear edges. The template matching module searches on this feature image and outputs the precise center coordinates (x, y) and rotation angle θ of the target in the image coordinate system by fusing HSV color coarse localization with normalized cross-correlation matching based on an improved dung beetle optimization algorithm. The motion control module converts the image coordinates (x, y, θ) into a three-dimensional pose (X, Y, Z, Rz) in the robot base coordinate system based on hand-eye calibration. Then, it solves for the target angles of each joint through inverse kinematics and generates a smooth motion command sequence by combining it with a trajectory planning algorithm. This sequence is sent to the robot servo driver to drive the robot's end effector dispensing valve to move precisely to the target point and perform the dispensing operation according to the preset dispensing path trajectory and parameters.

[0032] This implementation deeply couples visual perception with motion control. Through advanced image processing and optimization algorithms, it effectively overcomes the problems of inaccurate positioning and poor adaptability of traditional dispensing systems, and achieves fast, accurate and flexible dispensing for micro-sized targets.

[0033] Specific Implementation Method Two: This implementation method is a further refinement of Specific Implementation Method One, which elaborates on the implementation details of the image acquisition module and the core algorithm of the image preprocessing module.

[0034] In the image acquisition module, industrial cameras typically employ global shutter CMOS sensor cameras to reduce motion blur. Telecentric lenses are chosen due to their extremely low distortion and "object-side telecentric" characteristics, ensuring that within a certain depth of field, even with slight height changes, the image size of an object remains almost unchanged. This is crucial for ensuring accurate dimensional measurement and positioning. The choice of light source depends on the workpiece surface characteristics. For workpieces with low reflectivity, a ring-shaped LED white light source is often used to provide uniform diffused light; for highly reflective workpieces, a coaxial light source can be used to eliminate the effects of specular reflection.

[0035] The image preprocessing module is a crucial first step in ensuring the accuracy of subsequent template matching, and its processing flow is as follows:

[0036] Step 1: Grayscale conversion:

[0037] Since most template matching algorithms have higher computational efficiency and robustness in the grayscale domain, the system first converts the acquired color images into grayscale images. This implementation uses a weighted average method, assigning different weights to the three RGB channels based on the differences in human eye sensitivity to different colors. The calculation formula is as follows:

[0038]

[0039] Here, Gray represents the output grayscale value, and R, G, and B are the red, green, and blue component values ​​of the input pixel, respectively. The grayscale image obtained by this method can better preserve the brightness contour information of the original image.

[0040] Step 2: Bilateral filtering based on Haar wavelet transform:

[0041] Grayscale images typically contain mid-to-high frequency noise caused by electronic noise, uneven illumination, etc., and direct matching can affect accuracy. Traditional filtering tends to blur edges during denoising. This implementation uses an improved algorithm combining Haar wavelet transform and bilateral filtering to separate noise from details, achieving targeted denoising.

[0042] Haar wavelet decomposition: A first-order two-dimensional Haar wavelet transform is performed on the grayscale image I, decomposing it into four sub-bands: the low-frequency approximation sub-band LL, the horizontal high-frequency detail sub-band LH, the vertical high-frequency detail sub-band HL, and the diagonal high-frequency detail sub-band HH. The LL sub-band contains the main structural and contour information of the image, while the LH, HL, and HH sub-bands contain edge, texture, and other detailed information, as well as most of the noise. The specific process is as follows:

[0043] The spatial kernel refers to the Euclidean distance between the current point and the center point calculated based on a Gaussian function, the formula of which is:

[0044]

[0045] in: Indicates the position of the current pixel. Represents the position of neighboring pixels. It is the standard deviation of the spatial kernel function;

[0046] The range kernel is calculated using a Gaussian function, which measures the square of the absolute value of the difference between the current pixel value and the center pixel value. The formula for this function is:

[0047]

[0048] in: and Representing pixels and grayscale value, The standard deviation of the kernel function represents the range;

[0049] The formula for calculating the weight coefficients obtained by multiplying the spatial domain kernel and the range kernel is as follows:

[0050]

[0051] The output formula for bilateral filtering is:

[0052]

[0053] Where: represents the position of the current pixel, represents the gray value of the neighboring pixels, is a window or neighborhood defined nearby, represents the convolution kernel size of the bilateral filter, and is the weight coefficient used to ensure that the filtered pixel value is within a reasonable range;

[0054] The images to be matched are downsampled using Haar wavelet transform, and the two-dimensional Haar wavelet transform formula is used to decompose the images sequentially in both column and row directions into components containing high-frequency information. With low-frequency information The four sets of images are represented by the following formula:

[0055]

[0056]

[0057] in: This represents the wavelet transform scaling factor, which determines the time and frequency resolution of the wavelet transform. This represents the translation factor of the wavelet transform. , These represent translations in the horizontal and vertical dimensions, respectively. These are wavelet transform basis functions;

[0058] Rewriting the above Haar wavelet decomposition process in matrix form can significantly improve the efficiency of image downsampling. The convolution kernel of the normalized Haar wavelet transform and the corresponding downsampling calculation formula are as follows:

[0059]

[0060]

[0061] in: For Haar wavelet transform convolution kernel, This represents the image after Haar wavelet transform. An image representing high-frequency information after downsampling. Images representing low-frequency information;

[0062] Image average after processing by the filtering algorithm of this system The value was 39.8332 dB, and the average time of the filtering algorithm was 11.44 ms.

[0063] Specific Implementation Method 3: This implementation method is a further refinement of Specific Implementation Method 1, which describes in detail the core algorithm flow of the template matching module, especially the application of the improved dung beetle optimization algorithm.

[0064] The goal of the template matching module is to quickly and accurately locate the region in the preprocessed image that is most similar to a pre-trained template image, and output its position and rotation angle. This implementation employs a hierarchical optimization matching strategy:

[0065] Step 1: Coarse positioning based on HSV color space:

[0066] For dispensing targets with obvious color characteristics, color information is first used to quickly narrow down the search range and improve overall efficiency.

[0067] The original color image is converted from the RGB space to the HSV (Hue, Saturation, Lightness) space. The HSV space can separate color information from lightness information and has a certain robustness to changes in lighting.

[0068] Based on the typical colors of the target template, threshold ranges are set on the H (hue) and S (saturation) channels to perform threshold segmentation on the image.

[0069] Extract connected components and calculate the bounding rectangle (or minimum bounding rectangle) of each connected component. These rectangular regions are the candidate regions for the target, greatly reducing the number of search pixels required for subsequent accurate matching.

[0070] Step 2: Similarity calculation based on normalized cross-correlation (NCC):

[0071] Within each candidate region, template matching is performed using the Normalized Cross-Correlation (NCC) algorithm. The NCC algorithm measures similarity by calculating the correlation coefficient between the template image T and the search image sub-window S, with values ​​ranging from [-1, 1].

[0072] Step 3: Optimal solution search based on the improved dung beetle optimization (DBO) algorithm:

[0073] To address the inefficiency of exhaustive search and effectively handle target rotation and partial occlusion, this implementation introduces an improved dung beetle optimization algorithm. This transforms the problem of finding the optimal matching position and angle into a multidimensional optimization problem, with the optimization objective being to maximize the NCC value at that location. The specific measures are as follows:

[0074] Problem definition: The position of each dung beetle individual (i.e., a potential solution) is represented by a three-dimensional vector, and the fitness function is the NCC value of the template and the corresponding region of the image at that position and angle.

[0075] Population initialization: An initial population is generated using Fuch chaotic mapping and inverse learning strategies. Fuch chaotic mapping produces initial solutions with a more even distribution and better ergodicity, enhancing global exploration capabilities. Simultaneously, inverse solutions are generated for each solution produced by the chaotic mapping, and the best solution is selected from these to further improve the quality of the initial population.

[0076] Iterative optimization behavior simulation:

[0077] Rolling Ball Behavior (Global Exploration): Simulating a dung beetle pushing a dung ball (solution) to explore unknown areas. Position updates are guided by the sun's position (the current global optimum). This improved algorithm introduces a sine function as a guiding factor, replacing the tangent function of the original algorithm, making the exploration path smoother and more diverse. The update formula incorporates a non-linearly decreasing inertia weight ω. ω is larger in the early iterations, which is beneficial for global search; ω decreases in the later iterations, which is beneficial for local exploration.

[0078] Reproductive Behavior (Local Development): Simulates dung beetle egg-laying in a safe area, i.e., conducting a fine-grained search near the current optimal solution. Dynamic boundaries are set for breeding points to ensure the search focuses on promising areas.

[0079] Foraging and Stealing Behaviors (Escape from Local Optimum): Some individuals simulate foraging (moving towards the global optimum), while others simulate stealing (randomly perturbing the current optimal solution). This improved algorithm particularly strengthens the random differential mutation strategy for stealing behavior. By introducing larger random perturbations, the algorithm can effectively escape local optima (such as when the target is partially occluded, resulting in multiple peaks in the matching) and continue to search for a better solution.

[0080] Algorithm Termination and Output: The algorithm terminates when the maximum number of iterations is reached or the fitness function value shows no significant improvement over several consecutive generations. The individual with the highest fitness value (i.e., the maximum NCC value) is output as the final matching result. If the highest NCC value is lower than a preset confidence threshold (e.g., 0.75), the matching is considered a failure, and the system issues an alarm.

[0081] This improved DBO algorithm avoids brute-force calculations across the entire graph through intelligent optimization search, resulting in a significant advantage in processing speed. At the same time, its powerful global optimization capability ensures matching accuracy and robustness under complex conditions such as rotation and occlusion.

[0082] Specific Implementation Method Four: This implementation method is a further refinement of Specific Implementation Method One, which elaborates on the working principle of the motion control module, including kinematic modeling and trajectory planning.

[0083] Step 1: Kinematic modeling based on the DH parameter method:

[0084] To calculate the kinematic model of the robot from the target pose at the robot's end effector to the angles of each joint, a kinematic model of the robot needs to be established. This implementation method uses the standard Denavit-Hartenberg (DH) parametric method to model a six-axis dispensing robot.

[0085] The transformation matrices for each coordinate system obtained according to the DH transformation method are as follows:

[0086]

[0087]

[0088] The matrix multiplication yields the following total transformation between the robot base and the end effector:

[0089]

[0090] By substituting the joint angle variables, the position and orientation of the robot's end effector can be solved.

[0091] Step 2: Solve the inverse kinematics:

[0092] Based on the target dispensing position and orientation obtained through template matching and hand-eye calibration, the corresponding joint angles need to be calculated; this process is called inverse kinematics. For six-axis SCARA or similar dispensing robots, the inverse kinematics solution can usually be obtained as a closed loop using geometric or algebraic methods, which is fast and suitable for real-time control.

[0093] Step 3: Trajectory Planning

[0094] After obtaining the joint angles corresponding to the starting point (current pose) and the ending point (target dotting pose), a robot motion trajectory needs to be planned. This implementation supports two planning modes:

[0095] Joint space trajectory planning: Planning is performed directly in the joint angle space. Common methods include using polynomial interpolation (such as cubic or quintic polynomials) or trapezoidal velocity curves (uniform acceleration-uniform speed-uniform deceleration). The planner calculates the target angle, angular velocity, and angular acceleration of each joint in each control cycle (e.g., 1 ms) from the starting joint angle to the ending joint angle.

[0096] Cartesian space trajectory planning: Planning is performed in the operating space of the robot's end effector (i.e., the base coordinate system). First, a spatial path (such as a straight line, circular arc, or spline curve) from the starting point to the ending point is planned in three-dimensional space. Then, the path is discretized at a fixed interpolation period (e.g., 1ms) to obtain a series of path points (X_i, Y_i, Z_i, Rz_i). For each path point, an inverse kinematics solution is called once to obtain the corresponding joint angle command sequence. This method can precisely control the spatial motion trajectory of the end effector and is very suitable for scenarios requiring dispensing along a strictly straight line or a specific curve. This implementation often uses linear interpolation and circular interpolation, and utilizes S-shaped velocity curve planning to ensure continuous acceleration at the start and end of the motion, further reducing impact and vibration. The motion control module finally sends the planned joint angle sequence (or position command) to the servo drivers of each axis of the robot via the fieldbus, driving the motors to move precisely, thereby driving the dispensing valve to complete a precise and smooth dispensing action.

[0097] The above embodiments of the present invention are merely illustrative of the technical solutions of the present invention and are not intended to limit the scope of the present invention. Those skilled in the art can make other variations or modifications based on the above description; it is impossible to exhaustively list all embodiments here. All obvious variations or modifications derived from the technical solutions of the present invention are still within the protection scope of the present invention.

Claims

1. A motion control system for a dispensing robot based on template matching, characterized in that, The system includes an image acquisition module, an image preprocessing module, a template matching module, and a motion control module; The image acquisition module is used to acquire the original image of the micro-sized dispensing object; The preprocessing module uses a weighted average method to grayscale the original image and removes mid-to-high frequency noise and enhances edge features using a bilateral filtering algorithm based on Haar wavelet transform. The template matching module integrates HSV color space conversion coarse positioning, normalized cross-correlation grayscale matching, and improved dung beetle optimization algorithm to achieve precise position and rotation angle recognition of the dispensing target; The motion control module constructs a robot kinematic model based on the DH parameter method and outputs control commands through forward and inverse kinematics analysis and trajectory planning.

2. The system according to claim 1, characterized in that, The improved dung beetle optimization algorithm uses Fuch chaotic mapping and inverse learning strategies to initialize the population. It adjusts the balance between global exploration and local exploitation through a sinusoidal guidance mechanism and nonlinear decreasing inertial weights, and strengthens the random differential mutation strategy of theft behavior to cope with target occlusion scenarios.

3. The control method based on the system of claim 1, characterized in that, The method includes the following steps: Step 1: The image acquisition module acquires the original image of the dispensing object; Step 2: The preprocessing module sequentially completes grayscale conversion and Haar wavelet transform bilateral filtering; Step 3: The template matching module determines candidate regions through HSV color positioning, calculates similarity using normalized cross-correlation, and achieves accurate positioning through an improved dung beetle optimization algorithm; Step 4: Based on the positioning results, the motion control module calculates the joint rotation angles using the DH parameter model and drives the robot to complete the dispensing action by combining trajectory planning.

4. The method according to claim 3, characterized in that, In step two, the bilateral filtering algorithm based on Haar wavelet transform decomposes the image into high-frequency and low-frequency information according to the frequency domain features. The balance between noise reduction and detail preservation is achieved by weighted calculation of spatial domain kernel and value domain kernel. The peak signal-to-noise ratio of the filtered image is not less than 39dB, and the average time is not more than 12ms. The specific process of step two is as follows: The spatial kernel refers to the Euclidean distance between the current point and the center point calculated based on a Gaussian function, the formula of which is: in: Indicates the position of the current pixel. Represents the position of neighboring pixels. It is the standard deviation of the spatial kernel function; The range kernel is calculated using a Gaussian function, which measures the square of the absolute value of the difference between the current pixel value and the center pixel value. The formula for this function is: in: and Representing pixels and grayscale value, The standard deviation of the kernel function represents the range; The formula for calculating the weight coefficients obtained by multiplying the spatial domain kernel and the range kernel is as follows: The output formula for bilateral filtering is: The images to be matched are downsampled using Haar wavelet transform, and the two-dimensional Haar wavelet transform formula is used to decompose the images sequentially in both column and row directions into components containing high-frequency information. With low-frequency information The four sets of images are represented by the following formula: in: This represents the wavelet transform scaling factor, which determines the time and frequency resolution of the wavelet transform. This represents the translation factor of the wavelet transform. , These represent translations in the horizontal and vertical dimensions, respectively. These are wavelet transform basis functions; Rewriting the above Haar wavelet decomposition process in matrix form can significantly improve the efficiency of image downsampling. The convolution kernel of the normalized Haar wavelet transform and the corresponding downsampling calculation formula are as follows: in: For Haar wavelet transform convolution kernel, This represents the image after Haar wavelet transform. An image representing high-frequency information after downsampling. Images representing low-frequency information; Image average after processing by the filtering algorithm of this system The value was 39.8332 dB, and the average time of the filtering algorithm was 11.44 ms.

5. The system according to claim 1, characterized in that, The trajectory planning includes joint space trajectory planning and Cartesian space trajectory planning. A uniform acceleration and deceleration algorithm is used to optimize the smoothness of the motion path and reduce vibration interference during the dispensing process. The specific process of trajectory planning is as follows: The transformation matrices for each coordinate system obtained according to the DH transformation method are as follows: The matrix multiplication yields the following total transformation between the robot base and the end effector: By substituting the joint angle variables, the position and orientation of the robot's end effector can be solved. The rotation angles of each joint of the robotic arm are calculated using a reverse calculation algorithm to enable the end effector of the robotic arm to move to a specified position and posture.