Ink-jet printing method and device, equipment and storage medium
By adopting a point extraction algorithm in inkjet printing technology to extract and mark some pixels as non-printing pixels, the problem of reduced printing accuracy caused by excessive ink diffusion is solved, and higher QR code or barcode printing accuracy is achieved.
Patent Information
- Application Number
- CN202511096077.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-09-12
AI Technical Summary
In existing inkjet printing technology, excessive ink diffusion causes a decrease in the printing accuracy of two-dimensional codes or barcodes.
A sampling algorithm is used to process the pixels in the image to be printed. Some pixels are extracted according to the preset sampling rules and marked as non-printing pixels, thereby reducing ink diffusion during printing.
By reducing the distance between adjacent pixels, the printing accuracy of QR codes or barcodes is improved, and the problem of image deformation caused by excessive ink diffusion is solved.
Smart Images

Figure CN120620907A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of ink printing technology, and in particular to an inkjet printing method, device, equipment and storage medium. Background Art
[0002] Inkjet printing technology is currently widely used in various fields, especially in the printing of QR codes and barcodes. However, inkjet printing currently suffers from excessive ink diffusion, which affects printing accuracy and image quality. Specifically, after the ink is printed on the paper, it spreads outward. Excessive diffusion can cause the printed image to distort, thus affecting the printing accuracy of the QR code or barcode.
[0003] Therefore, how to improve the printing accuracy of a QR code or a barcode when printing the QR code or the barcode has become an urgent problem to be solved by those skilled in the art. Summary of the Invention
[0004] In view of this, the present application proposes an inkjet printing method, apparatus, device and storage medium, which can effectively improve the printing accuracy of two-dimensional codes or barcodes when printing two-dimensional codes or barcodes.
[0005] According to a first aspect of the present application, there is provided an inkjet printing method for inkjet printing a QR code or a barcode, comprising: Acquire an image to be printed and identify each pixel in the image to be printed; Processing each pixel point according to a sampling algorithm to obtain a processed image to be printed; wherein the sampling algorithm refers to extracting corresponding pixel points according to a preset extraction rule and marking the extracted pixel points as non-printing pixel points; The processed image to be printed is subjected to inkjet printing.
[0006] In a possible implementation, the preset extraction rule is to extract a row of pixels corresponding to every other row of pixels.
[0007] In a possible implementation, when processing each pixel point according to a sampling algorithm, the process includes: Obtaining a row index of the image to be printed; It is determined whether each row index of the image to be printed meets a first condition, and pixels corresponding to row indexes determined not to meet the first condition are marked as non-printing pixels.
[0008] In a possible implementation, when processing each pixel point according to the sampling algorithm, the method further includes: Obtaining the column index of the image to be printed; It is determined whether each column index of the image to be printed meets a second condition, and pixels corresponding to column indexes determined not to meet the second condition are marked as non-printing pixels.
[0009] In a possible implementation, before processing the pixels according to the sampling algorithm, the method further includes marking the pixels according to their pixel values to obtain a marking value corresponding to each pixel.
[0010] In a possible implementation, marking the extracted pixel as a non-printing pixel includes: The tag value corresponding to each pixel point is obtained, each tag value obtained is calculated according to a preset calculation rule to obtain corresponding calculation results, and whether each pixel point is a non-printing pixel point is determined according to each calculation result.
[0011] In a possible implementation, when obtaining the mark value corresponding to each pixel point in the current row, the values may be obtained sequentially according to a preset length.
[0012] According to a second aspect of the present application, there is provided an inkjet printing device for inkjet printing of a QR code or a barcode, comprising: An image acquisition module, configured to acquire an image to be printed and identify each pixel in the image to be printed; An image processing module, configured to process each pixel according to a sampling algorithm to obtain a processed image to be printed; wherein the sampling algorithm is to extract corresponding pixels according to a preset extraction rule and mark the extracted pixels as non-printing pixels; The image printing module is used for inkjet printing the processed image to be printed.
[0013] According to a third aspect of the present application, an inkjet printing device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the method described in the first aspect of the present application.
[0014] According to a fourth aspect of the present application, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions, when executed by a processor, implement the method described in the first aspect of the present application.
[0015] The present application provides an inkjet printing method for performing inkjet printing of a two-dimensional code or a barcode, the method comprising: obtaining an image to be printed and identifying each pixel in the image to be printed; processing each pixel according to a sampling algorithm to obtain a processed image to be printed; wherein the sampling algorithm refers to extracting corresponding pixels according to a preset extraction rule and marking the extracted pixels as non-printing pixels; and inkjet printing the processed image to be printed. The present application processes each pixel in the image to be printed by using a sampling algorithm, that is, extracting corresponding pixels from each pixel in the image to be printed according to a preset extraction rule and marking the extracted pixels as non-printing pixels, thereby reducing the number of pixels for inkjet printing of the image to be printed, thereby making the image to be printed sparse, and solving the problem of image deformation caused by excessive ink diffusion, thereby affecting image accuracy, and effectively improving the accuracy of inkjet printing of two-dimensional codes or barcodes.
[0016] Other features and aspects of the present application will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the application and, together with the description, serve to explain the principles of the application.
[0018] Figure 1 A flowchart showing an inkjet printing method according to an embodiment of the present application; Figure 2 A schematic diagram showing an image to be printed according to an embodiment of the present application; Figure 3 Showing an embodiment according to the present application Figure 2 Schematic diagram of an image to be printed after processing; Figure 4 Showing an embodiment according to the present application Figure 2 Schematic diagram of marking each pixel; Figure 5 Showing an embodiment according to the present application Figure 2 Schematic diagram of the corresponding label value of each pixel after processing; Figure 6 A schematic diagram showing a processed image to be printed according to another embodiment of the present application; Figure 7 A schematic block diagram of an inkjet printing device according to an embodiment of the present application is shown; Figure 8 A schematic block diagram of an inkjet printing device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0019] Various exemplary embodiments, features, and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0020] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0021] In addition, numerous specific details are provided in the detailed description below to better illustrate the present application. Those skilled in the art will appreciate that the present application can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present application.
[0022] <Method Example> Figure 1 FIG. 1 is a flow chart showing a method for inkjet printing according to an embodiment of the present application. Figure 1 As shown, the method is used for inkjet printing of a QR code or a barcode, and the method includes steps S1100-S1300: S1100, obtaining the image to be printed and identifying each pixel in the image to be printed; S1200, processing each pixel according to a sampling algorithm to obtain a processed image to be printed; wherein the sampling algorithm refers to extracting corresponding pixel points according to a preset extraction rule, and marking the extracted pixel points as non-printing pixel points; S1300, inkjet printing the processed image to be printed.
[0023] The present application processes each pixel in the image to be printed by using a sampling algorithm, that is, extracts the corresponding pixel from each pixel in the image to be printed according to a preset sampling rule, and marks the extracted pixel as a non-printing pixel. This can reduce the number of adjacent pixels of the image to be printed for inkjet printing, thereby making the image to be printed sparse, and can also solve the problem of image deformation caused by excessive ink diffusion when inkjet printing a QR code or barcode, thereby affecting the image accuracy. By processing the printed image with the sampling algorithm of the present application before inkjet printing, the printing accuracy of the QR code or barcode can be effectively improved.
[0024] Among them, when obtaining the image to be printed and identifying each pixel in the image to be printed, the image to be printed can be directly generated through the QR code library, thereby obtaining the image to be printed. At the same time, the process of generating the image to be printed also obtains each pixel in the image to be printed. It should be noted that the image to be printed is often a rectangular image composed of multiple pixels. Each pixel identified includes a pixel value corresponding to each pixel, and the pixel value corresponding to each pixel includes any one of a black pixel value and a white pixel value. It should also be noted that directly generating the image to be printed through the QR code library is common knowledge in this field and will not be elaborated on here.
[0025] In one possible implementation, after identifying each pixel point of the image to be printed, each pixel point is processed according to a sampling algorithm, wherein the sampling algorithm refers to extracting corresponding pixel points according to preset extraction rules and marking the extracted pixel points as non-printing pixels.
[0026] In one possible implementation, the preset extraction rule is to extract a row of pixels corresponding to every other row and column of pixels. Those skilled in the art will appreciate that the preset extraction rule includes at least one of extracting a row of pixels every other row and extracting a column of pixels every other column.
[0027] In one possible implementation, before processing each pixel according to the sampling algorithm, the method further includes: indexing the rows and columns of the image to be printed to obtain row and column indices of the image to be printed, and establishing a correspondence between the row and column indices and the corresponding pixels. The indexing of the rows and columns of the image to be printed can be performed using either an odd-numbered index or an even-numbered index, without specific limitation.
[0028] In one possible implementation, see Figure 2As shown, the image to be printed contains 24 rows and 24 columns. In this case, when marking the rows and columns of the image to be printed, an even-numbered marking method can be used at the same time, that is, the rows that can be marked are 0, 1, 2, ..., 23, and the columns that can be marked are 0, 1, 2, ..., 23. In this case, the row indexes obtained are 0, 1, 2, ..., 23, and the column indexes are 0, 1, 2, ..., 23. Alternatively, both the row and column markings can be odd-numbered marking method, that is, the rows that can be marked are 1, 2, ..., 24, and the columns that can be marked are 1, 2, ..., 24. In this case, the row indexes obtained are 1, 2, ..., 24, and the column indexes obtained are 1, 2, ..., 24. Alternatively, the row labels may start with an even number, and the column labels may start with an odd number, i.e., the rows may be marked as 0, 1, 2, ..., 23, and the columns may be marked as 1, 2, ..., 24, resulting in row indices of 0, 1, 2, ..., 23 and column indices of 1, 2, ..., 24. Alternatively, the row labels may start with an odd number, and the column labels may start with an even number, i.e., the rows may be marked as 1, 2, ..., 24, and the columns may be marked as 0, 1, 2, ..., 23, resulting in row indices of 1, 2, ..., 24 and column indices of 0, 1, 2, ..., 23.
[0029] After obtaining the row index, column index and the association relationship between the row index, column index and the corresponding pixel points of the image to be printed, the step of processing each pixel point according to the sampling algorithm is executed.
[0030] In one possible implementation, when each pixel point is processed according to a sampling algorithm and the sampling rule is to extract a row of pixels every other row, the method includes: obtaining the row index of the image to be printed, determining whether each row index of the image to be printed satisfies a first condition, and marking the pixel points corresponding to the row index that is determined not to satisfy the first condition as non-inkjet printing points. The first condition includes either the row index being an even number or the row index being an odd number. It should be noted that the first condition is selected based on the marking method of the row index. That is, when the row index is marked according to the marking method starting with an even number, the first condition is selected as the row index being an even number; when the row index is marked according to the marking method starting with an odd number, the first condition is selected as the row index being an odd number.
[0031] In one possible implementation, when marking rows of an image to be printed using a marking method that begins with an even number, the first condition is that the row index is an even number. In this case, processing each pixel point according to the sampling algorithm includes: obtaining each row index of the image to be printed, determining whether each row index satisfies the first condition (i.e., the row index is an even number), and if it is determined that the row index does not satisfy the first condition, searching for each pixel point corresponding to the current row index based on the association between the row index and each pixel point, and marking each pixel point found as a non-printing pixel point. If it is determined that the row index satisfies the first condition, searching for each pixel point corresponding to the current row index based on the association between the row index and each pixel point, and marking each pixel point found as a printing pixel point.
[0032] For example, see Figure 2 The following figure shows a 24*24 image to be printed. Rows are marked using a marking method that begins with an even number, resulting in row indices of 0, 1, 2, ..., 23. Row indices 0, 2, 4, ..., 22 satisfy the first condition (i.e., they are even numbers), while row indices 1, 3, 5, ..., 23 do not. That is, pixels corresponding to row indices 0, 2, 4, ..., 22 are marked as printing pixels, and pixels corresponding to row indices 1, 3, 5, ..., 23 are marked as non-printing pixels.
[0033] Similarly, when the row index is marked according to the marking method starting with an odd number, the first condition selects the row index to be an odd number, and then judges whether each row index meets the first condition (that is, the row index is an odd number). The specific judgment process is the same as the judgment process when the first condition is that the row index is an even number, and will not be elaborated here.
[0034] In this way, the image to be printed can be obtained after being processed by extracting a row of pixels every other row based on the extraction rule.
[0035] Furthermore, when processing each pixel point according to the sampling algorithm and the sampling rule is to sample a column of pixels every other column, the method further includes: obtaining a column index of the image to be printed, determining whether each column index of the image to be printed satisfies a second condition, and marking the pixels corresponding to the column indexes that do not satisfy the second condition as non-printing pixels. The second condition includes either the column index being an odd number or the column index being an even number.
[0036] It should be noted that the second condition can be selected to be consistent with the first condition, or it can be selected to be inconsistent with the first condition. Specifically, when selecting the second condition, the selection can be made directly based on the marking method of the column index, or it can be made by determining whether the marking method of the row index and the column index are consistent. There is no specific limitation. Among them, when the second condition is directly selected based on the marking method of the column index, the selection method is consistent with the above-mentioned selection method of the first condition based on the row index, and no further details are given here.
[0037] When selecting the second condition by judging whether the marking method of the row index and the column index is consistent, based on the marking method selected when marking the row and column indexes, when judging that the index marking method adopted by the row index and the column index is consistent, the selected second condition is consistent with the first condition, that is, when the first condition selects the row index to be an even number, the second condition selects the column index to be an even number, or when the first condition selects the row index to be an odd number, the second condition selects the column index to be an odd number; when judging that the index marking method adopted by the row index and the column index is different, the selected second condition is different from the first condition, that is, when the first condition selects the row index to be an even number, the second condition selects the column index to be an odd number, or when the first condition selects the row index to be an odd number, the second condition selects the column index to be an even number.
[0038] After the second condition is selected, whether each column index satisfies the second condition is determined based on the selected second condition, and pixels corresponding to column indexes that do not satisfy the second condition are marked as non-printing pixels, while pixels that satisfy the second condition are marked as printing pixels. The method for determining whether each column index satisfies the second condition is the same as the method for determining whether the row index satisfies the first condition, and will not be further elaborated here.
[0039] In this way, the image to be printed can be obtained after processing by extracting a column of pixels every other column based on the extraction rule.
[0040] Furthermore, when each pixel point is processed according to the extraction algorithm, and the extraction rule is to extract a row of pixels every other row and a column of pixels every other column, it includes obtaining the row index of the image to be printed, judging whether each row index of the image to be printed satisfies the first condition, and when it is judged that the row index does not satisfy the first condition, searching for the corresponding pixel point according to the association relationship between the row index and each pixel point, and marking the searched pixel point as a non-printing pixel point, and when it is judged that the row index satisfies the first condition, searching for the pixel point corresponding to the current row index according to the association relationship between the row index and the pixel point, and at the same time arranging the searched pixel point in sequence according to the association relationship between the column index and the pixel point according to the column index, further judging whether the column index corresponding to each pixel point arranged in sequence satisfies the second condition, and marking each pixel point whose column index is judged not to satisfy the second condition as a non-printing pixel point, and marking each pixel point whose column index satisfies the second condition as a printing pixel point. Among them, the method for judging whether the row index meets the first condition here is consistent with the method for judging whether the row index meets the first condition mentioned above, and the method for judging whether the column index meets the second condition is consistent with the method for judging whether the column index meets the second condition mentioned above, and the details are not repeated here.
[0041] It should be noted here that when marking pixels as non-printing pixels and printing pixels, the specific marking method is not limited, and it is preferred to use 0 and 1 marking method for marking, that is, printing pixels can be marked as 1 and non-printing pixels can be marked as 0.
[0042] Thus, through the above processing, an image to be printed is obtained in which each pixel is marked, and inkjet printing can be performed according to the mark corresponding to each pixel. For example, based on the pixel marks using 0 and 1, when inkjet printing is performed on the image to be printed, when the pixel mark corresponding to 1 is inkjet printing, the pixel is inkjet printed, and when the pixel mark corresponding to 0 is not inkjet printing.
[0043] In one possible implementation, before processing each pixel point according to the sampling algorithm, each pixel point is also marked according to its pixel value to obtain a label value corresponding to each pixel point. Wherein, when marking each pixel point, based on the corresponding pixel value of each identified pixel point, the pixel point with a black pixel value is marked as 1, and the pixel point with a white pixel value is marked as 0, and a corresponding relationship between each pixel point and the label value is established. In this regard, those skilled in the art can understand that the pixel points with black pixel values are inkjet printed, and the pixel points with white pixel values are not inkjet printed, that is, when the image to be printed is finally inkjet printed, it can be directly confirmed whether each pixel point is inkjet printed based on the label value of each pixel point. For example, see Figure 2 and Figure 4 As shown, Figure 2 After marking each pixel identified in Figure 4The label value corresponding to each pixel shown.
[0044] Based on this, in one possible implementation, when marking each pixel corresponding to the determined row index as a non-printing pixel, the tag value of each pixel corresponding to the row index can be sequentially traversed to obtain, and the tag value of each pixel can be replaced with the tag value corresponding to the pixel with a white pixel value. Similarly, when marking each pixel corresponding to the determined column index as a non-printing image, the tag value of each pixel corresponding to the column index can also be obtained and sequentially replaced with the tag value of the pixel with a white pixel value. In this way, the image to be printed can be obtained after being processed according to the sampling algorithm, and inkjet printing can be performed based on the tag value corresponding to each pixel.
[0045] For example, if it is determined that each row index does not meet the first condition, the pixels corresponding to each row index are extracted, and the corresponding tag values of each pixel are obtained based on the association between the pixel and the tag value. For example, if the extracted pixel tag values are 111111..., they are replaced with 000000... in sequence. In this case, the tag values 1 corresponding to the extracted pixels are all replaced with 0, that is, the extracted pixels are not inkjet printed.
[0046] Furthermore, in order to save computing resource consumption, when obtaining the corresponding tag value of each pixel point, it is also possible to obtain it in sequence according to a preset length. Among them, the preset length is not specifically limited, and the preset length is preferably set to one byte, that is, 8 bits. In other words, when obtaining the corresponding tag value of the pixel points in the current row, the tag values corresponding to 8 consecutive pixel points can be directly obtained at one time. For example, the current row contains 24 pixels. At this time, 3 groups of tag values can be directly obtained, and each group of tag values is obtained by combining the tag values corresponding to 8 pixels in sequence. For example, the corresponding tag values of 8 pixels arranged in sequence are 1, 1, 1, 1, 1, 1, 1, 1, and the tag value that can be obtained at one time is 11111111.
[0047] Based on obtaining the corresponding mark value of each pixel according to a preset length, when marking each pixel corresponding to the determined row index as a non-printing pixel, the method further includes: obtaining the mark value corresponding to the pixel of the preset length, calculating the obtained mark value according to a preset calculation rule to obtain a corresponding calculation result, and determining whether each pixel is a non-printing pixel based on the calculation result. The preset calculation rule is either performing an AND operation on the obtained mark value and 0x00 or performing an AND operation on the obtained mark value and 0xAA.
[0048] When calculating the obtained tag value according to the preset calculation rule, you must first select the calculation rule. That is, when determining that the row index meets the first condition, the calculation rule selected is to perform an AND operation on the obtained tag value and 0xAA. When determining that the row index does not meet the first condition, the calculation rule selected is to perform an AND operation on the obtained tag value and 0x00.
[0049] The obtained mark value is calculated according to the selected calculation rule to obtain the corresponding calculation result, and the calculation result can be used to confirm whether each pixel is a non-printing pixel. It should be noted here that the obtained mark value is 8 bits, and the corresponding calculation result is also 8 bits, and the 8-bit mark value corresponds to the mark value of the 8 pixels obtained after processing. According to the processed mark value, it can be determined whether the corresponding pixel is a non-printing pixel. That is, the pixel with a black pixel value corresponds to a mark value of 1, and the pixel with a white pixel value corresponds to a mark value of 0. When the pixel with the processed value corresponds to a mark value of 1, the pixel is a printing pixel, and when the pixel with the processed value corresponds to a mark value of 0, the pixel is a non-printing pixel. At this time, the processed image to be printed can be obtained according to the mark value, and the processed image to be printed is inkjet printed according to the mark value.
[0050] For example, see Figure 2 As shown, Figure 2 For a 24*24 image to be printed, the row and column labels are marked with even numbers, that is, the row index and column index are 0, 1, 2, ..., 23, and then Figure 2 Each pixel in is marked according to its pixel value, that is, see Figure 3 As shown in the figure, the label value of each pixel is obtained. Figure 3The process checks whether the row indexes in the current row meet the first condition (i.e., the row index is an even number). If the current row index meets the first condition, it extracts marker values of a preset length (i.e., 8 pixels). This results in three sets of marker values: 11111111, 11111111, and 11111111. ANDing these values with 0xAA yields the following results: 10101010, 10101010, and 10101010. This means that the processed marker values for each pixel in the current row are 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0. When it is determined that the current row index does not meet the first condition, the mark value of the preset length (i.e. 8 pixels) is extracted, that is to say, 3 groups of mark values can be obtained in sequence, i.e., 11111111, 111111111, 11111111. The calculation results of performing AND operation with 0x00 in sequence are 00000000, 00000000, 00000000. That is, the mark values of each pixel in the current row after processing are 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0. The judgment of each row index is completed. Figure 5 The corresponding mark value of each pixel after processing can be obtained by inkjet printing. Figure 3 The image is processed by the sampling algorithm of this application. That is, when the pixel mark value after processing is 1, the pixel is a printing pixel, and when the pixel mark value after processing is 0, the pixel is a non-printing pixel. Based on the mark value, the processed image to be printed can be obtained, see Figure 6 As shown, Figure 6 A schematic diagram showing an image to be printed obtained after being processed by a sampling algorithm.
[0051] Therefore, the present application provides an inkjet printing method that can be used for inkjet printing of a two-dimensional code or a barcode, the method comprising: obtaining an image to be printed and identifying each pixel in the image to be printed; processing each pixel according to a sampling algorithm to obtain a processed image to be printed; wherein the sampling algorithm refers to extracting corresponding pixels according to a preset extraction rule and marking the extracted pixels as non-printing pixels; and inkjet printing the processed image to be printed. The present application adopts a sampling algorithm, that is, extracting each pixel in the image to be printed every other row or column, and not performing inkjet printing on the extracted pixels, thereby increasing the distance between adjacent pixels to be inkjet printed in the image to be printed, thereby making the image to be printed sparse, and thus solving the problem that the printed image is deformed due to excessive ink diffusion when printing a two-dimensional code or a barcode, thereby affecting the printing accuracy of the two-dimensional code or the barcode. The sampling algorithm of the present application makes the processed image to be printed more sparse than the original image to be printed, which can effectively improve the printing accuracy of the two-dimensional code or the barcode. Furthermore, when the present application uses a sampling algorithm to process the image to be printed, a preset length is set so that when processing each pixel in the image to be printed, the pixels are no longer traversed one by one in sequence, but are traversed and processed in groups of preset lengths. This not only saves computer resources but also improves the processing speed of pixels.
[0052] <Device Example> Figure 7 FIG. 1 shows a schematic block diagram of an inkjet printing device according to an embodiment of the present application. Figure 7 As shown, the apparatus 100 includes: an image acquisition module 110, an image processing module 120, and an image printing module 130. The image acquisition module 110 is configured to acquire an image to be printed and identify each pixel in the image to be printed; the image processing module 120 is configured to process each pixel according to a sampling algorithm to obtain a processed image to be printed; the sampling algorithm extracts corresponding pixels according to a preset extraction rule and marks the extracted pixels as non-printing pixels; and the image printing module 130 is configured to inkjet print the processed image to be printed.
[0053] <Equipment Example> Figure 8 FIG. 1 is a schematic block diagram of an inkjet printing device according to an embodiment of the present application. Figure 8 As shown, the inkjet printing device 200 includes: a processor 210 and a memory 220 for storing executable instructions of the processor 210. The processor 210 is configured to implement any of the above-mentioned inkjet printing methods when executing the executable instructions.
[0054] It should be noted that there may be one or more processors 210. Furthermore, the inkjet printing device 200 of the embodiment of the present application may further include an input device 230 and an output device 240. The processor 210, memory 220, input device 230, and output device 240 may be connected via a bus or other means, which are not specifically limited herein.
[0055] Memory 220, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and various modules, such as the program or module corresponding to the inkjet printing method of the present invention. Processor 210 executes the software programs or modules stored in memory 220 to perform various functional applications and data processing of inkjet printing device 200.
[0056] The input device 230 may be used to receive input numbers or signals. The signals may be key signals related to user settings and function control of the device / terminal / server. The output device 240 may include a display device such as a display screen.
[0057] <Storage Medium Embodiment> According to a fourth aspect of the present application, a non-volatile computer-readable storage medium is further provided, on which computer program instructions are stored. When the computer program instructions are executed by the processor 210, any of the above-mentioned inkjet printing methods is implemented.
[0058] While various embodiments of the present application have been described above, the above descriptions are illustrative, non-exhaustive, and not intended to be limiting of the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technological improvements in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method of inkjet printing, characterized in that: Used for inkjet printing of QR codes or barcodes, including: Acquire an image to be printed and identify each pixel in the image to be printed; Processing each pixel point according to a sampling algorithm to obtain a processed image to be printed; wherein the sampling algorithm refers to extracting corresponding pixel points according to a preset extraction rule and marking the extracted pixel points as non-printing pixel points; The processed image to be printed is subjected to inkjet printing.
2. The inkjet printing method according to claim 1, wherein: The preset extraction rule is to extract a row of corresponding pixels for every other row of pixels.
3. The inkjet printing method according to claim 1, wherein: When processing each pixel point according to the sampling algorithm, it includes: Obtaining a row index of the image to be printed; It is determined whether each row index of the image to be printed meets a first condition, and pixels corresponding to row indexes determined not to meet the first condition are marked as non-printing pixels.
4. The inkjet printing method according to claim 1, wherein: When processing each pixel point according to the sampling algorithm, the method further includes: Obtaining the column index of the image to be printed; It is determined whether each column index of the image to be printed meets a second condition, and pixels corresponding to column indexes determined not to meet the second condition are marked as non-printing pixels.
5. The inkjet printing method according to any one of claims 1 to 4, characterized in that: Before processing each pixel point according to the sampling algorithm, the method further includes marking each pixel point according to the pixel value of each pixel point to obtain a marking value corresponding to each pixel point.
6. The inkjet printing method according to claim 5, characterized in that: When marking the extracted pixels as non-printing pixels, it includes: The tag value corresponding to each pixel point is obtained, each tag value obtained is calculated according to a preset calculation rule to obtain corresponding calculation results, and whether each pixel point is a non-printing pixel point is determined according to each calculation result.
7. The inkjet printing method according to claim 6, characterized in that: When obtaining the mark value corresponding to each pixel point in the current row, the values can be obtained sequentially according to the preset length.
8. An inkjet printing device, characterized in that: Used for inkjet printing of QR codes or barcodes, including: An image acquisition module, configured to acquire an image to be printed and identify each pixel in the image to be printed; An image processing module, configured to process each pixel according to a sampling algorithm to obtain a processed image to be printed; wherein the sampling algorithm is to extract corresponding pixels according to a preset extraction rule and mark the extracted pixels as non-printing pixels; The image printing module is used for inkjet printing the processed image to be printed.
9. An inkjet printing device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the method according to any one of claims 1 to 7 when executing the executable instructions.
10. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.