Printing method and printing device of printer and storage medium

By using three color inks in inkjet printers, cyan, magenta and yellow, and through image preprocessing and binarization processing technology, the existing inkjet printers have solved the problem of large size and high cost when printing color images, and realizes the Miniaturized and low-cost printing effect.

CN119388897APending Publication Date: 2025-02-07BEIJING BAIGEFEICHI TECH LLC
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411468167.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

When printing color images, existing inkjet printers require four colors of ink cartridges, resulting in large size and high cost. When using three-color ink cartridges and black ink cartridges to separate the printing method is no longer applicable.

Method used

Use three color printing inks: cyan, magenta and yellow. After converting the color image to be printed into four-color printing data cmyk for image preprocessing, then converting it into three-color printing data cmy, and performing image two for the color channel of the zoomed printing image. Value-based processing, using three color printing inks to print color images or black and white images.

Benefits of technology

The use of three color printing inks to print color images and black and white images is realized, reducing the size and cost of the printer, and meeting the needs of users for smaller models and lower-cost printers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119388897A_ABST
    Figure CN119388897A_ABST
Patent Text Reader

Abstract

The invention discloses a printing method of a printer, a printing device and a storage medium, the printer has three color printing inks of cyan, magenta and yellow, the printing method comprises the following steps: printing a color image by using the three color printing inks: converting a color image rgb to be printed into four color printing data cmok of cyan, magenta, yellow and black to obtain a four color printing image immcmok; performing image preprocessing on the four-color printing image immcmok, and converting the four-color printing data cmok into three-color printing data cmoy of cyan, magenta and yellow after processing is completed to obtain a three-color printing image immcmoy; the three-color printing image imgcm is zoomed to the printing size supported by a printer, and a zoomed printing image imresidual is obtained; image binarization processing is carried out on three color channels of cyan, magenta and yellow of the scaled printing image imgsize, and a binarized printing image imgbin is obtained; and printing a color image by using three kinds of color printing ink according to the binary printing image imgbin.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of printing methods, and specifically provides a printing method, a printing device and a storage medium of a printer. Background Art

[0002] The working principle of an inkjet printer is to convert colored liquid ink into tiny ink droplets through a nozzle and then spray them onto the printing paper. Currently, inkjet printers on the market generally use four-color ink cartridges to print, spraying four colors: cyan (C), magenta (M), yellow (Y), and black (K). However, the four-color ink cartridges are large in size, requiring the inkjet printer to provide a larger installation space, resulting in a large size and high cost of the inkjet printer. Therefore, the three-color ink cartridge and the black ink cartridge are set separately, which is smaller in size, easier to install, and more in line with the needs of users with higher cost requirements.

[0003] However, existing inkjet printers generally use four-color ink cartridges. When printing color images, print data for four color channels, namely cyan (C), magenta (M), yellow (Y), and black (K), is generated. However, in an inkjet printer that uses three-color ink cartridges and black ink cartridges separately, the black ink cartridge is responsible for printing black and white images, and the three-color ink cartridge is responsible for printing color images. When printing color images, print data for three color channels, namely cyan (C), magenta (M), and yellow (Y), is generated. The printing method of current inkjet printers is no longer applicable.

[0004] In view of this, the present invention patent is proposed. Summary of the invention

[0005] In view of the above technical problems, the present invention proposes a printing method, a printing device and a storage medium of a printer. Specifically, the following technical solutions are adopted:

[0006] In a first aspect, the present invention provides a printing method of a printer, wherein the printer has three color printing inks, cyan, magenta and yellow, and the printing method comprises printing a color image using the three color printing inks:

[0007] Convert the color image rgb to be printed into four-color printing data cmyk of cyan, magenta, yellow and black to obtain a four-color printing image imgcmyk;

[0008] Perform image preprocessing on the four-color printing image imgcmyk, and after the processing, convert the four-color printing data cmyk into three-color printing data cmy of cyan, magenta and yellow to obtain a three-color printing image imgcmy;

[0009] Scale the three-color printing image imgcmy to the printing size supported by the printer to obtain the scaled printing image imgresize;

