Printing method and device for identification card and medium

By expansing the pixel out-of-pixel processing of the image to be printed by the certificate card, generating the target image and printing in full coverage, the problem of the rounded corners of the certificate card is not fully covered, and the printing quality and credibility of the certificate card are improved.

CN120215849APending Publication Date: 2025-06-27TAI LI DE SHI DA YIN JI JIANG MEN YOU XIAN GONG SI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510124106.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-26
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

During the printing process of card printing, due to wear of mechanical components, slight errors in the control system and slight deformation of the printing material, problems may not be completely covered by the picture at a rounded corner of the card, which affects the aesthetics and the seriousness and credibility of identity authentication.

Method used

By obtaining the pixel coordinates of each rounded arc edge in the image to be printed, performing pixel out-expanding processing, generating the target printed image, and printing it fully overwrite on the card, ensuring that the image completely covers the rounded area.

Benefits of technology

It realizes that while maintaining the original state of the printed image, the image is accurately covered in the rounded corner area of ​​the certificate card, solving the problem of rounded corner blanks and improving the printing quality and credibility of the certificate card.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120215849A_ABST
    Figure CN120215849A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a printing method and device for an identification card and a medium, and the identification card comprises a plurality of first fillet arc edges; the method comprises the steps that a to-be-printed image to be printed to the card in a full coverage mode is acquired, and the to-be-printed image comprises a plurality of second fillet arc edges corresponding to the first fillet arc edges; obtaining the pixel coordinate of each pixel point in each second fillet arc edge; based on the pixel coordinates, performing pixel external expansion processing on each corresponding second fillet arc edge to obtain a target printing image; and printing the target printing image to the card in a full-coverage manner, so as to accurately and completely cover the printing image in the card while maintaining the original state of the printing image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of printing technology, and in particular to a printing method, device and medium for a card. Background Art

[0002] In the daily life of modern society, card-type credentials are widely used in various fields as important carriers of identity authentication and information recording. These credentials, such as identity cards, bank cards, social security cards, etc., generally adopt a rounded rectangular appearance design to improve ease of use and aesthetics. In the process of making cards, a key link is to print the designed rounded corner images on a blank card without any pre-printed content on the surface. Through advanced printing technology and mechanical and motion control systems, the image content can be printed on the surface of the card, including its rounded corners.

[0003] However, despite the continuous advancement of technology, it is still difficult for the industry to achieve complete accuracy in terms of mechanical and motion control accuracy due to factors such as wear of mechanical parts, accumulation of small errors in the control system, and possible small deformation of the printing material itself. Therefore, in actual applications, card printers from various manufacturers still have a small probability of small errors in printing position and angle, resulting in a problem that a certain rounded corner of the card may not be completely covered by the image after printing. This problem not only affects the aesthetics of the card, but also reduces its seriousness and credibility as a certificate for identity authentication and information recording to a certain extent. At present, the solution adopted by the industry to deal with this technical problem is mostly to enlarge the image. The enlarged image effectively covers the card, solving the problem of blank space in the rounded corners of the card, but the enlarged image has problems such as content deformation and color value change, which affects the printing effect. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to provide a printing method, device and medium for ID cards, aiming to maintain the original state of the printed image while accurately covering the printed image completely in the ID card.

