Printing calibration method and system based on visual positioning

Through the printing calibration method based on visual positioning, the linear array camera extracts feature points and calculates internal and external parameter matrix, generates calibration files, and performs printhead correction and image acquisition synchronization, which solves the environmental adaptability and synchronization of CIS cameras in high-precision measurements. Problem, improving printing accuracy and efficiency.

CN119322594APending Publication Date: 2025-01-17SHANGHAI AOSE INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411349367.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

In the prior art, CIS cameras cannot fully adapt to all environmental conditions during high-precision measurement, resulting in a decline in image quality. Linear array cameras need to synchronize image acquisition and part movement when performing high-precision measurements, but because the seal is made of non-rigid material, The measurement error is large, and the existing calibration methods cannot completely solve the synchronization problem, which affects the accuracy and efficiency of the measurement.

Method used

Using a printing calibration method based on visual positioning, the calibration plate is photographed through the linear array camera, feature points are extracted and internal and external parameter matrix is ​​calculated, calibration files are generated, print head correction is performed, and image acquisition and mechanical paper removal are synchronized through the motion acquisition control platform. The mechanism realizes parallel processing of image acquisition and printing data.

Benefits of technology

It significantly improves printing accuracy and efficiency, simplifies the optimization steps of image distortion correction, avoids unnecessary calculations, solves the blank printing problem caused by abnormal interruption of data supply, and improves printing quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322594A_ABST
    Figure CN119322594A_ABST
Patent Text Reader

Abstract

The invention relates to a printing calibration method and system based on visual positioning, and belongs to the technical field of digital image processing. The method comprises the following steps: reading a printing file according to a printing task, analyzing the printing file, extracting effective data, and transmitting the effective data to an image processor; presetting the cell size of the calibration plate, shooting the calibration plate through a line-scan digital camera to obtain a calibration image, performing uniformity correction on the calibration image, extracting feature points of the calibration image and the printing file, and performing feature matching; calculating an internal and external parameter matrix of the linear array camera according to a feature matching result and generating a calibration file; generating correction information according to the calibration file, correcting the printing head, and sending an initialization ending signal to a front-end processor of the image processor after correction is completed; and the front-end processor sends the printing task and the analyzed printing data to the printing head controller and activates the printing head engine. The consistency of printed manuscripts and the sharpness of character edges are guaranteed, and pictures with the best effect restoration are obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of digital image processing, and in particular relates to a printing calibration method and system based on visual positioning. Background Art

[0002] CIS-Camera line scan cameras mainly use contact image sensor (CIS) optical structure, which is now widely used in industrial inspection machines. The camera can detect the overall appearance of the object, whether there are foreign objects, defects, and can measure length, depth and position, etc. It also has great detection advantages for thin and light-transmitting objects such as films, sheets, foils, etc. processed on conveyor belts and rollers; CIS cameras use CMOS color sensors and built-in LED light sources, which can support the acquisition of color images and black and white images. This design enables CIS cameras to achieve the target 1:1 image restoration without distortion, thereby ensuring the authenticity and perfect resolution of the image. In LED printers, the print head is composed of thousands of independent light-emitting components, using electronic light scanning technology, with a simple optical system and short optical path length. By using DDR2 SDRAM large-capacity memory particles as print data storage devices, print data can be effectively managed. This shows that CIS cameras can optimize the efficiency and image quality of the print head through precise data acquisition and processing; although CIS cameras have the advantages of high resolution and color reproduction, in actual applications, their light source system may not be able to fully adapt to all environmental conditions, resulting in reduced image quality, and the linear array camera must correctly calibrate the inherent parameters when performing high-precision measurements. However, the existing calibration model usually only calibrates the principal point and distortion in one-dimensional direction, while ignoring other directions, resulting in limited adaptability and accuracy. In addition, the calibration method for multi-line cameras also faces similar challenges and needs to be improved to improve the overall accuracy. In the high-precision dimensional measurement of parts, the synchronization of image acquisition of linear array CCD cameras and part movement is a key issue. Since the seal is a non-rigid material, it will deform under the action of contact force, resulting in large measurement errors, so it can only be detected by non-contact methods. This synchronization problem is difficult to completely solve in practical applications, affecting the accuracy and efficiency of measurement.