[0010] The three color channels of cyan, magenta and yellow of the scaled print image imgresize are binarized to obtain a binary print image imgbin;

[0011] A color image is printed using three color printing inks according to the binary printing image imgbin.

[0012] As an optional embodiment of the present invention, in a printing method of a printer of the present invention, the image binarization processing is performed on the three color channels of cyan, magenta and yellow of the scaled print image imgresize to obtain the binary print image imgbin, which includes:

[0013] The error diffusion algorithm is used to perform binarization processing on the three color channels of cyan, magenta and yellow of the scaled print image imgresize;

[0014] Introducing random thresholds into the error diffusion algorithms of the three color channels of cyan, magenta and yellow respectively, the binary setting thresholds in the error diffusion algorithm are randomly changed by the random thresholds.

[0015] The random thresholds of the three color channels of cyan, magenta and yellow are different.

[0016] As an optional embodiment of the present invention, a printing method of a printer of the present invention includes printing a black and white image using three color printing inks:

[0017] The black and white image to be printed is grayed out using a real-time contrast-preserving decolorization algorithm to obtain a grayscale printing image imggray;

[0018] A mapping matrix A is generated for the grayscale print image imggray using a brightness contrast algorithm, the mapping matrix A is pre-inverted to obtain a mapping matrix B=255-A, and image preprocessing is performed based on the mapping matrix B to generate a preprocessed print image imgproc;

[0019] Scale the preprocessed print image imgproc to the print size supported by the printer to obtain the scaled print image imgresize;

[0020] Copy the pre-processed print image imgproc into three copies, which are used as the print data of the three color channels of cyan, magenta and yellow respectively;

[0021] Binarization is performed on the printing data of the three color channels of cyan, magenta and yellow respectively to obtain a binary printing image imgbin;

[0022] A black and white image is printed using three color printing inks according to the binary printing image imgbin.

[0023] As an optional embodiment of the present invention, in a printing method of a printer of the present invention, the printing data of the three color channels of cyan, magenta and yellow are binarized respectively to obtain a binary printing image imgbin, which includes:

[0024] The print data of the three color channels of cyan, magenta and yellow are binarized using the error diffusion algorithm;

[0025] Introducing random thresholds into the error diffusion algorithms of the three color channels of cyan, magenta and yellow respectively, the binary setting thresholds in the error diffusion algorithm are randomly changed by the random thresholds.

[0026] The binarization threshold setting ranges of the three color channels of cyan, magenta and yellow are close.

[0027] As an optional embodiment of the present invention, in a printing method of a printer of the present invention, the printer has black printing ink, and the printing method includes printing a black and white image using the black printing ink:

[0028] The black and white image to be printed is grayed out using a real-time contrast-preserving decolorization algorithm to obtain a grayscale printing image imggray;

[0029] A mapping matrix A is generated for the grayscale print image imggray using a brightness contrast algorithm, the mapping matrix A is pre-inverted to obtain a mapping matrix B=255-A, and image preprocessing is performed based on the mapping matrix B to generate a preprocessed print image imgproc;

[0030] Scale the preprocessed print image imgproc to the print size supported by the printer to obtain the scaled print image imgresize;

[0031] The error diffusion algorithm is used to perform binarization processing on the scaled print image imgresize, and a random threshold is introduced based on the error diffusion algorithm. The binarization setting threshold in the error diffusion algorithm is randomly changed through the random threshold to obtain the binary print image imgbin.

[0032] A black and white image is printed using black printing ink according to the binary printing image imgbin.

[0033] As an optional embodiment of the present invention, a printing method of a printer of the present invention includes:

[0034] According to the set printing process data printing times, the printing data in the binary printing image imgbin is processed to generate the final printing image imgfinal;

[0035] Print a color image or a black and white image according to the final print image imgfinal.

[0036] As an optional embodiment of the present invention, a printing method of a printer of the present invention includes compressing data for a final printed image imgfinal:

[0037] According to the actual number of nozzles N of the print head and the width w of the final printed image imgfinal, the compressed data volume len=N*w / K is calculated, where K is the preset number of compressed bytes.

