Scanning image processing method and device based on single camera, equipment and medium

By using single-camera multiple scanning and image stitching technology, the problems of accuracy loss and cost increase caused by multi-camera stitching in UV flatbed printing are solved, achieving high-precision UV flatbed printing results.

CN121056571APending Publication Date: 2025-12-02SHENZHEN HOSONSOFT CO LTD

Patent Information

Application Number
CN202410685062.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2025-12-02

AI Technical Summary

Technical Problem

In existing UV flatbed printing technology, multi-camera stitching leads to loss of accuracy, increased cost, and difficulty in synchronizing the light source. In addition, the low camera resolution cannot meet the requirements of high-precision printing.

Method used

Multiple scans are performed using a single camera. Through distortion correction and mapping stitching technology, images of multiple regions are acquired and stitched together to improve image accuracy and print quality.

Benefits of technology

Full-frame scanning was achieved using a single camera, simplifying hardware configuration, reducing costs, and improving printing accuracy and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121056571A_ABST
    Figure CN121056571A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, solves the problems that in the prior art, UV flat plate printing needs multiple cameras to cover the whole printing platform, and the precision is not high, and provides a scanning image processing method and device based on a single camera, equipment and a medium. The method comprises the steps that a camera is controlled to scan a calibration graph in the main scanning direction to obtain a first area image, the first area image is analyzed to correct distortion, target images are obtained, then the camera moves in the auxiliary scanning direction and repeatedly scans to obtain a second area image, distortion correction is conducted as well, and overlapped parts of the two target images are compared to obtain a target image. And longitudinal shooting overlapping parameters are calculated, and adjacent target area images are spliced by using the two groups of longitudinal overlapping parameters through a mapping splicing technology. Scanning of the whole printing platform can be completed through a single camera, hardware configuration is simplified, image splicing is carried out after multiple times of scanning and distortion correction, and the overall printing precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to a method, apparatus, device and medium for scanning image processing based on a single camera. Background Technology

[0002] In traditional applications of UV flatbed printing technology, the camera, as one of the core components, is used to capture image information of the surface to be printed. In existing solutions, the camera is usually a line scan camera fixed on the printer beam. Due to its structural characteristics, this type of camera can only move back and forth along the beam to scan the entire printing platform. When the width of the platform exceeds the field of view of the line scan camera itself, multiple line scan cameras must be arranged horizontally and stitched together to achieve full-page image acquisition. This increases the complexity and cost of the system and also poses challenges to the layout and coordination of the light source. In addition, due to the resolution limitations of the camera, it is inadequate to meet the increasingly refined and high-quality printing demands of modern times, especially for applications requiring extremely high-precision pattern reproduction and color expression, such as industrial signage, art reproduction, and precision mold printing. Such resolution is clearly insufficient.

[0003] The existing technology CN113306308A proposes a design method for a portable printer and copier based on high-precision visual positioning. It realizes automatic stitching of multi-line scanned images and multi-line printed images through visual positioning, thereby supporting the scanning and printing functions of images of any size. However, it also relies on multiple high-precision cameras to achieve this.

[0004] Based on the current state of technology, traditional UV flatbed printing processes suffer from several drawbacks in camera configuration, including accuracy loss due to multi-camera stitching, difficulty in synchronizing the light source and camera, and limitations on print quality due to low camera resolution. Therefore, a new technological solution is urgently needed that can overcome current technological limitations while effectively improving printing accuracy, reducing costs, and enhancing printing flexibility. Summary of the Invention

[0005] In view of this, the present invention provides a scanning image processing method, apparatus, device and medium based on a single camera, to solve the problems of accuracy loss caused by multi-camera stitching, increased printing costs, and the limitation on the upper limit of printing quality due to low camera resolution or the inability to meet accuracy requirements when directly stitching the acquired images in the prior art.

[0006] The technical solution adopted in this invention is:

[0007] In a first aspect, the present invention provides a scanning image processing method based on a single camera, the method comprising:

[0008] S1: Control the camera to scan the calibration map along the main scanning direction to obtain the first region image;