[0003] Vision-based global positioning methods face two major problems: noise and confusion. The noise of visual sensors will affect the accuracy of positioning. Although some systems can achieve 1:1 distortion-free image output through graphic image recognition and positioning algorithms, the source eliminates the need for complex distortion correction calibration algorithms in the later stage, which means that complex distortion correction is still required in practical applications. Some calibration methods require multiple adjustments and optimizations, such as adding camera internal parameters to optimize during BA optimization, which increases the complexity and time cost of the calibration process. In high-precision situations, one-click distortion correction and adaptive automatic positioning mode are required, which makes the calibration process more complicated. Summary of the invention

[0004] In order to solve the above problems existing in the prior art, the present invention provides a printing calibration method and system based on visual positioning.

[0005] The purpose of the present invention can be achieved through the following technical solutions:

[0006] A printing calibration method based on visual positioning, comprising:

[0007] S1: receiving a print task through a printer, reading a print file according to the print task, parsing the print file, extracting valid data, and transmitting the extracted data to an image processor;

[0008] S2: The image processor presets the cell size of the calibration plate, photographs the calibration plate with a line array camera to obtain a calibration image, and performs uniformity correction on the calibration image; extracts feature points of the calibration image and the print file with radial error as a constraint condition, and performs feature matching on the feature points with feature descriptors; calculates the internal and external parameter matrix of the line array camera according to the feature matching result and generates a calibration file;

[0009] S3: generating calibration information according to the calibration file; calibrating the print head of the printer according to the calibration information, and sending an initialization end signal to the front-end processor of the image processing machine after the calibration is completed;

[0010] S4: The front-end processor sends the printing task and the parsed printing data to the print head controller through the bus interface. The print head controller activates the print head engine according to the print head command register, starts printing data, and controls the image acquisition speed of the image processor through the motion acquisition control platform to be synchronized with the mechanical paper feed mechanism.

[0011] Specifically, the print driver of the printer disables the scaling mode and the rasterization process, and the high-precision printing calibration plate adopts a circular mark array.

[0012] Specifically, the line array camera is a contact image sensor, and the installation surface of the line array camera is parallel to the surface of the test piece; the line array camera uses an external triggering method to collect images, and collects an image once an external signal is received.

[0013] Specifically, the uniformity correction method is:

[0014] The response outputs of different sensor units of the line array camera under the same light radiation flux are made consistent by performing a linear transformation on the response curves of the sensor units. The calculation formula is:

[0015] V i (φ)=G i K i φ+(G i O i +B i ),

[0016] Among them, V i (φ) is the response output after linear transformation, φ is the light radiation flux, G i is the correction factor, K i is the response rate of sensor unit i, O i is the dark current of sensor unit i, B i To correct the offset.

[0017] Specifically, the feature point extraction method is: using the corresponding pixel points whose pixel values ​​are greater than the adjacent points in the graphic domain and the scale domain as feature points; eliminating the unstable feature points through the radial error; the feature descriptor is used to assign feature direction values ​​to the feature points to generate feature vectors, and the feature matching uses the Euclidean distance of the feature vectors as a similarity determination metric for image key points.

[0018] Specifically, the internal and external parameter matrix includes a rotation matrix, a translation vector, a focal length, and a principal point coordinate; the rotation matrix and the translation vector are obtained by decomposing a basic matrix calculated through feature point matching results; the internal parameter matrix is ​​estimated by the least squares method based on the known feature points of the calibration plate and the mathematical model of the linear array camera, and the internal parameter matrix includes the focal length and the principal point coordinates; the internal and external parameter matrix is ​​optimized by minimizing the distance between the projection point and the actual image point, and the optimized internal and external parameter matrix is ​​saved as a calibration file.