[0038] In a second aspect, the present invention provides a printing device including a color printing cartridge containing cyan, magenta and yellow color printing inks. The printing device uses the printing method to control the color printing cartridge to print a color image or a black and white image.

[0039] As an optional embodiment of the present invention, a printing device of the present invention includes a black printing ink cartridge, the black printing ink cartridge contains black ink, the black printing ink cartridge and the color printing ink cartridge are independently arranged, the black printing ink cartridge has a black printing nozzle, and the color printing ink cartridge has three-color printing nozzles corresponding to cyan, magenta and yellow respectively;

[0040] The printing device adopts the printing method to control the black printing ink cartridge to print black and white images.

[0041] In a third aspect, the present invention provides a computer-readable recording medium storing a computer-executable program, wherein when the computer-executable program is executed, the printing method of the printer is implemented.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] The printing method of a printer of the present invention uses only three color printing inks, cyan, magenta and yellow, when printing a color image. When performing RGB processing on the color image to be printed, the RGB color image to be printed is first converted into four-color printing data CMYK of cyan, magenta, yellow and black, and image preprocessing is performed on the four-color printing image IMGCMYK. After the processing is completed, the four-color printing data CMYK is converted into three-color printing data CMY of cyan, magenta and yellow. This is mainly because if the RGB color image to be printed is directly converted into three-color printing data CMY, and then the image is preprocessed later, the black part in the original three-color printing data CMY is no longer even due to the image preprocessing, and black color cast is likely to occur. However, after converting the four-color printing data CMYK, the four colors are respectively preprocessed, and then converted into three-color printing data CMY, so that this situation can be avoided.

[0044] Therefore, a printing method of a printer of the present invention can realize color image printing based on three color printing inks, so that the printer can use three-color ink cartridges and black ink cartridges to be set separately, which is smaller in size, easy to install, and more in line with the needs of users with higher cost requirements.

[0045] A printing method of a printer of the present invention can simultaneously print black and white images using three color printing inks. Under normal circumstances, black and white images are printed with black ink, but when black ink is not available, the printing method of the present invention can use three color printing inks to print black and white images to meet the printing needs of black and white images.

[0046] The invention discloses a printing method of a printer, wherein the printer adopts a method of separately arranging a black ink cartridge and a tri-color ink cartridge, and realizes black-and-white image printing through a separate black ink cartridge. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 Process of a printing method of a printer in Embodiment 1 of the present invention Figure 1 ;

[0048] Figure 2 Process of a printing method of a printer in Embodiment 1 of the present invention Figure 2 ;

[0049] Figure 3 Process of a printing method of a printer in Embodiment 1 of the present invention Figure 3 ;

[0050] Figure 4 An example diagram of a single-brush printing process data of a printing method of a printer according to a first embodiment of the present invention;

[0051] Figure 5 An example diagram of double-brushing of data during the printing process of a printing method of a printer according to the first embodiment of the present invention;

[0052] Figure 6 A schematic structural diagram of an electronic device according to a second embodiment of the present invention;

[0053] Figure 7 A schematic diagram of a computer-readable recording medium according to a second embodiment of the present invention. DETAILED DESCRIPTION

[0054] To make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be described clearly and completely in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them.

[0055] Therefore, the following detailed description of the embodiments of the present invention is not intended to limit the scope of the invention claimed for protection, but merely represents some embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0056] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features and technical solutions in the embodiments may be combined with each other.

[0057] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0058] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "upper", "lower", etc. is based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the invention product is usually placed when in use, or the orientation or positional relationship commonly understood by those skilled in the art. Such terms are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0059] Embodiment 1

[0060] In a printing method of a printer of this embodiment, the printer has three color printing inks: cyan, magenta and yellow. The printing method includes printing a color image using the three color printing inks:

[0061] Convert the color image rgb to be printed into four-color printing data cmyk of cyan, magenta, yellow and black to obtain a four-color printing image imgcmyk;

[0062] Perform image preprocessing on the four-color printing image imgcmyk, and after the processing, convert the four-color printing data cmyk into three-color printing data cmy of cyan, magenta and yellow to obtain a three-color printing image imgcmy;

[0063] Scale the three-color printing image imgcmy to the printing size supported by the printer to obtain the scaled printing image imgresize;

