An image data encoding method, device, electronic equipment and storage medium

By obtaining the position information of the inkjet landing point and pixel point of the swing-arm printer, performing matching processing, and determining the inkjet sequence and coding information, the problem of image deformation caused by changes in the movement mode of the nozzle is solved, and the effect of correctly printing the target image is achieved.

CN119728876BActive Publication Date: 2025-10-17ZHONGSHAN SANZANG ELECTRONICS TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411602748.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-10-17
Estimated Expiration
2044-11-11

AI Technical Summary

Technical Problem

When the movement mode of the nozzle changes, the existing technology cannot ensure that the inkjet printer can print the image correctly.

Method used

By obtaining the position information of the inkjet landing point of the swing-arm printer and the pixel point of the target image, matching processing is performed to determine the target inkjet landing point and inkjet sequence information, and pixel coding information is generated to indicate the printing sequence of the swing-arm printer.

Benefits of technology

The invention realizes that the target image can be printed correctly when the nozzle of the swing arm printer swings, thereby improving the printing precision and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728876B_ABST
    Figure CN119728876B_ABST
Patent Text Reader

Abstract

The present disclosure relates to an image data encoding method, device, electronic equipment and storage medium, the method comprising: obtaining inkjet position information corresponding to each inkjet drop point of a swing arm printer, the inkjet head of the swing arm printer reciprocatingly swings inkjet with one end of the swing arm as the pivot; obtaining pixel position information corresponding to each pixel point in a target image; based on the inkjet position information and the pixel position information, performing matching processing on the inkjet drop points and the pixel points to obtain target inkjet drop points matched with the pixel points; determining inkjet sequence information corresponding to the target inkjet drop points; based on the inkjet sequence information, determining first encoding information corresponding to the pixel points, the first encoding information indicating a printing sequence corresponding to the pixel points when the swing arm printer prints the target image. The present disclosure can determine the printing sequence corresponding to each pixel point in the target image under the printing mode of the swing arm printer, so that the swing arm printer can correctly print the target image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to an image data encoding method and device, electronic equipment and storage medium. BACKGROUND

[0002] In a conventional inkjet printer, the movement track of the nozzle is a straight line, that is, the nozzle moves along the horizontal axis in the printer to print the image to be printed on the paper row by row. In this printing mode, the pixel points in the image to be printed can be directly mapped to the printing data of the nozzle according to the row and column where the pixel points are located in the image to be printed. However, when the printing mode of the printer changes, the nozzle no longer moves ink along the horizontal axis in the printer, but moves ink in other non-linear ways, if the above mapping method is still used for encoding the printing data, the printed image will be distorted. Therefore, how to make the printer still print the correct image when the movement mode of the nozzle changes becomes a technical problem to be solved. SUMMARY

[0003] In order to solve at least one of the above technical problems, the present disclosure provides an image data encoding method, device, electronic equipment and storage medium.

[0004] In one aspect, the present application provides an image data encoding method, comprising:

[0005] Obtaining inkjet position information corresponding to each inkjet drop point of a swing arm type printer, wherein the nozzle of the swing arm type printer swings back and forth with one end of the swing arm as the pivot to spray ink;

[0006] Obtaining pixel position information corresponding to each pixel point in a target image;

[0007] Based on the inkjet position information and the pixel position information, matching the inkjet drop points and the pixel points to obtain target inkjet drop points matched with the pixel points;

[0008] Determining inkjet sequence information corresponding to the target inkjet drop points;

[0009] Based on the inkjet sequence information, determining first encoding information corresponding to the pixel points, wherein the first encoding information indicates a printing sequence corresponding to the pixel points when the swing arm type printer prints the target image.

[0010] In an optional embodiment, the inkjet sequence information includes inkjet position information corresponding to the inkjet drop points, swing direction information and nozzle serial number, wherein the swing direction information represents the swing direction corresponding to the target inkjet drop point when the swing arm sprays the target inkjet drop point during the back and forth swing.

[0011] In an optional embodiment, determining the inkjet sequence information corresponding to the target inkjet drop points comprises:

[0012] The target ink drop is sequenced based on a swing feature of the swing arm, relative positions of the plurality of nozzles in the nozzle head, and a position of the target ink drop within the swing region of the swing arm, to obtain ink jet sequence information corresponding to the target ink drop.

[0013] In an optional embodiment, obtaining ink jet position information corresponding to each ink drop of the swing arm printer comprises:

[0014] Obtaining a swing amplitude angle of the swing arm, a target ink drop number, and a first distance and a second distance corresponding to a target nozzle, the target ink drop number being a total number of ink drops within a swing range of the swing arm, the target nozzle being a nozzle corresponding to the ink drop, the first distance being a distance between a vertical projection position of the target nozzle on a swing arm line associated with the ink drop and a fixed end position of the swing arm, and the second distance being a distance between the target nozzle and the vertical projection position;

[0015] According to the swing amplitude angle, the target ink drop number, and the ink drop number corresponding to the ink drop, a target included angle is calculated, the target included angle being an included angle between the swing arm line associated with the ink drop and an X axis of a target coordinate system, the target coordinate system having an origin at a position of the rotation shaft and having a middle line of the swing amplitude angle as a Y axis;

[0016] According to the target included angle, the first distance, and the second distance, ink jet position information of the ink drop in the target coordinate system is calculated.

[0017] In an optional embodiment, obtaining pixel position information corresponding to each pixel point in the target image comprises:

[0018] The target image is placed in a target region in the target coordinate system, and pixel position information of each pixel point in the target image in the target coordinate system is determined, the target region being a region in which an effective printing region of each brush of the swing arm printer is located in the target coordinate system.

[0019] In an optional embodiment, before obtaining pixel position information corresponding to each pixel point in the target image, the method further comprises:

[0020] Obtaining an initial image;

[0021] Performing scaling processing on the initial image so that the initial image falls within a printing range of the swing arm printer;

[0022] Performing color matching and color separation processing on the scaled initial image to obtain a color-separated image;

[0023] Performing halftone processing on the color-separated image to obtain a to-be-printed image;

[0024] Based on the effective printing area of each brush of the swing arm printer, the to-be-printed image is split to obtain at least one split image, and the target image is any split image in the at least one split image.

[0025] In an optional embodiment, the method further comprises:

[0026] Based on the image number of the split image to which the pixel point belongs, the second encoding information corresponding to the pixel point is determined, and the second encoding information indicates the brush time corresponding to the pixel point.

[0027] Based on the first encoding information and the second encoding information, the pixel point is encoded to obtain a pixel matrix, and the pixel matrix indicates the printing data of the swing arm printer when printing the to-be-printed image.