[0019] Specifically, the motion acquisition control platform simultaneously controls the image processor and the mechanical paper feed mechanism through the Camera Link line and the control line; the image processor performs operations in parallel through the data acquisition thread, the data processing thread, and the data storage thread, the data acquisition thread is used to obtain image data from the port and send a data processing request to the critical area, and after the data processing request is passed, the data packet of the image data is added to the data processing queue and the critical area occupied by the data processing request is released; the data processing thread determines whether the data processing queue is empty, if not empty, then reads the data packet from the head of the data processing queue and places it in the data storage queue, and deletes the read data packet from the data processing queue; the data storage thread determines whether the data storage queue is empty, if not empty, then reads the data packet from the head of the data storage queue and transmits it to the image registration unit for processing, and deletes the read data packet from the data storage queue; the image registration unit is used to perform the S2 operation.

[0020] A visual positioning and calibration system, comprising: an image acquisition module, an image registration module, a printing correction module, and a motion acquisition control module;

[0021] The image acquisition module is used to receive a print task through a printer, read a print file according to the print task, parse the print file, extract valid data, and then transmit it to the image processor;

[0022] The image registration module is used to preset the cell size of the calibration plate, obtain a calibration image by photographing the calibration plate with a line array camera, and perform uniformity correction on the calibration image; extract feature points of the calibration image and the print file with radial error as a constraint condition, and perform feature matching on the feature points through feature descriptors; calculate the internal and external parameter matrix of the line array camera according to the feature matching result and generate a calibration file;

[0023] The printing correction module is used to generate correction information according to the calibration file; calibrate the print head of the printer according to the correction information, and send an initialization end signal to the front-end processor of the image processing machine after the correction is completed;

[0024] The motion acquisition control module is used to send the printing task and the parsed printing data to the print head controller through a bus interface. The print head controller activates the print head engine according to the print head command register, starts printing data, and controls the image acquisition speed of the image processor to be synchronized with the mechanical paper feed mechanism through the motion acquisition control platform.

[0025] The beneficial effects of the present invention are:

[0026] The whole process from printing the calibration plate, image acquisition and preprocessing, feature point extraction and matching, calibration file generation to automatic positioning and marking significantly improves printing accuracy and efficiency. By using radial error constraint control to select effective boundary points for image feature points, unnecessary calculations are avoided, the calculation workload is reduced, and the accuracy is improved; by registering and correcting the print file at the image acquisition level, the optimization steps of image distortion correction are simplified; a large amount of image or text data is processed through the parallel execution operation thread of the image processor, the processed data is cached in the image processor, and transmitted to the print head when the printing task starts to execute. The print head will continue to work after receiving the print command, which solves the problem of blank printing due to abnormal interruption of data supply during the printing process, improves the printing quality, and completes the control of image acquisition, processing and storage. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.

[0028] Figure 1 The figure is a flow chart of a printing calibration method based on visual positioning of the present invention. DETAILED DESCRIPTION

[0029] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments.

[0030] See also Figure 1 , a printing calibration method based on visual positioning, comprising:

[0031] S1: receiving a print task through a printer, reading a print file according to the print task, parsing the print file, extracting valid data, and transmitting the extracted data to an image processor;

[0032] S2: The image processor presets the cell size of the calibration plate, photographs the calibration plate with a line array camera to obtain a calibration image, and performs uniformity correction on the calibration image; extracts feature points of the calibration image and the print file with radial error as a constraint condition, and performs feature matching on the feature points with feature descriptors; calculates the internal and external parameter matrix of the line array camera according to the feature matching result and generates a calibration file;

[0033] S3: generating calibration information according to the calibration file; calibrating the print head of the printer according to the calibration information, and sending an initialization end signal to the front-end processor of the image processing machine after the calibration is completed;

[0034] S4: The front-end processor sends the printing task and the parsed printing data to the print head controller through the bus interface. The print head controller activates the print head engine according to the print head command register, starts printing data, and controls the image acquisition speed of the image processor through the motion acquisition control platform to be synchronized with the mechanical paper feed mechanism.