[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application provides a printing method for a card, wherein the card includes a plurality of first rounded arc edges; the method includes:

[0006] Acquire an image to be printed to be fully covered and printed on the card, wherein the image to be printed includes a plurality of second rounded arc edges corresponding to the plurality of first rounded arc edges;

[0007] Obtain pixel coordinates of each pixel point in each of the second rounded arc edges;

[0008] Based on the pixel coordinates, perform pixel expansion processing on each of the corresponding second rounded arc edges to obtain a target printed image;

[0009] Print the target printed image completely covering the ID card.

[0010] According to the printing method for ID cards provided by the present application, it has at least the following beneficial effects: It can solve the problem that in the prior art, when printing an ID card, there may be a situation where a certain rounded corner is not completely covered by the picture, resulting in a blank area at the rounded corner, and achieves the purpose of accurately covering the printed image completely on the ID card while maintaining the original state of the printed image.

[0011] In a possible implementation manner, the obtaining of the pixel coordinates of each pixel point in each of the second rounded arc edges includes:

[0012] Determine the center of each of the second rounded arc edges;

[0013] Obtain the pixel coordinates of each pixel point in each of the second rounded arc edges relative to the center of the circle.

[0014] In a possible implementation manner, the determining of the center of each of the second rounded arc edges includes:

[0015] Determine the reference point of each of the second rounded arc edges according to the edge of the image to be printed;

[0016] For each of the second rounded arc edges, determine the distance from the reference point along the edge to the second rounded arc edge;

[0017] For each of the second rounded arc edges, determine the radius of the second rounded arc edge according to the distance;

[0018] Determine the center of each of the second rounded arc edges according to the radius of each of the second rounded arc edges.

[0019] In a possible implementation manner, the edge of the image to be printed includes a horizontal edge and a vertical edge, and the distance includes a first distance along the horizontal edge and a second distance along the vertical edge;

[0020] The for each of the second rounded arc edges, determining the radius of the second rounded arc edge according to the distance includes one of the following:

[0021] Select any one of the first distance and the second distance and determine it as the radius of the second rounded arc edge;

[0022] Determine the average distance according to the first distance and the second distance, and determine the average distance as the radius of the second rounded arc edge.

[0023] In a possible implementation manner, the pixel extrapolation processing is performed on each corresponding second rounded corner arc edge based on the pixel coordinates to obtain a target printed image, including:

[0024] For each pixel point in the second rounded corner arc edge, at least one adjacent pixel point of each pixel point inside the image to be printed is determined according to the corresponding pixel coordinates;

[0025] For each pixel point, the corresponding at least one adjacent pixel point is copied and pasted into the external area of the image to be printed to obtain a target printed image, where the external area is adjacent to the pixel point.

[0026] In a possible implementation manner, the edge of the image to be printed includes a horizontal edge and a vertical edge;

[0027] For each pixel point in the second rounded corner arc edge, determining at least one adjacent pixel point of each pixel point inside the image to be printed according to the corresponding pixel coordinates includes:

[0028] Based on the pixel coordinates of each pixel point in the second rounded corner arc edge, the second rounded corner arc edge is divided into a first sub-rounded corner arc edge, a second sub-rounded corner arc edge, and a third sub-rounded corner arc edge;

[0029] For each pixel point in the first sub-rounded corner arc edge, at least one corresponding adjacent pixel point is determined inside the image to be printed along the extension direction of the horizontal edge;

[0030] For each pixel point in the second sub-rounded corner arc edge, corresponding adjacent pixel points are determined inside the image to be printed along the extension direction of the horizontal edge and the extension direction of the vertical edge respectively;

[0031] For each pixel point in the third sub-rounded corner arc edge, at least one corresponding adjacent pixel point is determined inside the image to be printed along the extension direction of the vertical edge.

[0032] In a possible implementation manner, based on the pixel coordinates of each pixel point in the second rounded corner arc edge, dividing the second rounded corner arc edge into a first sub-rounded corner arc edge, a second sub-rounded corner arc edge, and a third sub-rounded corner arc edge includes:

[0033] Obtain a first angle range, a second angle range, and a third angle range with the center of the second rounded corner arc edge as the origin;

[0034] For each pixel point in the second rounded corner arc edge, a target angle formed by the pixel point and the origin is calculated according to the corresponding pixel coordinates;

[0035] According to the target angle corresponding to each pixel point, and the first angle range, the second angle range, and the third angle range, the second rounded corner arc edge is divided into a first sub-rounded corner arc edge, a second sub-rounded corner arc edge, and a third sub-rounded corner arc edge.

[0036] In a possible implementation manner, the step of dividing the second rounded corner arc edge into a first sub-rounded corner arc edge, a second sub-rounded corner arc edge, and a third sub-rounded corner arc edge according to the target angle corresponding to each pixel point, and the first angle range, the second angle range, and the third angle range includes:

[0037] Determine a first set of pixel points according to the pixel points corresponding to the target angles within the first angle range;

[0038] Determine a second set of pixel points according to the pixel points corresponding to the target angles within the second angle range;

[0039] Determine a third set of pixel points according to the pixel points corresponding to the target angles within the third angle range;

[0040] According to the positions of all the pixel points in the first set of pixel points on the second rounded corner arc edge, the positions of all the pixel points in the second set of pixel points on the second rounded corner arc edge, and the positions of all the pixel points in the third set of pixel points on the second rounded corner arc edge, the second rounded corner arc edge is divided into a first sub-rounded corner arc edge, a second sub-rounded corner arc edge, and a third sub-rounded corner arc edge.

[0041] In a second aspect, a printer is provided. The printer includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the printing method for the identity card as described in any possible implementation manner in the first aspect is implemented.

[0042] The printer provided according to the present application has at least the following beneficial effects: It can solve the problem that in the prior art, when printing an identity card, there may be a situation where a certain rounded corner is not completely covered by a picture, resulting in a blank space at the rounded corner, and achieves the purpose of accurately covering the printed image completely on the identity card while maintaining the original state of the printed image.

[0043] In a third aspect, a computer-readable storage medium is provided. The storage medium stores a computer program, and when the computer program is executed by a processor, it implements the printing method for a security card as described in any possible implementation manner in the first aspect.

[0044] The computer-readable storage medium provided by the present application has at least the following beneficial effects: It can solve the problem that in the prior art, when printing a security card, there may be a situation where a certain rounded corner is not completely covered by a picture, resulting in a blank space at the rounded corner. It realizes the purpose of accurately covering the printed image completely on the security card while maintaining the original state of the printed image.

[0045] As can be seen from the technical solutions provided by one or more embodiments of the present specification above, for the printing method for a security card provided by the embodiments of the present application, the security card includes a plurality of first rounded corner arcs. By obtaining a to-be-printed image to be fully covered and printed on the security card, where the to-be-printed image includes a plurality of second rounded corner arcs corresponding to the plurality of first rounded corner arcs, obtaining the pixel coordinates of each pixel point in each second rounded corner arc, and based on the pixel coordinates, performing pixel expansion processing on each corresponding second rounded corner arc to obtain a target printed image, and finally fully covering and printing the target printed image on the security card, it solves the problem that in the prior art, when printing a security card, there may be a situation where a certain rounded corner is not completely covered by a picture, resulting in a blank space at the rounded corner. It realizes the purpose of accurately covering the printed image completely on the security card while maintaining the original state of the printed image, improves the printing quality of the security card, and reduces printing errors.

[0046] Other features and advantages of the present application will be described in the following specification, and, in part, will be obvious from the specification, or will be understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures specifically pointed out in the specification, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in one or more embodiments of the present specification or the prior art, the following will briefly introduce the drawings required for describing one or more embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present specification. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0048] Figure 1 is a flowchart of the printing method for a security card provided by an embodiment of the present application;