[0028] In an optional embodiment, based on the inkjet position information and the pixel position information, the inkjet drop and the pixel point are matched to obtain a target inkjet drop matched with the pixel point, comprising:

[0029] According to the inkjet position information and the pixel position information, the distance from each inkjet drop to each pixel point is calculated.

[0030] The pixel point closest to each inkjet drop and meeting the preset printing accuracy is determined as the candidate pixel point corresponding to the inkjet drop;

[0031] In the case that each candidate pixel point is a different pixel point, the inkjet drop corresponding to the pixel point is determined as the target inkjet drop;

[0032] In the case that there are repeated pixel points in each candidate pixel point, the inkjet drop closest to the repeated pixel point is determined as the inkjet drop matched with the repeated pixel point, and the candidate pixel point is de-duplicated, and the inkjet drop corresponding to the de-duplicated candidate pixel point is determined as the target inkjet drop.

[0033] In a second aspect, the present application further provides an image data encoding device, comprising:

[0034] The first acquisition module is configured to acquire inkjet position information corresponding to each inkjet drop of the swing arm printer, and the nozzle of the swing arm printer swings ink with one end of the swing arm as a rotating shaft.

[0035] The second acquisition module is configured to acquire pixel position information corresponding to each pixel point in the target image.

[0036] The matching module is configured to match the inkjet drop and the pixel point based on the inkjet position information and the pixel position information, and obtain a target inkjet drop matched with the pixel point.

[0037] The inkjet sequence information determination module is configured to determine the inkjet sequence information corresponding to the target inkjet drop.

[0038] The encoding module is configured to determine first encoding information corresponding to the pixel point based on the inkjet sequence information, the first encoding information indicating a printing sequence corresponding to the pixel point when the swing arm printer prints the target image.

[0039] In a third aspect, the present application further provides an electronic device, comprising:

[0040] a processor;

[0041] a memory for storing processor-executable instructions;

[0042] The processor is configured to execute the instructions to implement the image data encoding method.

[0043] In a fourth aspect, the present application further provides a storage medium, when the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is enabled to perform the image data encoding method.

[0044] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, but not limiting the present disclosure.

[0045] The present disclosure has the following beneficial effects:

[0046] The inkjet position information corresponding to each inkjet landing point of the swing arm printer is obtained, the nozzle of the swing arm printer swings ink back and forth with one end of the swing arm as the pivot; the pixel position information corresponding to each pixel point in the target image is obtained; the inkjet landing point and the pixel point are matched based on the inkjet position information and the pixel position information, to obtain a target inkjet landing point matched with the pixel point; the inkjet sequence information corresponding to the target inkjet landing point is determined; the first encoding information corresponding to the pixel point is determined based on the inkjet sequence information, the first encoding information indicating a printing sequence corresponding to the pixel point when the swing arm printer prints the target image.

[0047] The present disclosure can determine the target inkjet landing point corresponding to each pixel point in the target image under the printing mode of the nozzle swinging ink back and forth with one end of the swing arm as the pivot, by matching the inkjet landing point of the swing arm printer with the position of each pixel point in the target image; the first encoding information corresponding to the pixel point can be determined based on the inkjet sequence information of the target inkjet landing point, so as to determine the printing sequence corresponding to each pixel point in the target image under the printing mode of the swing arm printer, so that the swing arm printer can correctly print the target image.

[0048] Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced. Obviously, the accompanying drawings in the following description only represent some of the embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative effort based on these drawings. The drawings herein are incorporated into the specification and constitute a part of the specification, show embodiments consistent with the present disclosure, and together with the specification serve to explain the principles of the present disclosure, and do not constitute an improper limitation on the present disclosure.

[0050] Figure 1 is a schematic diagram of an implementation environment according to an example embodiment;

[0051] Figure 2 is a flowchart of an image data encoding method according to an example embodiment;

[0052] Figure 3 is a schematic diagram of a swing arm type printer nozzle swing mode according to an example embodiment;

[0053] Figure 4 is a schematic diagram of the position relationship between the inkjet drop and the origin of the coordinate system under the target coordinate system according to an example embodiment;

[0054] Figure 5 is a schematic diagram of the effective printing area of each brush of a swing arm type printer according to an example embodiment;

[0055] Figure 6 is a schematic diagram of a to-be-printed image according to an example embodiment;

[0056] Figure 7 is a schematic diagram of an image data encoding device according to an example embodiment;

[0057] Figure 8 is a block diagram of an electronic device for image data encoding according to an example embodiment. DETAILED DESCRIPTION

[0058] The technical solutions in the embodiments of the present application will be described clearly and completely in the following description of the embodiments of the present application with reference to the accompanying drawings. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort fall within the scope of the present application.

[0059] It is to be understood that the terms "first", "second", and the like, used in the description and the claims of the present application as well as the above description of the drawings merely specify the names of similar objects and do not necessarily have particular ordinal or chronological significance. It is to be understood that the use of the terms "and / or", "at least one of", and "one or more of" for a list of items should be understood as meaning that three situations are possible: either one or more items of the list, or all of the items of the list, or a combination of items of the list can be employed. It is to be understood that the use of the descriptive term "about" in connection with a given value or property of an object or element is intended to mean that the given value or property is within a reasonable range of variation of the given value or property, such as would be understood by one of ordinary skill in the art, unless otherwise indicated.

[0060] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in different drawings represent the same or similar elements. Although various aspects of embodiments are illustrated in the drawings, the drawings are not necessarily drawn to scale unless specifically indicated. The term "exemplary" as used herein means "serving as an example, instance, or illustration." Any embodiment described as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.

[0061] The term "and / or" as used herein is merely an associative relationship to describe the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0062] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following detailed description. Those skilled in the art will understand that the present disclosure can be implemented without certain specific details. In some examples, methods, means, elements, and circuits that are well known to those skilled in the art are not described in detail in order to highlight the main idea of the present disclosure.

[0063] Please refer to Figure 1 , Figure 1 is a schematic diagram of an application environment according to an exemplary embodiment, as shown in Figure 1 The application environment can include a server 01 and a terminal 02.

[0064] In an optional embodiment, the server 01 can be used for the image data encoding method to perform calculation processing. Specifically, the server 01 can be a stand-alone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud service, cloud database, cloud computing, cloud function, cloud storage, network service, cloud communication, middleware service, domain name service, security service, content delivery network (CDN), and big data and artificial intelligence platform.

[0065] In an optional embodiment, the terminal 02 can combine the image data encoding method of the server 01 to perform calculation processing. Specifically, the terminal 02 can include but is not limited to smart phones, desktop computers, tablet computers, notebook computers, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart wearable devices, and the like. Optionally, the operating system running on the electronic device can include but is not limited to Android system, IOS system, Linux system, Windows system, Unix system, and the like.