[0009] S2: Analyze the first region image to obtain the position parameters of each first calibration point in the first region image;

[0010] S3: Perform distortion correction on the first region image according to the position parameters of each first calibration point to obtain the target first region image;

[0011] S4: After the camera moves a certain distance relative to the sub-scanning direction, it scans the calibration map along the main scanning direction to obtain the second region image. The first region image and the second region image have some overlap.

[0012] S5: Analyze the second region image to obtain the position parameters of each second calibration point in the second region image;

[0013] S6: Perform distortion correction on the second region image according to the position parameters of each second calibration point to obtain the target second region image;

[0014] S7: By comparing and analyzing the size of the first target region image and the second target region image and the position of the calibration point in the image, the first longitudinal shooting overlap parameter of the camera along the sub-scanning direction is obtained.

[0015] Preferably, the camera is fixed on the inkjet carriage of the inkjet printing equipment, and the camera moves with the inkjet carriage in the main scanning direction or the sub-scanning direction. The calibration map is set on the printing medium, and calibration points are printed on the calibration map.

[0016] Preferably, the method further includes:

[0017] S8: After the camera moves a certain distance relative to the sub-scanning direction, it scans the calibration map along the main scanning direction to obtain a third region image, wherein the third region image and the second region image partially overlap.

[0018] S9: Analyze the third region image to obtain the position parameters of each third calibration point in the third region image;

[0019] S10: Obtain the target third region image by applying distortion correction to the third region image based on the position parameters of each third calibration point;

[0020] S11: By comparing and analyzing the size of the second region image of the target and the third region image of the target, and the position of the calibration point in the image, the second longitudinal shooting overlap parameter of the camera along the sub-scanning direction is obtained.

[0021] Preferably, the method further includes:

[0022] S12: Based on the first longitudinal overlap parameter, stitch together the target first region image and the target second region image using a mapping stitching method;

[0023] S13: Based on the second longitudinal overlap parameter, the target second region image and the target third region image are stitched together using a mapping stitching method.

[0024] Preferably, step S3: obtaining the target first region image by performing distortion correction on the first region image based on the position parameters of each first calibration point includes:

[0025] Distortion correction is performed on the entire first region image based on the position parameters of the first calibration point.

[0026] Furthermore, step S3: Obtaining the target first region image by performing distortion correction on the first region image based on the position parameters of each first calibration point includes:

[0027] The first region image is divided into multiple region blocks based on the position parameters of the first calibration point, with adjacent region blocks partially overlapping.

[0028] Perform distortion correction on each region block;

[0029] Based on the overlapping parts, the distorted regions are stitched together to form a complete first region image of the target.

[0030] Preferably, step S12: stitching the target first region image and the target second region image using a mapping stitching method according to the first longitudinal overlap parameter includes:

[0031] Calculate the mapping matrix of the first target region image in the calibration map to obtain the mapping matrix of the first target region image in the calibration map;

[0032] Based on the first vertical overlap parameter and the mapping matrix, the target first region image and the target second region image are stitched together.

[0033] Secondly, the present invention provides a scanning image processing apparatus based on a single camera, the apparatus comprising:

[0034] The first image acquisition module is used to control the camera to scan the calibration map along the main scanning direction to obtain the first region image;

[0035] The first position parameter acquisition module is used to analyze the first region image to obtain the position parameters of each first calibration point in the first region image;

[0036] The first distortion correction module is used to perform distortion correction on the first region image according to the position parameters of each first calibration point to obtain the target first region image;

[0037] The second image acquisition module is used to control the camera to move a certain distance along the sub-scanning direction and then scan the calibration map along the main scanning direction to obtain a second region image. The first region image and the second region image have partial overlap.

[0038] The second position parameter acquisition module is used to analyze the second region image to obtain the position parameters of each second calibration point in the second region image;

[0039] The second distortion correction module is used to perform distortion correction on the second region image according to the position parameters of each second calibration point to obtain the target second region image;

