Image data coding method and device, electronic equipment and storage medium

By matching the position information of the inkjet landing point and pixel point, the target inkjet landing point and inkjet sequence information are determined, and the encoding information is generated, which solves the problem of image deformation when the nozzle movement method changes, and realizes correct image printing.

CN119728876AActive Publication Date: 2025-03-28ZHONGSHAN SANZANG ELECTRONICS TECH

Patent Information

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

AI Technical Summary

Technical Problem

When the nozzle movement method is changed, the prior art is difficult to ensure the correct printing of the image, resulting in image deformation.

Method used

By obtaining the inkjet landing position information of the swing arm printer and the pixel point position information in the target image, the matching process is performed, the target inkjet landing point is determined, and the inkjet sequence information is determined based on this, and the encoded information of the pixel point is generated to ensure the correct printing sequence.

Benefits of technology

It is possible to print images correctly when the nozzle movement method is changed, avoid image deformation and ensure printing accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728876A_ABST
    Figure CN119728876A_ABST
Patent Text Reader

Abstract

The invention relates to an image data coding method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining ink jet position information corresponding to each ink jet drop point of a swing arm type printer, and enabling a nozzle of the swing arm type printer to swing in a reciprocating manner with one end of a swing arm as a rotating shaft for ink jet; acquiring pixel position information corresponding to each pixel point in the target image; based on the ink jet position information and the pixel position information, performing matching processing on the ink jet drop point and the pixel point to obtain a target ink jet drop point matched with the pixel point; determining ink jet sequence information corresponding to the target ink jet drop point; based on the ink jet sequence information, first coding information corresponding to the pixel points is determined, and the first coding information indicates a printing sequence corresponding to the pixel points when the swing arm type printer prints the target image. According to the invention, the printing sequence corresponding to each pixel point in the printing mode of the swing arm type printer can be determined for each pixel point in the target image, so that the swing arm type printer can correctly print the target image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an image data encoding method, device, electronic equipment and storage medium. Background Art

[0002] In conventional inkjet printers, the movement trajectory of the nozzle is a straight line, that is, the nozzle moves horizontally along the horizontal axis in the printer, and prints the image to be printed on the paper line by line. In this printing mode, the pixels in the image to be printed can be directly mapped to the print data of the nozzle according to the rows and columns in the image to be printed. However, when the printing mode of the printer changes, the nozzle no longer moves horizontally along the horizontal axis in the printer to spray ink, but sprays ink in other non-linear movement modes. If the above mapping method is still used to encode the print data, the printed image will be deformed. Therefore, how to make the printer still print the correct image when the movement mode of the nozzle changes has become a technical problem that needs to be solved urgently. Summary of the invention

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

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

[0005] 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 rotating shaft to spray ink;

[0006] Obtain pixel position information corresponding to each pixel point in the target image;

[0007] Based on the inkjet position information and the pixel position information, the inkjet landing point and the pixel point are matched to obtain the target inkjet landing point that matches the pixel point;

[0008] Determine the inkjet sequence information corresponding to the target inkjet landing point;

[0009] Based on the inkjet sequence information, first coding information corresponding to the pixel points is determined, and the first coding information indicates a printing sequence corresponding to the pixel points when the swing-arm printer prints a target image.

[0010] In an optional embodiment, the inkjet sequence information includes inkjet position information corresponding to the inkjet landing point, swing direction information and nozzle serial number, and the swing direction information represents the swing direction corresponding to the swing arm when spraying the target inkjet landing point during the reciprocating swing inkjet process.

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

[0012] Based on the swing characteristics of the swing arm, the relative positions of multiple nozzles in the printhead and the positions of target inkjet landing points 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.

[0013] In an optional embodiment, obtaining inkjet position information corresponding to each inkjet landing point of the swing arm printer includes:

[0014] Obtaining the swing amplitude angle of the swing arm, the target number of inkjet times, and the first distance and the second distance corresponding to the target nozzle, wherein the target number of inkjet times is the total number of inkjet times of the swing arm within one swing range, 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, and the second distance is the distance between the target nozzle and the vertical projection position;

[0015] According to the swing amplitude angle, the target number of inkjet times and the number of inkjet times corresponding to the inkjet landing point, the target angle is calculated. The target angle is the angle between the swing arm line associated with the inkjet landing point and the X-axis of the target coordinate system. The target coordinate system takes the position of the rotating shaft as the origin and the midline of the swing amplitude angle as the Y-axis.

[0016] The inkjet position information of the inkjet landing point in the target coordinate system is calculated according to the target angle, the first distance and the second distance.

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