[0066] For example, the terminal 02 acquires the inkjet position information corresponding to each inkjet landing point of the swing arm printer and the pixel position information corresponding to each pixel point in the target image, and transmits them to the server 01. The inkjet head of the swing arm printer swings inkjet back and forth with one end of the swing arm as the pivot. The server 01 matches the inkjet landing point and the pixel point based on the inkjet position information and the pixel position information, and obtains the target inkjet landing point matched with the pixel point. The server 01 determines the inkjet sequence information corresponding to the target inkjet landing point, determines the first encoding information corresponding to the pixel point based on the inkjet sequence information, and transmits the first encoding information to the terminal 02. The first encoding information indicates the printing sequence corresponding to the pixel point when the swing arm printer prints the target image.

[0067] In addition, it should be noted that, Figure 1 The above-mentioned server 01 and terminal 02 can be directly or indirectly connected through wired or wireless communication, and the present disclosure does not limit the same.

[0068] The above-mentioned server 01 and terminal 02 can be directly or indirectly connected through wired or wireless communication, and the present disclosure does not limit the same.

[0069] Figure 2 is a flowchart of an image data encoding method according to an exemplary embodiment, as shown in Figure 2 As shown in the image data encoding method, the following steps are included:

[0070] Step S201: obtaining inkjet position information corresponding to each inkjet landing point of a swing arm printer, wherein the nozzle of the swing arm printer swings back and forth with one end of the swing arm as a rotation axis to spray ink.

[0071] In the embodiment of the present disclosure, the schematic diagram of the swinging mode of the nozzle of the swing arm printer is as follows: Figure 3 As shown, the operating principle of a swing-arm printer is that one end of the swing arm, equipped with a rotating motor, remains in a fixed position during printing. A printhead is mounted at the other end of the swing arm, which acts as a movable end. Driven by the rotating motor, the printhead swings back and forth, spraying ink as the arm swings. The printhead's path during each reciprocating swing is a circular arc, and the printhead sprays ink multiple times at even intervals. The point where each inkjet is dropped is called an ink drop.

[0072] Figure 4 The present invention is a schematic diagram showing the positional relationship between inkjet landing points and the origin of the coordinate system in a target coordinate system according to an exemplary embodiment. In an optional embodiment, obtaining inkjet position information corresponding to each inkjet landing point of a swing-arm printer includes:

[0073] Step S2011: Obtain the swing amplitude angle of the swing arm, the target number of inkjet operations, and the first distance and the second distance corresponding to the target nozzle. The target number of inkjet operations is the total number of inkjet operations within a swing range of the swing arm. The target nozzle is the nozzle corresponding to the inkjet landing point. The first distance is the distance between the vertical projection position of the target nozzle on the swing arm line associated with the inkjet landing point and the fixed end position of the swing arm. The second distance is the distance between the target nozzle and the vertical projection position.

[0074] In the embodiment of the present disclosure, the swing amplitude angle of the swing arm is the optimal printing range angle during the swing of the swing arm, which is recorded as angle A, that is, Figure 4 The angle between the leftmost swing arm line b and the rightmost swing arm line c is the angle within which the nozzle sprays ink. The total number of times the swing arm sprays ink within one swing range can be the total number of times the nozzle sprays ink during the swing arm swings from line b to line c, or it can be the total number of times the nozzle sprays ink during the swing arm swings from line c to line b. The total number of times the swing arm sprays ink during the swing arm swings from line b to line c is equal to the total number of times the swing arm sprays ink during the swing arm swings from line c to line b. This number is recorded as M times. During each inkjet process of the nozzle, one or more nozzles in the nozzle spray ink together. The total number of nozzles is recorded as N. The inkjet position information of M*N inkjet landing points needs to be calculated within one swing range of the swing arm. Taking the inkjet landing point sprayed by nozzle n in the mth inkjet as an example, the nozzle n that sprays the inkjet landing point is recorded as the target nozzle, and the swing arm line associated with the inkjet landing point is the straight line where the swing arm is located when the target nozzle sprays the inkjet landing point, such as Figure 4As shown, the distance between the vertical projection position of the target nozzle on the swing arm line associated with the ink ejection drop and the fixed end position of the swing arm is denoted as r, and the distance between the target nozzle and the vertical projection position is denoted as d.

[0075] Step S2012: calculating a target angle according to the swing amplitude angle, the target ink ejection number, and the ink ejection number corresponding to the ink ejection drop, the target angle being the angle between the swing arm line associated with the ink ejection drop and the X axis of a target coordinate system, the target coordinate system having the position of the rotation shaft as the origin and the middle line of the swing amplitude angle as the Y axis.

[0076] In the embodiments of the present disclosure, the position of the rotation shaft is the center of the swing arm circular arc swing. Since the X axis and the Y axis of the target coordinate system are perpendicular to each other, the target angle a is the angle between the swing arm line associated with the ink ejection drop and the X axis of the target coordinate system, that is, the angle between the swing arm line associated with the ink ejection drop and the horizontal line. As shown, Figure 4 As shown, assuming that the swing arm line is on the left side of the X axis when the target nozzle ejects the ink ejection drop, the target nozzle is on the left side of the swing arm line (other cases are similar), the target angle can be calculated according to the swing amplitude angle, the target ink ejection number, and the ink ejection number corresponding to the ink ejection drop by the following formula (1):

[0077] a = (90° - A / 2) + (A / (M-1))*m (1)

[0078] In formula (1), a is the target angle, A is the swing amplitude angle of the swing arm, M is the target ink ejection number, and m is the ink ejection number corresponding to the ink ejection drop.

[0079] Step S2013: calculating the ink ejection position information of the ink ejection drop in the target coordinate system according to the target angle, the first distance, and the second distance.

[0080] In the embodiments of the present disclosure, the ink ejection position information can be the ink ejection coordinate point corresponding to the ink ejection drop in the target coordinate system. As shown, Figure 4 As shown, assuming that the swing arm line is on the left side of the X axis when the target nozzle ejects the ink ejection drop, the target nozzle is on the left side of the swing arm line (other cases are similar), the ink ejection position information of the ink ejection drop in the target coordinate system can be calculated according to the target angle, the first distance, and the second distance by the following formulas (2) and (3):

[0081] x = -r*cos(a) - d*sin(a) (2)

[0082] y = r*sin(a) - d*cos(a) (3)

