Automatic dispensing method and system based on machine vision

By obtaining the pixel coordinates of the workpiece mark point through machine vision and using the Z-axis compensation prediction model to perform three-dimensional adaptive adjustment, the problem of insufficient Z-axis height change accuracy in the existing technology is solved, and a high-precision automatic dispensing effect is achieved.

CN120471990BActive Publication Date: 2025-10-03ZHEJIANG MAISITE INTELLIGENT EQUIPMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510970535.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-15
Publication Date
2025-10-03
Estimated Expiration
2045-07-15

AI Technical Summary

Technical Problem

Existing machine vision automatic dispensing methods lack accuracy when dealing with three-dimensional deviations of workpieces, especially changes in Z-axis height. Traditional methods cannot achieve high-precision three-dimensional adaptive dispensing and may lead to uneven glue line width, glue dot shape, glue layer thickness after curing, and bonding strength.

Method used

The pixel coordinates of the mark points on the workpiece are obtained through machine vision, the 2D deviation vector of the mark points is calculated, and the Z-axis deviation value is predicted using the trained Z-axis compensation prediction model. Combined with the 2D deviation vector of the mark points, the original dispensing path is adaptively adjusted to achieve three-dimensional compensation.

Benefits of technology

The accuracy and adaptability of automatic dispensing are significantly improved, overcoming the limitations of traditional methods that only focus on 2D compensation and the misalignment of linear and nonlinear spatial perception dimensions, ensuring the consistency and reliability of dispensing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120471990B_ABST
    Figure CN120471990B_ABST
Patent Text Reader

Abstract

The present application relates to the field of automatic dispensing technology, and discloses an automatic dispensing method and system based on machine vision, which first accurately obtains the pixel coordinates of a preset Mark point on a workpiece through machine vision, and calculates a set of 2D deviation vectors of the Mark point with respect to the ideal position. Then, the set of 2D deviation vectors of the Mark point is sent to a pre-trained Z-axis compensation prediction model. The model can learn and predict the corresponding Z-axis deviation value from the 2D plane deviation, effectively solving the complex nonlinear mapping that may exist between the 2D deviation and the Z-axis deviation. Finally, the calculated 2D deviation vector and the Z-axis deviation value predicted by the model are comprehensively utilized to perform a comprehensive three-dimensional adaptive adjustment on the original dispensing path, thereby overcoming the limitations of the traditional method that only focuses on 2D compensation and the resulting misalignment problem of linear and nonlinear spatial perception dimensions, and significantly improving the accuracy and adaptability of automatic dispensing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automatic dispensing technology, and more specifically, to an automatic dispensing method and system based on machine vision. Background Art

[0002] In contemporary industrial manufacturing, automated production has become a key trend in improving efficiency, ensuring product quality, and reducing costs. Precision dispensing, an essential process in the manufacturing of numerous electronic devices, optical components, medical equipment, and other high-tech products, is directly related to product performance and reliability. Traditional automatic dispensing systems, while somewhat automated, still face numerous challenges. For example, workpieces may experience slight positional deviations or irregular deformations during placement; the robot's inherent repeatability and positioning accuracy struggle to perfectly meet submillimeter precision requirements; and factors such as ambient temperature and changes in material properties can cause the dispensing path or glue injection height to deviate from the ideal state.

[0003] To address these shortcomings, machine vision technology has been widely introduced into automated dispensing systems, aiming to correct positioning deviations through real-time feedback from vision sensors. These systems typically achieve improved 2D accuracy by identifying specific mark points on the workpiece, determining the workpiece's actual two-dimensional position, and adjusting the X- and Y-axis coordinates of the dispensing path accordingly. However, even if positioning correction on the 2D plane is effectively addressed, precisely controlling the vertical distance between the dispensing head and the workpiece surface (i.e., the Z-axis height) remains a complex and critical challenge. Slight variations in the Z-axis height can significantly affect the width of the glue line, the shape of the glue dot, the thickness of the cured glue layer, and ultimately the bond strength and sealing performance. When dispensing on multi-layer stacks, irregularly shaped structures, or workpieces with slight warping, simple 2D compensation is often insufficient to ensure overall three-dimensional dispensing quality.

[0004] Existing technologies often struggle to address Z-axis deviation. Some methods may rely on a preset fixed height, but this cannot adapt to individual differences in workpieces or dynamic changes during the production process. Others may use contact sensors for point-by-point measurement, but this significantly increases dispensing time, reduces production efficiency, and may scratch or contaminate the workpiece surface. To further complicate matters, the position and posture deviations of the workpiece on the XY plane, as well as any flatness errors it may have, can cause the Z-axis height deviation to exhibit nonlinear, complex spatial distribution characteristics. Simply linearly correlating 2D deviation with Z-axis deviation, or using empirical fixed compensation values, often fails to achieve high-precision three-dimensional adaptive dispensing. Summary of the Invention

[0005] This application addresses the problem of insufficient accuracy of existing machine vision-based automatic dispensing methods in dealing with three-dimensional deviations of workpieces, especially changes in Z-axis height. The embodiments of this application provide a machine vision-based automatic dispensing method and system.

[0006] According to one aspect of the present application, a machine vision-based automatic dispensing method is provided, including: acquiring a workpiece image containing all preset Mark points captured by a camera; performing Mark point detection on the workpiece image to obtain a set of Mark point pixel coordinates; performing coordinate conversion on the set of Mark point pixel coordinates to obtain a set of Mark point robot base coordinates; extracting a set of Mark point robot base ideal coordinates from a background database, and calculating the deviation vector between the set of Mark point robot base ideal coordinates and the set of Mark point robot base coordinates to obtain a set of Mark point 2D deviation vectors; inputting the set of Mark point 2D deviation vectors into a trained Z-axis compensation prediction model to obtain a set of Z-axis deviation prediction values; based on the set of Mark point 2D deviation vectors and the set of Z-axis deviation prediction values, adaptively adjusting the original dispensing path to obtain adaptive dispensing path data.

[0007] In one possible implementation, the set of pixel coordinates of the mark points is subjected to coordinate transformation to obtain a set of robot base coordinates of the mark points, including: based on the camera intrinsic parameter calibration data and the camera extrinsic parameter calibration data, transforming the set of pixel coordinates of the mark points from the pixel coordinate system to the camera coordinate system to obtain a set of camera coordinates of the mark points; transforming the set of camera coordinates of the mark points from the camera coordinate system to the robot base coordinate system to obtain a set of robot base coordinates of the mark points.

