Image printing method, device and equipment, printing system and storage medium
By super-segmenting the original image with high blur and adapting the printing parameters, the problem of low-resolution images printing blur after enlargement is solved, achieving a clearer and more realistic printing effect.
Patent Information
- Application Number
- CN202411894339.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-06-13
AI Technical Summary
The low-resolution images in the prior art are very blurry after being enlarged and printed out, which affects the printing effect.
By obtaining the blur of the original image, if it is greater than the preset threshold, the original image is super-segmented, the target image is obtained, and then printing is adapted to the inkjet printing parameters according to the target image.
Through super-score processing, the image is improved to make the printed image more realistic, solving the problem of low-resolution image blurring and improving the printing quality.
Smart Images

Figure CN120144071A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of inkjet printing technology, and in particular, to an image printing method, apparatus, device, printing system, and storage medium. Background Art
[0002] During the image printing process, usually, the printing position of the image is adjusted on the interaction interface, and then the image is printed on the medium. Due to the different sizes of the media, for large-sized media, an important process in image printing is to enlarge the image. In the related art, enlargement easily causes low-resolution images to be very blurry after actual printing, affecting the printing effect. Summary of the Invention
[0003] The main purpose of this application is to provide an image printing method, computer device, printing system, and storage medium, aiming to solve the technical problem that low-resolution images are blurry after being enlarged and actually printed in the prior art, affecting the printing effect.
[0004] To achieve the above purpose, this application provides an image printing method, and the image printing method includes:
[0005] Obtain the image blur degree of the original image;
[0006] If the image blur degree is greater than a preset threshold, perform super-resolution processing on the original image to obtain a target image;
[0007] Adapt inkjet printing parameters according to the target image, and print the target image based on the inkjet printing parameters.
[0008] In one embodiment, the performing super-resolution processing on the original image to obtain a target image includes:
[0009] Perform super-resolution processing on the original image using a super-resolution model to obtain the target image.
[0010] In one embodiment, the performing super-resolution processing on the original image using a super-resolution model to obtain a target image includes:
[0011] Identify the image category of the original image;
[0012] Obtain the target super-resolution model corresponding to the image category;
[0013] Perform super-resolution processing on the original image using the target super-resolution model to obtain the target image.
[0014] In one embodiment, the image categories include the human category, the landscape category, and the animation category. The super-resolution model includes a first super-resolution model for super-resolving human images, a second super-resolution model for super-resolving landscape images, and a third super-resolution model for super-resolving animation images.
[0015] In one embodiment, after the step of obtaining the image blurriness of the original image, the method further includes:
[0016] If the image blurriness is less than the preset threshold, adapt the inkjet printing parameters according to the original image, and print the original image based on the inkjet printing parameters.
[0017] In one embodiment, before the step of using the super-resolution model to super-resolve the original image to obtain the target image, the printing method further includes:
[0018] Obtain the training image data sets corresponding to each image category;
[0019] Based on the training image data sets of each image category, train the corresponding super-resolution model. During the training process, adjust the parameters of the super-resolution model based on the training process data until the super-resolution model meets the preset performance indicators, and obtain the preset super-resolution models corresponding to each image category.
[0020] In one embodiment, the training image data sets include: the crawler image data sets corresponding to each image category obtained based on data crawling, the public image data sets corresponding to each image category, and the generated image data sets corresponding to each image category.
[0021] In one embodiment, the step of adapting the inkjet printing parameters according to the target image includes:
[0022] Determine the clarity level of the target image;
[0023] Based on the clarity level, determine the printing resolution of the target image;
[0024] Determine the printing parameters according to the printing resolution.
[0025] In addition, to achieve the above object, the present application further provides a computer device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor. The computer program is configured to implement the steps of the image printing method as described above.
[0026] In addition, to achieve the above object, the present application further provides an image printing device, including: an acquisition module for acquiring the image blurriness of an original image; a super-resolution processing module for performing super-resolution processing on the original image to obtain a target image if the image blurriness is greater than a preset threshold; and an adaptation module for adapting inkjet printing parameters according to the target image to print the target image based on the inkjet printing parameters.
[0027] In addition, to achieve the above object, the present application further provides an inkjet printing device, which is used to: print a target image based on the printing parameters obtained by the steps of the image printing method as described above.
[0028] In addition, to achieve the above object, the present application further provides a printing system, which includes: a computer device for receiving an original image and obtaining the inkjet printing parameters corresponding to the original image based on the steps of the image printing method as described above; and an inkjet printing device communicatively connected to the computer device for receiving the print data of the original image transmitted by the computer device and printing the target image based on the print data, where the print data includes the inkjet printing parameters.
[0029] In addition, to achieve the above object, the present application further provides a storage medium, which is a computer-readable storage medium, and a program for implementing an image printing method is stored on the computer-readable storage medium, and the program for implementing the image printing method is executed by a processor to implement the steps of the image printing method as described above.
[0030] The present application provides an image printing method. The present application acquires the image blurriness of an original image; if the image blurriness is greater than a preset threshold, performs super-resolution processing on the original image to obtain a target image; and adapts inkjet printing parameters according to the target image to print the target image based on the inkjet printing parameters. That is, by performing super-resolution processing on an original image with high blurriness, the present application can increase the image clarity and details, making the printed image more vivid. Then, by adapting the printing parameters according to the target image, the image color and texture can be better presented, improving the overall printing quality. The technical problem that in the prior art, a low-resolution image is blurred after being enlarged and actually printed, affecting the printing effect, is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present application and used together with the specification to explain the principles of the present application.
[0032] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0033] Figure 1 It is a schematic flowchart of steps S10 to S30 provided in an embodiment of the image printing method of the present application;
[0034] Figure 2 It is a schematic flowchart of steps S221 to S222 provided in an embodiment of the image printing method of the present application;
[0035] Figure 3 It is a flowchart for training a super-resolution model in an embodiment of the image printing method of the present application;
[0036] Figure 4 It is a schematic flowchart of steps A1 to A2 provided in an embodiment of the image printing method of the present application;
[0037] Figure 5 It is a schematic overall flowchart of the image printing method of the present application;
[0038] Figure 6 It is a schematic structural diagram related to the printing system of the present application;
[0039] Figure 7 It is a schematic hardware structure diagram related to the computer device of the present application;
[0040] Figure 8 It is a schematic hardware structure diagram related to the image printing device of the present application;
[0041] Figure 9 It is a schematic hardware structure diagram related to the inkjet printing device of the present application.
[0042] Explanation of the reference numerals in the drawings:
[0043] Printing system 10; computer device 11; inkjet printing device 12; image printing device 20; acquisition module 21; super-resolution processing module 22; adaptation module 23; training module 24; processor 121; memory 122; communication bus 123; print head 124.
[0044] The implementation, functional features, and advantages of the purpose of the present application will be further described in combination with the embodiments and with reference to the drawings. Detailed implementation manners
[0045] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0046] To better understand the technical solution of the present application, the following will be described in detail in conjunction with the accompanying drawings of the specification and specific implementation manners.
[0047] Currently, during the image printing process, usually, an interactive device adjusts the position of the image on the consumable, and then the image is printed on the consumable. However, the actual size of the consumable is usually larger than the size of the consumable displayed in the interactive device. Therefore, an important process in the image printing algorithm is to enlarge the image. And the traditional enlargement algorithm will cause the low-resolution image to be very blurry after actual printing, affecting the printing effect.
[0048] The main solution of the present application is: determining the image blur degree of the obtained original image; then determining the target image corresponding to the original image based on the processing method corresponding to the image blur degree; by distinguishing the original images of each blur degree and selecting the corresponding method for processing, so that high-quality images are directly used, and low-quality images are super-resolved, and then the printing parameters are determined according to the clarity level of the target image. Solving the technical problem that the low-resolution image is blurry after being enlarged and actually printed in the prior art, through super-resolution and clarity processing, the detailed parts in the image can be better restored and enhanced, making the printed image more vivid and lifelike.
[0049] It should be noted that the execution subject of this embodiment can be a printing device, or a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or a computer device capable of implementing the above functions, etc. This embodiment does not make specific limitations in this regard. The following takes the printing device as the execution subject as an example to describe this embodiment and the following embodiments.
[0050] Based on this, an embodiment of the present application proposes an image printing method. Please refer to Figure 1 The image printing method includes steps S10 to S30:
[0051] Step S10, obtaining the image blur degree of the original image.
[0052] In this embodiment, the original image is an image directly obtained without processing, and the source may be camera shooting, scanning, etc. It can also be an image uploaded or selected by the user. The image blur degree is an index to measure the clarity of the image. A high blur degree means the image is not clear, and it can be calculated by analyzing algorithms such as edge sharpness and pixel contrast.
[0053] As an optional implementation manner, use image analysis software to calculate the gradient amplitude or frequency response of the image, and determine the image blur degree level according to a preset threshold.
[0054] As an alternative implementation, the feature differences between the comparison image and the clear standard image, such as edge sharpness, texture details, etc., are compared to determine the blurriness of the image.
[0055] Optionally, the step of obtaining the image blurriness of the original image includes: calculating the image blurriness of the original image based on a blurriness algorithm.
[0056] In this embodiment, the blurriness algorithm is a specific mathematical method or algorithm for calculating the image blurriness. By analyzing the features of the image, such as the change of pixel values, the intensity of edges, etc., the blurriness degree of the image is determined.
[0057] The edges of an image usually correspond to larger gradient values, while the edges of a blurred image become unclear and the gradient values decrease. The gradients of the image in the horizontal and vertical directions can be calculated, and then these gradient values are comprehensively considered to determine the blurriness of the image. Perform differential operations on the original image in the horizontal and vertical directions to obtain the horizontal gradient image and the vertical gradient image. Calculate the gradient magnitudes of each pixel point in the horizontal and vertical directions. For example, the Euclidean distance formula can be used for calculation. Statistically analyze the gradient magnitude distribution of the entire image, such as calculating the average gradient magnitude or the median gradient magnitude. According to a preset threshold or empirical value, convert the average gradient magnitude or the median gradient magnitude into the value of the image blurriness. The lower the gradient magnitude, the higher the blurriness.
[0058] A clear image has higher high-frequency components in the frequency domain, while a blurred image has fewer high-frequency components. By converting the image to the frequency domain and analyzing its spectral characteristics, the blurriness of the image can be determined. Perform a Fourier transform on the original image to convert it from the spatial domain to the frequency domain. Analyze the spectral distribution of the frequency-domain image and calculate the intensity of the high-frequency components. The intensity of the high-frequency components can be measured by calculating the energy or amplitude within a specific frequency range. Determine the image blurriness based on the intensity of the high-frequency components. The lower the intensity of the high-frequency components, the higher the blurriness.
[0059] Step S20, if the image blurriness is greater than a preset threshold, perform super-resolution processing on the original image to obtain a target image.
[0060] In this embodiment, different processing methods are adopted according to the image blurriness to improve the image quality and obtain an image suitable for printing. If the image blurriness is greater than a preset threshold, the processing methods include, but are not limited to, image enhancement, interpolation, etc. The preset threshold is a critical value set in advance for measuring the image blurriness. By this value, different situations of the image blurriness are distinguished to determine which subsequent processing method to adopt. For example, the specific size of this threshold can be determined according to factors such as past experience, a large number of image test results, or specific printing requirements. Super-resolution processing, that is, super-resolution reconstruction processing, can use specific algorithms and models to reconstruct a high-resolution image using the existing low-resolution image information. Super-resolution processing can improve the clarity, detail richness, and visual quality of the image without changing the image content. The target image is a clearer image after the super-resolution processing of the original image.
[0061] As an alternative embodiment, if the image blurriness is greater than the preset threshold, interpolation processing is performed on each pixel point in the original image to obtain the target image.
[0062] As another alternative embodiment, if the image blurriness is greater than the preset threshold, the original image is processed based on a neural network algorithm to obtain the target image.
[0063] As another alternative embodiment, if the image blurriness is greater than the preset threshold, the original image is subjected to super-resolution processing based on a pre-trained super-resolution model to obtain the target image.
[0064] Step S30: Adapt the inkjet printing parameters according to the target image, and print the target image based on the inkjet printing parameters.
[0065] In this embodiment, the inkjet printing parameters include at least one parameter that affects the printing quality, such as the printer resolution, print quality setting, and proportion of small ink dots.
[0066] As an alternative embodiment, the inkjet printing parameters are adapted according to the clarity level of the target image. The clarity level is a level divided according to the clarity of the target image, and can be determined according to indicators such as the blurriness range and edge sharpness.
[0067] Exemplarily, an image analysis software is used to evaluate the clarity level of the processed landscape photo. If the clarity level is a high level, inkjet printing parameters such as a printer resolution of 1700 dpi are determined. If the clarity level is average, the resolution can be appropriately reduced and medium-quality consumables can be used; if the clarity is low, the printing parameters need to be adjusted, such as reducing the printing speed and increasing the ink volume, etc., to improve the printing quality.
[0068] Exemplarily, there is a photo taken by a mobile phone as the original image. First, an image analysis tool is used to calculate the gradient magnitude of the photo. It is found that the gradient magnitude is low, and it is judged that the image blur degree is high. For this image with a high blur degree, an image enhancement algorithm is adopted to perform sharpening processing and contrast adjustment on the image to improve the clarity of the image. The target image is obtained after processing. Then, the clarity level of the target image is evaluated. By comparing the processed image with a preset standard image, it is determined that its clarity level is medium. According to the medium clarity level, the printer resolution is selected as 700 dpi. Finally, the target image is sent to an inkjet printer for output to obtain a relatively clear printing result.
[0069] This application provides an image printing method. First, this application obtains the image blur degree of the original image; if the image blur degree is greater than a preset threshold, super-resolution processing is performed on the original image to obtain a target image; inkjet printing parameters are adapted according to the target image to print the target image based on the inkjet printing parameters. It solves the technical problem that in the prior art, a low-resolution image is blurred after being enlarged and actually printed, affecting the printing effect. Through super-resolution and clarity processing, the detailed parts in the image can be better restored and enhanced, making the printed image more vivid and lifelike.
[0070] Based on the above embodiments, in a possible embodiment of this application, step S20 includes:
[0071] Step S21, using a super-resolution model to perform super-resolution processing on the original image to obtain the target image.
[0072] In this embodiment, the super-resolution model is a model constructed based on technologies such as deep learning. Its main function is to be able to upgrade a low-resolution and blurred image to a high-resolution and relatively clear image. By learning a large number of image data features, operations such as feature extraction and reconstruction are performed on the input original image, thereby enhancing the details and clarity of the image and making it more suitable for printing output.
[0073] As an alternative implementation, first obtain the previously calculated image blurriness value, which is calculated through corresponding blurriness algorithms, such as a quantization value reflecting the clarity of the image obtained by methods based on gradient algorithms or frequency domain analysis. Compare this blurriness value with a preset threshold. A simple numerical comparison operation can be used, such as using conditional judgment statements in programming implementation to determine whether the image blurriness is greater than the preset threshold. When the image blurriness is greater than the preset threshold: Select a suitable super-resolution model and initialize the super-resolution model, which includes loading pre-trained model parameters and configuring the relevant environment required for model operation, such as specifying the size requirements and data types of the input image. Input the original image into the super-resolution model. According to the forward propagation mechanism of the model, let the image pass through each network layer in the model in turn to perform operations such as feature extraction and upsampling, and finally output a processed high-resolution and enhanced-clarity image, that is, the target image. The super-resolution model is a model constructed based on technologies such as deep learning. Its main function is to be able to enhance a low-resolution and blurred image to a high-resolution and relatively clear image. By learning a large number of image data features, it performs operations such as feature extraction and reconstruction on the input original image, thereby enhancing the details and clarity of the image and making it more suitable for printing output.
[0074] Exemplarily, the set preset threshold is 15. This is just an example, and the threshold will be adjusted according to specific circumstances in actual applications. Now there is a portrait photo as the original image, and the image blurriness value of this photo was previously calculated to be 18 through the gradient algorithm. Since 18 is greater than 15, that is, the image blurriness is greater than the preset threshold, it is necessary to use the super-resolution model to process this original image. Select the SRCNN super-resolution model for processing. First, load the pre-trained SRCNN model from the existing model library and configure the relevant parameters according to the requirements of the model, such as setting the number of channels of the input image and the expected output image size. Then, input the portrait photo, which is the original image, into the SRCNN model. The model starts to work. First, it extracts the feature information of the image through the convolutional layer, and then uses the transposed convolutional layer for upsampling operations to gradually increase the resolution of the image and enhance the details of the image. After a series of operations, finally, an image with significantly improved clarity is output. This image is the target image obtained after processing, and subsequent appropriate printing parameters can be further determined according to its clarity level for printing output.
[0075] Since the corresponding processing method is executed according to the relationship between the image blurriness and the preset threshold, unnecessary images that do not need to be sharpened are automatically filtered through the image blurring algorithm, reducing unnecessary computing power consumption.
[0076] Based on any of the above embodiments, in a possible embodiment of the present application, refer to Figure 2, step S21 includes steps S211 to S213:
[0077] Step S211, identify the image category of the original image.
[0078] In this embodiment, the image category is a classification of images based on factors such as content features, themes, and forms of expression of the images.
[0079] As a way of classification, classified by content features. Person category: Images with people as the main object of expression, which may include single portraits, group photos, etc. For example, a family photo with the images of family members as the main content in the picture can be classified as an image of the person category. Landscape category: Mainly showing natural landscapes or urban sceneries, etc. For example, a beautiful landscape painting with elements such as mountains, rivers, and forests belongs to the landscape category image. Or a photo of the city at night with high-rise buildings, lights, etc. can also be classified as the landscape category. Animal category: The main body of the image is various animals. For example, a cute cat photo, a photo of a group of running horses, etc. Item category: With specific items as the main content, such as fruits, books, electronic products, etc. For example, a close-up photo of an apple, or a display diagram of a laptop. Animation category: The main body of the image is a cartoon image.
[0080] As another way of classification, classified by form of expression, Photo category: Images obtained by camera shooting, with real scenes and color expressions. For example, various photos in daily life, travel photos, family commemorative photos, etc. Painting category: Images created by painting means, including different painting styles such as oil paintings, watercolor paintings, and sketches. Chart category: Images presenting data or information in the form of charts, such as bar charts, pie charts, line charts, etc.
[0081] As an alternative implementation, the user observes the content of the original image with the naked eye, and directly determines which category the image belongs to according to the pre-defined image category classification criteria, and then receives the input information or tick information of the user to determine the image category of the original image. For example, when seeing that the image mainly shows the facial features of a person, it is labeled as the person category; if the image presents natural landscapes such as mountains and rivers, it is labeled as the landscape category.
[0082] As another alternative implementation, use feature extraction algorithms in computer vision, such as Scale-Invariant Feature Transform (SIFT), Histogram of Oriented Gradients (HOG), etc., to extract the feature vectors of the original image, and then input these feature vectors into a pre-trained classification model, such as classification models like Support Vector Machine (SVM), Convolutional Neural Network (CNN), and the model outputs the image category to which the image belongs.
[0083] Step S212, obtain the target super-resolution model corresponding to the image category.
[0084] In this embodiment, each image category has a corresponding target super-resolution model.
[0085] Exemplarily, the image categories include the human category, the landscape category, and the animation category. The super-resolution models include a first super-resolution model for super-resolving human images, a second super-resolution model for super-resolving landscape images, and a third super-resolution model for super-resolving animation images.
[0086] Step S213: Use the target super-resolution model to perform super-resolution processing on the original image to obtain the target image.
[0087] As an alternative implementation, first, according to the determined image category of the original image, accurately find the corresponding super-resolution model from multiple pre-trained super-resolution models. For example, if it is determined that the original image belongs to the architecture category, then find the super-resolution model specifically trained for architecture images. Perform necessary preprocessing on the original image, such as adjusting the image size to meet the input requirements of the super-resolution model, and normalizing the image pixel values, for example, normalizing them to the range [0, 1], to ensure that the data format input to the super-resolution model is standardized. Input the preprocessed original image into the corresponding super-resolution model, and perform a series of operations such as feature extraction and upsampling according to the internal network structure and operation logic of the super-resolution model, and finally output the image with increased resolution, that is, the target image. In this process, some relevant parameters can be set to control the super-resolution effect, such as the magnification factor and the quality level of the output image, to better meet different printing requirements.
[0088] As an alternative implementation, if it is recognized that the original image contains at least two image categories, obtain the area proportion corresponding to each image category, and use the image category with the largest area proportion as the target image category, and then obtain the target super-resolution model corresponding to the target image category.
[0089] As another alternative implementation, if it is recognized that the original image contains at least two image categories, segment the original image based on the image categories to obtain sub-images corresponding to each image category, and record the segmentation parameters; according to the image categories of the sub-images, determine the target super-resolution models corresponding to each sub-image, perform super-resolution processing on each sub-image according to the target super-resolution models to obtain target sub-images, and then splice the target sub-images into the target image based on the recorded segmentation parameters.
[0090] Exemplarily, the method of determining the category by using the feature extraction and classification algorithm is adopted. For example, for an image, first use the SIFT feature extraction algorithm to extract the feature vector of the image. The SIFT algorithm detects key points in different scale spaces and calculates the directional gradient histogram around the key points to form a feature descriptor, so as to obtain rich feature information of the image, which is represented in the form of a feature vector. Then, the extracted feature vector is input into the pre-trained CNN-based image classification model. This CNN model is trained on a large number of labeled image data of different image categories, including natural scenery, portraits, buildings, animals, etc. It has learned the feature patterns of different category images and can accurately judge the category to which the input feature vector belongs. For this image, after the operation of the model, it finally outputs that it belongs to the natural scenery category. The resolution of the original image is improved according to the super-resolution model corresponding to the image category to obtain the target image: Since it is determined that this image belongs to the natural scenery category, a super-resolution model specifically trained for natural scenery images is found from the existing multiple super-resolution models. Then, preprocess this original image. First, check the input requirements of the super-resolution model and find that the image size needs to be adjusted to 256×256 pixels. So, the aspect ratio of the length and width of the original image is appropriately adjusted through the image scaling algorithm to make its size meet the requirements. Then, normalize the pixel values of the image to the [0,1] interval to ensure the standardization of the data format. Input the preprocessed original image into the super-resolution model corresponding to the natural scenery image. The convolutional layer inside the model starts to extract the feature information of the image, and then gradually improves the resolution of the image through the upsampling layer. For example, the size of the image is enlarged through operations such as transposed convolution, and more detailed information is restored at the same time. Finally, the model outputs the image with improved resolution, that is, the desired target image, which is clearer and has richer details than the original image. Subsequently, the printing parameters can be further determined according to its clarity and other conditions for printing.
[0091] Based on any of the above embodiments, in a possible embodiment of the present application, after the step of obtaining the image blur degree of the original image, the method further includes: if the image blur degree is less than the preset threshold, adapt the inkjet printing parameters according to the original image, and print the original image based on the inkjet printing parameters.
[0092] As an optional implementation, first, determine a preset threshold for judging the blurriness of an image. This threshold can be pre-set through a large number of experiments and a comprehensive evaluation of the printing effect, for example, the preset threshold is set to a specific blurriness value. Prepare a corresponding image acquisition device and a printer with an inkjet printing function, and ensure that the printer is normally connected to the computer system that controls its operation. The computer system is installed with a software program that can realize image-related processing and control printer printing in this implementation. The original image to be printed is acquired through the image acquisition device, and the original image data is transmitted to the image processing program module running in the computer system. The image blurriness of the original image is acquired using the image blurriness detection algorithm built into the image processing program. For example, a gradient-based method can be used to calculate the gradient value of each pixel in the image, and the overall blurriness of the image can be measured by statistically analyzing the distribution of the gradient value; or a frequency domain analysis method can be used to perform Fourier transform on the image, and the blurriness can be judged by observing the proportion of high-frequency components. If it is detected that the image blurriness of the original image is greater than the preset threshold, the super-resolution processing module is started to perform super-resolution processing on the original image. Super-resolution processing can use a super-resolution reconstruction algorithm based on deep learning, input the original image, and after model calculation and feature extraction and other operations, output a target image with higher resolution and clearer details. When it is detected that the image blur of the original image is less than the preset threshold, it means that the clarity and other conditions of the original image itself meet the requirements of direct printing, and no super-resolution processing is required. At this time, the original image is directly passed to the inkjet printing parameter adaptation module. Similarly, in the inkjet printing parameter adaptation module, according to the original image's own characteristics such as color, resolution, and details, combined with the relevant performance parameters of the printer, suitable inkjet printing parameters are adapted for the original image. The inkjet printing parameters include at least one parameter that affects the print quality, such as printer resolution, print quality settings, and the proportion of small ink dots. The determined inkjet printing parameters are passed to the inkjet printer, so that the printer prints the original image based on these parameters to complete the printing operation of the entire image.
[0093] For example, there is a landscape photo, and its image blur value is calculated to be 12. Since 12 is not greater than 15, that is, the image blur is not greater than the preset threshold, then this landscape photo is directly determined as the target image without being processed by the super-resolution model. The inkjet printing parameters are directly adapted according to the original image, and the original image is printed based on the inkjet printing parameters.
[0094] Through the above implementation, it is possible to reasonably choose whether to perform super-resolution processing according to the actual blurriness of the image, and adapt appropriate inkjet printing parameters, so as to ensure printing quality while taking into account processing efficiency and reducing time costs as much as possible.
[0095] Based on the above embodiments, in a possible embodiment of the present application, referring to Figure 4 , before step S21, steps A1 to A2 are included:
[0096] Step A1, obtain the training image data sets corresponding to each image category.
[0097] In this embodiment, the training image data set is a data set used to train the super-resolution model, usually composed of a large number of low-resolution images and corresponding high-resolution images. These data are the basis for the model to learn how to recover high-resolution images from low-resolution images. The training image data set includes: the crawler image data sets corresponding to each of the image categories obtained by data crawling, the public image data sets corresponding to each of the image categories, and the generated image data sets corresponding to each of the image categories.
[0098] As an alternative implementation, first clarify the image categories to be processed. The image categories can be determined according to the actual application scenarios and requirements. For example, if mainly processing landscape photo printing, determine the landscape image category; if also processing portrait photo printing, add the portrait image category, etc. Collect a large number of low-resolution and high-resolution image pairs belonging to each image category as the training image data set. Image data can be obtained from various sources, such as image libraries on the Internet, self-taken photo collections, etc. For low-resolution images, they can be generated by downsampling high-resolution images. Preprocess the collected training image data set, including operations such as image cropping, normalization, and data augmentation. For example, randomly crop the images to increase data diversity, normalize the pixel values of the images to a specific range, or perform data augmentation through operations such as rotation and flipping to improve the generalization ability of the model.
[0099] Step A2, based on the training image data sets of each of the image categories, train the corresponding super-resolution model. During the training process, adjust the parameters of the super-resolution model based on the training process data until the super-resolution model meets the preset performance indicators, and obtain the preset super-resolution models corresponding to each of the image categories.
[0100] In this embodiment, the untrained super-resolution model is a neural network model constructed based on a certain deep learning framework, with certain parameters and architectures, but has not learned the features and rules of specific image categories through training. The training process data are various data generated during the model training process, including the loss value, accuracy, and feature maps of the intermediate layers of the model. These data can be used to monitor the training progress and performance of the model, and for model optimization. The preset performance indicator is the threshold value that the performance indicator in the super-resolution model is expected to reach.
[0101] As an alternative implementation, select a suitable super-resolution model architecture, such as deep learning models like SRCNN, ESPCN, EDSR, etc. Different model architectures vary in performance, complexity, etc., and can be selected according to factors such as specific image categories and computing resources. Initialize the parameters of the model, which can be initialized using random initialization or the parameters of a pre-trained model. If there is a relevant pre-trained model, the knowledge learned by it on similar tasks can be utilized to accelerate the training process of the model. Use the low-resolution images in the training image dataset as the input of the model, and the corresponding high-resolution images as the target output for model training. During the training process, use an appropriate loss function to measure the difference between the model output and the target output, such as mean squared error, perceptual loss, etc. Continuously adjust the parameters of the model through an optimization algorithm to gradually reduce the value of the loss function, so that the model learns the ability to recover from low-resolution images to high-resolution images.
[0102] As an alternative implementation, during the model training process, regularly monitor the training process data, such as loss values, accuracy, etc. A validation set can be used to evaluate the performance of the model to promptly detect problems such as overfitting or underfitting. Adjust the hyperparameters of the model according to the training process data, such as learning rate, batch size, number of network layers, etc. Hyperparameter optimization methods such as grid search and random search can be used to find the best combination of hyperparameters. Further optimize the model, such as using regularization techniques to prevent overfitting, or using model ensemble techniques to improve the performance of the model. When the performance of the model meets the expected requirements or the training process reaches a certain number of iterations, stop the training to obtain the final super-resolution model. A test set can be used to conduct a final evaluation of the model to ensure that the model also performs well on new image data.
[0103] Exemplarily, for the landscape image category, a large number of high-resolution landscape photos were collected from an online landscape picture library, and then corresponding low-resolution images were generated through downsampling and other methods. These images were cropped to remove incomplete information that might exist in the edge parts, the pixel values were normalized to the range of [0, 1], and data augmentation operations such as horizontal flipping and vertical flipping were randomly performed to obtain the training image dataset for the landscape image category. For the portrait image category, some portrait photo collections were collected, and the same downsampling and preprocessing operations were performed to obtain the training image dataset for the portrait image category. For the landscape image category, the EDSR model was selected as the initial model architecture. The parameters of the model were randomly initialized, and the low-resolution images of the landscape image category were used as the input, and the corresponding high-resolution images were used as the target output. The mean square error was used as the loss function, and the Adam optimization algorithm was used to update the parameters. During the training process, every certain number of iterations, the images on the validation set were used to evaluate the performance of the model so as to adjust the training strategy in a timely manner. For the portrait image category, the SRCNN model was selected as the initial model architecture, and the parameter initialization and training process were also carried out. During the training process of the landscape image category model, it was found that as the training progressed, the loss value gradually decreased, but began to stabilize after a certain number of iterations. At this time, the learning rate was tried to be reduced and the model was continued to be trained to observe the change of the loss value. At the same time, regularization techniques were used to prevent overfitting. After multiple adjustments and optimizations, when the performance of the model on the validation set reached a good level, the training was stopped to obtain the super-resolution model for the landscape image category. For the portrait image category model, a similar method was also used for optimization. By monitoring the training process data, adjusting the hyperparameters, performing regularization processing, etc., the super-resolution model for the portrait image category was finally obtained. In this way, the super-resolution models optimized for the landscape and portrait image categories respectively were obtained, which could be used to process the original images of the corresponding categories to obtain the target images.
[0104] Optionally, step A1 includes steps A11 to A13:
[0105] Step A11, obtaining the crawler image dataset corresponding to each of the image categories based on a data crawler;
[0106] Step A12, obtaining the public image dataset corresponding to each of the image categories;
[0107] Step A13, generating the generated image dataset corresponding to each of the image categories.
[0108] In this embodiment, a data crawler is a program or tool that automatically crawls data from network resources such as the Internet according to preset rules. By setting specific keywords, website ranges, filtering conditions, etc., image data that meets the requirements can be obtained in batches. For example, for the category of "landscape images", a large amount of related picture information can be crawled. The crawler image dataset is the data crawled from the network by the data crawler. After being screened, sorted, and other processed, these data can be used as part of the training image dataset. Its characteristic is that the data volume may be relatively large, but the quality and standardization are uneven and further processing is required. The public image dataset is an image dataset that has been sorted out and publicly shared by relevant institutions, research teams or organizations. These datasets usually have clear classification labels, standardized image formats, and certain quality guarantees, and are often collected and sorted out around specific themes or image categories, which is convenient for researchers to directly use for model training and other work. The generated image dataset is an image data set created by specific image generation algorithms, models or artificial synthesis. For example, using technologies such as generative adversarial networks (GANs), new images are generated according to the set image category features to supplement the training image dataset and enrich the diversity of the data. The training image dataset: After integrating the crawler image dataset, the public image dataset, and the generated image dataset, and through operations such as cleaning and preprocessing, it is the complete image data set finally used for the training of the super-resolution model. Its quality, quantity, and diversity have a crucial impact on the training effect of the super-resolution model.
[0109] As an alternative implementation, determine the image categories to be crawled and their corresponding keywords. For example, for the landscape image category, keywords such as "mountains", "lakes", "forests", etc. can be set; for the portrait image category, keywords such as "portrait", "full body photo", "group portrait", etc. can be set to accurately locate the image content to be obtained. Select a suitable data crawler tool or framework, such as the Scrapy framework or the BeautifulSoup library in Python. Write the corresponding crawler code according to the characteristics of the selected tool, and configure the range of URLs to be crawled, such as restricting the crawl within well-known image sharing websites, photography forums, and other websites rich in resources and related to images. Set filtering rules in the crawler code, such as the resolution range, format, file size, etc. of the images, to ensure that the crawled images meet the basic requirements for subsequent training and filter out image data that does not meet the conditions. Start the crawler program to automatically crawl image data on the network according to the set rules, and save the crawled images to a specified local folder to form a set of crawler image datasets corresponding to each image category. Search for publicly available image datasets related to each image category through channels such as search engines, academic databases, and professional data sharing platforms. For example, on a well-known data science competition and dataset sharing platform, use the image category name as a keyword to search for datasets that have been published and are suitable for super-resolution model training. View the detailed introduction documents of the datasets to understand information such as the data source, annotation method, image quality, and usage license, and ensure that they meet the usage requirements and can be used for training within the license scope. Download the publicly available image datasets to the local according to the download links or methods provided in the documents, and organize and store them separately according to the image categories for convenient integration with other data later.
[0110] Select a suitable image generation method or model. If a generative adversarial network (GAN) is used to generate data, a suitable GAN architecture can be selected, such as DCGAN (Deep Convolutional Generative Adversarial Network), StyleGAN, etc., and the model can be configured with corresponding parameters according to the characteristics of the image categories to be generated. For example, for landscape images, configure the characteristic parameters of common elements in the generated images (such as the sky, vegetation, water areas, etc.). Prepare the basic data or conditional information for generating images. For example, provide some reference images or feature vectors as a guide for generating images to make them more in line with the characteristics of the target image category. Run the image generation model to generate a batch of new image data according to the set conditions, and organize the generated images to remove images that clearly do not meet the requirements or have generation defects to form a set of generated image datasets corresponding to each image category.
[0111] Perform data cleaning on the obtained crawler image dataset, public image dataset, and generated image dataset respectively, removing duplicate images, damaged images that cannot be opened normally, etc., to ensure the accuracy and integrity of the data. Perform data preprocessing operations, such as unifying the size of the images and normalizing the images. Data augmentation operations can also be carried out, such as random rotation, cropping, adding noise and then removing it, etc., to increase the diversity of the training image dataset and improve the generalization ability of the model. Integrate these three parts of data that have been cleaned and preprocessed together, and divide them into a training set, a validation set, and a test set according to a certain proportion, and finally form a complete training image dataset for super-resolution model training.
[0112] Exemplarily, training image datasets are to be determined for two categories: landscape images and portrait images. For the landscape image category, keywords such as "mountains", "sea", "grassland" are determined. The Scrapy framework is used to write crawler code, and the range of websites to be crawled is configured mainly as several well-known photography image websites. Screening rules are set in the code to only retain images with a resolution of 300×300 pixels or above and in JPEG or PNG format. After starting the crawler, it automatically grabs eligible images on the network and saves these images to a local folder named "landscape crawler image dataset". After a period of crawling, a crawler image dataset of thousands of landscape images is obtained. For the portrait image category, keywords such as "single-person photo", "group photo", "smiling expression" are set. Similarly, the Scrapy framework is used to crawl on relevant websites, screen out portrait images with appropriate resolution and correct format, and save them to the "portrait crawler image dataset" folder, obtaining a certain number of portrait crawler image datasets. On the Kaggle platform, a public image dataset related to landscape images is searched, and a dataset named "BeautifulLandscapes" is found. By viewing its introduction document, it is known that it contains various high-resolution and detailedly annotated landscape images, which meet the usage requirements and are allowed for commercial and scientific research purposes. It is downloaded to the local through the download link provided in the document and organized into the "landscape public image dataset" folder. For the portrait image category, a public image dataset named "PortraitDataset" is searched in the academic database. This dataset collects portrait photos of different ages and different people, and the data quality is relatively high. After downloading, it is stored in the "portrait public image dataset" folder. For the landscape image category, the DCGAN model is selected to generate data. According to the common constituent elements and characteristics of landscape images, model parameters are configured, such as setting parameters for the proportion and color distribution of elements such as sky, mountains, and rivers in the generated images. Some classic landscape images are provided as references, and the DCGAN model is run to generate a batch of new landscape images. After screening out some images with unsatisfactory effects, the qualified generated images are stored in the "landscape generated image dataset" folder. For the portrait image category, the StyleGAN model is adopted, and corresponding parameters are set according to the facial features and hairstyle characteristics of people to generate portrait images, and the "portrait generated image dataset" folder is organized. The data in each folder is cleaned to delete duplicate and damaged images. Then, preprocessing is performed to uniformly adjust the size of all images to 256×256 pixels, normalize the pixel values to the range [0,1], and perform data augmentation operations such as random cropping and rotation. The training set, validation set, and test set are divided in the ratio of 8:1:1, and finally, a complete training image dataset for super-resolution model training of the landscape image category and a complete training image dataset for super-resolution model training of the portrait image category are integrally formed.
[0113] For example, refer to Figure 3 , we can investigate the image categories that users mainly print, and then establish the corresponding super-resolution model in a targeted manner. The sources of the training image data set for model training are divided into public image data sets, generated image data sets, and data obtained by data crawlers. Images of different image categories are crawled by data crawlers, such as image category A, image category B, and image category C. That is, when the image categories are A, B, and C respectively, the training image data set includes public image data set A, public image data set B, public image data set C, generated image data set A, generated image data set B, generated image data set C, crawler image data set A, crawler image data set B, and crawler image data set C. The obtained training image data set is used for model training. The three super-resolution models are trained using images of three categories respectively. The validation set is used to evaluate the model performance during the training process. Then, the model is tuned based on the evaluation results, and the learning rate, batch size, network depth, etc. are adjusted to optimize the model performance. The trained model is saved as a super-resolution model for deployment to facilitate subsequent processing of new data.
[0114] Since the model training is obtained through automatic crawler image dataset technology, the labor cost is reduced. At the same time, the corresponding models are trained for different image categories, which improves the processing capability of the model.
[0115] Based on the above embodiment, in a possible embodiment of the present application, step S30 includes steps S31 to S33:
[0116] Step S31, determining the clarity level of the target image.
[0117] In this embodiment, the clarity level is to classify the clarity of the image into different levels according to certain standards, for example, it can be simply divided into three levels of high, medium and low, or it can be more finely divided into more levels, such as high, relatively high, medium, relatively low, low, etc. By determining the clarity level, the image quality can be more intuitively understood so as to match the corresponding printing parameters for it.
[0118] As an alternative implementation, perform differential operations on the target image in the horizontal and vertical directions to obtain the horizontal gradient and vertical gradient values at each pixel of the image. For example, common gradient operators such as the Sobel operator or the Prewitt operator can be used for calculation. Calculate the gradient magnitude through appropriate formulas. Commonly, the Euclidean distance formula is used to synthesize the horizontal and vertical gradient values to calculate the gradient magnitude of each pixel. Statistically analyze the gradient magnitude of the entire image, such as calculating metrics like the average gradient magnitude or the median gradient magnitude. Divide the clarity level according to a preset threshold range. For example, set the average gradient magnitude greater than 50 as the high clarity level, between 20 and 50 as the medium clarity level, and less than 20 as the low clarity level.
[0119] As another alternative implementation, perform a Fourier transform on the target image to transform it from the spatial domain to the frequency domain, obtaining the frequency spectrum diagram of the image. Different frequency regions in the frequency spectrum diagram reflect the intensity distribution of different frequency components of the image. Obtain the energy or amplitude of the high-frequency part. Since a clear image usually has richer high-frequency components, calculate metrics such as the total energy or amplitude mean within a specific high-frequency range as an indicator of the intensity of the high-frequency components. Similarly, divide the clarity level according to a preset threshold range. For example, when the high-frequency energy is higher than a certain value, it is determined as the high clarity level, within a certain range as the medium clarity level, and lower than a specific value as the low clarity level.
[0120] Step S32, determine the printing resolution of the target image based on the clarity level.
[0121] In this embodiment, the printing resolution refers to the distribution quantity of pixels per unit length, such as per inch, usually expressed in dpi (dots per inch). It is one of the key factors affecting the quality of printed images. A higher printing resolution means that the image contains more pixels per inch during printing output, and the printed image will be clearer and more delicate, but it may also consume more printing resources and time.
[0122] As an alternative implementation, establish a correspondence table between the clarity level and the printing resolution. This correspondence table can be formulated based on experience, printer performance characteristics, and past printing test results, etc. For example, it is stipulated that the printing resolution corresponding to the high clarity level is 1200 dpi and above, the medium clarity level corresponds to around 800 to 1200 dpi, and the low clarity level corresponds to 600 to 800 dpi or lower. According to the previously determined clarity level of the target image, look up and determine the printing resolution suitable for this image from the correspondence table.
[0123] Step S33, determine the printing parameters according to the printing resolution.
[0124] In this embodiment, once the printing resolution is determined, other relevant printing parameters can be further matched based on this. If the printing resolution is relatively high, such as 1200 dpi and above, usually a high-quality printing quality mode can be selected, such as options like "Photo Quality" and "Fine Print" in the printer settings, to give full play to the advantages of high resolution and make the printed image more delicate. At the same time, determine the color mode in combination with the content and color requirements of the image. If it is a color image and a rich color effect is desired, select the color mode; if the image itself has simple colors or only needs to be presented in grayscale, the grayscale mode can also be selected to save resources such as ink.
[0125] Exemplarily, there is a target image processed by a super-resolution model, and now its printing parameters need to be determined. The gradient-based blurriness algorithm is used to determine the level. The Sobel operator is used to perform differential operations on the target image in the horizontal and vertical directions to obtain the corresponding horizontal gradient value and vertical gradient value for each pixel point. Then calculate the gradient magnitude according to the formula. For example, for the pixel point (i, j), its gradient magnitude G(i, j) = √(Gx(i, j)^2 + Gy(i, j)^2), where Gx(i, j) is the horizontal gradient value and Gy(i, j) is the vertical gradient value. The average gradient magnitude of the entire image is statistically calculated, and it is obtained that the average gradient magnitude is 40. According to the pre-set threshold range (the average gradient magnitude greater than 50 is the high-definition level, between 20 and 50 is the medium-definition level, and less than 20 is the low-definition level), it is determined that the clarity level of this target image is medium. Referring to the previously established correspondence table between the clarity level and the printing resolution, since the clarity level of this image is medium, the printing resolution suitable for it is determined to be 900 dpi. Select other printing parameters according to the determined 900 dpi printing resolution. Set the printing quality mode of the printer to "Normal Quality", which can balance the printing speed and ink consumption while ensuring a certain image quality. Considering the paper type, select ordinary glossy printing paper, which can better cooperate with a 200 dpi resolution to display image details and has a relatively lower cost compared to photo paper, etc. For the color mode, since the image is color and a relatively rich color effect is desired, the color mode is selected for printing. Through such a series of steps, the corresponding printing parameters are determined according to the clarity level of the target image, and the image can be printed out clearly and appropriately.
[0126] Optionally, step S33 includes:
[0127] Step S331, determining the proportion of the small ink dots according to the printing resolution and the preset mapping relationship.
[0128] In this embodiment, the printing parameters further include the proportion of small ink dots. According to the previously determined printing resolution, the proportion of small ink dots is directly determined. The appropriate proportion range of small ink dots at different printing resolutions is determined based on experience, printer performance testing, etc. The proportion of small ink dots refers to the proportion of small ink dots in the total ink dots during the printing process. When the proportion of small ink dots is relatively high, the printed image may be more delicate, but the color vividness may be affected.
[0129] As an alternative embodiment, first, clarify the establishment method of the preset mapping relationship. By conducting a large number of printing tests on images at different printing resolutions and observing the influence of the proportion of small ink dots on the printing effect, the reasonable proportion range of small ink dots corresponding to different resolutions can be determined. For example, when printing at a low resolution, the proportion of small ink dots may be relatively low to ensure color vividness and printing speed; while when printing at a high resolution, the proportion of small ink dots is appropriately increased to obtain a more delicate image effect. According to the determined printing resolution, find the corresponding proportion range of small ink dots in the preset mapping relationship. If the printing resolution is 900 dpi, the corresponding proportion range of small ink dots may be 30% to 40%. Further, in combination with the specific characteristics and requirements of the image, a specific proportion value of small ink dots is determined within this range. If the image color is relatively single, the proportion of small ink dots can be appropriately reduced to improve color vividness; if the image has rich details, a higher proportion of small ink dots can be selected to enhance image clarity. Image vividness is an index to measure the color saturation, brightness, contrast, etc. of an image. An image with high vividness has richer and more vivid colors. The determined proportion of small ink dots and the printing resolution are passed to the printer control system as important printing parameters. The printer control system will adjust the inkjet mode and the distribution of ink dot sizes of the print head according to these parameters. For the case of high resolution and a high proportion of small ink dots, the printer may adopt more delicate inkjet technologies, such as reducing the ink droplet size and increasing the inkjet frequency, etc., to achieve clearer image printing. However, at the same time, since a high proportion of small ink dots may lead to a decrease in color vividness, the color management settings of the printer can be adjusted, such as increasing parameters such as color saturation and contrast, to make up for the deficiency of color vividness as much as possible. For the case of low resolution and a low proportion of small ink dots, the printer can adopt a faster printing mode and ensure a certain color vividness by optimizing the color mixing algorithm, etc.
[0130] Exemplarily, there is a target image, and the printing resolution has been determined to be 750 dpi.
[0131] The preset mapping relationship is established through multiple printing experiments on different types of images. For example, when the printing resolution is between 600 and 800 dpi, the proportion of small ink dots is usually appropriately between 35% and 45%. For this image, considering that its details are relatively rich but not wanting too much loss in color vividness, the proportion of small ink dots is selected as 40% within this range. The printing resolution of 750 dpi and the proportion of small ink dots of 40% are passed to the printer as printing parameters. The printer adjusts the printing strategy according to these parameters. During the printing process, the print head reduces the ink droplet size and increases the inkjet frequency to achieve higher resolution and a finer image effect. At the same time, to compensate for the possible reduction in color vividness caused by the high proportion of small ink dots, the color management system of the printer appropriately increases the color saturation and contrast, so that the printed image is relatively vivid in color while maintaining a high level of clarity. In this way, by comprehensively considering the printing resolution, the proportion of small ink dots, and the vividness requirements of the image, appropriate printing parameters are determined, and a better printing effect can be obtained.
[0132] Exemplarily, to help understand the technical concept or technical principle of the image printing method after combining the above embodiments, please refer to Figure 5 , Figure 5 A brief flowchart of an image printing method is provided as follows:
[0133] Obtain the input original image, calculate the image blur degree of the input original image through a blur degree algorithm, and make a determination according to a threshold. When the image blur degree is not greater than the threshold, directly automatically adapt printing parameters such as the printing resolution dpi according to the clarity level of the original image, and then print the image according to the printing parameters. When it is determined that the image is a low-resolution blurred image, perform a clarity improvement process. Specifically, make a category judgment on the input original image, such as landscape, portrait, animation, etc. Different categories of images use different algorithm models for super-resolution processing. Specific models are more likely to converge during training for specific category graphics and have better effects. Automatically adapt the image DPI printing parameters according to the processing results for printing. Use 600 to 1200 dpi for printing medium-clarity pictures through the blur degree algorithm to make the color transition smoother, and use more than 1200 dpi for printing high-clarity pictures to provide extremely high details and color restoration.
[0134] The present application provides a printing system. Refer to Figure 6, the printing system 10 includes a computer device 11 and an inkjet printing device 12. The computer device 11 is configured to receive an original image and obtain inkjet printing parameters corresponding to the original image based on the steps of the image printing method described in any of the foregoing embodiments. The inkjet printing device 12 is communicatively connected to the computer device 11 and is configured to receive the print data of the original image transmitted by the computer device 11 and print the target image based on the print data, where the print data includes the inkjet printing parameters.
[0135] This application provides a computer device, which includes: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute the image printing method in Embodiment 1 above.
[0136] Refer to the following Figure 7 , which shows a schematic structural diagram of a computer device suitable for implementing the embodiments of the present application. The computer device in the embodiments of the present application may include, but is not limited to, terminals such as mobile phones, laptop computers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions: tablet computers), desktop computers, and the like. Figure 7 The computer device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present application.
[0137] As Figure 7As shown, the computer device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 into the random access memory (RAM: Random Access Memory) 1004. In the RAM 1004, various programs and data required for the operation of the computer device are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. The input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, an image sensor, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the computer device to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a computer device with various systems, it should be understood that it is not required to implement or have all the shown systems. Instead, more or fewer systems can be implemented or had.
[0138] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above functions defined in the methods of the embodiments disclosed in the present application are executed.
[0139] The computer device provided by the present application, adopting the image printing method in the above embodiment, can solve the technical problem that low-resolution images are very blurred after actual printing in the prior art, affecting the printing effect. Compared with the prior art, the beneficial effects of the computer device provided by the present application are the same as those of the computer device provided by the above embodiment, and other technical features in this computer device are the same as the features disclosed in the method of the previous embodiment, and will not be elaborated here.
[0140] It should be understood that each part disclosed in this application can be implemented by hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0141] As described above, only the specific embodiments of this application are provided, but the protection scope of this application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in this application, and all should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0142] This application provides an image printing device 20. Referring to Figure 8 , including:
[0143] An acquisition module 21, configured to acquire the image blur degree of the original image;
[0144] A super-resolution processing module 22, configured to perform super-resolution processing on the original image to obtain a target image if the image blur degree is greater than a preset threshold;
[0145] An adaptation module 23, configured to adapt inkjet printing parameters according to the target image, and print the target image based on the inkjet printing parameters.
[0146] Acquire the image blur degree of the original image;
[0147] If the image blur degree is greater than a preset threshold, perform super-resolution processing on the original image to obtain a target image;
[0148] Adapt inkjet printing parameters according to the target image, and print the target image based on the inkjet printing parameters.
[0149] The super-resolution processing module 22 is further configured to perform super-resolution processing on the original image by using a super-resolution model to obtain the target image.
[0150] The super-resolution processing module 22 is further configured to identify the image category of the original image; acquire the target super-resolution model corresponding to the image category; and perform super-resolution processing on the original image by using the target super-resolution model to obtain the target image.
[0151] The adaptation module 23 is further configured to, if the image blur degree is less than the preset threshold, adapt inkjet printing parameters according to the original image, and print the original image based on the inkjet printing parameters.
[0152] The image printing device 20 further includes a training module 24, configured to obtain a training image data set corresponding to each image category; based on the training image data sets of the respective image categories, train a corresponding super-resolution model, and during the training process, adjust the parameters of the super-resolution model based on the training process data until the super-resolution model meets a preset performance index, thereby obtaining a preset super-resolution model corresponding to each image category.
[0153] The adaptation module 23 is further configured to determine the clarity level of the target image; determine the printing resolution of the target image based on the clarity level; and determine the printing parameters according to the printing resolution.
[0154] This application provides an inkjet printing device 12, configured to: print a target image based on the printing parameters obtained by the steps of the image printing method described in any of the foregoing embodiments.
[0155] Referring Figure 9 , the inkjet printing device 12 includes a processor 121, a memory 122, a communication bus 123, and a print head 124. A computer program is stored in the processor 122, and when the computer program is executed by the processor 121, it controls the print head 124 to print a target image according to the printing parameters. The processor 121, the memory 122, and the print head 124 perform data interaction through the communication bus 123.
[0156] Optionally, the inkjet printing device further includes a communication module 125, and the communication module 125 is configured to interact with the computer device 11 to obtain the printing parameters sent by the computer device 11.
[0157] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, and the computer-readable program instructions are used to execute the image printing method in the foregoing embodiments.
[0158] The computer-readable storage medium provided by this application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM) or flash memory, optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0159] The above computer-readable storage medium can be included in a computer device; it can also exist separately without being assembled into the computer device.
[0160] The above computer-readable storage medium carries one or more programs. When the one or more programs are executed by a computer device, the computer device is caused to: determine the image blur degree of the acquired original image; determine the target image corresponding to the original image based on the processing method corresponding to the image blur degree; and determine the printing parameters according to the clarity level of the target image.
[0161] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, by connecting through the Internet using an Internet service provider).
[0162] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of the code, and this module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0163] The modules described in the embodiments of this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.
[0164] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for performing the above-mentioned image printing method, and can solve the technical problem that low-resolution images are very blurry after actual printing in the prior art, affecting the printing effect. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the image printing method provided in the above embodiments, and will not be elaborated here.
[0165] An embodiment of the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the image printing method as described above are implemented.
[0166] The computer program product provided by the present application can solve the technical problem that in the prior art, low-resolution images are very blurred after being actually printed, affecting the printing effect. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as those of the image printing method provided by the above embodiment, and will not be elaborated here.
[0167] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied to other related technical fields, shall be equally included in the patent scope of the present application.
Claims
1. An image printing method, characterized in that: The image printing method comprises: Get the image blur of the original image; If the image blur is greater than a preset threshold, super-resolution processing is performed on the original image to obtain a target image; Inkjet printing parameters are adapted according to the target image to print the target image based on the inkjet printing parameters.
2. The image printing method according to claim 1, wherein: The super-resolution processing of the original image to obtain the target image includes: The original image is super-resolved using a super-resolutio n model to obtain the target image.
3. The image printing method according to claim 2, wherein: The super-resolution model is used to perform super-resolution processing on the original image to obtain a target image, including: Identify the image category of the original image; Obtaining a target super-resolution model corresponding to the image category; The target super-resolution model is used to perform super-resolution processing on the original image to obtain the target image.
4. The image printing method according to claim 3, wherein: The image categories include person categories, scenery categories and animation categories, and the super-resolution models include a first super-resolution model for super-resolution processing of person images, a second super-resolution model for super-resolution processing of scenery images, and a third super-resolution model for super-resolution processing of animation images.
5. The image printing method according to claim 1, wherein: After the step of obtaining the image blur of the original image, the method further includes: If the image blur is less than the preset threshold, inkjet printing parameters are adapted according to the original image to print the original image based on the inkjet printing parameters.
6. The image printing method according to claim 2, wherein: Before the step of performing super-resolution processing on the original image using the super-resolution model to obtain the target image, the printing method further includes: Obtain training image datasets corresponding to each image category; Based on the training image data set of each image category, a corresponding super-resolution model is trained. During the training process, the parameters of the super-resolution model are adjusted based on the training process data until the super-resolution model meets the preset performance indicators, thereby obtaining a preset super-resolution model corresponding to each image category.
7. The image printing method according to claim 6, wherein: The training image data set includes: a crawler image data set corresponding to each of the image categories obtained based on a data crawler, a public image data set corresponding to each of the image categories, and a generated image data set corresponding to each of the image categories.
8. The image printing method according to any one of claims 1 to 7, characterized in that: The step of adapting inkjet printing parameters according to the target image comprises: determining the clarity level of the target image; determining a printing resolution of the target image based on the clarity level; The printing parameters are determined according to the printing resolution.
9. An image printing device, characterized in that: include: An acquisition module, used for acquiring the image blur of the original image; A super-resolution processing module, used for performing super-resolution processing on the original image to obtain a target image if the blurriness of the image is greater than a preset threshold; The adapting module is used to adapt the inkjet printing parameters according to the target image, so as to print the target image based on the inkjet printing parameters.
10. A computer device, characterized in that: The computer device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the image printing method according to any one of claims 1 to 8.
11. An inkjet printing device, characterized in that: The inkjet printing device is used to print a target image based on the printing parameters obtained in the steps of the image printing method according to any one of claims 1 to 8.
12. A printing system, characterized in that: The printing system comprises: A computer device, configured to receive an original image and obtain inkjet printing parameters corresponding to the original image based on the steps of the image printing method according to any one of claims 1 to 8; An inkjet printing device is communicatively connected to the computer device, and is used to receive printing data of the original image transmitted by the computer device, and print the target image based on the printing data, wherein the printing data includes the inkjet printing parameters.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the image printing method according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Ink-jet printing image processing method and electronic equipment
CN121073765A