METHOD AND SYSTEM FOR GENERATING JET PRINTING DATA, ELECTRONIC DEVICE, AND STORAGE MEDIUM
20240237223 ยท 2024-07-11
Assignee
Inventors
Cpc classification
G06T2207/20016
PHYSICS
H05K2203/013
ELECTRICITY
H05K2203/0121
ELECTRICITY
International classification
H05K3/00
ELECTRICITY
H05K3/12
ELECTRICITY
Abstract
A method and system for generating jet printing data, an electronic device, and a storage medium are provided. The method includes: step 1: obtaining a pad pattern, wherein the pad pattern comprises several highlighted regions; step 2: determining an image scanning angle of each of the highlighted regions in the pad pattern; step 3: scanning and filling each of the highlighted regions based on the corresponding image scanning angle, to obtain a jet printing path; and step 4: generating jet printing data based on the jet printing path. In the method for generating jet printing data of the present disclosure, only a bare PCB or a Gerber file is needed so that the jet printing data can be rapidly and accurately generated and provided to the jet printing system, thereby maximizing the speed for generating jet printing programs, increasing program quality, and operating efficiency.
Claims
1. A method for generating jet printing data, comprising: step 1: obtaining a pad pattern, wherein the pad pattern comprises several highlighted regions; step 2: determining an image scanning angle of each of the highlighted regions in the pad pattern; step 3: scanning and filling each of the highlighted regions based on the corresponding image scanning angle, to obtain a jet printing path; and step 4: generating jet printing data based on the jet printing path.
2. The method for generating jet printing data as in claim 1, wherein step 1 comprises: step 1.1: obtaining a to-be-jet-printed PCB image; step 1.2: removing screen-printing patterns from the to-be-jet-printed PCB image to obtain a first image; and step 1.3: processing the first image by using image binarization and denoising algorithms, to obtain the pad pattern comprising the highlighted regions.
3. The method for generating jet printing data as in claim 2, wherein step 1.3 comprises: step 1.31: processing the first image by using a dilation and/or erosion algorithm, to obtain a second image; and step 1.32: removing, from the second image, white spots whose minimum bounding rectangle has a size smaller than a preset size or which have an actual area smaller than a minimum threshold area, to obtain the pad pattern.
4. The method for generating jet printing data as in claim 1, wherein step 1 comprises: obtaining the pad pattern through a Gerber file.
5. The method for generating jet printing data as in claim 1, wherein step 2 comprises: step 2.1: determining whether a single highlighted region of the highlighted regions is a circle, wherein if yes, an image scanning angle of the single highlighted region is 0 degree, and if no, the single highlighted region is a polygon; and step 2.2: processing the single highlighted region based on a relationship between an initial area ratio K and a minimum initial area ratio K.sub.min if the single highlighted region is a polygon, to obtain the image scanning angle of the single highlighted region, wherein K=(S/S.sub.0)*100, S.sub.0=L.sub.0*W.sub.0, L.sub.0 is a length of the single highlighted region in a horizontal direction, W.sub.0 is a width of the single highlighted region in a vertical direction, and S is an area of the single highlighted region.
6. The method for generating jet printing data as in claim 5, wherein step 2.1 comprises: determining whether the single highlighted region is a circle, wherein if L.sub.0 is greater than or equal to W.sub.0, a length and width tolerance value is given by T=(L.sub.0?W.sub.0)/L.sub.0, and if L.sub.0 is less than W.sub.0, T=(W.sub.0?L.sub.0)/W.sub.0, and determining whether T is less than or equal to a maximum threshold T.sub.max and whether an area ratio tolerance value T.sub.1 is less than or equal to a maximum threshold T.sub.1max, wherein if T is less than or equal to T.sub.max and T.sub.1 is less than or equal to T.sub.1max, the single highlighted region is rotated by an angle n.sub.1, and if T.sub.2 is less than T.sub.max, the single highlighted region is a circle, and the image scanning angle of the single highlighted region is 0 degree, otherwise, the single highlighted region is a polygon, wherein T.sub.1=|K?(?/4)|, T.sub.2=|L.sub.1?W.sub.1|/L.sub.0, L.sub.1 is a length of the single highlighted region in a horizontal direction after being rotated by the angle n.sub.1, W.sub.1 is a width of the single highlighted region in a vertical direction after being rotated by the angle n.sub.1, and 0 degree<n.sub.1<90 degrees.
7. The method for generating jet printing data as in claim 5, wherein step 2.2 comprises: step 2.21: determining the relationship between the initial area ratio K and the minimum initial area ratio K.sub.min if the single highlighted region is a polygon, wherein if K is greater than or equal to K.sub.min, the single highlighted region is not rotated, if L.sub.0 is greater than or equal to W.sub.0 in this case, the image scanning angle of the single highlighted region is 0 degree, if L.sub.0 is less than W.sub.0, the image scanning angle of the single highlighted region is 90 degrees, and if K is less than K.sub.min, the single highlighted region is rotated according to step 2.22; step 2.22: rotating the single highlighted region by an angle n for each rotation and determining a relationship between an area ratio K.sub.1 and an minimum area ratio K.sub.1 min after the single highlighted region is rotated by the angle n for each rotation, wherein if K.sub.1 is greater than or equal to K.sub.1 min, the rotation of the single highlighted region is stopped, and magnitudes of L.sub.2 and W.sub.2 are determined; if L.sub.2 is greater than or equal to W.sub.2, the image scanning angle of the single highlighted region is a current rotation angle; if L.sub.2 is less than W.sub.2, the image scanning angle of the single highlighted region is the current rotation angle plus 90 degrees; if K.sub.1 is less than K.sub.1min, the single highlighted region continues to be rotated by the angle n; if K.sub.1 is less than K.sub.1min after rotation by the angle n for each rotation, a rotation angle corresponding to a maximum K.sub.1 is selected as the current rotation angle of the single highlighted region, and magnitudes of L.sub.2 and W.sub.2 are determined; if L.sub.2 is greater than or equal to W.sub.2, the image scanning angle of the single highlighted region is the current rotation angle; and if L.sub.2 is less than W.sub.2, the image scanning angle of the single highlighted region is the current rotation angle plus 90 degrees, wherein K.sub.1=(S/S.sub.1)*100, S1=L.sub.2*W.sub.2, L.sub.2 is a length of the single highlighted region in the horizontal direction after being rotated by the angle n for each rotation, W.sub.2 is a width of the single highlighted region in the vertical direction after being rotated by the angle n for each rotation, and 0 degree<n<90 degrees.
8. The method for generating jet printing data as in claim 1, wherein after step 2, the method further comprises: performing downscaling or upscaling processing on the highlighted regions to obtain downscaled or upscaled highlighted regions.
9. The method for generating jet printing data as in claim 8, wherein the performing downscaling or upscaling processing on the highlighted regions to obtain the downscaled or upscaled highlighted regions comprises: for each highlighted region, determining a relationship between M and 0, performing downscaling processing on the highlighted region if M is less than 0, to obtain a corresponding downscaled highlighted region, and performing upscaling processing on the highlighted region if M is greater than 0, to obtain a corresponding upscaled highlighted region, wherein M=K.sub.2*a quantity of pixels, and K.sub.2 is a positive value, a negative value, or 0.
10. A system for generating jet printing data, comprising: an obtaining module, configured to obtain a pad pattern, wherein the pad pattern comprises several highlighted regions; a scanning angle generation module, configured to determine an image scanning angle of each of the highlighted regions in the pad pattern; a jet printing path generation module, configured to scan and fill each of the highlighted regions based on the corresponding image scanning angle, to obtain a jet printing path through a scanning algorithm; and a jet printing data generation module, configured to generate jet printing data based on the jet printing path.
11. An electronic device, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; the memory is configured to store a computer program; and the processor is configured to implement the steps of the method of claim 1 during execution of the computer program.
12. A storage medium, storing a computer program, the computer program, when executed by a processor, implementing the steps of the method of claim 1.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052]
[0053]
[0054]
DETAILED DESCRIPTION
[0055] The present disclosure is further described in detail below with reference to specific embodiments, but implementations of the present disclosure are not limited thereto.
Embodiment I
[0056] Refer to
[0057] Step 1: obtaining a pad pattern, wherein the pad pattern comprises several highlighted regions, and each highlighted region is a region that needs to be printed.
[0058] For example, the pad pattern may be obtained in the following two manners, which are exemplary and not restrictive.
[0059] The first manner comprises step 1.1 to step 1.3.
[0060] Step 1.1: obtaining a to-be-jet-printed PCB image.
[0061] Specifically, a bare PCB is first fixed, then a photo of the bare PCB is captured using an industrial color camera, and then stored. The stored photo is the to-be-jet-printed PCB image.
[0062] Step 1.2: removing a screen-printing pattern from the to-be-jet-printed PCB image to obtain a first image.
[0063] Specifically, Step 1.2 may be performed according to characteristics of the to-be-jet-printed PCB image. Usually, screen-printing patterns are white, pad patterns are bright or gold, and PCBs are green, red, black, cyan, orange, etc. Therefore, in Step 1.2, the screen-printing pattern may be removed by removing white parts of the total pattern, that is, white pixels are converted into black pixels.
[0064] Step 1.3: processing the first image by using image binarization and denoising algorithms, to obtain the pad pattern comprising the several highlighted regions.
[0065] Step 1.31: processing the first image by using a dilation and/or erosion algorithm, to obtain a second image.
[0066] Specifically, since particles such as dust may gather on the PCB during photographing, and corresponding small black spots may appear on the photo. The small black spots need to be removed. In addition, the PCB may have light reflections on its surface during photographing, which may cause small white spots to appear on the photo, and therefore denoising is needed. Therefore, the small black spots or small white spots on the first image may be removed by using the dilation and/or erosion algorithm, to obtain the second image.
[0067] Step 1.32: Removing, from the second image, white spots whose minimum bounding rectangle has a size smaller than a preset size or which have an actual area smaller than a minimum threshold area, to obtain the pad pattern.
[0068] Specifically, relatively large white spots in the second image are removed. If the size of the minimum bounding rectangle of a white spot is less than the preset size, this white spot is removed (for example, when the white spot is larger than a pixel and smaller than a solder pad, it is removed). If the actual area of a white spot is less than the threshold area, this white spot is also removed. The pattern with the white spots being removed is the pad pattern. Herein, a minimum bounding rectangle is the smallest rectangle that encompasses an entire white spot. The actual area of a white spot=a quantity of pixels of the white spot*area of a single pixel.
[0069] Preferably, the preset size is 0.07 mm*0.2 mm, wherein 0.07 mm is a width, and 0.2 mm is a length.
[0070] Preferably, the minimum threshold area S.sub.threshold=0.014 mm.sup.2.
[0071] The second manner comprises obtaining the pad pattern through a Gerber file.
[0072] Step 2: determining an image scanning angle of each of the highlighted regions in the pad pattern.
[0073] Specifically, step 2 may comprise step 2.1 to step 2.2.
[0074] Step 2.1: determining whether each single highlighted region of the several highlighted regions is a circle, wherein if yes, an image scanning angle of this single highlighted region is 0 degree, and if no, this single highlighted region is a polygon.
[0075] For each single highlighted region, if L.sub.0 is greater than or equal to W.sub.0, a length and width tolerance value T=(L.sub.0?W.sub.0)/L.sub.0. If L.sub.0 is less than W.sub.0, T=(W.sub.0?L.sub.0)/W.sub.0, it is determined whether T is less than or equal to a maximum threshold T.sub.max and whether an area ratio tolerance value T.sub.1 is less than or equal to a maximum threshold T.sub.1max. If T is less than or equal to T.sub.max and T.sub.1 is less than or equal to T.sub.1max (that is, T.sub.1? T.sub.1max), the single highlighted region is rotated by an angle n.sub.1 (rotated only once). If T.sub.2 is less than T.sub.max, the single highlighted region is a circle, and the image scanning angle of the single highlighted region is 0 degree, otherwise, the single highlighted region is a polygon. T.sub.1=|K?(?/4)|, K=(S/S.sub.0)*100, S.sub.0=L.sub.0*W.sub.0, L.sub.0 is a length of the single highlighted region in a horizontal direction, W.sub.0 is a width of the single highlighted region in a vertical direction, and S is an area of the single highlighted region. The area S of the single highlighted region=a quantity of pixels of the single highlighted region *an area of a single pixel, T.sub.2=|L.sub.1?W.sub.1|/L.sub.0, L.sub.1 is a length of the single highlighted region in the horizontal direction after being rotated by the angle n.sub.1, W.sub.1 is a width of the single highlighted region in the vertical direction after being rotated by the angle n.sub.1, and 0 degree<n.sub.1<90 degrees.
[0076] Preferably, T.sub.max=1%.
[0077] Preferably, the value of T.sub.1max is in a range of 0.01 to 0.05 (including the endpoints). That is to say, a person skilled in the art may choose a value from the range of 0.01 to 0.05 as the value of the maximum threshold T.sub.1max based on practical needs.
[0078] Preferably, n.sub.1 is 45 degrees.
[0079] It should be noted that, the single highlighted region may be rotated clockwise or counterclockwise.
[0080] Step 2.2: processing the single highlighted region based on a relationship between an initial area ratio K and a minimum initial area ratio K.sub.min if the single highlighted region is a polygon, and accordingly obtaining the image scanning angle of the single highlighted region.
[0081] Step 2.21: determining the relationship between the initial area ratio K and the minimum initial area ratio K.sub.min if the single highlighted region is a polygon, wherein if K is greater than or equal to K.sub.min, the single highlighted region is not rotated, in which case, if L.sub.0 is greater than or equal to W.sub.0, the image scanning angle of the single highlighted region is 0 degree, and if L.sub.0 is less than W.sub.0, the image scanning angle of the single highlighted region is 90 degrees, wherein if K is less than K.sub.min, the single highlighted region is rotated according to step 2.22.
[0082] Preferably, K.sub.min=90.
[0083] Step 2.22: rotating the single highlighted region by an angle n for each rotation (each rotation continues based on the previous rotation) and determining a relationship between an area ratio K.sub.1 and an minimum area ratio K.sub.1min for each rotation after the single highlighted region is rotated by the angle n, wherein if K.sub.1 is greater than or equal to K.sub.1min, the rotation of the single highlighted region is stopped, and magnitudes of L.sub.2 and W.sub.2 are determined; if L.sub.2 is greater than or equal to W.sub.2, the image scanning angle of the single highlighted region is a current rotation angle; if L.sub.2 is less than W.sub.2, the image scanning angle of the single highlighted region is the current rotation angle plus 90 degrees; if K.sub.1 is less than K.sub.1min, the single highlighted region continues to be rotated by the angle n; if after each rotation by the angle n, K.sub.1 remains less than K.sub.1min (that is, K.sub.1 is still less than K.sub.1min after rotation by 0 degree to 90 degrees (excluding 0 degree and 90 degrees) in total), a rotation angle corresponding to a maximum K.sub.1 is selected as the current rotation angle of the single highlighted region, and magnitudes of L.sub.2 and W.sub.2 are determined; if L.sub.2 is greater than or equal to W.sub.2, the image scanning angle of the single highlighted region is the current rotation angle; and if L.sub.2 is less than W.sub.2, the image scanning angle of the single highlighted region is the current rotation angle plus 90 degrees, wherein K.sub.1=(S/S.sub.1)*100, S.sub.1=L.sub.2*W.sub.2, L.sub.2 is a length of the single highlighted region in a horizontal direction after being rotated by the angle n for each rotation, W.sub.2 is a width of the single highlighted region in a vertical direction after being rotated by the angle n for each rotation, and 0 degree<n<90 degrees.
[0084] Preferably, K.sub.1 min=98.
[0085] Preferably, n may be 45 degrees, 15 degrees, 30 degrees, or 60 degrees, or n may be any angle selected from the range of 0 degree to 90 degrees based on practical needs.
[0086] It should be noted that, for a person skilled in the art, the angle n for each rotation may be varied adjustable.
[0087] Step 3: performing downscaling or upscaling processing on the highlighted regions to obtain downscaled or upscaled highlighted regions.
[0088] Specifically, for each single highlighted region, a relationship between M and 0 is determined. If M is less than 0, this single highlighted region is downscaled to obtain a downscaled highlighted region, and if M is greater than 0, this single highlighted region is upscaled to obtain an upscaled highlighted region. If M is 0, this single highlighted region does not need to be downscaled or upscaled, wherein M=K.sub.2*a quantity of pixels, and K.sub.2 is a positive value, a negative value, or 0.
[0089] As an example, the number of pixels by which the single highlighted image needs to be downscaled or upscaled can be further obtained based on M=K.sub.2*the quantity of pixels. Specifically, as an example, the number of pixels of the single highlighted region is increased (when M is positive) or reduced (when M is negative) by |M| based on an image outlining algorithm, to achieve upscaling or downscaling.
[0090] Further, when the single highlighted region is a circle, if an area S of the single highlighted region is in a range of 0 square millimeters to 0.5 square millimeters, K.sub.2=5%; if the area S of the single highlighted region is in a range of 0.5 square millimeters to 1 square millimeter, K.sub.2=0%; and if the area S of the single highlighted region is in a range of 1 square millimeter to ? square millimeters, K.sub.2=?5%. When the single highlighted region is a polygon, if the area S of the single highlighted region is in a range of 0 square millimeters to 1.0 square millimeter, K.sub.2=0%; if the area S of the single highlighted region is in a range of 1.0 square millimeter to 3.6 square millimeters, K.sub.2=?5%; if the area S of the single highlighted region is in a range of 3.6 square millimeters to 7.0 square millimeters, K.sub.2=?10%; and if the area S of the single highlighted region is in a range of 7.0 square millimeters to ? square millimeters, K.sub.2=?15%.
[0091] In addition, it should be noted that, before or after the image scanning angle of each single highlighted region is determined, Mark point positions may further be specified through the highlighted regions. An order of specifying the Mark point position and a manner of specifying the Mark point position may be adjusted according to practical needs.
[0092] Moreover, as an example, a nozzle diameter may be selected based on the actual jet printing device to be used. An order of selecting the nozzle diameter may be adjusted according to practical needs.
[0093] Step 4: scanning and filling downscaled or upscaled highlighted regions, to obtain a jet printing path.
[0094] Specifically, the downscaled or upscaled highlighted regions may be scanned and filled by using a dot filling algorithm or a line filling algorithm, and then the jet printing path is obtained through a scanning algorithm. The jet printing path is represented by the obtained scan, and an order is obtained through division of grid regions.
[0095] Specifically, the manner of scanning and filling as an example may be the dot filling algorithm or the line filling algorithm. The dot filling algorithm comprises filling a dot matrix at different image scanning angles based on the selected nozzle diameter, and the line filling algorithm comprises arranging and filling lines at different image scanning angles based on the selected nozzle diameter. For example, referring to
[0096] For dot filling, the jet printing path requires coordinates of each dot, while for line filling, motion positions of the filling comprise a start position and an end position of each scanning line.
[0097] It should be noted that, when one or more highlighted regions need to be downscaled or upscaled, the downscaled or upscaled highlighted regions need to be scanned and filled, to obtain the jet printing path.
[0098] Step 5: generating jet printing data based on the jet printing path.
[0099] Specifically, data obtained through the above conversion is processed into the jet printing data. The jet printing data not only comprises the jet printing path (that is, a nozzle motion trajectory), but also comprises: Mark point positions, jetting enabling and disabling instructions (i.e., instructions to enable and disable jetting), and a jet printing diameter (that is, a nozzle diameter); instruction data received and used by the jet printing device may be directly or indirectly formed by the jet printing data.
[0100] Therefore, in the method for generating jet printing data of the present disclosure, only a bare PCB or a Gerber file is needed so that the jet printing data can be rapidly and accurately generated and provided to the jet printing system, thereby maximizing the speed for generating jet printing programs, increasing program quality, and operating efficiency.
[0101] The data finally formed in the present disclosure may be device instruction data directly used by the jet printing device. In the present disclosure, the jet printing device may be one or more of an inkjet printer, an electrohydrodynamic (EHD) jet printer, a 3D printer, and a LaserJet printer.
Embodiment II
[0102] This embodiment further provides a specific method for generating jet printing data based on the above embodiment. The method for generating jet printing data comprises the following steps:
[0103] S1: fixing a bare PCB and capture a photo of the bare PCB by using an industrial color camera.
[0104] S2: storing the photo captured by the industrial camera, wherein the stored photo is a to-be-jet-printed PCB image.
[0105] S3: obtaining a pad pattern, by: [0106] removing a screen-printing pattern from the to-be-jet-printed PCB image and then performing image binarization and denoising, to obtain highlighted regions. Specifically, S3 comprises S3.1 and S3.2.
[0107] S3.1: removing the screen-printing pattern from the to-be-jet-printed PCB image based on colors of the PCB image (exemplary colors: screen-printing pattern: white; pad: bright color; PCB: green), and removing white parts of the PCB image (for example, the white parts are converted to black).
[0108] S3.2: setting a value of bright pixels to 1, and set values of black and green pixels to 0 by using image binarization and denoising algorithms, wherein specifically, (1) is performed first, and then (2) is performed: [0109] (1) using an image processing algorithm, where small black spots (for example, particles such as dust gather on a PCB during photographing, causing black spots on the photo) are removed from the image through a dilation and/or erosion algorithm, or small white spots (for example, light reflections cause small white spots on the photo, and therefore denoising is needed) are removed. [0110] (2) setting a minimum threshold area S.sub.threshold=0.014 mm.sup.2, so that relatively large white spots are removed. If a minimum bounding rectangle of a white spot has a size smaller than 0.07 mm*0.2 mm or an actual area less than S.sub.threshold, this white spot is removed.
[0111] S4: specifying Mark point positions based on each of obtained highlighted regions, wherein the order of specifying the Mark point positions and determining the image scanning angle of each highlighted region is adjustable. For example: [0112] S4.1: selecting the Mark point positions. [0113] S4.2. determining the image scanning angle of each highlighted region.
[0114] A length L.sub.0 and a width W.sub.0 of each single highlighted region are obtained in a horizontal direction and a vertical direction, respectively, a bounding rectangle of the single highlighted region is obtained based on L.sub.0 and W.sub.0, and an area of the bounding rectangle is given by S.sub.0=L.sub.0*W.sub.0.
[0115] An area of the single highlighted region is given by S=a quantity of pixels*an area of a single pixel.
[0116] An initial area ratio is given by K=(S/S.sub.0)*100.
[0117] It is then determined whether the single highlighted region is a circle. If L.sub.0 is greater than or equal to W.sub.0, a length and width tolerance value is given by T=(L.sub.0?W.sub.0)/L.sub.0. If L.sub.0 is less than W.sub.0, T=(W.sub.0?L.sub.0)/W.sub.0. It is then determined whether T is less than or equal to 1% and whether an area ratio tolerance value T.sub.1=|K?(?/4)| is less than or equal to 0.05. If T is less than or equal to 1% and T.sub.1 is less than or equal to 0.05, the single highlighted region is rotated by a rotation angle of n.sub.1 (n.sub.1 is in a range of 0 degree to 90 degrees, excluding 0 degree and 90 degrees, preferably 45 degrees). In this case, the single highlighted region is rotated only once, to obtain a length L.sub.1 and a width W.sub.1 of the rotated single highlighted region in a horizontal direction and a vertical direction, respectively, and T.sub.2=|L.sub.1?W.sub.1|/L.sub.0. It is then determined whether T.sub.2 is less than 1%. If T.sub.2 is less than 1%, the single highlighted region is a circle, and the corresponding image scanning angle is 0 degree. Otherwise, the single highlighted region is a polygon.
[0118] If the single highlighted region is a polygon, a relationship between the initial area ratio K and 96 is determined. If K is greater than or equal to 96, the single highlighted region does not need to be rotated, and magnitudes of L.sub.0 and W.sub.0 are determined. If L.sub.0 is greater than or equal to W.sub.0, it is determined that the image scanning angle is 0 degree. If L.sub.0 is less than W.sub.0, it is determined that the image scanning angle is 90 degrees. If the initial area ratio K is less than 96, the single highlighted region starts to be rotated.
[0119] The single highlighted region is rotated to obtain a rotated single highlighted region, with a length L.sub.2 and a width W.sub.2 in the horizontal direction and the vertical direction, respectively. One bounding rectangle is obtained for each rotation the single highlighted region is rotated by a rotation angle of n, and a length and a width of this bounding rectangle correspond to the rotated single highlighted region (a range of the rotation angle n: 0 degree to 90 degrees, excluding 0 degree and 90 degrees). The rotation angle within this range is preferably 45 degrees, 15 degrees, 30 degrees, and 60 degrees. If the above angles cannot preferably satisfy an area ratio, rotation is performed based on n degrees for each rotation (the rotation angle n for each rotation is adjustable based on practical needs).
[0120] The area ratio is given by K.sub.1=(an area S of the single highlighted region/an area S.sub.1 of the bounding rectangle obtained through rotation of the single highlighted region)*100.
[0121] The area S.sub.1 of the bounding rectangle obtained through rotation of the single highlighted region=the length L.sub.2*the width W.sub.2.
[0122] It is then determined whether the area ratio K.sub.1 is greater than or equal to 99. If yes, the rotation of the single highlighted region is stopped, a current rotation angle is obtained, and magnitudes of L.sub.2 and W.sub.2 are determined, in which case, if L.sub.2 is greater than or equal to W.sub.2, the current rotation angle is the image scanning angle, and if L.sub.2 is less than W.sub.2, it is determined that the image scanning angle is the current rotation angle plus 90 degrees. If the area ratio K.sub.1 is not greater than or equal to 99, the single highlighted region continues to be rotated. If area ratios corresponding to 0 degree to 90 degrees (excluding 0 degree and 90 degrees) are all less than 99, a maximum corresponding angle of K.sub.1 is taken as the current rotation angle and the magnitudes of L.sub.2 and W.sub.2 are determined, in which case, if L.sub.2 is greater than or equal to W.sub.2, the current rotation angle is the image scanning angle, and if L.sub.2 is less than W.sub.2, it is determined that the image scanning angle is the current rotation angle plus 90 degrees.
[0123] S5: performing downscaling or upscaling processing on the highlighted regions to obtain downscaled or upscaled highlighted regions.
[0124] Shape: a circle and a polygon.
(1) Circle:
[0125] The area S of the single highlighted region is obtained, and K.sub.2 is obtained based on the area S. [0126] 1>. Range of the area S: 0-0.5 square millimeters, K.sub.2=5%. [0127] 2>. Range of the area S: 0.5-1 square millimeters, K.sub.2=0%. [0128] 3>. Range of the area S: 1-0 square millimeters, K.sub.2=?5%.
(2) Polygon:
[0129] The area S of the single highlighted region is obtained, and K.sub.2 is obtained based on the area S. [0130] 1>. Range of the area S: 0-1.0 square millimeters, K.sub.2=0%. [0131] 2>. Range of the area S: 1.0-3.6 square millimeters, K.sub.2=?5%. [0132] 3>. Range of the area S: 3.6-7.0 square millimeters, K.sub.2=?10%. [0133] 4>. Range of the area S: 7.0-? square millimeters, K.sub.2=?15%.
[0134] As an example, the number of pixels by which the single highlighted image needs to be downscaled or upscaled can be further obtained based on M=K.sub.2*the quantity of pixels. Specifically, as an example, the number of pixels of the single highlighted region is increased (when M is positive) or reduced (when M is negative) by |M| based on an image outlining algorithm, to achieve upscaling or downscaling.
[0135] S6: selecting a nozzle diameter.
[0136] S7: scanning and filling the downscaled or upscaled highlighted regions, and obtain a jet printing path through a scanning algorithm.
Scanning Algorithm:
[0137] Dot filling algorithm: filling a dot matrix at different image scanning angles based on the selected nozzle diameter.
[0138] Line filling algorithm: arranging and filling lines at different image scanning angles based on the selected nozzle diameter.
Jet Printing Path:
[0139] Motion positions: comprising a start position and an end position of each scanning line.
[0140] Dot filling: requiring coordinates of each dot.
[0141] S8: generating jet printing data, wherein data obtained through conversion in S.sub.1 to S7 is processed into the jet printing data, and the jet printing data comprises: Mark point positions, a nozzle motion trajectory, jetting enabling and disabling instructions, a jet printing diameter, and device instruction data directly formed by the jet printing data.
[0142] In addition, the pad pattern as an example may also be obtained through a Gerber file, and then S4 to S8 are performed to form the jet printing data.
Embodiment III
[0143] Referring to
[0148] The system for generating jet printing data provided, as an example, may perform the above method embodiments with similar implementation principles and technical effects.
Embodiment IV
[0149] Refer to
[0150] The memory 1103 is configured to store a computer program.
[0151] The processor 1101 is configured to implement the steps of the above method during execution of the computer program.
[0152] The processor 1101 is configured to implement the following steps during execution of the computer program.
[0153] Step 1: obtaining a pad pattern, wherein the pad pattern comprises several highlighted regions.
[0154] Step 2: determining an image scanning angle of each of the highlighted regions in the pad pattern.
[0155] Step 3: scanning and fill each of the highlighted regions based on the corresponding image scanning angle, to obtain a jet printing path.
[0156] Step 4: generating jet printing data based on the jet printing path.
[0157] The electronic device of the present disclosure may perform the above method embodiments with similar implementation principles and technical effects.
Embodiment V
[0158] This embodiment provides a computer-readable storage medium, storing a computer program. The computer program, when executed by a processor, implements the following steps.
[0159] Step 1: obtaining a pad pattern, wherein the pad pattern comprises several highlighted regions.
[0160] Step 2: determining an image scanning angle of each of the highlighted regions in the pad pattern.
[0161] Step 3: scanning and filling each of the highlighted regions based on the corresponding image scanning angle, to obtain a jet printing path.
[0162] Step 4: generating jet printing data based on the jet printing path.
[0163] The computer-readable storage medium provided as an example of the present disclosure may perform the above method embodiments with similar implementation principles and technical effects, and details are not described herein again.
[0164] A person skilled in the art should understand that the embodiments of the present disclosure may be provided as a method, an apparatus (a device), or a computer program product. Therefore, the present disclosure may be in the form of hardware-only embodiments, software-only embodiments, or embodiments combining software and hardware, which are all collectively referred to as modules or systems. Moreover, the present disclosure may be in the form of a computer program product implemented on one or more computer-readable storage media (comprising but not limited to a disk memory, a CD-ROM, an optical memory, and the like) that comprise computer-usable program code. Computer programs are stored/distributed in suitable media, are provided together with other hardware or as a part of hardware, or may be distributed in other manners, for example, through the Internet or another wired or wireless telecommunications system.
[0165] In the description of the present disclosure, it should be noted that, the terms first and second are merely used for description and are not to be construed as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, a feature limited by first or second may explicitly or implicitly comprise one or more of the features. In the descriptions of the present disclosure, the plurality of means two or more, unless otherwise definitely and specifically defined.
[0166] In the description of this specification, the description of the reference terms an embodiment, some embodiments, an example, a specific example, some examples, and the like means that specific features, structures, materials, or characteristics described in combination with the embodiment(s) or example(s) are comprised in at least one embodiment or example of the present disclosure. In this specification, schematic descriptions of the foregoing terms are not necessarily directed at the same embodiment or example. In addition, the described specific features, structures, materials, or characteristics may be combined in a proper manner in any one or more of the embodiments or examples. In addition, a person skilled in the art may integrate and combine different embodiments or examples described in this specification.
[0167] The above content is a further detailed description of the present disclosure in combination with specific preferred implementations, but it should not be considered that the specific implementation of the present disclosure is only limited to these descriptions. Various simple derivations or replacements may further be made by a person of ordinary skill in the art to which the present disclosure belongs without departing from the concept of the present disclosure, and shall fall within the scope of the present disclosure.