[0008] In one possible implementation, the set of the Mark point camera coordinates is transformed from the camera coordinate system to the robot base coordinate system to obtain the set of the Mark point robot base coordinates, including: transforming the set of the Mark point camera coordinates from the camera coordinate system to the robot base coordinate system based on the hand-eye calibration matrix.

[0009] In one possible implementation, the set of Mark point 2D deviation vectors is input into the trained Z-axis compensation prediction model to obtain a set of Z-axis deviation prediction values, including: combining the set of Mark point 2D deviation vectors into a deviation feature vector of length 2N, where N is the number of Mark points; and inputting the deviation feature vector into the trained Z-axis compensation prediction model to obtain the set of Z-axis deviation prediction values.

[0010] In a possible implementation, the trained Z-axis compensation prediction model is a support vector regression model or a feedforward neural network model.

[0011] In one possible implementation, based on the set of Mark point 2D deviation vectors and the set of Z-axis deviation prediction values, the original dispensing path is adaptively adjusted to obtain adaptive dispensing path data, including: calculating a set of 2D compensation amounts based on the set of Mark point 2D deviation vectors; performing X-axis and Y-axis compensation on the original dispensing path based on the set of 2D compensation amounts to obtain 2D compensated dispensing path data; and performing Z-axis compensation on the 2D compensated dispensing path data based on the set of Z-axis deviation prediction values ​​to obtain 3D compensated dispensing path data as the adaptive dispensing path data.

[0012] In one possible implementation, a set of 2D compensation amounts is calculated based on the set of 2D deviation vectors of the Mark points, including: inputting the deviation vectors of the Mark points and the robot base coordinates of the Mark points into a 2D interpolation model to obtain the 2D compensation amounts.

[0013] In one possible implementation, based on the set of Mark point 2D deviation vectors, a set of 2D compensation amounts is calculated, including: inputting the Mark point 2D deviation vectors and the Mark point robot base coordinates into a 2D interpolation model to obtain initial 2D compensation amounts, where the initial 2D compensation amounts include X-axis compensation amounts and Y-axis compensation amounts; based on the Z-axis deviation prediction value, correcting the X-axis compensation amounts and the Y-axis compensation amounts based on rotationally stable alignment to obtain corrected X-axis compensation amounts and corrected Y-axis compensation amounts, and using the corrected X-axis compensation amounts and the corrected Y-axis compensation amounts as the 2D compensation amounts.

[0014] In one possible implementation, based on the Z-axis deviation prediction value, the X-axis compensation amount and the Y-axis compensation amount are corrected based on rotationally stable alignment, including: based on the Z-axis vector formed by the Z-axis deviation prediction value, performing phase modulation of the fine-grained distribution morphology coefficient on the X-axis vector formed by the X-axis compensation amount and the Y-axis vector formed by the Y-axis compensation amount to obtain an X-axis modulation vector and a Y-axis modulation vector; performing mutual position compensation between the overall distribution morphologies of the X-axis modulation vector and the Y-axis modulation vector to obtain an X-axis modulation compensation vector and a Y-axis modulation compensation vector; after performing high-dimensional correlation coupling on the X-axis modulation compensation vector and the Y-axis modulation compensation vector, correcting the X-axis vector and the Y-axis vector to obtain a corrected X-axis vector and a corrected Y-axis vector, wherein the corrected X-axis vector is composed of the corrected X-axis compensation amount, and the corrected Y-axis vector is composed of the corrected Y-axis compensation amount.

[0015] According to another aspect of the present application, there is provided an automatic dispensing system based on machine vision, comprising: a workpiece image acquisition module for acquiring a workpiece image containing all preset Mark points captured by a camera; a Mark point detection module for performing Mark point detection on the workpiece image to obtain a set of Mark point pixel coordinates; a coordinate conversion module for performing coordinate conversion on the set of Mark point pixel coordinates to obtain a set of Mark point robot base coordinates; a Mark point deviation calculation module for extracting a set of Mark point robot base ideal coordinates from a background database, and calculating a deviation vector between the set of Mark point robot base ideal coordinates and the set of Mark point robot base coordinates to obtain a set of Mark point 2D deviation vectors; a Z-axis deviation prediction module for inputting the set of Mark point 2D deviation vectors into a trained Z-axis compensation prediction model to obtain a set of Z-axis deviation prediction values; and a dispensing path adaptive adjustment module for adaptively adjusting the original dispensing path based on the set of Mark point 2D deviation vectors and the set of Z-axis deviation prediction values ​​to obtain adaptive dispensing path data.

[0016] Compared with the prior art, the automatic dispensing method and system based on machine vision provided by the present application first accurately obtains the pixel coordinates of the preset mark points on the workpiece through machine vision, and calculates the set of 2D deviation vectors of the mark points with the ideal position. Then, the set of 2D deviation vectors of the mark points is sent to a pre-trained Z-axis compensation prediction model. The model can learn and predict the corresponding Z-axis deviation value from the 2D plane deviation, effectively solving the complex nonlinear mapping that may exist between the 2D deviation and the Z-axis deviation. Finally, the calculated 2D deviation vector and the Z-axis deviation value predicted by the model are comprehensively utilized to perform a comprehensive three-dimensional adaptive adjustment on the original dispensing path, thereby overcoming the limitations of the traditional method that only focuses on 2D compensation and the resulting misalignment problem of linear and nonlinear spatial perception dimensions, and significantly improving the accuracy and adaptability of automatic dispensing. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and other purposes, features, and advantages of the present application will become more apparent through a more detailed description of the embodiments of the present application in conjunction with the accompanying drawings. The accompanying drawings are intended to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the drawings, the same reference numerals generally represent the same components or steps.

[0018] Figure 1 The figure illustrates a schematic flow chart of an automatic dispensing method based on machine vision according to an embodiment of the present application.

[0019] Figure 2The figure illustrates a schematic flow chart of step S3 in the automatic dispensing method based on machine vision according to an embodiment of the present application.

[0020] Figure 3 The figure illustrates a schematic flow chart of step S5 in the automatic dispensing method based on machine vision according to an embodiment of the present application.

[0021] Figure 4 The figure illustrates a schematic flow chart of step S6 in the automatic dispensing method based on machine vision according to an embodiment of the present application.

[0022] Figure 5 The figure shows a schematic block diagram of an automatic dispensing system based on machine vision according to an embodiment of the present application. DETAILED DESCRIPTION

[0023] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described herein.