[0083] In formulas (2) and (3), x is the horizontal coordinate of the ink ejection drop in the target coordinate system, y is the vertical coordinate of the ink ejection drop in the target coordinate system, a is the target angle, r is the first distance, and d is the second distance.

[0084] The coordinates (x, y) corresponding to the inkjet drop point in the target coordinate system are determined as the inkjet position information of the inkjet drop point in the target coordinate system.

[0085] Based on the above, in the embodiment of the present disclosure, by placing the swing arm range of the swing arm printer in the target coordinate system with the position of the rotation shaft as the origin and the middle line of the swing arm range as the Y axis, the coordinates of the inkjet drop point of the swing arm printer in the XY coordinate system can be calculated according to the swing arm range, the total number of inkjet drops in one swing range of the swing arm, the distance between the vertical projection position of the target nozzle on the swing arm line associated with the inkjet drop point and the fixed end position of the swing arm, and the distance between the target nozzle and the vertical projection position, and other parameters that can quantify the swing process, and then the inkjet position information of the inkjet drop point is determined.

[0086] Step S202: Obtain the pixel position information corresponding to each pixel point in the target image.

[0087] In the embodiment of the present disclosure, the pixel position information corresponding to each pixel point in the target image can be the pixel coordinate point corresponding to each pixel point in the target image in the target coordinate system.

[0088] In an optional embodiment, obtaining the pixel position information corresponding to each pixel point in the target image comprises: placing the target image in a target region in the target coordinate system, and determining the pixel position information of each pixel point in the target image in the target coordinate system, the target region being a region in which the effective printing region of each brush of the swing arm printer is located in the target coordinate system.

[0089] In the embodiment of the present disclosure, the target image is a preprocessed image, and the size of the target image does not exceed the effective printing region of each brush of the swing arm printer. The specific preprocessing method is shown in steps S301-S305. By placing the target image in the target region in the target coordinate system, the coordinates of each pixel point in the target image in the target coordinate system can be determined according to the position of each pixel point in the target image in the target coordinate system, which facilitates the distance calculation between the inkjet coordinate point and the pixel coordinate point. The above-mentioned effective printing region of each brush is the largest region that can be cut out for the purpose of splicing from the fan-shaped region covered by the nozzle of each brush. Due to the physical layout of multiple nozzles on the nozzle, the effective printing regions of nozzles of different colors or even different odd-even numbers may not be the same. The final effective printing region of each brush is the overlapping region of the inkjet ranges of multiple nozzles.

[0090] Based on the above, it can be seen that in the embodiment of the present disclosure, by placing the target image in the area where the effective printing area of ​​each brush of the swing-arm printer is located in the target coordinate system, the position of each pixel point in the target image can be calibrated to obtain the pixel position information of the pixel point in the same reference coordinate system.

[0091] Step S203: Based on the inkjet position information and the pixel position information, the inkjet landing point and the pixel point are matched to obtain a target inkjet landing point that matches the pixel point.

[0092] In an optional embodiment, matching the inkjet landing point with the pixel point based on the inkjet position information and the pixel position information to obtain a target inkjet landing point that matches the pixel point includes:

[0093] Step S2031: Calculate the distance from each inkjet landing point to each pixel point based on the inkjet position information and the pixel position information.

[0094] In the embodiment of the present disclosure, since the inkjet position information and the pixel position information are both coordinate points in the target coordinate system, the distance from each inkjet landing point to each pixel point can be calculated by calculating the distance from the inkjet coordinate point corresponding to the inkjet landing point to the pixel coordinate point corresponding to each pixel point.

[0095] Step S2032: Determine the pixel points that are closest to each inkjet landing point and meet the preset printing accuracy as candidate pixel points corresponding to each inkjet landing point.

[0096] In the embodiment of the present disclosure, assuming that the preset printing accuracy is that the deviation of pixel points does not exceed 0.1 mm, the pixel points that are no more than 0.1 mm away from each inkjet landing point are determined as the candidate pixel points corresponding to each inkjet landing point.

[0097] Step S2033: When all candidate pixel points are different pixel points, the inkjet landing point corresponding to the pixel point is determined as the target inkjet landing point.

[0098] In the embodiment of the present disclosure, if each candidate pixel point is a different pixel point, it means that the pixel points printed by each inkjet landing point are different, and there is no situation where the same pixel point is printed twice. In this case, the inkjet landing point corresponding to the pixel point can be determined as the target inkjet landing point to complete the matching of each pixel point and the inkjet landing point.

[0099] Step S2034: When there are repeated pixels among the candidate pixel points, the inkjet landing point closest to the repeated pixel point is determined as the inkjet landing point that matches the repeated pixel point, and the candidate pixel points are deduplicated, and the inkjet landing point corresponding to the deduplicated candidate pixel point is determined as the target inkjet landing point.

[0100] In the embodiment of the present disclosure, if there is a repeated pixel point in each candidate pixel point, it means that the same pixel point is repeatedly printed at different positions. In this case, the pixel point that is repeatedly printed corresponds to two or more inkjet drop points. The inkjet drop point closest to the repeatedly printed pixel point among these inkjet drop points is determined as the inkjet drop point matched with the repeatedly printed pixel point, which is used to print this pixel point. The candidate pixel points are de-duplicated, and the inkjet drop point corresponding to the de-duplicated candidate pixel points is determined as the target inkjet drop point, and the matching of each pixel point and the inkjet drop point is completed.

[0101] In the embodiment of the present disclosure, if a certain pixel point does not match an inkjet drop point within the preset printing accuracy, the pixel point is not printed when printing the target image. If an inkjet drop point does not match a pixel point, no ink is sprayed at the inkjet drop point.

[0102] Based on the above, in the embodiment of the present disclosure, by determining the pixel point closest to each inkjet drop point and meeting the preset printing accuracy as the candidate pixel point corresponding to the inkjet drop point, the pixel point can be printed at the inkjet drop point closest to it to ensure the printing accuracy of the target image. By de-duplicating the candidate pixel points and determining the inkjet drop point corresponding to the de-duplicated candidate pixel points as the target inkjet drop point, the same pixel point can be prevented from being printed multiple times, and the printing accuracy of the target image is further improved.

[0103] Step S204: Determine the inkjet sequence information corresponding to the target inkjet drop point.

[0104] In the embodiment of the present disclosure, the inkjet sequence information includes inkjet position information, swing direction information, and nozzle sequence number corresponding to the inkjet drop point. The swing direction information represents the swing direction of the swing arm when spraying the target inkjet drop point in the reciprocating swing process. When the nozzle corresponding to the nozzle sequence number moves in the swing direction indicated by the swing direction information, and the nozzle is detected to be at the position indicated by the inkjet position information, ink is sprayed, and the target inkjet drop point is generated.