[0064] The three color channels of cyan, magenta and yellow of the scaled print image imgresize are binarized to obtain a binary print image imgbin;

[0065] A color image is printed using three color printing inks according to the binary printing image imgbin.

[0066] A printing method of a printer of the present embodiment, when printing a color image, only three color printing inks of cyan, magenta and yellow are used. When performing RGB processing on the color image to be printed, the RGB color image to be printed is first converted into four-color printing data CMYK of cyan, magenta, yellow and black, and image preprocessing is performed on the four-color printing image IMGCMYK. After the processing is completed, the four-color printing data CMYK is converted into three-color printing data CMY of cyan, magenta and yellow. This is mainly because if the RGB color image to be printed is directly converted into three-color printing data CMY, and then in the subsequent image preprocessing, the black part in the original three-color printing data CMY is no longer balanced due to the image preprocessing, and black color cast is likely to occur. However, after converting the four-color printing data CMYK, the four colors are respectively preprocessed, and then converted into three-color printing data CMY, so that this situation can be avoided.

[0067] Therefore, a printing method of a printer in this embodiment can realize color image printing based on three color printing inks, so that the printer can use three-color ink cartridges and black ink cartridges separately set up, which is smaller in size, easy to install, and more in line with the needs of users with higher cost requirements.

[0068] As an optional implementation manner of this embodiment, in a printing method of a printer of this embodiment, the image binarization processing is performed on the three color channels of cyan, magenta and yellow of the scaled print image imgresize to obtain the binary print image imgbin, which includes:

[0069] The error diffusion algorithm is used to perform binarization on the three color channels of cyan, magenta and yellow of the scaled print image imgresize. The inkjet printer can only spray or not spray, and cannot control how much to spray, so it needs to be binarized in the end to get the inkjet points;

[0070] Introducing random thresholds into the error diffusion algorithms of the three color channels of cyan, magenta and yellow respectively, the binary setting thresholds in the error diffusion algorithm are randomly changed by the random thresholds.

[0071] The random thresholds of the three color channels of cyan, magenta and yellow are different.

[0072] In the current technical solution, the printing effect is greatly affected by the ink quality. If the ink is not well fused, color cast is likely to occur. Conventional dithering algorithms are prone to losing lighter pixels, and regular stripes are likely to appear in color blocks. The printing method of this embodiment adds a random threshold to the conventional error diffusion solution. Fixed stripes are likely to appear on color blocks due to the fixed binary setting threshold. This phenomenon can be eliminated by increasing the random threshold. The random thresholds for the three color channels of cyan, magenta, and yellow are different. They are set according to the color cast of the ink printing. For example, (0, 4) will have more binary points than (0, 14), so the color is darker, and the threshold range for color cast is set larger.

[0073] At the same time, this embodiment records the number of inkjet dots while generating the binary print image imgbin, so as to count the amount of ink used.

[0074] A printing method of a printer in this embodiment includes printing a black and white image using three color printing inks:

[0075] The black and white image to be printed is grayed out using a real-time contrast-preserving decolorization algorithm to obtain a grayscale printing image imggray;

[0076] A mapping matrix A is generated for the grayscale print image imggray using a brightness contrast algorithm, the mapping matrix A is pre-inverted to obtain a mapping matrix B=255-A, and image preprocessing is performed based on the mapping matrix B to generate a preprocessed print image imgproc;

[0077] Scale the preprocessed print image imgproc to the print size supported by the printer to obtain the scaled print image imgresize;

[0078] Copy the pre-processed print image imgproc into three copies, which are used as the print data of the three color channels of cyan, magenta and yellow respectively;

[0079] Binarization is performed on the printing data of the three color channels of cyan, magenta and yellow respectively to obtain a binary printing image imgbin;

[0080] A black and white image is printed using three color printing inks according to the binary printing image imgbin.

[0081] A printing method of a printer in this embodiment can simultaneously print black and white images using three color printing inks. Under normal circumstances, black and white images are printed with black ink, but when black ink is not available, the printing method of this embodiment can use three color printing inks to print black and white images to meet the printing needs of black and white images.