[0024] Figure 1 FIG2 shows a schematic flow chart of an automatic dispensing method based on machine vision according to an embodiment of the present application. Figure 1 As shown, the present application provides an automatic dispensing method based on machine vision, including: S1: acquiring a workpiece image containing all preset Mark points captured by a camera; S2: performing Mark point detection on the workpiece image to obtain a set of Mark point pixel coordinates; S3: performing coordinate conversion on the set of Mark point pixel coordinates to obtain a set of Mark point robot base coordinates; S4: extracting a set of Mark point robot base ideal coordinates from a background database, and calculating the deviation vector between the set of Mark point robot base ideal coordinates and the set of Mark point robot base coordinates to obtain a set of Mark point 2D deviation vectors; S5: inputting the set of Mark point 2D deviation vectors into a trained Z-axis compensation prediction model to obtain a set of Z-axis deviation prediction values; S6: based on the set of Mark point 2D deviation vectors and the set of Z-axis deviation prediction values, adaptively adjusting the original dispensing path to obtain adaptive dispensing path data.

[0025] For example, in step S1, an image of the workpiece containing all preset Mark points is acquired by a camera. It should be understood that in the automated dispensing process, in order to ensure that the glue can be accurately applied to the specified position of the workpiece, especially when there may be deviations in the actual placement or shape of the workpiece, the system needs to perceive the actual state of the workpiece in real time. The preset Mark points, as unique and identifiable geometric features on the workpiece, act as visual anchor points. The workpiece image containing these Mark points is acquired by the camera, thereby obtaining the current position information of the workpiece in the visual coordinate system.

[0026] Specifically, one or more industrial-grade image acquisition devices, namely cameras, are first deployed. This type of camera is usually a high-resolution CCD or CMOS camera equipped with a precision lens suitable for the workpiece size and mark point features. When the camera is arranged, the camera's position, tilt angle, and distance from the workpiece are precisely calibrated to ensure that its optical parameters can completely cover the entire working area, so that all preset mark points, no matter how widely they are distributed on the workpiece, can be captured in a single image frame at one time. When the workpiece is accurately placed at the designated detection position of the dispensing workbench by a conveyor belt or a robotic manipulator and stabilized, the control unit sends a trigger signal to instruct the camera to complete exposure and capture the image at the precise moment. The collected raw image data is usually transmitted in bitmap format to the computer's memory or video memory through a high-speed interface for further analysis by subsequent image processing software.

[0027] For example, in step S2, the workpiece image is subjected to Mark point detection to obtain a set of Mark point pixel coordinates. It should be understood that the original image is only two-dimensional pixel data captured by the visual sensor, which itself cannot directly provide the position information of specific feature points on the workpiece. For the automated dispensing system, its core goal is to accurately apply the glue to the predetermined position of the workpiece, and the Mark point, as a visual mark with stable geometric features formed artificially or naturally on the workpiece, is the key basis for positioning and deviation correction. Without this detection step, we are still faced with an unresolved image, and it is impossible to extract meaningful and quantifiable data for subsequent positioning, coordinate conversion and final intelligent compensation operations. In other words, Mark point detection is a bridge that converts raw image data into structured information that can be understood and processed by the machine. It enables the machine to understand the image content and accurately measure the position of the Mark point on the image sensor plane, that is, the set of Mark point pixel coordinates.

[0028] Specifically, after receiving the raw image data from the camera, a series of image preprocessing steps are performed. This aims to optimize image quality, remove noise that could introduce recognition errors, and enhance the features of the marker points, providing a clearer and more suitable input for subsequent detection algorithms. Specifically, image preprocessing involves converting the color image captured by the camera into grayscale. This effectively reduces the data dimensionality and enables subsequent image processing algorithms to focus on the image's brightness or intensity information rather than color. Subsequently, a spatial smoothing filter, such as a Gaussian blur filter or a median filter, is applied to reduce random noise in the image. Gaussian blur smoothes the image by taking a weighted average of pixel neighborhoods, while a median filter eliminates outliers by selecting the median value of the neighborhood pixels. Both effectively reduce the impact of noise on marker recognition while preserving the marker's edge information as much as possible. Next, to further improve the contrast between the marker point and the background, image enhancement operations, such as histogram equalization or contrast stretching, are performed to make the marker point stand out from the background, facilitating subsequent feature extraction.

[0029] Next is the Mark point positioning and identification. Through Mark point positioning and identification, the possible locations of Mark points can be roughly located, and they can be distinguished from other interferences in the image through their shape, texture and other features. Here, Mark points can have different forms. In one embodiment of the present application, Mark points are marked with circles or squares, and there is a significant grayscale difference between the Mark points and the background. For this form of Mark points, a threshold segmentation method is used. This method divides the pixels in the image into two categories by setting a specific grayscale threshold: pixels with grayscale values ​​higher than the threshold are considered to be Mark points, and pixels with grayscale values ​​lower than the threshold are considered to be background. This method converts the grayscale image into a binary image, so that the Mark points appear as independent connected regions in the image.

[0030] After identifying the candidate area of ​​the Mark point, the next step is high-precision sub-pixel positioning. Since a pixel usually corresponds to a distance of tens of microns or even smaller in actual physical size, in order to achieve millimeter or sub-millimeter dispensing accuracy, it is far from enough to rely solely on integer pixel coordinates. In order to obtain more detailed position information of the Mark point in the image, a complex algorithm is required to calculate the sub-pixel center coordinates of the Mark point on the image plane. In one embodiment of the present application, for circular or square Mark points, the center of gravity method can be used for sub-pixel positioning. This method obtains the center of gravity coordinates with sub-pixel accuracy by calculating the weighted average of all pixels in the area within the determined Mark point area. The weight can usually be the grayscale value of the pixel. The higher the grayscale value, the greater the contribution to the center of gravity. In other embodiments of the present application, grayscale interpolation or geometric fitting method can also be used, and this application does not impose specific restrictions on this.

[0031] Finally, after completing the precise identification and sub-pixel positioning of all mark points, the results are verified and screened. For example, it will be checked whether the number of detected mark points is consistent with the preset number, whether the geometric features of each mark point, such as size, shape, and roundness, are within the allowable tolerance range, and whether there are any abnormal misidentifications that do not belong to mark points. If redundant or unexpected mark points are detected, they need to be removed; if there are missing mark points, the algorithm parameters may need to be adjusted, or in some cases, manual intervention inspection or re-image acquisition will be prompted. Finally, the two-dimensional (x, y) pixel coordinates of all successfully detected and verified mark points in the image will be stored in the form of a set.

[0032] For example, in step S3, the set of pixel coordinates of the mark points is transformed to obtain a set of robot base coordinates of the mark points. It should be understood that the image acquired by the camera provides only two-dimensional pixel coordinates, which are insufficient to directly guide the robot's movement. In order for the robot to accurately perform tasks based on visual feedback, it is necessary to convert the two-dimensional pixel coordinates into physical coordinates in three-dimensional space, namely the robot base coordinates. This conversion not only involves a proportional transformation from pixels to physical dimensions, but also requires considering the positional relationship of the camera relative to the workpiece and the robot.