[0049] Figure 2 is a schematic diagram of the position of each pixel point in the second rounded corner arc provided by an embodiment of the present application;

[0050] Figure 3 It is a schematic diagram of the method for obtaining the second rounded corner arc edge radius provided by the embodiment of the present application;

[0051] Figure 4 It is a comparison schematic diagram before and after pixel outer expansion processing of the second rounded corner arc edge provided by the embodiment of the present application;

[0052] Figure 5 It is a structural block diagram of a printer provided by the embodiment of the present application. Detailed implementation manners

[0053] In order to enable those skilled in the art of this technology to better understand the technical solutions in this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the accompanying drawings in one or more embodiments of this specification. Obviously, the described one or more embodiments are only a part of the embodiments of this specification, rather than all the embodiments. Based on one or more embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this document.

[0054] It should be noted that although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from the module division in the device or the order in the flowchart. Terms such as "first" and "second" in the specification, claims and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence.

[0055] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0056] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0057] In the process of making ID cards, a key step is to print the designed rounded-corner picture onto a blank card with no pre-printed content on its surface. However, in actual applications, there are still small probability cases of slight errors in the printing position and angle of ID card printers from various manufacturers, resulting in a problem that after the card is printed, there may be a corner where the picture does not completely cover it. Most of the methods adopted in the industry to address this technical problem are to enlarge the picture. The enlarged picture effectively covers the card, solving the problem of blank spaces at the rounded corners of the ID card. However, the enlarged picture has problems such as content distortion and color value change, affecting the printing effect.

[0058] Based on this, the embodiments of the present application provide a printing method, device, and medium for ID cards, which can accurately cover the printed image completely in the ID card while maintaining the original state of the printed image.

[0059] The following further elaborates on the embodiments of the present application in conjunction with the accompanying drawings.

[0060] Figure 1 is an optional flowchart of the printing method for ID cards provided by the embodiments of the present application. Figure 1 The method in

[0061] may include but is not limited to steps S100 to S400. Figure 1 shown, provides a printing method for ID cards, the ID card includes a plurality of first rounded-corner arc edges; the method includes:

[0062] S100. Obtain a to-be-printed image to be printed onto the ID card in full coverage, where the to-be-printed image includes a plurality of second rounded-corner arc edges corresponding to the plurality of first rounded-corner arc edges.

