Segmented adjustment, splicing and positioning method and device for printing target, equipment and storage medium
By segmenting the image and obtaining positioning deviation parameters and actual position information, the problem of insufficient speed and accuracy of traditional image positioning technology in large-format image processing is solved, realizing efficient and high-precision printing target positioning and splicing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2026-03-10
AI Technical Summary
Traditional image positioning technology is insufficient in speed and accuracy when processing large-format images, resulting in low printing efficiency.
The image to be printed is divided into multiple segmented images. The positioning deviation parameters and actual positioning point location information of each segmented image are obtained. The target printed image is obtained by adjusting and stitching them together.
It improves the printing efficiency and accuracy of large-format images, enabling fast and accurate positioning and splicing.
Smart Images

Figure CN121625655A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of inkjet printing technology, and in particular to a method, apparatus, device, and storage medium for adjusting, splicing, and positioning segmented printing targets. Background Technology
[0002] In the current printing industry, with the ever-increasing demand for efficient and high-quality printing, traditional image positioning technology is somewhat insufficient in terms of processing speed and accuracy, especially when processing large-format images. These problems are particularly prominent. Traditional vision positioning systems rely on capturing preset positioning points on the paper. These positioning points serve as references for image positioning, helping the system calculate position and angle deviations, and thus guiding the printing equipment to perform precise printing. This process usually includes several basic steps: First, distortion correction is performed on the camera lens. Second, the spatial positions of the two cameras are correlated through a specially designed calibration plate to ensure that their relative positional relationship in three-dimensional space is determined. This is what is known as intrinsic parameter calibration and extrinsic parameter calibration.
[0003] However, traditional positioning algorithms are somewhat lacking in processing speed and accuracy when dealing with large-format images, especially when the image size is huge and the shooting time is long. Existing methods often start data processing only after the entire image has been captured. Data processing requires complex adjustments to the image printing effect and RIP format conversion, resulting in slow positioning speed, which seriously affects printing efficiency and leads to low production efficiency. Summary of the Invention
[0004] In view of this, the present invention provides a method, apparatus, device and storage medium for segmented adjustment and splicing positioning of printing targets, in order to solve the problems in the prior art where the image to be printed is large, the positioning time is long, and the printing efficiency is affected if the entire image is captured before data processing.
[0005] The technical solution adopted in this invention is:
[0006] In a first aspect, the present invention provides a method for adjusting, splicing, and positioning segmented printing targets, the method comprising:
[0007] The image to be printed is split into multiple segmented images according to the segmentation parameters;
[0008] Obtain the first positioning deviation parameter of the first printed segmented image among the multiple segmented images;
[0009] The initial positioning point position information of the other segmented images in the plurality of segmented images, excluding the first printed segmented image, is calculated based on the first positioning deviation parameter and the segmentation parameter.
[0010] Obtain the actual location information of each segmented image;
[0011] The segmented images are adjusted and stitched together based on the initial positioning point location information and the actual positioning point location information to obtain the target printing image.
[0012] Preferably, the step of splitting the image to be printed into multiple segmented images according to the segmentation parameters includes:
[0013] Obtain the size parameters and first segmentation parameters of the image to be printed, wherein the first segmentation parameters include the first number of segments and the coordinates of the first segmentation line;
[0014] Determine whether the first segmentation parameter matches the size parameter;
[0015] If they do not match, the second number of segments and the segmentation step size are obtained based on the size parameters, and the coordinates of the second segmentation line are calculated.
[0016] Based on the coordinates of the second dividing line, the image to be printed is split into multiple segmented images.
[0017] Preferably, obtaining the first positioning deviation parameter of the first printed segmented image among the plurality of segmented images includes:
[0018] Obtain the positioning coordinates and positioning angle of the positioning point of the first printed segmented image;
[0019] Obtain the reference coordinates and reference angles collected by the color mark sensor;
[0020] A first positioning deviation parameter is obtained based on the positioning coordinates, the positioning angle, the reference coordinates, and the reference angle, wherein the first positioning deviation parameter includes: a first deviation angle and a first deviation distance.
[0021] Preferably, the step of calculating the initial positioning point location information of the segmented images other than the first printed segmented image among the multiple segmented images based on the first positioning deviation parameter and the segmentation parameter includes:
[0022] Obtain the initial distance between the first segmented image and the other segmented images;
[0023] Based on the first deviation distance and the initial distance, calculate the deviation distance of other segmented images;
[0024] The initial position information of other segmented images is obtained based on the first deviation angle and the deviation distance of the other segmented images.
[0025] Preferably, the step of adjusting each segmented image based on the initial positioning point location information and the actual positioning point location information and then stitching them together to obtain the target printing image includes:
[0026] The target printed image is obtained by rotating each segmented image at an angle based on the initial positioning point position information and the actual positioning point position information, or by translating it along the main printing direction and / or the secondary printing direction.
[0027] Preferably, the step of adjusting and stitching together the segmented images based on the initial positioning point location information and the actual positioning point location information to obtain the target printing image further includes:
[0028] Obtain the stretching factor in the secondary printing direction;
[0029] The segmented images are pre-stretched according to the stretching coefficient, and the initial positioning point information is updated.
[0030] The target printed image is obtained by adjusting each segmented image that has undergone pre-stretching based on the updated initial positioning point location information and the actual positioning point location information.
[0031] Preferably, the step of splitting the image to be printed into multiple segmented images according to the segmentation parameters further includes:
[0032] Obtain the line thickness parameters of the initial image to be printed;
[0033] The image to be printed is obtained by adjusting the grayscale value of the region of the initial image to be printed according to the line thickness parameter.
[0034] Secondly, the present invention provides a printing target segmentation adjustment and splicing positioning device, the device comprising:
[0035] Image segmentation module: used to split the image to be printed into multiple segmented images according to segmentation parameters;
[0036] Positioning deviation parameter acquisition module: used to acquire the first positioning deviation parameter of the first printed segmented image among the multiple segmented images;
[0037] Initial position information acquisition module: used to calculate the initial positioning point position information of the other segmented images in the plurality of segmented images, excluding the first printed segmented image, based on the first positioning deviation parameter and the segmentation parameter;
[0038] Actual location information acquisition module: used to acquire the actual location information of each segmented image;
[0039] Image adjustment module: used to adjust each segmented image according to the initial positioning point position information and the actual positioning point position information, and then stitch them together to obtain the target printing image.
[0040] Thirdly, embodiments of the present invention also provide an electronic device, including: at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method of the first aspect described above.
[0041] Fourthly, embodiments of the present invention also provide a storage medium storing computer program instructions thereon, which, when executed by a processor, implement the method of the first aspect described above.
[0042] In summary, the beneficial effects of the present invention are as follows:
[0043] This invention provides a method, apparatus, device, and storage medium for segmenting, adjusting, and stitching positioning of a printed target image. First, the image to be printed is divided into multiple segmented images according to segmentation parameters. A first positioning deviation parameter is obtained for the first printed segmented image among the multiple segmented images. Initial positioning point position information for the other segmented images (excluding the first printed segmented image) is calculated based on the first positioning deviation parameter and the segmentation parameters. Actual positioning point position information for each segmented image is obtained. After adjusting each segmented image according to the initial positioning point position information and the actual positioning point position information, the images are stitched together to obtain the target printed image. The method provided by this invention enables the segmentation, positioning, and stitching of large-format printed images, which not only improves printing efficiency but also significantly increases printing accuracy. Attached Figure Description
[0044] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, and these are all within the protection scope of the present invention.
[0045] Figure 1 This is a schematic diagram illustrating the overall workflow of the printing target segment adjustment and splicing positioning method in Embodiment 1 of the present invention;
[0046] Figure 2 This is a schematic diagram of the process of obtaining multiple segmented images in Embodiment 1 of the present invention;
[0047] Figure 3 This is a flowchart illustrating the process of adjusting line thickness parameters in Embodiment 1 of the present invention;
[0048] Figure 4 This is a schematic diagram of obtaining positioning deviation parameters in Embodiment 1 of the present invention;
[0049] Figure 5This is a schematic diagram of the process for obtaining the initial positioning point location information in Embodiment 1 of the present invention.
[0050] Figure 6 This is a schematic diagram of the process for obtaining the actual location information of the positioning point in Embodiment 1 of the present invention;
[0051] Figure 7 This is a schematic diagram of the process of adjusting each segmented image in Embodiment 1 of the present invention;
[0052] Figure 8 This is a structural block diagram of the printing target segment adjustment and splicing positioning device in Embodiment 2 of the present invention;
[0053] Figure 9 This is a schematic diagram of the electronic device in Embodiment 3 of the present invention. Detailed Implementation
[0054] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. In the description of the present invention, it should be understood that the terms "center," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer," etc., indicate orientation or positional relationships based on the orientation or positional relationships shown in the accompanying drawings, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, the element defined by the phrase "comprising..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Where there is no conflict, embodiments of the present invention and the various features thereof can be combined with each other, all of which are within the scope of protection of the present invention.
[0055] Example 1
[0056] Please see Figure 1 Embodiment 1 of the present invention discloses a method for adjusting, splicing, and positioning segmented printing targets, the method comprising:
[0057] S1: Divide the image to be printed into multiple segmented images according to the segmentation parameters;
[0058] Specifically, the image to be printed is imported into the host computer software. The software checks if the image exists. If it does, it checks if the size of the image matches the printing size parameters. If it does, the image is loaded directly. Once the image is successfully loaded, the software retrieves the initial segmentation parameters that have been pre-set and saved in the host computer software. These initial segmentation parameters include the initial number of segments and the coordinates of the initial segmentation lines. The software then determines whether the pre-set and saved initial segmentation parameters match the current size of the printable image. If they match, the segmentation parameters are confirmed. If they do not match, the current size of the printable image is input, and the segmentation step size and number of segments are recalculated to obtain new segmentation line coordinates. Based on these new coordinates, a segmentation matrix is calculated and written into memory. The printable image is then segmented. This step allows for the segmentation of large-format printable images, and the segmented images are then processed, directly improving the speed of image processing.
[0059] In one embodiment, please refer to Figure 2 S1: Splitting the image to be printed into multiple segmented images according to the segmentation parameters includes:
[0060] S11: Obtain the size parameters and first segmentation parameters of the image to be printed, wherein the first segmentation parameters include the first number of segments and the coordinates of the first segmentation line;
[0061] Specifically, the printed image is imported into the host computer software. The host computer software automatically identifies and determines whether the printed image has been successfully imported. If the import is successful, it first obtains the printing size of the printed image and identifies whether the printing size conforms to the preset size specifications. For example, if the maximum size of the printing medium is 50cm*50cm, and the printed image is set to 100cm*100cm, it exceeds the maximum printing size. If it does not conform, a configuration error is prompted. If it conforms, it then obtains the first segmentation parameters that have been pre-saved in the host computer software. The first segmentation parameters include the first number of segments and the coordinates of the first segmentation line. The coordinates of the first segmentation line are calculated from the number of segments and the segmentation step size. The advantage of pre-setting and saving the segmentation parameters is that if the same size printed image is used, no further adjustment is required. The segmentation parameters are only adjusted when it is necessary to change the printed image to a different size.
[0062] S12: Determine whether the initial segmentation parameters match the size parameters;
[0063] Specifically, the first segmentation parameters include the first segmentation quantity and the first segmentation line coordinates. Assuming the current size of the printed image is w*h, and the first segmentation line coordinates do not exist in the current printed image coordinates, it is judged as a mismatch. Alternatively, since the segmentation line coordinates are calculated from the segmentation quantity and segmentation step size, a mismatch is displayed when the segmentation quantity or segmentation step size does not meet the accuracy requirements of the current size of the printed image. For example, if the current segmentation quantity is 4, but the size of the printed image is too large, considering the positioning accuracy, the current segmentation quantity is too small, resulting in each segmented image area being too large, thus leading to low positioning accuracy and failing to achieve the ideal positioning effect, thereby affecting the printing quality. When the above situation occurs, the segmentation quantity and segmentation step size are adjusted until the segmentation quantity meets the preset accuracy requirements.
[0064] S13: If they do not match, obtain the second number of segments and the segmentation step size according to the size parameters, and calculate the coordinates of the second segmentation line;
[0065] Specifically, multiple sets of positioning points are preset on the image to be printed. The positioning points are arranged according to a certain rule. When the preset first segmentation parameter does not match the size of the current image to be printed, the number of segments and the segmentation step size can be recalculated according to the size of the image to be printed and the number of positioning points in the image to be printed. The number of segments and the segmentation step size are then input into the host computer software, and the software recalculates the coordinates of the segmentation line that match the size of the current image to be printed.
[0066] S14: Based on the coordinates of the second dividing line, the image to be printed is split into multiple segmented images.
[0067] Specifically, multiple sets of positioning points are preset on the image to be printed. These positioning points are special marks pre-printed or placed on paper or other printing substrates, serving as references for positioning and alignment. These positioning points are added before the actual image content is printed. The image to be printed has positioning points at the same positions as those on the printing medium. The positions of each positioning point are arranged according to a preset pattern, with equal spacing between them. Based on the obtained dividing line coordinates, the printed image can be divided into multiple units of the same or different sizes, each unit being a different segmented image. This method allows for segmented printing of large-format printing media, solving the problem of print size limitations. The problem is addressed by improving printing precision. A pre-defined segmentation matrix rule is used. Based on the transformed coordinates of the positioning points and the segmentation lines, the segmentation matrix is automatically calculated. Multiple positioning points are grouped together; for example, there are four positioning points, all equidistant from each other. The coordinates of the segmentation lines are determined by the number of segments and the segmentation step size. Specifically, if an image to be printed is divided into four parts, and this image has 16 positioning points, then four positioning points are grouped together. The coordinates of these four positioning points are D1(1,1), D2(2,2), D3(2,1), and D(2,2). The segmentation lines then separate these four positioning points. Following the same rule, other positioning points are segmented, resulting in multiple segmented images containing the positioning points.
[0068] In one embodiment, please refer to Figure 3 S1: Before splitting the image to be printed into multiple segmented images according to the segmentation parameters, the method further includes:
[0069] S01: Obtain the line thickness parameters of the initial image to be printed;
[0070] S02:
[0071] Specifically, if printing images requiring high precision is needed, such as circuit design diagrams containing fine wires (approximately 0.1 mm wide) and wider power lines (approximately 1 mm wide), the Canny edge recognition method is first applied to identify the lines in the image and measure their width. The lines are then divided into zones based on their thickness. For fine lines (<0.5 mm), the grayscale value is increased (reducing darkness) to decrease ink droplet size, prevent ink diffusion, and maintain line clarity. For thicker lines (≥0.5 mm), the grayscale value is maintained or appropriately decreased (maintaining or increasing ink saturation) to ensure full lines. After these grayscale adjustments, ink droplets in fine line areas become smaller, reducing ink usage while maintaining line clarity, while thicker line areas maintain good saturation and continuity.
[0072] S2: Obtain the first positioning deviation parameter of the first printed segmented image among the multiple segmented images;
[0073] Specifically, from the multiple segmented images obtained above, the segmented image corresponding to the first set of positioning points, i.e., the first printed segmented image, is selected as the first segmented image. The positioning deviation data of the first segmented image is calculated, including angular deviation and coordinate deviation. Since the printing medium is a whole, if a part is offset, the overall offset will be the same. Therefore, using the first segmented image as a reference standard, the theoretical offset data of other segmented images can be obtained. Specifically, this can be achieved by obtaining an image of the region on the printing medium corresponding to the first segmented image, as the first unit image. An image recognition algorithm is used to identify the positioning points in the image and calculate the coordinates of the positioning points. Based on the relationship between the positioning points and the horizontal position, the angle of the first unit image is calculated. Finally, using the angle and position of the standard as a reference, the angle and distance of the deviation in that region can be obtained.
[0074] In one embodiment, please refer to Figure 4 S2: Obtaining the first positioning deviation parameter of the first printed segmented image among the multiple segmented images includes:
[0075] S21: Obtain the positioning coordinates and positioning angle of the positioning point of the first printed segmented image;
[0076] Specifically, the printing process involves printing the image to a preset printing position. Positioning points with the same rules as the image to be printed are pre-printed on the printing medium, with a one-to-one correspondence between the positioning points on the printing medium and the positioning points on the printed image. A preset encoder controls the camera to take pictures, with the preset encoder rule being that the interval between triggering the camera is the same as the interval between the positioning points on the printing medium. Whenever the camera moves one or more positioning points, the encoder immediately triggers the camera to capture images of different areas on the printing medium. The camera used is two cameras, and the number of cameras is not limited. The advantage of two cameras over one camera is that images of the same area can be mutually calibrated, improving the accuracy of capturing the printing positioning points. Precision: The preset encoder ensures the synchronization and stability of camera photography, enabling simultaneous image capture and output of unit data for printing. Printing speed is not limited by the length of the printing medium, improving the accuracy of image stitching and positioning. The asynchronous mechanism is suitable for segmented positioning and printing scenarios requiring rapid continuous image capture and real-time processing. It obtains the unit image on the printing medium corresponding to the segmented image of the first print, identifying the positioning coordinates and angles of the positioning points in the unit image. Specifically, the Canny algorithm can be used to identify the position coordinates of the positioning points in the image. The method for identifying the positioning points is not limited; the angle of that portion of the printing medium area is calculated with the horizontal direction, i.e., the main printing direction, as a reference.
[0077] S22: Obtain the reference coordinates and reference angles collected by the color mark sensor;
[0078] S23: A first positioning deviation parameter is obtained based on the positioning coordinates, the positioning angle, the reference coordinates, and the reference angle, wherein the first positioning deviation parameter includes: a first deviation angle and a first deviation distance.
[0079] Specifically, a color mark sensor is used to acquire the position and angle of the color mark set on the printing medium, which serve as reference coordinates and angles. This position and angle are calculated with the horizontal direction as a reference. Using the coordinates and angle of the color mark as a reference, if the printing medium does not shift, the angle of the positioning point of the printing medium is the same as the angle of the color mark, and the coordinates of the calibration point and the coordinates of the color mark maintain a fixed distance. If the printing medium shifts, the angle of the current positioning point can be compared with the coordinates and the standard position and angle of the color mark to determine the angle and distance of the deviation, i.e., the positioning deviation parameter. This method can accurately identify the shift of the printing medium, providing a data basis for further positioning adjustments.
[0080] S3: Calculate the initial positioning point position information of the other segmented images in the plurality of segmented images, excluding the first printed segmented image, based on the first positioning deviation parameter and the segmentation parameter;
[0081] Specifically, the first positioning deviation parameter refers to the deviation data of the unit on the printing medium corresponding to the first segmented image of the printing medium. This includes the first deviation angle and the first deviation distance. Since the positioning points are arranged on the printing medium according to a certain pattern, the initial distance between the segmented images before the offset can be obtained as long as the number of positioning points in each segmented image is known. Since the number of positioning points in each segmented image is the same, that is, the initial distance of each segmented image is the same, the initial position information of each segmented image can be obtained based on the first segmented image after the offset and the initial distance of each segmented image. By calculating the initial distance of each segmented image in this way, a better splicing effect can be achieved even when splicing each segmented image in the future.
[0082] In one embodiment, please refer to Figure 5 S3: Calculating the initial positioning point location information of the segmented images other than the first printed segmented image among the multiple segmented images based on the first positioning deviation parameter and the segmentation parameter includes:
[0083] S31: Obtain the initial distance between the first segmented image and other segmented images;
[0084] S32: Calculate the deviation distance of other segmented images based on the first deviation distance and the initial distance;
[0085] S33: Obtain the initial position information of other segmented images based on the first deviation angle and the deviation distance of the other segmented images.
[0086] Specifically, since each segmented image is segmented from the same image to be printed, the deviation angles of the printing areas on the printing medium corresponding to each segmented image are the same. Therefore, by calculating the deviation angle of the first segmented image, the deviation angles of the remaining segmented images can be known. The initial distance between adjacent segmented images can be calculated based on the number of positioning points in each segmented image and examples. From the deviation distance of the positioning deviation parameter of the first segmented image obtained above and the initial distance of adjacent segmented images, the deviation distance of each segmented image can be obtained, thus revealing the initial position information of each segmented image. By calculating the initial position information through the initial distance, a better stitching effect can be achieved when performing image stitching.
[0087] S4: Obtain the actual location information of each segmented image;
[0088] Specifically, a pre-set encoder is used to control the camera to move to the corresponding position to obtain an image of the corresponding area on the printing medium. An image recognition algorithm is used to identify the positioning points in the image. For example, a template method is used, and a positioning template is pre-set, such as a template with round dots or a template with cross-shaped positioning points. The positioning points are identified based on the template, and then the coordinates of the positioning points in the image are identified based on the Yo-Lo series algorithm. The obtained coordinates are the actual position information of the positioning points in the pixel coordinate system. Because the printing medium may have some deviations during the transmission process, the actual position information is different from the initial position information.
[0089] In one embodiment, please refer to Figure 6 S4: Obtaining the actual location information of each segmented image includes:
[0090] S41: Control the camera to acquire the corresponding images of each segmented image on the printing medium;
[0091] S42: Obtain the actual location information of the positioning points in the image;
[0092] Specifically, a pre-set encoder is used to control two-stage cameras to move to the corresponding positions of each segmented image to obtain images of the corresponding areas on the printing medium. An image recognition algorithm is used to identify the images of the positioning points in the image. For example, using the template method, a positioning top template is pre-set, and a template with round dots as positioning points is used to identify the round dot positioning points according to the template. Then, the coordinates of the positioning points in the image are identified according to the Yo LOV5 algorithm. The obtained coordinates are the actual position information of the positioning points in the pixel coordinate system.
[0093] S5: After adjusting each segmented image according to the initial positioning point position information and the actual positioning point position information, the images are stitched together to obtain the target printing image.
[0094] Specifically, based on each segmented image, the camera acquires the corresponding image of the positioning point region on the printing medium, calculates the angle information of the first group of positioning points in the first segmentation unit. Assuming there are four positioning points in this group, with image pixels as coordinates, the coordinates of the four points are (x1, y1), (x2, y2), (x3, y3), and (x4, y4). The four coordinates are compared with the actual theoretical coordinates of the four points, and the coordinate offset of each positioning point is calculated to obtain the position deviation information of the first group of positioning points. Based on the principle that the spacing between each group of positioning points is the same, the theoretical position of each group of positioning points is calculated. Based on the theoretical position and the positioning point image captured by the camera, the segmented printing image is calibrated. The main printing direction and the secondary printing direction in the segmented printing image are calibrated respectively. The x-axis direction is the main printing direction, and the y-axis direction is the secondary printing direction. The x-axis direction can be divided into steps according to the total number of rows adjusted, with each region shifted by 1 pixel, and the grayscale gradient processing of each row of positioning points is adjusted. The y-axis direction adopts the method of stretching the upper half of the positioning point region and shifting the lower half of the region. By using this local stretching and differential misalignment, the positioning points are re-aligned, ensuring proper printing results. The resulting target print image consists of multiple segmented print images. Each target print image is converted into a printable image format. The target print images are then printed according to the positions of the positioning points on the printing medium obtained by the camera. Once printed to the corresponding positions, they are stitched together to form a complete print image. This completes the segmented stitching and positioning printing process, resulting in a print product that meets expectations.
[0095] In one embodiment, step S5: adjusting and stitching together each segmented image according to the initial positioning point location information and the actual positioning point location information to obtain the target printing image includes:
[0096] S51: Rotate each segmented image by angle according to the initial positioning point position information and the actual positioning point position information, or translate it along the main printing direction and / or the secondary printing direction to obtain the target printing image.
[0097] Specifically, based on each segmented image, the camera acquires the corresponding image of the positioning point region on the printing medium, calculates the angle information of the first group of positioning points in the first segmentation unit. Assuming there are four positioning points in this group, with image pixels as coordinates, the coordinates of the four points are (x1, y1), (x2, y2), (x3, y3), and (x4, y4). The four coordinates are compared with the actual theoretical coordinates of the four points, and the coordinate offset of each positioning point is calculated to obtain the position deviation information of the first group of positioning points. Based on the principle that the spacing between each group of positioning points is the same, the theoretical position of each group of positioning points is calculated. Based on the theoretical position and the positioning point image captured by the camera, the segmented printing image is calibrated. The main printing direction and the secondary printing direction in the segmented printing image are calibrated respectively. The x-axis direction is the main printing direction, and the y-axis direction is the secondary printing direction. The x-axis direction can be divided into steps according to the total number of rows adjusted, with each region shifted by 1 pixel, and the grayscale gradient processing of each row of positioning points is adjusted. The y-axis direction adopts the method of stretching the upper half of the positioning point region and shifting the lower half of the region. By using this local stretching and differential misalignment to re-align the positioning points, the printing process can be completed normally.
[0098] In one embodiment, please refer to Figure 7 S5: Adjusting each segmented image according to the theoretical positioning point location information and the actual positioning point location information to obtain the target printing image further includes:
[0099] S52: Obtain the stretching factor in the secondary printing direction;
[0100] S53: Perform pre-stretching processing on each segmented image according to the stretching coefficient and update the initial positioning point position information;
[0101] S54: Adjust each segmented image that has undergone pre-stretching processing according to the updated initial positioning point position information and the actual positioning point position information to obtain the target printed image.
[0102] Specifically, the segmented image is pre-stretched according to a preset stretching coefficient in the y-direction, where the preset y-direction is the secondary printing direction. The size and coordinates of the printing image and the positioning points are adjusted to complete the adjustment of the segmented image and simultaneously adjust the new positioning point coordinates after the transformation. The x-axis is set as the primary printing direction and the y-axis as the secondary printing direction. The preset stretching coefficient of the printing image in the y-axis direction is obtained. The printing image is pre-stretched according to this stretching coefficient to improve the image quality and adapt the image to the printing scenario. After the image processing is completed, since some positions of the image have changed, the coordinates of the positioning points of the image in the system need to be synchronously transformed to obtain the transformed positioning point coordinates. Based on the updated theoretical positioning point position information and the actual positioning point position information, the pre-stretched segmented images are rotated, translated, and adjusted to obtain the target printing image.
[0103] In summary, this embodiment provides a method for segmenting, adjusting, and stitching positioning a printing target. First, the image to be printed is divided into multiple segmented images according to segmentation parameters. A first positioning deviation parameter is obtained for the first printed segmented image among the multiple segmented images. Initial positioning point information for the other segmented images (excluding the first printed segmented image) is calculated based on the first positioning deviation parameter and the segmentation parameters. Actual positioning point information for each segmented image is obtained. After adjusting each segmented image according to the initial positioning point information and the actual positioning point information, the images are stitched together to obtain the target printed image. The method provided in this embodiment enables the segmentation, positioning, and stitching of large-format printed images, which not only improves printing efficiency but also significantly increases printing accuracy.
[0104] Example 2
[0105] Please see Figure 8 Embodiment 2 of the present invention also provides a printing target segmentation adjustment and splicing positioning device 200, the device comprising:
[0106] Image segmentation module 201: used to split the image to be printed into multiple segmented images according to segmentation parameters;
[0107] Positioning deviation parameter acquisition module 202: used to acquire the first positioning deviation parameter of the first printed segmented image among the multiple segmented images;
[0108] Initial position information acquisition module 203: is used to calculate the initial positioning point position information of the other segmented images in the plurality of segmented images, excluding the first printed segmented image, based on the first positioning deviation parameter and the segmentation parameter;
[0109] Actual location information acquisition module 204: used to acquire the actual location information of each segmented image;
[0110] Image adjustment module 205: used to adjust each segmented image according to the initial positioning point position information and the actual positioning point position information, and then stitch them together to obtain the target printing image.
[0111] In summary, this embodiment provides a printing target segmentation, adjustment, splicing, and positioning device. An image segmentation module is used to split the image to be printed into multiple segmented images according to segmentation parameters. A positioning deviation parameter acquisition module is used to acquire a first positioning deviation parameter of the first printed segmented image among the multiple segmented images. An initial position information acquisition module is used to calculate the initial positioning point position information of the other segmented images (excluding the first printed segmented image) based on the first positioning deviation parameter and the segmentation parameters. An actual position information acquisition module is used to acquire the actual positioning point position information of each segmented image. An image adjustment module is used to adjust each segmented image according to the initial positioning point position information and the actual positioning point position information, and then splice them together to obtain the target printed image. The device provided in this embodiment realizes the processing of positioning after segmentation of a large-format printed image before splicing, which not only improves printing efficiency but also greatly increases printing accuracy.
[0112] Example 3
[0113] In addition, combined Figure 1 The printing target segmentation adjustment and splicing positioning method described in Embodiment 1 of the present invention can be implemented by an electronic device. Figure 9 A schematic diagram of the hardware structure of the electronic device provided in Embodiment 3 of the present invention is shown.
[0114] Electronic devices may include processors and memory storing computer program instructions.
[0115] Specifically, the processor may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement embodiments of the present invention.
[0116] The memory may include a large-capacity storage device for data or instructions. For example, and not limitingly, the memory may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory may include removable or non-removable (or fixed) media. Where appropriate, the memory may be internal or external to a data processing device. In a particular embodiment, the memory is a non-volatile solid-state memory. In a particular embodiment, the memory includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.
[0117] The processor reads and executes computer program instructions stored in the memory to implement any of the printing target segmentation adjustment and splicing positioning methods in the above embodiments.
[0118] In one example, the electronic device may also include a communication interface and a bus. For example, Figure 9 As shown, the processor, memory, and communication interface are connected via a bus and communicate with each other.
[0119] The communication interface is mainly used to enable communication between various modules, devices, units and / or equipment in the embodiments of the present invention.
[0120] A bus, including hardware, software, or both, couples components of the device together. For example, and not limitingly, a bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, a bus may include one or more buses. While specific buses are described and illustrated in embodiments of the invention, the invention contemplates any suitable bus or interconnect.
[0121] Example 4
[0122] In addition, in conjunction with the printing target segmentation adjustment and splicing positioning method in Embodiment 1 above, Embodiment 4 of the present invention can also provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the printing target segmentation adjustment and splicing positioning methods in the above embodiments.
[0123] In summary, the embodiments of the present invention provide a method, apparatus, device, and storage medium for adjusting, splicing, and positioning printed target segments.
[0124] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.
[0125] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the required tasks. The programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0126] It should also be noted that the exemplary embodiments mentioned in this invention describe methods or systems based on a series of steps or apparatus. However, this invention is not limited to the order of the steps described above; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0127] The above description is merely a specific embodiment of the present invention. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the protection scope of the present invention.
Claims
1. A method for printing target segment adjustment stitching positioning, characterized in that, The method comprises: splitting a to-be-printed image into a plurality of segmented images according to segmentation parameters; obtaining a first positioning deviation parameter of a first printed segmented image in the plurality of segmented images; calculating initial positioning point position information of other segmented images in the plurality of segmented images except the first printed segmented image according to the first positioning deviation parameter and the segmentation parameters; obtaining actual positioning point position information of each segmented image; adjusting and splicing each segmented image according to the initial positioning point position information and the actual positioning point position information to obtain a target printed image.
2. The method of claim 1, wherein, The splitting a to-be-printed image into a plurality of segmented images according to segmentation parameters comprises: obtaining a size parameter and a first segmentation parameter of the to-be-printed image, wherein the first segmentation parameter comprises a first segmentation number and a first segmentation line coordinate; determining whether the first segmentation parameter matches the size parameter; if not, obtaining a second segmentation number and a segmentation step length according to the size parameter, and calculating a second segmentation line coordinate; splitting the to-be-printed image into a plurality of segmented images according to the second segmentation line coordinate.
3. The print target segmentation adjustment stitching positioning method according to claim 1 or 2, characterized in that, The obtaining a first positioning deviation parameter of a first printed segmented image in the plurality of segmented images comprises: obtaining a positioning coordinate and a positioning angle of a positioning point of the first printed segmented image; obtaining a reference coordinate and a reference angle collected by a color sensor; obtaining a first positioning deviation parameter according to the positioning coordinate, the positioning angle, the reference coordinate and the reference angle, wherein the first positioning deviation parameter comprises a first deviation angle and a first deviation distance.
4. The method of claim 3, wherein, The calculating initial positioning point position information of other segmented images in the plurality of segmented images except the first printed segmented image according to the first positioning deviation parameter and the segmentation parameters comprises: obtaining an initial distance between the first segmented image and other segmented images; calculating a deviation distance of other segmented images according to the first deviation distance and the initial distance; obtaining initial position information of other segmented images according to the first deviation angle and the deviation distance of other segmented images.
5. The method of claim 4, wherein, The adjusting and splicing each segmented image according to the initial positioning point position information and the actual positioning point position information to obtain a target printed image comprises: rotating each segmented image by an angle or translating each segmented image along a main printing direction and / or a secondary printing direction according to the initial positioning point position information and the actual positioning point position information to obtain a target printed image.
6. The method of claim 4, wherein, The adjusting and splicing each segmented image according to the initial positioning point position information and the actual positioning point position information to obtain a target printed image further comprises: obtaining a stretching coefficient in the secondary printing direction; performing pre-stretching processing on each segmented image according to the stretching coefficient and updating the initial positioning point position information; adjusting each segmented image that has been pre-stretched according to the updated initial positioning point position information and the actual positioning point position information to obtain a target printed image.
7. The method of claim 1-6, wherein, The method further comprises, before splitting a to-be-printed image into a plurality of segmented images according to segmentation parameters: obtaining a line thickness parameter of an initial to-be-printed image; The region gray value of the initial image to be printed is adjusted according to the line thickness parameter to obtain the image to be printed.
8. A print target segment adjustment stitching positioning apparatus, comprising: The device comprises: An image segmentation module, configured to segment the image to be printed into a plurality of segmented images according to a segmentation parameter; A positioning deviation parameter acquisition module, configured to acquire a first positioning deviation parameter of a first printing segmented image in the plurality of segmented images; An initial position information acquisition module, configured to calculate initial positioning point position information of segmented images other than the first printing segmented image in the plurality of segmented images according to the first positioning deviation parameter and the segmentation parameter; An actual position information acquisition module, configured to acquire actual positioning point position information of each segmented image; An image adjustment module, configured to splice each segmented image after adjustment according to the initial positioning point position information and the actual positioning point position information to obtain a target printing image.
9. An electronic device, comprising: comprises: at least one processor, at least one memory, and computer program instructions stored in the memory that, when executed by the processor, implement the method of any one of claims 1-7.
10. A storage medium having stored thereon computer program instructions, characterized in that, when the computer program instructions are executed by the processor, implement the method of any one of claims 1-7.