[0033] In one embodiment, Figure 2As shown, the set of pixel coordinates of the Mark points is subjected to coordinate transformation to obtain the set of robot base coordinates of the Mark points, including: S31: based on the camera intrinsic parameter calibration data and the camera extrinsic parameter calibration data, the set of pixel coordinates of the Mark points is transformed from the pixel coordinate system to the camera coordinate system to obtain the set of camera coordinates of the Mark points; S32: the set of camera coordinates of the Mark points is transformed from the camera coordinate system to the robot base coordinate system to obtain the set of robot base coordinates of the Mark points.

[0034] Specifically, the camera coordinate system is a three-dimensional coordinate system with the camera's optical center as its origin, the Z axis along the optical axis, and the X and Y axes perpendicular to the optical axis and to each other. Converting pixel coordinates to camera coordinates is actually a reverse derivation of the image formation process, that is, inferring the direction of the projection ray corresponding to the two-dimensional pixel point in the image in three-dimensional space. However, since perspective projection is essentially a dimensionality reduction process from three-dimensional to two-dimensional, depth information (Z-axis coordinate) cannot be directly determined based on pixel coordinates alone. Therefore, this conversion process requires the introduction of camera intrinsic and extrinsic calibration data.

[0035] More specifically, camera intrinsic parameters describe the camera's geometric properties, including focal length, the pixel coordinates of the principal point (the intersection of the optical axis and the image plane), and lens distortion parameters. These parameters form the basis for establishing the mapping between pixel coordinates and camera coordinates. Camera intrinsic parameter calibration can be performed using the Zhang Zhengyou calibration method, a widely used, simple, and accurate planar calibration method that will not be discussed in detail here. Camera extrinsic parameters describe the pose and position of the camera coordinate system relative to a world coordinate system, namely, the rotation matrix and translation vector. During the Zhang Zhengyou calibration process, each time a checkerboard is captured, a set of extrinsic parameters relative to the current checkerboard pose is generated. These extrinsic parameters are primarily used to determine the intrinsic parameters, but are not directly used in the subsequent conversion of mark points from pixel coordinates to camera coordinates. In practice, mark points are typically located on the workpiece surface. Therefore, camera extrinsic parameters here primarily refer to the relative position of the workpiece plane where the mark points are located in the camera coordinate system, particularly the depth (Z value) information. Because a two-dimensional pixel point itself cannot provide depth information, an assumption is usually required: the mark point is located on a plane with a specific Z value in the camera coordinate system, such as the surface of the workpiece. This Z value (i.e., the depth from the mark point to the camera's optical center) may be a nominal value preset during design based on the workpiece thickness or installation spacing, or it may be measured separately through other means (such as laser displacement sensors or structured light). In other words, the camera's intrinsic and extrinsic calibration data can be measured in advance through a testing process. After measuring the camera's intrinsic and extrinsic calibration data, these fixed parameters are used to convert the pixel coordinate system to the camera coordinate system.

[0036] In one embodiment, based on camera intrinsic parameter calibration data and camera extrinsic parameter calibration data, the set of pixel coordinates of the mark points is converted from a pixel coordinate system to a camera coordinate system to obtain a set of camera coordinates of the mark points. This includes: first, correcting the original pixel coordinates using the distortion coefficients obtained through calibration to obtain corrected pixel coordinates. This step is intended to eliminate the effects of lens distortion on the image point positions and ensure the geometric accuracy of the point positions. Only after the distortion correction has been performed can the pixel points be accurately mapped to the ideal two-dimensional image plane. Subsequently, using the camera's intrinsic parameter information, the corrected pixel coordinates are converted into normalized plane coordinates located on the ideal camera plane in an imaginary three-dimensional space. This step forms the basis for reverse perspective projection. The specific conversion method can be achieved by subtracting the principal point coordinates from the pixel coordinates and then dividing by the corresponding focal length. Finally, the three-dimensional coordinates of the mark points in the camera coordinate system are obtained by combining the pre-set or measured depth of the mark points. Finally, the above process is repeated for each point in the set of mark point pixel coordinates to obtain the set of three-dimensional coordinates of the mark points in the camera coordinate system.

[0037] Next, the set of camera coordinates of the mark points is converted from the camera coordinate system to the robot base coordinate system. In one embodiment, converting the set of camera coordinates of the mark points from the camera coordinate system to the robot base coordinate system to obtain the set of robot base coordinates of the mark points includes: converting the set of camera coordinates of the mark points from the camera coordinate system to the robot base coordinate system based on a hand-eye calibration matrix.

[0038] Those skilled in the art will recognize that hand-eye calibration is a routine process. Specifically, the camera must first be securely mounted in the workspace, ensuring that its field of view covers the robot's reachable area. Furthermore, a 3D calibration feature that is easily recognized and located by the camera must be prepared. This can include a calibration block with multiple precisely known points, or a sharp tool or a special pattern mounted on the robot end, with the tip or specific point of the tool precisely located in the robot end coordinate system. During data acquisition, the robot end effector (or the calibration feature mounted on it) is programmed to move to multiple different positions and poses within the robot's workspace. It is important to ensure that the pose variations are large enough to cover a sufficient range of rotation and translation to provide a rich set of data points. For each robot motion pose, the precise 3D position and pose information of the end effector (or the reference point of the calibration feature) in the robot's base coordinate system must be read from the robot controller. Simultaneously, the camera captures an image and, using the same method used for mark point detection, accurately identifies and calculates the 3D coordinates of the calibration feature on the robot end effector in the camera coordinate system. If a known point is installed on the robot's end effector, then the coordinates of this point are used; if a mark point on the robot tool is identified through vision, then the three-dimensional coordinates of the mark point in the camera coordinate system are used.

[0039] After collecting a sufficient number of corresponding data pairs (the robot's pose data in the robot's base coordinate system and the position data of the corresponding calibration features in the camera coordinate system), a specific hand-eye calibration algorithm can be used (for example, mathematically solving the linear equation system AX=XB, or an algorithm based on optimization methods) to solve the rotation matrix and translation vector. This is a complex mathematical optimization problem whose goal is to maximize the match between the data points to obtain the most accurate transformation relationship from the camera to the robot's base coordinate system. Ultimately, the hand-eye calibration matrix is ​​usually represented as a homogeneous transformation matrix, which contains the rotation matrix and translation vector.