[0082] Furthermore, in a printing method of a printer in this embodiment, the printing data of the three color channels of cyan, magenta and yellow are binarized respectively to obtain a binary printing image imgbin, which includes:

[0083] The print data of the three color channels of cyan, magenta and yellow are binarized using the error diffusion algorithm;

[0084] Introducing random thresholds into the error diffusion algorithms of the three color channels of cyan, magenta and yellow respectively, the binary setting thresholds in the error diffusion algorithm are randomly changed by the random thresholds.

[0085] The binarization threshold setting ranges of the three color channels of cyan, magenta and yellow are close.

[0086] A printing method of a printer in this embodiment, when performing image binarization processing, when printing black in color, the three colors are not sprayed on the same point, but within a certain range, the three colors are sprayed on similar points. If three pixels are sprayed on the same position, firstly, the accuracy cannot be guaranteed. Secondly, the color accumulation concentration will be relatively large and the color will be darker. If the three colors are dispersed, they will be more delicate, and the situation with similar proportions will look gray. Therefore, the threshold range of cmy binarization setting should not be too different, but it is spread out because it is a random threshold.

[0087] A printing method of a printer in this embodiment, the printer has black printing ink, and the printing method includes printing a black and white image using the black printing ink:

[0088] The black and white image to be printed is grayed out using a real-time contrast-preserving decolorization algorithm to obtain a grayscale printing image imggray;

[0089] A mapping matrix A is generated for the grayscale print image imggray using a brightness contrast algorithm, the mapping matrix A is pre-inverted to obtain a mapping matrix B=255-A, and image preprocessing is performed based on the mapping matrix B to generate a preprocessed print image imgproc;

[0090] Scale the preprocessed print image imgproc to the print size supported by the printer to obtain the scaled print image imgresize;

[0091] The error diffusion algorithm is used to perform binarization processing on the scaled print image imgresize, and a random threshold is introduced based on the error diffusion algorithm. The binarization setting threshold in the error diffusion algorithm is randomly changed through the random threshold to obtain the binary print image imgbin.

[0092] A black and white image is printed using black printing ink according to the binary printing image imgbin.

[0093] In a printing method of a printer of this embodiment, the printer adopts a method of separately arranging a black ink cartridge and a tri-color ink cartridge, and realizes black and white image printing through a separate black ink cartridge.

[0094] In the current technical solution, the printing effect is greatly affected by the ink quality. If the ink is not well fused, color cast is likely to occur. The conventional dithering algorithm is likely to lose lighter pixels, and regular stripes are likely to appear on color blocks. The printing method of this embodiment adds a random threshold to the conventional error diffusion solution. Fixed stripes are likely to appear on color blocks when the threshold is set to a fixed binary value. This phenomenon can be eliminated by adding a random threshold.

[0095] Optionally, the random grayscale value range of the random threshold in this embodiment is (0, 8).

[0096] A printing method of a printer in this embodiment includes:

[0097] According to the set printing process data printing times, the printing data in the binary printing image imgbin is processed to generate the final printing image imgfinal;

[0098] Print a color image or a black and white image according to the final print image imgfinal.

[0099] Among them, the number of times data is printed depends on whether the user chooses quality priority or speed priority according to needs. When using black ink to print black and white images, speed priority means that the data is brushed once during the printing process, and quality priority means that the data is brushed twice. For example, there are 6 lines of data that are all black and fully sprayed. They are divided into two data, which can be divided according to odd and even (one piece of data is imagined as a chess board and the other is the inverted color of the chess board). The same line of data is sprayed twice to fill each other, which helps to solve problems such as inkjet clogging or inaccurate paper feeding, especially when clogging is unavoidable, and obtains higher quality effects.

[0100] When using three-color ink to print color images, speed priority means that the data is printed twice during the printing process, and quality priority means that the data is printed four times. The principle is the same as printing black and white images with black ink.

[0101] When using three-color ink to print black and white images, speed priority means that the data is printed twice during the printing process, and quality priority means that the data is printed four times. The principle is the same as printing black and white images with black ink.

[0102] Examples of single and multiple brushes:

[0103] 1) Single brush means that the paper is fed after one line of data is printed once; Figure 4As shown, assuming that the image has 15 lines of data in total and the nozzle can print 3 lines each time, it will take 5 sprays to print the image, one color at a time, and the paper will move 3 lines after each spray.

[0104] 2) Double brushing means that one piece of data is divided into two pieces and printed alternately. One line of data needs to be printed twice to be complete. Figure 5 As shown, the data is divided into two parts. The image has a total of 15 lines of data. The nozzle sprays 6 lines each time, and a total of 4 times of spraying is completed. Among them, 1 and 2 are sprayed twice, and 3 lines are overlapped, that is, the distance is moved 3 lines after one spray, and the positions of the overlapping parts are different. After merging together, the stroke data is complete, and the 3 lines that cannot overlap at the beginning and end are fully sprayed.

[0105] A printing method of a printer of the present invention comprises compressing data for a final printed image imgfinal:

[0106] According to the actual number of nozzles N of the print head and the width w of the final printed image imgfinal, the compressed data volume len=N*w / K is calculated, where K is the preset number of compressed bytes.

[0107] Specifically, the TIFF compression algorithm is used to compress the data. According to the actual number of nozzle holes, for example, 304 holes in a row and the image width is w, len=304*w / 8 data are compressed. If the compressed data length is greater than len, no compression is performed. The amount of TIFF compressed data may not necessarily decrease, depending on the actual image.

[0108] A printing method of a printer of the present invention includes adding a protocol, adding a protocol that the printer can recognize, such as data instructions, horizontal and vertical paper feeding instructions, compression instructions, color instructions, ink volume statistics instructions, etc. After completion, the print data is sent to the printer, and the printer prints after receiving the print data.

[0109] This embodiment also provides a printing device, including a color printing ink cartridge, wherein the color printing ink cartridge contains three color printing inks: cyan, magenta and yellow. The printing device adopts the printing method to control the color printing ink cartridge to print a color image or a black and white image.

[0110] A printing device of this embodiment adopts the printing method of this embodiment, and can realize color image and black and white image printing with a three-color ink cartridge, thereby meeting various printing needs of users.

[0111] Furthermore, a printing device of this embodiment includes a black printing ink cartridge, the black printing ink cartridge contains black ink, the black printing ink cartridge and the color printing ink cartridge are independently arranged, the black printing ink cartridge has a black printing nozzle, and the color printing ink cartridge has three-color printing nozzles corresponding to cyan, magenta and yellow respectively;

[0112] The printing device adopts the printing method to control the black printing ink cartridge to print black and white images.

[0113] A printing device of the present embodiment adopts a three-color ink cartridge and a black ink cartridge which are separately arranged, has a smaller size, is easy to install, and is more in line with the needs of users with higher cost requirements. At the same time, the printing method of the present embodiment can realize black and white image printing with a black ink cartridge and color and black and white image printing with a three-color ink cartridge, thereby meeting various printing needs of users.

[0114] The user obtains the information of the ink cartridge from the printing device, which is recorded as ink, wherein ink=1 represents a black ink cartridge, and ink=3 represents a color ink cartridge.

[0115] Controlled by the user on the APP, the black ink cartridge can only print black and white images, and the color ink cartridge supports printing both color and black and white images. Different options use the above different printing methods.

[0116] Embodiment 2

[0117] The following describes an electronic device embodiment of the present invention, which can be regarded as a specific physical implementation of the method and device embodiments of the present invention. The details described in the electronic device embodiment of the present invention should be regarded as a supplement to the above method or device embodiments; details not disclosed in the electronic device embodiment of the present invention can be implemented with reference to the above method or device embodiments.

[0118] Figure 6 It is a structural schematic diagram of an electronic device of an embodiment of the present invention, the electronic device includes a processor and a memory, the memory is used to store a computer executable program, when the computer program is executed by the processor, the processor executes a printing method of a printer in embodiment one.

[0119] like Figure 6 As shown, the electronic device is presented in the form of a general computing device. The processor may be one or more and work in coordination. The present invention does not exclude distributed processing, that is, the processor may be dispersed in different physical devices. The electronic device of the present invention is not limited to a single entity, but may also be the sum of multiple physical devices.