[0040] The first longitudinal shooting overlap parameter acquisition module is used to compare and analyze the size of the first target region image and the second target region image and the position of the calibration point in the image to obtain the first longitudinal shooting overlap parameter of the camera along the sub-scanning direction.

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

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

[0043] In summary, the beneficial effects of the present invention are as follows:

[0044] This invention provides a single-camera-based scanning image processing method, apparatus, device, and medium. First, the camera scans a calibration map along the main scanning direction to acquire a first region image, which is then analyzed to correct distortion, resulting in a target image. Subsequently, the camera moves along a secondary scanning direction and repeatedly scans to acquire a second region image, undergoing the same distortion correction. The overlapping portion of the two target images is compared to calculate the longitudinal overlap parameters. Using these two sets of longitudinal overlap parameters, adjacent target region images are stitched together using a mapping and stitching technique. This method uses a single camera to complete the scanning of the entire printing platform, simplifying hardware configuration and saving printing costs. Furthermore, the technique of using multiple scans for image stitching improves the accuracy of the scanned image, thereby significantly improving the overall printing quality. Attached Figure Description

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

[0046] Figure 1 This is a schematic flowchart illustrating the operation of a single-camera-based scanning image processing method in Embodiment 1 of the present invention.

[0047] Figure 2 This is a schematic diagram of multi-line scanning of the calibration map in Embodiment 1 of the present invention;

[0048] Figure 3 This is a schematic diagram of the calibration map region block in Embodiment 1 of the present invention;

[0049] Figure 4 This is a structural block diagram of a single-camera-based scanning image processing device according to Embodiment 2 of the present invention;

[0050] Figure 5 This is a schematic diagram of the electronic device in Embodiment 3 of the present invention. Detailed Implementation

[0051] 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 merely 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 orientations or positional relationships based on the orientations 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.

[0052] Example 1

[0053] Please see Figure 1 Embodiment 1 of the present invention discloses a scanning image processing method based on a single camera, the method comprising:

[0054] S1: Control the camera to scan the calibration map along the main scanning direction to obtain the first region image;

[0055] Specifically, in the UV flatbed printing process, the camera can be an industrial CCD camera. A single industrial CCD camera is controlled to acquire images on the calibration map along the main scanning direction. The main scanning direction is set to horizontal and the secondary scanning direction is set to vertical. The calibration map has regular feature points pre-printed on it. The feature points are calibration points on the calibration map, such as dots, arranged according to a certain pattern. By calculating the positional relationship of these feature points, the accurate mapping relationship from the scanned image to the actual printing platform can be calculated. Each feature point is arranged at a certain interval.

[0056] In one embodiment, a single camera is fixed to the inkjet carriage of an inkjet printer. The camera moves with the inkjet carriage in either the main scanning direction or the secondary scanning direction. A calibration map is set on the printing medium of the inkjet printer, and calibration points are printed on the calibration map. The direction of inkjet printing is set as the main scanning direction of the camera, i.e., the horizontal direction is the main scanning direction, and the vertical direction is the secondary scanning direction. Figure 2 As shown in the calibration diagram, the X-axis direction is horizontal and the Y-axis direction is vertical.

[0057] Specifically, taking an industrial CCD camera as an example, in existing technology, industrial CCD cameras are typically mounted on the crossbeam of a UV flatbed printer. They can only move back and forth with the crossbeam, scanning the entire platform and outputting images. Due to the limited field of view of the camera, to cover the entire printing platform, the length of the camera must be comparable to the width of the platform, or multiple cameras must be horizontally spliced ​​together, increasing equipment cost and system complexity. Furthermore, traditional installation methods may affect the layout of the light source and the camera resolution, limiting the improvement of printing accuracy. However, installing a camera on the inkjet carriage only requires one camera to scan the entire printing platform, and the light source is easier to install. The main scanning direction is set horizontally, and the secondary scanning direction is vertically. The inkjet carriage is controlled to move horizontally along the main scanning direction. The camera scans the area according to a preset scanning path, obtaining an image of that area. Then, the inkjet carriage continues to move vertically along the secondary scanning direction at preset steps. After each vertical movement, a horizontal scan is performed again to obtain horizontal images of different areas, resulting in multiple images of different areas, with some overlapping areas between adjacent images. Figure 2 As shown, three scans were performed, each scanning two rows of calibration points on the calibration map. There was an overlapping area of ​​one row of calibration points between the first and second scans, and there was also an overlapping area of ​​one row of calibration points between the second and third scans.

