Printing control method and device for digital direct-injection printing machine
The method and device address the balance between efficiency and quality in digital direct-injection printing by using a mapping relationship and machine learning to dynamically adjust jetting parameters, improving both efficiency and quality in digital printing.
Patent Information
- Application Number
- CN202411371535.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-29
AI Technical Summary
Existing digital direct-injection printers face a challenge in balancing high production efficiency with printing quality, as increased ink droplet spraying speed leads to uneven distribution and blurred patterns, while reducing speed improves quality but decreases efficiency and increases costs.
A printing control method and device that utilizes a pre-constructed mapping relationship between regional center pixel positions and jetting parameters, combined with a pre-trained jetting parameter determination model through machine learning, to dynamically adjust jetting speeds and ink droplet sizes for different segmented areas, ensuring optimal printing conditions.
This approach improves production efficiency and ensures high-quality printing by using accurate regional jetting parameters, reducing uneven ink distribution and inaccurate colors, thereby enhancing the digital printing industry's technological progress.
Smart Images

Figure CN118876617B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a printing control method and device for a digital direct-injection printing machine. Background Art
[0002] In the modern textile industry, digital direct printing technology is widely used because it can achieve high resolution, multi-color and personalized pattern printing. This technology is particularly suitable for small batch production and rapid response to market changes, such as customized clothing, decorative fabrics and fashion accessories.
[0003] In the related art, existing digital direct-injection printers usually spray ink onto textiles in the form of extremely fine ink droplets by precisely controlling the nozzle to form the desired pattern. In order to achieve high production efficiency, the ink droplet spraying speed is often increased. However, too fast a spraying speed leads to uneven distribution of ink droplets on the textile. The uneven distribution of ink droplets causes the ink to penetrate into the back of the textile, resulting in blurred patterns and uneven colors. On the other hand, if the spraying speed is reduced in order to ensure the uniformity of ink droplet distribution, although the printing quality can be improved, the production efficiency will be significantly reduced and the production cost will be increased.
[0004] In summary, how to find the best balance between pursuing high production efficiency and ensuring printing quality is an issue that needs to be solved urgently. Summary of the invention
[0005] The embodiments of the present application provide a printing control method and device for a digital direct-injection printer. In order to have a basic understanding of some aspects of the disclosed embodiments, a simple summary is given below. This summary is not a general review, nor is it intended to identify key / important components or describe the scope of protection of these embodiments. Its only purpose is to present some concepts in a simple form as a preface to the detailed description that follows.
[0006] In a first aspect, an embodiment of the present application provides a printing control method for a digital direct-injection printing machine, the method comprising:
[0007] In response to a printing instruction, receiving a textile image fed back by a visual sensor pre-installed on a digital direct-injection printing machine;
[0008] Identifying the area to be printed in the textile image;
[0009] Determine a target segmentation area corresponding to the area to be printed from a pre-designed image to be printed;
[0010] According to the regional center pixel position of the target segmented area, the corresponding target regional jetting parameter is obtained from the pre-constructed mapping relationship between the regional center pixel position and the regional jetting parameter; wherein the mapping relationship is obtained by storing the association relationship between the regional center pixel position of each segmented area and the regional jetting parameter corresponding to each segmented area, each segmented area is obtained by segmenting the image to be printed according to the complexity of the image to be printed, and the regional jetting parameter corresponding to each segmented area is obtained by analyzing each segmented area according to a pre-trained jetting parameter determination model, and the pre-trained jetting parameter determination model is a mathematical model for determining the regional jetting parameter in advance through machine learning;
[0011] According to the jetting speed and ink droplet size indicated by the jetting parameters of the target area, the digital direct jet printing machine is controlled to print the area to be printed, and the step of receiving the textile image fed back by the visual sensor pre-installed on the digital direct jet printing machine is continued.
[0012] Optionally, the following steps are performed to generate a pre-built mapping relationship between the region center pixel position and the region injection parameter, including:
[0013] Receive the original image to be printed uploaded by the client and pre-process it to adapt to the working area and printing requirements of the digital direct printing machine to obtain the image to be printed;
[0014] Calculating the complexity of the target pattern in the image to be printed;
[0015] According to the complexity of the image to be printed, the image to be printed is segmented to obtain multiple segmented areas;
[0016] Input each segmented area into a pre-trained injection parameter determination model, and output the regional injection parameter corresponding to each segmented area;
[0017] Determine the region center pixel position of each segmented region in the image to be printed, and obtain the region center pixel position of each segmented region;
[0018] storing the association relationship between the region center pixel position of each segmented region and the region injection parameter corresponding to each segmented region;
[0019] The association relationship is used as a pre-constructed mapping relationship between the center pixel position of the region and the regional injection parameters.
[0020] Optionally, a pre-trained injection parameter determination model is generated according to the following steps, including:
[0021] Collect multiple historical printing images that have been printed within a preset period;
[0022] Calculating the complexity of the target pattern in each historical print image;
[0023] According to the complexity of the target pattern in each historical printing image, each historical printing image is segmented to obtain a plurality of historical segmentation regions of each historical printing image;
[0024] constructing feature data of each historical segmentation region of each historical print image;
[0025] determining a historical jetting parameter for each historical segmented region of each historical printed image;
[0026] Using the historical ejection parameters of each historical segmented area of each historical printing image as labels to mark the feature data of each historical segmented area of each historical printing image, so as to obtain model training data;
[0027] Machine learning is performed based on the model training data to obtain a pre-trained injection parameter determination model.
[0028] Optionally, the complexity of the target pattern in each historical print image is calculated, including:
[0029] Convert each historical print image into a grayscale image to obtain a plurality of grayscale images;
[0030] Perform edge detection on each grayscale image to obtain the edge strength of each historical printed image; the edge strength calculation formula is:
[0031]
[0032] in, , , and are the gradients of the image in the horizontal and vertical directions, is the edge strength, is the convolution operation, Print the pixel intensity of each pixel in the image for each history;
[0033] The entropy of the color histogram of each historical printed image is calculated as a color diversity measure of each historical printed image; wherein,
[0034] The calculation formula for the color diversity metric is:
[0035]
[0036] in, is the color diversity measure, It’s the color The probability of appearing in the image, is the number of color channels of the historical printed image;
[0037] The edge strength of each historical printing image and the color diversity measure of each historical printing image are weightedly summed to obtain the complexity of the target pattern in each historical printing image.
[0038] Optionally, construct feature data of each historical segmentation region of each historical print image, including:
[0039] In each historical segmented region of each historical print image, determining a historical pattern;
[0040] Annotating the historical pattern with a marking frame to mark the boundary and position of the historical pattern, and obtaining a historical pattern marking frame for each historical segmentation area of each historical print image;
[0041] Perform feature extraction on the historical pattern annotation frame of each historical segmentation area of each historical print image to obtain feature information of each historical segmentation area of each historical print image;
[0042] Quantifying the feature information of each historical segmentation region of each historical print image to obtain a feature vector of each historical segmentation region of each historical print image;
[0043] The feature vector of each historical segmented region of each historical print image is used as feature data of each historical segmented region of each historical print image.
[0044] Optionally, feature extraction is performed on the historical pattern annotation frame of each historical segmentation area of each historical print image to obtain feature information of each historical segmentation area of each historical print image, including:
[0045] Using an edge detection algorithm, edge features of the historical pattern are extracted from the historical pattern annotation frame of each historical segmented area of each historical print image;
[0046] Extracting texture features of the historical pattern from the historical pattern annotation frame of each historical segmented area of each historical print image;
[0047] Extracting color features of the historical pattern from the historical pattern annotation frame of each historical segmentation area of each historical print image;
[0048] The edge features, texture features and color features of the historical patterns are combined into a feature matrix to obtain feature information of each historical segmentation area of each historical print image.
[0049] Optionally, feature extraction is performed on the historical pattern annotation frame of each historical segmentation area of each historical print image to obtain feature information of each historical segmentation area of each historical print image, including:
[0050] In the historical pattern of each historical segmentation area of each historical print image, corner points and edge points are detected as control points of the Bezier curve;
[0051] According to the control points of the Bezier curve, the Bezier curve is fitted in the historical pattern of each historical segmentation area of each historical print image by the least square method to obtain the Bezier curve of each historical segmentation area of each historical print image;
[0052] The curve order, control point coordinates, curve length and curvature of the Bezier curve of each historical segmentation area of each historical printing image are obtained as feature information of each historical segmentation area of each historical printing image.
[0053] Optionally, determining the historical jetting parameters of each historical segmented area of each historical printed image includes:
[0054] Acquire actual printing parameters of each historical segmented area of each historical printing image, the actual printing parameters including actual jetting speed and actual ink drop size;
[0055] obtaining a segmented region of the historical textile image corresponding to each historical segmented region of each historical print image;
[0056] extracting ink drop distribution parameters and pattern color parameters from the segmented regions of the historical textile image corresponding to each historical segmented region of each historical print image;
[0057] Parameters of the actual ejection speed and the actual ink droplet size adjusted by the user based on the ink droplet distribution parameters and the pattern color parameters to ensure the best printing quality are received, and the historical ejection parameters of each historical segmented area of each historical printed image are obtained.
[0058] Optionally, machine learning is performed based on the model training data to obtain a pre-trained injection parameter determination model, including:
[0059] A neural network is used to create a model for determining injection parameters;
[0060] Input the model training data into the injection parameter determination model and output the model loss value;
[0061] When the model loss value reaches the minimum, a pre-trained injection parameter determination model is generated; wherein the loss function of the model is:
[0062]
[0063] in, is the loss value, for each historical segmented region of each historical print image, is the predicted ejection parameter predicted for each historical segmented region of each historical print image, is the threshold parameter used to determine the point at which the Huber loss function switches between square loss and linear loss. When the absolute value of the difference between the historical injection parameter and the predicted injection parameter is less than or equal to the threshold parameter, For other situations.
[0064] In a second aspect, an embodiment of the present application provides a printing control device for a digital direct-injection printing machine, the device comprising:
[0065] A textile image receiving module, for receiving a textile image fed back by a visual sensor pre-installed on a digital direct-injection printing machine in response to a printing instruction;
[0066] A to-be-printed area recognition module, used to recognize the to-be-printed area in the textile image;
[0067] A target segmentation region determination module is used to determine a target segmentation region corresponding to a to-be-printed region from a pre-designed to-be-printed image;
[0068] A target area jet parameter acquisition module is used to acquire the corresponding target area jet parameters from a pre-constructed mapping relationship between the area center pixel position and the area jet parameter according to the area center pixel position of the target segmented area; wherein the mapping relationship is obtained by storing the association relationship between the area center pixel position of each segmented area and the area jet parameter corresponding to each segmented area, each segmented area is obtained by segmenting the image to be printed according to the complexity of the image to be printed, and the area jet parameter corresponding to each segmented area is obtained by analyzing each segmented area according to a pre-trained jet parameter determination model, and the pre-trained jet parameter determination model is a mathematical model for determining the area jet parameter in advance through machine learning;
[0069] The jet control module is used to control the digital direct jet printer to print the area to be printed according to the jet speed and ink drop size indicated by the jet parameters of the target area, and continue to execute the step of receiving the textile image fed back by the visual sensor pre-installed on the digital direct jet printer.
[0070] The technical solution provided by the embodiments of the present application may have the following beneficial effects:
[0071] In the embodiments of the present application, on the one hand, the mapping relationship between the regional center pixel position and the regional jetting parameters pre-constructed by the present application stores the correlation between the regional center pixel position of each segmented area and the regional jetting parameters corresponding to each segmented area, so that different segmented areas have the best regional jetting parameters, and the dynamic jetting parameters ensure that the digital direct-injection printer can use different jetting speeds and ink droplet sizes for printing at different printing periods, avoiding uneven ink distribution or inaccurate colors caused by increasing the printing speed when printing with global jetting parameters; on the other hand, the pre-trained jetting parameter determination model is a mathematical model for determining regional jetting parameters in advance through machine learning, and the model is trained by adjusting and optimizing the data set, so that the regional jetting parameters obtained by analyzing each segmented area according to the pre-trained jetting parameter determination model are highly accurate. Therefore, the method of combining the mapping relationship and the machine learning model in the present application not only improves production efficiency, but also ensures printing quality, bringing significant technological progress to the digital printing industry.
[0072] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0074] Figure 1 It is a method flow diagram of a printing control method for a digital direct-injection printing machine provided in an embodiment of the present application;
[0075] Figure 2 is a schematic diagram of a textile image collected by a visual sensor provided in an embodiment of the present application;
[0076] Figure 3 It is a data representation intent of a mapping relationship provided by this application;
[0077] Figure 4 It is a data representation intent of training data provided by this application;
[0078] Figure 5 It is a flow chart of a model training method for an injection parameter determination model provided in the present application;
[0079] Figure 6 It is a structural schematic diagram of a printing control device for a digital direct-injection printing machine provided by the present application;
[0080] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0081] The following description and the accompanying drawings sufficiently illustrate specific embodiments of the present application to enable those skilled in the art to practice them.
[0082] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0083] When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0084] In the description of the present application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.
[0085] At present, existing digital direct printing machines usually spray ink onto textiles in the form of extremely fine ink droplets by precisely controlling the nozzles to form the desired pattern. In order to achieve high production efficiency, the ink droplet spraying speed is often increased.
[0086] The inventors realized that too fast a jetting speed results in uneven distribution of ink droplets on the textile, and the uneven distribution of ink droplets causes the ink to penetrate into the back of the textile, resulting in blurred patterns and uneven colors. On the other hand, if the jetting speed is reduced to ensure uniform distribution of ink droplets, although the printing quality can be improved, the production efficiency will be significantly reduced and the production cost will be increased.
[0087] In order to solve the above problems, the present application provides a printing control method and device for a digital direct-injection printer to solve the problems existing in the above-mentioned related technical problems. In the embodiment of the present application, on the one hand, the mapping relationship between the regional center pixel position and the regional injection parameter pre-constructed by the present application stores the correlation between the regional center pixel position of each segmented area and the regional injection parameter corresponding to each segmented area, so that different segmented areas have the best regional injection parameters, and the dynamic injection parameters ensure that the digital direct-injection printer can use different injection speeds and ink droplet sizes for printing in different printing periods, avoiding the uneven ink distribution or inaccurate color caused by increasing the printing speed when printing with global injection parameters; on the other hand, the pre-trained injection parameter determination model is a mathematical model for determining the regional injection parameters in advance through machine learning, and the model is obtained by adjusting the optimized data set training, so that the regional injection parameters obtained by analyzing each segmented area according to the pre-trained injection parameter determination model are highly accurate. Therefore, the method of combining the mapping relationship and the machine learning model in the present application not only improves production efficiency, but also ensures printing quality, and brings significant technological progress to the digital printing industry. The following exemplary embodiments are used for detailed description.
[0088] The following will be combined with the attached Figure 1 -Attached Figure 5 , a printing control method for a digital direct-injection printer provided in an embodiment of the present application is introduced in detail. The method can be implemented by a computer program and can be run on a printing control device for a digital direct-injection printer based on a von Neumann system. The computer program can be integrated into an application or run as an independent tool application.
[0089] See also Figure 1 , which is a flow chart of a printing control method for a digital direct-injection printer according to an embodiment of the present application. Figure 1 As shown, the method of the embodiment of the present application may include the following steps:
[0090] S101, in response to a printing instruction, receiving a textile image fed back by a visual sensor pre-installed on a digital direct printing machine;
[0091] Among them, the printing instruction is the command to start the printing process of the printing machine, which is usually issued by the operator. The visual sensor is a device that can capture images. In a digital direct printing machine, the visual sensor is used to obtain real-time images of textiles for subsequent image processing and analysis. A digital direct printing machine is an industrial printer that can print patterns directly on textiles. It uses digital technology to control the ink jet to form the desired pattern. Textile images refer to photos or images of textiles captured by visual sensors, which are used to analyze the current state of the textile.
[0092] In some embodiments of the present application, a high-resolution visual sensor is installed for a digital direct-injection printer to capture images of the textile surface. The digital direct-injection printer is connected to an industrial computer that runs image processing and printing control software. The user can design the image to be printed through the industrial computer to obtain a pre-designed image to be printed. The user triggers the printing instruction through the user interface (UI). After the printing control software receives the printing instruction, the visual sensor is activated and starts scanning the textile surface. The visual sensor captures the textile image, and the captured image data is transmitted to the industrial computer through a high-speed data interface. The image processing software pre-processes the received image, including denoising, contrast adjustment, and image enhancement, to ensure image clarity and quality, and finally obtains a textile image. Textile images, for example Figure 2 shown.
[0093] S102, identifying the area to be printed in the textile image;
[0094] The area to be printed refers to a specific part or area in the textile image, and these parts are the target areas to be printed next.
[0095] In some embodiments of the present application, the textile image is subjected to noise reduction, contrast enhancement and other processing to improve the image quality, and the image is segmented into multiple parts or regions using algorithms (such as threshold segmentation, edge detection, region growing, etc.), and features such as color, texture, shape, etc. are extracted from the segmented regions, and the area to be printed is determined based on the extracted features and preset rules. For example, a blank area may be identified as the area to be printed.
[0096] S103, determining a target segmentation area corresponding to the area to be printed from the pre-designed image to be printed;
[0097] The image to be printed refers to a complete pattern or image that has been designed and is ready to be printed on textiles through a digital direct printing machine. This image contains all the elements that need to be printed, such as color, texture, graphics, etc., and usually exists in the form of a digital file. The target segmentation area refers to a specific part or area in the image to be printed that matches the area to be printed on the textile.
[0098] It should be noted that a matching relationship is established between the image to be printed and the area to be printed on the textile, which ensures that the printing machine can accurately print the specific part of the image to be printed on the correct position of the textile.
[0099] In some embodiments of the present application, a pre-designed image to be printed is analyzed to identify various components and regions in the image, and image processing techniques, such as computer vision algorithms, are used to segment the image to be printed into multiple target segmented regions. By comparing the area to be printed in the textile image and the multiple target segmented regions in the image to be printed, the correspondence between them is determined, and the target segmented region corresponding to the area to be printed is determined through the correspondence.
[0100] S104, according to the region center pixel position of the target segmented region, obtaining the corresponding target region injection parameter from a pre-constructed mapping relationship between the region center pixel position and the region injection parameter;
[0101] The mapping relationship is obtained by storing the association relationship between the regional center pixel position of each segmented region and the regional jetting parameter corresponding to each segmented region, each segmented region is obtained by segmenting the image to be printed according to the complexity of the image to be printed, and the regional jetting parameter corresponding to each segmented region is obtained by analyzing each segmented region according to a pre-trained jetting parameter determination model, and the pre-trained jetting parameter determination model is a mathematical model for determining the regional jetting parameter in advance through machine learning;
[0102] Among them, the regional center pixel position refers to the coordinate position of the geometric center point of the target segmented area in the image. In image processing, this center point can be used to represent the position of the entire area, which is convenient for spatial positioning and analysis. The mapping relationship refers to a data structure that stores the correspondence between the regional center pixel position and the corresponding injection parameters. The mapping relationship is pre-built in the control system of the printing machine for fast search and application of the best injection parameters. Regional injection parameters refer to the parameters used to control the digital direct injection printing machine when printing a specific area, including injection speed and ink drop size.
[0103] In some embodiments of the present application, the central pixel position of the target segmented area is first calculated, and then the central pixel position of the target segmented area is compared with each regional central pixel position in a pre-constructed mapping relationship between regional central pixel positions and regional injection parameters, and the regional injection parameter corresponding to the regional central pixel position with the smallest difference from the central pixel position of the target segmented area is determined from the mapping relationship as the target regional injection parameter corresponding to the target segmented area.
[0104] In some embodiments of the present application, the specific process of generating a pre-constructed mapping relationship between a regional center pixel position and a regional injection parameter includes: receiving an original image to be printed uploaded by a client and performing pre-processing to adapt to the working area and printing requirements of a digital direct-injection printer to obtain an image to be printed; calculating the complexity of a target pattern in the image to be printed; segmenting the image to be printed according to the complexity of the image to be printed to obtain a plurality of segmented regions; inputting each segmented region into a pre-trained injection parameter determination model, and outputting the regional injection parameter corresponding to each segmented region; determining the regional center pixel position of each segmented region in the image to be printed to obtain the regional center pixel position of each segmented region; storing the association relationship between the regional center pixel position of each segmented region and the regional injection parameter corresponding to each segmented region; and using the association relationship as a pre-constructed mapping relationship between a regional center pixel position and a regional injection parameter.
[0105] Among them, the original image refers to the unprocessed image file uploaded by the client, which is the starting point of the printing process. Preprocessing refers to a series of processing steps performed on the original image, such as resizing, rotating, cropping, etc., to ensure that the image meets the working area and printing requirements of the digital direct printing machine. The complexity of the target pattern refers to the complexity of the pattern in the image, which may include factors such as the number of colors, richness of details, and complexity of textures. Segmentation processing refers to the process of dividing the image to be printed into multiple parts or regions according to complexity, so that different printing parameters can be applied to each region. The jet parameter determination model refers to a pre-trained machine learning model used to analyze the segmented area and determine the optimal jet parameters for each area. The region center pixel position refers to the coordinate position of the geometric center of each segmented area in the image. The association relationship refers to the correspondence between the region center pixel position of the segmented area and its corresponding jet parameter.
[0106] Specifically, the data table of mapping relationship is as follows: Figure 3 As shown, the (X, Y) coordinates of the center pixel position of the area help accurately locate the print area in the image and are critical for image processing and print control. The jet speed can vary depending on the complexity of the pattern and the degree of detail required. The faster the speed, the higher the production efficiency, but some print quality may be sacrificed. The droplet size can affect the print resolution and color saturation. Smaller droplets can provide higher resolution but require more precise control.
[0107] In the embodiment of the present application, the optimal jetting parameters can be customized for each segmented area by using the pre-trained jetting parameter determination model, thereby improving efficiency while maintaining printing quality. Storing and using the mapping relationship further improves the response speed of the printer and the accuracy of operation, making the production process more smooth and automated, and ultimately improving the quality and production efficiency of printed products. This method not only reduces manual intervention, but also reduces material waste and production costs by accurately controlling the printing process.
[0108] In some embodiments of the present application, the specific process of generating a pre-trained injection parameter determination model includes: collecting multiple historical printing images that have been printed within a preset period; calculating the complexity of the target pattern in each historical printing image; segmenting each historical printing image according to the complexity of the target pattern in each historical printing image to obtain multiple historical segmented areas of each historical printing image; constructing feature data of each historical segmented area of each historical printing image; determining the historical injection parameters of each historical segmented area of each historical printing image; marking the historical injection parameters of each historical segmented area of each historical printing image as labels on the feature data of each historical segmented area of each historical printing image to obtain model training data; performing machine learning based on the model training data to obtain a pre-trained injection parameter determination model.
[0109] Among them, historical printing images refer to images that have been printed within a preset period, which are used as basic data for analysis and learning. The complexity of the target pattern refers to the complexity measure of a specific pattern in the image, including features such as the color, shape, texture, and details of the pattern. Feature data refers to data extracted from historical segmented areas, which are used to describe the characteristics of each area. These data will be used as inputs to the machine learning model. Historical jet parameters refer to parameters for tuning the actual jet parameters corresponding to the historical segmented areas. Model training data refers to a data set obtained by combining historical jet parameters as labels with corresponding feature data, which is used to train the machine learning model. The pre-trained jet parameter determination model refers to a model trained by a machine learning algorithm using model training data, which can predict the optimal jet parameters based on the input feature data.
[0110] Specifically, the dataset is Figure 4 As shown, color richness is used to describe the diversity and saturation of colors in the image area, texture is used to describe the complexity and details of the texture in the image area, the jet speed used in the historical data is used to guide the model to learn the jet speed under different features, and the ink drop size used in the historical data is used to guide the model to learn the ink drop size under different features.
[0111] In the embodiment of the present application, the combination of constructed feature data and historical jet parameters provides a rich training material for the machine learning model, enabling the model to learn the relationship between complexity and jet parameters. The final pre-trained jet parameter determination model can automatically provide accurate jet parameter recommendations for new printing tasks, significantly improve printing quality and efficiency, and reduce human errors and material waste.
[0112] S105, controlling the digital direct-injection printer to print the area to be printed according to the jetting speed and ink droplet size indicated by the jetting parameters of the target area, and continuing to execute the step of receiving the textile image fed back by the visual sensor pre-installed on the digital direct-injection printer.
[0113] In some embodiments of the present application, after obtaining the jet speed and ink drop size indicated by the jet parameters of the target area, the nozzle of the digital direct-injection printer is adjusted to the appropriate jet speed and ink drop size according to the instructions of the control system, and the printer starts to print in the designated area of the textile. The ink is accurately sprayed onto the textile according to the predetermined pattern. The visual sensor continuously monitors the printing process and provides real-time feedback of the textile image. The control system makes real-time adjustments based on the feedback image to ensure the accuracy of the printing alignment and pattern. Through this automated and intelligent printing process, the printer can achieve high-efficiency and high-quality production. Accurate jet parameter control ensures the clarity of the pattern and the vividness of the color, while reducing material waste and improving production flexibility.
[0114] In the embodiments of the present application, on the one hand, the mapping relationship between the regional center pixel position and the regional jetting parameters pre-constructed by the present application stores the correlation between the regional center pixel position of each segmented area and the regional jetting parameters corresponding to each segmented area, so that different segmented areas have the best regional jetting parameters, and the dynamic jetting parameters ensure that the digital direct-injection printer can use different jetting speeds and ink droplet sizes for printing at different printing periods, avoiding uneven ink distribution or inaccurate colors caused by increasing the printing speed when printing with global jetting parameters; on the other hand, the pre-trained jetting parameter determination model is a mathematical model for determining regional jetting parameters in advance through machine learning, and the model is trained by adjusting and optimizing the data set, so that the regional jetting parameters obtained by analyzing each segmented area according to the pre-trained jetting parameter determination model are highly accurate. Therefore, the method of combining the mapping relationship and the machine learning model in the present application not only improves production efficiency, but also ensures printing quality, bringing significant technological progress to the digital printing industry.
[0115] See also Figure 5 , is a flow chart of a model training method for an elevator operation status recognition model provided in an embodiment of the present application. Figure 5As shown, the method of the embodiment of the present application may include the following steps:
[0116] S201, collecting a plurality of historical printing images that have been printed within a preset period;
[0117] S202, calculating the complexity of the target pattern in each historical printing image;
[0118] In some embodiments of the present application, the specific process of calculating the complexity of the target pattern in each historical printed image includes: converting each historical printed image into a grayscale image to obtain multiple grayscale images; performing edge detection on each grayscale image to obtain the edge strength of each historical printed image; calculating the entropy of the color histogram of each historical printed image as a color diversity measure of each historical printed image; and performing weighted summation of the edge strength of each historical printed image and the color diversity measure of each historical printed image to obtain the complexity of the target pattern in each historical printed image.
[0119] The calculation formula of edge strength is:
[0120]
[0121] in, , , and are the gradients of the image in the horizontal and vertical directions, is the edge strength, is the convolution operation, is the pixel intensity of each pixel in each historical printed image; where,
[0122] The calculation formula for the color diversity metric is:
[0123]
[0124] in, is the color diversity measure, It’s the color The probability of appearing in the image, is the number of color channels of the historical printed image.
[0125] S203, segmenting each historical printing image according to the complexity of the target pattern in each historical printing image to obtain a plurality of historical segmentation regions of each historical printing image;
[0126] S204, constructing feature data of each historical segmentation area of each historical print image;
[0127] In some embodiments of the present application, the specific process of constructing the feature data of each historical segmentation area of each historical printed image includes: determining a historical pattern in each historical segmentation area of each historical printed image; marking the historical pattern with a marking box to mark the boundary and position of the historical pattern, and obtaining a historical pattern marking box for each historical segmentation area of each historical printed image; performing feature extraction on the historical pattern marking box of each historical segmentation area of each historical printed image to obtain feature information of each historical segmentation area of each historical printed image; quantizing the feature information of each historical segmentation area of each historical printed image to obtain a feature vector of each historical segmentation area of each historical printed image; and using the feature vector of each historical segmentation area of each historical printed image as the feature data of each historical segmentation area of each historical printed image.
[0128] Among them, historical patterns refer to patterns that already exist in historical images and are used for printing. These patterns are part of previous printing tasks and are now used as objects for analysis and learning. Annotation boxes are rectangular boxes or other shaped boxes used to mark the boundaries and positions of historical patterns on images. Annotation boxes help identify and locate specific pattern areas in images. Historical pattern annotation boxes refer to annotation boxes set on historical patterns to clarify the exact position and boundaries of patterns. Feature extraction refers to the process of identifying and extracting useful information or patterns from images, which can describe certain attributes of the image. Feature information refers to descriptive information extracted from historical pattern annotation boxes, such as color, texture, shape and other features. Quantization processing refers to the process of converting feature information into numerical form for further analysis and processing. Feature vector refers to a numerical vector containing multiple feature information, which represents the characteristics of an image area. Feature data refers to a data set containing feature vectors for machine learning or other analysis tasks.
[0129] In an embodiment of the present application, the feature information of the pattern can be systematically extracted and quantified from the historical images to generate feature data that can be used to train the machine learning model. This automated feature extraction and quantification process not only improves the efficiency of data processing, but also ensures the consistency and accuracy of the feature information. The generated feature vector provides a rich input for the machine learning model, enabling the model to learn the complex relationship between pattern features and jet parameters, thereby achieving more accurate jet parameter predictions and higher quality printing effects in future printing tasks. This method significantly improves the automation level and product quality of digital printing production, while reducing dependence on manual experience and enhancing production flexibility and scalability.
[0130] In some embodiments, the specific process of performing feature extraction on the historical pattern annotation frame of each historical segmented area of each historical printed image to obtain feature information of each historical segmented area of each historical printed image includes: using an edge detection algorithm to extract edge features of the historical pattern from the historical pattern annotation frame of each historical segmented area of each historical printed image; extracting texture features of the historical pattern from the historical pattern annotation frame of each historical segmented area of each historical printed image; extracting color features of the historical pattern from the historical pattern annotation frame of each historical segmented area of each historical printed image; combining the edge features, texture features and color features of the historical pattern into a feature matrix to obtain feature information of each historical segmented area of each historical printed image.
[0131] In other embodiments, the specific process of performing feature extraction on the historical pattern annotation box of each historical segmentation area of each historical printed image to obtain the feature information of each historical segmentation area of each historical printed image includes: detecting corner points and edge points in the historical pattern of each historical segmentation area of each historical printed image as control points of Bezier curves; fitting Bezier curves in the historical pattern of each historical segmentation area of each historical printed image by the least squares method based on the control points of the Bezier curves to obtain the Bezier curves of each historical segmentation area of each historical printed image; and obtaining the curve order, control point coordinates, curve length and curvature of the Bezier curve of each historical segmentation area of each historical printed image as the feature information of each historical segmentation area of each historical printed image.
[0132] S205, determining the historical ejection parameters of each historical segmented area of each historical printed image;
[0133] In some embodiments of the present application, the specific process of determining the historical injection parameters of each historical segmented area of each historical printed image includes: obtaining the actual printing parameters of each historical segmented area of each historical printed image, the actual printing parameters including the actual injection speed and the actual ink droplet size; obtaining the segmented area of the historical textile image corresponding to each historical segmented area of each historical printed image; extracting the ink droplet distribution parameters and the pattern color parameters from the segmented area of the historical textile image corresponding to each historical segmented area of each historical printed image; receiving the parameters adjusted by the user for the actual injection speed and the actual ink droplet size based on the ink droplet distribution parameters and the pattern color parameters to ensure the best printing quality, and obtaining the historical injection parameters of each historical segmented area of each historical printed image.
[0134] S206, labeling the historical injection parameters of each historical segmented area of each historical printing image as labels on the feature data of each historical segmented area of each historical printing image to obtain model training data;
[0135] S207, performing machine learning based on the model training data to obtain a pre-trained injection parameter determination model.
[0136] In some embodiments of the present application, the specific process of performing machine learning based on model training data to obtain a pre-trained injection parameter determination model includes: using a neural network to create an injection parameter determination model; inputting the model training data into the injection parameter determination model and outputting a model loss value; when the model loss value reaches a minimum, generating a pre-trained injection parameter determination model; wherein the loss function of the model is:
[0137]
[0138] in, is the loss value, for each historical segmented region of each historical print image, is the predicted ejection parameter predicted for each historical segmented region of each historical print image, is the threshold parameter used to determine the point at which the Huber loss function switches between square loss and linear loss. When the absolute value of the difference between the historical injection parameter and the predicted injection parameter is less than or equal to the threshold parameter, For other situations.
[0139] In the embodiments of the present application, on the one hand, the mapping relationship between the regional center pixel position and the regional injection parameters pre-constructed in the present application stores the association between the regional center pixel position of each segmented area and the regional injection parameters corresponding to each segmented area, so that different segmented areas have the best regional injection parameters, and the dynamic injection parameters ensure that the digital direct injection printer can use different injection speeds and droplet sizes for printing in different printing periods, avoiding uneven ink distribution or inaccurate color caused by increasing the printing speed when printing with global injection parameters; on the other hand, the pre-trained injection parameter determination model is a mathematical model for determining regional injection parameters in advance through machine learning, and the model is trained by adjusting the optimized data set, so that the regional injection parameters obtained by analyzing each segmented area according to the pre-trained injection parameter determination model are highly accurate.
[0140] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0141] See also Figure 6, which shows a schematic diagram of the structure of a printing control device for a digital direct-injection printer provided by an exemplary embodiment of the present application. The printing control device for a digital direct-injection printer can be implemented as all or part of an electronic device through software, hardware, or a combination of both. The device 1 includes a textile image receiving module 10, a to-be-printed area recognition module 20, a target segmentation area determination module 30, a target area jetting parameter acquisition module 40, and a jetting control module 50.
[0142] The textile image receiving module 10 is used to receive the textile image fed back by the visual sensor pre-installed on the digital direct printing machine in response to the printing instruction;
[0143] A to-be-printed area recognition module 20, used to recognize the to-be-printed area in the textile image;
[0144] The target segmentation region determination module 30 is used to determine the target segmentation region corresponding to the area to be printed from the pre-designed image to be printed;
[0145] The target area jet parameter acquisition module 40 is used to acquire the corresponding target area jet parameters from a pre-established mapping relationship between the area center pixel position and the area jet parameter according to the area center pixel position of the target segmented area; wherein the mapping relationship is obtained by storing the association relationship between the area center pixel position of each segmented area and the area jet parameter corresponding to each segmented area, each segmented area is obtained by segmenting the image to be printed according to the complexity of the image to be printed, and the area jet parameter corresponding to each segmented area is obtained by analyzing each segmented area according to a pre-trained jet parameter determination model, and the pre-trained jet parameter determination model is a mathematical model for determining the area jet parameter in advance through machine learning;
[0146] The jet control module 50 is used to control the digital direct inkjet printer to print the area to be printed according to the jet speed and ink drop size indicated by the jet parameters of the target area, and continue to execute the step of receiving the textile image feedback from the visual sensor pre-installed on the digital direct inkjet printer.
[0147] It should be noted that the printing control device for a digital direct-injection printing machine provided in the above embodiment only uses the division of the above-mentioned functional modules as an example when executing the printing control method for a digital direct-injection printing machine. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the printing control device for a digital direct-injection printing machine provided in the above embodiment and the printing control method embodiment for a digital direct-injection printing machine belong to the same concept, and the embodiment and implementation process thereof are detailed in the method embodiment, which will not be repeated here.
[0148] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0149] In the embodiments of the present application, on the one hand, the mapping relationship between the regional center pixel position and the regional injection parameters pre-constructed in the present application stores the association between the regional center pixel position of each segmented area and the regional injection parameters corresponding to each segmented area, so that different segmented areas have the best regional injection parameters, and the dynamic injection parameters ensure that the digital direct injection printer can use different injection speeds and droplet sizes for printing in different printing periods, avoiding uneven ink distribution or inaccurate color caused by increasing the printing speed when printing with global injection parameters; on the other hand, the pre-trained injection parameter determination model is a mathematical model for determining regional injection parameters in advance through machine learning, and the model is trained by adjusting the optimized data set, so that the regional injection parameters obtained by analyzing each segmented area according to the pre-trained injection parameter determination model are highly accurate.
[0150] The present application also provides a computer-readable medium having program instructions stored thereon, and when the program instructions are executed by a processor, the printing control method for a digital direct-injection printing machine provided by the above-mentioned various method embodiments is implemented.
[0151] The present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the printing control method for a digital direct-injection printing machine according to each of the above method embodiments.
[0152] See also Figure 7 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , and at least one communication bus 1002 .
[0153] The communication bus 1002 is used to realize the connection and communication between these components.
[0154] The user interface 1003 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface.
[0155] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0156] Among them, the processor 1001 may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect various parts of the entire electronic device 1000, and executes various functions and processes data of the electronic device 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Optionally, the processor 1001 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 1001 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1001, and it can be implemented separately through a chip.
[0157] Among them, the memory 1005 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1005 may also be optionally at least one storage system located away from the aforementioned processor 1001. As Figure 7 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a printing control application for a digital direct-injection printer.
[0158] exist Figure 7In the electronic device 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 1001 can be used to call the printing control application for the digital direct printing machine stored in the memory 1005, and specifically perform the following operations:
[0159] In response to a printing instruction, receiving a textile image fed back by a visual sensor pre-installed on a digital direct-injection printing machine;
[0160] Identifying the area to be printed in the textile image;
[0161] Determine a target segmentation area corresponding to the area to be printed from a pre-designed image to be printed;
[0162] According to the regional center pixel position of the target segmented area, the corresponding target regional jetting parameter is obtained from the pre-constructed mapping relationship between the regional center pixel position and the regional jetting parameter; wherein the mapping relationship is obtained by storing the association relationship between the regional center pixel position of each segmented area and the regional jetting parameter corresponding to each segmented area, each segmented area is obtained by segmenting the image to be printed according to the complexity of the image to be printed, and the regional jetting parameter corresponding to each segmented area is obtained by analyzing each segmented area according to a pre-trained jetting parameter determination model, and the pre-trained jetting parameter determination model is a mathematical model for determining the regional jetting parameter in advance through machine learning;
[0163] According to the jetting speed and ink droplet size indicated by the jetting parameters of the target area, the digital direct jet printing machine is controlled to print the area to be printed, and the step of receiving the textile image fed back by the visual sensor pre-installed on the digital direct jet printing machine is continued.
[0164] In one embodiment, when the processor 1001 generates a pre-built mapping relationship between the center pixel position of the region and the regional spraying parameter, the processor 1001 specifically performs the following operations:
[0165] Receive the original image to be printed uploaded by the client and pre-process it to adapt to the working area and printing requirements of the digital direct printing machine to obtain the image to be printed;
[0166] Calculating the complexity of the target pattern in the image to be printed;
[0167] According to the complexity of the image to be printed, the image to be printed is segmented to obtain multiple segmented areas;
[0168] Input each segmented area into a pre-trained injection parameter determination model, and output the regional injection parameter corresponding to each segmented area;
[0169] Determine the region center pixel position of each segmented region in the image to be printed, and obtain the region center pixel position of each segmented region;
[0170] storing the association relationship between the region center pixel position of each segmented region and the region injection parameter corresponding to each segmented region;
[0171] The association relationship is used as a pre-constructed mapping relationship between the center pixel position of the region and the regional injection parameters.
[0172] In one embodiment, when the processor 1001 generates a pre-trained injection parameter determination model, the processor 1001 specifically performs the following operations:
[0173] Collect multiple historical printing images that have been printed within a preset period;
[0174] Calculating the complexity of the target pattern in each historical print image;
[0175] According to the complexity of the target pattern in each historical printing image, each historical printing image is segmented to obtain a plurality of historical segmentation regions of each historical printing image;
[0176] constructing feature data of each historical segmentation region of each historical print image;
[0177] determining a historical jetting parameter for each historical segmented region of each historical printed image;
[0178] Using the historical ejection parameters of each historical segmented area of each historical printing image as labels to mark the feature data of each historical segmented area of each historical printing image, so as to obtain model training data;
[0179] Machine learning is performed based on the model training data to obtain a pre-trained injection parameter determination model.
[0180] In one embodiment, when the processor 1001 calculates the complexity of the target pattern in each historical printing image, the processor 1001 specifically performs the following operations:
[0181] Convert each historical print image into a grayscale image to obtain a plurality of grayscale images;
[0182] Perform edge detection on each grayscale image to obtain the edge strength of each historical printed image; the edge strength calculation formula is:
[0183]
[0184] in, , , and are the gradients of the image in the horizontal and vertical directions, is the edge strength, is the convolution operation, Print the pixel intensity of each pixel in the image for each history;
[0185] The entropy of the color histogram of each historical printed image is calculated as a color diversity measure of each historical printed image; wherein,
[0186] The calculation formula for the color diversity metric is:
[0187]
[0188] in, is the color diversity measure, It’s the color The probability of appearing in the image, is the number of color channels of the historical printed image;
[0189] The edge strength of each historical printing image and the color diversity measure of each historical printing image are weightedly summed to obtain the complexity of the target pattern in each historical printing image.
[0190] In one embodiment, when executing the construction of feature data of each historical segmented region of each historical print image, the processor 1001 specifically performs the following operations:
[0191] In each historical segmented region of each historical print image, determining a historical pattern;
[0192] Annotating the historical pattern with a marking frame to mark the boundary and position of the historical pattern, and obtaining a historical pattern marking frame for each historical segmentation area of each historical print image;
[0193] Perform feature extraction on the historical pattern annotation frame of each historical segmentation area of each historical print image to obtain feature information of each historical segmentation area of each historical print image;
[0194] Quantifying the feature information of each historical segmentation region of each historical print image to obtain a feature vector of each historical segmentation region of each historical print image;
[0195] The feature vector of each historical segmented region of each historical print image is used as feature data of each historical segmented region of each historical print image.
[0196] In one embodiment, when the processor 1001 extracts features from the historical pattern annotation frame of each historical segmented area of each historical printed image to obtain feature information of each historical segmented area of each historical printed image, the processor 1001 specifically performs the following operations:
[0197] Using an edge detection algorithm, edge features of the historical pattern are extracted from the historical pattern annotation frame of each historical segmented area of each historical print image;
[0198] Extracting texture features of the historical pattern from the historical pattern annotation frame of each historical segmented area of each historical print image;
[0199] Extracting color features of the historical pattern from the historical pattern annotation frame of each historical segmentation area of each historical print image;
[0200] The edge features, texture features and color features of the historical patterns are combined into a feature matrix to obtain feature information of each historical segmentation area of each historical print image.
[0201] In one embodiment, when the processor 1001 extracts features from the historical pattern annotation frame of each historical segmented region of each historical printed image to obtain feature information of each historical segmented region of each historical printed image, the processor 1001 specifically performs the following operations:
[0202] In the historical pattern of each historical segmentation area of each historical print image, corner points and edge points are detected as control points of the Bezier curve;
[0203] According to the control points of the Bezier curve, the Bezier curve is fitted in the historical pattern of each historical segmentation area of each historical print image by the least square method to obtain the Bezier curve of each historical segmentation area of each historical print image;
[0204] The curve order, control point coordinates, curve length and curvature of the Bezier curve of each historical segmentation area of each historical printing image are obtained as feature information of each historical segmentation area of each historical printing image.
[0205] In one embodiment, when the processor 1001 determines the historical ejection parameters of each historical segmented area of each historical printed image, the processor 1001 specifically performs the following operations:
[0206] Acquire actual printing parameters of each historical segmented area of each historical printing image, the actual printing parameters including actual jetting speed and actual ink drop size;
[0207] obtaining a segmented region of the historical textile image corresponding to each historical segmented region of each historical print image;
[0208] extracting ink drop distribution parameters and pattern color parameters from the segmented regions of the historical textile image corresponding to each historical segmented region of each historical print image;
[0209] Parameters of the actual ejection speed and the actual ink droplet size adjusted by the user based on the ink droplet distribution parameters and the pattern color parameters to ensure the best printing quality are received, and the historical ejection parameters of each historical segmented area of each historical printed image are obtained.
[0210] In one embodiment, when the processor 1001 performs machine learning based on the model training data to obtain a pre-trained injection parameter determination model, the following operations are specifically performed:
[0211] A neural network is used to create a model for determining injection parameters;
[0212] Input the model training data into the injection parameter determination model and output the model loss value;
[0213] When the model loss value reaches the minimum, a pre-trained injection parameter determination model is generated; wherein the loss function of the model is:
[0214]
[0215] in, is the loss value, for each historical segmented region of each historical print image, is the predicted ejection parameter predicted for each historical segmented region of each historical print image, is the threshold parameter used to determine the point at which the Huber loss function switches between square loss and linear loss. When the absolute value of the difference between the historical injection parameter and the predicted injection parameter is less than or equal to the threshold parameter, For other situations.
[0216] In the embodiments of the present application, on the one hand, the mapping relationship between the regional center pixel position and the regional injection parameters pre-constructed in the present application stores the association between the regional center pixel position of each segmented area and the regional injection parameters corresponding to each segmented area, so that different segmented areas have the best regional injection parameters, and the dynamic injection parameters ensure that the digital direct injection printer can use different injection speeds and droplet sizes for printing in different printing periods, avoiding uneven ink distribution or inaccurate color caused by increasing the printing speed when printing with global injection parameters; on the other hand, the pre-trained injection parameter determination model is a mathematical model for determining regional injection parameters in advance through machine learning, and the model is trained by adjusting the optimized data set, so that the regional injection parameters obtained by analyzing each segmented area according to the pre-trained injection parameter determination model are highly accurate.
[0217] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program for the printing control of the digital direct-injection printing machine can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium of the program for the printing control of the digital direct-injection printing machine can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0218] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A printing control method for a digital direct-injection printing machine, characterized in that: The method comprises: In response to a printing instruction, receiving a textile image fed back by a visual sensor pre-installed on the digital direct-injection printing machine; Identifying an area to be printed in the textile image; Determining a target segmentation area corresponding to the area to be printed from a pre-designed image to be printed; According to the regional center pixel position of the target segmented area, the corresponding target regional jetting parameter is obtained from a pre-constructed mapping relationship between the regional center pixel position and the regional jetting parameter; wherein the mapping relationship is obtained by storing the association relationship between the regional center pixel position of each segmented area and the regional jetting parameter corresponding to each segmented area, each segmented area is obtained by segmenting the image to be printed according to the complexity of the image to be printed, and the regional jetting parameter corresponding to each segmented area is obtained by analyzing each segmented area according to a pre-trained jetting parameter determination model, and the pre-trained jetting parameter determination model is a mathematical model for determining the regional jetting parameter in advance through machine learning; According to the jetting speed and ink droplet size indicated by the jetting parameters of the target area, the digital direct jet printer is controlled to print the area to be printed, and the step of receiving the textile image fed back by the visual sensor pre-installed on the digital direct jet printer is continued.
2. The method according to claim 1, characterized in that The following steps are used to generate a pre-built mapping relationship between the center pixel position of the region and the region injection parameters, including: Receiving the original image to be printed uploaded by the client and preprocessing it to adapt to the working area and printing requirements of the digital direct-injection printing machine to obtain the image to be printed; Calculating the complexity of the target pattern in the image to be printed; According to the complexity of the image to be printed, the image to be printed is segmented to obtain a plurality of segmented areas; Input each segmented area into a pre-trained injection parameter determination model, and output the regional injection parameter corresponding to each segmented area; Determine the region center pixel position of each segmented region in the image to be printed, and obtain the region center pixel position of each segmented region; storing the association relationship between the region center pixel position of each segmented region and the region injection parameter corresponding to each segmented region; The association relationship is used as a pre-constructed mapping relationship between the center pixel position of the region and the regional injection parameters.
3. The method according to claim 2, characterized in that The following steps are used to generate a pre-trained injection parameter determination model, including: Collect multiple historical printing images that have been printed within a preset period; Calculating the complexity of the target pattern in each historical print image; According to the complexity of the target pattern in each historical print image, segmenting each historical print image to obtain a plurality of historical segmented regions of each historical print image; constructing feature data of each historical segmented area of each historical printed image; Determining a historical ejection parameter of each historical segmented area of each historical print image; Using the historical ejection parameters of each historical segmented area of each historical printed image as labels to mark the feature data of each historical segmented area of each historical printed image to obtain model training data; Machine learning is performed based on the model training data to obtain a pre-trained injection parameter determination model.
4. The method according to claim 3, characterized in that The calculating the complexity of the target pattern in each historical printing image comprises: Convert each of the historical printed images into a grayscale image to obtain a plurality of grayscale images; Perform edge detection on each grayscale image to obtain the edge strength of each historical printed image; wherein the edge strength is calculated as follows: in, , , and are the gradients of the image in the horizontal and vertical directions, is the edge strength, is the convolution operation, The pixel intensity of each pixel in each historical printed image; Calculating the entropy of the color histogram of each of the historical printed images as a color diversity measure of each of the historical printed images; wherein, The calculation formula of the color diversity metric is: in, is the color diversity measure, It’s the color The probability of appearing in the image, is the number of color channels of the historical printed image; The edge strength of each historical printing image and the color diversity metric of each historical printing image are weightedly summed to obtain the complexity of the target pattern in each historical printing image.
5. The method according to claim 3, characterized in that: The step of constructing the feature data of each historical segmented area of each historical print image includes: In each history segmented area of each history print image, determining a history pattern; Marking the historical pattern with a marking frame to mark the boundary and position of the historical pattern, and obtaining the historical pattern marking frame of each historical segmented area of each historical printed image; Extracting features from the historical pattern annotation frame of each historical segmented region of each historical printed image to obtain feature information of each historical segmented region of each historical printed image; Quantifying the feature information of each historical segmented region of each historical printed image to obtain a feature vector of each historical segmented region of each historical printed image; The feature vector of each historical segmented region of each historical print image is used as feature data of each historical segmented region of each historical print image.
6. The method according to claim 5, characterized in that The feature extraction of the historical pattern annotation frame of each historical segmented area of each historical printed image to obtain feature information of each historical segmented area of each historical printed image includes: Using an edge detection algorithm, extracting edge features of the historical pattern from the historical pattern annotation frame of each historical segmented area of each historical printed image; Extracting texture features of the historical pattern from the historical pattern annotation frame of each historical segmented area of each historical printed image; Extracting color features of the historical pattern from the historical pattern annotation frame of each historical segmented area of each historical printed image; The edge features, texture features and color features of the historical pattern are combined into a feature matrix to obtain feature information of each historical segmented area of each historical printed image.
7. The method according to claim 5, characterized in that The feature extraction of the historical pattern annotation frame of each historical segmented area of each historical printed image to obtain feature information of each historical segmented area of each historical printed image includes: In the historical pattern of each historical segmented area of each historical printed image, detecting corner points and edge points as control points of a Bezier curve; According to the control points of the Bezier curve, fitting the Bezier curve in the historical pattern of each historical segmentation area of each historical print image by the least square method to obtain the Bezier curve of each historical segmentation area of each historical print image; The curve order, control point coordinates, curve length and curvature of the Bezier curve of each historical segmented area of each historical printed image are obtained as feature information of each historical segmented area of each historical printed image.
8. The method according to claim 3, characterized in that The determining of the historical ejection parameters of each historical segmented area of each historical printed image comprises: Acquire actual printing parameters of each historical segmented area of each historical printed image, wherein the actual printing parameters include actual jetting speed and actual ink drop size; Acquire a segmented region of the historical textile image corresponding to each historical segmented region of each historical print image; extracting ink droplet distribution parameters and pattern color parameters from the segmented regions of the historical textile image corresponding to each historical segmented region of each historical printed image; Receive the parameters adjusted by the user on the actual ejection speed and the actual ink droplet size based on the ink droplet distribution parameters and the pattern color parameters to ensure the best printing quality, and obtain the historical ejection parameters of each historical segmented area of each historical printed image.
9. The method according to claim 3, characterized in that: The performing machine learning based on the model training data to obtain a pre-trained injection parameter determination model includes: A neural network is used to create a model for determining injection parameters; Inputting the model training data into the injection parameter determination model and outputting a model loss value; When the model loss value reaches the minimum, a pre-trained injection parameter determination model is generated; wherein the loss function of the model is: in, is the loss value, for each historical segmented region of each historical print image, is the predicted ejection parameter predicted for each historical segmented region of each historical print image, is the threshold parameter used to determine the point at which the Huber loss function switches between square loss and linear loss. When the absolute value of the difference between the historical injection parameter and the predicted injection parameter is less than or equal to the threshold parameter, For other situations.
10. A printing control device for a digital direct-injection printing machine, characterized in that: The device comprises: A textile image receiving module, for receiving, in response to a printing instruction, a textile image fed back by a visual sensor pre-installed on the digital direct-injection printing machine; A to-be-printed area recognition module, used for recognizing the to-be-printed area in the textile image; A target segmentation region determination module is used to determine a target segmentation region corresponding to the area to be printed from a pre-designed image to be printed; a target area jet parameter acquisition module, for acquiring the corresponding target area jet parameters from a pre-constructed mapping relationship between the area center pixel position and the area jet parameter according to the area center pixel position of the target segmented area; wherein the mapping relationship is obtained by storing the association relationship between the area center pixel position of each segmented area and the area jet parameter corresponding to each segmented area, wherein each segmented area is obtained by segmenting the image to be printed according to the complexity of the image to be printed, and the area jet parameter corresponding to each segmented area is obtained by analyzing each segmented area according to a pre-trained jet parameter determination model, and the pre-trained jet parameter determination model is a mathematical model for determining the area jet parameter in advance through machine learning; The jet control module is used to control the digital direct-injection printer to print the area to be printed according to the jet speed and ink drop size indicated by the jet parameters of the target area, and continue to execute the step of receiving the textile image fed back by the visual sensor pre-installed on the digital direct-injection printer.
