Image printing data generation method, device and system and storage medium
By identifying the image type and determining the adaptive rendering mode and halftone mode, printing data is generated, the problem of poor printing effect in the prior art is solved and the printing quality is improved.
Patent Information
- Application Number
- CN202411894334.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-20
AI Technical Summary
In the prior art, it is difficult to accurately find the best combination of print data, resulting in poor printing results.
By acquiring the image to be printed, identifying its image type, and determining the matching rendering mode and halftone mode based on the image type, the image is parsed to generate print data.
The printing data of the adaptive recommended image is realized, and the resolution, color balance, brightness and other content of the image are optimized, thereby improving the overall quality of the print output.
Smart Images

Figure CN119806444A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of printing technology, and in particular to a method, device, system and storage medium for generating printing data of an image. Background Art
[0002] At present, the printing data of the printer includes many aspects, such as the ICC (International Color Consortium) file determines the color mapping relationship, the color mode affects the color presentation method, and the printing resolution determines the clarity of the image. For the same image, different parameter settings will produce different printing effects.
[0003] In the related art, users need to manually adjust the printing data according to their own needs and experience to obtain a more satisfactory printing result. However, it is difficult for ordinary users to accurately find the best printing data combination, which may result in poor printing effect. Summary of the invention
[0004] The main purpose of the present application is to provide a method, device, system and storage medium for generating printing data of an image, aiming to solve the technical problem in the prior art that it is difficult to accurately find the best printing data combination, which leads to poor printing effect.
[0005] To achieve the above object, the present application provides a method for generating print data of an image, the method comprising:
[0006] Acquire an image to be printed, and identify the image type of the image to be printed;
[0007] Based on the image type, determining a rendering mode and a halftone mode matching the image to be printed;
[0008] The image to be printed is parsed according to the rendering mode and the halftone mode matched by the image to be printed to obtain printing data of the image to be printed.
[0009] In one embodiment, the step of identifying the image type of the image to be printed includes:
[0010] Inputting the image to be printed into an image classification model;
[0011] The image to be printed is classified using the image classification model to obtain the image type of the image to be printed.
[0012] In one embodiment, the step of identifying the image type of the image to be printed includes:
[0013] Obtaining probability values of the image to be printed corresponding to each image type;
[0014] The image type with the largest probability value is used as the image type of the image to be printed.
[0015] In one embodiment, the step of determining a rendering mode that matches the image to be printed based on the image type includes:
[0016] If the image type is associated with an associated rendering mode, the associated rendering mode is determined as a rendering mode that matches the image to be printed;
[0017] If the image type is not associated with an associated rendering mode, a default rendering mode is determined as a rendering mode matching the image to be printed.
[0018] In one embodiment, the step of determining a halftone pattern matching the image to be printed based on the image type includes:
[0019] If the image type is associated with an associated halftone mode, the associated halftone mode is determined as the halftone mode that matches the image to be printed;
[0020] If the image type is not associated with an associated halftone mode, a default halftone mode is determined as the halftone mode that matches the image to be printed.
[0021] In one embodiment, the image type includes a natural type, a text type, a humanistic type, an abstract type, and a simple color type; the rendering mode includes a perceptual mode, a relative mode, an absolute mode, and a saturation mode; the halftone mode includes a second-order halftone mode and a third-order halftone mode; and based on the image type, determining the rendering mode and the halftone mode that match the image to be printed includes:
[0022] If the image type is a natural type, determining the rendering mode is a perceptual mode, and determining the halftone mode is a three-level halftone mode;
[0023] If the image type is a text type, determining the rendering mode is a perception mode, and determining the halftone mode is a second-order halftone mode;
[0024] If the image type is a humanistic type, determining the rendering mode to be a relative mode, and determining the halftone mode to be a three-level halftone mode;
[0025] If the image type is an abstract type, determining the rendering mode is an absolute mode, and determining the halftone mode is a second-order halftone mode;
[0026] If the image type is a simple color type, the rendering mode is determined to be a saturation mode, and the halftone mode is determined to be a three-level halftone mode.
[0027] In one embodiment, before the step of parsing the image to be printed according to the rendering mode and the halftone mode matched by the image to be printed to obtain the print data of the image to be printed, the method further includes:
[0028] If the image type is associated with an image processing mode, the image to be printed is processed based on the image processing mode to obtain an updated image to be printed.
[0029] In one embodiment, the step of processing the image to be printed based on the image processing mode includes:
[0030] If the image type is a humanistic type or a natural type, super-resolution processing is performed on the image to be printed; and / or
[0031] If the image type is an abstract type or a text type, edge enhancement processing is performed on the image to be printed.
[0032] In one embodiment, before the step of determining the rendering mode and the halftone mode based on the image type of the image to be printed, the method further includes:
[0033] Performing image quality evaluation on the image to be printed to obtain the resolution and noise of the image to be printed;
[0034] The image to be printed is optimized based on the resolution and the noise.
[0035] In addition, to achieve the above-mentioned purpose, the present application also provides a computer device, which includes: 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 method for generating printing data for an image as described above.
[0036] In addition, to achieve the above-mentioned purpose, the present application also provides an inkjet printing device, characterized in that it is used to determine the printing data of the image to be printed based on the steps of the printing data generation method of the image as described above, and then print the image to be printed based on the printing data.
[0037] In addition, to achieve the above-mentioned purpose, the present application also provides a printing system, which includes a host computer and an inkjet printer, wherein the host computer is used to obtain an image to be printed, and generate print data of the image to be printed based on the steps of the image print data generation method as described above, and send the print data to the inkjet printing device; the inkjet printing device is used to print the image to be printed based on the print data; or,
[0038] The host computer is used to obtain the image to be printed and send the image to be printed to the inkjet printing device; the inkjet printing device is used to generate print data of the image to be printed based on the steps of the image print data generation method as described above, and then print the image to be printed based on the print data.
[0039] In addition, to achieve the above-mentioned purpose, the present application also provides a storage medium, which is a computer-readable storage medium, and the computer-readable storage medium stores a program for implementing the method for generating printing data for an image, and the program for implementing the method for generating printing data for an image is executed by a processor to implement the steps of the method for generating printing data for an image as described above.
[0040] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the method for generating print data of an image as described above.
[0041] The present application provides a method for generating print data of an image, a computer device, a printing system and a storage medium. The present application obtains an image to be printed and identifies the image type of the image to be printed; based on the image type, determines the rendering mode and halftone mode that match the image to be printed; according to the rendering mode and halftone mode that match the image to be printed, the image to be printed is parsed to obtain the print data of the image to be printed. That is, the present application extracts the image type corresponding to the image to be printed, and then maps the image type to the rendering mode and halftone mode, and finally obtains the print data, thereby realizing the print data of the adaptively recommended image, optimizing the image resolution, color balance, brightness and other contents, thereby improving the overall quality of the print output. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0044] Figure 1 This is a flow chart of steps S10-S30 in an embodiment of a method for generating printing data of an image of the present application;
[0045] Figure 2A schematic diagram of determining a rendering mode and a halftone mode according to an image type in an embodiment of a method for generating print data of an image of the present application;
[0046] Figure 3 This is a flow chart of steps A21-A22 in an embodiment of a method for generating printing data of an image of the present application;
[0047] Figure 4 A comparative schematic diagram of natural type image processing in an embodiment of a method for generating print data of an image of the present application;
[0048] Figure 5 A comparative schematic diagram of text type image processing in an embodiment of a method for generating print data of an image of the present application;
[0049] Figure 6 A comparative schematic diagram of humanistic image processing in an embodiment of a method for generating print data of an image of the present application;
[0050] Figure 7 A comparative schematic diagram of an abstract type image processing in an embodiment of a method for generating print data of an image of the present application;
[0051] Figure 8 A comparative schematic diagram of simple color type image processing in an embodiment of a method for generating print data of an image of the present application;
[0052] Fig. 9 A schematic diagram of the printing system for this application;
[0053] Fig.10 A schematic diagram of the hardware structure of the computer device in the embodiment of the present application;
[0054] Fig.11 Schematic diagram of the hardware structure of the inkjet printing device in the embodiment of the present application.
[0055] Description of Figure Numbers:
[0056] Printing system 1000; host computer 100; inkjet printing device 200; printing component 210; slide rail 211; print head 212; processor 230; memory 220.
[0057] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0058] 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.
[0059] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0060] Currently, users need to manually adjust these print data according to their own needs and experience to obtain a more satisfactory print result. However, for non-professional users, it is difficult to accurately find the best print data combination, which leads to poor print results.
[0061] The main solution of this application is: obtain the image to be printed, and identify the image type of the image to be printed; based on the image type, determine the rendering mode and halftone mode that match the image to be printed; according to the rendering mode and halftone mode that match the image to be printed, parse the image to be printed to obtain the printing data of the image to be printed. That is, this application extracts the image type corresponding to the image to be printed, and then maps it to the rendering mode and halftone mode according to the image type, and finally obtains the printing data, thereby realizing the printing data of the adaptively recommended image, optimizing the image resolution, color balance, brightness and other contents, thereby improving the overall quality of the printed output.
[0062] It should be noted that the execution subject of some embodiments may be a printing system, 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 realizing the above functions, or an inkjet printing device, or a host computer of an inkjet printing device, and some embodiments do not specifically limit this. The following describes some embodiments and the following embodiments by taking the host computer as the execution subject as an example.
[0063] Based on this, a method for generating printing data of an image is proposed in an embodiment of the present application. Figure 1 The method for generating printing data of the image comprises steps S10 to S30:
[0064] Step S10, acquiring an image to be printed, and identifying the image type of the image to be printed.
[0065] In some embodiments, the image to be printed is an image uploaded by a user or selected by a user and needs to be printed. The image type is the main style of the image to be printed, including but not limited to natural type, text type, humanistic type, abstract type and simple color type.
[0066] As an optional implementation, the image to be printed is identified based on a pre-trained image classification model to obtain the image type corresponding to the image to be printed, that is, at this time, a unique image type is determined.
[0067] As another optional implementation, the image types that the to-be-printed image may correspond to are determined, and then the final image type is selected according to the probability values of each image type.
[0068] Step S20: determining a rendering mode and a halftone mode matching the image to be printed based on the image type.
[0069] In some embodiments, the rendering mode is a color mode in which the image is rendered as a whole, including but not limited to a perceptual mode, a relative mode, an absolute mode, and a saturation mode.
[0070] In some embodiments, a default rendering mode may also be preset, where the default rendering mode is any one of perceptual, relative, absolute, and saturated selected by the user. Optionally, the default rendering mode is a perceptual mode.
[0071] Furthermore, in response to the interactive interface, the click operation of the rendering mode control is changed, and a rendering mode setting control pops up, in which candidate controls are displayed, and the candidate controls are perception mode, relative mode, absolute mode and saturation mode. According to receiving a click operation on any candidate control, the selected mode is used as the rendering mode for subsequent rendering.
[0072] As an optional implementation, a rendering mode and a halftone mode associated with the image type are obtained. If the image type is not associated with a rendering mode, the rendering mode is determined to be a default rendering mode; and / or if the halftone mode is not associated, the halftone mode is determined to be a default halftone mode.
[0073] Step S30: parsing the image to be printed according to the rendering mode and the halftone mode matched by the image to be printed to obtain printing data of the image to be printed.
[0074] In some embodiments, the print data is a configuration parameter used by an inkjet printing device to print an image to be printed. Based on the print data, the image to be printed can be printed, which may include print content data (such as the color value of each pixel in the image (composed of the values of the three color channels of red, green, and blue) will be converted into instructions that the printer nozzle can understand), and print control instruction data (such as color management instructions). The print data may be PRN data.
[0075] Render the image to be printed according to the determined rendering mode. This includes adjusting parameters such as color, contrast, brightness, etc. to optimize the display effect of the image. Use the determined halftone mode to halftone the rendered image. Halftone processing includes the process of converting a continuous-tone image (such as a photo) into an image that uses discrete dots to represent the tonal changes. Its purpose is to simulate the visual effect of continuous tones with limited ink colors and printing resolution. Convert the rendered and halftone-processed image into print data that can be understood by the printing device, including the image's pixel data, color information, printing resolution, etc.
[0076] As an optional implementation, the host computer first receives the image to be printed uploaded by the user or selected by the user. Then, a pre-trained model is called, such as an image classification model based on deep learning, such as a convolutional neural network CNN, which can classify the input image after being trained with a large number of different types of images, identify the image to be printed, and determine the image type corresponding to the image to be printed. For example, if the image mainly presents natural scenery, such as mountains, rivers, flowers and plants, the model will classify it as the "natural" image type after judgment; if the image content is mostly text layout, such as document screenshots, it is classified as the "text" type. For different image types, the host computer matches the corresponding rendering mode according to the preset rules. For example, when the image type is a natural type, the "perception" rendering mode can be selected. This mode can adjust the image color according to the human eye's perception of color, so that the printed image color is more in line with the human eye's visual perception. At the same time, the default rendering mode specified by the user can be received. The user can select one of the rendering modes such as "perception", "relative", "absolute" and "saturation" as the default rendering mode of his preference. The user-specified mode will be used first when processing the image later, unless there is a more suitable preset mode for the specific feature type. The selected rendering mode is used to render the image to be printed as a whole. During the processing, the resolution of the image will be optimized, such as improving the image resolution through super-resolution algorithms, so that it is clearer when printed; the color balance will be adjusted to ensure that the proportions between the various colors are coordinated to avoid color cast; the brightness will also be adjusted to make the overall brightness and darkness of the image moderate, which meets the requirements of normal visual viewing and printing. After these processes, the target image is obtained. A set of corresponding rules based on different target image features and inkjet printing device parameters are stored. These rules are established through a large number of printing experiments and combined with relevant knowledge such as color science and image processing in this field. For example, when the color saturation of the target image is high, the ink ejection volume parameter of the corresponding inkjet printing device may need to be appropriately adjusted up; if the target image has a high resolution and rich details, then the print head movement speed parameter may need to be appropriately reduced to ensure that the print head has enough time to accurately eject ink at each pixel position to achieve clear presentation of details. The host computer parses the specific printing data suitable for the image to be printed according to the actual characteristics of the target image and the above-mentioned corresponding relationship rules. These printing data include but are not limited to the ink ejection volume, print head movement speed, printing resolution, and consumable type selection. Different image contents may be suitable for different consumables. For example, images with high color saturation are suitable for printing on consumables with better glossiness. Then these parameter configuration information is sent to the inkjet printing device so that it can perform printing operations according to the recommended parameters.
[0077] For example, the user selects a landscape photo as the image to be printed through the software interface of the host computer connected to the inkjet printing device. The pre-trained CNN-based image classification model can be called to identify the image, and the model determines that the image belongs to the "natural type" image type. Then, according to the preset rules, the "perception mode" rendering mode is selected for it to process the image to be printed. During the processing, the host computer uses a bilinear interpolation algorithm to appropriately increase the original resolution of the image, such as 1920×1080 pixels, to 3840×2160 pixels to enhance the detail expression during printing; the color adjustment algorithm is used to optimize the color balance, so that the red of the sunset, the blue of the sea and other colors are more vivid and coordinated; at the same time, the overall brightness of the image is adjusted to a moderate state to avoid being too bright or too dark. After these processes, the target image is generated. The printing data is parsed according to the characteristics of the target image. Because the image is rich in color and has a higher resolution, the ink jetting volume parameter of the inkjet printing device is increased by 20% from the original default value to ensure the richness of the color; the print head moving speed parameter is reduced by 30% to allow the print head to have enough time to accurately spray ink at each pixel to ensure that the details can be fully presented at high resolution; and it is recommended to choose a photo-specific paper type with high gloss and good ink absorption. After the host computer sends these print data to the inkjet printing device, the inkjet printing device performs printing operations according to these parameters, and finally obtains a colorful and detailed seaside sunset landscape print product.
[0078] Through such an image printing data generation method and its specific implementation, ordinary users can also obtain relatively satisfactory printing results and improve printing quality.
[0079] The present application first determines at least one feature type based on the image type of the image to be printed; obtains the image to be printed and identifies the image type of the image to be printed; based on the image type, determines the rendering mode and halftone mode that match the image to be printed; according to the rendering mode and halftone mode that match the image to be printed, the image to be printed is analyzed to obtain the printing data of the image to be printed, thereby realizing adaptive recommendation of the printing data of the image, optimizing the resolution, color balance, brightness and other contents of the image, thereby improving the overall quality of the printed output.
[0080] Based on any embodiment, in a possible embodiment of the present application, step S10 includes:
[0081] Step A10, obtaining the image to be printed.
[0082] It has the ability to process compatible image formats and can support reading and processing image files in formats such as JPEG, PNG, BMP, TIFF, etc. When receiving images to be printed in different formats, the internal image parsing module will perform corresponding decoding operations according to the characteristics of the image format, and convert the image data into a unified internal data structure for subsequent image type determination and other processing procedures. For example, for JPEG format images, they will be decompressed and decoded according to their compression encoding rules; for PNG format images, the image data, transparency information, etc. contained in them will be parsed and converted into a format that is convenient for subsequent operations, ensuring that images in any format can smoothly enter the subsequent image type determination link.
[0083] Step A20, identifying the image type of the image to be printed.
[0084] In some embodiments, the image to be printed is input into an image classification model; then the image to be printed is classified using the image classification model to obtain the image type of the image to be printed. In some embodiments, a variety of underlying features of the image to be printed are extracted by an image analysis algorithm, including but not limited to color histogram features, such as statistical distribution ratios of different colors in the image, texture features such as analyzing the repeated arrangement pattern of elements in the image, such as the texture of the beach, the texture of clothing fabric, etc., shape features such as describing the outline shape of obvious objects in the image, such as a round sun, a square building, etc. And spatial layout features such as the relative position relationship of each object in the image. Then, the extracted feature vectors are input into a pre-trained classification model, and the classification model can be constructed based on algorithms such as support vector machines (SVM), decision trees, or convolutional neural networks (CNN) in deep learning. For example, a CNN model trained with a large number of different types of image samples, such as images, natural, humanistic, abstract, etc., will output the corresponding image type prediction result after multi-layer convolution, pooling, etc. according to the input feature vector. If the color histogram in the image shows that natural colors account for a high proportion, the texture shows the irregular and delicate texture commonly seen in natural scenes, the shape features contain the contours of multiple natural objects, and the spatial layout conforms to the distribution law of natural scenes, then the model may eventually determine that the image type is "natural". In other words,
[0085] Optionally, an image classification model is called to directly identify the image type of the image to be printed.
[0086] Optionally, in addition to the above-mentioned classification method based on image features, the host computer will also try to read the metadata information of the image to be printed to assist in determining the image type. Many image files will embed some descriptive metadata during the generation or editing process, such as information about the shooting device, shooting time, shooting location, and keyword tags of the image. The host computer reads this information through the corresponding metadata parsing module. For example, if the metadata shows that the shooting device is a professional SLR camera and the shooting location is a famous tourist attraction, and the keyword tag contains words such as "scenery", then combined with the previous classification results based on image feature extraction, it can be more accurately judged that the image is likely to belong to the "natural" type; if the metadata shows that the image is generated by document editing software and the keyword tags have "report" and "document", then it is more inclined to judge that the image type is "text" type, so as to further improve the accuracy of image type judgment.
[0087] Through the above optional implementation, the image to be printed can be obtained more comprehensively and accurately, and its corresponding image type can be determined, laying a foundation for subsequent operations such as further determining the rendering mode and feature type.
[0088] Optionally, refer to Figure 3 , step A20, comprising:
[0089] Step A21, obtaining the probability value of each image type corresponding to the image to be printed.
[0090] As an optional implementation, at least one possible image type of the image to be printed is determined, the image types including nature, text, humanities, abstract and simple color, and then the probability value of each image type is determined.
[0091] In some embodiments, the image type refers to the overall artistic expression form or thematic features presented by the image to be printed, mainly including nature (images showing natural scenery such as mountains, rivers, flowers, plants, celestial phenomena, etc.), text (the main body of the image is text layout content, such as document screenshots, scans of book pages, etc.), humanities (images that reflect elements such as human activities, cultural relics, and folk customs), abstract (images composed of shapes, lines, colors, etc. in a non-figurative way to express a certain artistic conception or emotion) and simple colors (images with a relatively simple and concise color composition, without complex color matching and rich details). The image type category to which it belongs is determined by analyzing the image content.
[0092] Image analysis algorithms can be used to scan and analyze images pixel by pixel, extract key elements and feature information from the image, and use this to determine the image type that the image may contain. For example, if the image contains a large number of continuous natural scenery elements, such as green vegetation, blue sky, flowing water, etc., then it can be preliminarily determined that the image has a "natural" image type; if a clear text outline can be identified in the image, and the text content occupies a large area of the screen, it is determined that it has a "text" image type; for images that contain elements related to human social culture, such as ancient buildings and scenes of human activities, it can be determined that it contains a "humanistic" image type; when the image is composed of irregular geometric shapes, random lines, and color blocks, and it is difficult to directly correspond to specific real things, it can be classified as an "abstract" image type; and if the overall color of the image is small and the color distribution is relatively uniform and simple, it can be considered to have a "simple color" image type. In this process, an image may have multiple image type features at the same time. For example, a landscape photo with a small amount of text annotations may have both "natural" and "text" image types.
[0093] In some embodiments, the probability value is a value calculated by an image analysis algorithm or an image analysis model based on factors such as the significance and proportion of relevant features of each image type in the image. It is used to measure the possibility that the image belongs to a certain image type. Its value range is between 0 and 1. The higher the value, the greater the possibility that the image belongs to that image type.
[0094] In one embodiment, a deep learning-based image classification model (e.g., convolutional neural network CNN) is used to calculate the probability value of each image type. The image to be printed is input into a CNN model that has been trained on a large number of image samples with different image types labeled. The model extracts the deep features of the image through multi-layer convolution, pooling and other operations, and then outputs the predicted probability values corresponding to different image types through the fully connected layer. Taking the "natural" image type as an example, the model will output a probability value indicating that the image belongs to the "natural" image type according to the feature matching degree and quantity proportion of the natural scenery elements in the image. For example, if the output is 0.7, it means that there is a 70% probability that the image belongs to the "natural" image type; similarly, the corresponding probability values will be output for image types such as "text", "humanities", "abstract", "simple colors", etc., respectively. Assuming that for a wall painting photo containing some artistic graffiti (similar to abstract elements) and some text descriptions, the model may output an "abstract" image type probability value of 0.4, a "text" image type probability value of 0.3, etc. In some embodiments, a related image analysis algorithm can also be used to analyze the type of the image. The image analysis algorithm can identify the type of the image based on at least one of the color features, texture features, and shape features of the image.
[0095] Step A22: taking the image type with the largest probability value as the image type of the image to be printed.
[0096] In some embodiments, when classifying according to probability values, the calculated probability values of each image type will be compared, and the image type with the largest probability value will be found as the target image type. For example, for the wall painting photo mentioned above, the analysis shows that the probability value of the "abstract" image type is 0.4, the probability value of the "text" image type is 0.3, and the probability values of other image types are all less than 0.3, then the "abstract" image type is the target image type, and the image type of the image is determined to be the "abstract" type. If the probability values are the same, it can be further judged in combination with additional rules such as the primary and secondary relationship of elements in the image. For example, if there are two image types with the same and highest probability values at the same time, but the elements of one of the image types are in the center area of the image and occupy the main body of the picture, then this image type will be determined as the target image type first, so as to accurately determine the image type and provide a basis for subsequent operations such as printing data recommendation.
[0097] For example, a user is going to print a photo of a forest park that he took. The photo contains typical natural elements such as dense woods, clear streams, and flying birds. By scanning with an image analysis algorithm, it is easy to determine that the image has a "natural" image type. At the same time, since there is a small sign with text on it in the corner of the picture, it also has a "text" image type. When performing type analysis on the image, based on the fact that the natural elements in the image occupy the vast majority of the picture and have obvious features, the output "natural" image type probability value is 0.85, while the "text" image type only occupies a very small part, so the probability value is only 0.1. Determine the target image type and image type: Compare the probability values, 0.85 is greater than 0.1, so the "natural" image type is the target image type, and the image type of the image is determined to be the "natural" type.
[0098] For example, there is an art poster image, the main body of which is composed of various irregular geometric shapes and colorful lines interweaving to form a seemingly fantastic spatial pattern, and there is a small line of promotional text below. Judging from the content of the picture, the image has an "abstract" image type, because there are elements that constitute an abstract pattern, and it also has a "text" image type. After being processed by the CNN model, given that abstract elements dominate the image, the probability value of the "abstract" image type reaches 0.7, while the probability value of the "text" image type is 0.2. Determine the target image type and image type: Since 0.7 is greater than 0.2, the "abstract" image type becomes the target image type, and the image type of the image is determined to be the "abstract" type.
[0099] Optionally, in the above embodiment, at least one image type among the images to be printed is determined, and the image types include nature, text, humanities, abstract and simple colors; the probability value of each image type is determined; the target image type is determined among the image types according to the probability value, and the target image type is used as the image type, and the processing can be completed by the host computer calling a pre-trained model.
[0100] Through the above optional implementation modes and embodiments, the image type of the image to be printed can be determined more accurately, thereby providing an effective pre-basis for a series of subsequent printing-related operations based on the image type.
[0101] Based on any of the above embodiments, in a possible embodiment of the present application, the step of determining the rendering mode that matches the image to be printed based on the image type includes:
[0102] Step B1, if the image type is associated with an associated rendering mode, determining the associated rendering mode as a rendering mode that matches the image to be printed;
[0103] Step B2: If the image type is not associated with an associated rendering mode, a default rendering mode is determined as a rendering mode that matches the image to be printed.
[0104] In some embodiments, after determining the image type of the image to be printed, determine whether the image type is associated with an associated rendering mode. If there is an associated rendering mode, the associated rendering mode is determined as the rendering mode that matches the image to be printed. If the image type is not associated with an associated rendering mode, the default rendering mode is determined as the rendering mode that matches the image to be printed. The default rendering mode may be any one of a perceptual mode, a relative mode, an absolute mode, and a saturation mode, or may be a mode parsed according to a rendering file imported by a user, which will not be described in detail here. The associated rendering mode may be a pre-set rendering mode associated with this image type, and different image types may correspond to different associated rendering modes.
[0105] Optionally, based on the image type, the step of determining a halftone pattern that matches the image to be printed includes:
[0106] Step B3, if the image type is associated with an associated halftone mode, determining the associated halftone mode as the halftone mode that matches the image to be printed;
[0107] Step B4: if the image type is not associated with an associated halftone mode, a default halftone mode is determined as the halftone mode that matches the image to be printed.
[0108] In some embodiments, the halftone mode includes a binary halftone mode and a tertiary halftone mode, and the associated halftone mode is a set halftone mode, which can be a binary halftone mode or a tertiary halftone mode. The default halftone mode is a halftone mode other than the set halftone mode.
[0109] For example, if the associated halftone mode is set to the second-order halftone mode, the default halftone mode is the third-order halftone mode. At this time, the image type is determined. If the image type has an associated halftone mode, the second-order halftone mode is used as the halftone mode that matches the image to be printed; if the image type does not have an associated halftone mode, the third-order halftone mode is used as the halftone mode that matches the image to be printed.
[0110] For example, if the associated halftone mode is set to the third-order halftone mode, the default halftone mode is the second-order halftone mode. At this time, the image type is determined. If the image type has an associated halftone mode, the third-order halftone mode is used as the halftone mode that matches the image to be printed; if the image type does not have an associated halftone mode, the second-order halftone mode is used as the halftone mode that matches the image to be printed.
[0111] Other combinations are not described in detail in some embodiments. For example, the halftone mode can also be a four-level halftone mode, a dither halftone mode, an error diffusion halftone mode, an adaptive halftone mode, or a mixed halftone mode.
[0112] For example, refer to Figure 2 , Figure 2 is an example corresponding to the mapping relationship. Among them, if the image type is a natural type, the rendering mode is determined to be a perceptual mode, and the halftone mode is determined to be a three-order halftone mode; if the image type is a text type, the rendering mode is determined to be a perceptual mode, and the halftone mode is determined to be a two-order halftone mode; if the image type is a humanistic type, the rendering mode is determined to be a relative mode, and the halftone mode is determined to be a three-order halftone mode; if the image type is an abstract type, the rendering mode is determined to be an absolute mode, and the halftone mode is determined to be a two-order halftone mode; if the image type is a simple color type, the rendering mode is determined to be a saturation mode, and the halftone mode is determined to be a three-order halftone mode.
[0113] For example, by classifying the image types and using the corresponding optimal rendering mode and halftone mode, the color, detail, and processing efficiency of the image are improved in a targeted manner, thereby making the printed data more accurate.
[0114] Based on any of the above embodiments, in a possible embodiment of the present application, before the step of parsing the image to be printed according to the rendering mode and the halftone mode matched by the image to be printed to obtain the print data of the image to be printed, the method further includes:
[0115] Step C1: If the image type is associated with an image processing mode, the image to be printed is processed based on the image processing mode to obtain an updated image to be printed.
[0116] The image processing mode is a combination of algorithms used to process the image to be printed to obtain the target image, which includes at least one processing algorithm for a specific feature type. These processing algorithms are designed to optimize the image from different aspects such as resolution enhancement, color balance adjustment, edge sharpening, etc., so that it can achieve better results after printing.
[0117] Optionally, the image processing mode includes super-resolution processing and edge enhancement processing.
[0118] As an optional implementation, after obtaining the image type, it is determined whether the image type has an associated image processing mode. If an image processing mode exists, the image to be printed is processed based on the image processing mode to obtain an updated image to be printed. The updated image to be printed is analyzed based on the corresponding rendering mode and halftone mode to obtain printing data.
[0119] As another optional implementation, after the image type is acquired, it is determined whether the image type has an associated image processing mode. If no image processing mode exists, the original image to be printed is parsed based on the corresponding rendering mode and halftone mode to obtain print data.
[0120] Optionally, the step of processing the image to be printed based on the image processing mode includes: if the image type is a humanistic type or a natural type, performing super-resolution processing on the image to be printed.
[0121] As an optional implementation, when the image type is a humanistic type or a natural type, the host computer determines the corresponding image processing mode according to a preset rule. For example, when the image type is a humanistic type or a natural type, the associated image processing mode is super-resolution processing, and the super-resolution algorithm is used at this time. Alternatively, the image can also be interpolated using an interpolation algorithm or the like to improve the clarity of the image details when printing. Furthermore, a color fine-tuning algorithm can also be included to ensure that the colors of the details are accurate and coordinated.
[0122] Optionally, the step of processing the image to be printed based on the image processing mode includes: if the image type is an abstract type or a text type, performing edge enhancement processing on the image to be printed.
[0123] As an optional implementation, if the image type is an abstract type or a text type, the determined image processing mode is edge enhancement processing, and an edge smoothing algorithm and an anti-aliasing algorithm can be used. The edge smoothing algorithm makes the edge transition more natural, and the anti-aliasing algorithm is used to avoid jagged edges that affect aesthetics and clarity.
[0124] For example, for a natural type image, the rendering mode is determined to be a perceptual mode, the halftone mode is a three-level halftone mode, and the image processing mode is a super-resolution process. The image to be printed is subjected to super-resolution process, and the corresponding rendering mode and halftone mode are applied to the super-resolution image for analysis to obtain printing data.
[0125] Exemplarily, for natural type images to be printed, first determine that the rendering mode is the perception mode, the halftone mode is the three-order halftone mode, and determine that the image processing mode is super-resolution processing. First, process according to the image processing mode. For natural type images, use a super-resolution algorithm (such as a super-resolution reconstruction algorithm based on deep learning) to improve the image resolution so that the detailed features in the natural image (such as leaf veins, petal textures, animal fur, etc.) can be presented more finely to avoid blurring after printing. At the same time, use an edge enhancement algorithm to highlight the contour edges of natural scenery (such as mountain contours, branch shapes, etc.), enhance the overall layering of the image, and make it more three-dimensional and realistic when printed. Then, analyze the processed image to be printed based on the determined rendering mode and halftone mode. Use the "perception" rendering mode to adjust the overall color presentation of the image based on the human eye's perception of color, so that the color of the printed natural image is more realistic and natural. Combined with the three-level halftone mode, the processed image is converted into a printing data format that can be understood by the printing device, so that the final printed natural image has brilliant colors, rich details and clear contours, and the overall visual effect is better.
[0126] Exemplarily, if the image type is a text type, the rendering mode is determined to be a perception mode, the halftone mode is determined to be a second-order halftone mode, and the image processing mode is determined to be edge enhancement processing. For text type images, its image processing mode is determined to be edge enhancement processing. The edge enhancement algorithm can be used to make the stroke edges of the text sharper and clearer, so that even text with a smaller font size or a thinner font can be clearly recognized, avoiding problems such as blurred edges and stroke adhesion. The rendering mode of the text type image is determined to be a perception mode. The perception mode can adjust the color of the text image according to the human eye's perception characteristics of color. Although the text is usually mainly black and white, appropriate adjustment can make the text more prominent under different backgrounds. At the same time, the halftone mode is determined to be a second-order halftone mode. The second-order halftone mode can optimize the presentation effect of the text color, making the text color more uniform and stable when printing. Based on the determined rendering mode and halftone mode, the host computer analyzes the image to be printed after edge enhancement processing. In the perception mode, the color presentation of the text image is adjusted to make it more in line with the visual perception of the human eye. Then, the second-order halftone mode is used for processing, and the color and clarity of the text are optimized through specific dot arrangement, etc. Finally, the processed image is converted into a print data format that can be understood by the printing device, including the pixel information, color information and print resolution of the text.
[0127] Exemplarily, if the image type is a humanities type, the rendering mode is determined to be a relative mode, the halftone mode is determined to be a three-order halftone mode, and the image processing mode is determined to be super-resolution processing. For humanities type images, its image processing mode is determined to be super-resolution processing. The super-resolution algorithm is used to improve the image resolution so that the expressions of the characters, the details of the buildings, and the various elements in the cultural activities are clearer and more recognizable. In this way, after printing, the richness and authenticity of the humanities scene can be better displayed. The rendering mode of the humanities type image is determined to be a relative mode. The relative mode can adjust the color and contrast according to the specific content of the image, so that the colors of the characters and scenes are more natural and harmonious. At the same time, the halftone mode is determined to be a three-order halftone mode to better present the color levels and details in the image. Based on the determined rendering mode and halftone mode, the image to be printed after super-resolution processing is analyzed. In the relative mode, the parameters such as the color, contrast and brightness of the image are adjusted to highlight the characteristics of the characters and scenes. Then, the three-order halftone mode is used for processing, and the image has higher color reproduction and clarity when printed through fine dot arrangement. Finally, the processed image is converted into a print data format that can be understood by the printing device, including the image's pixel information, color information, and print resolution.
[0128] Exemplarily, if the image type is an abstract type, the rendering mode is determined to be an absolute mode, the halftone mode is determined to be a second-order halftone mode, and the image processing mode is determined to be edge enhancement processing. For abstract type images, the image processing mode is determined to be edge enhancement processing. The edge enhancement algorithm can be used to highlight the lines and shape edges in the abstract image to enhance the visual impact and three-dimensional sense of the image. This makes the abstract image more vivid after printing and can attract the audience's attention. The rendering mode of the abstract type image is determined to be an absolute mode. The absolute mode can accurately control the color and brightness of the image, which is very suitable for the bold colors and strong contrasts that often appear in abstract images. At the same time, the halftone mode is determined to be a second-order halftone mode, which can better present the details and textures in the abstract image while maintaining the color uniformity of the image. Based on the determined rendering mode and halftone mode, the host computer analyzes the image to be printed after edge enhancement processing. In the absolute mode, the color and brightness parameters of the image are accurately adjusted to highlight the unique style of the abstract image. Then, the second-order halftone mode is used for processing, and the image has higher color reproduction and clarity when printed through reasonable dot arrangement. Finally, the processed image is converted into a print data format that can be understood by the printing device, including the image's pixel information, color information, and print resolution.
[0129] Exemplarily, if the image type is a simple color type, the rendering mode is determined to be a saturation mode, the halftone mode is determined to be a three-order halftone mode, and there is no image processing mode. The rendering mode of the simple color type image is determined to be a saturation mode. The saturation mode can enhance the saturation of the image color, making the simple color more vivid and eye-catching, and highlighting its simple and bright characteristics. At the same time, the halftone mode is determined to be a three-order halftone mode to better present the color levels and details in the image. Based on the determined rendering mode and halftone mode, the image to be printed is analyzed. In the saturation mode, the color saturation of the image is adjusted to make its color more intense. Then, the three-order halftone mode is used for processing, and the image has higher color reproduction and clarity when printed through fine dot arrangement. Finally, the processed image is converted into a printing data format that can be understood by the printing device, including the pixel information, color information and printing resolution of the image.
[0130] Through the above embodiments, we can see how to determine the corresponding rendering mode, halftone mode and image processing mode according to different image types, perform targeted processing on various types of images to be printed, and finally obtain high-quality target images to meet printing requirements.
[0131] Based on the combination of any of the above embodiments, in one possible embodiment of the present application, referring to Figure 4For natural-type images to be printed, the perceptual rendering mode and super-resolution processing are used. This mode is suitable for color image objects with a large number of continuously changing color areas and a large number of color details. Observers pay more attention to the overall color visual effect of the image. Figure 4 The middle left picture is the original picture (i.e. the image to be printed), and the right picture is the picture after rendering (i.e. the updated image), and the color effect is significantly improved.
[0132] In a possible embodiment of the present application, referring to Figure 5 For the text type of the image to be printed, a specific magnification algorithm is used to enhance the image and weaken the blur and distortion. Figure 5 The middle left picture is the original picture, the middle picture is the effect of being magnified five times without being processed by the corresponding steps (edge enhancement) in the printing data generation method of the present application, and the right picture is the effect of being magnified five times after being processed by the corresponding steps (edge enhancement) in the printing data generation method of the present application. It can be seen that the printing quality of the image has been significantly improved.
[0133] Reference Figure 6 For images of humanistic type to be printed, use absolute rendering mode and super-resolution to enhance detail display. Figure 6 The left picture in the middle is the original picture, and the right picture is the picture after being processed (super-resolution processing) according to the corresponding steps in the method of this application. The image details in the right picture are significantly improved.
[0134] Reference Figure 7 ,For the image to be printed whose image type is abstract type, the edge features in the image can be enhanced by applying a sharpening filter. Figure 7 The left picture in the middle is the original picture, and the right picture is the picture after being processed (edge enhancement) by the corresponding steps in the method of the present application. The edge information in the right picture is significantly enhanced.
[0135] Reference Figure 8 For images to be printed that are simple color types, use the saturation rendering mode to print the purest and most saturated colors. Figure 8 The left picture in the middle is the original picture, and the right picture is the picture after being processed (saturated rendering) through the corresponding steps in the method of the present application. The color information in the right picture is more saturated.
[0136] Based on any of the above embodiments, in a possible embodiment of the present application, before the step of determining the rendering mode and the halftone mode based on the image type of the image to be printed, the method further includes:
[0137] Step D10: performing image quality evaluation on the image to be printed to obtain the resolution and noise of the image to be printed.
[0138] In some embodiments, the image quality assessment algorithm used by the host computer is a method that comprehensively considers multiple image indicators to judge the image quality status. It can be implemented based on a variety of mature algorithm models, such as a combination of a full-reference peak signal-to-noise ratio algorithm and a structural similarity algorithm, or a natural image quality assessment algorithm based on no reference. These algorithms measure the quality of the image by analyzing the pixel information, grayscale distribution, texture features, etc. of the image, and then determine the resolution of the image and detect the noise in the image.
[0139] To determine the resolution, the host computer first inputs the image to be printed into the image quality assessment algorithm module. Taking the pixel-based statistics method as an example, the algorithm will count the number of pixels in the horizontal and vertical directions of the image and directly obtain the original resolution information of the image, such as deriving the image resolution as 1920×1080 pixels, or inferring the effective resolution of the image by analyzing the high-frequency and low-frequency information of the image, because high-frequency information is often related to the details of the image, and low-frequency information is related to the general outline of the image. According to their proportions, the resolution level at which the image can actually be clearly presented can be determined.
[0140] In terms of detecting noise, the image quality assessment algorithm analyzes the changes in the grayscale values of the image pixels. For example, if the grayscale values of pixels in a local area of the image fluctuate irregularly and violently, which is obviously abnormal compared to the surrounding areas, the algorithm will determine that there is noise in that area. Noise types include Gaussian noise and salt and pepper noise. Salt and pepper noise is the random appearance of black and white pixels in the image, similar to salt and pepper sprinkled on the screen. The algorithm can identify the type of noise, its approximate distribution range and intensity by scanning and analyzing each area of the image. For example, it can detect the presence of Gaussian noise in the image, which is mainly concentrated in the edge area of the image, and the noise intensity is at a medium level.
[0141] Step D20: optimizing the image to be printed based on the resolution and the noise.
[0142] In some embodiments, if it is determined through the previous evaluation that the resolution of the image to be printed is low and cannot meet the requirements of high-quality printing, the host computer will use an image super-resolution algorithm to process it. For example, a super-resolution reconstruction algorithm based on deep learning can be used, such as SRCNN (Super-Resolution Convolutional Neural Network), ESPCN (Efficient Sub-Pixel Convolutional Neural Network) and other models. These models can predict and generate higher-resolution images based on the characteristics of low-resolution images by learning the mapping relationship between a large number of high-resolution and low-resolution image pairs. The host computer inputs the low-resolution image to be printed into the selected super-resolution model. After the model undergoes multi-layer convolution, nonlinear activation and other operations, it outputs an image with improved resolution, such as increasing the original 800×600 pixel image to 1600×1200 pixels, so that the image can show more details when printed.
[0143] When the resolution of the image to be printed is too high, there may be problems such as the file being too large, the printing time being too long, and the printing device occupying too much memory. At this time, the host computer performs appropriate downsampling processing on the high-resolution image based on the performance parameters of the printing device, such as the maximum supported printing resolution, memory capacity, etc., as well as factors such as the target printing size, and uses downsampling algorithms such as bilinear interpolation and nearest neighbor interpolation to reduce the image resolution while ensuring that the main features and details of the image are less lost, so that it adapts to the requirements of the printing device and achieves more efficient printing. For example, if the maximum supported resolution of the printing device is 300dpi, and the dpi corresponding to the original resolution of the image is too high, the host computer adjusts it to the appropriate dpi level through the downsampling algorithm to ensure smooth printing.
[0144] Furthermore, denoising algorithms are selected for different noise types. For different types of noise detected, the host computer selects corresponding denoising algorithms for processing. If it is Gaussian noise, the commonly used denoising methods include the Wiener filter algorithm, which is based on the local statistical characteristics of the image and the statistical characteristics of the noise, and estimates the pixel value of the original image through the minimum mean square error criterion to remove Gaussian noise; for salt and pepper noise, the median filter algorithm works better. This algorithm sorts the grayscale values of a certain pixel point in the image and its neighborhood, and takes the middle value as the new grayscale value of the pixel point. This can effectively remove those isolated salt and pepper noise points and make the image smoother and cleaner. The host computer applies the corresponding denoising algorithm to the entire image or specific noise area according to the detected noise type and distribution.
[0145] Optionally, in order to achieve a better denoising effect, the host computer can perform multiple iterations of the denoising process. For example, when using the Wiener filter algorithm to remove Gaussian noise, after the first processing, the image is tested for noise again. If there is still residual noise, the Wiener filter algorithm can be applied again or its parameters can be adjusted to continue denoising until the noise in the image is reduced to an acceptable range, ensuring that the printed image will not affect the visual effect due to noise problems.
[0146] Through the above evaluation of resolution and noise and the corresponding optimization processing steps, the quality of the image to be printed can be improved before determining the image type, rendering mode, and feature type, etc., laying a good foundation for obtaining better printing effects in the future.
[0147] For example, suppose a user wants to print a scan of an old photo downloaded from the Internet. The image has a low resolution of only 640×480 pixels, and due to reasons such as scanning equipment, there is a certain amount of Gaussian noise in the image, and the picture looks a bit blurry and grainy. After the image quality assessment of the image to be printed, the resolution of the image is 640×480 pixels through pixel statistical analysis. At the same time, when detecting noise, it is found that the grayscale value of the image pixel shows random fluctuations that conform to the Gaussian distribution as a whole, and it is determined that Gaussian noise exists, and the noise distribution is relatively uniform, and the intensity is at a medium level. The SRCNN super-resolution reconstruction algorithm can be used to process the image, and the low-resolution image is input into the SRCNN model. After the model is calculated, the image resolution is increased to 1280×960 pixels, and the image details are much richer than before. For the detected Gaussian noise, the Wiener filtering algorithm can be applied for denoising. Since the noise intensity is medium, there is still some residual noise after one filtering process, so the second Wiener filtering iterative process is performed, and finally the Gaussian noise in the image is reduced to a lower level, and the image becomes much clearer and smoother.
[0148] After such resolution enhancement and noise removal processing, the image enters the subsequent process of determining the rendering mode based on the image type. The final printed photo has significant improvements in clarity and picture purity compared to the original image.
[0149] For example, a user is going to print a high-definition art illustration with an original resolution of 5000×3500 pixels. However, some salt and pepper noise is mixed into the illustration during scanning or transmission, and some black and white noise occasionally appears on the screen, affecting the appearance. The image is analyzed using the image quality assessment algorithm, and the high resolution is statistically determined to be 5000×3500 pixels. At the same time, when detecting the noise, it is found that there are sporadic black and white pixels in the image, which conforms to the characteristics of salt and pepper noise, and these noise points are scattered in various areas of the image, and the noise intensity is relatively weak. Considering the maximum supported resolution of the printing device and in order to avoid problems such as long printing time, the image can be downsampled. According to the target printing size and the performance of the printing device, the image resolution is adjusted to 3000×2100 pixels, so that the image can maintain the main artistic details and adapt to the printing device for efficient printing. For salt and pepper noise, median filtering can be performed. Due to the weak noise intensity, after one median filtering process, the salt and pepper noise in the image is basically removed, and the picture becomes neat and beautiful.
[0150] After the above-mentioned resolution adaptation and noise removal operations, the artistic illustration image enters the subsequent processing flow, and the final printed product can present the original artistic effect of the illustration with high quality without being adversely affected by high resolution and noise problems.
[0151] Based on any of the above embodiments, in a possible embodiment of the present application, if there is an associated image processing mode for the image type, an image quality assessment is first performed on the image to be printed to obtain the resolution and noise of the image to be printed; based on the resolution and the noise, the image to be printed is optimized and processed, and then the image to be printed is processed based on the image processing mode to obtain an updated image to be printed after the optimized image is printed.
[0152] As an optional implementation, before determining the rendering mode and the halftone mode based on the image type of the image to be printed, it is determined whether the image type is associated with a super-resolution processing mode. If so, an image quality assessment is first performed on the image to be printed to obtain the noise of the image to be printed, and then the image to be printed is optimized based on the noise, and then the optimized image to be printed is super-resolution processed.
[0153] As an optional implementation, before determining the rendering mode and the halftone mode based on the image type of the image to be printed, it is determined whether the image type is associated with edge enhancement processing. If the image type is associated with edge enhancement processing, the image quality of the image to be printed is first evaluated to obtain the resolution and noise of the image to be printed, and then the image to be printed is optimized based on the resolution and noise, and then the edge enhancement processing is performed on the optimized image to be printed.
[0154] As another optional implementation, before determining the rendering mode and the halftone mode based on the image type of the image to be printed, if the image type is not associated with an image processing mode, an image quality assessment is performed on the image to be printed to obtain the resolution and noise of the image to be printed; based on the resolution and the noise, the image to be printed is optimized; and then, according to the rendering mode and the halftone mode that match the image to be printed, the optimized image to be printed is parsed to obtain printing data of the image to be printed.
[0155] The present application also provides a printing system, referring to Fig. 9 The printing system 1000 includes a host computer 100 and an inkjet printer 200.
[0156] In some embodiments, the host computer 100 is used to obtain the image to be printed, and based on the steps of the method for generating print data of the image as described above, determine the print data of the image to be printed, and send the print data to the inkjet printing device 200. The inkjet printing device 200 is used to print the image to be printed based on the print data.
[0157] In some embodiments, the host computer 100 is used to obtain the image to be printed, and send the image to be printed to the inkjet printing device 200. The inkjet printing device 200 is used to determine the print data of the image to be printed based on the steps of the method for generating print data of the image as described above, and then print the image to be printed based on the print data.
[0158] The present application provides a computer device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for generating printing data for an image in the above-mentioned embodiment 1.
[0159] Reference below Fig.10 , which shows a schematic diagram of the structure of a computer device suitable for implementing an embodiment of the present application. The computer device in the embodiment of the present application may include but is not limited to terminals such as mobile terminals, laptop computers, tablet computers, etc., and fixed terminals such as desktop computers, etc. Fig.10 The computer device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0160] like Fig.10As shown, the computer device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the computer device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An 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, a touch pad, a keyboard, a mouse, an image sensor, a microphone, 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 by wire 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 systems shown. More or fewer systems can be implemented or have alternatively.
[0161] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. 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 includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0162] The computer device provided by the present application adopts the method for generating print data of the image in the above embodiment, which can solve the technical problem that it is difficult to accurately find the best print data combination in the prior art, thereby resulting in poor 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 the computer device are the same as those disclosed in the method of the previous embodiment, which will not be described in detail here.
[0163] It should be understood that the various parts 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 any one or more embodiments or examples in a suitable manner.
[0164] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0165] The embodiment of the present application also provides an inkjet printing device 200, which is used to obtain printing data of an image to be printed determined based on the image printing data generation method described in any of the above embodiments, and then print the image to be printed based on the printing data.
[0166] Further, refer to Fig.11 , the inkjet printing device 200 comprises:
[0167] A printing assembly 210, the printing assembly comprising a slide rail 211 and a print head 212, wherein the print head 212 is slidably disposed on the slide rail 211;
[0168] A memory 220, wherein a computer program product executable by a processor is stored in the memory;
[0169] Processor 230, the processor is used to obtain the print data of the image to be printed generated by the image print data generation method described in any of the above embodiments, and then control the print head to move on the slide rail and control the inkjet of the print head based on the print data to print out the image to be printed.
[0170] The inkjet printing device 200 may receive print data of an image to be printed generated based on the method for generating print data of an image as described in any of the above embodiments; or may generate print data of an image to be printed based on the method for generating print data of an image as described in any of the above embodiments.
[0171] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the method for generating print data of an image in the above-mentioned embodiment.
[0172] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0173] The computer-readable storage medium may be included in the computer device; or may exist independently without being installed in the computer device.
[0174] The computer-readable storage medium carries one or more programs, and when the one or more programs are executed by a computer device, the computer device: determines at least one feature type based on the image type of the image to be printed;
[0175] Processing the image to be printed according to the rendering mode corresponding to the feature type to obtain a target image;
[0176] The printing data of the image to be printed is obtained based on the target image analysis.
[0177] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate 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 may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0178] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and a computer program.
[0179] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0180] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned method for generating print data of an image, and can solve the technical problem that it is difficult to accurately find the best print data combination in the prior art, which leads to poor printing effect. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the method for generating print data of an image provided by the above-mentioned embodiment, and will not be elaborated here.
[0181] An embodiment of the present application provides a computer program product, including a computer program, which implements the steps of the above-mentioned method for generating print data of an image when the computer program is executed by a processor.
[0182] The computer program product provided by the present application can solve the technical problem that it is difficult to accurately find the best print data combination in the prior art, which leads to poor 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 the beneficial effects of the image print data generation method provided by the above embodiment, which will not be described in detail here.
[0183] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent processing scope of the present application.
Claims
1. A method for generating print data of an image, characterized in that: The method for generating printing data of the image comprises: Acquire an image to be printed, and identify the image type of the image to be printed; Based on the image type, determining a rendering mode and a halftone mode matching the image to be printed; The image to be printed is parsed according to the rendering mode and the halftone mode matched by the image to be printed to obtain printing data of the image to be printed.
2. The print data generating method according to claim 1, wherein: The step of identifying the image type of the image to be printed comprises: Inputting the to-be-printed image into an image classification model; The image to be printed is classified using the image classification model to obtain the image type of the image to be printed.
3. The method for generating print data according to claim 1, wherein: The step of identifying the image type of the image to be printed comprises: Obtaining probability values of the image to be printed corresponding to each image type; The image type with the largest probability value is used as the image type of the image to be printed.
4. The method for generating print data according to claim 1, wherein: The step of determining a rendering mode matching the image to be printed based on the image type comprises: If the image type is associated with an associated rendering mode, the associated rendering mode is determined as a rendering mode that matches the image to be printed; If the image type is not associated with an associated rendering mode, a default rendering mode is determined as a rendering mode matching the image to be printed.
5. The method for generating print data according to claim 1, wherein: The step of determining a halftone pattern matching the image to be printed based on the image type comprises: If the image type is associated with an associated halftone mode, the associated halftone mode is determined as the halftone mode that matches the image to be printed; If the image type is not associated with an associated halftone mode, a default halftone mode is determined as the halftone mode that matches the image to be printed.
6. The print data generating method according to claim 1, wherein: The image types include natural type, text type, humanistic type, abstract type and simple color type, and the rendering modes include perceptual mode, relative mode, absolute mode and saturation mode; The halftone mode includes a second-order halftone mode and a third-order halftone mode. Based on the image type, determining a rendering mode and a halftone mode that match the image to be printed includes: If the image type is a natural type, determining that the rendering mode is a perceptual mode, and the halftone mode is a three-level halftone mode; If the image type is a text type, determining that the rendering mode is a perceptual mode, and the halftone mode is a two-order halftone mode; If the image type is a humanistic type, determining that the rendering mode is a relative mode, and the halftone mode is a three-level halftone mode; If the image type is an abstract type, determining that the rendering mode is an absolute mode and the halftone mode is a two-order halftone mode; If the image type is a simple color type, the rendering mode is determined to be a saturation mode, and the halftone mode is determined to be a three-level halftone mode.
7. The print data generating method according to claim 1, wherein: Before the step of parsing the image to be printed according to the rendering mode and the halftone mode matched by the image to be printed to obtain the printing data of the image to be printed, the method further includes: If the image type is associated with an image processing mode, the image to be printed is processed based on the image processing mode to obtain an updated image to be printed.
8. The method for generating print data according to claim 7, wherein: The step of processing the image to be printed based on the image processing mode comprises: If the image type is a humanistic type or a natural type, super-resolution processing is performed on the image to be printed; and / or If the image type is an abstract type or a text type, edge enhancement processing is performed on the image to be printed.
9. The method for generating print data according to claim 1, wherein: Before the step of determining the rendering mode and the halftone mode based on the image type of the image to be printed, the method further includes: Performing image quality evaluation on the image to be printed to obtain the resolution and noise of the image to be printed; The image to be printed is optimized based on the resolution and the noise.
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 print data generating method according to any one of claims 1 to 9.
11. An inkjet printing device, characterized in that: Used to obtain print data of an image to be printed determined based on the print data generation method according to any one of claims 1 to 9, and then print the image to be printed based on the print data.
12. A printing system, characterized in that: The printing system includes a host computer and an inkjet printer; The host computer is used to obtain the image to be printed, and generate print data of the image to be printed based on the print data generation method according to any one of claims 1 to 9, and send the print data to the inkjet printing device; The inkjet printing device is used to print the image to be printed based on the printing data; or, The host computer is used to obtain the image to be printed and send the image to be printed to the inkjet printing device; the inkjet printing device is used to generate print data of the image to be printed based on the print data generation method described in any one of claims 1 to 9, and then print the image to be printed based on the print data.
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 print data generating method according to any one of claims 1 to 9 are implemented.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the print data generating method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Pixel rendering method and pixel rendering device
CN106875923A
Image calibration method, numerical control machine, computing system and storage medium
CN118587257A
Method and apparatus for half-toning of images in a printer
EP0886435A2
Printing apparatus and printing control method
JP2007041941A
Image forming apparatus capable of setting resolutionof each image types and methods thereof
KR1020060016152A
Cited By
Self-adaptive adjustment method and device for printing parameters of laser printer
CN120832107A
Method and device for adaptive adjustment of printing parameters of a laser printer
CN120832107B