[0035] In this embodiment, the linear array camera is a wide-format linear array camera with a CIS sensor module as a scanning head, adopts a standard industrial camera Camera Link MDR Medium mode interface, and is equipped with a PCIe image acquisition card. The collected image data is transmitted to the computer memory or video memory through the computer bus, so that the computer can process, store and display the collected on-site images in real time; the PC of the motion acquisition control platform is installed with image acquisition software and an image acquisition card, and controls the triggering of image acquisition and the mechanical paper feed mechanism through the CameraLink line and the control line at the same time, and is responsible for the acquisition and processing of image data, ensuring that the image acquisition speed is synchronized with the mechanical paper feed mechanism in an expected manner.

[0036] Specifically, the print driver of the printer disables the scaling mode and the rasterization process, and the high-precision printing calibration plate adopts a circular mark array.

[0037] Specifically, the line array camera is a contact image sensor, and the installation surface of the line array camera is parallel to the surface of the test piece; the line array camera uses an external triggering method to collect images, and collects an image once an external signal is received.

[0038] Specifically, the uniformity correction method is:

[0039] The response outputs of different sensor units of the line array camera under the same light radiation flux are made consistent by performing a linear transformation on the response curves of the sensor units. The calculation formula is:

[0040] V i (φ)=G i K i φ+(G i O i +B i ),

[0041] Among them, V i (φ) is the response output after linear transformation, φ is the light radiation flux, G i is the correction factor, K i is the response rate of sensor unit i, O i is the dark current of sensor unit i, B i To correct the offset.

[0042] Specifically, the feature point extraction method is: using the corresponding pixel points whose pixel values ​​are greater than the adjacent points in the graphic domain and the scale domain as feature points; eliminating the unstable feature points through the radial error; the feature descriptor is used to assign feature direction values ​​to the feature points to generate feature vectors, and the feature matching uses the Euclidean distance of the feature vectors as a similarity determination metric for image key points.

[0043] Specifically, the internal and external parameter matrix includes a rotation matrix, a translation vector, a focal length, and a principal point coordinate; the rotation matrix and the translation vector are obtained by decomposing a basic matrix calculated through feature point matching results; the internal parameter matrix is ​​estimated by the least squares method based on the known feature points of the calibration plate and the mathematical model of the linear array camera, and the internal parameter matrix includes the focal length and the principal point coordinates; the internal and external parameter matrix is ​​optimized by minimizing the distance between the projection point and the actual image point, and the optimized internal and external parameter matrix is ​​saved as a calibration file.

[0044] In this embodiment, feature points are extracted from the image captured by the linear array camera. These feature points are scale-invariant features in the image. The feature points are matched using a feature matching algorithm to ensure that corresponding pairs of feature points are found in different images. Based on the matching results of the feature points, RANSAC is used to estimate the basic matrix, the rotation matrix and translation vector of the camera are decomposed from the basic matrix, and the internal parameter matrix of the camera is estimated by the least squares method or other optimization methods using the known feature point pairs and the camera model. The Levenberg-Marquardt algorithm is used to optimize the initially estimated internal and external parameters to minimize the reprojection error; the optimized internal and external parameter matrix is ​​saved as a calibration file; and the accuracy of the calibration results is verified using an independent test image set. By projecting the three-dimensional points onto the image plane, the degree of match between the projection points and the actual image points is checked.

[0045] If the reprojection error is within an acceptable range, the calibration result is valid.

[0046] Specifically, the motion acquisition control platform simultaneously controls the image processor and the mechanical paper feed mechanism through the Camera Link line and the control line; the image processor performs operations in parallel through the data acquisition thread, the data processing thread, and the data storage thread, the data acquisition thread is used to obtain image data from the port and send a data processing request to the critical area, and after the data processing request is passed, the data packet of the image data is added to the data processing queue and the critical area occupied by the data processing request is released; the data processing thread determines whether the data processing queue is empty, if not empty, then reads the data packet from the head of the data processing queue and places it in the data storage queue, and deletes the read data packet from the data processing queue; the data storage thread determines whether the data storage queue is empty, if not empty, then reads the data packet from the head of the data storage queue and transmits it to the image registration unit for processing, and deletes the read data packet from the data storage queue; the image registration unit is used to perform the S2 operation.