[0105] Based on the above, in the embodiment of the present disclosure, by including the inkjet position information, the swing direction information, and the nozzle sequence number corresponding to the inkjet drop point in the inkjet sequence information, the inkjet timing of each inkjet drop point in the printing process of the swing arm printer can be locked. When the swing arm is in the swing direction indicated by the swing direction information, the position of the nozzle corresponding to the nozzle sequence number is detected. When the position of the nozzle is the same as the position indicated by the inkjet position information, ink is sprayed once to generate the corresponding inkjet drop point.

[0106] In an optional embodiment, determining the inkjet sequence information corresponding to the target inkjet drop point includes:

[0107] The target ink drop is sequenced according to the swing feature of the swing arm, the relative positions of the plurality of nozzles in the nozzle head, and the position of the target ink drop in the swing region of the swing arm, to obtain ink sequence information corresponding to the target ink drop.

[0108] In the embodiments of the present disclosure, the swing feature of the swing arm is associated with the printing mode of the swing arm printer. Optionally, the printing mode of the swing arm printer can be to complete the printing of all pixel points in an effective printing area in the process of the swing arm swinging from one side to the other side, that is, to complete the ejection of all ink drops in an effective printing area of one brush by one brush, which is recorded as a first printing mode. In this printing mode, the swing arm printer can step the paper forward once after each one-way swing of the swing arm, and swing the swing arm once in each step. In order to achieve higher quality printing, the printing mode of the swing arm printer can also be to complete the printing of pixel points in an effective printing area in the process of one-way swing of the swing arm, which is recorded as a second printing mode. In this printing mode, the swing arm printer can step the paper forward once after each one-way swing of the swing arm, and swing the swing arm once in each step. The swing features of the swing arm corresponding to the different printing modes described above are different. In order to achieve the division of the printing area according to the swing feature of the swing arm and determine the corresponding swing direction when printing different areas, the swing angle or swing distance in the time interval of two adjacent ink ejections of the nozzle head in different printing modes is used to represent the swing feature of the swing arm in the embodiments of the present disclosure.

[0109] In the first printing mode, the swing direction information corresponding to each ink drop in the printing range can be determined according to the position of the ink drop in the swing region of the swing arm. The swing direction information corresponding to the ink drops in the effective printing area of one brush is the same, and the swing direction information corresponding to the ink drops in the effective printing area of the next adjacent brush is opposite to the swing direction information corresponding to the ink drops in the effective printing area of the previous brush. Subsequently, the nozzles and ink drops can be matched according to the swing angle or swing distance in the time interval of two adjacent ink ejections of the nozzle head in the first printing mode and the relative positions of the plurality of nozzles in the nozzle head, to obtain the nozzle sequence number corresponding to the ink drop. Finally, the ink position information, swing direction information, and nozzle sequence number of each ink drop are integrated to obtain the ink sequence information corresponding to the target ink drop.

[0110] In the second printing mode, the ink drop points in one effective printing area correspond to two kinds of swing direction information. The swing direction information of each ink drop point in one effective printing area can be determined by dividing the effective printing area according to the swing angle or swing distance of the ink jet head within the time interval between two adjacent ink jetting times in the second printing mode, to obtain a plurality of ink jetting areas when the swing arms swing from left to right and a plurality of ink jetting areas when the swing arms swing from right to left. The two kinds of ink jetting areas are arranged alternately. The swing direction information corresponding to the ink drop point is determined according to the ink jetting area where the ink drop point is located. Then, the ink nozzles and the ink drop points are matched according to the relative positions of the plurality of ink nozzles in the ink jet head, to obtain the nozzle sequence number corresponding to the ink drop point. Finally, the ink jetting position information, the swing direction information and the nozzle sequence number of each ink drop point are integrated to obtain the ink jetting sequence information corresponding to the target ink drop point.

[0111] Figure 5 FIG. 1 is a schematic diagram of the effective printing area per brush of a swing arm printer according to an example embodiment, Figure 5 The shaded area in FIG. 1 is the effective printing area per brush, which is located in the fan-shaped area covered by the ink jet head per brush. Since the height range of the image may exceed the height range covered by one brush, one brush cannot meet the demand of the image, and the paper needs to be stepped forward after one brush to print the content of the next brush. The swing of the swing arm of the swing arm printer from one side to the other side is regarded as one brush. The swing trajectory of the ink jet head is an arc. In order to longitudinally splice the content printed by the previous brush and the content printed by the next brush, the line shape of the upper edge and the lower edge of the effective printing area per brush needs to be designed to be exactly the same, so that the height of each column of the effective printing area is the same.

[0112] In the example embodiment of the present disclosure, the distance of the paper stepping forward once can be the distance corresponding to the height of one effective printing area, or the distance corresponding to 1 / 2, 1 / 4 or 1 / 8 of the height of the effective printing area. In the case that the distance of the paper stepping forward once is less than the distance corresponding to the height of one effective printing area, the printing of the image data in one effective printing area also needs to be completed by multiple brushes. In order to ensure the printing effect, the distance from the ink nozzle to the paper is not more than 3 mm.

[0113] Based on the above, in the example embodiment of the present disclosure, the swing characteristics of the swing arm, the relative positions of the plurality of ink nozzles in the ink jet head and the position of the target ink drop point in the swing area of the swing arm, etc. can reflect the ink jet characteristics of the swing arm printer in the printing process. The ink jet sequence information of the target ink drop point is obtained by using the above information to sequence the target ink drop point, which can enable the swing arm printer to accurately print the target ink drop point.

[0114] Step S205: determining the first encoding information corresponding to the pixel point based on the inkjet sequence information, the first encoding information indicating a printing sequence of the pixel point when the swing arm printer prints the target image.

[0115] In the embodiment of the present disclosure, according to the first encoding information corresponding to the pixel point, the inkjet position of the pixel point when the swing arm printer prints the target image, the swing direction of the swing arm when the pixel point is jetted, and the corresponding nozzle can be locked. In the process of reciprocating swing of the swing arm of the swing arm printer, when the nozzle corresponding to the nozzle number moves in the swing direction indicated by the swing direction information, inkjet is performed when the nozzle is detected to be at the position indicated by the inkjet position information, and the printing of the pixel point is completed.

[0116] Based on the above, in the embodiment of the present disclosure, by matching the inkjet drop point of the swing arm printer with the position of each pixel point in the target image, the target inkjet drop point corresponding to each pixel point in the target image can be determined when the printing mode of the inkjet head is reciprocating swing with one end of the swing arm as the pivot. By determining the first encoding information corresponding to the pixel point based on the inkjet sequence information of the target inkjet drop point, the printing sequence corresponding to each pixel point in the target image in the printing mode of the swing arm printer can be determined, so that the swing arm printer can correctly print the target image.

