Printing material control method, device, equipment and medium
By using convolutional neural networks to perform layering and pixel value processing on printed image samples, the problems of flexibility and accuracy in traditional printing material demand calculations are solved, enabling accurate estimation of material requirements and cost control.
Patent Information
- Application Number
- CN202511185247.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2025-12-12
AI Technical Summary
Traditional methods for calculating the demand for printing materials lack flexibility, are inaccurate in forecasting, and are cumbersome to calculate, leading to material shortages or surpluses, which in turn cause production delays and cost overruns.
A convolutional neural network is used to train printed image samples to generate an image layering model. Through image layering, pixel value calculation and binarization, the material requirement is calculated in combination with the unit usage standard.
It enables accurate estimation of printing material requirements, improves production efficiency and reduces costs, and provides flexibility and accuracy in adapting to market changes.
Smart Images

Figure CN121120748A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of printing, in particular to a printing material control method, device, equipment and storage medium. BACKGROUND
[0002] In the traditional printing industry, the calculation of material demand mainly relies on several common methods. Among them, material requirement planning (MRP) is a relatively typical one, which calculates the required material quantity by combining product structure files (BOM) and master production schedules (MPS). In addition, the experience estimation method is also widely used, which mainly relies on historical data and the past experience of operators to predict material demand, especially suitable for small-scale production enterprises with relatively fixed product types. Statistical analysis method predicts future material demand by analyzing historical sales data and production data with the help of statistical models, but this method requires a large amount of historical data as support.
[0003] However, these traditional methods have many problems in actual application. The MRP method is usually based on fixed production plans and bill of materials, and it is difficult to quickly adapt to the rapid changes in market demand, and the flexibility is obviously insufficient. The statistical analysis method has high requirements for the integrity and accuracy of data, and if the historical data is inaccurate or incomplete, the reliability of the prediction result will be greatly reduced, and it is relatively complex. For complex printing products, the process of calculating material demand using traditional methods is often very tedious and prone to errors. More importantly, most traditional methods cannot update material demand information in real time, lacking real-time performance. This may lead to problems of material shortage or excess, and further cause a series of serious consequences such as material waste, production delay, unstable product quality, and cost out of control. SUMMARY
[0004] The main purpose of the present application is to provide a printing material control method, device, equipment and storage medium, which solves the problems of insufficient flexibility, inaccurate prediction and tedious calculation of traditional printing material demand estimation methods.
[0005] To achieve the above purpose, the present application provides a printing material control method, comprising:
[0006] obtaining a printing image sample and inputting the printing image sample into a convolutional neural network for training to generate an image layering model;
[0007] inputting a printing design file into the image layering model for image layering to obtain a layered image;
[0008] calculating the sum of pixel values of each channel of each layered image, and converting the layered image into a binary image according to the sum of pixel values of each channel;
[0009] determine a printing area of the printing design file according to the binary image;
[0010] calculate the material requirement amount by the printing area and a unit consumption standard.
[0011] Further, to achieve the above object, the present application provides a printing material control device, comprising:
[0012] a model training module, configured to acquire a printing image sample and input the printing image sample into a convolutional neural network for training to generate an image layering model;
[0013] an image layering module, configured to input a printing design file into the image layering model for image layering to obtain a layered image;
[0014] a value conversion module, configured to calculate a sum of pixel values of each channel of the layered image and convert the layered image into a binary image according to the sum of pixel values of each channel;
[0015] a printing area module, configured to determine a printing area of the printing design file according to the binary image;
[0016] a material calculation module, configured to calculate the material requirement amount by the printing area and a unit consumption standard. Further, to achieve the above object, the present application also provides a computer device, comprising a memory, a processor and a printing material calculation program stored in the memory and executable on the processor, wherein the printing material calculation program, when executed by the processor, implements the steps of the printing material control method as described above.
[0017] Further, to achieve the above object, the present application also provides a computer readable storage medium, wherein the storage medium stores a printing material calculation program, and the printing material calculation program, when executed by a processor, implements the steps of the printing material control method as described above.
[0018] Beneficial effects: The present application relates to the technical field of printing, and discloses a printing material control method, comprising: acquiring a printing image sample and inputting the printing image sample into a convolutional neural network for training to generate an image layering model; inputting a printing design file into the image layering model for image layering to obtain a layered image; calculating a sum of pixel values of each channel of the layered image and converting the layered image into a binary image according to the sum of pixel values of each channel; determining a printing area of the printing design file according to the binary image; and calculating the material requirement amount by the printing area and a unit consumption standard. The present application automatically layers a printing design file by using artificial intelligence, calculates the printing area of each layer, estimates the material requirement in combination with a unit consumption standard, improves production efficiency and reduces cost. BRIEF DESCRIPTION OF DRAWINGS
[0019] The present application will be further described below in conjunction with the accompanying drawings and embodiments, in which:
[0020] Figure 1 An application environment diagram of the printing material control method in an embodiment of the present application;
[0021] Figure 2 A flow diagram of the printing material control method in an embodiment of the present application;
[0022] Figure 3 A diagram of image layering in the printing material control method of the present application;
[0023] Figure 4 A functional module diagram of the printing material control device of the present application;
[0024] Figure 5 A structure diagram of a computer device in an embodiment of the present application;
[0025] Figure 6 Another structure diagram of a computer device in an embodiment of the present application. DETAILED DESCRIPTION
[0026] It should be understood that the specific embodiments described herein are merely intended to explain the present application, and are not intended to limit the present application.
[0027] The printing material control method provided by the embodiments of the present application can be applied in an application environment as shown in Figure 1 , wherein a user end communicates with a service end through a network. The service end can obtain a printing image sample through the user end, input the printing image sample into a convolutional neural network for training to generate an image layering model, input a printing design file into the image layering model for image layering to obtain layered images, calculate the sum of pixel values of each channel of each layered image, and convert the layered images into binary images according to the sum of pixel values of each channel. The printing area of the printing design file is determined according to the binary images, and the material requirement is calculated through the printing area and a unit consumption standard. The present application improves the production efficiency and reduces the cost by automatically layering the printing design file through artificial intelligence, calculating the printing area of each layer, and estimating the material requirement in combination with the unit consumption standard. The user end can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The service end can be implemented by an independent server or a server cluster composed of multiple servers. The present application will be described in detail below through specific embodiments.
[0028] Please refer to Figure 2 , Figure 2A flowchart of an embodiment of the printing material control method provided by the present application. It should be noted that although a logical sequence is shown in the flowchart, in some cases, the steps shown or described can be performed in an order different from that shown.
[0029] As shown in Figure 2 The printing material control method provided by the present application includes the following steps:
[0030] S100, acquiring a printing image sample and inputting the printing image sample into a convolutional neural network for training to generate an image layering model;
[0031] S200, inputting a printing design file into the image layering model for image layering to obtain a layered image;
[0032] S300, calculating the sum of pixel values of each channel of the layered image and converting the layered image into a binary image according to the sum of pixel values of each channel;
[0033] S400, determining a printing area of the printing design file according to the binary image;
[0034] S500, calculating the material requirement amount by the printing area and a unit usage standard.
[0035] In this embodiment, by combining artificial intelligence layering technology and digital image processing technology, accurate estimation of printing material requirements is realized, improving the accuracy and flexibility of estimation and adapting to the production needs of various printing enterprises. First, a large number of printing image samples covering different printing processes and hierarchical structures are collected to ensure that the samples cover various actual production scenarios. Image annotation tools such as LabelImg, VGG Image Annotator, etc. are used to manually annotate the samples, with different colors used to annotate each layer of process type and boundary, with the boundary error controlled within a preset pixel; at the same time, different labels are used to clearly indicate the upper and lower relationship of layer superposition, reflecting the spatial logic of the layers.
[0036] Next, a convolutional neural network (CNN) is selected to train the annotated sample set, so that the model learns the features and hierarchical relationships of different process layers, and finally generates an image layering model that can automatically layer. The printing design file to be processed is input into the above image layering model, and the model automatically identifies and separates various process layers (such as ink printing layers, varnish layers, gold stamping layers, etc.), and each layered image is saved in tif format to provide basic data for subsequent calculations.
[0037] Then, the sum of pixel values is calculated for each channel of each layered image (usually 3 channels, such as RGB), and the channel with the smallest sum of pixel values is selected (this channel is more likely to distinguish between printed and non-printed areas). The selected channel is binarized by setting a threshold value (e.g. 235), where pixel values ≥ 235 are determined to be blank non-printed areas and the corresponding pixel values are set to 0, and pixel values < 235 are determined to be printed areas and the corresponding pixel values are set to 1, resulting in a binary image containing only 0s and 1s. The number of pixels with a value of 1 (printed areas) in the binary image is counted, as well as the total number of pixels determined by the crop frame. The actual size of the product (length x width) is known, and the ratio of pixels to actual size (actual area per pixel) is calculated from the total number of pixels. The printed area is calculated by converting the proportion of printed area pixels to actual area.
[0038] At the same time, the differences in printing quality of a large number of printed samples are counted, and the quality of the samples before and after printing is measured under various process environments, and the difference (single material usage) is calculated, and the average value is taken as the unit usage standard of the process.
[0039] Finally, the total material demand is calculated by combining the printed area, unit usage standard, number of repeated printing units in a single sheet (D), and the number of prints (T). The above process uses artificial intelligence layering and digital image processing technology to accurately estimate the demand for printing materials, improving the accuracy and flexibility of the estimate and adapting to the production needs of various printing enterprises.
[0040] In one embodiment, the step S100 comprises:
[0041] S101, obtaining a printed image sample and labeling the printed image sample;
[0042] S102, inputting the labeled printed image sample into a convolutional neural network;
[0043] S103, the convolutional neural network identifies and analyzes the printed image sample according to the labeling information to generate an image layering model.
[0044] In this embodiment, a large number of printed image samples are collected, which should cover different types of printing processes and layer structures. Specifically, it includes ink printing layers, including solid color areas (large area solid color areas) and screening layers (gradual or halftone areas). The varnish layer is used to increase the gloss or protect the printed product. The silk screen snowflake layer is a special effect layer achieved through silk screen printing technology, such as snowflake texture. The gold stamping layer is used for gold stamping process. The samples should be as diverse as possible to ensure that the model can be generalized to various practical application scenarios.
[0045] Use professional image annotation tools such as LabelImg, VGG Image Annotator (VIA), etc. Label the printing process type of each layer. Accurately label the boundary of each layer to ensure the clarity of the layer boundary. There is an overlapping relationship between the layers, so the hierarchical relationship of each layer needs to be clearly labeled during annotation.
[0046] Select a convolutional neural network (CNN) model suitable for image segmentation tasks. Commonly used models include U-Net, which is suitable for medical image segmentation and also suitable for printing image layering. Mask R-CNN can simultaneously perform target detection and segmentation, suitable for complex layering tasks. DeepLab performs well in semantic segmentation tasks and is suitable for printing image layering.
[0047] Preprocess the labeled sample images, including adjusting image size, normalizing pixel values, etc. Input the preprocessed images into the CNN model for training. The model will learn how to identify and separate different printing process layers based on the annotation information. Use appropriate loss functions (such as cross-entropy loss) to measure the difference between the model's predictions and the true annotations. Use optimization algorithms (such as Adam, SGD) to update the model's weights to minimize the loss function. During training, use the validation set to evaluate the model's performance and adjust the model parameters as needed.
[0048] After training, the obtained image layering model can automatically perform intelligent layering on new printing design files. Evaluate the model's accuracy and generalization ability using the test set to ensure its reliability in actual application. Save the layered images in tif format. Tif format is a lossless compression image format suitable for saving high-resolution image data, which can preserve image details and quality. The saved layered images can be used for subsequent printing area calculation and material estimation.
[0049] By collecting diverse printing image samples and using image annotation tools to perform detailed process, boundary, and hierarchical relationship labeling, and then training using a convolutional neural network (CNN) model, a model can be generated that can automatically perform intelligent layering on printing design files. The layered images are saved in tif format for subsequent printing area calculation and material estimation. This method improves the accuracy and efficiency of layering, providing a solid foundation for material demand estimation for printing enterprises.
[0050] In one embodiment, the step S101 comprises:
[0051] S1011, labeling the printing process type of each layer of the printing image sample;
[0052] S1012, boundary labeling of the boundary of each layer of the printing image sample;
[0053] S1013, label the interlayer superposition relationship of the printed image sample.
[0054] In this embodiment, as shown in Figure 3 In order to realize intelligent layering of the printing design file, the printing process type, boundary and hierarchical relationship of each layer are labeled in detail, which constitutes the key training data of the image sample and provides a clear basis for the learning of the convolutional neural network (CNN) model.
[0055] First, the process of each layer of printing process type is labeled. The printing process type corresponding to each layer in the printed image sample is clearly defined, such as ink printing layer (solid layer or screening layer), varnish layer, silk screen snowflake layer, gold stamping layer, etc. The process type of each layer is distinguished and labeled by different colors (for example, the gold stamping layer can be labeled with a specific color, and the offset ink layer is labeled with another color), so that each process type has intuitive visual distinction in the image. This enables the model to accurately identify the characteristics of different process layers during training, providing a basis for process type judgment in subsequent automatic layering.
[0056] Second, the boundary of each layer is labeled. The physical boundary of each layer is precisely defined to ensure that the boundary is clear and distinguishable, and the boundary error is controlled within a predetermined pixel range (such as the precision requirement implied by the document to avoid layering errors due to blurred boundaries). The spatial range of each layer is clearly defined to avoid overlapping or confusion of the boundaries of different process layers, ensuring the accuracy of subsequent calculation of printing area (clear boundaries are the basis for accurately counting the pixels of the printing area).
[0057] Finally, the hierarchical relationship of the superposition relationship is labeled. The relative position of each layer (such as Figure 1 The hierarchical structure of "gold stamping layer → offset / gravure ink layer → paper substrate" is labeled. The relative position of each layer is distinguished by different labels (for example, "upper layer", "lower layer" or serial number labels are used to clearly define the relative position). This enables the model to understand the spatial superposition logic of the layers, ensuring that the actual arrangement order of each process layer can be correctly restored during automatic layering, avoiding errors in material estimation due to incorrect hierarchical relationship (such as the gold stamping layer needs to be overlaid on a specific ink layer, and incorrect hierarchical relationship will affect the rationality of material usage calculation).
[0058] In summary, process labeling, boundary labeling and hierarchical relationship labeling together constitute the key training data of the image sample. These labels provide a clear basis for the convolutional neural network (CNN) model to learn the process characteristics, spatial boundaries and hierarchical logic of the printing layers, ultimately realizing intelligent layering of the printing design file.
[0059] In one embodiment, the step S300 comprises:
[0060] S301, calculate the sum of each channel pixel value of each layered image;
[0061] S302, select the channel with the smallest value in the sum of each channel pixel value;
[0062] S303, compare each pixel value of the smallest channel with a binary threshold value;
[0063] S304, if the pixel value is greater than or equal to the binary threshold value, it is determined to be a non-printing area, and the layered image is converted into a binary image with a pixel value of zero;
[0064] S305, if the pixel value is less than the binary threshold value, it is determined to be a printing area, and the layered image is converted into a binary image with a pixel value of one.
[0065] In this embodiment, through digital image processing technology, the printing area of each layered image (such as ink layer, gold stamping layer, etc.) is accurately calculated, which provides basic data for subsequent material demand estimation. First, the printing image is usually a color image, which contains 3 channels (such as RGB channels, corresponding to red, green and blue color components respectively). The sum of the pixel values of each of the 3 channels of each layered image is calculated to obtain the total pixel value of each channel (i.e. the cumulative result of the values of all pixels in the channel). By comparing the total pixel values of the 3 channels, the channel with the smallest sum is selected. The pixel distribution of this channel can better highlight the difference between the printing area and the blank area, and is suitable for subsequent binary processing.
[0066] Next, the color or grayscale image is converted into an image containing only black (pixel value 0) and white (pixel value 1) colors to distinguish the target area (printing area) and background area (non-printing area). The selected "channel with the smallest sum" is processed (the contrast of this channel is more suitable for distinguishing printing and non-printing areas). For example, the binary threshold value is set to 235 (the pixel value range is usually 0-255). When the value of a pixel in the channel is ≥ 235, it is determined to be a blank non-printing area, and the corresponding pixel value of the binary image is 0; when the pixel value is < 235, it is determined to be a printing area, and the corresponding pixel value of the binary image is 1.
[0067] Through the above binary processing, each layered image is converted into a binary image containing only 0 (non-printing) and 1 (printing). The image clearly presents the outline of the printing area, and the actual area of the printing area can be calculated by counting the number of pixels with a pixel value of 1 and combining the ratio relationship between the image and the actual size. Binary processing simplifies image information, eliminates irrelevant color interference, accurately separates printing and non-printing areas, and provides clear and quantifiable basis for subsequent area calculation, which is a core step to ensure the accuracy of printing area calculation.
[0068] In one embodiment, the step S400 comprises:
[0069] S401, counting the number of pixels of the binary image with pixel value of 1;
[0070] S402, obtaining data information of the printing design file, and determining a printing design area according to the data information;
[0071] S403, determining a cutting frame according to the printing design file, and calculating a total pixel number according to the cutting frame;
[0072] S404, calculating a pixel ratio by the pixel number and the total pixel number;
[0073] S405, calculating a printing area according to the pixel ratio and the printing design area.
[0074] In the embodiment, the pixel information of the digital image is combined with the actual physical size to realize accurate quantification of the printing area, which provides a core parameter for subsequent calculation of the material demand quantity. Firstly, the pixel ratio of the printing area (pixel value of 1) in the binary image is counted, and the actual printing area of the layered image is calculated in combination with the proportional relationship between the image and the actual size. The specific steps are as follows: after the binary processing of the layered image, the image only contains two types of pixels, i.e. the printing area (pixel value of 1) and the blank area (pixel value of 0). The total number of pixels of the printing area (denoted as P_print) and the total number of pixels of the image (denoted as P_total, which can be determined by selecting the cutting frame, i.e. the sum of all pixels in the cutting frame) are counted. Then, the pixel ratio R of the printing area is calculated as P_print / P_total, which reflects the area ratio of the printing area in the image.
[0075] Then, the real physical size (length x width) of the product is obtained, so that the actual total area s (unit: such as cm 2 ) of the product is directly calculated as s=lengthxwidth. By selecting the cutting frame (such as the "red box" mentioned in the document) on the image, the total pixel number p corresponding to the frame is determined (i.e. P_total=p). The square proportional relationship k 2 between the pixel and the actual size is calculated, and the formula is k 2 =s / p, which represents the actual area (unit: such as cm 2 / pixel) corresponding to each 1 pixel.
[0076] Finally, the pixel ratio R and the proportional coefficient k 2 are combined to obtain the calculation formula of the printing area: S_layer=Rxs=P_print / P_totalxs=P_printxk 2The essence is that the number of pixels in the printing area is multiplied by the actual area corresponding to each pixel to obtain the actual printing area. The binary image (containing pixel values 0 and 1) of each layered image needs to be saved in png format. By viewing the png image, it can be directly checked whether the division of the printing area and the blank area is accurate (such as whether the boundary is clear, whether there are misjudged pixels), thereby verifying the rationality of the printing area calculation result and ensuring the reliability of the data.
[0077] Through the above process, the pixel information of the digital image is associated with the actual physical size, the precise quantification of the printing area is realized, the error of traditional manual estimation is avoided, and the core parameter for the subsequent calculation of the material requirement quantity (such as the ink consumption) is provided. It is the key link of the entire estimation system.
[0078] In one embodiment, the step S500 comprises:
[0079] S501, obtaining a preset number of printing samples;
[0080] S502, measuring the quality before printing and the quality after printing of the printing sample under each printing process environment;
[0081] S503, determining the printing quality difference according to the quality before printing and the quality after printing;
[0082] S504, calculating the average consumption of each material according to the printing quality difference, and taking the average consumption as the unit consumption standard;
[0083] S505, calculating the material requirement quantity according to the printing area, the unit consumption standard, the number of layout combinations and the number of prints.
[0084] In this embodiment, first, a preset number of printing samples are collected, which should cover different product types (such as packaging, books, etc.) and common printing processes (such as offset printing, gold stamping, silk printing, etc.), so as to ensure that the samples can reflect the material use scene in actual production. Through multi-sample statistical analysis, the influence of individual difference on the material consumption calculation is eliminated, thereby ensuring the universality of the unit consumption standard.
[0085] The measurement is performed in a standard production environment corresponding to the printing process (such as a flexographic printing workshop, a hot stamping station, etc.), ensuring stable environmental parameters (such as temperature, pressure), and reducing external interference. The same sheet is measured using high-precision weighing equipment (such as an electronic balance) to measure its pre-printing mass (such as the base mass without ink or hot stamping) and post-printing mass (total mass after completing the corresponding process), ensuring the accuracy of the mass data (error controlled within a predetermined range). The printing mass difference AM is obtained by subtracting the pre-printing mass from the post-printing mass. AM directly reflects the amount of material consumed (such as ink, hot stamping foil, etc.) by the single sample sheet in the process.
[0086] The AM of all sample sheets in the same process is statistically analyzed to calculate the average value, which is the unit consumption standard A (unit: g / sheet) of the process. The formula is: A = (AM1 + AM2 +... + AMn) / n (n is the number of sample sheets). This standard is separately established for different processes (such as flexographic ink standard, hot stamping standard, etc.), ensuring the process-specificity of material consumption calculation. n
[0087] In actual production, the printing area (Slayer) is the actual printing area obtained through the binary processing and pixel conversion described above; the unit consumption standard (A) is the single sheet / unit area material consumption determined through the above steps; the number of imposition groups (D) is the number of repeated printing content on an impression (determined by the process master according to the paper size and product size); and the number of impressions (T) is the total printing quantity required by the customer order. Through the formula H = A x Slayer x D x T, the total material demand H in the process can be calculated, which is directly used to guide procurement and inventory management, ensuring that material supply matches production demand.
[0088] Through the above steps, the whole process quantification from sample statistics to standard establishment and then to actual demand calculation is realized, ensuring the accuracy of material estimation and process adaptability, providing data support for cost control and production efficiency improvement of printing enterprises.
[0089] In one embodiment, the step S505 includes:
[0090] S5051, calculating the material demand of a single impression according to the printing area and the unit consumption standard;
[0091] S5052, calculating the imposition material demand according to the material demand of a single impression and the number of imposition groups;
[0092] S5053, calculating the total material demand according to the imposition material demand and the number of impressions.
[0093] In this embodiment, first, by calculating the printing area (S layer) of each layered image and the unit usage standard (A) obtained by statistical analysis of a large number of printing samples, the material requirement amount (H single) of a single sheet can be obtained. The calculation formula is H single = S layer x A. For example, if the printing area of a certain layered image is 0.5 square meters, and the unit usage standard is 0.2 kg / square meter, then the material requirement amount of a single sheet is 0.1 kg.
[0094] Secondly, the number of repeated printing content on a sheet (D) is calculated by the craftsman according to the actual size of the product and the size of the production paper, and the principle of not wasting paper. The calculation formula of the material requirement amount of the plate (H plate) is H plate = H single x D. For example, if the material requirement amount of a single sheet is 0.1 kg, and the number of plate combinations is 4, then the material requirement amount of the plate combination is 0.4 kg.
[0095] Finally, the printing quantity (T) given by the customer when ordering is the quantity of the product to be printed. The calculation formula of the total material requirement amount (H total) is H total = H plate x T. For example, if the material requirement amount of the plate combination is 0.4 kg, and the number of prints is 1000, then the total material requirement amount is 400 kg.
[0096] Through the above "single sheet → plate combination → total demand" layered calculation, the abstract printing area is closely related to the layout method in actual production and the order quantity, ensuring that the material requirement amount estimation can match the production process of the printing enterprise, thereby improving the accuracy and practicality of the material requirement estimation.
[0097] In an embodiment, a printing material control device is provided, which corresponds to the printing material control method in the above embodiment. Referring to Figure 4 , Figure 4 is a functional module schematic diagram of a preferred embodiment of the printing material control device of the present application. The context encoding module 10, the historical feature management module 20, the distribution prediction module 30, the voice waveform point generation module 40, the waveform feature encoding module 50 and the voice synthesis control module 60. The detailed description of each functional module is as follows:
[0098] The model training module 10 is used to obtain a printing image sample and input the printing image sample into a convolutional neural network for training to generate an image layered model;
[0099] The image layering module 20 is used to input a printing design file into the image layered model for image layering to obtain a layered image;
[0100] a value conversion module 30 configured to calculate a sum of pixel values of each layer image and convert the layer image into a binary image according to the sum of pixel values of each channel;
[0101] a printing area module 40 configured to determine a printing area of the printing design file according to the binary image;
[0102] a material calculation module 50 configured to calculate a material requirement according to the printing area and a unit consumption standard.
[0103] In an embodiment, the model training module 10 comprises:
[0104] a labeling unit configured to obtain a printing image sample and label the printing image sample;
[0105] a data input unit configured to input the labeled printing image sample into a convolutional neural network;
[0106] a model training unit configured to identify and analyze the printing image sample according to the labeling information by using the convolutional neural network to generate an image layering model.
[0107] In an embodiment, the labeling unit comprises:
[0108] process labeling of each layer printing process type of the printing image sample;
[0109] boundary labeling of a boundary of each layer of the printing image sample;
[0110] labeling of a layer superposition relationship of the printing image sample.
[0111] In an embodiment, the value conversion module 30 comprises:
[0112] a pixel value sum unit configured to calculate a sum of pixel values of each layer image;
[0113] a minimum channel unit configured to select a channel with a minimum value in the sum of pixel values of each channel, and compare each pixel value of the channel with a binary threshold value;
[0114] a non-printing unit configured to, if the pixel value is greater than or equal to the binary threshold value, determine a non-printing area, and convert the layer image into a binary image with a pixel value of zero;
[0115] a printing unit configured to, if the pixel value is less than the binary threshold value, determine a printing area, and convert the layer image into a binary image with a pixel value of one.
[0116] In an embodiment, the printing area module 40 comprises:
[0117] a pixel number unit configured to count a number of pixels of the binary image with a pixel value of one;
[0118] a printing design area unit configured to obtain data information of a printing design file, and determine a printing design area according to the data information;
[0119] a total pixel number unit configured to determine a cutting frame according to the printing design file, and calculate a total pixel number according to the cutting frame;
[0120] a pixel ratio unit configured to calculate a pixel ratio according to the pixel number and the total pixel number;
[0121] a printing area unit configured to calculate a printing area according to the pixel ratio and the printing design area.
[0122] In an embodiment, the material calculation module 50 comprises:
[0123] a printing area unit configured to obtain a preset number of printing samples;
[0124] a quality measurement unit configured to measure a pre-printing quality and a post-printing quality of the printing samples in each printing process environment;
[0125] a printing quality difference unit configured to determine a printing quality difference according to the pre-printing quality and the post-printing quality
[0126] a unit consumption standard unit configured to calculate an average consumption of each material according to the printing quality difference, and take the average consumption as a unit consumption standard;
[0127] a material demand amount unit configured to calculate a material demand amount according to the printing area, the unit consumption standard, the number of imposition sheets, and the number of prints.
[0128] In an embodiment, the material demand amount unit comprises:
[0129] calculating a material demand amount of a single print according to the printing area and the unit consumption standard;
[0130] calculating an imposition material demand amount according to the material demand amount of the single print and the number of imposition sheets;
[0131] calculating a total material demand amount according to the imposition material demand amount and the number of prints.
[0132] In an embodiment, a computer device is provided, which can be a server, and an internal structure diagram of the computer device can be as shown in Figure 5As shown in the figure. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes non-volatile and / or volatile storage media, internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with the external user terminal through the network connection. The computer program is executed by the processor to realize the functions or steps of the server side of the printed material control method.
[0133] In one embodiment, a computer device is provided, which can be a user terminal, and its internal structure diagram can be as shown in the figure. Figure 6 As shown in the figure. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes non-volatile storage media, internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with the external server through the network connection. The computer program is executed by the processor to realize the functions or steps of the user side of the printed material control method
[0134] In one embodiment, a computer device is provided, including a memory, a processor and a computer program stored on the memory and executable on the processor, and the processor executes the computer program to realize the following steps:
[0135] Obtain a printed image sample, and input the printed image sample into a convolutional neural network for training to generate an image layering model;
[0136] Input a printed design file into the image layering model for image layering to obtain a layered image;
[0137] Calculate the sum of pixel values of each channel of the layered image, and convert the layered image into a binary image according to the sum of pixel values of each channel;
[0138] Determine the printing area of the printed design file according to the binary image;
[0139] Calculate the material requirement amount by the printing area and the unit consumption standard.
[0140] In one embodiment, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to realize the following steps:
[0141] An image sample is obtained and input into a convolutional neural network for training to generate an image layering model.
[0142] A printing design file is input into the image layering model for image layering to obtain a layered image.
[0143] The sum of pixel values of each channel of the layered image is calculated, and the layered image is converted into a binary image according to the sum of pixel values of each channel.
[0144] The printing area of the printing design file is determined according to the binary image.
[0145] The material requirement is calculated according to the printing area and the unit usage standard.
[0146] It should be noted that the functions or steps described above in relation to the computer readable storage medium or the computer device can correspond to the relevant descriptions of the server side and the user side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0147] Those skilled in the art can understand that all or part of the processes in the foregoing method embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the foregoing method embodiments. In the embodiments provided in the present application, any reference to memory, storage, database or other medium can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM) and memory bus dynamic RAM (RDRAM).
[0148] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is taken as an example, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.
[0149] It should be noted that if non-company software tools or components appear in the embodiments of the present application, they are only used for example introduction and do not represent actual use. The above-described embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method of print material control, characterized by, The method comprises the following steps: acquiring a printed image sample and inputting the printed image sample into a convolutional neural network for training to generate an image layering model; inputting a printed design file into the image layering model for image layering to obtain a layered image; calculating a sum of pixel values of each channel of the layered image and converting the layered image into a binary image according to the sum of pixel values of each channel; determining a printing area of the printed design file according to the binary image; calculating a material requirement quantity according to the printing area and a unit consumption standard.
2. The printed material control method of claim 1, wherein, The acquiring of the printed image sample and the inputting of the printed image sample into the convolutional neural network for training to generate the image layering model comprises: acquiring a printed image sample and labeling the printed image sample; inputting the labeled printed image sample into the convolutional neural network; the convolutional neural network identifies and analyzes the printed image sample according to the labeling information to generate the image layering model.
3. The printed material control method of claim 2, wherein, The acquiring of the printed image sample and the labeling of the printed image sample comprise: process labeling of each layer of the printed image sample; boundary labeling of each layer of the printed image sample; labeling of an interlayer superposition relationship of the printed image sample.
4. The printed material control method of claim 1, wherein, The calculating of the sum of pixel values of each channel of the layered image and the converting of the layered image into the binary image according to the sum of pixel values of each channel comprise: calculating the sum of pixel values of each channel of the layered image; selecting a channel with the smallest numerical value in the sum of pixel values of each channel and comparing each pixel value of the channel with a binary threshold value; if the pixel value is greater than or equal to the binary threshold value, determining a non-printing area and converting the layered image into a binary image with a pixel value of zero; if the pixel value is less than the binary threshold value, determining a printing area and converting the layered image into a binary image with a pixel value of one.
5. The printed material control method of claim 4, wherein, The determining of the printing area of the printed design file according to the binary image comprises: counting a pixel quantity of the binary image with a pixel value of one; acquiring data information of the printed design file and determining a printing design area according to the data information; determining a cutting frame according to the printed design file and calculating a total pixel quantity according to the cutting frame; calculating a pixel ratio value through the pixel quantity and the total pixel quantity; calculating the printing area according to the pixel ratio value and the printing design area.
6. The printed material control method of claim 1, wherein, The calculating of the material requirement quantity according to the printing area and the unit consumption standard comprises: acquiring a preset number of printed samples; measuring a pre-printing quality and a post-printing quality of the printed samples under each printing process environment; determining a printing quality difference according to the pre-printing quality and the post-printing quality; calculating an average consumption quantity of each material according to the printing quality difference and taking the average consumption quantity as a unit consumption standard; calculating the material requirement quantity according to the printing area, the unit consumption standard, a number of layout combinations and a number of prints.
7. The printed material control method of claim 1, wherein, The calculating of the material requirement quantity according to the printing area, the unit consumption standard, the number of layout combinations and the number of prints comprises: calculating a material requirement quantity of a single print according to the printing area and the unit consumption standard; calculating a layout combination material requirement quantity according to the material requirement quantity of the single print and the number of layout combinations; According to the total material requirement and the number of prints, the total material requirement is calculated.
8. A print material control device, characterized by, The printing material control device comprises: a model training module configured to acquire a printing image sample and input the printing image sample into a convolutional neural network for training to generate an image layering model; an image layering module configured to input a printing design file into the image layering model for image layering to obtain a layered image; a value conversion module configured to calculate a sum of pixel values of each channel of the layered image and convert the layered image into a binary image according to the sum of pixel values of each channel; a printing area module configured to determine a printing area of the printing design file according to the binary image; a material calculation module configured to calculate a material requirement by the printing area and a unit consumption standard.
9. A computer device, comprising: The computer device comprises a memory, a processor, and a printing material calculation program stored in the memory and executable on the processor, and the printing material calculation program, when executed by the processor, implements the steps of the printing material control method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a printing material calculation program, and the printing material calculation program, when executed by the processor, implements the steps of the printing material control method according to any one of claims 1-7.
Citation Information
Patent Citations
An image processing method and device
CN113191377A
Method and device for measuring surface area of material, electronic equipment and medium
CN117274361A
Container identification method and device applied to quay crane system
CN117935274A
Printing quality evaluation monitoring system and method based on image analysis
CN119579502A
Offset printing lithographic plate high-saturation packaging color-reducing printing method, device, equipment and medium
CN120481448A