[0047] In this embodiment, the image is read in a memory mapping manner, and a file kernel object is newly created or opened through the CreateFile function to inform the operating system of the location of the physical memory. This function can not only set the access rights and sharing mode of the file, but also set the required physical memory size through the CreateFileMapping function, and set the protection attributes of the file. Then, the file data is mapped to the memory by calling the MapViewOfFile function, and the entire file data or part of the file data can be selected to be mapped to the memory, and the access rights of the file can be set. In this way, the data in the address space can be operated like loading a file in the memory. When it is no longer necessary to map the file data to the memory, the UnmapViewOfFile function is called to release the data in the memory. Finally, the file mapping object and the file object are closed through the CloseHandle function. The order and flow of these operations can effectively complete the reading of the image and improve the operating efficiency.

[0048] A visual positioning and calibration system, comprising: an image acquisition module, an image registration module, a printing correction module, and a motion acquisition control module;

[0049] The image acquisition module is used to receive a print task through a printer, read a print file according to the print task, parse the print file, extract valid data, and then transmit it to the image processor;

[0050] The image registration module is used to preset the cell size of the calibration plate, obtain a calibration image by photographing the calibration plate with a line array camera, and perform uniformity correction on the calibration image; extract feature points of the calibration image and the print file with radial error as a constraint condition, and perform feature matching on the feature points through feature descriptors; calculate the internal and external parameter matrix of the line array camera according to the feature matching result and generate a calibration file;

[0051] The printing correction module is used to generate correction information according to the calibration file; calibrate the print head of the printer according to the correction information, and send an initialization end signal to the front-end processor of the image processing machine after the correction is completed;

[0052] The motion acquisition control module is used to send the printing task and the parsed printing data to the print head controller through a bus interface. The print head controller activates the print head engine according to the print head command register, starts printing data, and controls the image acquisition speed of the image processor to be synchronized with the mechanical paper feed mechanism through the motion acquisition control platform.

[0053] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device.

[0054] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0055] The program code included on the computer readable medium can be transmitted with any appropriate medium, including but not limited to wireless, electric wire, optical cable, RF, etc., or any suitable combination of the above. The computer program code for performing the operation of the present invention can be written in one or more programming languages ​​or their combinations, and the programming language includes object-oriented programming languages-such as Java, Smalltalk, C++, and also includes conventional procedural programming languages-such as "C" language or similar programming languages. The program code can be executed completely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on the remote computer, or completely on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0056] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still fall within the scope of the technical solution of the present invention.

Claims

1. A printing calibration method based on visual positioning, characterized in that: include: S1: receiving a print task through a printer, reading a print file according to the print task, parsing the print file, extracting valid data, and transmitting the extracted data to an image processor; S2: The image processor presets the cell size of the calibration plate, photographs the calibration plate with a line array camera to obtain a calibration image, and performs uniformity correction on the calibration image; extracts feature points of the calibration image and the print file with radial error as a constraint condition, and performs feature matching on the feature points with feature descriptors; calculates the internal and external parameter matrix of the line array camera according to the feature matching result and generates a calibration file; S3: generating calibration information according to the calibration file; calibrating the print head of the printer according to the calibration information, and sending an initialization end signal to the front-end processor of the image processing machine after the calibration is completed; S4: The front-end processor sends the printing task and the parsed printing data to the print head controller through the bus interface. The print head controller activates the print head engine according to the print head command register, starts printing data, and controls the image acquisition speed of the image processor through the motion acquisition control platform to be synchronized with the mechanical paper feed mechanism.

2. The method according to claim 1, characterized in that The print driver of the printer disables the scaling mode and rasterization processing, and the high-precision printing calibration plate adopts a circular mark array.