[0117] In an optional embodiment, before obtaining the pixel position information corresponding to each pixel point in the target image, the image received by the image encoding end needs to be preprocessed to obtain the target image, therefore, the above method further comprises:

[0118] Step S301: obtaining an initial image.

[0119] In the embodiment of the present disclosure, the way to obtain the initial image can be to receive the initial image sent by the user end, and the initial image can be an image after image beautification by the user. For example, the user can obtain the initial image by cropping, scaling or beautifying the original image, and then send the initial image to the image encoding end.

[0120] Step S302: performing scaling processing on the initial image to make the initial image fall within the printing range of the swing arm printer.

[0121] In the embodiments of the present disclosure, since the height range of the initial image can exceed the height range covered by one pass, one pass cannot meet the requirement of the frame, and the paper needs to be stepped forward after one pass to print the next pass content. The initial image falling within the printing range of the swing arm printer can be that the width range of the initial image is located within the width range of the effective printing area of each pass of the swing arm printer, and the upper edge of the initial image does not exceed the upper edge of the effective printing area of the first pass. In the case that the swing arm printer completes the printing of the image by one pass, the printing range of the swing arm printer can be regarded as the effective printing area of one pass; in the case that the swing arm printer needs to step the paper and complete the printing of the image by multiple passes, the printing range of the swing arm printer can be regarded as the area formed by the longitudinal splicing of the effective printing areas of multiple passes.

[0122] Step S303: performing color matching and color separation processing on the scaled initial image to obtain a color-separated image.

[0123] In the embodiments of the present disclosure, the color matching of the scaled initial image includes accurately controlling the color of the image printing output by using an ICC profile, to ensure that the printing result matches the color seen on the display. The ICC profile is the core of color management, which helps to ensure the consistency of color between different devices and media. The above color matching also includes adjusting the color balance (cyan, magenta, yellow), as well as brightness, density and contrast settings, to optimize the light and dark contrast of the printing output. Color separation processing refers to decomposing the image after color matching into different color channels, so as to use different inks to reproduce the colors of the image in the color printing process. The color separation processing is CMY color separation processing or CMYK color separation processing: in color printing, CMY color separation refers to decomposing the image into three color channels of cyan (Cyan), magenta (Magenta) and yellow (Yellow). Each channel represents the ink distribution of the corresponding color in the image. CMYK color separation is an additional black (Key) channel based on CMY, which is used to create richer dark tones and black details. In CMYK color separation, the image is decomposed into four color channels of cyan, magenta, yellow and black. The image after the above processing is determined as a color-separated image.

[0124] Step S304: performing halftone processing on the color-separated image to obtain a to-be-printed image.

[0125] In the embodiments of the present disclosure, the halftone processing is a technology applied in the printing field, which uses a small amount of colors to simulate the effect of a continuous tone image (such as a gray scale image and a color image), quantizes it into a color image with only a few colors or a binary image, and the visual effect at a certain distance is similar to the original image. The image after halftone processing is determined as the to-be-printed image.

[0126] Step S305: based on the effective printing area of each brush of the swing arm printer, the to-be-printed image is split to obtain at least one cut image, and the target image is any cut image in the at least one cut image.

[0127] Figure 6 Fig. 1 is a schematic diagram of splitting a to-be-printed image according to an exemplary embodiment. As shown in Fig. 1, in order to realize the printing of the to-be-printed image with as few brush times as possible, when the to-be-printed image is split, the two top points of the upper end of the rectangular to-be-printed image are aligned with the upper edge of the effective printing area of the first brush, so as to reduce the number of cut images as much as possible and reduce the brush times. Figure 6

[0128] Based on the above, in the embodiments of the present disclosure, the initial image is converted into the to-be-printed image required by the printer through scaling, color matching, color separation and halftone processing; and the printing order of each sub-image when the swing arm printer prints the to-be-printed image is determined through splitting the to-be-printed image based on the effective printing area of each brush of the swing arm printer.

[0129] In an optional embodiment, when the to-be-printed image is split into a plurality of cut images, the above method further comprises:

[0130] Step S401: based on the image number of the cut image to which the pixel point belongs, the second encoding information corresponding to the pixel point is determined, and the second encoding information indicates the brush time corresponding to the pixel point.

[0131] In the embodiments of the present disclosure, the order of the cut image corresponds to the brush time when the cut image is printed, and the content printed by each brush of the swing arm printer can be determined according to the second encoding information corresponding to the pixel point.

[0132] Step S402: based on the first encoding information and the second encoding information, the pixel point is encoded to obtain a pixel matrix, and the pixel matrix indicates the printing data when the swing arm printer prints the to-be-printed image.

[0133] ​In the embodiment of the present disclosure, the pixel points are encoded based on the first encoding information and the second encoding information. The pixel points with the same first encoding information can be encoded into a pixel sequence, the pixel sequence including pixel values of the pixel points and the second encoding information corresponding to the pixel points, and the pixel sequences are arranged into a pixel matrix in ascending order of the first encoding information. When printing the image to be printed, the pixel sequence with the smallest first encoding information is first determined as the data to be printed. During the swing of the swing arm, the real-time state of the swing arm printer is obtained by detecting the swing direction of the swing arm and the real-time position of the plurality of nozzles in the nozzle head. The real-time state is matched with the second encoding information corresponding to the pixel points in the data to be printed. The pixel value corresponding to the matched pixel point is determined as the data to be sprayed, the pigment in the ink cartridge is supplied to make the pixel value sprayed on the paper. After the completion of one brush, the next pixel sequence is determined as the data to be printed, and the above process is repeated until the image to be printed is printed.

[0134] Based on the above, in the embodiment of the present disclosure, the second encoding information corresponding to the pixel points is determined by determining the image number of the cut image to which the pixel points belong, and the pixel points are encoded based on the first encoding information and the second encoding information. Each pixel point of the image to be printed can be arranged into a pixel matrix required in the printing mode of reciprocating swing inkjet, so that the swing arm printer can print the image to be printed more conveniently.

[0135] Figure 7 is a block diagram of an image data encoding device according to an exemplary embodiment. Referring to Figure 7 The device includes a first acquisition module 701, a second acquisition module 702, a matching module 703, a jet sequence information determination module 704, and an encoding module 705, wherein

[0136] The first acquisition module 701 is configured to acquire jet position information corresponding to each jet drop point of the swing arm printer, and the nozzle head of the swing arm printer swings inkjet with one end of the swing arm as the pivot;