[0040] Once the hand-eye calibration is complete and the hand-eye calibration matrix is ​​obtained, the coordinates of any mark point in the camera coordinate system can be easily converted to its corresponding coordinates in the robot base coordinate system. This conversion is completed through a simple matrix multiplication and vector addition: the robot base coordinates are obtained by multiplying the camera coordinates by the rotation matrix and adding the translation vector.

[0041] For example, in step S4, a set of ideal robot-based coordinates of the mark points is extracted from the backend database, and the deviation vectors between the set of ideal robot-based coordinates of the mark points and the set of robot-based coordinates of the mark points are calculated to obtain a set of 2D deviation vectors of the mark points. It should be understood that the ideal state of automated production is that the workpiece is in a perfect, preset theoretical position and posture before each processing, and the workpiece's geometric shape is completely consistent with the design model. However, in actual industrial production environments, this ideal state is almost impossible to achieve. Minor positioning errors are inevitable during the loading, clamping, and transportation of the workpiece. The workpiece itself may also have slight deviations from the ideal design in geometric dimensions or shape, such as warping, distortion, or localized unevenness, due to various factors such as manufacturing tolerances, material deformation, thermal stress, and transportation vibration. Even high-precision industrial robots have micron-level operational tolerances in their repeatable positioning accuracy. All of these accumulated error sources will cause a discrepancy between the actual spatial position of the mark points observed by the machine vision system and the theoretical ideal position of the mark points expected by product design or process programming. Therefore, the deviation vectors between the set of ideal robot-based coordinates of the mark points and the set of robot-based coordinates of the mark points are calculated to obtain a set of 2D deviation vectors for the mark points. This allows for accurate perception and quantification of the difference between the actual spatial position of the mark points and the theoretical ideal position of the mark points as anticipated by product design or process programming. Here, the set of ideal robot-based coordinates of the mark points refers to the precise 3D coordinates (X, Y, Z) of the mark points in the robot-based coordinate system, predefined during the product design or process programming phase for a specific workpiece model (e.g., a certain type of circuit board, automotive electronic module, or precision component). These ideal coordinates represent the ideal spatial position of the mark points under optimal conditions and can be pre-set and stored in a backend database for easy recall.

[0042] For example, in step S5, the set of Mark point 2D deviation vectors is input into the trained Z-axis compensation prediction model to obtain a set of Z-axis deviation prediction values. It should be understood that there is an inherent, but often complex, nonlinear relationship between the two-dimensional plane deviation of the workpiece (represented by the Mark point 2D deviation vector) and the height deviation of the workpiece in three-dimensional space (Z-axis deviation). For example, a slightly warped circuit board may have a slight inward or outward displacement of the Mark point at its edge on the XY plane, and this displacement is actually often caused by the Z-axis bulge or depression of its central area. This complex correlation between the two-dimensional and three-dimensional implicit in the workpiece deformation pattern makes it possible to try to predict the Z-axis deviation, which is difficult to measure directly or expensive to measure, using known two-dimensional deviation information that is easily obtained through machine vision. Traditional geometric methods or simple linear interpolation have difficulty capturing this complex nonlinear, multi-factor coupled two-dimensional-three-dimensional deviation mapping relationship. Therefore, by introducing a trained Z-axis compensation prediction model and leveraging the powerful ability of machine learning to learn and capture complex nonlinear mapping relationships, the plane deviation information of discrete mark points obtained from the visual system is converted into Z-axis compensation data for each mark point.

[0043] In one embodiment, Figure 3 As shown, the set of Mark point 2D deviation vectors is input into the trained Z-axis compensation prediction model to obtain a set of Z-axis deviation prediction values, including: S51: combining the set of Mark point 2D deviation vectors into a deviation feature vector of length 2N, where N is the number of Mark points; S52: inputting the deviation feature vector into the trained Z-axis compensation prediction model to obtain the set of Z-axis deviation prediction values. The trained Z-axis compensation prediction model is a support vector regression model or a feedforward neural network model.

[0044] Specifically, before the 2D deviation vector is input into the machine learning model, the set of 2D deviation vectors of the mark points is first combined into a deviation feature vector of length 2N. This is a normalization process that converts discrete, multiple pairs of two-dimensional information into a single, fixed-length input form that the machine learning model can accept. For example, if there are 4 mark points, the corresponding 2D deviation vectors are: 2D deviation of mark point 1: , 2D deviation of Mark point 2: , 2D deviation of Mark point 3: , 2D deviation of Mark point 4: , then the combined deviation feature vector , of course, this is just an example.

[0045] Next, the deviation feature vector is input into the trained Z-axis compensation prediction model to obtain a set of Z-axis deviation prediction values. The trained Z-axis compensation prediction model is a support vector regression model or a feedforward neural network model. Specifically, the core concept of the support vector regression model is not to simply fit all data points to a line, but to find an optimal function such that the distance from all training sample points to this function is within an allowable error threshold while minimizing the model complexity. The support vector regression model introduces a kernel function to map the deviation feature vector of length 2N to a high-dimensional feature space. In this high-dimensional space, even if the original input is nonlinearly separable, a linear hyperplane can be found to fit the data, thereby handling nonlinear relationships. The feedforward neural network model is the most basic neural network structure, in which information flows unidirectionally from the input layer to the output layer, passing through one or more hidden layers in between. Each neuron receives input from the previous layer, performs weighted summation, and processes it through a nonlinear activation function before passing it as output to the next layer. Its hierarchical structure and nonlinear activation function give the feedforward neural network model powerful capabilities for learning and approximating arbitrary nonlinear functions. A large amount of real data is used to train the support vector regression model or the feedforward neural network model, so that the model can learn and capture the complex mapping rules between deviations, thereby converting the plane deviation information of the mark point into the Z-axis compensation data for each mark point. The specific model training process is a conventional process and can be referred to the existing technology, so it will not be elaborated here.

[0046] For example, in step S6, based on the set of the Mark point 2D deviation vectors and the set of the Z-axis deviation prediction values, the original dispensing path is adaptively adjusted to obtain adaptive dispensing path data. It should be understood that in actual automated dispensing production, the glue is applied along a preset, usually continuous path, which may be composed of a series of straight line segments, arcs or complex curves. The deviation of the workpiece surface does not only occur at the Mark point, but will spread to the entire dispensing area in a continuous, often nonlinear manner. For example, a circuit board may have slight overall bending, twisting or local warping due to stress during production or transportation. Although the Mark point is offset in the XY plane, the more critical thing is that the Z-axis height of its surface shows uneven changes at different positions, and these Z-axis height changes are often not directly extrapolated by simple Mark point deviations. If the robot only performs a simple global translation or rotation based on the local deviation of the Mark points, the dispensing path may still be misaligned with the actual surface of the workpiece in the area between the Mark points, and the distance between the dispensing needle and the workpiece will no longer be constant, resulting in serious quality problems such as uneven glue coating, glue overflow, glue breakage, or uneven thickness, ultimately causing the product to fail to meet technical requirements. Based on this, the present application further adaptively adjusts the original dispensing path based on the set of Mark point 2D deviation vectors and the set of Z-axis deviation prediction values ​​to obtain adaptive dispensing path data.