[0058] S2: Analyze the first region image to obtain the position parameters of each first calibration point in the first region image;

[0059] Specifically, the position parameters of the calibration points in the first region image on the calibration map are obtained. The calibration points are circular points on the calibration map, and the position information of the circular points on the calibration map is the coordinate information of the circular points. For example, a rectangular coordinate system is established with the length direction of the calibration map as the X-axis and the width direction as the Y-axis. Then any circular point on the calibration map can be represented by coordinates. Based on the obtained position information of the first region image on the calibration map, the coordinates of each calibration point in the region image are obtained in the coordinate system.

[0060] S3: Perform distortion correction on the first region image according to the position parameters of each first calibration point to obtain the target first region image;

[0061] Specifically, the position parameters of the calibration points in the first region image are obtained. Based on the position information and the position information on the calibration map, the mapping matrix that transforms the coordinate information of the feature points in the first region image to the coordinate system of the calibration map is calculated using an affine matrix. This yields the mapping matrix from the first region image to the calibration map for each region image. Based on the mapping matrix corresponding to different first region images, the coordinates of all pixels in the first region image are substituted into the first mapping matrix for matrix operations to obtain the new coordinates of the pixels on the calibration map. Then, the pixels in the first region image are repositioned based on the transformed new coordinates to ensure that the image blocks can be accurately aligned with the corresponding positions on the calibration map after stitching, thus completing the calibration, eliminating errors generated during the scanning process, and improving the accuracy of the image.

[0062] In one embodiment, step S3: obtaining the target first region image by performing distortion correction on the first region image according to the position parameters of each first calibration point includes: performing distortion correction on the entire first region image according to the position parameters of the first calibration points.

[0063] Specifically, this method calculates mapping parameters based on the position parameters of calibration points in each region of the image to perform geometric calibration of the distortion caused by the camera during image scanning. This method can quickly complete distortion calibration based on the mapping relationship of calibration points and has a fast processing speed. However, the calibration accuracy of this method is low, and there may be inaccurate distortion, which may lead to inaccurate subsequent stitching.

[0064] In one embodiment, step S3: performing distortion correction on the first region image based on the position parameters of each first calibration point to obtain the target first region image includes:

[0065] S31: Divide the first region image into multiple region blocks according to the position parameters of the first calibration point, with adjacent region blocks partially overlapping.

[0066] Specifically, based on the area scanned each time, the area is divided into blocks according to the same rules. There is no limit to the size of the blocks; each block can contain four, six, or eight calibration points. However, there must be an overlap between adjacent blocks. This block division and subsequent processing improves print adaptability. For large or irregularly shaped prints, block processing better adapts to printing needs of different shapes and sizes. By combining different image blocks to form a whole, the application range of UV flatbed printing technology is expanded. For example... Figure 3 As shown, a single scan yields a region image of two rows of feature points. This region image is then divided into equal blocks. The first block has four calibration points, which are distributed according to the same pattern. The second block also has four calibration points, and the second region block and the first region block have two calibration points as intersecting areas, meaning there are two overlapping calibration points.

[0067] S32: Perform distortion correction on each region block;