[0137] The second acquisition module 702 is configured to acquire pixel position information corresponding to each pixel point in the target image;

[0138] The matching module 703 is configured to match the jet drop point and the pixel point based on the jet position information and the pixel position information, and obtain a target jet drop point matched with the pixel point;

[0139] The jet sequence information determination module 704 is configured to determine jet sequence information corresponding to the target jet drop point;

[0140] The encoding module 705 is configured to determine first encoding information corresponding to the pixel point based on the jet sequence information, and the first encoding information indicates a printing sequence corresponding to the pixel point when the swing arm printer prints the target image.

[0141] In an optional embodiment, the inkjet sequence information comprises inkjet position information corresponding to the inkjet drop, swing direction information, and nozzle sequence number, and the swing direction information represents the swing direction of the swing arm when the target inkjet drop is ejected in the reciprocating swing inkjet process.

[0142] In an optional embodiment, the inkjet sequence information determination module 704 comprises:

[0143] The sequence arrangement unit is configured to arrange the target inkjet drop in sequence based on the swing characteristics of the swing arm, the relative positions of the plurality of nozzles in the inkjet head, and the position of the target inkjet drop in the swing area of the swing arm, to obtain the inkjet sequence information corresponding to the target inkjet drop.

[0144] In an optional embodiment, the first acquisition module 701 comprises:

[0145] The first acquisition unit is configured to acquire the swing amplitude angle of the swing arm, the target inkjet frequency, and the first distance and the second distance corresponding to the target nozzle, the target inkjet frequency being the total number of inkjet times of the swing arm in one swing range, the target nozzle being the nozzle corresponding to the inkjet drop, the first distance being the distance between the vertical projection position of the target nozzle on the swing arm line associated with the inkjet drop and the fixed end position of the swing arm, and the second distance being the distance between the target nozzle and the vertical projection position.

[0146] The first calculation unit is configured to calculate a target angle based on the swing amplitude angle, the target inkjet frequency, and the inkjet frequency corresponding to the inkjet drop, the target angle being the angle between the swing arm line associated with the inkjet drop and the X-axis of the target coordinate system, and the target coordinate system taking the position of the rotating shaft as the origin and taking the middle line of the swing amplitude angle as the Y-axis.

[0147] The second calculation unit is configured to calculate the inkjet position information of the inkjet drop in the target coordinate system based on the target angle, the first distance, and the second distance.

[0148] In an optional embodiment, the second acquisition module 702 comprises:

[0149] The pixel position information determination unit is configured to place the target image in a target region in the target coordinate system, and determine the pixel position information of each pixel point in the target image in the target coordinate system, the target region being the region in which the effective printing region of each brush of the swing arm printer is located in the target coordinate system.

[0150] In an optional embodiment, the device further comprises:

[0151] The third acquisition module is configured to acquire an initial image.

[0152] a scaling module, configured to perform scaling processing on the initial image, so that the initial image falls within a printing range of the swing arm printer;

[0153] a color processing module, configured to perform color matching and color separation processing on the scaled initial image, to obtain a color-separated image;

[0154] a halftone processing module, configured to perform halftone processing on the color-separated image, to obtain a to-be-printed image;

[0155] a cutting module, configured to perform cutting processing on the to-be-printed image based on an effective printing area of each brush of the swing arm printer, to obtain at least one cut image, the target image being any one of the at least one cut image.

[0156] In an optional embodiment, the apparatus further includes:

[0157] a brush pass determination module, configured to determine, based on an image number of a cut image to which the pixel point belongs, second encoding information corresponding to the pixel point, the second encoding information indicating a brush pass corresponding to the pixel point;

[0158] a pixel matrix determination module, configured to perform encoding processing on the pixel point based on the first encoding information and the second encoding information, to obtain a pixel matrix, the pixel matrix indicating printing data when the swing arm printer prints the to-be-printed image.

[0159] In an optional embodiment, the matching module 703 includes:

[0160] a third calculation unit, configured to calculate distances from the ink ejection positions to the pixel points according to the ink ejection position information and the pixel position information;

[0161] a candidate pixel point determination unit, configured to determine, as respective candidate pixel points corresponding to the ink ejection positions, pixel points closest to the ink ejection positions and meeting a preset printing accuracy;

[0162] a first matching unit, configured to, in a case where all the candidate pixel points are different pixel points, determine the ink ejection positions corresponding to the pixel points as target ink ejection positions;

[0163] a second matching unit, configured to, in a case where there are repeated pixel points among the candidate pixel points, determine, as ink ejection positions matched with the repeated pixel points, ink ejection positions closest to the repeated pixel points, and perform de-duplication processing on the candidate pixel points, and determine, as target ink ejection positions, ink ejection positions corresponding to the de-duplicated candidate pixel points.

[0164] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware such as a processing circuit or a memory, or a combination thereof. Similarly, one processor or multiple processors or memories can be used to implement one or more modules or units. In addition, each module or unit can be a part of an integral module or unit that includes the functions of the module or unit.

[0165] In an example embodiment, an electronic device is also provided, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the image data encoding method as in the embodiments of the present disclosure.

[0166] Figure 8 is a block diagram of an electronic device for image data encoding according to an example embodiment. The electronic device can be a terminal, and its internal structure diagram can be as shown in Figure 8 The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected by a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The network interface of the electronic device is used to communicate with external terminals through network connection. The computer program is executed by the processor to implement an image data encoding method. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen. The input device of the electronic device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad provided on the shell of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0167] Those skilled in the art can understand that Figure 8 the structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the electronic device to which the scheme of the present disclosure is applied. The specific electronic device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0168] In an example embodiment, a storage medium is also provided, when the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the image data encoding method in the embodiments of the present disclosure.

[0169] In an example embodiment, a computer program product containing instructions which, when the program is executed by a computer, causes the computer to carry out the image data encoding method in the embodiments of the present disclosure is also provided.

[0170] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer readable storage medium. When the computer program is executed, it can include the processes of the above-mentioned embodiments of each method. Any reference to memory, storage, databases, or other media in the embodiments provided by the present disclosure can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synch link) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0171] Other embodiments of the present disclosure will be apparent to those skilled in the art with the consideration of the specification and practice of the disclosed application. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure following the general principles thereof and including such departures from the present disclosure that come within known, accepted, and customary practice in the art to which the present disclosure pertains. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the present disclosure are indicated by the claims.

[0172] It should be understood that the present disclosure is not limited to the precise structures as herein described and illustrated in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the claims.

Claims