[0063] S200. Obtain the pixel coordinates of each pixel point in each second rounded-corner arc edge.

[0064] It should be noted that as Figure 2 shown, Figure 2 is a schematic diagram of the position of each pixel point in the second rounded-corner arc edge provided by the embodiments of the present application. In some embodiments, the present application obtains the pixel coordinates of each pixel point in each second rounded-corner arc edge through geometric derivation and calculation of the rounded corner. Among them, the rounded corner can be regarded as a sector. Given some parameters of the sector, other unknown parameters can be quickly solved using the formula derived from geometric derivation, improving the accuracy and efficiency of calculating the pixel coordinates of each pixel point in each second rounded-corner arc edge.

[0065] S300. Based on the pixel coordinates, perform pixel outer expansion processing on each corresponding second rounded-corner arc edge to obtain a target printed image.

[0066] It should be noted that, for each corresponding second rounded corner arc edge, performing pixel expansion processing, compared with the method of magnifying the original image, the method of performing pixel expansion processing on the rounded corner arc edge in this application does not change the position of the content of the original image, nor does it change the color value of the original image, and can enlarge the original image, avoiding problems such as the position offset of the content of the original image, the reduction of the image resolution, or the change of the color value of the content of the original image caused by magnifying the image. That is, it can solve the problem that when printing on a blank card due to objective factors such as machinery and control accuracy, there may be a blank area at a certain rounded corner where the picture does not completely cover, without changing the content of the original image.

[0067] It should also be noted that by geometrically deriving and calculating the rounded corners to obtain the pixel coordinates of each pixel point in each second rounded corner arc edge, and then based on the pixel coordinates, performing pixel expansion processing on each corresponding second rounded corner arc edge, not only ensures the accuracy of the calculation, but also significantly reduces the amount of computation, making the processing speed faster.

[0068] S400: Print the target printed image completely covering the ID card.

[0069] Through the method provided by the first aspect, it is possible to solve the problem in the prior art that when printing an ID card, there may be a situation where a certain rounded corner is not completely covered by the picture, resulting in a blank area at the rounded corner, and achieve the purpose of accurately covering the printed image completely on the ID card while maintaining the original state of the printed image.

[0070] In a possible implementation manner, the obtaining of the pixel coordinates of each pixel point in each second rounded corner arc edge includes: determining the center of each second rounded corner arc edge; obtaining the pixel coordinates of each pixel point in each second rounded corner arc edge relative to the center of the circle.

[0071] In a possible implementation manner, the determining of the center of each second rounded corner arc edge includes: determining the reference point of each second rounded corner arc edge according to the edge of the image to be printed; for each second rounded corner arc edge, determining the distance from the reference point along the edge to the second rounded corner arc edge; for each second rounded corner arc edge, determining the radius of the second rounded corner arc edge according to the distance; and determining the center of each second rounded corner arc edge according to the radius of each second rounded corner arc edge.

[0072] It should be noted that as Figure 3As shown, in some embodiments, based on the edge of the image to be printed, the reference point of each second rounded arc edge is determined, where the reference point is point A. Based on the reference point A, pixel points are traversed along the edge of the image to be printed in the horizontal direction and the vertical direction respectively until the first pixel point of the second rounded arc edge is encountered, at which point the traversal stops. Calculate the distance from the starting point of the reference point to the first pixel point of the second rounded arc edge to obtain the horizontal distance and the vertical distance, and then the radius of the second rounded arc edge can be determined. By traversing pixel points to determine the radius of the second rounded arc edge, since the position and size of each pixel point are known, the radius of the second rounded arc edge can be accurately calculated. Moreover, the method of determining the radius of the second rounded arc edge by traversing pixel points is intuitive and simple, with a low computational complexity, a relatively simple processing process, which improves the computational efficiency, reduces the processing time, and improves the work efficiency.

[0073] In some embodiments, based on the horizontal distance and the vertical distance, the radius of each second rounded arc edge is determined. Each second rounded arc edge has a horizontal radius and a vertical radius, and the intersection point of the horizontal radius and the vertical radius in each second rounded arc edge is determined as the center of each second rounded arc edge.

[0074] In a possible implementation manner, the edge of the image to be printed includes a horizontal edge and a vertical edge, the distance includes a first distance along the horizontal edge and a second distance along the vertical edge. For each second rounded arc edge, determining the radius of the second rounded arc edge according to the distance includes one of the following: selecting any one of the first distance and the second distance and determining it as the radius of the second rounded arc edge; determining the average distance according to the first distance and the second distance and determining the average distance as the radius of the second rounded arc edge.