[0047] In one embodiment, Figure 4 As shown, based on the set of Mark point 2D deviation vectors and the set of Z-axis deviation prediction values, the original dispensing path is adaptively adjusted to obtain adaptive dispensing path data, including: S61: based on the set of Mark point 2D deviation vectors, a set of 2D compensation amounts is calculated; S62: based on the set of 2D compensation amounts, the original dispensing path is compensated in the X-axis and Y-axis to obtain 2D compensated dispensing path data; S63: based on the set of Z-axis deviation prediction values, the 2D compensated dispensing path data is compensated in the Z-axis to obtain 3D compensated dispensing path data as the adaptive dispensing path data.

[0048] In one embodiment, a set of 2D compensation amounts is calculated based on the set of 2D deviation vectors of the Mark points, including: inputting the deviation vectors of the Mark points and the robot base coordinates of the Mark points into a 2D interpolation model to obtain the 2D compensation amounts.

[0049] Specifically, after acquiring a workpiece image containing all preset mark points, a 2D interpolation model is constructed based on the positional information of these mark points. This model imagines the workpiece surface as a slightly deformable elastic membrane. When a push or stretch force is applied at certain key points, the entire elastic membrane will undergo a corresponding smooth deformation. In this way, the 2D interpolation model not only considers the direct linear relationship between the individual mark points, but also comprehensively considers their influence on the surrounding area, thereby generating a continuous and smooth deviation field. In this deviation field, any given point can query the distance it should be translated in the X and Y axes to correct the positional deviation caused by workpiece deformation. Specifically, each mark point is treated as a unique basis function center, and its corresponding 2D deviation vector represents the intensity of the center point's influence on the surrounding area. In this way, even if the workpiece deformation exhibits complex nonlinear characteristics, this global deformation pattern can be accurately simulated and compensated.

[0050] In one specific embodiment, during the model construction phase, separate RBF interpolation functions are constructed for the X- and Y-axis compensation values. These functions consist of a series of weight coefficients and a preset radial basis function (such as a commonly used Gaussian function or thin plate spline function). The weight coefficients are obtained by solving a system of linear equations. The core goal is to ensure that at each mark point, the model's interpolated output accurately matches the actual 2D deviation value at that mark point. Once these weight coefficients are determined, the RBF interpolation model is complete. It has the ability to accurately query or calculate the X- and Y-axis compensation values ​​at any 2D coordinate point on the workpiece's XY plane. This model generates a continuous and smooth deviation field, from which the required translation distance in the X and Y directions for any given 2D coordinate can be accurately calculated to correct for positional deviations caused by workpiece deformation. Ultimately, a set of 2D compensation values ​​is generated by querying each discrete point along the dispensing path.

[0051] Specifically, it starts by loading the pre-programmed original dispensing path data. The original dispensing path data contains a series of X, Y, and Z waypoint sequences for an ideal workpiece. Then, each discrete waypoint in this original path will be traversed, and for each original waypoint on the path, the previously constructed 2D interpolation model will be used to query or calculate the X-axis and Y-axis compensation amounts that should be applied at that point based on the XY coordinates of the waypoint. Subsequently, these compensation amounts will be directly superimposed on the X and Y coordinates of the original waypoint to form new two-dimensional compensated coordinates. It is worth noting that the Z coordinate of the waypoint remains unchanged at this time, because the correction of the Z axis will be performed in the next step. By repeating this process for all discrete waypoints on the original path, a new dispensing path data set is obtained, namely the 2D compensated dispensing path data. This path has fully adapted to the actual plane position and local two-dimensional deformation of the current workpiece.

[0052] Next, after generating the 2D compensation path, the actual height variations of the workpiece need to be considered. This stage relies on the Z-axis deviation predictions provided by a pre-trained Z-axis compensation prediction model. These predictions are obtained for discrete mark points, while the Z-axis height of each point on the actual dispensing path must be corrected. Therefore, a Z-axis interpolation model is also required. This model infers the Z-axis compensation value corresponding to any XY coordinate point on the 2D compensation dispensing path. By treating these mark points and their predicted Z-axis deviations as a series of uneven elevation points marked on a virtual plane, the Z-axis interpolation model accurately delineates the 3D topography of the entire virtual plane from these limited, scattered data points, thereby reflecting the actual undulations and deformation of the workpiece surface. Ultimately, this Z-axis interpolation model provides a precise Z-axis compensation value for each point on the dispensing path, enabling the dispensing tip to dynamically adjust its position based on the actual height of the workpiece surface.

[0053] Finally, the 2D-compensated dispensing path is adjusted in the Z-axis direction. This step is similar to 2D compensation and also relies on interpolation technology. The previously constructed Z-axis interpolation model is used to input the current X and Y coordinates of each waypoint into the model. The compensation amount for that point in the Z-axis direction is obtained and superimposed on the original Z coordinate. In this way, each waypoint on the path has complete 3D-compensated coordinates, forming the final 3D-compensated dispensing path data. This dataset, the final output of this method, contains the precise 3D coordinates of each waypoint on the dispensing path in the robot's base coordinate system. It not only corrects the workpiece's deviation in the XY plane, but also considers and compensates for the workpiece's own deformation and height differences in the Z-axis direction. Through this two-stage adaptive adjustment, the dispensing robot can drive the dispensing needle to accurately follow the workpiece's true surface contour in three-dimensional space, greatly improving the accuracy and quality stability of dispensing.

[0054] In particular, when the Mark point 2D deviation vector and the Mark point robot base coordinate are input into the 2D interpolation model to obtain the 2D compensation amount, that is, the X-axis compensation amount and the Y-axis compensation amount, for example, expressed as and, due to the linear interpolation characteristics of the 2D interpolation model, relative to the neural network nonlinear characteristics of the Z-axis compensation prediction model that obtains the set of Z-axis deviation prediction values ​​based on the set of Mark point 2D deviation vectors, the X-axis and Y-axis compensation amounts will be misaligned with the Z-axis deviation prediction value in the spatial perception dimension of the linear-nonlinear space, thereby affecting the compensation accuracy.