1. A method for encoding image data, characterized in that: The method comprises: Obtaining a swing amplitude angle, a target number of ink jets, and a first distance and a second distance corresponding to a target nozzle of a swing arm printer, wherein the nozzle of the swing arm printer swings back and forth with one end of the swing arm as a rotating axis to jet ink, the swing amplitude angle is the printing range angle during the swinging of the swing arm, the target number of ink jets is the total number of ink jets of the swing arm within one swinging range, the target nozzle is the nozzle corresponding to the ink jet landing point, the first distance is the distance between the vertical projection position of the target nozzle on the swing arm line associated with the ink jet landing point and the fixed end position of the swing arm, the swing arm line is the straight line where the swing arm is located when the target nozzle jets the ink jet landing point, and the second distance is the distance between the target nozzle and the vertical projection position; Calculating a target angle based on the swing amplitude angle, the target number of ink jets, and the number of ink jets corresponding to the ink jet landing point, wherein the target angle is the angle between the swing arm line associated with the ink jet landing point and the X-axis of a target coordinate system, wherein the target coordinate system has the position of the rotating shaft as the origin and the midline of the swing amplitude angle as the Y-axis; Calculating the abscissa and ordinate of the inkjet landing point in the target coordinate system according to the target angle, the first distance, and the second distance; and determining the abscissa and ordinate as inkjet position information of the inkjet landing point; Obtain pixel position information corresponding to each pixel point in the target image; Based on the inkjet position information and the pixel position information, matching processing is performed on the inkjet landing point and the pixel point to obtain a target inkjet landing point that matches the pixel point; Determining inkjet sequence information corresponding to the target inkjet landing point; Based on the inkjet sequence information, first coding information corresponding to the pixel points is determined, where the first coding information indicates a printing sequence corresponding to the pixel points when the swing-arm printer prints the target image.

2. The method according to claim 1, wherein: The inkjet sequence information includes inkjet position information, swing direction information and nozzle serial number corresponding to the inkjet landing point, and the swing direction information represents the swing direction corresponding to when the swing arm sprays the target inkjet landing point during the reciprocating swing inkjet process.

3. The method according to claim 1 or 2, characterized in that The determining of inkjet sequence information corresponding to the target inkjet landing point includes: Based on the swing characteristics of the swing arm, the relative positions of multiple nozzles in the nozzle and the position of the target inkjet landing point within the swing area of ​​the swing arm, the target inkjet landing points are sequenced to obtain inkjet sequence information corresponding to the target inkjet landing points.

4. The method according to claim 1, wherein The step of obtaining pixel position information corresponding to each pixel point in the target image includes: The target image is placed in the target area under the target coordinate system, and the pixel position information of each pixel point in the target image under the target coordinate system is determined. The target area is the area where the effective printing area of ​​each brush of the swing arm printer is located under the target coordinate system.

5. The method according to claim 1 or 4, characterized in that Before obtaining pixel position information corresponding to each pixel point in the target image, the method further includes: Get the initial image; performing scaling processing on the initial image so that the initial image falls within the printing range of the swing arm printer; Performing color matching and color separation processing on the scaled initial image to obtain a color separation image; Performing halftone processing on the color separation image to obtain an image to be printed; Based on the effective printing area of ​​each brush of the swing arm printer, the image to be printed is segmented to obtain at least one segmented image, and the target image is any segmented image in the at least one segmented image.

6. The method according to claim 5, characterized in that The method further comprises: Determining second coding information corresponding to the pixel point based on an image number of the cut image to which the pixel point belongs, where the second coding information indicates a refresh order corresponding to the pixel point; Based on the first coding information and the second coding information, the pixel points are coded to obtain a pixel matrix, and the pixel matrix indicates printing data when the swing-arm printer prints the image to be printed.

7. The method according to claim 1, characterized in that The matching process of the inkjet landing point and the pixel point based on the inkjet position information and the pixel position information to obtain a target inkjet landing point that matches the pixel point includes: Calculating the distance from each inkjet landing point to each pixel point based on the inkjet position information and the pixel position information; Determine the pixel point closest to each inkjet landing point and meeting the preset printing accuracy as the candidate pixel point corresponding to each inkjet landing point; In the case where each of the candidate pixel points is a different pixel point, determining the inkjet landing point corresponding to the pixel point as the target inkjet landing point; When there are repeated pixels among the candidate pixel points, the inkjet landing point closest to the repeated pixel point is determined as the inkjet landing point that matches the repeated pixel point, and the candidate pixel points are deduplicated, and the inkjet landing point corresponding to the deduplicated candidate pixel point is determined as the target inkjet landing point.

8. An image data encoding device, characterized in that: The device comprises: a first acquisition unit, configured to acquire a swing amplitude angle of a swing arm of a swing arm printer, a target number of ink jets, and a first distance and a second distance corresponding to a target nozzle, wherein the nozzle of the swing arm printer swings back and forth with one end of the swing arm as a rotating axis to jet ink, the swing amplitude angle being the printing range angle during the swinging of the swing arm, the target number of ink jets being the total number of ink jets of the swing arm within one swinging range, the target nozzle being the nozzle corresponding to the ink jet landing point, the first distance being the distance between the vertical projection position of the target nozzle on the swing arm line associated with the ink jet landing point and the fixed end position of the swing arm, the swing arm line being the straight line on which the swing arm is located when the target nozzle jets the ink jet landing point, and the second distance being the distance between the target nozzle and the vertical projection position; a first calculation unit, configured to calculate a target angle based on the swing amplitude angle, the target number of ink jets, and the number of ink jets corresponding to the ink jet landing point, wherein the target angle is the angle between the swing arm line associated with the ink jet landing point and the X-axis of a target coordinate system, wherein the target coordinate system has the position of the rotating shaft as the origin and the midline of the swing amplitude angle as the Y-axis; a second calculation unit, configured to calculate the abscissa and ordinate of the inkjet landing point in the target coordinate system according to the target angle, the first distance, and the second distance; and determine the abscissa and ordinate as inkjet position information of the inkjet landing point; The second acquisition module is used to obtain pixel position information corresponding to each pixel point in the target image; a matching module, configured to perform matching processing on the inkjet landing point and the pixel point based on the inkjet position information and the pixel position information, so as to obtain a target inkjet landing point that matches the pixel point; An inkjet sequence information determination module, configured to determine inkjet sequence information corresponding to the target inkjet landing point; The encoding module is used to determine the first encoding information corresponding to the pixel point based on the inkjet sequence information, and the first encoding information indicates the printing sequence corresponding to the pixel point when the swing arm printer prints the target image.

9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used for executing the instructions to implement the image data encoding method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the image data encoding method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Ink jet printer that carries out printing with strut moving along arc

    US6336756B1