Inkjet printing image processing method and system based on SRCNN network
By adopting an image processing method based on SRCNN network in inkjet printing, the problem of ambient light instability affecting image clarity is solved, and precise identification of ink drop edges and overlapping areas are achieved and the quality improvement of inkjet printing is improved.
Patent Information
- Application Number
- CN202411710407.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-14
AI Technical Summary
During inkjet printing, unstable ambient light or vibration may affect the clarity and stability of the image, resulting in blurred or insignificant images of the inkjet printing.
Using an inkjet printing image processing method based on SRCNN network, images were collected by 4K gold same-axis photoelectron optical microscope, grayscale processing and contour map analysis were performed, and low-resolution images were super-resolution reconstruction using the SRCNN algorithm, image features were extracted and training models were established to identify the edges and overlapping areas of ink droplets.
Super-resolution reconstruction of low-resolution images and precise identification of ink drop overlapping areas are realized, the quality and efficiency of inkjet printing are significantly improved, and the full process automation and intelligence from image acquisition to printing work is realized.
Smart Images

Figure CN119625726A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of inkjet printing processing, and in particular relates to an inkjet printing image processing method and system based on a SRCNN network. Background Art
[0002] Inkjet printing is a common digital printing method that forms images or text by ejecting ink particles. The core of inkjet printing is a print head, which is composed of many tiny nozzles. These nozzles vibrate at high frequency through an electromagnetic field to eject ink from the nozzles. The circuit that controls the ink ejection precisely controls the ejection position and time of the ink nozzle according to the image and text information in the print document.
[0003] In order to improve the accuracy of image processing, the commonly used method is to extract the edge of the image using an edge detection operator, and then perform graphic recognition through the Hough algorithm to obtain pattern size information. For example, the patent application number is 202410126788.4, which discloses an inkjet printing image processing method and system based on edge detection technology. The method includes the following steps: using a microscope to observe and capture the inkjet printing image, and using Open CV image technology to identify the microscope collected image to obtain the image to be processed; preprocessing the image to be processed to obtain the preprocessed image; using the edge detection operator to extract the image edge of the preprocessed image; using the Hough algorithm to perform graphic recognition on the image edge to obtain pattern size information; calibrating and proportionally converting the pixel coordinates of the microscope collected image and the actual size of the inkjet printing image, and converting the pixel unit of the pattern size information into the size unit. The invention has the advantages of fast, accurate, and intuitive, and can be well applied to the field of inkjet printing, filling the gap in the field in the system's rapid detection and evaluation of inkjet printing effects.
[0004] However, during the above-mentioned microscope observation and image acquisition process, if the ambient light is unstable or there is vibration, it may affect the clarity and stability of the image, making the inkjet printed image blurred and inconspicuous. Therefore, we need to propose an inkjet printing image processing method and system based on the SRCNN network to solve the above-mentioned problems, so that it can process the collected low-resolution images through the SRCNN algorithm to obtain the corresponding high-resolution images and realize the accurate recognition of ink droplets. Summary of the invention
[0005] In view of the above problems, the present invention provides an inkjet printing image processing method based on SRCNN network, comprising the following steps:
[0006] S1. Use a 4K gold coaxial photoelectron optical microscope to collect inkjet printing images of pure color blocks with different dot area ratios;
[0007] S2, grayscale the collected image, and convert the color image into a single-channel grayscale image;
[0008] S3, drawing a contour map of grayscale values according to the characteristics of the grayscale image, and analyzing the contour shape and position of the contour map to identify the overlapping area of the ink droplets;
[0009] S4, using the SRCNN algorithm to learn the end-to-end mapping relationship between low-resolution and high-resolution images through a convolutional neural network, and reconstructing a high-resolution image from a low-resolution image;
[0010] S5, extracting image features from the reconstructed high-resolution image, establishing a training model according to the image features, and training and testing the training model to evaluate the performance of the training model;
[0011] S6. Analyze the reconstructed high-resolution image according to the performance of the training model, identify the edges and overlapping areas of the ink droplets, and perform printing operations according to the identification results.
[0012] Furthermore, the 4K gold co-axial photoelectric electron optical microscope is set to a 1000x 4K gold co-axial photoelectric electron optical microscope, the optical magnification of the 4K gold co-axial photoelectric electron optical microscope is 0.7-4.5X continuous variable magnification, the electronic magnification is 160-1058 times adjustable, the camera used is a 4K autofocus camera, and the pure color block inkjet printed image includes four primary color blocks of cyan, magenta, yellow and black.
[0013] Furthermore, in step S2, the grayscale processing flow is as follows:
[0014] S21, assigning gray values to the maximum values of the three components of red, green and blue in the color image, respectively, wherein the maximum gray value assigned to the red component is max(R), the maximum gray value assigned to the green component is max(G), and the maximum gray value assigned to the red component is max(B);
[0015] S22. According to the different sensitivities of human eyes to different colors, the weighted average values of the three components of red, green and blue are calculated. The calculation formula is as follows:
[0016] Gray=0.299*max(R)+0.587*max(G)+0.114*max(B);
[0017] S23, set the image to be f, count the number of occurrences of each gray level, and record it as Hf(t);
[0018] S24, calculate the probability density Pf(t) of any gray value t appearing in the image f, the calculation formula is as follows:
[0019]
[0020] Among them, L is the total number of possible gray levels, t is the gray value, and i is the index variable used to traverse all possible gray levels.
[0021] Furthermore, in step S3, the process of drawing contour coils of gray values is as follows:
[0022] S31. Calculate the gradient amplitude and direction of the image using a gradient calculation formula according to the characteristics of the grayscale image. The gradient calculation formula is as follows:
[0023]
[0024]
[0025]
[0026] Among them, I is the input image, G x and G y are the gradients in the horizontal and vertical directions respectively, G is the gradient amplitude, and θ is the direction;
[0027] S32, confirming the gradient amplitude of each pixel, and comparing the gradient amplitude of each pixel with the gradient amplitudes of two adjacent pixels along the gradient direction, if the gradient amplitude of the pixel is greater than the gradient amplitudes of the two adjacent pixels along the gradient direction, retaining the pixel; if the gradient amplitude of the pixel is less than or equal to the gradient amplitudes of the two adjacent pixels along the gradient direction, suppressing the pixel;
[0028] S33, performing double threshold processing on the retained pixels to divide the edges into strong edges and weak edges;
[0029] S34, starting from the strong edge, connect the edges using the edge tracking algorithm;
[0030] S35, based on the edge information, create a binary image with the same size as the input image for storing the contour line results, for each pixel in the image, check the values of the four pixels around it to form a 2x2 grid, and predefine a lookup table according to four possible configurations of the 2x2 grid, the lookup table contains the contour line pattern corresponding to each configuration, for each 2x2 grid in the image, determine the connection mode of the contour lines according to the corresponding pattern in the configuration lookup table, and draw the contour lines on the binary image according to the result of the lookup table;
[0031] S36, analyzing the outline shape and position of the contour lines, and identifying the overlapping area of the ink droplets by comparing the shapes and relative positions of different contour lines.
[0032] Furthermore, in step S33, during dual threshold processing, two thresholds T1 and T2 are set, and T1<T2. The gradient amplitude G is compared with the threshold to determine if G≥T2. If G≤T1, it is a strong edge. If T1<G<T2, it is a non-edge. If T1<G<T2, it is a weak edge.
[0033] Furthermore, in step S36, each contour line profile is analyzed and geometric features of the contour lines are calculated, including area, perimeter, minimum circumscribed circle and convex hull. Whether the ink droplets overlap is determined by calculating the distance, intersection area or inclusion relationship between the contours. When the ink droplets overlap, the overlapping area of the ink droplets is identified, and the identified overlapping area of the ink droplets is displayed on the image in a visual manner. The accuracy and reliability of the identification are then verified by comparing it with the standard ink droplet shape or the known ink droplet overlap situation. If the ink droplets do not overlap, it means that independent ink droplets appear in the image, and the gradient amplitude of the pixel needs to be reconfirmed, and the process returns to S32.
[0034] Furthermore, in step S4, the process of reconstructing the high-resolution image from the low-resolution image is as follows:
[0035] S41, input a low-resolution image I d , and prepare the corresponding high-resolution image I g ;
[0036] S42, setting the convolution kernel of the first layer to W1, using the first layer of the convolutional neural network to extract the first layer image features of the low-resolution image, the feature extraction formula is as follows:
[0037] F1=Relu(W1*I d +b1), where F1 is the first layer image feature, b1 is the first layer bias term, and Relu is the nonlinear activation function;
[0038] S43, the first layer image feature F1 is processed by a nonlinear layer to obtain the second layer image feature F2. The processing formula is as follows:
[0039] F2 = Relu (W2*F1+b2), where W2 is the weight matrix of the second layer, b2 is the bias term of the second layer, and Relu is a nonlinear activation function;
[0040] S44, through the last layer of convolution, the second layer image feature F2 is converted into a high-resolution image I g ', the conversion formula is as follows:
[0041] I g '=W3*F2+b3, where W3 is the weight matrix of the third layer and b3 is the bias term of the third layer;
[0042] S45. Calculate the reconstructed high-resolution image I g 'With the actual high-resolution image I g The mean square error MSN between them is calculated as follows:
[0043]
[0044] Among them, I′ g (i) is the value of the reconstructed high-resolution image at the i-th pixel, I g (i) is the true value of the i-th pixel in the actual high-resolution image, i is the pixel index in the image, N is the total number of pixels in the image, MAX is the maximum range of image pixel values, M*N is the image size, and MSE is the mean square error;
[0045] S46. Calculate the gradient ΔT of the loss function with respect to the parameter θ according to the mean square error MSN. The calculation formula is as follows:
[0046] ΔT=abla θ MSN;
[0047] S47. Use the minimization loss function to update the network parameters. The minimization loss function expression is as follows:
[0048] θ'=θ-ηΔT, where θ is all network parameters, θ' is the updated parameter, and η is the learning rate;
[0049] S48, reconstructing the high-resolution image I through the updated network parameters g 'Perform optimization and update to obtain optimized high-resolution image I gb ', the optimization update formula is as follows:
[0050] I gb =Forward(I g ', θ').
[0051] Furthermore, in step S5, the training and testing process of the training model is as follows:
[0052] S51, use the feature extraction function to extract features from the reconstructed high-resolution image, and the feature extraction formula is as follows:
[0053] F=FeatureExtractor(I gb '), where FeatureExtractor is the feature extraction function of the prediction network;
[0054] S52, input the extracted feature F into a fully connected layer to establish a training model. The training model establishment formula is as follows:
[0055] Y=Wf *F+b f , where W f is the weight matrix of the fully connected layer, b f is the bias term of the fully connected layer, and Y is the output of the training model;
[0056] S53, according to the output Y of the training model and the real output Y true Calculate the loss function ε. The calculation formula of the loss function ε is as follows:
[0057]
[0058] Where N is the number of samples, Y i is the prediction of the i-th sample, Y true,i is the true value of the i-th sample, ε is the loss function;
[0059] S54. Use the parameter optimization formula to optimize the parameters of the training model. The parameter optimization formula is as follows:
[0060] θ"=θ-ηabla θ ε,
[0061] Among them, θ" is the updated model parameter, θ is the model parameter, η is the learning rate, and abla θ ε is the gradient of the loss function with respect to the parameter θ;
[0062] S55, setting the number of model training rounds, repeating steps S51-S54 to train the training model until the loss function converges or reaches the preset number of training rounds;
[0063] S56. Calculate the proportion of samples correctly predicted by the training model to the total number of samples. The calculation formula is as follows:
[0064]
[0065] Among them, TP is the number of true positive examples, TN is the number of true negative examples, FP is the number of false positive examples, and FN is the number of false negative examples;
[0066] S57. Analyze the advantages and disadvantages of the model based on the test results and propose possible directions for improvement.
[0067] Furthermore, in step S6, the process of analyzing the reconstructed high-resolution image is as follows:
[0068] S61, selecting a suitable threshold value according to the histogram of the image to divide the image into foreground and background;
[0069] That is, all pixel values in the image that are greater than the threshold are set as the ink drop area, and all pixel values in the image that are less than the threshold are set as the background area, so as to obtain a binary image in which the ink drop area is white and the background is black;
[0070] S62, extracting geometric features from the segmented area, and analyzing the geometric features to determine whether the ink droplets overlap and the degree of overlap;
[0071] S63, adjusting printing parameters according to information about the edge and overlapping area of the ink droplets. If the ink droplets overlap severely, it is necessary to re-plan the printing path or adjust the position of the print head.
[0072] S64. Use accuracy, precision, and recall to evaluate the performance of the model.
[0073] S65. Adjust model parameters or retrain the model according to the evaluation results;
[0074] S66. Repeat the process of S61-S65, and continuously perform iterative optimization until a satisfactory printing effect is achieved.
[0075] Based on the above-described inkjet printing image processing method based on the SRCNN network, the present invention also provides an inkjet printing image processing system based on the SRCNN network, including: an image acquisition module, wherein the image acquisition module uses a 4K gold coaxial photoelectron optical microscope to collect inkjet printing images of pure color blocks with different dot area ratios;
[0076] An image preprocessing module, which performs grayscale processing on the collected color image and converts it into a single-channel grayscale image;
[0077] A contour map analysis module, which draws a contour map of grayscale values according to the characteristics of the grayscale image, and analyzes the outline shape and position of the contour map to identify the overlapping area of ink drops;
[0078] An SRCNN super-resolution reconstruction module, wherein the SRCNN super-resolution reconstruction module uses an SRCNN algorithm to learn an end-to-end mapping relationship between low-resolution and high-resolution images through a convolutional neural network, and reconstructs a high-resolution image from a low-resolution image;
[0079] An image feature extraction and training module, wherein the image feature extraction and training module extracts image features from the reconstructed high-resolution image, establishes a training model based on the image features, and trains and tests the training model to evaluate the performance of the training model;
[0080] A printing job adjustment module analyzes the reconstructed high-resolution image according to the performance of the training model, identifies the edges and overlapping areas of ink droplets, and performs printing according to the identification results.
[0081] The beneficial effects of the present invention are:
[0082] 1. The present invention first uses a 4K gold co-axial photoelectron optical microscope to collect inkjet printing images of pure color blocks with different dot area ratios, then grayscales the collected images, draws a contour map of grayscale values according to the characteristics of the grayscale image, and analyzes the outline shape and position of the contour map to identify the overlapping area of ink droplets, reconstructs a high-resolution image from the low-resolution image using the SRCNN algorithm, extracts image features in the reconstructed high-resolution image, establishes a training model according to the image features, trains and tests the training model, analyzes the reconstructed high-resolution image according to the performance of the training model, identifies the edges and overlapping areas of ink droplets, and performs printing operations according to the identification results. By combining the high-resolution imaging technology of the 4K gold co-axial photoelectron optical microscope, grayscale processing, contour map analysis, and deep learning algorithm, super-resolution reconstruction of low-resolution images and accurate identification of overlapping areas of ink droplets are achieved, thereby significantly improving the quality and efficiency of inkjet printing.
[0083] 2. The present invention realizes the automation and intelligence of the whole process from image acquisition to printing operation through the collaborative work of image acquisition module, image preprocessing module, contour map analysis module, SRCNN super-resolution reconstruction module, image feature extraction and training module and printing operation adjustment module, thereby improving the efficiency and accuracy of image processing.
[0084] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0085] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0086] Figure 1 A flowchart according to an embodiment of the present invention is shown;
[0087] Figure 2 A flowchart of analyzing a reconstructed high-resolution image according to an embodiment of the present invention is shown;
[0088] Figure 3 A system block diagram according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0089] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0090] The embodiment of the present invention provides an inkjet printing image processing method based on the SRCNN network, such as Figure 1 As shown, the following steps are included:
[0091] S1. Use a 4K gold coaxial photoelectron optical microscope to collect inkjet printing images of pure color blocks with different dot area ratios;
[0092] The 4K gold co-axial photoelectric electron optical microscope is set to a 1000x 4K gold co-axial photoelectric electron optical microscope. The optical magnification of the 4K gold co-axial photoelectric electron optical microscope is 0.7-4.5X continuous zoom, and the electronic magnification is 160-1058 times adjustable. The camera used is a 4K autofocus camera. The pixel size of the camera is 2.0μm×2.0μm, the resolution is 3840×2160P@60FPS, and the image output has two formats, Motion JPEG and YUV; the pure color block inkjet printed image includes four primary color blocks: cyan, magenta, yellow and black.
[0093] S2, grayscale the collected image, and convert the color image into a single-channel grayscale image;
[0094] The grayscale processing flow is as follows:
[0095] S21, assigning gray values to the maximum values of the three components of red, green and blue in the color image, respectively, wherein the maximum gray value assigned to the red component is max(R), the maximum gray value assigned to the green component is max(G), and the maximum gray value assigned to the red component is max(B);
[0096] S22. According to the different sensitivities of human eyes to different colors, the weighted average values of the three components of red, green and blue are calculated. The calculation formula is as follows:
[0097] Gray=0.299*max(R)+0.587*max(G)+0.114*max(B);
[0098] S23, set the image to be f, count the number of occurrences of each gray level, and record it as Hf(t);
[0099] S24, calculate the probability density Pf(t) of any gray value t appearing in the image f, the calculation formula is as follows:
[0100]
[0101] Where L is the total number of possible gray levels, t is the gray value, and i is the index variable used to traverse all possible gray levels;
[0102] S3, drawing a contour map of grayscale values according to the characteristics of the grayscale image, and analyzing the contour shape and position of the contour map to identify the overlapping area of the ink droplets;
[0103] The process of drawing grayscale contour coils is as follows:
[0104] S31. Calculate the gradient amplitude and direction of the image using a gradient calculation formula according to the characteristics of the grayscale image. The gradient calculation formula is as follows:
[0105]
[0106]
[0107]
[0108] Among them, I is the input image, G x and G y are the gradients in the horizontal and vertical directions respectively, G is the gradient amplitude, and θ is the direction;
[0109] S32, confirming the gradient amplitude of each pixel, and comparing the gradient amplitude of each pixel with the gradient amplitudes of two adjacent pixels along the gradient direction, if the gradient amplitude of the pixel is greater than the gradient amplitudes of the two adjacent pixels along the gradient direction, retaining the pixel; if the gradient amplitude of the pixel is less than or equal to the gradient amplitudes of the two adjacent pixels along the gradient direction, suppressing the pixel;
[0110] S33, performing double threshold processing on the retained pixels to divide the edges into strong edges and weak edges;
[0111] In double threshold processing, two thresholds T1 and T2 are set, and T1<T2. The gradient amplitude G is compared with the threshold. If G≥T2, it is a strong edge; if G≤T1, it is a non-edge; if T1<G<T2, it is a weak edge.
[0112] S34, starting from the strong edge, connect the edges using the edge tracking algorithm;
[0113] S35. Create a binary image with the same size as the input image according to the edge information to store the contour line results. For each pixel in the image, check the values of the four pixels around it to form a 2x2 grid. According to the four possible configurations of the 2x2 grid (each configuration has 16 cases), predefine a lookup table, which contains the contour line pattern corresponding to each configuration. For each 2x2 grid in the image, determine the connection mode of the contour lines according to the corresponding pattern in the configuration lookup table. Draw the contour lines on the binary image according to the result of the lookup table.
[0114] S36, analyzing the contour shape and position of the contour lines, and identifying the overlapping area of the ink droplets by comparing the shapes and relative positions of different contour lines;
[0115] Analyze the outline of each contour line and calculate the geometric features of the contour line. The geometric features include area, perimeter, minimum circumscribed circle and convex hull. The geometric features are used to describe the shape and size of the ink droplets. The distance, intersection area or inclusion relationship between the contours is calculated to determine whether the ink droplets overlap. When the ink droplets overlap, the overlapping area of the ink droplets is identified, and the identified ink droplet overlapping area is displayed on the image in a visual manner (such as marking, color filling, etc.) for intuitive observation and analysis. The accuracy and reliability of the identification are then verified by comparing with the standard ink droplet shape or the known ink droplet overlap situation. If the ink droplets do not overlap, it means that independent ink droplets appear in the image, and the gradient amplitude of the pixel needs to be reconfirmed, and return to S32.
[0116] By plotting the contour map of grayscale values and analyzing its contour shape and position, the edges and overlapping areas of ink droplets can be identified more accurately;
[0117] S4, using the SRCNN algorithm to learn the end-to-end mapping relationship between low-resolution and high-resolution images through a convolutional neural network, and reconstructing a high-resolution image from a low-resolution image;
[0118] The process of reconstructing a high-resolution image from a low-resolution image is as follows:
[0119] S41, input a low-resolution image I d , and prepare the corresponding high-resolution image I g ,High-resolution images are used as target outputs during training;
[0120] S42, setting the convolution kernel of the first layer to W1, using the first layer of the convolutional neural network to extract the first layer image features of the low-resolution image, the feature extraction formula is as follows:
[0121] F1=Relu(W1*I d+b1), where F1 is the first layer image feature, b1 is the first layer bias term, and Relu is the nonlinear activation function;
[0122] S43, the first layer image feature F1 is processed by a nonlinear layer to obtain the second layer image feature F2. The processing formula is as follows:
[0123] F2 = Relu (W2*F1+b2), where W2 is the weight matrix of the second layer, b2 is the bias term of the second layer, and Relu is a nonlinear activation function;
[0124] S44, through the last layer of convolution, the second layer image feature F2 is converted into a high-resolution image I g ', the conversion formula is as follows:
[0125] I g '=W3*F2+b3, where W3 is the weight matrix of the third layer and b3 is the bias term of the third layer;
[0126] S45. Calculate the reconstructed high-resolution image I g 'With the actual high-resolution image I g The mean square error MSN between them is calculated as follows:
[0127]
[0128] Among them, I′ g (i) is the value of the reconstructed high-resolution image at the i-th pixel, I g (i) is the true value of the i-th pixel in the actual high-resolution image, i is the pixel index in the image, N is the total number of pixels in the image, MAX is the maximum range of the image pixel value, M*N is the image size, MSE is the mean square error, the smaller the MSE value is, the closer the processed image is to the original image, and the larger the PSNR value is, the higher the similarity with the original image is;
[0129] S46. Calculate the gradient ΔT of the loss function with respect to the parameter θ according to the mean square error MSN. The calculation formula is as follows:
[0130] ΔT=abla θ MSN;
[0131] S47. Use the minimization loss function to update the network parameters. The minimization loss function expression is as follows:
[0132] θ'=θ-ηΔT, where θ is all network parameters, θ' is the updated parameter, and η is the learning rate;
[0133] S48, reconstructing the high-resolution image I through the updated network parameters g'Perform optimization and update to obtain optimized high-resolution image I gb ', the optimization update formula is as follows:
[0134] I gb =Forward(I g ', θ');
[0135] SRCNN can learn the mapping relationship from low-resolution images to high-resolution images, thereby achieving image super-resolution reconstruction;
[0136] S5, extracting image features from the reconstructed high-resolution image, establishing a training model according to the image features, and training and testing the training model to evaluate the performance of the training model;
[0137] The training and testing process of the training model is as follows:
[0138] S51, use the feature extraction function to extract features from the reconstructed high-resolution image, and the feature extraction formula is as follows:
[0139] F=FeatureExtractor(I gb '), where FeatureExtractor is the feature extraction function of the prediction network;
[0140] S52, input the extracted feature F into a fully connected layer to establish a training model. The training model establishment formula is as follows:
[0141] Y=W f *F+b f , where W f is the weight matrix of the fully connected layer, b f is the bias term of the fully connected layer, and Y is the output of the training model;
[0142] S53, according to the output Y of the training model and the real output Y true Calculate the loss function ε. The calculation formula of the loss function ε is as follows:
[0143]
[0144] Where N is the number of samples, Y i is the prediction of the i-th sample, Y true,i is the true value of the i-th sample, ε is the loss function;
[0145] S54. Use the parameter optimization formula to optimize the parameters of the training model. The parameter optimization formula is as follows:
[0146] θ"=θ-ηabla θ ε,
[0147] Among them, θ" is the updated model parameter, θ is the model parameter, η is the learning rate, and abla θ ε is the gradient of the loss function with respect to the parameter θ;
[0148] S55, setting the number of model training rounds, repeating steps S51-S54 to train the training model until the loss function converges or reaches the preset number of training rounds;
[0149] S56. Calculate the proportion of samples correctly predicted by the training model to the total number of samples. The calculation formula is as follows:
[0150]
[0151] Among them, TP is the number of true positive examples, TN is the number of true negative examples, FP is the number of false positive examples, and FN is the number of false negative examples;
[0152] S57. Analyze the advantages and disadvantages of the model based on the test results and propose possible improvement directions;
[0153] S6. Analyze the reconstructed high-resolution image according to the performance of the training model, identify the edges and overlapping areas of the ink droplets, and perform printing operations according to the identification results;
[0154] like Figure 2 As shown, the process of analyzing the reconstructed high-resolution image is as follows:
[0155] S61, selecting a suitable threshold value according to the histogram of the image to divide the image into foreground and background;
[0156] That is, all pixel values in the image that are greater than the threshold are set as the ink drop area, and all pixel values in the image that are less than the threshold are set as the background area, so as to obtain a binary image in which the ink drop area is white and the background is black;
[0157] S62, extracting geometric features, such as area, perimeter, shape, etc., from the segmented regions, and analyzing the geometric features to determine whether the ink droplets overlap and the degree of overlap;
[0158] S63, adjusting printing parameters according to information about the edge and overlapping area of the ink droplets, the printing parameters including ink jetting amount, ink jetting speed, etc. If the ink droplets overlap severely, it is necessary to re-plan the printing path or adjust the position of the print head;
[0159] S64. Use accuracy, precision, and recall to evaluate the performance of the model.
[0160] S65. Adjust model parameters or retrain the model according to the evaluation results to improve recognition accuracy;
[0161] S66. Repeat the process of S61-S65, and continuously perform iterative optimization until a satisfactory printing effect is achieved.
[0162] Analyzing the reconstructed high-resolution images based on the performance of the trained model allows for more precise control of the printing process, avoiding droplet overlap and blurred edges, thus improving the overall quality of the print.
[0163] In summary, by combining the high-resolution imaging technology of the 4K gold-phase coaxial photoelectron optical microscope, grayscale processing, contour map analysis, and deep learning algorithm, super-resolution reconstruction of low-resolution images and accurate identification of ink droplet overlapping areas are achieved, significantly improving the quality and efficiency of inkjet printing.
[0164] Based on the above-described inkjet printing image processing method based on the SRCNN network, the present invention also provides an inkjet printing image processing system based on the SRCNN network, such as Figure 3 As shown, it includes an image acquisition module, an image preprocessing module, a contour map analysis module, an SRCNN super-resolution reconstruction module, an image feature extraction and training module, and a printing operation adjustment module;
[0165] The image acquisition module uses a 4K gold coaxial photoelectron optical microscope to collect pure color block inkjet printing images with different dot area ratios, and the image acquisition module facilitates the acquisition of high-quality, high-resolution original images, providing a data source for subsequent image processing and analysis;
[0166] The image preprocessing module grayscales the collected color image and converts it into a single-channel grayscale image, which is convenient for simplifying the subsequent image processing process, reducing the computational complexity, and retaining key information;
[0167] The contour map analysis module draws a contour map of grayscale values according to the characteristics of the grayscale image, and analyzes the outline shape and position of the contour map to identify the overlapping area of ink drops;
[0168] The SRCNN super-resolution reconstruction module adopts the SRCNN algorithm to learn the end-to-end mapping relationship between low-resolution and high-resolution images through a convolutional neural network, and reconstructs a high-resolution image from a low-resolution image; wherein the network structure of the SRCNN algorithm includes a feature extraction layer (for image feature extraction), a nonlinear mapping layer (deepening the network depth) and an image reconstruction layer (restoring the feature map to a high-resolution image), which facilitates the use of deep learning technology to significantly improve the resolution and quality of the image;
[0169] The image feature extraction and training module extracts image features from the reconstructed high-resolution image, establishes a training model based on the image features, and trains and tests the training model to evaluate the performance of the training model so that it can accurately identify the edges and overlapping areas of ink droplets, and perform printing operations based on the recognition results;
[0170] The printing job adjustment module analyzes the reconstructed high-resolution image according to the performance of the training model, identifies the edges and overlapping areas of ink droplets, and performs printing operations according to the identification results, thereby realizing the transformation from image analysis to actual printing operations and improving printing quality and efficiency.
[0171] Through the collaborative work of the image acquisition module, image preprocessing module, contour map analysis module, SRCNN super-resolution reconstruction module, image feature extraction and training module, and printing job adjustment module, the entire process from image acquisition to printing operation is automated and intelligent, improving the efficiency and accuracy of image processing.
[0172] Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions 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 invention.
Claims
1. The inkjet printing image processing method based on SRCNN network is characterized by: The steps include: S1. Use a 4K gold coaxial photoelectron optical microscope to collect inkjet printing images of pure color blocks with different dot area ratios; S2, grayscale the collected image, and convert the color image into a single-channel grayscale image; S3, drawing a contour map of grayscale values according to the characteristics of the grayscale image, and analyzing the contour shape and position of the contour map to identify the overlapping area of the ink droplets; S4, using the SRCNN algorithm to learn the end-to-end mapping relationship between low-resolution and high-resolution images through a convolutional neural network, and reconstructing a high-resolution image from a low-resolution image; S5, extracting image features from the reconstructed high-resolution image, establishing a training model according to the image features, and training and testing the training model to evaluate the performance of the training model; S6. Analyze the reconstructed high-resolution image according to the performance of the training model, identify the edges and overlapping areas of the ink droplets, and perform printing operations according to the identification results.
2. The inkjet printing image processing method based on the SRCNN network according to claim 1, characterized in that: The 4K gold co-axial photoelectron optical microscope is set to a 1000x 4K gold co-axial photoelectron optical microscope. The optical magnification of the 4K gold co-axial photoelectron optical microscope is 0.7-4.5X continuous variable magnification, and the electronic magnification is 160-1058 times adjustable. The camera used is a 4K autofocus camera. The pure color block inkjet printed image includes four primary color blocks: cyan, magenta, yellow and black.
3. The inkjet printing image processing method based on the SRCNN network according to claim 2, characterized in that: In step S2, the grayscale processing flow is as follows: S21, assigning gray values to the maximum values of the three components of red, green and blue in the color image, respectively, wherein the maximum gray value assigned to the red component is max(R), the maximum gray value assigned to the green component is max(G), and the maximum gray value assigned to the red component is max(B); S22. According to the different sensitivities of human eyes to different colors, the weighted average values of the three components of red, green and blue are calculated. The calculation formula is as follows: Gray=0.299*max(R)+0.587*max(G)+0.114*max(B); S23, set the image to be f, count the number of occurrences of each gray level, and record it as Hf(t); S24, calculate the probability density Pf(t) of any gray value t appearing in the image f, the calculation formula is as follows: Among them, L is the total number of possible gray levels, t is the gray value, and i is the index variable used to traverse all possible gray levels.
4. The inkjet printing image processing method based on the SRCNN network according to claim 3 is characterized in that: In step S3, the process of drawing contour coils of gray values is as follows: S31. Calculate the gradient amplitude and direction of the image using a gradient calculation formula according to the characteristics of the grayscale image. The gradient calculation formula is as follows: Among them, I is the input image, G x and G y are the gradients in the horizontal and vertical directions respectively, G is the gradient amplitude, and θ is the direction; S32, confirming the gradient amplitude of each pixel, and comparing the gradient amplitude of each pixel with the gradient amplitudes of two adjacent pixels along the gradient direction, if the gradient amplitude of the pixel is greater than the gradient amplitudes of the two adjacent pixels along the gradient direction, retaining the pixel; if the gradient amplitude of the pixel is less than or equal to the gradient amplitudes of the two adjacent pixels along the gradient direction, suppressing the pixel; S33, performing double threshold processing on the retained pixels to divide the edges into strong edges and weak edges; S34, starting from the strong edge, connect the edges using the edge tracking algorithm; S35, based on the edge information, create a binary image with the same size as the input image for storing the contour line results, for each pixel in the image, check the values of the four pixels around it to form a 2x2 grid, and predefine a lookup table according to four possible configurations of the 2x2 grid, the lookup table contains the contour line pattern corresponding to each configuration, for each 2x2 grid in the image, determine the connection mode of the contour lines according to the corresponding pattern in the configuration lookup table, and draw the contour lines on the binary image according to the result of the lookup table; S36, analyzing the outline shape and position of the contour lines, and identifying the overlapping area of the ink droplets by comparing the shapes and relative positions of different contour lines.
5. The inkjet printing image processing method based on the SRCNN network according to claim 4, characterized in that: In step S33, during dual threshold processing, two thresholds T1 and T2 are set, and T1<T2, and the gradient amplitude G is compared with the threshold. If G≥T2, it is a strong edge, if G≤T1, it is a non-edge, and if T1<G<T2, it is a weak edge.
6. The inkjet printing image processing method based on the SRCNN network according to claim 5, characterized in that: In step S36, each contour line profile is analyzed to calculate geometric features of the contour line, including area, perimeter, minimum circumscribed circle and convex hull, and whether the ink droplets overlap is determined by calculating the distance, intersection area or inclusion relationship between the contours. When the ink droplets overlap, the overlapping area of the ink droplets is identified, and the identified ink droplet overlapping area is displayed on the image in a visual manner, and then compared with the standard ink droplet shape or the known ink droplet overlap situation to verify the accuracy and reliability of the identification; If the ink droplets do not overlap, it means that independent ink droplets appear in the image, and the gradient amplitude of the pixel needs to be reconfirmed, and the process returns to S32.
7. The inkjet printing image processing method based on the SRCNN network according to claim 6, characterized in that: In step S4, the process of reconstructing the high-resolution image from the low-resolution image is as follows: S41, input a low-resolution image I d , and prepare the corresponding high-resolution image I g ; S42, setting the convolution kernel of the first layer to W1, using the first layer of the convolutional neural network to extract the first layer image features of the low-resolution image, the feature extraction formula is as follows: F1=Relu(W1*I d +b1), where F1 is the first layer image feature, b1 is the first layer bias term, and Relu is the nonlinear activation function; S43, the first layer image feature F1 is processed by a nonlinear layer to obtain the second layer image feature F2. The processing formula is as follows: F2 = Relu (W2*F1+b2), where W2 is the weight matrix of the second layer, b2 is the bias term of the second layer, and Relu is a nonlinear activation function; S44, through the last layer of convolution, the second layer image feature F2 is converted into a high-resolution image I g ', the conversion formula is as follows: I g '=W3*F2+b3, where W3 is the weight matrix of the third layer and b3 is the bias term of the third layer; S45. Calculate the reconstructed high-resolution image I g 'With the actual high-resolution image I g The mean square error MSN between them is calculated as follows: Among them, I′ g (i) is the value of the reconstructed high-resolution image at the i-th pixel, I g (i) is the true value of the i-th pixel in the actual high-resolution image, i is the pixel index in the image, N is the total number of pixels in the image, MAX is the maximum range of image pixel values, M*N is the image size, and MSE is the mean square error; S46. Calculate the gradient ΔT of the loss function with respect to the parameter θ according to the mean square error MSN. The calculation formula is as follows: ΔT=before θ MSN; S47. Use the minimization loss function to update the network parameters. The minimization loss function expression is as follows: θ'=θ-ηΔT, where θ is all network parameters, θ' is the updated parameter, and η is the learning rate; S48, reconstructing the high-resolution image I through the updated network parameters g 'Perform optimization and update to obtain optimized high-resolution image I gb ', the optimization update formula is as follows: I gb ’=Forward(I g ’,θ’)。 8. The inkjet printing image processing method based on the SRCNN network according to claim 7, characterized in that: In step S5, the process of training and testing the training model is as follows: S51, use the feature extraction function to extract features from the reconstructed high-resolution image, and the feature extraction formula is as follows: F=FeatureExtractor(I gb '), where FeatureExtractor is the feature extraction function of the prediction network; S52, input the extracted feature F into a fully connected layer to establish a training model. The training model establishment formula is as follows: Y=W f *F+b f , where W f is the weight matrix of the fully connected layer, b f is the bias term of the fully connected layer, and Y is the output of the training model; S53, according to the output Y of the training model and the real output Y true Calculate the loss function ε. The calculation formula of the loss function ε is as follows: Where N is the number of samples, Y i is the prediction of the i-th sample, Y true,i is the true value of the i-th sample, ε is the loss function; S54. Use the parameter optimization formula to optimize the parameters of the training model. The parameter optimization formula is as follows: θ"=θ-ηabla θ eh, Among them, θ" is the updated model parameter, θ is the model parameter, η is the learning rate, and abla θ ε is the gradient of the loss function with respect to the parameter θ; S55, setting the number of model training rounds, repeating steps S51-S54 to train the training model until the loss function converges or reaches the preset number of training rounds; S56. Calculate the proportion of samples correctly predicted by the training model to the total number of samples. The calculation formula is as follows: Among them, TP is the number of true positive examples, TN is the number of true negative examples, FP is the number of false positive examples, and FN is the number of false negative examples; S57. Analyze the advantages and disadvantages of the model based on the test results and propose possible directions for improvement.
9. The inkjet printing image processing method based on the SRCNN network according to claim 8, characterized in that: In step S6, the process of analyzing the reconstructed high-resolution image is as follows: S61, selecting a suitable threshold value according to the histogram of the image to divide the image into foreground and background; That is, all pixel values in the image that are greater than the threshold are set as the ink drop area, and all pixel values in the image that are less than the threshold are set as the background area, so as to obtain a binary image in which the ink drop area is white and the background is black; S62, extracting geometric features from the segmented area, and analyzing the geometric features to determine whether the ink droplets overlap and the degree of overlap; S63, adjusting printing parameters according to information about the edge and overlapping area of the ink droplets. If the ink droplets overlap severely, it is necessary to re-plan the printing path or adjust the position of the print head. S64. Use accuracy, precision, and recall to evaluate the performance of the model. S65. Adjust model parameters or retrain the model according to the evaluation results; S66. Repeat the process of S61-S65, and continuously iterate and optimize until a satisfactory printing effect is achieved.
10. An inkjet printing image processing system based on a SRCNN network, based on the inkjet printing image processing method based on a SRCNN network according to any one of claims 1 to 9, characterized in that: include: An image acquisition module, wherein the image acquisition module uses a 4K gold coaxial photoelectron optical microscope to acquire inkjet printed images of pure color blocks with different dot area ratios; An image preprocessing module, which performs grayscale processing on the collected color image and converts it into a single-channel grayscale image; A contour map analysis module, which draws a contour map of grayscale values according to the characteristics of the grayscale image, and analyzes the outline shape and position of the contour map to identify the overlapping area of ink drops; An SRCNN super-resolution reconstruction module, wherein the SRCNN super-resolution reconstruction module uses an SRCNN algorithm to learn an end-to-end mapping relationship between low-resolution and high-resolution images through a convolutional neural network, and reconstructs a high-resolution image from a low-resolution image; An image feature extraction and training module, wherein the image feature extraction and training module extracts image features from the reconstructed high-resolution image, establishes a training model based on the image features, and trains and tests the training model to evaluate the performance of the training model; A printing job adjustment module analyzes the reconstructed high-resolution image according to the performance of the training model, identifies the edges and overlapping areas of ink droplets, and performs printing according to the identification results.
Citation Information
Patent Citations
Ink-jet printing image processing method and system based on edge detection technology
CN118071691A