[0120] The memory stores a computer executable program, which is usually a machine-readable code. The computer-readable program can be executed by the processor to enable the electronic device to perform the method of the present invention, or at least part of the steps in the method.

[0121] The memory includes a volatile memory, such as a random access memory unit (RAM) and / or a cache memory unit, and may also be a non-volatile memory, such as a read-only memory unit (ROM).

[0122] Optionally, in this embodiment, the electronic device further includes an I / O interface, which is used for the electronic device to exchange data with an external device. The I / O interface can represent one or more of several types of bus structures, including a storage unit bus or a storage unit controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of a variety of bus structures.

[0123] It should be understood that Figure 6 The electronic device shown is only an example of the present invention, and the electronic device of the present invention may also include elements or components not shown in the above examples. For example, some electronic devices also include display units such as display screens, and some electronic devices also include human-computer interaction elements such as buttons, keyboards, etc. As long as the electronic device can execute the computer-readable program in the memory to implement the method of the present invention or at least part of the steps of the method, it can be considered as an electronic device covered by the present invention.

[0124] Figure 7 Schematic diagram of a computer readable recording medium according to an embodiment of the present invention. Figure 4 As shown, a computer executable program is stored in a computer readable recording medium, and when the computer executable program is executed, a printing method of a printer in the first embodiment of the present invention is implemented. The computer readable recording medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable recording medium may also be any readable medium other than a readable recording medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, device, or device. The program code contained on the readable recording medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0125] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0126] Through the above description of the implementation mode, it is easy for those skilled in the art to understand that the present invention can be implemented by hardware capable of executing a specific computer program, such as the system of the present invention, and the electronic processing unit, server, client, mobile phone, control unit, processor, etc. contained in the system. The present invention can also be implemented by computer software that executes the method of the present invention, such as control software executed by a microprocessor, an electronic control unit, a client, a server, etc. However, it should be noted that the computer software that executes the method of the present invention is not limited to being executed by one or a specific hardware entity, and it can also be implemented in a distributed manner by unspecified specific hardware. For computer software, the software product can be stored in a computer-readable recording medium (which can be a CD-ROM, a USB flash drive, a mobile disk, etc.), and can also be distributed and stored on the network, as long as it enables the electronic device to execute the method according to the present invention.

[0127] The above embodiments are only used to illustrate the present invention and are not intended to limit the technical solutions described in the present invention. Although the present invention has been described in detail with reference to the above embodiments, the present invention is not limited to the above specific implementation methods. Therefore, any modification or equivalent replacement of the present invention; and all technical solutions and improvements thereof that do not depart from the spirit and scope of the invention are included in the scope of the claims of the present invention.

Claims

1. A printing method of a printer, characterized in that: The printer has three color printing inks, cyan, magenta and yellow, and the printing method includes printing a color image using the three color printing inks: Convert the color image rgb to be printed into four-color printing data cmyk of cyan, magenta, yellow and black to obtain a four-color printing image imgcmyk; Perform image preprocessing on the four-color printing image imgcmyk, and after the processing, convert the four-color printing data cmyk into three-color printing data cmy of cyan, magenta and yellow to obtain a three-color printing image imgcmy; Scale the three-color printing image imgcmy to the printing size supported by the printer to obtain the scaled printing image imgresize; The three color channels of cyan, magenta and yellow of the scaled print image imgresize are binarized to obtain a binary print image imgbin; A color image is printed using three color printing inks according to the binary printing image imgbin.

2. The printing method of a printer according to claim 1, characterized in that: The image binarization process is performed on the three color channels of cyan, magenta and yellow of the scaled print image imgresize to obtain the binary print image imgbin, which includes: The error diffusion algorithm is used to perform binarization processing on the three color channels of cyan, magenta and yellow of the scaled print image imgresize; Introducing random thresholds into the error diffusion algorithms of the three color channels of cyan, magenta and yellow respectively, the binary setting thresholds in the error diffusion algorithm are randomly changed by the random thresholds. The random thresholds of the three color channels of cyan, magenta and yellow are different.

