CN-121998878-A - Distortion correction method for ink-jet printing of disc objects
Abstract
The invention discloses a distortion correction method for ink-jet printing of disc objects, wherein a printing spray head is arranged above the objects, the objects are arranged below the spray head, ink drops are downwards sprayed on the upper surface of the objects by spray head spray holes, in the printing process, the objects perform uniform rotation motion around a rotation central axis of the objects, a target image to be printed is required to be subjected to distortion correction algorithm processing before the spray head ink-jet printing, first, endpoint coordinates of a deformed image after the distortion correction algorithm processing are obtained, then pixel points in an external rectangular boundary frame where the endpoint coordinates are located are traversed, whether the pixel points are in the deformed image range is judged, if the pixel points are in the deformed image range, the color values of the pixel points are obtained through interpolation algorithm, and if the pixel points are not in the deformed image range, the color values are set to be background color or white. The distortion correction method provided by the invention is applied to image printing on the surface of the rotating disc or ring, can ensure the spray painting effect and expands the application field of ink-jet printing.
Inventors
- ZHANG ZHENGYU
- WANG CHUNRUI
- Huo Shunxi
- NI JIMEI
Assignees
- 北京美科艺数码科技发展有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20251231
Claims (10)
- 1. A distortion correction method for ink-jet printing of disc objects includes setting print nozzle above object to be printed, setting the nozzle stationary, setting the object to be printed under the nozzle, spraying ink drop on upper surface of the object to be printed by nozzle hole downward, carrying out uniform rotation motion around self rotation central axis on object to be printed in printing course, carrying out distortion correction algorithm treatment on target image to be printed before ink-jet printing by nozzle, obtaining end point coordinates of deformed image after distortion correction algorithm treatment, traversing pixel point in external rectangular boundary frame where said end point coordinates are located, judging whether each pixel point is in deformed image range, obtaining color value of the pixel point by interpolation algorithm if it is not in deformed image range, setting color value to background color or white.
- 2. The distortion correcting method of claim 1, wherein after the distortion correcting algorithm, an adjustment algorithm is further required for the color of the pixel points in the distorted image, thereby correcting the darkening or lightening of the color due to the distortion of the image.
- 3. The distortion correction method as set forth in claim 1, wherein the target image to be printed is a rectangular image, and the image processed by the distortion correction algorithm is an inverted fan.
- 4. The distortion correction method of claim 3, wherein the distortion correction algorithm comprises defining a coordinate system and coordinate points, wherein coordinates of an upper left corner of a circular circumscribed square of the object to be printed are defined as an origin coordinate (0, 0), a radius of the circular disk is defined as R, coordinates of an upper left corner of the target rectangle to be printed are defined as (x, y), coordinates of a circle center O of the circular disk are defined as (O_x, O_y), widths of the target rectangle to be printed are W, heights are H, a distance from a circle center O to a lower side of the rectangle is R1, a distance from a circle center O to an upper side of the rectangle is R2, coordinates of an inverted circle center O2 after the distortion correction algorithm is defined as (O2 x, O2 y), a circle center angle is defined as θ, an arc length (long arc length) corresponding to a bottom edge after the distortion correction algorithm is processed is L2, an arc length (short arc length) corresponding to a top edge is L1, an arc length corresponding to a half at a height position of the rectangle, namely, an arc length corresponding to a half is L_half, a radius corresponding to a circle center is R_half, a distance from a lower side of the rectangle is R_half, and an upper left side of the inverted circle center O2 is defined as an external coordinate (B_x_1, and a right side of the inverted circle center is 2).
- 5. The distortion correction method as set forth in claim 4, wherein the specific calculation process of the end coordinates of the deformed image includes a first step of calculating a distance r2, r2=r1+h from the center O to the upper edge of the rectangle, a second step of calculating a radius rjhalf corresponding to the inverted fan after the processing of the rectangular distortion correction algorithm at a half height position, rjhalf=r1+ (r2—r1)/2= (r1+r2)/2, a third step of calculating a center angle θ of the inverted fan after the processing of the distortion correction algorithm, knowing θ=l/R, and having w=l_half, so that θ=l_half=w/rhalf, a fourth step of calculating an arc length (short arc length) L1 corresponding to the top edge of the inverted fan after the processing of the distortion correction algorithm, l1=θxr1, a fifth step of calculating an arc length (long length) L2=θx2+θx, and a third step of calculating an arc length (Y2 x 2) corresponding to the bottom edge of the inverted fan after the processing of the distortion correction algorithm, and calculating a center angle θ=r2+r2_x=2 x, and a third step of the arc coordinate corresponding to the top edge of the inverted fan after the processing of the distortion correction algorithm is calculated as the same as the center o=l=l/2/r_h, and the center o=x 2 x2 x_h, and the center o_h is equal to the calculated at the center o_2 x (Y2 x and x2 x, and Y2 x is equal to the maximum value, i.e., y), an eighth step of calculating the upper left-hand corner coordinates (b_x1, b_y1) and the lower right-hand corner coordinates (b_x2, b_y2) of the circumscribed rectangular bounding box of the inverted fan shape after the distortion correction algorithm process, the upper left-hand corner abscissa b_x1=o2_x-r1×cos (θ2) =o_x-r1×cos (θ2), the upper left-hand corner ordinate b_y1=o2_y+r1×sin (θ2), the lower right-hand corner abscissa b_x2=o_x+r2×cos (θ2), and the lower right-hand corner ordinate b_y2=b_y1+ [ r1-r1×sin (θ2) +h ].
- 6. The distortion correction method of claim 5, wherein all pixels within the rectangular bounding box are circumscribed and color values thereof are sequentially calculated. The specific method is that assuming that the coordinates of a certain pixel point are (nx, ny), traversing all rows in the range of the circumscribed rectangle boundary frame by using a circulation traversing mode, enabling ny to sequentially increment from B_y1 to B_y2, enabling the inner layer to circularly traverse all columns in the range of the circumscribed rectangle boundary frame, enabling nx to sequentially increment from B_x1 to B_x2, sequentially obtaining coordinates (nx, ny) of all pixel points, and judging whether each pixel point (nx, ny) is in an inverted sector range after the distortion correction algorithm processing.
- 7. The distortion correcting method according to claim 6, wherein the condition for judging whether each pixel (nx, ny) is within the inverted fan-shaped range after the distortion correcting algorithm is processed includes two, a first, a calculation for judging whether a distance D from the pixel (nx, ny) to a center O2 is equal to or greater than R1 and equal to or less than R2, and a second, a calculation for judging whether a center angle θx formed by the pixel (nx, ny) and the center O2 is equal to or greater than 0 and equal to or less than θ, and if the two conditions are satisfied, the pixel (nx, ny) is within the inverted fan-shaped range after the distortion correcting algorithm is processed.
- 8. The distortion correction method as set forth in claim 7, wherein the distance D = [ (o2_x-nx) 2 +(O2_y-ny) 2 ] 1/2 from the pixel point (nx, ny) to the center O2, the center angle θx=arctan [ fabs (nx-o2_x)/fabs (ny-o2_y) ] x 2 formed by the pixel point (nx, ny) and the center O2, wherein fabs is an absolute value of the floating point number.
- 9. The distortion correction method of claim 7, wherein an interpolation algorithm is performed on the X-direction of the pixel points in the inverted fan-shaped range processed by the distortion correction algorithm to determine the color values of the points.
- 10. The distortion correction method as set forth in claim 4, wherein the calculation formula of the adjustment algorithm for the Color of the pixel point in the deformed image is that Lx is any one arc of a sector, rx is a radius corresponding to the arc, colorRate _Lx is a Color adjustment ratio of the arc, colorRate _Lx=R1/Rx, and then Color values are adjusted to color_x=color_X× ColorRate _Lx, where color_X is a Color value on the original target image to be printed.
Description
Distortion correction method for ink-jet printing of disc objects Technical Field The invention relates to a distortion correction method for inkjet printing of a disc-like object, in particular to a distortion correction method for inkjet printing of the surface of a disc or a ring-like object rotating around the rotation center of the disc or the ring-like object. Background At present, the ink-jet printing technology is widely applied to various industries, more and more personalized articles are sequentially abandoned in the traditional oil printing or transfer printing mode, and the ink-jet printing mode is adopted to spray the pictures and texts, so that the ink-jet printing of variable data can be met, the customization requirement can be met, and the ink-jet printing technology is efficient and environment-friendly. For the surface of a disc-shaped or disc-like object to be printed, such as the surface of an optical disc or a vehicle tyre, the ink jet printing mode can be adopted to spray the text, the disc-shaped object to be printed needs to be horizontally placed and controlled to rotate around the central axis of the disc-shaped object to be printed during printing, a spray head is arranged above the object to be printed, the spray head is fixed during ink jet printing, the lower object to be printed rotates around the central axis of the spray head at a constant speed, and ink drops are sprayed to the surface of the object to be printed through spray orifices of the spray head to form the text, so that the required printing operation is completed. Because the object to be printed is in autorotation, and ink drops are directly ejected downwards from the spray holes, mismatching exists between linear motion of the ink drops and a curve path of the rotating surface of the object to be printed, radial lines on a planar image to be printed can be bent on the surface of the disc, uniform angular intervals can be compressed or stretched according to radial distance of a circle center, so that graph distortion is caused, and the sprayed graph and text are distorted, so that an ideal expected spraying effect cannot be achieved. Based on the above situation, when performing inkjet printing on the surface of a rotating object such as a disk or a ring, it is necessary to add an algorithm for correcting distortion to ensure the effect of inkjet graphics. Disclosure of Invention The invention aims to overcome the technical problems and provide a method for correcting pattern distortion generated during ink-jet printing on the surface of a disc-type or ring-type rotating object. The technical problem is solved by the following technical scheme that the distortion correction method for the ink-jet printing of the disc-type object is provided, a printing nozzle is arranged above the object to be printed, the nozzle is fixed, the object to be printed is arranged below the nozzle, ink drops are downwards sprayed on the upper surface of the object to be printed through nozzle orifices, and in the printing process, the object to be printed performs uniform rotation motion around a rotation central shaft of the object to be printed. In the above distortion correction method, after the distortion correction algorithm is processed, an adjustment algorithm is further required to be performed on the color of the pixel point in the deformed image, so as to correct the color darkening or lightening caused by the deformation of the image. In the distortion correction method, the target image to be printed is a rectangular image, and the image processed by the distortion correction algorithm is an inverted fan. In the distortion correction method, the distortion correction algorithm comprises defining a coordinate system and coordinate points, wherein the coordinate of the upper left corner of the circular circumscribed square of the object to be printed is defined as an origin coordinate (0, 0), the radius of the circular disc is defined as R, the coordinate of the upper left corner of the target rectangle to be printed is defined as (x, y), the coordinate of the circle center O of the circular disc is defined as (O_x, O_y), the width of the target rectangle to be printed is W, the height is H, the distance from the circle center O to the lower side of the rectangle is R1, the distance from the circle center O to the upper side of the rectangle is R2, after the distortion correction algorithm, the coordinate of the inverted fan-shaped circle center O2 after the distortion correction algorithm is defined as (O2 x, O2 y), the circle center angle is defined as θ, the arc length (long arc length) corresponding to the bottom edge after the distortion correction algorithm is processed is L2, the arc length (short arc length) corresponding to the top edge is L1, the corresponding radius is R_half at the half height position of the rectangle, namely the arc length corresponding to the position of the H/2 is the position, the corre