[0055] Based on this, in another embodiment, based on the set of Mark point 2D deviation vectors, a set of 2D compensation amounts is calculated, including: inputting the Mark point 2D deviation vectors and the Mark point robot base coordinates into a 2D interpolation model to obtain initial 2D compensation amounts, the initial 2D compensation amounts including X-axis compensation amounts and Y-axis compensation amounts; based on the Z-axis deviation prediction value, correcting the X-axis compensation amounts and the Y-axis compensation amounts based on rotational stable alignment to obtain corrected X-axis compensation amounts and corrected Y-axis compensation amounts, and using the corrected X-axis compensation amounts and the corrected Y-axis compensation amounts as the 2D compensation amounts.

[0056] Specifically, based on the Z-axis deviation prediction value, the X-axis compensation amount and the Y-axis compensation amount are corrected based on rotational stable alignment, including: the X-axis vector formed by the X-axis compensation amount, for example, , the Y-axis compensation amount constitutes the Y-axis vector, for example, , and the Z-axis deviation prediction value constitute the Z-axis vector, for example, First, based on the Z-axis vector formed by the Z-axis deviation prediction value, the X-axis vector formed by the X-axis compensation amount and the Y-axis vector formed by the Y-axis compensation amount are phase modulated by the fine-grained distribution morphology coefficient to obtain the X-axis modulation vector and the Y-axis modulation vector, that is: ;in, represents the X-axis vector, represents the Y-axis vector, represents the inverse sine function, represents the inverse cosine function, represents element-wise multiplication, Represents the element-by-element reciprocal of the Z-axis vector, represents the X-axis modulation vector, Represents the Y-axis modulation vector.

[0057] That is, by using the Z-axis deviation prediction value as the scalar dimension phase reference, the dimensional rotation stability of the X-axis compensation amount and the Y-axis compensation amount in the vector dimension is maintained through dynamic phase coupling.

[0058] Then, from the perspective of the inherent defects of geometric correlation under dimensional rotation, a mutual position compensation mechanism between the overall distribution forms is established through low-rank constrained quantization. That is, the X-axis modulation vector and the Y-axis modulation vector are subjected to mutual position compensation between the overall distribution forms to obtain the X-axis modulation compensation vector and the Y-axis modulation compensation vector, namely: ;in, represents the two-norm of the vector, represents the X-axis modulation compensation vector, Represents the Y-axis modulation compensation vector.

[0059] That is, dynamic phase angle modulation based on the overall distribution morphology is achieved in the rotational projection space through mutual position compensation.

[0060] Finally, after high-dimensional correlation coupling is performed on the X-axis modulation compensation vector and the Y-axis modulation compensation vector, the X-axis vector and the Y-axis vector are corrected to obtain a corrected X-axis vector and a corrected Y-axis vector, wherein the corrected X-axis vector is composed of a corrected X-axis compensation amount, and the corrected Y-axis vector is composed of a corrected Y-axis compensation amount, that is: ;in, represents vector multiplication, represents the transpose symbol, Represents the X-axis vector after correction, Represents the corrected Y-axis vector, where the X-axis vector, Y-axis vector, and Z-axis vector are all column vectors.

[0061] In this way, the multi-dimensional morphological disturbance caused by the geometric rotation operation in the high-dimensional space is avoided by high-dimensional correlation coupling based on dimensional rotation representation, thereby maintaining the morphological stability of the overall distribution while performing rotational stable alignment of the linear-nonlinear spatial perception dimension, and improving the 3D compensation correspondence accuracy of the obtained 2D compensation amount relative to the set of Z-axis deviation prediction values.

[0062] In summary, the automatic dispensing method based on machine vision provided by the present application first accurately obtains the pixel coordinates of the preset mark points on the workpiece through machine vision, and calculates the set of 2D deviation vectors of the mark points with the ideal position. Then, the set of 2D deviation vectors of the mark points is sent to a pre-trained Z-axis compensation prediction model. The model can learn and predict the corresponding Z-axis deviation value from the 2D plane deviation, effectively solving the complex nonlinear mapping that may exist between the 2D deviation and the Z-axis deviation. Finally, the calculated 2D deviation vector and the Z-axis deviation value predicted by the model are comprehensively utilized to perform a comprehensive three-dimensional adaptive adjustment on the original dispensing path, thereby overcoming the limitations of the traditional method that only focuses on 2D compensation and the resulting misalignment problem of linear and nonlinear spatial perception dimensions, and significantly improving the accuracy and adaptability of automatic dispensing.

[0063] The present application also provides an automatic dispensing system based on machine vision, which is used to execute the above-mentioned automatic dispensing method based on machine vision, such as Figure 5 As shown, the automatic dispensing system 500 based on machine vision includes: a workpiece image acquisition module 501, which is used to acquire a workpiece image containing all preset Mark points collected by a camera; a Mark point detection module 502, which is used to perform Mark point detection on the workpiece image to obtain a set of Mark point pixel coordinates; a coordinate conversion module 503, which is used to perform coordinate conversion on the set of Mark point pixel coordinates to obtain a set of Mark point robot base coordinates; a Mark point deviation calculation module 504, which is used to extract a set of Mark point robot base ideal coordinates from a background database, and calculate the deviation vector between the set of Mark point robot base ideal coordinates and the set of Mark point robot base coordinates to obtain a set of Mark point 2D deviation vectors; a Z-axis deviation prediction module 505, which is used to input the set of Mark point 2D deviation vectors into a trained Z-axis compensation prediction model to obtain a set of Z-axis deviation prediction values; a dispensing path adaptive adjustment module 506, which is used to adaptively adjust the original dispensing path based on the set of Mark point 2D deviation vectors and the set of Z-axis deviation prediction values ​​to obtain adaptive dispensing path data.

[0064] The basic principles of the present application have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, and effects mentioned in this application are merely illustrative and not restrictive, and it should not be assumed that these advantages, strengths, and effects are required of each embodiment of this application. In addition, the specific details disclosed above are merely illustrative and facilitating understanding, and are not restrictive. The above details do not limit this application to necessarily being implemented using the above specific details.

[0065] The flowcharts of the methods involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the flowcharts. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems may be connected, arranged, or configured in any manner. Words such as "include," "comprise," "have," and the like are open-ended words, meaning "including but not limited to," and may be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or" and may be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and may be used interchangeably therewith.

[0066] It should also be noted that in the method of the present application, each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