3. The printing method of a printer according to claim 1, characterized in that: Includes printing black and white images using three color printing inks: The black and white image to be printed is grayed out using a real-time contrast-preserving decolorization algorithm to obtain a grayscale printing image imggray; A mapping matrix A is generated for the grayscale print image imggray using a brightness contrast algorithm, the mapping matrix A is pre-inverted to obtain a mapping matrix B=255-A, and image preprocessing is performed based on the mapping matrix B to generate a preprocessed print image imgproc; Scale the preprocessed print image imgproc to the print size supported by the printer to obtain the scaled print image imgresize; Copy the pre-processed print image imgproc into three copies, which are used as the print data of the three color channels of cyan, magenta and yellow respectively; Binarization is performed on the printing data of the three color channels of cyan, magenta and yellow respectively to obtain a binary printing image imgbin; A black and white image is printed using three color printing inks according to the binary printing image imgbin.

4. The printing method of a printer according to claim 3, characterized in that: The printing data of the three color channels of cyan, magenta and yellow are binarized respectively to obtain a binary printing image imgbin, which includes: The print data of the three color channels of cyan, magenta and yellow are binarized using the error diffusion algorithm; Introducing random thresholds into the error diffusion algorithms of the three color channels of cyan, magenta and yellow respectively, the binary setting thresholds in the error diffusion algorithm are randomly changed by the random thresholds. The binarization threshold setting ranges of the three color channels of cyan, magenta and yellow are close.

5. The printing method of a printer according to claim 1, characterized in that: The printer has black printing ink, and the printing method includes printing a black and white image using the black printing ink: The black and white image to be printed is grayed out using a real-time contrast-preserving decolorization algorithm to obtain a grayscale printing image imggray; A mapping matrix A is generated for the grayscale print image imggray using a brightness contrast algorithm, the mapping matrix A is pre-inverted to obtain a mapping matrix B=255-A, and image preprocessing is performed based on the mapping matrix B to generate a preprocessed print image imgproc; Scale the preprocessed print image imgproc to the print size supported by the printer to obtain the scaled print image imgresize; The error diffusion algorithm is used to perform binarization processing on the scaled print image imgresize, and a random threshold is introduced based on the error diffusion algorithm. The binarization setting threshold in the error diffusion algorithm is randomly changed through the random threshold to obtain the binary print image imgbin. A black and white image is printed using black printing ink according to the binary printing image imgbin.

6. A printing method for a printer according to claim 1, 3 or 5, characterized in that: include: According to the set printing process data printing times, the printing data in the binary printing image imgbin is processed to generate the final printing image imgfinal; Print a color image or a black and white image according to the final print image imgfinal.

7. The printing method of a printer according to claim 6, characterized in that: Including data compression for the final print image imgfinal: According to the actual number of nozzles N of the print head and the width w of the final printed image imgfinal, the compressed data volume len=N*w / K is calculated, where K is the preset number of compressed bytes.

8. A printing device, characterized in that: The invention comprises a color printing ink cartridge, wherein the color printing ink cartridge contains three color printing inks, cyan, magenta and yellow. The printing device adopts the printing method as described in any one of claims 1 to 7 to control the color printing ink cartridge to print a color image or a black and white image.

9. A printing device according to claim 8, characterized in that: It includes a black printing ink cartridge, the black printing ink cartridge contains black ink, the black printing ink cartridge and the color printing ink cartridge are independently arranged, the black printing ink cartridge has a black printing nozzle, and the color printing ink cartridge has three-color printing nozzles corresponding to cyan, magenta and yellow respectively; The printing device adopts the printing method as described in any one of claims 5 to 7 to control the black printing ink cartridge to print a black and white image.

10. A computer-readable recording medium storing a computer-executable program, characterized in that: When the computer executable program is executed, a printing method of a printer as described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Color printer system

    JP1997141902A

  • Image processing apparatus and image processing method

    JP2001285629A

  • Image processor, image processing method and image processing program

    JP2010056715A

  • Automatic conversion method of a cartridge

    KR1019990020080A

  • Conversion Method of Color Copy Mode According to theQuantity of Black Ink in Color Inkjet Copyer

    KR1020010027265A