[0068] Specifically, the position information of feature points in each region block on the calibration map is first obtained. Feature points are circular points on the calibration map, and the position information of the circular points on the calibration map is the coordinate information of the circular points. For example, a rectangular coordinate system is established with the length direction of the calibration map as the X-axis and the width direction as the Y-axis. Then, any circular point on the calibration map can be represented by coordinates. Based on this information, the actual position information of feature points in each region block is obtained. Based on the actual position information and the position information on the calibration map, the mapping matrix that transforms the coordinate information of feature points in the region block to the coordinate system of the calibration map is calculated through an affine matrix. The mapping matrix from each region block to the calibration map is obtained. Based on the mapping matrix corresponding to different region blocks, the coordinates of all pixels in the region block are substituted into the first mapping matrix to perform matrix operations to obtain the new coordinates of the pixels on the calibration map coordinate system. Then, the pixels in the region block are repositioned according to the transformed new coordinates to ensure that the image blocks can be accurately aligned with the corresponding positions on the calibration map after stitching, thus completing the calibration, eliminating the errors generated during the scanning process, and improving the accuracy of the image.

[0069] In one embodiment, the distortion correction process for each region block includes:

[0070] S321: Obtain the location information of feature points in each region block;

[0071] Specifically, a first rectangular coordinate system is established in the initial region block with the length direction of the region block as the X-axis and the width direction as the Y-axis to obtain the coordinates of the feature point in the region block. At this time, the position information of the feature point in the initial region block is the actual coordinate information. A second rectangular coordinate system is established with the length direction of the calibration map on the printing medium as the X-axis and the width direction as the Y-axis to obtain the coordinates of the feature point on the calibration map.

[0072] S322: Based on the location information, calculate the first mapping matrix of each region block in the calibration map to obtain the first mapping matrix of each region block in the calibration map;

[0073] Specifically, after obtaining the position information of the feature points in the region block, that is, the coordinates of the feature points in the region block and the corresponding coordinates of the feature points on the calibration map, the first mapping matrix of the region block on the calibration map is calculated by calling the numpy library of Python. For example, when there are four feature points in the region block with coordinates a1, a2, a3, a4 in the region block and coordinates b1, b2, b3, b4 on the calibration map, the coefficients a, b, c, d, e, f of the affine matrix A are obtained according to the affine transformation formula, thus obtaining the affine matrix. The first mapping matrix of the region block on the calibration map is determined according to the affine matrix. The mapping matrix contains the geometric transformation parameters of the region block in terms of translation, rotation, scaling, etc.

[0074] S323: Calibrate each of the region blocks according to each of the first mapping matrices.

[0075] Specifically, a mapping matrix from each region block to the calibration map is obtained. Based on the mapping matrix corresponding to different region blocks, the coordinates of all pixels in the region block are substituted into the first mapping matrix for matrix operation to obtain the new coordinates of the pixels on the calibration map. Then, the pixels in the region block are repositioned according to the transformed new coordinates to ensure that the image blocks can be accurately aligned with the corresponding positions on the calibration map after stitching, thus completing the calibration and obtaining each target region block. This eliminates image deformation and displacement caused by scanning, industrial CCD camera positioning errors, etc., and improves the local accuracy of the scanned image.

[0076] S33: Based on the overlapping parts, stitch together the distorted region blocks to form a complete first target region image.

[0077] Specifically, each adjacent distorted region block has a partially overlapping area. Based on the feature points of the overlapping area, the position information of the feature points of the overlapping area is obtained. The position information of the feature points of adjacent region blocks is matched. If the matching result is the same, the corresponding feature point pair is obtained. The two adjacent target region blocks are stitched together based on the obtained feature point pair. The actual stitched image may have defects at the stitching point, so edge smoothing is used on the connecting part to solve this problem and improve the quality of image stitching.

[0078] In one embodiment, step S33: stitching the distorted region blocks into a complete target first region image based on the overlapping portions includes:

[0079] S331: Based on the overlapping area of ​​two adjacent regions, perform feature point matching on the adjacent regions to obtain the corresponding feature point pairs;

[0080] Specifically, based on the overlapping areas of adjacent blocks, the location information of feature points in the overlapping areas is obtained. The location information of feature points in adjacent blocks is then matched. If the matching results are the same, corresponding feature point pairs are obtained.

[0081] S332: Connect two adjacent region blocks according to the corresponding feature points, and perform edge smoothing on the connected parts to obtain the target first region image.

[0082] Specifically, the two regions are stitched together based on the obtained feature points. However, the stitched image may have defects at the stitching point. Therefore, edge smoothing is applied to the connected parts to solve this problem and improve the quality of image stitching.