[0018] 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.

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

[0020] Get the initial image;

[0021] Scaling the initial image so that the initial image falls within the printing range of the swing arm printer;

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

[0023] Performing halftone processing on the color separation image to obtain an image to be printed;

[0024] 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.

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

[0026] Determine, based on the image number of the cut image to which the pixel belongs, second coding information corresponding to the pixel, where the second coding information indicates a brushing order corresponding to the pixel;

[0027] 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 the printing data when the swing-arm printer prints the image to be printed.

[0028] In an optional embodiment, 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, including:

[0029] Calculate the distance from each inkjet point to each pixel point based on the inkjet position information and the pixel position information;

[0030] 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;

[0031] 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;

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

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

[0034] The first acquisition module is used to acquire the inkjet position information corresponding to each inkjet landing point of the swing arm printer. The nozzle of the swing arm printer reciprocates and sprays ink with one end of the swing arm as a rotating shaft;

[0035] The second acquisition module is used to obtain pixel position information corresponding to each pixel point in the target image;

[0036] A matching module is used to match 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;

[0037] An inkjet sequence information determination module is used to determine the inkjet sequence information corresponding to the target inkjet landing point;

[0038] The encoding module is used to determine the first encoding information corresponding to the pixel points based on the inkjet sequence information, and the first encoding information indicates the printing sequence corresponding to the pixel points when the swing arm printer prints the target image.

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

[0040] processor;

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

[0042] The processor is used to execute instructions to implement the above-mentioned image data encoding method.

[0043] In a fourth aspect, the present invention further provides a storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the above-mentioned image data encoding method.

[0044] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.

[0045] The implementation of this disclosure has the following beneficial effects:

[0046] Obtain inkjet position information corresponding to each inkjet landing point of a swing-arm printer, where the nozzle of the swing-arm printer swings back and forth with one end of the swing arm as a rotating axis to spray ink; obtain pixel position information corresponding to each pixel point in a target image; match 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; determine the inkjet sequence information corresponding to the target inkjet landing point; determine the first coding information corresponding to the pixel point based on the inkjet sequence information, and the first coding information indicates the printing sequence corresponding to the pixel point when the swing-arm printer prints the target image.

[0047] The present invention matches the inkjet landing points of a swing-arm printer with the positions of each pixel in a target image, thereby being able to determine the target inkjet landing points corresponding to each pixel in a printing mode in which the nozzle reciprocates and jets ink around one end of a swing arm as a rotating axis; by determining the first coding information corresponding to the pixel based on the inkjet sequence information of the target inkjet landing points, it is possible to determine the printing sequence corresponding to each pixel in the target image in the printing mode of the swing-arm printer, so that the swing-arm printer can correctly print out the target image.

[0048] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present application or the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure, and do not constitute an improper limitation of the present disclosure.

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

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

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

[0053] Figure 4 is a schematic diagram showing the positional relationship between an inkjet landing point and an origin of the coordinate system in a target coordinate system according to an exemplary embodiment;

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

[0055] Figure 6 is a schematic diagram showing a method of segmenting an image to be printed according to an exemplary embodiment;

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

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