[0075] Specifically, in some embodiments, when determining the radius of the second rounded corner arc by traversing pixel points, due to the influence of various factors, the first distance along the horizontal edge and the second distance along the vertical edge may be inconsistent. For example, in the case of low image resolution, the image resolution refers to the number of pixels per unit length in the image. A high-resolution image can provide more detailed information, while a low-resolution image may lose some details. When the image resolution is low, the pixel points may not accurately represent the edges of the graphic, resulting in errors when traversing the pixel points; there may also be a situation of pixel discretization. When the edge of the graphic does not exactly fall on the boundary of the pixel points, the measurement results may be inconsistent due to the slight differences in the pixel points. By selecting either the first distance or the second distance and determining it as the radius of the second rounded corner arc, or by determining the average distance from the first distance and the second distance and setting the average distance as the radius of the second rounded corner arc, the subsequent processing flow can be greatly simplified, eliminating the need for complex statistical analysis of multiple measurement results, saving computing resources and time, and ensuring the consistency of subsequent processing.

[0076] In a possible implementation manner, the pixel expansion processing of each corresponding second rounded corner arc based on the pixel coordinates to obtain the target printed image includes: for each pixel point in the second rounded corner arc, determining at least one adjacent pixel point of each pixel point inside the image to be printed according to the corresponding pixel coordinates; for each pixel point, copying and pasting the corresponding at least one adjacent pixel point to the external area of the image to be printed to obtain the target printed image, where the external area is adjacent to the pixel point.

[0077] Among them, it should be noted that as Figure 4 shown, Figure 4It is a comparison schematic diagram before and after pixel expansion processing is performed on the second rounded corner arc edge provided by an embodiment of the present application. Pixel expansion processing is performed on each corresponding second rounded corner arc edge. Specifically, for each pixel point in the second rounded corner arc edge, at least one adjacent pixel point of each pixel point inside the image to be printed is determined according to the corresponding pixel point coordinates. For each pixel point, the corresponding at least one adjacent pixel point is copied and pasted into the external area of the image to be printed to obtain the target printed image. Compared with the method of magnifying the original image, the method of performing pixel expansion processing on the rounded corner arc edge in the present application does not change the position of the content of the original image, nor does it change the color value of the original image, and can enlarge the original image, avoiding problems such as the position offset of the content of the original image, the reduction of the image resolution, or the change of the color value of the content of the original image caused by magnifying the image. That is, under the condition of not changing the content of the original image, it can solve the problem that when printing a blank card due to objective factors such as machinery and control accuracy, there may be a blank area at a certain rounded corner where the picture does not completely cover it.

[0078] In a possible implementation manner, the edge of the image to be printed includes a horizontal edge and a vertical edge; for each pixel point in the second rounded corner arc edge, determining at least one adjacent pixel point of each pixel point inside the image to be printed according to the corresponding pixel coordinates includes: based on the pixel coordinates of each pixel point in the second rounded corner arc edge, dividing the second rounded corner arc edge into a first sub-rounded corner arc edge, a second sub-rounded corner arc edge, and a third sub-rounded corner arc edge; for each pixel point in the first sub-rounded corner arc edge, at least one corresponding adjacent pixel point is determined inside the image to be printed along the extension direction of the horizontal edge; for each pixel point in the second sub-rounded corner arc edge, corresponding adjacent pixel points are respectively determined inside the image to be printed along the extension direction of the horizontal edge and the extension direction of the vertical edge; for each pixel point in the third sub-rounded corner arc edge, at least one corresponding adjacent pixel point is determined inside the image to be printed along the extension direction of the vertical edge.