[0083] S4: After the camera moves a certain distance relative to the sub-scanning direction, it scans the calibration map along the main scanning direction to obtain the second region image. The first region image and the second region image have some overlap.

[0084] Specifically, after obtaining the first target area image, the inkjet carriage is moved along the scanning direction according to the preset moving distance. Here, the secondary scanning direction is longitudinal. The inkjet carriage drives the industrial CCD camera to move longitudinally. After moving to the designated area, the second area image is obtained according to the method described in S1. According to the preset moving distance rule, the first area image and the second area image have partial overlap.

[0085] S5: Analyze the second region image to obtain the position parameters of each second calibration point in the second region image;

[0086] Specifically, the position parameters of each second calibration point in the second region image are obtained using the same method as in S2. The second calibration point refers to the calibration point in the second region image.

[0087] S6: Perform distortion correction on the second region image according to the position parameters of each second calibration point to obtain the target second region image;

[0088] Specifically, the distortion correction of the second region image is performed in the same manner based on the position parameters of the second calibration point to obtain the second region image of the target.

[0089] S7: By comparing and analyzing the size of the first target region image and the second target region image and the position of the calibration point in the image, the first longitudinal shooting overlap parameter of the camera along the sub-scanning direction is obtained.

[0090] Specifically, the size of the first target region image and the size of the second target region image are calculated. Based on the position parameters of the calibration points in the respective region images obtained above, the overlap parameters of the sub-scanning direction are calculated, which are the longitudinal overlap parameters of the two adjacent images.

[0091] S8: After the camera moves a certain distance relative to the sub-scanning direction, it scans the calibration map along the main scanning direction to obtain a third region image, wherein the third region image and the second region image partially overlap.

[0092] S9: Analyze the third region image to obtain the position parameters of each third calibration point in the third region image;

[0093] S10: Obtain the target third region image by applying distortion correction to the third region image based on the position parameters of each third calibration point;

[0094] S11: By comparing and analyzing the size of the second region image of the target and the third region image of the target, and the position of the calibration point in the image, the second longitudinal shooting overlap parameter of the camera along the sub-scanning direction is obtained.

[0095] Similarly, a third region image is acquired, which partially overlaps with the second region image. The position parameters of the calibration points in the third region image are obtained, and the distortion correction of the third region image is completed to obtain the third region image of the target. The longitudinal shooting parameters of the second region image and the third region image of the target are also calculated.

[0096] S12: Based on the first longitudinal overlap parameter, stitch together the target first region image and the target second region image using a mapping stitching method;

[0097] S13: Based on the second longitudinal overlap parameter, the target second region image and the target third region image are stitched together using a mapping stitching method.

[0098] Specifically, based on adjacent region images, the adjacent region images are mapped and stitched together according to the corresponding vertical overlap parameters. Mapping and stitching is to stitch together the overlapping regions of two adjacent region images according to the mapping relationship. This method achieves accurate stitching with low computational complexity and improves stitching efficiency.

[0099] In one embodiment, S12: stitching the target first region image and the target second region image using a mapping stitching method according to the first vertical overlap parameter includes:

[0100] S121: Calculate the mapping matrix of the first target region image in the calibration map to obtain the mapping matrix of the first target region image in the calibration map;

[0101] Specifically, based on the positional information of the feature points in the first target region image, namely the coordinates of the feature points in the first target region image and the coordinates on the calibration map, the mapping matrix of the first target region image on the calibration map is calculated using an affine matrix.

[0102] S122: Based on the first vertical overlap parameter and the mapping matrix, the target first region image and the target second region image are stitched together.

[0103] Specifically, based on the position information of the first longitudinal overlap parameter obtained from two adjacent target first region images and target second region images and the corresponding second mapping matrix, the target first region images and target second region images are stitched together and edge processing is performed.

[0104] Finally, repeat the above steps until a complete calibration scan image is obtained. Based on the complete calibration scan image, inkjet printing is performed on the printing medium to accurately present the design image on the printing medium, forming a high-precision UV flatbed printed product.