3. The method according to claim 1, characterized in that The line array camera is a contact image sensor, and the installation surface of the line array camera is parallel to the surface of the measured object; the line array camera uses an external triggering method to collect images, and collects an image once an external signal is received.

4. The method according to claim 1, characterized in that: The uniformity correction method is: The response outputs of different sensor units of the line array camera under the same light radiation flux are made consistent by performing a linear transformation on the response curves of the sensor units. The calculation formula is: V i (φ)=G i K i φ+(G i The i +B i ), Among them, V i (φ) is the response output after linear transformation, φ is the light radiation flux, G i is the correction factor, K i is the response rate of sensor unit i, O i is the dark current of sensor unit i, B i To correct the offset.

5. The method according to claim 1, characterized in that The feature point extraction method is as follows: taking the corresponding pixel points whose pixel values ​​are greater than the adjacent points in the graphic domain and the scale domain as feature points; eliminating the unstable feature points through the radial error; the feature descriptor is used to assign feature direction values ​​to the feature points to generate feature vectors, and the feature matching uses the Euclidean distance of the feature vectors as a similarity determination metric for image key points.

6. The method according to claim 1, characterized in that The internal and external parameter matrix includes a rotation matrix, a translation vector, a focal length, and a principal point coordinate; the rotation matrix and the translation vector are obtained by decomposing a basic matrix calculated through feature point matching results; the internal parameter matrix is ​​estimated by the least squares method based on the known feature points of the calibration plate and the mathematical model of the linear array camera, and the internal parameter matrix includes the focal length and the principal point coordinates; the internal and external parameter matrix is ​​optimized by minimizing the distance between the projection point and the actual image point, and the optimized internal and external parameter matrix is ​​saved as a calibration file.

7. The method according to claim 1, characterized in that The motion acquisition control platform controls the image processor and the mechanical paper feed mechanism simultaneously through the Camera Link line and the control line; the image processor performs operations in parallel through the data acquisition thread, the data processing thread, and the data storage thread, the data acquisition thread is used to obtain image data from the port and send a data processing request to the critical area, and after the data processing request is passed, the data packet of the image data is added to the data processing queue and the critical area occupied by the data processing request is released; the data processing thread determines whether the data processing queue is empty, if not empty, then reads the data packet from the head of the data processing queue and places it in the data storage queue, and deletes the read data packet from the data processing queue; the data storage thread determines whether the data storage queue is empty, if not empty, then reads the data packet from the head of the data storage queue and transmits it to the image registration unit for processing, and deletes the read data packet from the data storage queue; the image registration unit is used to perform the operation of S2.

8. A visual positioning calibration system using the printing calibration method based on visual positioning according to claim 1, characterized in that: include: Image acquisition module, image registration module, print correction module, motion acquisition control module; The image acquisition module is used to receive a print task through a printer, read a print file according to the print task, parse the print file, extract valid data, and then transmit it to the image processor; The image registration module is used to preset the cell size of the calibration plate, obtain a calibration image by photographing the calibration plate with a line array camera, and perform uniformity correction on the calibration image; extract feature points of the calibration image and the print file with radial error as a constraint condition, and perform feature matching on the feature points through feature descriptors; calculate the internal and external parameter matrix of the line array camera according to the feature matching result and generate a calibration file; The printing correction module is used to generate correction information according to the calibration file; calibrate the print head of the printer according to the correction information, and send an initialization end signal to the front-end processor of the image processing machine after the correction is completed; The motion acquisition control module is used to send the printing task and the parsed printing data to the print head controller through a bus interface. The print head controller activates the print head engine according to the print head command register, starts printing data, and controls the image acquisition speed of the image processor to be synchronized with the mechanical paper feed mechanism through the motion acquisition control platform.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the printing calibration method based on visual positioning as described in any one of claims 1-7 is implemented.

10. A storage medium containing computer executable instructions, characterized in that: The computer executable instructions are used to execute the printing calibration method based on visual positioning as described in any one of claims 1 to 7 when executed by a computer processor.