[0079] It should be noted that as Figure 2 shown, Figure 2It is a schematic diagram of the positions of each pixel point in the second rounded arc edge provided by an embodiment of the present application. By dividing the second rounded arc edge into a first sub-rounded arc edge, a second sub-rounded arc edge, and a third sub-rounded arc edge, targeted processing can be performed on each sub-rounded arc edge. The pixel points of the first sub-rounded arc edge are arranged horizontally, that is, there are multiple adjacent pixel points with the same y-axis coordinate, and each group of adjacent pixel points with the same y-axis coordinate forms a group of pixel groups. Multiple groups of pixel groups are arranged on the x-axis to form the first sub-rounded arc edge. Based on this, for each pixel point in the first sub-rounded arc edge, at least one corresponding adjacent pixel point is determined inside the image to be printed along the extension direction of the horizontal edge; the pixel points of the second sub-rounded arc edge are arranged horizontally or vertically, that is, there may be multiple adjacent pixel points with the same y-axis coordinate, or there may be multiple adjacent pixel points with the same x-axis coordinate. Based on this, for each pixel point in the second sub-rounded arc edge, corresponding adjacent pixel points are respectively determined inside the image to be printed along the extension direction of the horizontal edge and the extension direction of the vertical edge; the pixel points of the third sub-rounded arc edge are arranged vertically, that is, there are multiple adjacent pixel points with the same x-axis coordinate, and each group of adjacent pixel points with the same x-axis coordinate forms a group of pixel groups. Multiple groups of pixel groups are arranged on the y-axis to form the third sub-rounded arc edge. Based on this, for each pixel point in the third sub-rounded arc edge, at least one corresponding adjacent pixel point is determined inside the image to be printed along the extension direction of the vertical edge. Performing partition processing according to the different characteristics of each sub-rounded arc edge helps to improve the image processing efficiency and enhance the accuracy of image processing.

[0080] In a possible implementation manner, the dividing the second rounded arc edge into a first sub-rounded arc edge, a second sub-rounded arc edge, and a third sub-rounded arc edge based on the pixel coordinates of each pixel point in the second rounded arc edge includes: obtaining a first angle range, a second angle range, and a third angle range with the center of the second rounded arc edge as the origin; for each pixel point in the second rounded arc edge, calculating a target angle formed by the pixel point and the origin according to the corresponding pixel coordinates; and dividing the second rounded arc edge into a first sub-rounded arc edge, a second sub-rounded arc edge, and a third sub-rounded arc edge according to the target angle corresponding to each pixel point, the first angle range, the second angle range, and the third angle range.

[0081] Specifically, obtaining the first angle range, the second angle range, and the third angle range with the center of the second rounded arc edge as the origin includes at least one of the following: presetting the first angle range, the second angle range, and the third angle range based on the specific characteristics of the image to be printed, and obtaining the first angle range, the second angle range, and the third angle range with the center of the second rounded arc edge as the origin; presetting the first angle range, the second angle range, and the third angle range based on actual printing requirements, and obtaining the first angle range, the second angle range, and the third angle range with the center of the second rounded arc edge as the origin; taking the center of the second rounded arc edge as the origin, dividing the image to be printed into three angle ranges on average, and obtaining the first angle range, the second angle range, and the third angle range with the center of the second rounded arc edge as the origin. In addition, it can be understood that the embodiment of the present application does not specifically limit the method for obtaining the first angle range, the second angle range, and the third angle range.

[0082] Among them, according to the target angle corresponding to each pixel point, as well as the first angle range, the second angle range, and the third angle range, the second rounded arc edge is divided into a first sub-rounded arc edge, a second sub-rounded arc edge, and a third sub-rounded arc edge. Each sub-rounded arc edge can be processed in a targeted manner, and partition processing can be performed according to the different characteristics of each sub-rounded arc edge, which helps to improve image processing efficiency and enhance image processing accuracy.

[0083] In one possible implementation, the second rounded arc edge is divided into a first sub-rounded arc edge, a second sub-rounded arc edge and a third sub-rounded arc edge according to the target angle corresponding to each pixel point, as well as the first angle range, the second angle range and the third angle range, including: determining a first pixel point set according to the pixel points corresponding to the target angle within the first angle range; determining a second pixel point set according to the pixel points corresponding to the target angle within the second angle range; determining a third pixel point set according to the pixel points corresponding to the target angle within the third angle range; dividing the second rounded arc edge into a first sub-rounded arc edge, a second sub-rounded arc edge and a third sub-rounded arc edge according to the positions of all the pixels in the first pixel point set at the second rounded arc edge, all the pixels in the second pixel point set at the second rounded arc edge and all the pixels in the third pixel point set at the second rounded arc edge.

[0084] It should be noted that, according to the pixel points corresponding to the target angles within the first angle range, a first set of pixel points is determined; according to the pixel points corresponding to the target angles within the second angle range, a second set of pixel points is determined; according to the pixel points corresponding to the target angles within the third angle range, a third set of pixel points is determined; according to the positions of all the pixel points in the first set of pixel points on the second rounded corner arc edge, the positions of all the pixel points in the second set of pixel points on the second rounded corner arc edge, and the positions of all the pixel points in the third set of pixel points on the second rounded corner arc edge, the second rounded corner arc edge is divided into a first sub-rounded corner arc edge, a second sub-rounded corner arc edge, and a third sub-rounded corner arc edge, so that targeted processing can be performed on each sub-rounded corner arc edge, and zoning processing can be carried out according to the different characteristics of each sub-rounded corner arc edge, which helps to improve the image processing efficiency and enhance the accuracy of image processing.