[0105] In summary, the single-camera-based scanning image processing method in this embodiment involves controlling the camera to scan a calibration map along the main scanning direction to acquire a first region image, analyzing it to correct distortion, and obtaining the target image. Subsequently, the camera moves along the secondary scanning direction and repeatedly scans to acquire a second region image, similarly performing distortion correction. By comparing the overlapping portions of the two target images, longitudinal overlap parameters are calculated. Using these two sets of longitudinal overlap parameters, adjacent target region images are stitched together using a mapping and stitching technique. This method can complete the scanning of the entire printing platform using a single camera, simplifying hardware configuration, saving printing costs, and improving the accuracy of the scanned image through multiple scans for image stitching, thereby significantly improving the overall printing quality.

[0106] Example 2

[0107] Please see Figure 4 Embodiment 2 of the present invention also provides a scanning image processing device 200 based on a single camera, the device 200 comprising:

[0108] The first image acquisition module 201 is used to control the camera to scan the calibration map along the main scanning direction to obtain the first region image;

[0109] The first position parameter acquisition module 202 is used to analyze the first region image to obtain the position parameters of each first calibration point in the first region image;

[0110] The first distortion correction module 203 is used to perform distortion correction on the first region image according to the position parameters of each first calibration point to obtain the target first region image;

[0111] The second image acquisition module 204 is used to control the camera to move a certain distance along the sub-scanning direction and then scan the calibration map along the main scanning direction to obtain a second region image. The first region image and the second region image have partial overlap.

[0112] The second position parameter acquisition module 205 is used to analyze the second region image to obtain the position parameters of each second calibration point in the second region image;

[0113] The second distortion correction module 206 is used to perform distortion correction on the second region image according to the position parameters of each second calibration point to obtain the target second region image;

[0114] The first longitudinal shooting overlap parameter acquisition module 207 is used to compare and analyze the size of the first target region image and the second target region image and the position of the calibration point in the image to obtain the first longitudinal shooting overlap parameter of the camera along the sub-scanning direction.

[0115] Example 3

[0116] In addition, combined Figure 1 The single-camera-based scanning image processing method described in Embodiment 1 of the present invention can be implemented by an electronic device. Figure 5 A schematic diagram of the hardware structure of the electronic device provided in Embodiment 3 of the present invention is shown.

[0117] Electronic devices may include processors and memory storing computer program instructions.

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

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

[0120] The processor reads and executes computer program instructions stored in memory to implement any of the single-camera-based scanning image processing methods described in the above embodiments.

[0121] In one example, the electronic device may also include a communication interface and a bus. For example, Figure 5 As shown, the processor, memory, and communication interface are connected via a bus and communicate with each other.

[0122] The communication interface is mainly used to enable communication between various modules, devices, units and / or equipment in the embodiments of the present invention.

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

[0124] Example 4

[0125] In addition, in conjunction with the single-camera-based scanning image processing 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 executed by a processor, these computer program instructions implement any of the single-camera-based scanning image processing methods in the above embodiments.

[0126] In summary, the embodiments of the present invention provide a scanning image processing method, apparatus, device, and medium based on a single camera.

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

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

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

[0130] 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 single-camera-based scanning image processing method, characterized in that, The method includes: S1: Control the camera to scan the calibration map along the main scanning direction to obtain the first region image; S2: Analyze the first region image to obtain the position parameters of each first calibration point in the first region image; S3: Perform distortion correction on the first region image according to the position parameters of each first calibration point to obtain the target first region image; S4: After the camera moves a certain distance relative to the sub-scanning direction, it scans the calibration map along the main scanning direction to obtain the second region image. The first region image and the second region image have some overlap. S5: Analyze the second region image to obtain the position parameters of each second calibration point in the second region image; S6: Perform distortion correction on the second region image according to the position parameters of each second calibration point to obtain the target second region image; S7: By comparing and analyzing the size of the first target region image and the second target region image and the position of the calibration point in the image, the first longitudinal shooting overlap parameter of the camera along the sub-scanning direction is obtained.

