UV Printing Method, Device and Computer Equipment for Packaging Box
By performing feature extraction and edge detection of the packaging box CAD model data, combined with machine vision technology, multi-stage trajectory planning and UV light source synchronization control, the problem of uneven ink droplet curing in traditional UV printing equipment is solved, and printing quality and accuracy are improved.
Patent Information
- Application Number
- CN202510222745.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-02-27
AI Technical Summary
When traditional UV printing equipment deals with packaging boxes of different shapes and materials, there are quality problems such as uneven curing of ink droplets and deviation in printing accuracy. It lacks the ability to accurately identify and dynamic track the surface characteristics of the packaging box, and the energy output of the UV light source cannot be adjusted in real time.
By performing feature extraction and edge detection of the packaging box CAD model data, combined with machine vision technology to achieve accurate positioning and attitude recognition, multi-stage trajectory planning and UV light source synchronization control are adopted, and the power output and trigger timing of the UV light source are dynamically adjusted to ensure uniform curing of ink droplets.
It improves printing quality, achieves uniform curing of ink droplets, and improves the spatial positioning accuracy and stability of printing quality of the printing system.
Smart Images

Figure CN119773366B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of UV printing technology, and in particular to a packaging box UV printing method, device and computer equipment. Background Art
[0002] In the packaging and printing sector, UV printing technology is widely used due to its environmentally friendly, quick-drying, and high-gloss advantages. Traditional UV printing equipment primarily utilizes fixed UV light sources and a single print path, resulting in poor adaptability when processing packaging boxes of varying shapes and materials. In particular, the lack of precise spatial position control and real-time UV energy regulation during UV printing of packaging boxes with complex curves and special materials can lead to quality issues such as uneven ink curing and inaccurate printing.
[0003] As the packaging industry's demand for personalized, refined printing continues to grow, existing UV printing equipment faces numerous challenges in processing high-precision, diverse packaging. For one thing, traditional UV printing systems lack the ability to accurately identify and dynamically track surface features, making it difficult to precisely position ink droplets during the printing process. Furthermore, UV light sources often use fixed parameter output modes, making it impossible to adjust the energy output based on the curing requirements of ink droplets at different locations in real time, impacting the consistency of print quality. Summary of the Invention
[0004] The present invention provides a UV printing method, device and computer equipment for packaging boxes. The present invention realizes uniform curing of ink droplets by dynamically adjusting the power output and triggering timing of the UV light source, effectively solving the problem of uneven curing of ink droplets at different positions and improving printing quality.
[0005] In a first aspect, the present invention provides a packaging box UV printing method, the packaging box UV printing method comprising:
[0006] Perform feature extraction on the CAD model data of the packaging box to obtain a feature data set of the packaging box;
[0007] Perform coordinate mapping on the robot workspace to obtain the conversion matrix between the visual coordinate system and the robot base coordinate system and the spatial calibration data of the UV nozzle installation position;
[0008] Based on the transformation matrix and the spatial calibration data, edge detection and feature point matching are performed on the packaging box to obtain position coordinate data of the packaging box and posture angle data of the UV printing area;
[0009] Performing multi-segment trajectory planning on the inkjet trajectory according to the position coordinate data and the posture angle data to obtain initial printing trajectory control data that meets the UV ink droplet jetting spacing requirement;
[0010] Based on the initial printing trajectory control data, a UV light source synchronization control calculation is performed to obtain UV light source power modulation parameters and UV light source triggering timing data.
[0011] In a second aspect, the present invention provides a packaging box UV printing device, the packaging box UV printing device comprising:
[0012] A feature extraction module is used to extract features from the CAD model data of the packaging box to obtain a feature data set of the packaging box;
[0013] The coordinate mapping module is used to map the robot workspace to obtain the conversion matrix between the visual coordinate system and the robot base coordinate system and the spatial calibration data of the UV nozzle installation position;
[0014] A feature point matching module is used to perform edge detection and feature point matching on the packaging box based on the transformation matrix and the spatial calibration data to obtain position coordinate data of the packaging box and posture angle data of the UV printing area;
[0015] A trajectory planning module is used to perform multi-segment trajectory planning on the inkjet trajectory according to the position coordinate data and the posture angle data, so as to obtain initial printing trajectory control data that meets the UV ink droplet jetting spacing requirement;
[0016] The synchronous control module is used to perform UV light source synchronous control calculation based on the initial printing trajectory control data to obtain UV light source power modulation parameters and UV light source triggering timing data.
[0017] The third aspect of the present invention provides a packaging box UV printing device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the packaging box UV printing device executes the above-mentioned packaging box UV printing method.
[0018] In the technical solution provided by the present invention, by performing feature extraction and edge detection on the CAD model data of the packaging box, combined with machine vision technology, the precise positioning and posture recognition of the packaging box are achieved, effectively avoiding positioning deviations during the printing process. A multi-segment trajectory planning method is adopted, and the uniformity of the ink droplet spacing and the consistency of the curing effect are ensured through dynamic optimization of the inkjet trajectory and synchronous control of the UV light source. An accurate conversion relationship between the visual coordinate system and the robot base coordinate system is established, which realizes high-precision calibration of the UV nozzle position and improves the spatial positioning accuracy of the printing system. By calculating the overlap rate and energy density distribution of the UV curing area in real time, the power output and trigger timing of the UV light source are dynamically adjusted to achieve uniform curing of the ink droplets. Based on the synchronous optimization of the spot coverage range parameters and the ink droplet deposition time data, the precise coordination of the UV light source and the inkjet system is achieved, ensuring the stability of the printing quality. By real-time compensation of the UV light source power and optimized calculation of energy distribution, the problem of uneven curing of ink droplets at different positions is effectively solved, and the printing quality is improved.
[0019] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or understood by practicing the present invention. The purposes and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0020] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a schematic diagram of an embodiment of a UV printing method for a packaging box according to an embodiment of the present invention;
[0022] Figure 2 This is a schematic diagram of an embodiment of a UV printing device for a packaging box according to an embodiment of the present invention;
[0023] Figure 3 This is a schematic diagram of an embodiment of a UV printing device for a packaging box in an embodiment of the present invention. DETAILED DESCRIPTION
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0025] The terms "including," "having," and any variations thereof, as used in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to the process, method, product, or device.
[0026] To facilitate understanding of this embodiment, a UV printing method for a packaging box disclosed in an embodiment of the present invention is first introduced in detail. Figure 1 As shown, this method includes the following steps:
[0027] 101. Perform feature extraction on the CAD model data of the packaging box to obtain a feature data set of the packaging box;
[0028] It is understandable that the execution subject of the present invention can be a packaging box UV printing device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking the server as the execution subject as an example.
[0029] Specifically, geometric edge extraction is performed on the CAD model of the packaging box, using high-precision edge detection algorithms such as the gradient-based Canny algorithm or an adaptive edge detection method based on curvature changes. This ensures that the extracted edge contour data accurately reflects the actual geometry of the packaging box. After edge detection, the detected edge information is converted into a set of edge segments through vectorization, forming a structured data format. Intersection calculation is then performed on this set of edge segments to identify key corner points in the packaging box structure. This intersection calculation determines the intersection coordinates by solving a system of equations for the intersecting segments. Intersections are then screened based on the geometric characteristics of the packaging box to ensure that the retained corner points conform to the actual structural characteristics of the packaging box. For example, invalid intersections caused by CAD errors or edge detection noise are eliminated, while true corner points with strong geometric constraints are prioritized. After corner point screening, the connectivity between the corner points is analyzed to construct a complete corner topology. Curvature analysis and surface smoothness calculation are performed on the edge contour data to obtain material information about the packaging box surface. The core of curvature analysis lies in calculating the local and global curvature distribution of the edge curve, achieved through differential geometry methods. For example, curvature calculation formulas are used to quantify the curvature characteristics of different regions of the packaging box, thereby determining which areas are flat, which are curved, and which areas have large curvature variations. Surface smoothness calculation uses a method based on normal vector deviation. This method measures surface uniformity by calculating the rate of change of the local normal vector, thereby obtaining material uniformity data for the packaging box surface. UV printing resolution is optimized based on corner point position data and material uniformity data. Inkjet resolution parameters are adjusted based on material uniformity data. For example, a higher inkjet resolution is used for areas with high material uniformity, while a lower resolution is used for areas with low material uniformity to reduce print blur caused by ink diffusion. Inkjet resolution also needs to be optimized based on the packaging box's geometric characteristics. For example, inkjet density can be appropriately increased in areas with large edge curvature to ensure clear printed details. Furthermore, since UV inkjet technology relies on a UV light source for curing, and the reflective properties of UV light on different surface materials can affect the curing effect, the reflectance coefficient is spatially mapped to construct a reflection intensity distribution map for the UV printing area. The reflection coefficient is calculated based on the material's surface refractive index and surface roughness. Light modeling methods are used to simulate the reflection of UV light in different areas, resulting in a reflection intensity distribution map. Based on this reflection intensity distribution map, the UV light intensity compensation coefficient is calculated. This means that the UV light power is appropriately reduced in areas with strong reflections, while it is increased in areas with weaker reflections to ensure uniform UV ink curing and improve print quality. A complete feature dataset is constructed based on edge profile data, corner position data, inkjet resolution parameters, and reflection coefficients.
[0030] 102. Perform coordinate mapping on the robot workspace to obtain the conversion matrix between the visual coordinate system and the robot base coordinate system and the spatial calibration data of the UV nozzle installation position;
[0031] Specifically, a camera is used to photograph the calibration plate, and the feature point information on the calibration plate is extracted through image processing methods. The calibration plate adopts a regular checkerboard or dot array, and its corner points or feature points are extracted through a sub-pixel precision detection algorithm. Harris corner detection, SIFT or the sub-pixel corner detection method provided by OpenCV are used to obtain high-precision pixel coordinate data. At the same time, the feature point coordinates are optimized in combination with the sub-pixel interpolation algorithm so that the obtained corner point data can meet the accuracy requirements. The pixel coordinate data and sub-pixel coordinate data are calibrated with internal parameters. The camera's internal parameters include focal length, principal point coordinates, pixel scaling factor and distortion coefficient. These parameters are calculated using Zhang Zhengyou calibration method or least squares calibration method based on optimization iteration. The camera's projection model is constructed by using calibration plate images taken at multiple different angles and positions, and the camera's internal parameter matrix, i.e., focal length and principal point coordinates, is solved using the least squares optimization algorithm. Because industrial camera lenses exhibit radial and tangential distortion, a distortion coefficient matrix is calculated and a five-parameter model (k1, k2, p1, p2, k3) is used for distortion correction to eliminate curvature distortion of straight lines in the image. Based on the intrinsic parameter matrix and the distortion coefficient matrix, the camera's extrinsic calibration is performed to determine the camera's pose in the world coordinate system. The core of extrinsic calibration involves calculating the camera's rotation matrix and translation vector to establish a projection transformation matrix from the camera coordinate system to the world coordinate system. Using the PnP algorithm, the 3D physical coordinates of the calibration plate's corner points are matched to their corresponding image pixel coordinates, and the camera extrinsic parameters are optimized by minimizing the projection error. To improve calibration accuracy, nonlinear optimization methods, such as the Levenberg-Marquardt algorithm, are used to optimize the camera's spatial pose and obtain a projection transformation matrix. Based on the projection transformation matrix, the coordinates of the robot's end-point fiducials are transformed from the visual coordinate system to the robot's base coordinate system. A fiducial calibration tool of known dimensions, such as a cylindrical pin or a precisely marked fiducial block, is mounted on the robot end-point, and its pixel coordinate data is captured by the camera. Using a projection transformation matrix, these pixel coordinates are converted into three-dimensional spatial coordinates. A coordinate alignment algorithm is then used to calculate the transformation matrix between the visual coordinate system and the robot base coordinate system. This matrix, which includes a rotation matrix and a displacement vector, enables precise mapping from visual measurement coordinates to the robot base coordinates. The UV nozzle position is calibrated to calculate its offset relative to the robot's end flange. A multi-point sampling measurement method is used, measuring the spray center of the UV nozzle at different robot end positions. Based on the spatial distribution of these measurement points, the UV nozzle's installation offset vector relative to the robot end is calculated. Coordinate system compensation calculations are performed based on the transformation matrix and installation offset vector to obtain spatial calibration data for the UV nozzle installation position.
[0032] 103. Based on the transformation matrix and spatial calibration data, edge detection and feature point matching are performed on the packaging box to obtain the position coordinate data of the packaging box and the posture angle data of the UV printing area;
[0033] Specifically, multi-scale edge detection is performed on real-time image data of packaging boxes. Because the surface material, lighting conditions, and camera viewing angle of the packaging box can cause noise or weak edges during edge detection, a multi-scale edge detection method can extract edge information at different resolutions and filter scales, enhancing the robustness of edge detection. During this process, Canny edge detection combined with Gaussian pyramid filtering is used to extract edge points from coarse to fine levels, constructing a complete edge point set. Furthermore, to improve the reliability of edge information, an edge strength matrix is calculated to optimize the screening of weak and false edges in subsequent processing. Adaptive threshold segmentation is performed on the edge point set to dynamically adjust the edge detection threshold, ensuring accurate extraction of key edges even in complex lighting environments. Morphological processing methods are used to optimize the edge data, including dilation, erosion, and closing operations, to remove isolated points and fill broken edges, resulting in a refined edge contour and contour segment data for the packaging box. Based on the refined edge contour, feature point extraction and descriptor calculation are performed to obtain a set of key feature points for the packaging box. During feature extraction, computer vision algorithms such as SIFT (Scale-Invariant Feature Transform), SURF (Speeded Up Robust Features), and ORB (Rapid Oriented Binary Descriptors) are used to extract stable key points on the box and calculate their feature descriptors. The feature point set of the real-time image data is matched with the feature data set extracted from the CAD model data, and the actual pose of the box is determined using the feature point correspondence matrix. A feature point filtering algorithm using nearest neighbor search or RANSAC (Random Sample Consensus) is used to remove incorrect matches and obtain a high-precision feature point correspondence matrix. This matrix describes the spatial mapping between feature points in the real-time image data and predefined feature points in the CAD data. Based on the feature point correspondence matrix and the transformation matrix, a 3D pose solution is performed to determine the box's position coordinates. During this process, the PnP (Perspective-n-Point) algorithm is used to determine the transformation between the camera coordinate system and the box coordinate system, thereby obtaining the box's precise position in the visual coordinate system. At the same time, combining the transformation matrix between the robot base coordinate system and the visual coordinate system, the packaging box's position data is converted to the robot base coordinate system to ensure that the UV inkjet trajectory calculation is based on the correct spatial reference coordinates. A spatial projection transformation is performed based on the position coordinate data and spatial calibration data to obtain the attitude and angle data of the UV printing area. Using the known UV nozzle installation offset vector and the packaging box's position data, the normal vector of the packaging box's surface is solved, and the optimal inkjet angle of the UV nozzle is calculated to ensure uniform ink adhesion and achieve optimal curing effect. The attitude and angle data of the UV printing area are obtained.
[0034] 104. Perform multi-segment trajectory planning on the inkjet trajectory based on the position coordinate data and the attitude angle data to obtain initial printing trajectory control data that meets the UV ink droplet jetting spacing requirements;
[0035] Specifically, the UV printing area is discretized into a grid, converting the continuous printing area into regular dot matrix data. Adaptive meshing is used to adjust the grid cell size based on the packaging box's geometric characteristics, UV ink droplet diffusion characteristics, and printing accuracy requirements to ensure uniform distribution of the printed dot matrix data. After meshing, a suitable printing path is calculated based on the grid cell arrangement. The path is segmented to generate a sequence of segmented trajectories and the connection point data between each segment. This ensures that the printing path covers the entire UV printing area and reduces printing defects caused by path discontinuities. Motion interpolation is performed by combining the trajectory connection point data with the packaging box's posture angle data to obtain the velocity and acceleration trajectory data required by the UV nozzle throughout the printing process. Because the UV nozzle's motion must conform to certain dynamic characteristics while ensuring velocity stability during inkjet printing, the trajectory is smoothed using quintic B-spline interpolation or cubic spline interpolation to optimize the velocity and acceleration transitions at each injection point, preventing sudden changes or vibrations during printing. Taking into account the curvature of the packaging surface, the printhead's motion parameters are dynamically adjusted when printing on curved or irregular surfaces, ensuring precise ink droplet placement and avoiding droplet drift or blurred prints due to changes in attitude angle. Dynamic constraint optimization is performed on the velocity and acceleration trajectory data to ensure that the printhead's motion complies with the actual device's mechanical properties and the responsiveness of the jetting system. The maximum acceleration and maximum velocity of the UV printhead, as well as the trigger timing constraints of the inkjet system, are analyzed. Then, an optimization algorithm is used to constrain the velocity and acceleration trajectories, ensuring that the motion trajectory meets the required printing accuracy while remaining within the dynamic performance limits of the printhead. The optimized trajectory data is used to calculate the inkjet timing data, determining the ejection time point along each print path to ensure synchronization with the printhead's motion trajectory. To optimize inkjet quality, the segmented trajectory sequence undergoes spacing equalization. This involves adjusting the printpoint positions based on the inkjet timing data to ensure uniform spacing between inkdroplets, thus avoiding streaking or overlapping prints caused by uneven ejection spacing. The trajectory fitting calculation is performed according to the ink droplet ejection position sequence and UV printing dot matrix data to obtain the initial printing trajectory control data that meets the printing requirements.
[0036] 105. Perform UV light source synchronization control calculation based on the initial printing trajectory control data to obtain UV light source power modulation parameters and UV light source triggering timing data.
[0037] Specifically, the initial printing trajectory control data is subjected to trajectory segment analysis and time-series discretization to calculate the UV printing discrete point sequence and ink droplet deposition time data. The continuous printing trajectory is divided into a series of discrete printing points, and the specific injection time of each ink droplet is determined using a time discretization method. This process combines the nozzle's motion speed, injection frequency, and the physical properties of the UV ink to ensure uniform distribution of the printing points and that the inkjet process is strictly synchronized with the UV light source's curing rhythm. The spatial distance matrix between adjacent ink droplets is calculated based on the UV printing discrete point sequence to determine the overlap rate of the UV curing area. Because UV inkjet printing requires multiple injections to cover the entire printing area, the distance and arrangement between adjacent ink droplets directly affect the UV curing effect. By calculating the ink droplet distribution matrix in space, the ink droplet coverage in different areas is analyzed, and any light overlap issues during the UV curing process are identified. Using the Euclidean distance calculation method, combined with the printing grid data, the average spacing between adjacent ink droplets is calculated and the overlap of the UV curing area is analyzed to ensure that the final print quality is not affected by excessive or insufficient UV energy concentration during the curing process. The light source energy distribution is calculated based on UV curing area overlap data to determine the spot coverage parameters and UV energy density data. The UV light source's energy distribution is affected by the source power, spot shape, and beam divergence angle. When calculating the light source energy distribution, a UV illumination model is established to simulate the UV light source's energy attenuation at different distances. Combined with the print point layout, the UV energy reception of each ink droplet is calculated. The spot coverage parameter calculation takes into account the light source's illumination angle and beam diffusion characteristics to ensure that the spot covers all ink droplet areas requiring curing without causing over- or underexposure. Furthermore, the UV energy density data is calculated based on the ink droplet deposition position and curing time requirements to ensure that the UV light energy is evenly distributed across the entire print area, ensuring sufficient curing without incomplete curing due to insufficient energy or over-curing or material damage due to excessive energy. The spot coverage parameters and ink droplet deposition time data are simultaneously optimized to generate the UV light source trigger timing data. Using a time-synchronized control algorithm, the on- and off-times of the light source are optimized to match the inkjet printing rhythm, and the triggering moment of the light source can be dynamically adjusted according to the UV energy requirements of different areas. Power compensation calculations are performed based on UV energy density data and UV curing area overlap data to adjust the power output of the UV light source. A PID control algorithm or a neural network-based adaptive power regulation algorithm is used to dynamically adjust the output power of the UV light source to achieve the most appropriate energy level in different curing areas, thereby ensuring the uniformity and stability of the UV curing process. UV light source trigger timing data and power modulation parameters are obtained.
[0038] The spot coverage parameters are spatially discretized to construct UV spot grid data and spot center coordinate data. UV light sources use collimating lenses or focusing optical systems to form the spot. The irradiation range is affected by the light source power, beam divergence angle, and the shape of the inkjet area. When calculating the spot grid data, the spot energy distribution is modeled, and a gridding method is used to decompose the entire irradiation area into multiple discrete grid cells, accurately characterizing the UV light source's irradiation intensity distribution at different locations. Simultaneously, the spot center coordinate data is aligned with the printing area to ensure that the spatial distribution of the light source covers all ink droplet locations that need to be cured, thereby avoiding blind spots or energy waste. A spatiotemporal registration calculation is performed based on the UV spot grid data and ink droplet deposition time data to determine the correspondence matrix between the spot and ink droplet, as well as the time delay parameters. Because the UV light source irradiation process and the inkjet process are temporally asynchronous, the calculation needs to consider the motion characteristics of the inkjet trajectory, the movement speed of the spot, and the optimal curing time window. By establishing a spatiotemporal registration model and analyzing the relationship between ink droplet deposition and light source illumination, the time delay parameter between each spot grid cell and the corresponding ink droplet is calculated. Based on this parameter, the light source triggering sequence is adjusted to ensure optimal synchronization of UV curing. Light intensity distribution is calculated based on the position correspondence matrix to obtain the UV light source's illumination intensity distribution map and energy accumulation curve data. This intensity distribution is calculated using a Gaussian spot model or a Lambertian radiation model to simulate the energy attenuation of the UV light source at different angles and distances. The light intensity is then numerically calculated based on the spot grid data. By constructing a UV illumination intensity distribution map, the energy distribution of the light source across the entire printing area is analyzed. The energy accumulation curve data is then used to determine whether the UV energy in different areas meets the curing requirements. Low UV energy in certain areas results in incomplete curing, while high energy results in overcuring. Therefore, the core goal of the light intensity distribution calculation is to ensure uniform UV energy distribution across all printing areas and meet curing process requirements. The triggering sequence is optimized based on the time delay parameters and energy accumulation curve data to generate UV light source triggering timing data. During the optimization process, the on and off times of the light source are adjusted based on the time delay parameters to ensure that the UV curing process does not affect the normal deposition and diffusion of the ink droplets. The acceleration and speed changes of the inkjet trajectory are comprehensively considered to ensure that the trigger frequency of the UV light source can adapt to the changes in different speed ranges during the printing process, thereby avoiding the problem of uneven curing caused by the mismatch between the light source trigger time and the ink droplet position. Energy compensation calculations are performed based on UV energy density data and UV curing area overlap rate data to optimize the power output of the UV light source. During the UV curing process, due to the overlapping areas in the spatial distribution of the light spots, the energy accumulation effect between adjacent light spots will affect the curing quality.To ensure the uniformity of UV energy, the energy contribution of each light spot is calculated, and the power distribution of the UV light source in different areas is adjusted through the energy compensation algorithm so that the UV irradiation energy can be evenly distributed throughout the entire printing area. The calculation of the energy distribution weight needs to be combined with the spatial distribution of the ink droplets to ensure that each printing point can obtain sufficient UV energy, thereby avoiding incomplete curing caused by insufficient local energy. The power compensation coefficient and energy distribution weight are numerically optimized using nonlinear optimization methods such as gradient descent or genetic algorithms to minimize the unevenness of the UV energy distribution and ensure that the power output of the UV light source meets the optimal settings of the printing process, thereby obtaining the UV light source power modulation parameters.
[0039] In an embodiment of the present invention, by performing feature extraction and edge detection on the CAD model data of the packaging box, combined with machine vision technology, the precise positioning and posture recognition of the packaging box are achieved, effectively avoiding positioning deviations during the printing process. A multi-segment trajectory planning method is adopted, and the uniformity of the ink droplet spacing and the consistency of the curing effect are ensured through dynamic optimization of the inkjet trajectory and synchronous control of the UV light source. An accurate conversion relationship between the visual coordinate system and the robot base coordinate system is established, which realizes high-precision calibration of the UV nozzle position and improves the spatial positioning accuracy of the printing system. By calculating the overlap rate and energy density distribution of the UV curing area in real time, the power output and trigger timing of the UV light source are dynamically adjusted to achieve uniform curing of the ink droplets. Based on the synchronous optimization of the spot coverage range parameters and the ink droplet deposition time data, the precise coordination of the UV light source and the inkjet system is achieved, ensuring the stability of the printing quality. By real-time compensation of the UV light source power and optimized calculation of energy distribution, the problem of uneven curing of ink droplets at different positions is effectively solved, and the printing quality is improved.
[0040] In a specific embodiment, the process of executing step 101 may specifically include the following steps:
[0041] Perform geometric edge extraction on the CAD model data of the packaging box to obtain the edge contour data and edge segment set of the packaging box;
[0042] Calculate the intersection points and filter the feature points of the edge segment set to obtain the corner point position data and corner point connection relationship data of the packaging box;
[0043] Perform curvature analysis and surface smoothness calculation on edge profile data to obtain the reflection coefficient and material uniformity data of the packaging box surface;
[0044] Printing resolution is optimized based on corner point position data and material uniformity data to obtain the inkjet resolution parameters of the UV printing area. The reflection coefficient is spatially mapped to obtain the reflection intensity distribution map and light intensity compensation coefficient of the UV printing area.
[0045] A feature data set is constructed based on edge contour data, corner point position data, inkjet resolution parameters and reflection coefficient.
[0046] Specifically, the CAD model is parsed to obtain the geometric contour information of the packaging box. The edge detection of the CAD data of the packaging box is performed using a gradient operator method (such as Sobel, Prewitt, or Canny) to obtain the edge contour data of the packaging box. Assuming that the CAD model is stored in a vector format, its edge segment set is directly extracted through geometric calculations. Assume Represents a set of edge segments, where each segment From the starting point coordinates and the end point coordinates Indicates that:
[0047]
[0048] Calculate the intersection of the edge line segments to identify the corner points of the packaging box. Solve the intersection of two line segments. If the two line segments and Endpoints , as well as , If , then the intersection point is obtained by solving the linear equations. The equation is:
[0049]
[0050] The slope ,intercept . Similarly, the line segment The equation is:
[0051]
[0052] The intersection By solving the following system of equations:
[0053]
[0054]
[0055] All the intersection points obtained constitute the corner point position data set , and calculate the connection relationship of the corner points, that is, determine which corner points are connected by edge segments, so as to build a complete topological structure of the packaging box. Perform curvature analysis on the edge contour data to calculate the geometric characteristics of the packaging box surface. The curvature calculation is completed by the curve differential geometry method. For the two-dimensional contour curve , curvature Defined as:
[0056]
[0057] in, is the second-order derivative, For three-dimensional surfaces, the principal curvature is calculated by the principal curvature calculation method. :
[0058]
[0059] in is the mean curvature, is Gaussian curvature. These curvature data are used to determine the surface flatness of the packaging box and to optimize the inkjet quality. When calculating the surface curvature, the surface smoothness is also calculated to obtain the uniformity data of the packaging box material. The surface smoothness is measured by the normal vector change rate. Let the surface normal vector be , then the smoothness is defined as:
[0060]
[0061] in, is the surface area, is the gradient of the normal vector, The smaller the value, the smoother the surface, and vice versa. By calculating the surface smoothness, the inkjet resolution of the UV printing area is optimized to adapt it to different surface materials. The printing resolution is optimized based on the corner position data and material uniformity data to ensure that the accuracy of UV inkjet is consistent in different areas. Inkjet resolution parameters Defined as:
[0062]
[0063] in, is the base resolution, is the surface smoothness, To optimize the weight factor. For smooth areas, the resolution is kept high, while for rough areas, the resolution is appropriately reduced to reduce the unevenness of ink droplet diffusion. The reflection coefficient is spatially mapped to obtain the reflection intensity distribution map of the UV printing area. Calculated by the lighting model, for example, using the Lambert reflection model:
[0064]
[0065] in, is the surface reflectivity, is the angle of incidence, is the distance between the light source and the surface. According to the spatial distribution of the reflection coefficient, the light intensity compensation coefficient is calculated. :
[0066]
[0067] in, is the target light intensity, The UV light source's irradiation power is dynamically adjusted based on the currently measured light intensity to optimize the curing effect. A complete feature dataset is constructed by integrating edge profile data, corner position data, inkjet resolution parameters, and reflectance coefficient.
[0068] In a specific embodiment, the process of executing step 102 may specifically include the following steps:
[0069] Perform feature point detection and extraction on the calibration plate image captured by the camera to obtain pixel coordinate data and sub-pixel coordinate data of the calibration plate corner points;
[0070] Perform intrinsic calibration calculation on pixel coordinate data and sub-pixel coordinate data to obtain the camera's intrinsic parameter matrix and distortion coefficient matrix. Then, perform spatial pose optimization based on the intrinsic parameter matrix and distortion coefficient matrix to obtain the camera's extrinsic parameter matrix and projection transformation matrix.
[0071] Based on the projection transformation matrix, the coordinates of the robot end reference point are transformed to obtain the conversion matrix between the visual coordinate system and the robot base coordinate system. The position of the UV nozzle relative to the robot end is measured by multi-point sampling to obtain the installation offset vector of the UV nozzle.
[0072] The coordinate system compensation calculation is performed based on the transformation matrix and the installation offset vector to obtain the spatial calibration data of the UV nozzle installation position.
[0073] Specifically, a high-precision calibration plate is used for image acquisition, and a computer vision algorithm is used to extract the pixel coordinate data and sub-pixel coordinate data of the corner points of the calibration plate. The calibration plate adopts a checkerboard or dot array pattern with a regular geometric structure, and the Harris corner detection function is used for feature point detection. Assume that the number of corner points on the calibration plate is , then the pixel coordinate dataset is expressed as:
[0074] ;
[0075] in, Respectively represent The pixel coordinates of the corner points are obtained by using the sub-pixel precision method. By performing quadratic interpolation fitting in the local area, the accuracy of the corner point coordinates is improved to the decimal level, thereby obtaining more accurate sub-pixel coordinate data. The pixel coordinate data and sub-pixel coordinate data are calibrated with internal parameters to calculate the camera's intrinsic parameter matrix and distortion coefficient matrix. The camera's imaging model is represented by the perspective projection equation, that is, the three-dimensional world coordinate Transform to 2D pixel coordinates through camera projection The relationship is expressed as:
[0076]
[0077] in, is the normalization factor, is the camera's intrinsic parameter matrix, including the focal length and principal point coordinates :
[0078]
[0079] The distortion coefficient matrix is used to describe lens distortion, including radial distortion coefficients and tangential distortion coefficient :
[0080]
[0081] These parameters are calibrated using nonlinear optimization methods (such as the Levenberg-Marquardt algorithm) to minimize the projection error, that is, to optimize the objective function:
[0082]
[0083] in, is the real pixel coordinate, is the pixel coordinate after projection transformation. After completing the intrinsic parameter calibration, calculate the camera's extrinsic parameter matrix, that is, the rotation matrix and translation vectors , used to describe the position relationship of the camera coordinate system relative to the world coordinate system. The external parameter matrix is solved by solving the PnP (Perspective-n-Point) problem, that is, by at least 4 three-dimensional physical coordinate points The corresponding two-dimensional pixel coordinate point Come to solve :
[0084]
[0085] The RANSAC algorithm is used to remove abnormal matching points, and the least squares optimization method is used to obtain the optimal solution, and finally the camera projection transformation matrix is obtained:
[0086]
[0087] Using this projection transformation matrix, the coordinates of the robot end reference point are transformed from the world coordinate system to the camera coordinate system and then to the robot base coordinate system. Assume that the position of the robot end reference point in the world coordinate system is , then its projection in the camera coordinate system is:
[0088]
[0089] Through the coordinate transformation relationship matrix between the robot and the camera (Transformation matrix from visual coordinate system to robot base coordinate system), and obtain the reference point position in the robot base coordinate system:
[0090]
[0091] The spatial position of the UV nozzle is measured at multiple points to obtain its installation offset vector relative to the end of the robot. Assume that the actual injection point coordinates of the UV nozzle are , and the coordinates of the calibration point at the end of the robot are , then the installation offset vector of the UV nozzle is Expressed as:
[0092]
[0093] In order to improve the measurement accuracy, the measurement is performed in multiple different robot postures, and the offset vector is optimized by the least square method to reduce the measurement deviation caused by mechanical installation errors. and the installation offset vector of the UV nozzle Perform coordinate system compensation calculation to obtain the spatial calibration data of the UV nozzle. This compensation data is used to correct the robot printing trajectory to ensure the accuracy of the inkjet path. Assume that the desired injection position of the UV nozzle is , then the final injection coordinates after compensation are:
[0094]
[0095] In a specific embodiment, the process of executing step 103 may specifically include the following steps:
[0096] Perform multi-scale edge detection on the real-time image data of the packaging box to obtain the edge point set and edge intensity matrix of the packaging box. Then perform adaptive threshold segmentation and morphological processing on the edge point set to obtain the refined edge contour and contour segment data of the packaging box.
[0097] Based on the refined edge contour, feature point extraction and descriptor calculation are performed to obtain the feature point set of real-time image data. Matching calculation is performed based on the feature point set and the feature data set to obtain the feature point correspondence matrix;
[0098] The three-dimensional pose is solved based on the feature point correspondence matrix and the transformation matrix to obtain the position coordinate data of the packaging box;
[0099] The spatial projection transformation is performed according to the position coordinate data and the spatial calibration data to obtain the posture angle data of the UV printing area.
[0100] Specifically, high-precision computer vision methods are used to process images of packaging boxes. Multi-scale edge detection methods are used to extract edge features at different scales to improve detection robustness. During edge detection, a Gaussian filter function is applied to smooth the image to reduce noise interference:
[0101]
[0102] in, is the Gaussian kernel function, Is a smoothing parameter that controls the scale of the filter. Then the Canny edge detection algorithm is used to detect the edge of the box. The core of the algorithm is to calculate the gradient of the image and use non-maximum suppression and double threshold processing to enhance the edge contrast. Suppose the original image is , then its gradient amplitude and gradient direction The calculation is as follows:
[0103]
[0104]
[0105] in, and The images are and After edge detection, we get the edge point set of the packaging box. and the edge strength matrix , which represents the edge strength of different pixels in the image. In order to optimize the edge detection results, the edge point set is segmented by adaptive threshold, that is, the edge detection threshold is dynamically adjusted according to the gradient change of local pixels. :
[0106]
[0107] in, is the scale factor, take . Use morphological processing methods (such as expansion, corrosion, opening and closing operations) to optimize edge data to eliminate isolated points and broken edges and obtain refined edge contours. and a collection of contour segments . Feature point extraction and descriptor calculation are performed based on the refined edge contour to match the feature points of the packaging box in the image with the feature point set of the CAD reference data. In the feature point extraction process, SIFT (Scale Invariant Feature Transform) or ORB (Rapid Binary Descriptor) algorithm is used to extract a stable feature point set on the surface of the packaging box. The core of SIFT feature point extraction is to construct a Gaussian scale space and find extreme points at different scales. Assume that the input image is , then its scale space is expressed as:
[0108]
[0109] in, is the Gaussian kernel, Represents the convolution operation. The extreme points in the scale space are calculated by the DOG (Difference of Gaussian) operator:
[0110]
[0111] After finding the extreme point, calculate the key point descriptor and generate the feature point set ,in It is a 128-dimensional SIFT descriptor. These feature points are matched with the feature data set of the CAD model, and the nearest neighbor search (KNN) or FLANN matching algorithm is used to solve the feature point correspondence matrix. :
[0112]
[0113] in, and Represents the matching pairs of feature points in the image and CAD reference feature points respectively. Based on the feature point correspondence matrix and the transformation matrix , perform three-dimensional pose calculation to obtain the position coordinate data of the packaging box. Feature point matching forms a set of spatial point pairs, and the PnP (Perspective-n-Point) method is used to calculate the rotation matrix of the packaging box relative to the camera. and translation vectors ,Right now:
[0114]
[0115] in, is the position of the CAD reference feature point in the world coordinate system, are the pixel coordinates in the image, is the camera intrinsic parameter matrix. Solved to get and Finally, calculate the position of the box in the robot coordinate system:
[0116]
[0117] in, is the transformation matrix from the visual coordinate system to the robot base coordinate system. and spatial calibration data , perform spatial projection transformation to obtain the attitude angle data of the UV printing area. Assume that the UV nozzle installation offset is , then the final pose of the UV printing area is:
[0118]
[0119] The attitude angle data is obtained by the rotation matrix Convert to Euler angles To facilitate robot control:
[0120]
[0121] In this embodiment, adaptive threshold segmentation and morphological processing are performed on the edge point set to obtain refined edge contour and contour line segment data of the packaging box, including: estimating Laplace distribution parameters of the edge point set to obtain position parameters and scale parameters; constructing a probability density function based on the position parameters and scale parameters to obtain a distribution model and noise characteristic parameters of the edge points; performing Gaussian scale mixture decomposition on the distribution model to obtain a mixture weight coefficient and a scale factor matrix; performing variational Bayesian inference based on the mixture weight coefficient and the scale factor matrix to obtain a posterior probability distribution and model parameter estimates; performing reliability assessment on the edge points based on the posterior probability distribution to obtain confidence data and outlier markers of the edge points; performing threshold adaptive calculation based on the confidence data and noise characteristic parameters to obtain a dynamic segmentation threshold and region growing parameters; performing morphological filtering on the outlier markers to obtain edge connectivity indicators and region consistency data; performing edge extraction operations based on the dynamic segmentation threshold and region growing parameters to obtain refined edge contour and contour line segment data of the packaging box.
[0122] Among them, the three-dimensional pose is solved based on the feature point correspondence matrix and the transformation matrix to obtain the position coordinate data of the packaging box, including: performing eigenvector decomposition operation on the feature point correspondence matrix to obtain the feature point spatial distribution weight and the main direction vector; screening and grouping the feature points according to the feature point spatial distribution weight to obtain the valid feature point set and feature point clustering data; performing homography matrix calculation based on the valid feature point set and the transformation matrix to obtain the projection transformation matrix from the two-dimensional image plane to the three-dimensional space; performing RANSAC algorithm optimization on the valid feature point set to obtain the geometric consistency constraint parameters and the outlier removal result; performing PnP solution operation based on the projection transformation matrix and the geometric consistency constraint parameters to obtain the rotation matrix and translation vector of the packaging box; performing quaternion decomposition calculation on the rotation matrix to obtain the posture angle parameters and rotation axis vector of the packaging box; performing coordinate transformation calculation based on the translation vector and the main direction vector to obtain the position coordinates of the packaging box in the robot base coordinate system; performing coordinate system alignment operation based on the posture angle parameters and the position coordinates to obtain the position coordinate data of the packaging box.
[0123] Specifically, a spatial projection transformation is performed according to the position coordinate data and the spatial calibration data to obtain the posture angle data of the UV printing area, including: performing a coordinate system conversion calculation on the position coordinate data to obtain the relative position matrix and posture matrix of the packaging box in the UV nozzle coordinate system; performing deviation compensation on the relative position matrix based on the spatial calibration data to obtain the spatial position vector of the UV nozzle relative to the packaging box surface; performing Euler angle decomposition operation on the posture matrix to obtain the inclination angle data and normal vector data of the packaging box surface; performing vertical distance calculation according to the normal vector data and the spatial position vector to obtain the height parameter and angle deviation data from the UV nozzle to the printing surface; performing boundary extraction on the UV printing area based on the inclination angle data to obtain the contour point set and the coordinates of the area center of the printing area; performing principal component analysis operation on the contour point set to obtain the major axis direction vector and minor axis direction vector of the printing area; performing posture compensation calculation according to the major axis direction vector and the angle deviation data to obtain the correction angle data of the UV printing area; performing spatial relationship matrix calculation based on the correction angle data and the height parameter to obtain the posture angle data of the UV printing area.
[0124] In a specific embodiment, the process of executing step 104 may specifically include the following steps:
[0125] The UV printing area is discretized into a grid to obtain UV printing dot matrix data and grid unit division data, and the printing path segmentation calculation is performed based on the grid unit division data to obtain the segmented trajectory sequence and trajectory connection point data;
[0126] Perform motion interpolation calculation based on the trajectory connection point data and posture angle data to obtain the speed trajectory data and acceleration trajectory data of the UV nozzle;
[0127] The velocity trajectory data and acceleration trajectory data are dynamically constrained and optimized to obtain the ejection timing data of the UV nozzle. Based on the ejection timing data, the segmented trajectory sequence is evenly spaced to obtain the ink droplet ejection position sequence.
[0128] The trajectory fitting calculation is performed according to the ink droplet ejection position sequence and UV printing dot matrix data to obtain the initial printing trajectory control data.
[0129] Specifically, the UV printing area is spatially divided so that the entire printing area can be evenly covered while ensuring the rationality and continuity of the inkjet trajectory. In this process, the grid discretization method is used to divide the printing area into regular unit grids. The size of each grid unit is determined by the jet resolution of the nozzle and the ink droplet diffusion characteristics. Assume that the total width and height of the printing area are and , then the grid unit is divided by the grid spacing Calculate the number of grids :
[0130]
[0131] in, Determined by the minimum jetting resolution of the UV nozzle, that is, it must be ensured that the ink droplets in adjacent grid cells do not overlap or have gaps. For each grid cell, define the coordinates of its center point , forming a printing dot matrix data set:
[0132]
[0133] The printing path is calculated based on the grid unit division data and the trajectory is segmented. Path planning methods include line scanning, serpentine path, and contour following. For UV printing in regular rectangular areas, a serpentine path is used to optimize printing efficiency, reducing the number of emergency stops of the UV print head during line changes, thereby improving the stability of printing. Suppose the number of segments of the printing path is , then the segmented trajectory sequence ( ) is calculated as:
[0134]
[0135] At the same time, between every two segmented tracks, define the track connection point data , to ensure the continuity of the UV nozzle when switching track segments, namely:
[0136]
[0137] After obtaining the segmented trajectory data, combine the trajectory connection point data and attitude angle data Perform motion interpolation calculation to obtain the velocity trajectory data and acceleration trajectory data of the UV nozzle. Assume that the motion time of the UV nozzle on a certain trajectory segment is , its location Expressed as a cubic spline interpolation function:
[0138]
[0139] Speed trajectory and acceleration trajectory By taking the derivative of the position function we get:
[0140]
[0141]
[0142] In order to ensure that the inkjet quality is not affected by the nozzle being too fast or too slow during movement, the velocity trajectory and acceleration trajectory are dynamically constrained and optimized. Assuming that the maximum allowable acceleration of the UV nozzle is The maximum permissible speed is , then the optimization constraints are:
[0143]
[0144] Adopting the quadratic programming optimization method, the dynamic constraints are satisfied and the The value of is set to ensure that the printing trajectory is smooth and conforms to the motion characteristics of the UV nozzle. After completing the dynamic optimization, calculate the injection timing data of the UV nozzle. The injection timing is closely related to the motion state of the nozzle. Assume that the ink droplet injection interval is , then the injection time point Calculated from the position and speed of the UV nozzle:
[0145]
[0146] in, is the spatial distance between adjacent printing points, For the nozzle In order to ensure uniform distribution of ink droplets, after the injection timing is calculated, the segmented trajectory is processed to make the position sequence of the injection point uniform. With equal spacing:
[0147]
[0148] in, Represents the Euclidean distance between adjacent ink droplets. Based on the optimized ink droplet ejection position sequence and UV printing dot matrix data, trajectory fitting calculation is performed to generate the initial printing trajectory control data that meets the UV printing requirements. The goal of trajectory fitting is to ensure the smoothness of the inkjet path while ensuring that the ink droplets can accurately cover the entire UV printing area. The spline curve fitting method is used to make the printing trajectory smoother. Assuming the fitting trajectory Represented by a Bezier curve, then:
[0149]
[0150] in, is the Bernstein polynomial:
[0151]
[0152] Bezier curve control points It is determined by the ink droplet ejection point after uniformization to ensure that the printing trajectory meets the actual process requirements.
[0153] Among them, the velocity trajectory data and the acceleration trajectory data are dynamically constrained to obtain the injection timing data of the UV nozzle, and the segmented trajectory sequence is evenly spaced based on the injection timing data to obtain the ink droplet injection position sequence, including: performing maximum speed limit analysis on the velocity trajectory data to obtain the velocity constraint threshold and the acceleration smoothing coefficient; performing dynamic characteristic calculation based on the acceleration trajectory data to obtain the jerk curve and mechanical vibration frequency data of the UV nozzle; performing motion stability analysis based on the jerk curve and the mechanical vibration frequency data to obtain the nozzle jitter amplitude and stability evaluation parameters; performing frequency domain filtering on the nozzle jitter amplitude to obtain the stable motion range and speed switching point data of the UV nozzle; performing time series planning based on the speed constraint threshold and the stable motion range to obtain the injection timing data of the UV nozzle; performing equal time interval sampling on the segmented trajectory sequence according to the injection timing data to obtain the initial injection point sequence; performing spatial position compensation based on the initial injection point sequence and the velocity switching point data to obtain the compensated injection position data; performing equal spacing optimization calculation on the compensated injection position data to obtain the ink droplet injection position sequence.
[0154] In a specific embodiment, the process of executing step 105 may specifically include the following steps:
[0155] The initial printing trajectory control data is subjected to trajectory segment analysis and time series discretization processing to obtain the UV printing discrete point sequence and ink drop deposition time data;
[0156] The spatial distance matrix between adjacent ink droplets is calculated based on the UV printing discrete point sequence to obtain the UV curing area overlap rate data;
[0157] Calculate the light source energy distribution based on the UV curing area overlap rate data to obtain the light spot coverage parameters and UV energy density data;
[0158] The spot coverage parameters and ink droplet deposition time data are synchronously optimized to obtain the UV light source trigger timing data. Power compensation calculation is performed based on the UV energy density data and UV curing area overlap rate data to obtain the UV light source power modulation parameters.
[0159] Specifically, the initial printing trajectory control data is analyzed by trajectory segment, and through time series discretization processing, the UV printing discrete point sequence and the deposition time data of each ink droplet are obtained. In this process, the printing trajectory is composed of a series of spatial points. The printing path is assumed to be a three-dimensional curve. ,in is a time variable. In order to discretize the trajectory, according to the printing resolution Perform equal-interval sampling to obtain a discrete point sequence:
[0160]
[0161] in, is the total number of printing points, Representing ink droplets The deposition time of the printing is determined by the spray frequency of the UV nozzle. And the actual movement speed of the nozzle Together, the deposition time of each ink droplet is expressed as:
[0162]
[0163] After obtaining the sequence of printed discrete dots, the spatial distance matrix between adjacent ink droplets is calculated to analyze the overlap of UV curing areas. and The Euclidean distance between :
[0164]
[0165] According to the spray diameter of the UV nozzle and the diffusion radius of UV ink , calculate the overlap rate of adjacent ink droplets :
[0166]
[0167] when When , it means that the adjacent ink droplets completely overlap, and when When there is a gap between adjacent ink droplets, adjust the printing spacing. To ensure reasonable curing quality. Based on the overlap rate data of the UV curing area, the energy distribution of the UV light source is calculated to ensure that each ink droplet receives the appropriate amount of UV energy so that it is fully cured without overexposure. The energy density of the UV light source is affected by the spot size, light source power and illumination time. Assume that the power of the UV light source is , the distance from the light source to the printing surface is , the radius of the spot is , then the UV energy density at the center of the spot is Expressed as:
[0168]
[0169] in, is the attenuation parameter of UV light in air. The coverage of UV spot is determined by the light intensity threshold. It is determined that the energy distribution at the edge of the spot satisfies the Gaussian function:
[0170]
[0171] in, is the light spot diffusion parameter. By integrating the light intensity, the effective coverage of the light spot is calculated. :
[0172]
[0173] Calculate UV energy density data based on spot coverage and ink droplet deposition position :
[0174]
[0175] in, To cover If Below the curing threshold , then you need to increase the lighting time, otherwise, if If it is too high, the light source power needs to be reduced. After calculating the UV energy density distribution, the spot coverage parameters and ink drop deposition time data are optimized synchronously to ensure that the trigger time of the UV light source matches the inkjet process. Assume that the trigger time of the UV light source is , the printing timing data is , then the goal of trigger timing optimization is to minimize the time error:
[0176]
[0177] During the optimization process, the PID control algorithm is used to dynamically adjust the triggering time of the UV light source to match the inkjet path. Assume that the UV light source triggering time adjustment amount is ,but:
[0178]
[0179] in, It is a PID control parameter. Based on the UV energy density data and UV curing area overlap rate data, power compensation calculation is performed to ensure that the energy of the UV light source is evenly distributed in different areas. Power compensation coefficient From the current energy density With target energy density Calculation yields:
[0180]
[0181] if , indicating that the UV energy in the current area is insufficient, then increase the light source power or increase the exposure time; if , indicating that the energy is too high, the light source power needs to be reduced. Based on all the calculation results, the power modulation parameters of the UV light source are optimized. :
[0182]
[0183] Among them, the spatial distance matrix between adjacent ink droplets is calculated according to the UV printing discrete point sequence to obtain the UV curing area overlap rate data, including: performing spatial coordinate transformation on the UV printing discrete point sequence to obtain the three-dimensional position data and point set topological structure of the ink droplet center point; constructing a K nearest neighbor search tree based on the three-dimensional position data to obtain the index relationship matrix and distance calculation parameters of adjacent ink droplets; performing connectivity analysis on the index relationship matrix to obtain the adjacency matrix and path connection data of the ink droplet connection graph; performing overlapping area calculation according to the distance calculation parameters and the ink droplet diffusion radius to obtain the intersection area data between the ink droplets; performing regional segmentation operation based on the intersection area data to obtain the boundary contour and area statistical data of the UV curing area; performing morphological processing on the boundary contour to obtain the geometric feature parameters and coverage index of the overlapping area; performing normalization calculation according to the coverage index and area statistical data to obtain the numerical distribution of the regional overlap rate; performing spatial interpolation operation based on the numerical distribution and path connection data to obtain the UV curing area overlap rate data.
[0184] In this embodiment, light source energy distribution calculation is performed based on UV curing area overlap rate data to obtain spot coverage range parameters and UV energy density data, including: spatial grid division of the UV curing area overlap rate data to obtain grid unit data and node position matrix of the overlapping area; light intensity distribution model is established based on the grid unit data to obtain Gaussian distribution parameters and energy attenuation coefficient of the UV light source; projection angle of the UV light source to the curing surface is calculated according to the node position matrix to obtain a spot projection transformation matrix and an effective irradiation range; energy density mapping is performed on the spot projection transformation matrix to obtain an energy distribution function and an irradiation intensity diagram of the UV light source; superposition calculation is performed based on the energy distribution function and overlap rate data to obtain a cumulative energy distribution matrix and energy gradient data; spot boundary extraction is performed based on the energy gradient data to obtain spot coverage range parameters and edge transition zone width; energy uniformity analysis is performed on the cumulative energy distribution matrix to obtain an energy density change curve and a fluctuation coefficient; energy compensation calculation is performed based on the fluctuation coefficient and the edge transition zone width to obtain UV energy density data.
[0185] In a specific embodiment, the execution step performs synchronous optimization calculations on the spot coverage parameters and the ink droplet deposition time data to obtain UV light source triggering timing data, and performs power compensation calculation based on the UV energy density data and the UV curing area overlap rate data to obtain the UV light source power modulation parameters. The process can specifically include the following steps:
[0186] Perform spatial discretization on the spot coverage parameters to obtain UV spot grid data and spot center point coordinate data;
[0187] Based on the UV spot grid data and the ink droplet deposition time data, the spatiotemporal registration calculation is performed to obtain the position correspondence matrix and time delay parameters of the spot and ink droplet;
[0188] Calculate the light intensity distribution of the position correspondence matrix to obtain the UV light source irradiation intensity distribution diagram and energy accumulation curve data;
[0189] The trigger sequence is optimized according to the time delay parameters and energy accumulation curve data to obtain the UV light source triggering timing data;
[0190] Energy compensation calculation is performed based on UV energy density data and UV curing area overlap rate data to obtain the power compensation coefficient and energy allocation weight of the UV light source;
[0191] The power compensation coefficient and energy allocation weight are numerically optimized to obtain the power modulation parameters of the UV light source.
[0192] Specifically, a spatial distribution model of UV light spots is constructed to perform grid processing on the UV irradiation area. Assume that the projection area of the UV light source is The average radius of the spot is , the entire UV illumination area is divided into a series of grid units, and the size of each grid unit depends on the spot spacing ,Right now:
[0193]
[0194] in, Represents the number of grids in the horizontal and vertical directions respectively. For each light spot, the coordinates of its center point are expressed as:
[0195]
[0196] in, is the grid index of the spot. Through grid discretization processing, the UV spot grid data is obtained And the coordinate data of the center point of the spot , thus establishing a mathematical model of the UV illumination area. Based on the UV spot grid data and the ink droplet deposition time data, a spatiotemporal registration calculation is performed to ensure that the irradiation time and position of the UV light source can strictly match the ink droplet deposition process. Assume that the ink droplet deposition point set is , where the spatial coordinates of each ink droplet are:
[0197]
[0198] in, represents the spatial position of the ink droplet, In order to establish the spatial mapping relationship between the UV light spot and the ink droplet, the Euclidean distance matrix between the light spot and the ink droplet is calculated. :
[0199]
[0200] in, Indicates the center point of the light spot and ink drop deposition point If , then the light spot is considered Covered with ink droplets , forming the corresponding relationship matrix between light spots and ink droplets:
[0201]
[0202] At the same time, due to the time delay between the UV light source irradiation and the ink droplet deposition, the time delay parameter is calculated. :
[0203]
[0204] in, UV spot The triggering moment. If If the ink droplets are too large, they will not be cured at the optimal moment. Therefore, the triggering time of the UV light source should be adjusted to minimize the time error:
[0205]
[0206] After completing the spatiotemporal registration calculation, the light intensity distribution of the UV light source is calculated based on the spot position correspondence matrix to obtain the UV irradiation intensity distribution diagram and energy accumulation curve data. The energy attenuation of the UV light source usually obeys the Gaussian distribution. Assume that the light intensity at the center of the spot is , then the light intensity at a point Expressed as:
[0207]
[0208] in, is the spot diffusion parameter. For each grid cell, calculate the total UV energy density it receives:
[0209]
[0210] The energy accumulation curve data of the UV light source is calculated by integration to ensure that the energy is evenly distributed in the entire printing area. If the energy accumulation curve of a certain area is too high or too low, the trigger sequence of the UV light source is adjusted. The trigger sequence is optimized according to the time delay parameter and the energy accumulation curve data to ensure that the trigger time of the UV light source can match the inkjet process to the greatest extent. Assume that the trigger time of the UV light source is , the inkjet timing data is , then the optimization goal is to minimize the time error:
[0211]
[0212] During the optimization process, the PID control algorithm is used to dynamically adjust the triggering time of the UV light source to match the inkjet path. Assume that the UV light source triggering time adjustment amount is ,but:
[0213]
[0214] in, It is a PID control parameter. Based on the UV energy density data and UV curing area overlap rate data, energy compensation calculation is performed to ensure that the energy of the UV light source is evenly distributed in different areas. Power compensation coefficient From the current energy density With target energy density Calculation yields:
[0215]
[0216] if , indicating that the UV energy in the current area is insufficient, then increase the light source power or increase the exposure time; if , indicating that the energy is too high, then reduce the light source power. Based on all the calculation results, optimize the power modulation parameters of the UV light source :
[0217]
[0218] The above describes the UV printing method for packaging boxes according to the embodiment of the present invention. The following describes the UV printing device for packaging boxes according to the embodiment of the present invention. Figure 2 In one embodiment of the present invention, a UV printing device for packaging boxes includes:
[0219] A feature extraction module 201 is used to extract features from the CAD model data of the packaging box to obtain a feature data set of the packaging box;
[0220] The coordinate mapping module 202 is used to coordinate map the robot workspace to obtain the conversion matrix between the visual coordinate system and the robot base coordinate system and the spatial calibration data of the UV nozzle installation position;
[0221] The feature point matching module 203 is used to perform edge detection and feature point matching on the packaging box based on the transformation matrix and the spatial calibration data to obtain the position coordinate data of the packaging box and the posture angle data of the UV printing area;
[0222] The trajectory planning module 204 is used to perform multi-segment trajectory planning on the inkjet trajectory based on the position coordinate data and the posture angle data, and obtain the initial printing trajectory control data that meets the UV ink droplet ejection spacing requirements;
[0223] The synchronization control module 205 is used to perform UV light source synchronization control calculation based on the initial printing trajectory control data to obtain UV light source power modulation parameters and UV light source triggering timing data.
[0224] Through the collaborative efforts of these components, the system achieves precise positioning and posture recognition of the packaging box by extracting features and detecting edges from the CAD model data, combined with machine vision technology, effectively avoiding positioning deviations during the printing process. A multi-segment trajectory planning method, through dynamic optimization of the inkjet trajectory and synchronized control of the UV light source, ensures uniform droplet spacing and consistent curing results. A precise conversion relationship between the visual coordinate system and the robot base coordinate system is established, enabling high-precision calibration of the UV nozzle position and improving the spatial positioning accuracy of the printing system. By dynamically adjusting the UV light source power output and trigger timing through real-time calculation of the UV curing area overlap and energy density distribution, uniform ink droplet curing is achieved. Based on the simultaneous optimization of spot coverage parameters and ink droplet deposition time data, precise coordination between the UV light source and the inkjet system is achieved, ensuring stable printing quality. Real-time compensation of the UV light source power and optimized energy distribution effectively resolves the issue of uneven ink droplet curing at different locations, improving print quality.
[0225] above Figure 2 The medium packaging box UV printing device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The packaging box UV printing device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0226] Figure 3 is a schematic structural diagram of a packaging box UV printing device provided by an embodiment of the present invention. The packaging box UV printing device 300 may vary significantly due to different configurations or performance, and may include one or more processors (central processing units, CPUs) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 (for example, one or more mass storage devices) storing application programs 333 or data 332. The memory 320 and storage medium 330 may be either short-term storage or persistent storage. The program stored in the storage medium 330 may include one or more modules (not shown), each of which may include a series of instruction operations in the packaging box UV printing device 300. Furthermore, the processor 310 may be configured to communicate with the storage medium 330, and execute the series of instruction operations in the storage medium 330 on the packaging box UV printing device 300 to implement the steps of the above-mentioned packaging box UV printing method.
[0227] The packaging box UV printing device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be understood by those skilled in the art that Figure 3 The structure of the packaging box UV printing device shown does not constitute a limitation on the packaging box UV printing device provided by the present invention, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0228] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0229] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0230] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A packaging box UV printing method, characterized in that, The method comprises: Perform feature extraction on the CAD model data of the packaging box to obtain a feature data set of the packaging box; Perform coordinate mapping on the robot workspace to obtain the conversion matrix between the visual coordinate system and the robot base coordinate system and the spatial calibration data of the UV nozzle installation position; Based on the transformation matrix and the spatial calibration data, edge detection and feature point matching are performed on the packaging box to obtain the position coordinate data of the packaging box and the posture angle data of the UV printing area; specifically comprising: performing multi-scale edge detection operation on the real-time image data of the packaging box to obtain the edge point set and edge intensity matrix of the packaging box, and performing adaptive threshold segmentation and morphological processing on the edge point set to obtain the refined edge contour and contour segment data of the packaging box; performing feature point extraction and descriptor calculation based on the refined edge contour to obtain the feature point set of the real-time image data, and performing matching calculation based on the feature point set and the feature data set to obtain a feature point correspondence matrix; performing three-dimensional pose solution based on the feature point correspondence matrix and the transformation matrix to obtain the position coordinate data of the packaging box; performing spatial projection transformation based on the position coordinate data and the spatial calibration data to obtain the posture angle data of the UV printing area; According to the position coordinate data and the attitude angle data, a multi-segment trajectory planning is performed on the inkjet trajectory to obtain initial printing trajectory control data that meets the UV ink droplet jetting spacing requirements; specifically, the planning includes: performing grid discretization processing on the UV printing area to obtain UV inkjet dot matrix data and grid unit division data, and performing printing path segmentation calculation based on the grid unit division data to obtain a segmented trajectory sequence and trajectory connection point data; performing motion interpolation calculation based on the trajectory connection point data and the attitude angle data to obtain velocity trajectory data and acceleration trajectory data of the UV nozzle; performing dynamic constraint optimization on the velocity trajectory data and the acceleration trajectory data to obtain jetting timing data of the UV nozzle, and performing spacing uniformization processing on the segmented trajectory sequence based on the jetting timing data to obtain an ink droplet jetting position sequence; performing trajectory fitting calculation based on the ink droplet jetting position sequence and the UV inkjet dot matrix data to obtain initial printing trajectory control data; Based on the initial printing trajectory control data, a UV light source synchronous control calculation is performed to obtain UV light source power modulation parameters and UV light source triggering timing data; specifically comprising: performing trajectory segment analysis and timing discretization processing on the initial printing trajectory control data to obtain a UV printing discrete point sequence and ink droplet deposition time data; calculating a spatial distance matrix between adjacent ink droplets according to the UV printing discrete point sequence to obtain UV curing area overlap rate data; performing light source energy distribution calculation based on the UV curing area overlap rate data to obtain light spot coverage range parameters and UV energy density data; performing synchronous optimization calculation on the light spot coverage range parameters and the ink droplet deposition time data to obtain UV light source triggering timing data, and performing power compensation calculation based on the UV energy density data and the UV curing area overlap rate data to obtain UV light source power modulation parameters.
2. The packaging box UV printing method according to claim 1, characterized in that: The feature extraction of the CAD model data of the packaging box to obtain a feature data set of the packaging box includes: Performing a geometric edge extraction operation on the CAD model data of the packaging box to obtain edge contour data and an edge segment set of the packaging box; Calculating intersection points and screening feature points on the edge segment set to obtain corner point position data and corner point connection relationship data of the packaging box; Performing curvature analysis and surface smoothness calculation on the edge profile data to obtain reflection coefficient and material uniformity data of the packaging box surface; Performing printing resolution optimization based on the corner point position data and the material uniformity data to obtain inkjet resolution parameters of the UV printing area, and performing spatial distribution mapping on the reflection coefficient to obtain a reflection intensity distribution map and a light intensity compensation coefficient of the UV printing area; A feature data set is constructed according to the edge contour data, the corner point position data, the inkjet resolution parameter and the reflection coefficient.
3. The packaging box UV printing method according to claim 1, characterized in that: The coordinate mapping of the robot workspace is performed to obtain the conversion matrix between the visual coordinate system and the robot base coordinate system and the spatial calibration data of the UV nozzle installation position, including: Perform feature point detection and extraction on the calibration plate image captured by the camera to obtain pixel coordinate data and sub-pixel coordinate data of the calibration plate corner points; Performing an intrinsic calibration calculation on the pixel coordinate data and the sub-pixel coordinate data to obtain an intrinsic parameter matrix and a distortion coefficient matrix of the camera, and performing spatial pose optimization based on the intrinsic parameter matrix and the distortion coefficient matrix to obtain an extrinsic parameter matrix and a projection transformation matrix of the camera; Based on the projection transformation matrix, the coordinates of the robot end reference point are transformed to obtain the conversion matrix between the visual coordinate system and the robot base coordinate system, and the position of the UV nozzle relative to the robot end is measured by multi-point sampling to obtain the installation offset vector of the UV nozzle; A coordinate system compensation calculation is performed based on the conversion matrix and the installation offset vector to obtain spatial calibration data of the UV nozzle installation position.
4. The UV printing method for packaging boxes according to claim 1, characterized in that: The synchronous optimization operation of the light spot coverage parameter and the ink droplet deposition time data to obtain UV light source triggering timing data, and the power compensation calculation based on the UV energy density data and the UV curing area overlap rate data to obtain the UV light source power modulation parameter includes: Performing spatial discretization processing on the light spot coverage range parameters to obtain UV light spot grid data and light spot center point coordinate data; Performing spatiotemporal registration calculation based on the UV spot grid data and the ink droplet deposition time data to obtain a position correspondence matrix between the spot and the ink droplet and a time delay parameter; Calculating the light intensity distribution of the position correspondence matrix to obtain a UV light source irradiation intensity distribution diagram and energy accumulation curve data; Optimize the trigger sequence according to the time delay parameter and the energy accumulation curve data to obtain UV light source triggering timing data; Performing energy compensation calculation based on the UV energy density data and the UV curing area overlap rate data to obtain a power compensation coefficient and an energy distribution weight of the UV light source; Numerical optimization calculation is performed on the power compensation coefficient and the energy allocation weight to obtain UV light source power modulation parameters.
5. A packaging box UV printing device, characterized in that: The device is used to perform the packaging box UV printing method according to any one of claims 1 to 4, comprising: A feature extraction module is used to extract features from the CAD model data of the packaging box to obtain a feature data set of the packaging box; The coordinate mapping module is used to map the robot workspace to obtain the conversion matrix between the visual coordinate system and the robot base coordinate system and the spatial calibration data of the UV nozzle installation position; A feature point matching module is used to perform edge detection and feature point matching on the packaging box based on the transformation matrix and the spatial calibration data to obtain position coordinate data of the packaging box and posture angle data of the UV printing area; A trajectory planning module is used to perform multi-segment trajectory planning on the inkjet trajectory according to the position coordinate data and the posture angle data, and obtain initial printing trajectory control data that meets the UV ink droplet jetting spacing requirement; The synchronous control module is used to perform UV light source synchronous control calculation based on the initial printing trajectory control data to obtain UV light source power modulation parameters and UV light source triggering timing data.
6. A packaging box UV printing device, characterized in that, The packaging box UV printing device includes: a memory and at least one processor, wherein the memory stores instructions; The at least one processor calls the instructions in the memory to enable the packaging box UV printing device to execute the packaging box UV printing method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Digital jet printing method and system for dynamic jet printing path planning
CN118991242A
3D printing device and method based on multi-axis linkage control and machine visual feedback measurement
WO2021226891A1