[0085] The embodiment of the present application also provides a printer, as Figure 5 shown, the printer 1400 includes:

[0086] One or more processors 1410;

[0087] A memory 1420, on which one or more programs are stored. When the one or more programs are executed by the one or more processors 1410, the one or more processors 1410 implement the printing method for identification cards provided in any embodiment of the present application.

[0088] The memory 1420, as a non-transitory network system, can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory 1420 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory 1420 may optionally include a memory 1420 remotely disposed relative to the processor 1410, and these remote memories 1420 can be connected to the processor 1410 through a network. Examples of the above networks include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0089] The memory 1420 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 1420 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of the present specification through software or firmware, the relevant program codes are stored in the memory 1420 and are called by the processor 1410 to execute the methods of the embodiments of the present application.

[0090] The processor 1410 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0091] In some embodiments, the printer further includes:

[0092] An input / output interface for implementing information input and output;

[0093] A communication interface for implementing communication interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.);

[0094] A bus for transmitting information between various components of the device (such as the processor 1410, the memory 1420, the input / output interface, and the communication interface);

[0095] Among them, the processor 1410, the memory 1420, the input / output interface, and the communication interface can achieve communication connections with each other inside the device through the bus.

[0096] In some embodiments, the printer can be an inkjet printer, a laser printer, a thermal printer, etc., and the embodiments of the present application do not make specific limitations on this.

[0097] An embodiment of the present application further provides a computer-readable storage medium storing computer-executable instructions, and the computer-executable instructions are used to execute the printing method for identification cards provided in any embodiment of the present application.

[0098] An embodiment of the present application further provides a computer program product, including a computer program or computer instructions. The computer program or computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer program or computer instructions from the computer-readable storage medium, and the processor executes the computer program or computer instructions, so that the computer device executes the printing method for identification cards provided in any embodiment of the present application.

[0099] The system architecture and application scenarios described in the embodiments of this application are to more clearly illustrate the technical solutions of the embodiments of this application, and do not constitute a limitation to the technical solutions provided by the embodiments of this application. Those skilled in the art will understand that with the evolution of the system architecture and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are equally applicable to similar technical problems.

[0100] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. 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 methods. Among them, any reference to a memory, storage, database, or other medium used in the embodiments provided in this application can include non-volatile and / or volatile memories. Non-volatile memories can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memories can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0101] Those of ordinary skill in the art will understand that all or some of the steps and systems disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, a communication medium typically includes computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.

[0102] The above has illustrated some embodiments of the present application with reference to the accompanying drawings, and thus does not limit the scope of the rights of the present invention. Any modifications, equivalent replacements, and improvements made by those skilled in the art without departing from the scope and essence of the present invention shall fall within the scope of the rights of the present application.

[0103] Those of ordinary skill in the art will understand that all or some of the steps, systems, and functional modules / units in the devices disclosed above can be implemented as software, firmware, hardware, and appropriate combinations thereof.

[0104] The terms "first", "second", "third", "fourth", etc. (if any) in the description of the present application and the above accompanying drawings are used to distinguish similar objects and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0105] In addition, in each embodiment of the present application, each functional unit can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0106] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant parts, reference can be made to the partial description of the method embodiment.

[0107] The specific embodiments of this specification have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order from that in the embodiments and still achieve the desired result. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0108] The preferred embodiments of the embodiments of the present application have been described above with reference to the drawings, but this does not limit the scope of the rights of the embodiments of the present application. Any modification, equivalent replacement, and improvement made by those skilled in the art without departing from the scope and essence of the embodiments of the present application shall be within the scope of the rights of the embodiments of the present application.

Claims

1. A method for printing a card, characterized in that: The card includes a plurality of first rounded edges; the method includes: Acquire an image to be printed to be fully covered and printed on the card, wherein the image to be printed includes a plurality of second rounded arc edges corresponding to the plurality of first rounded arc edges; Obtain pixel coordinates of each pixel point in each of the second rounded arc edges; Based on the pixel coordinates, performing pixel expansion processing on each corresponding second rounded arc edge to obtain a target printed image; The target printing image is printed on the card with full coverage.