2. The single-camera-based scanning image processing method according to claim 1, characterized in that, The camera is fixed on the inkjet carriage of the inkjet printer. The camera moves with the inkjet carriage in the main scanning direction or the sub-scanning direction. The calibration map is set on the printing medium, and calibration points are printed on the calibration map.

3. The single-camera-based scanning image processing method according to claim 2, characterized in that... The method further includes: S8: After the camera moves a certain distance relative to the sub-scanning direction, it scans the calibration map along the main scanning direction to obtain a third region image, wherein the third region image partially overlaps with the second region image; S9: Analyze the third region image to obtain the position parameters of each third calibration point in the third region image; S10: Obtain the target third region image by applying distortion correction to the third region image based on the position parameters of each third calibration point; S11: By comparing and analyzing the size of the second region image of the target and the third region image of the target, and the position of the calibration point in the image, the second longitudinal shooting overlap parameter of the camera along the sub-scanning direction is obtained.

4. The single-camera-based scanning image processing method according to claim 3, characterized in that, The method further includes: S12: Based on the first longitudinal overlap parameter, stitch together the target first region image and the target second region image using a mapping stitching method; S13: Based on the second longitudinal overlap parameter, the target second region image and the target third region image are stitched together using a mapping stitching method.

5. The single-camera-based scanning image processing method according to claim 4, characterized in that, Step S3: Obtaining the target first region image by performing distortion correction on the first region image based on the position parameters of each first calibration point includes: Distortion correction is performed on the entire first region image based on the position parameters of the first calibration point.

6. The single-camera-based scanning image processing method according to claim 4, characterized in that, Step S3: Obtaining the target first region image by performing distortion correction on the first region image based on the position parameters of each first calibration point includes: The first region image is divided into multiple region blocks based on the position parameters of the first calibration point, with adjacent region blocks partially overlapping. Perform distortion correction on each region block; Based on the overlapping parts, the distorted regions are stitched together to form a complete first region image of the target.

7. The single-camera-based scanning image processing method according to claim 5 or 6, characterized in that, S12: Stitching the target first region image and the target second region image using a mapping stitching method according to the first longitudinal overlap parameter includes: Calculate the mapping matrix of the first target region image in the calibration map to obtain the mapping matrix of the first target region image in the calibration map; Based on the first vertical overlap parameter and the mapping matrix, the target first region image and the target second region image are stitched together.

8. A scanning image processing device based on a single camera, characterized in that, The device includes: The first image acquisition module is used to control the camera to scan the calibration map along the main scanning direction to obtain the first region image; The first position parameter acquisition module is used to analyze the first region image to obtain the position parameters of each first calibration point in the first region image; The first distortion correction module is used to perform distortion correction on the first region image according to the position parameters of each first calibration point to obtain the target first region image; The second image acquisition module is used to control the camera to move a certain distance along the sub-scanning direction and then scan the calibration map along the main scanning direction to obtain a second region image. The first region image and the second region image have partial overlap. The second position parameter acquisition module is used to analyze the second region image to obtain the position parameters of each second calibration point in the second region image; The second distortion correction module is used to perform distortion correction on the second region image according to the position parameters of each second calibration point to obtain the target second region image; The first longitudinal shooting overlap parameter acquisition module is used to compare and analyze the size of the first target region image and the second target region image and the position of the calibration point in the image to obtain the first longitudinal shooting overlap parameter of the camera along the sub-scanning direction.

9. An electronic device, characterized in that, include: 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 as described in any one of claims 1-7.

10. A storage medium storing computer program instructions thereon, characterized in that, The method as described in any one of claims 1-7 is implemented when the computer program instructions are executed by the processor.

Citation Information

Patent Citations

  • Design method of portable printing and copying machine based on high-precision visual positioning

    CN113306308A

Cited By

  • Self-adaptive splicing method for fuzzy retrieval of scanned files

    CN122265026A

  • A scanning file fuzzy retrieval self-adaptive splicing method

    CN122265026B