[0058] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[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 numerals in the drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise indicated. The word "exemplary" is used specifically herein to mean "serving as an example, embodiment, or illustrative". Any embodiment described herein as "exemplary" is not necessarily to be construed as being superior or better than other embodiments.

[0061] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent 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 specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

[0063] See also Figure 1 , Figure 1 is a schematic diagram of an application environment according to an exemplary embodiment. Figure 1 As shown, the application environment may include a server 01 and a terminal 02 .

[0064] In an optional embodiment, the server 01 can be used for computing and processing the image data encoding method. Specifically, the server 01 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

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

[0066] For example, the inkjet position information corresponding to each inkjet landing point of the swing-arm printer and the pixel position information corresponding to each pixel in the target image are obtained through terminal 02 and transmitted to server 01. The nozzle of the swing-arm printer swings back and forth to spray ink with one end of the swing arm as the rotating axis; the server 01 matches the inkjet landing point and the pixel point based on the inkjet position information and the pixel position information to obtain the target inkjet landing point that matches the pixel point; determines the inkjet sequence information corresponding to the target inkjet landing point; determines the first coding information corresponding to the pixel point based on the inkjet sequence information, and the first coding information indicates the printing sequence corresponding to the pixel point when the swing-arm printer prints the target image, and transmits the first coding information to terminal 02.

[0067] In addition, it should be noted that Figure 1 What is shown is only one application environment provided by the present disclosure. In actual application, other application environments may also be included.

[0068] In the embodiments of this specification, the server 01 and the terminal 02 may be directly or indirectly connected via wired or wireless communication, which is not limited in this disclosure.

[0069] Figure 2 is a flowchart of a method for encoding image data according to an exemplary embodiment. Figure 2 As shown, the image data encoding method includes the following:

[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 swing mode of the nozzle of the swing arm printer is as follows: Figure 3 As shown, the working principle of the swing arm printer is that one end of the swing arm remains in the same position during the printing process, and a rotating motor is arranged at the end. The nozzle is arranged at the other end of the swing arm, and the other end of the swing arm where the nozzle is located is the movable end. Driven by the rotating motor, the nozzle swings back and forth to realize the nozzle to swing back and forth with the swing arm with one end of the swing arm as the rotation axis and the radius from one end of the swing arm to the position of the nozzle to spray ink. The moving path of the nozzle during a reciprocating swing process is an arc. The nozzle sprays ink multiple times at equal intervals during the movement process, and the landing point of each inkjet is called the inkjet landing point.

[0072] Figure 4 is a schematic diagram showing a positional relationship between an inkjet landing point and an origin of a 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 times, and the first distance and the second distance corresponding to the target nozzle. The target number of inkjet times is the total number of inkjet times the swing arm performs within a swing range. 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, the nozzle sprays ink within this angle range; the total number of inkjet times of the swing arm in one swing range can be the total number of inkjet times of the nozzle in the process of the swing arm swinging from line b to line c, or the total number of inkjet times of the nozzle in the process of the swing arm swinging from line c to line b. The total number of inkjet times of the swing arm swinging from line b to line c is equal to the total number of inkjet times of the swing arm swinging from line c to line b, and 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, then 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, nozzle n of 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 inkjet landing point and the fixed end position of the swing arm is recorded as r, and the distance between the target nozzle and the vertical projection position is recorded as d.

[0075] Step S2012: Calculate the target angle according to the swing amplitude angle, the target number of inkjet shots and the number of inkjet shots corresponding to the inkjet landing point. The target angle is the angle between the swing arm line associated with the inkjet landing point and the X-axis of the target coordinate system. The target coordinate system takes the position of the rotating shaft as the origin and the midline of the swing amplitude angle as the Y-axis.

[0076] In the disclosed embodiment, the position of the rotating shaft is the center of the swinging arc of the swing arm. Since the X-axis and 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 inkjet landing point and the X-axis of the target coordinate system, that is, the angle between the swing arm line associated with the inkjet landing point and the horizontal line. Figure 4 As shown in FIG. 1 , assuming that the swing arm line is on the left side of the X-axis when the target nozzle sprays the inkjet drop point, and the target nozzle is on the left side of the swing arm line (other cases are similar), then according to the swing amplitude angle, the target inkjet number and the inkjet number corresponding to the inkjet drop point, the target angle can be calculated 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 number of inkjet times, and m is the number of inkjet times corresponding to the inkjet landing point.

[0079] Step S2013: Calculate the inkjet position information of the inkjet landing point in the target coordinate system according to the target angle, the first distance and the second distance.

[0080] In the embodiment of the present disclosure, the inkjet position information may be the inkjet coordinate point corresponding to the inkjet landing point in the target coordinate system. Figure 4 As shown in FIG. 1 , assuming that the swing arm line is on the left side of the X-axis when the target nozzle sprays the inkjet drop point, and the target nozzle is on the left side of the swing arm line (other cases are similar), then according to the target angle, the first distance and the second distance, the inkjet position information of the inkjet drop point in the target coordinate system can be calculated by the following equations (2) and (3):

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

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

[0083] In formula (2) and formula (3), x is the horizontal coordinate of the inkjet landing point in the target coordinate system, y is the vertical coordinate of the inkjet landing point 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 landing point in the target coordinate system are determined as the inkjet position information of the inkjet landing point in the target coordinate system.

[0085] Based on the above, it can be known that in the embodiment of the present disclosure, by placing the swing arm range of the swing arm printer in a target coordinate system with the position of its rotating shaft as the origin and the midline of its swing amplitude angle as the Y-axis, the coordinate point of the inkjet landing point of the swing arm printer in the XY coordinate system can be calculated according to the parameters that can quantify its swinging process, such as the swing amplitude angle of the swing arm, the total number of inkjet times of the swing arm within one swing range, 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, and the second distance being the distance between the target nozzle and the vertical projection position, thereby determining the inkjet position information of the inkjet landing point.

[0086] Step S202: Obtain 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 may be the pixel coordinate point corresponding to each pixel point in the target image in the above-mentioned target coordinate system.

[0088] In an optional embodiment, the pixel position information corresponding to each pixel point in the target image is obtained, including: placing the target image in a target area in a target coordinate system, and determining the pixel position information of each pixel point in the target image in the target coordinate system, the target area being the area where the effective printing area of ​​each brush of the swing-arm printer is located in the target coordinate system.

[0089] In the disclosed embodiment, the target image is a preprocessed image, and its size does not exceed the effective printing area of ​​each brush of the swing arm printer. The specific preprocessing method is detailed in steps S301-S305. When the target image is placed in the target area under the target coordinate system, the coordinate points of each pixel point in the target image under the target coordinate system can be determined according to the position of each pixel point in the target image in the target coordinate system, so as to facilitate the calculation of the distance between the inkjet coordinate point and the pixel coordinate point. The above-mentioned effective printing area for each brush is the largest possible area cut out from the fan-shaped area covered by the nozzle of each brush for the purpose of splicing. Due to the physical layout of the multiple nozzles on the nozzle, the effective printing areas of nozzles of different colors or even different odd and even numbers may not be the same. The final effective printing area of ​​each brush is the overlapping area of ​​the inkjet range of multiple nozzles.

[0090] Based on the above, it can be known 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, 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, including:

[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 disclosed embodiment, since both the inkjet position information and the pixel position information are 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 disclosed embodiment, assuming that the preset printing accuracy is that the deviation of pixel points does not exceed 0.1 mm, pixel points that are no more than 0.1 mm away from each inkjet landing point are determined as 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 disclosed embodiment, 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 pixels, the inkjet landing point closest to the repeated pixel is determined as the inkjet landing point that matches the repeated pixel, and the candidate pixels are deduplicated, and the inkjet landing point corresponding to the deduplicated candidate pixel is determined as the target inkjet landing point.

[0100] In the disclosed embodiment, if there are repeated pixels among the candidate pixels, it means that the same pixel is repeatedly printed at different positions. In this case, the repeatedly printed pixel corresponds to two or more inkjet landing points. The inkjet landing point closest to the repeated pixel among these inkjet landing points is determined as the inkjet landing point that matches the repeated pixel. The inkjet landing point is used to print this pixel, and the candidate pixels are deduplicated. The inkjet landing point corresponding to the deduplicated candidate pixel is determined as the target inkjet landing point, thereby completing the matching of each pixel with the inkjet landing point.

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

[0102] Based on the above, it can be known that in the embodiment of the present disclosure, by determining the pixel points that are closest to each inkjet landing point and meet the preset printing accuracy as the candidate pixel points corresponding to each inkjet landing point, the pixel points can be printed at the inkjet landing point closest to them to ensure the printing accuracy of the target image; by deduplicating the candidate pixel points, the inkjet landing point corresponding to the deduplicated candidate pixel points is determined as the target inkjet landing point, which can prevent the same pixel point from being printed multiple times, thereby further improving the printing accuracy of the target image.

[0103] Step S204: determining inkjet sequence information corresponding to the target inkjet landing point.

[0104] In the disclosed embodiment, the inkjet sequence information includes inkjet position information corresponding to the inkjet drop point, swing direction information, and nozzle serial number, and the swing direction information represents the swing direction corresponding to the swing arm when the swing arm jets the target inkjet drop point during the reciprocating swinging inkjet process. During the reciprocating swinging of the swing arm of the swing arm printer, when the nozzle corresponding to the nozzle serial number moves in the swing direction indicated by the swing direction information, and when it is detected that the nozzle is at the position indicated by the inkjet position information, ink is jetted, and the target inkjet drop point can be generated.

[0105] Based on the above, it can be known that in the embodiment of the present disclosure, the inkjet position information, swing direction information and nozzle serial number corresponding to the inkjet landing point included in the inkjet sequence information can lock the inkjet timing of each inkjet landing point in the printing process of the swing arm printer. When the swing arm is in the swing direction indicated by the swing direction information, the position of the nozzle corresponding to the nozzle serial number is detected, and ink is sprayed once when the position of the nozzle is the same as the position indicated by the inkjet position information, thereby generating a corresponding inkjet landing point.

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

[0107] Based on the swing characteristics of the swing arm, the relative positions of multiple nozzles in the printhead and the positions of target inkjet landing points 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.

[0108] In the disclosed embodiment, the swinging characteristics of the swing arm are 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 during the swinging of the swing arm from one side to the other side, that is, to complete the spraying of all inkjet drop points in the effective printing area of ​​one brush only by one brush. This printing mode is recorded as the first printing mode. In this printing mode, the swing arm printer can step the paper forward once after each unidirectional swing of the swing arm, and the stepping swing arm swings unidirectionally once each time. 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 during one reciprocating swing of the swing arm. This printing mode is recorded as the second printing mode. In this printing mode, the swing arm printer can step the paper forward once after each reciprocating swing of the swing arm, and the stepping swing arm swings reciprocatingly once each time. The swing characteristics of the corresponding swing arms in the above-mentioned different printing modes are different. In order to divide the printing area according to the swing characteristics of the swing arms and determine the corresponding swing directions when printing different areas, the embodiment of the present disclosure reflects the swing characteristics of the swing arms with the swing angle or swing distance within the time interval between two adjacent inkjets of the nozzle in different printing modes.

[0109] In the first printing mode, the swing direction information corresponding to each inkjet drop point within the printing range can be determined based on the position of the inkjet drop point within the swing area of ​​the swing arm. The swing direction information corresponding to the inkjet drop point within the effective printing area of ​​one brush is the same, and the swing direction information corresponding to the inkjet drop point within the effective printing area of ​​the next adjacent brush is opposite to the swing direction information corresponding to the inkjet drop point within the effective printing area of ​​the previous brush. Subsequently, the nozzle and the inkjet drop point can be matched according to the swing angle or swing distance within the time interval of two adjacent inkjet operations of the nozzle in the first printing mode and the relative positions of multiple nozzles in the nozzle to obtain the nozzle serial number corresponding to the inkjet drop point. Finally, the inkjet position information, swing direction information and nozzle serial number of each inkjet drop point are integrated to obtain the inkjet sequence information corresponding to the target inkjet drop point.

[0110] In the second printing mode, an inkjet point in an effective printing area corresponds to two types of swing direction information. To determine the swing direction information of each inkjet point in an effective printing area, an effective printing area can be divided according to the swing angle or swing distance in the time interval between two adjacent inkjet operations of the nozzle in the second printing mode, and the inkjet area when multiple swing arms swing from left to right and the inkjet area when multiple swing arms swing from right to left are obtained. The above two types of inkjet areas are arranged at intervals, and the swing direction information corresponding to the inkjet point is determined according to the inkjet area where the inkjet point is located. Subsequently, the nozzles and the inkjet points can be matched according to the relative positions of the multiple nozzles in the nozzle to obtain the nozzle serial number corresponding to the inkjet point. Finally, the inkjet position information, swing direction information and nozzle serial number of each inkjet point are integrated to obtain the inkjet sequence information corresponding to the target inkjet point.

[0111] Figure 5 is a schematic diagram showing an effective printing area of ​​each brush of a swing arm type printer according to an exemplary embodiment, Figure 5 The shaded area in the figure is the effective printing area of ​​each brush. The effective printing area of ​​each brush is located in the fan-shaped area covered by each brush nozzle. Since the height range of the image may exceed the height range covered by one brush, one brush cannot meet the requirements of the frame. The paper needs to be stepped forward after one brush is finished to print the next brush content. The swing arm of the swing arm printer swings from one side to the other side once, which can be regarded as one brush. The swing trajectory of the nozzle is an arc. In order to vertically splice the content printed by the previous brush with the content printed by the next brush, the line shape of the upper edge and the lower edge of the effective printing area of ​​each 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 disclosed embodiment, the distance that the paper steps forward once can be the distance corresponding to the height of an effective printing area, or can be 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 that the paper steps forward once is less than the distance corresponding to the height of an effective printing area, the printing of image data in an effective printing area also needs to be completed by multi-brush printing. In order to ensure the printing effect, the distance from the nozzle to the paper does not exceed 3mm.

[0113] Based on the above, it can be known that in the disclosed embodiment, 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 in the swing area of ​​the swing arm can reflect the inkjet characteristics of the swing-arm printer during the printing process. The target inkjet landing points are sequenced using the above information to obtain the inkjet sequence information of the target inkjet landing points, which can enable the swing-arm printer to accurately print the target inkjet landing points.

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

[0115] In the disclosed embodiment, according to the first coding information corresponding to the pixel point, the inkjet position where the pixel point is ejected when the swing arm printer prints the target image, as well as the swing direction of the swing arm that ejects the pixel point and the corresponding nozzle can be locked. During the reciprocating swing of the swing arm of the swing arm printer, when the nozzle corresponding to the nozzle serial number moves in the swing direction indicated by the swing direction information, ink is ejected when it is detected that the nozzle is at the position indicated by the inkjet position information, and the printing of the pixel point is completed.

[0116] Based on the above, it can be known that in the embodiment of the present disclosure, by matching the inkjet landing point of the swing-arm printer with the position of each pixel in the target image, it is possible to determine the target inkjet landing point corresponding to each pixel in the target image when the nozzle swings back and forth with one end of the swing arm as the rotating axis to jet ink; by determining the first coding information corresponding to the pixel based on the inkjet sequence information of the target inkjet landing point, it is possible to determine the printing sequence corresponding to each pixel in the target image when the swing-arm printer is printing, so that the swing-arm printer can correctly print out the target image.

[0117] In an optional embodiment, before obtaining the pixel position information corresponding to each pixel point in the target image, it is first necessary to preprocess the image received by the image encoding end to obtain the target image. Therefore, the above method further includes:

[0118] Step S301: Acquire an initial image.

[0119] In the embodiment of the present disclosure, the initial image may be obtained by receiving the initial image sent by the user end, and the initial image may be an image beautified by the user. For example, the user may crop, scale or beautify the original image to obtain the initial image, and then send the initial image to the image encoding end.

[0120] Step S302: scaling the initial image so that the initial image falls within the printing range of the swing-arm printer.

[0121] In the disclosed embodiment, since the height range of the initial image may exceed the height range covered by one brush, one brush cannot meet the frame requirement, and the paper needs to be stepped forward after one brush is finished in order to print the next brush content. The initial image falling within the printing range of the swing-arm printer can be such that the width range of the initial image is within the width range of the effective printing area of ​​each brush 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 brush. In the case where the swing-arm printer completes the printing of the image with one brush, the printing range of the swing-arm printer can be regarded as the effective printing area of ​​one brush; in the case where the swing-arm printer needs to step the paper and complete the printing of the image with multiple brushes, 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 brushes.

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

[0123] In the disclosed embodiment, color matching of the scaled initial image includes precisely controlling the color of the image printout by using an IC profile to ensure that the printout matches the color seen on the display. The IC profile is the core of color management, which helps ensure color consistency between different devices and media. The above color matching also includes adjusting the color balance (cyan, magenta, yellow), as well as brightness, concentration and contrast settings to optimize the light and dark contrast of the printout. Color separation refers to decomposing the image after color matching into different color channels so that different inks can be used to reproduce the color of the image during color printing. The color separation process is CMY color separation or CMYK color separation: In color printing, CMY color separation refers to decomposing the image into three color channels of cyan, magenta and yellow. Each channel represents the ink distribution of the corresponding color in the image. CMYK color separation adds a black (Key) channel on the basis of CMY to create richer dark tones and black details. In CMYK color separation, the image is decomposed into four color channels: cyan, magenta, yellow and black. The image after the above processing is determined as a color separation image.

[0124] Step S304: performing halftone processing on the color separation image to obtain an image to be printed.

[0125] In the disclosed embodiment, halftone processing is a technology used in the field of printing, which uses a small amount of color to simulate the effect of a continuous tone image (such as a grayscale 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 image to be printed.

[0126] Step S305: 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.

[0127] Figure 6 is a schematic diagram showing a method of segmenting an image to be printed according to an exemplary embodiment. In the embodiment of the present disclosure, Figure 6 As shown, in order to complete the printing of the image to be printed with the smallest possible number of brushes, the two vertices at the upper end of the rectangular image to be printed can be aligned with the upper edge of the effective printing area of ​​the first brush when the image to be printed is segmented, so as to minimize the number of cuts and reduce the number of brushes.

[0128] Based on the above, it can be known that in the embodiment of the present disclosure, by scaling, color matching, color separation and halftoning the initial image, the initial image can be converted into the image to be printed required by the printer; by dividing the image to be printed based on the effective printing area of ​​each brush of the swing-arm printer to obtain at least one cut image, the printing order of each sub-image can be determined when the swing-arm printer prints the image to be printed.

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

[0130] Step S401: determining second coding information corresponding to a pixel point based on the image number of the cut image to which the pixel point belongs, where the second coding information indicates a refresh number corresponding to the pixel point.

[0131] In the disclosed embodiment, the order of cutting the images corresponds to the number of times the cut images are printed, and the content printed in each print by the swing-arm printer can be determined based on the second coding information corresponding to the pixel points.

[0132] Step S402: Based on the first coding information and the second coding information, the pixel points are coded to obtain a pixel matrix, where the pixel matrix indicates the print data when the swing-arm printer prints the image to be printed.

[0133] In the disclosed embodiment, the pixel points are encoded based on the first encoding information and the second encoding information, and the pixel points with the same first encoding information can be encoded into a pixel sequence, and the pixel sequence includes the pixel value of each pixel point and the second encoding information corresponding to each pixel point, and each pixel sequence is 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 swinging process of the swing arm, the real-time state of the swing arm printer is obtained by detecting the swinging direction of the swing arm and the real-time positions of multiple nozzles in the nozzle, and the real-time state is matched with the second encoding information corresponding to each pixel point in the data to be printed, and the pixel value corresponding to the matched pixel point is determined as the data to be sprayed, and the pigment supply in the ink cartridge is controlled so that the pixel value is sprayed on the paper. After one brush is finished, 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, it can be known that in the embodiment of the present disclosure, by determining the second coding information corresponding to the pixel point according to the image number of the cut image to which the pixel point belongs, and encoding the pixel point based on the first coding information and the second coding information, the pixel points of the image to be printed can be arranged into the pixel matrix required in the reciprocating swinging inkjet printing method, 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. Figure 7 The device includes a first acquisition module 701, a second acquisition module 702, a matching module 703, an inkjet sequence information determination module 704 and an encoding module 705, wherein:

[0136] The first acquisition module 701 is used to acquire the inkjet position information corresponding to each inkjet landing point of the swing arm printer. The inkjet head of the swing arm printer swings back and forth with one end of the swing arm as a rotating axis to spray ink;

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

[0138] A matching module 703 is used to match 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;

[0139] The inkjet sequence information determination module 704 is used to determine the inkjet sequence information corresponding to the target inkjet landing point;

[0140] The encoding module 705 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.

[0141] In an optional embodiment, the inkjet sequence information includes inkjet position information corresponding to the inkjet landing point, swing direction information and nozzle serial number, and the swing direction information represents the swing direction corresponding to the swing arm when spraying the target inkjet landing point during the reciprocating swing inkjet process.

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

[0143] The sequence arrangement unit is used to sequence the target inkjet landing points based on the swing characteristics of the swing arm, the relative positions of multiple nozzles in the nozzle, and the positions of the target inkjet landing points in the swing area of ​​the swing arm to obtain inkjet sequence information corresponding to the target inkjet landing points.

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

[0145] A first acquisition unit is used to acquire a swing amplitude angle of the swing arm, a target number of ink jets, and a first distance and a second distance corresponding to a target nozzle, wherein the target number of ink jets is the total number of ink jets of the swing arm within a swing 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, and the second distance is the distance between the target nozzle and the vertical projection position;

[0146] A first calculation unit is used to calculate a target angle according to the swing amplitude angle, the target number of inkjet times and the number of inkjet times corresponding to the inkjet landing point, wherein the target angle is the angle between the swing arm line associated with the inkjet landing point and the X-axis of the target coordinate system, and the target coordinate system takes the position of the rotating shaft as the origin and the midline of the swing amplitude angle as the Y-axis;

[0147] The second calculation unit is used to calculate the inkjet position information of the inkjet landing point in the target coordinate system according to the target angle, the first distance and the second distance.

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

[0149] The pixel position information determination unit is used to place the target image in the target area under the target coordinate system and determine the pixel position information of each pixel point in the target image under the target coordinate system. The target area is the area where the effective printing area 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] A third acquisition module is used to acquire an initial image;

[0152] A scaling module, used for scaling the initial image so that the initial image falls within the printing range of the swing arm printer;

[0153] A color processing module is used to perform color matching and color separation on the scaled initial image to obtain a color separation image;

[0154] A halftone processing module is used to perform halftone processing on the color separation image to obtain an image to be printed;

[0155] The cutting module is used to cut the image to be printed based on the effective printing area of ​​each brush of the swing arm printer to obtain at least one cut image, and the target image is any cut image in the at least one cut image.

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

[0157] A brush order determination module, used to determine second coding information corresponding to a pixel point based on an image number of a cut image to which the pixel point belongs, the second coding information indicating a brush order corresponding to the pixel point;

[0158] The pixel matrix determination module is used to encode the pixel points based on the first encoding information and the second encoding information to obtain a pixel matrix, and the pixel matrix indicates the printing data when the swing arm printer prints the image to be printed.

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

[0160] A third calculation unit is used to calculate the distance from each inkjet landing point to each pixel point according to the inkjet position information and the pixel position information;

[0161] A candidate pixel point determination unit is used to 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;

[0162] A first matching unit is used to determine the inkjet landing point corresponding to the pixel point as the target inkjet landing point when all candidate pixel points are different pixel points;

[0163] The second matching unit is used to determine the inkjet landing point closest to the repeated pixel point as the inkjet landing point that matches the repeated pixel point when there are repeated pixel points among the candidate pixel points, and to deduplicate the candidate pixel points, and determine the inkjet landing point corresponding to the deduplicated candidate pixel point as the target inkjet landing point.

[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 goal, and can be implemented in whole or in part by using software, hardware such as processing circuits or memories, 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 part of an overall module or unit that includes the function of the module or unit.

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

[0166] Figure 8 is a block diagram of an electronic device for encoding image data according to an exemplary embodiment. The electronic device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The electronic device includes a processor, a memory, a network interface, a display screen and an input device connected through 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 operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an image data encoding method is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the housing of the electronic device, or an external keyboard, touchpad or mouse, etc.

[0167] Those skilled in the art will understand that Figure 8 The structure shown in the figure is merely a block diagram of a partial 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 may 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 exemplary embodiment, a storage medium is also provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the image data encoding method in the embodiment of the present disclosure.

[0169] In an exemplary embodiment, a computer program product including instructions is also provided. When the computer program product is run on a computer, the computer is enabled to execute the image data encoding method in the embodiment of the present disclosure.

[0170] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related 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 embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present disclosure may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0171] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary 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 exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for encoding image data, characterized in that: The method comprises: Obtaining inkjet position information corresponding to each inkjet landing point of a swing arm printer, wherein the inkjet head of the swing arm printer reciprocates and swings with one end of the swing arm as a rotating axis to spray ink; 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; Determine inkjet sequence information corresponding to the target inkjet landing point; Based on the inkjet sequence information, first coding information corresponding to the pixel point is determined, wherein the first coding information indicates a printing sequence corresponding to the pixel point when the swing-arm printer prints the target image.

2. The method according to claim 1, characterized in that: The inkjet sequence information includes inkjet position information, swing direction information and nozzle 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 step of determining the 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, characterized in that: The step of obtaining the inkjet position information corresponding to each inkjet landing point of the swing arm printer includes: Obtaining the swing amplitude angle of the swing arm, the target number of ink jets, and the first distance and the second distance corresponding to the target nozzle, wherein the target number of ink jets is the total number of ink jets of the swing arm within a swing 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, and the second distance is the distance between the target nozzle and the vertical projection position; Calculate a target angle according to the swing amplitude angle, the target number of inkjet times and the number of inkjet times corresponding to the inkjet landing point, wherein the target angle is the angle between the swing arm line associated with the inkjet landing point and the X-axis of the target coordinate system, wherein the target coordinate system takes the position of the rotating shaft as the origin and the midline of the swing amplitude angle as the Y-axis; The inkjet position information of the inkjet landing point in the target coordinate system is calculated according to the target angle, the first distance and the second distance.

5. The method according to claim 1, characterized in that The step of obtaining pixel position information corresponding to each pixel point in the target image includes: The target image is placed in a target area in the target coordinate system, and the pixel position information of each pixel point in the target image in 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 in the target coordinate system.

6. The method according to claim 1 or 5, characterized in that: Before obtaining the pixel position information corresponding to each pixel point in the target image, the method further includes: Get the initial image; Scaling 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.

7. The method according to claim 6, characterized in that The method further comprises: Determine, based on an image number of a cut image to which the pixel belongs, second encoding information corresponding to the pixel, where the second encoding information indicates a brush number corresponding to the pixel; 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 the printing data when the swing-arm printer prints the image to be printed.

8. 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 matching the pixel point includes: Calculating the distance from each inkjet landing point to each pixel point according to the inkjet position information and the pixel position information; Determine the pixel points that are closest to each of the inkjet landing points and meet the preset printing accuracy as candidate pixel points corresponding to each of the inkjet landing points; 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.

9. An image data encoding device, characterized in that: The device comprises: A first acquisition module is used to acquire inkjet position information corresponding to each inkjet landing point of a swing arm printer, wherein the inkjet head of the swing arm printer reciprocates and swings with one end of the swing arm as a rotating shaft to spray ink; The second acquisition module is used to obtain pixel position information corresponding to each pixel point in the target image; A matching module, used for 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; An inkjet sequence information determination module, used to determine the 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.

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

11. 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 8.

Citation Information

Patent Citations

  • Information processing apparatus, information processing method, computer program product, and image forming apparatus

    CN107531047A

  • Ink-jet printing method, device and equipment and storage medium

    CN118372572A

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

    US6336756B1

Cited By

  • Printing system

    CN119610883A

  • A printing system

    CN119610883B

  • Paper feeding and taking assembly of ink-jet printing camera

    CN121316424A

  • Non-linear inkjet method and apparatus, electronic device, and storage medium

    WO2026097615A1