2. The method according to claim 1, characterized in that The step of obtaining the pixel coordinates of each pixel point in each of the second rounded arc edges includes: Determine the center of each of the second rounded arc edges; Obtain the pixel coordinates of each pixel point in each of the second rounded arc edges relative to the center of the circle.

3. The method according to claim 2, characterized in that The step of determining the center of each of the second rounded arc edges comprises: Determining a reference point of each of the second rounded arc edges according to the edge of the image to be printed; For each of the second rounded arc edges, determining a distance from the reference point along the edge to the second rounded arc edge; For each of the second rounded arc edges, determining the radius of the second rounded arc edge according to the distance; The center of each of the second rounded arc edges is determined according to the radius of each of the second rounded arc edges.

4. The method according to claim 3, characterized in that The edge of the image to be printed comprises a transverse edge and a longitudinal edge, and the distance comprises a first distance along the transverse edge and a second distance along the longitudinal edge; For each of the second rounded arc edges, determining the radius of the second rounded arc edge according to the distance includes one of the following: Selecting any one of the first distance and the second distance as the radius of the second fillet arc edge; An average distance is determined according to the first distance and the second distance, and the average distance is determined as the radius of the second fillet arc edge.

5. The method according to claim 2, characterized in that: The step of performing pixel expansion processing on each corresponding second rounded arc edge based on the pixel coordinates to obtain a target printed image includes: For each pixel point in the second rounded arc edge, determining at least one adjacent pixel point of each pixel point inside the image to be printed according to the corresponding pixel coordinates; For each pixel point, the corresponding at least one adjacent pixel point is copied and pasted to an external area of ​​the image to be printed to obtain a target printed image, wherein the external area is adjacent to the pixel point.

6. The method according to claim 5, characterized in that The edges of the image to be printed include a transverse edge and a longitudinal edge; For each pixel point in the second rounded arc edge, determining at least one adjacent pixel point of each pixel point inside the image to be printed according to the corresponding pixel coordinates, comprises: Based on the pixel coordinates of each pixel point in the second rounded arc edge, the second rounded arc edge is divided into a first sub-rounded arc edge, a second sub-rounded arc edge and a third sub-rounded arc edge; For each pixel point located at the first sub-rounded arc edge, determining at least one corresponding adjacent pixel point inside the image to be printed along the extension direction of the transverse edge; For each pixel point located at the second sub-rounded arc edge, corresponding adjacent pixel points are determined inside the image to be printed along the extension direction of the transverse edge and the extension direction of the longitudinal edge respectively; For each pixel point located at the third sub-radius arc edge, at least one corresponding adjacent pixel point is determined inside the image to be printed along the extension direction of the longitudinal edge.

7. The method according to claim 6, characterized in that The step of dividing the second rounded arc edge into a first sub-rounded arc edge, a second sub-rounded arc edge and a third sub-rounded arc edge based on the pixel coordinates of each pixel point in the second rounded arc edge comprises: Obtain a first angle range, a second angle range, and a third angle range with the center of the second fillet arc edge as the origin; For each pixel point in the second rounded arc edge, a target angle between the pixel point and the origin is calculated according to the corresponding pixel coordinates; According to the target angle corresponding to each pixel point, and the first angle range, the second angle range, and the third angle range, the second rounded arc edge is divided into a first sub-rounded arc edge, a second sub-rounded arc edge, and a third sub-rounded arc edge.

8. The method according to claim 7, characterized in that The step of dividing the second rounded arc edge into a first sub-rounded arc edge, a second sub-rounded arc edge, and a third sub-rounded arc edge according to the target angle corresponding to each pixel point, and the first angle range, the second angle range, and the third angle range includes: Determine a first pixel point set according to the pixel points corresponding to the target angle within the first angle range; Determining a second pixel point set according to the pixel points corresponding to the target angle within the second angle range; Determining a third pixel point set according to the pixel points corresponding to the target angle within the third angle range; According to the position of all the pixels in the first pixel point set at the second rounded arc edge, the position of all the pixels in the second pixel point set at the second rounded arc edge, and the position of all the pixels in the third pixel point set at the second rounded arc edge, the second rounded arc edge is divided into a first sub-rounded arc edge, a second sub-rounded arc edge and a third sub-rounded arc edge.

9. A printer, characterized in that: include: one or more processors; A memory having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the card printing method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the method for printing a card as claimed in any one of claims 1 to 8 is implemented.