[0067] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0068] The above description has been provided for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. An automatic dispensing method based on machine vision, characterized in that: include: Get the workpiece image captured by the camera containing all preset mark points; Performing Mark point detection on the workpiece image to obtain a set of Mark point pixel coordinates; Performing coordinate transformation on the set of Mark point pixel coordinates to obtain a set of Mark point robot base coordinates; Extracting a set of ideal coordinates of the robot base of the Mark point from the background database, and calculating a deviation vector between the set of ideal coordinates of the robot base of the Mark point and the set of the robot base coordinates of the Mark point to obtain a set of 2D deviation vectors of the Mark point; Inputting the set of Mark point 2D deviation vectors into the trained Z-axis compensation prediction model to obtain a set of Z-axis deviation prediction values; Based on the set of Mark point 2D deviation vectors and the set of Z-axis deviation prediction values, the original dispensing path is adaptively adjusted to obtain adaptive dispensing path data, including: calculating a set of 2D compensation amounts based on the set of Mark point 2D deviation vectors; performing X-axis and Y-axis compensation on the original dispensing path based on the set of 2D compensation amounts to obtain 2D compensated dispensing path data; performing Z-axis compensation on the 2D compensated dispensing path data based on the set of Z-axis deviation prediction values ​​to obtain 3D compensated dispensing path data as the adaptive dispensing path data; Among them, based on the set of Mark point 2D deviation vectors, a set of 2D compensation amounts is calculated, including: inputting the Mark point 2D deviation vectors and the Mark point robot base coordinates into a 2D interpolation model to obtain an initial 2D compensation amount, and the initial 2D compensation amount includes an X-axis compensation amount and a Y-axis compensation amount; based on the Z-axis deviation prediction value, the X-axis compensation amount and the Y-axis compensation amount are corrected based on rotational stable alignment to obtain a corrected X-axis compensation amount and a corrected Y-axis compensation amount, and the corrected X-axis compensation amount and the corrected Y-axis compensation amount are used as the 2D compensation amount.

2. The automatic dispensing method based on machine vision according to claim 1, characterized in that: Performing coordinate transformation on the set of Mark point pixel coordinates to obtain a set of Mark point robot base coordinates, including: Based on the camera intrinsic parameter calibration data and the camera extrinsic parameter calibration data, the set of pixel coordinates of the Mark point is converted from the pixel coordinate system to the camera coordinate system to obtain the set of camera coordinates of the Mark point; The set of the Mark point camera coordinates is converted from the camera coordinate system to the robot base coordinate system to obtain the set of the Mark point robot base coordinates.

3. The automatic dispensing method based on machine vision according to claim 2, characterized in that: The set of the Mark point camera coordinates is converted from the camera coordinate system to the robot base coordinate system to obtain the set of the Mark point robot base coordinates, including: converting the set of the Mark point camera coordinates from the camera coordinate system to the robot base coordinate system based on the hand-eye calibration matrix.

4. The automatic dispensing method based on machine vision according to claim 3, characterized in that: The set of Mark point 2D deviation vectors is input into the trained Z-axis compensation prediction model to obtain a set of Z-axis deviation prediction values, including: Combining the set of Mark point 2D deviation vectors into a deviation feature vector of length 2N, where N is the number of Mark points; The deviation feature vector is input into the trained Z-axis compensation prediction model to obtain a set of Z-axis deviation prediction values.

5. The automatic dispensing method based on machine vision according to claim 4, characterized in that: The trained Z-axis compensation prediction model is a support vector regression model or a feedforward neural network model.

6. The automatic dispensing method based on machine vision according to claim 1, characterized in that: Based on the Z-axis deviation prediction value, the X-axis compensation amount and the Y-axis compensation amount are corrected based on rotationally stable alignment, including: Based on the Z-axis vector formed by the Z-axis deviation prediction value, the X-axis vector formed by the X-axis compensation amount and the Y-axis vector formed by the Y-axis compensation amount are phase modulated by fine-grained distribution morphology coefficients to obtain an X-axis modulation vector and a Y-axis modulation vector; Performing mutual position compensation between the overall distribution forms of the X-axis modulation vector and the Y-axis modulation vector to obtain an X-axis modulation compensation vector and a Y-axis modulation compensation vector; After high-dimensional correlation coupling is performed on the X-axis modulation compensation vector and the Y-axis modulation compensation vector, the X-axis vector and the Y-axis vector are corrected to obtain a corrected X-axis vector and a corrected Y-axis vector, wherein the corrected X-axis vector is composed of a corrected X-axis compensation amount, and the corrected Y-axis vector is composed of a corrected Y-axis compensation amount.

7. An automatic dispensing system based on machine vision, characterized in that: include: The workpiece image acquisition module is used to obtain the workpiece image containing all preset Mark points captured by the camera; A mark point detection module, used for performing mark point detection on the workpiece image to obtain a set of mark point pixel coordinates; A coordinate conversion module, configured to perform coordinate conversion on the set of pixel coordinates of the Mark points to obtain a set of robot base coordinates of the Mark points; A mark point deviation calculation module is used to extract the set of ideal coordinates of the mark point robot base from the background database, and calculate the deviation vector between the set of ideal coordinates of the mark point robot base and the set of the mark point robot base coordinate to obtain a set of 2D deviation vectors of the mark point; A Z-axis deviation prediction module is used to input the set of Mark point 2D deviation vectors into the trained Z-axis compensation prediction model to obtain a set of Z-axis deviation prediction values; A dispensing path adaptive adjustment module is configured to adaptively adjust the original dispensing path based on the set of Mark point 2D deviation vectors and the set of Z-axis deviation prediction values ​​to obtain adaptive dispensing path data, including: calculating a set of 2D compensation amounts based on the set of Mark point 2D deviation vectors; performing X-axis and Y-axis compensation on the original dispensing path based on the set of 2D compensation amounts to obtain 2D compensated dispensing path data; and performing Z-axis compensation on the 2D compensated dispensing path data based on the set of Z-axis deviation prediction values ​​to obtain 3D compensated dispensing path data as the adaptive dispensing path data. Among them, based on the set of Mark point 2D deviation vectors, a set of 2D compensation amounts is calculated, including: inputting the Mark point 2D deviation vectors and the Mark point robot base coordinates into a 2D interpolation model to obtain an initial 2D compensation amount, and the initial 2D compensation amount includes an X-axis compensation amount and a Y-axis compensation amount; based on the Z-axis deviation prediction value, the X-axis compensation amount and the Y-axis compensation amount are corrected based on rotational stable alignment to obtain a corrected X-axis compensation amount and a corrected Y-axis compensation amount, and the corrected X-axis compensation amount and the corrected Y-axis compensation amount are used as the 2D compensation amount.

Citation Information

Patent Citations

  • Assembly line dispensing curing control method and device, equipment and storage medium thereof

    CN113210217A

  • Control method and control system of automatic dispensing machine

    CN115328024A