Dynamic real-time positioning and instant printing system and method based on machine vision
By installing camera equipment and vision software on a tracked printer, synchronous execution of scanning and printing and high-precision positioning are achieved, solving the problems of synchronization, accuracy and alignment in existing dynamic printing systems, and improving production efficiency and print quality.
Patent Information
- Application Number
- CN202511091191.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-11-14
AI Technical Summary
Existing dynamic printing systems cannot efficiently synchronize scanning and printing, have insufficient positioning accuracy, and are difficult to align templates, making it difficult to meet the high-efficiency and high-precision requirements of modern industrial production.
By installing a camera behind the crossbeam of the tracked printer, the movement of the track and the printer carriage are controlled synchronously. Combined with vision software for real-time imaging processing, nonlinear optimization algorithms and feature matching algorithms are used to realize image coordinate transformation and template alignment, ensuring synchronous execution of scanning and printing and high-precision positioning.
It achieves seamless synchronization of scanning and printing, improves production efficiency, ensures positioning accuracy and template alignment accuracy, reduces scrap rate, and meets the high-efficiency and high-precision printing requirements of modern industrial production.
Smart Images

Figure CN120941897A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial printing control technology, and more specifically, to a machine vision-based dynamic real-time positioning and instant printing system and method. Background Technology
[0002] In modern industrial production, automated material handling and labeling are key to improving production efficiency and quality. Traditional printing methods usually rely on manual material positioning and printing, which is not only inefficient and prone to human error, but also difficult to adapt to dynamic production environments, especially in scenarios that require continuous and rapid material handling, such as electronic component manufacturing, parts processing, and logistics packaging. Rapid material positioning and accurate printing are important factors in ensuring smooth production processes.
[0003] With the development of machine vision technology, its application in industrial automation has gradually attracted attention. Machine vision can automatically identify, locate, and measure objects through image processing technology, and has the advantages of high precision, high efficiency, and non-contact operation. However, the application of combining machine vision with dynamic printing in existing technologies still has many limitations: on the one hand, most existing vision positioning printing systems cannot achieve real-time dynamic scanning and printing simultaneously, and usually need to wait for the materials to fill the entire work area before batch processing can begin, which greatly reduces production efficiency; on the other hand, existing technologies still need to improve material positioning accuracy, especially in complex backgrounds or with irregular material shapes, where positioning deviations or failures are prone to occur; in addition, existing technologies also have shortcomings in the establishment and alignment of printing templates. Traditional template alignment methods usually rely on manual adjustment, which is not only time-consuming and labor-intensive, but also difficult to guarantee alignment accuracy. At the same time, if a positioning failure occurs during the printing process, existing systems often cannot remedy the situation in a timely and effective manner, leading to printing interruptions or increased scrap rates.
[0004] In summary, existing dynamic printing systems cannot efficiently synchronize scanning and printing, have insufficient positioning accuracy, and are difficult to align templates, making it difficult to meet the demands for high-efficiency and high-precision production. Summary of the Invention
[0005] To overcome the problems of existing dynamic printing systems, such as inefficient synchronous scanning and printing, insufficient positioning accuracy, and difficulty in template alignment, this invention discloses a machine vision-based dynamic real-time positioning and instant printing system and method that can effectively solve the above-mentioned technical problems.
[0006] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:
[0007] A machine vision-based dynamic real-time positioning and instant printing method includes the following steps: Installing a camera device behind the crossbeam of a tracked printer, wherein the scanning direction of the camera device is consistent with the X-axis movement direction of the printer carriage, and the scanning field of view is perpendicular to the track of the tracked printer.
[0008] Workers continuously place materials on the conveyor belt from behind the printer;
[0009] The track is controlled to step at a predetermined distance, and the printer carriage is simultaneously controlled to move the camera device along the X-axis to scan the material on the track and obtain real-time images.
[0010] The real-time imaging is processed by vision software to automatically locate the material position and generate the corresponding printed image;
[0011] The printed image is sent to the printer, which controls the print head to print on the material in real time. At the same time, the camera device continues to scan the newly placed material on the conveyor belt, so as to realize the synchronous execution of scanning and printing.
[0012] The vision software performs image coordinate transformation based on a pre-established coordinate mapping relationship during the material positioning process.
[0013] Preferably, after installing the camera equipment, the calibration procedure is performed:
[0014] Lay reference paper on the track and control the printer to print a checkerboard pattern on the reference paper.
[0015] Control the camera device to scan the checkerboard pattern to obtain a calibration image;
[0016] The mapping relationship between the image coordinates and material coordinates of the calibration imaging is calculated using vision software and stored as a coordinate mapping model;
[0017] The calibration process employs a nonlinear optimization algorithm.
[0018]
[0019] Where H is the homography matrix, For the theoretical coordinates of the calibration point, These are the measured coordinates; the calibration process is only executed once during the initial system installation.
[0020] Preferably, the calculation of the mapping relationship includes:
[0021] Use feature extraction algorithms to identify corner points in a checkerboard pattern;
[0022] The Homography matrix is calculated based on the corner points to establish a linear transformation from image coordinates to material coordinates;
[0023] Verify that the error threshold of the Homography matrix is less than a preset value; otherwise, re-perform the calibration.
[0024] Preferably, the template creation process is executed before printing:
[0025] Control the camera device to scan the material to obtain template images;
[0026] The visual software receives the material area selected by the user through its user interface.
[0027] Import the preset logo file and automatically align the logo to the material area based on the feature matching algorithm;
[0028] The aligned template is stored for subsequent printing image generation;
[0029] The template establishment process also includes an elastic registration step: uniformly selecting a set of control points on the labeled boundary; and using thin-plate spline transformation to solve for the displacement field that minimizes the energy function.
[0030] in, For the displacement field on the control point set, Let λ be the target point and λ be the regularization parameter.
[0031] Preferably, the feature matching algorithm includes:
[0032] SIFT feature points of the material extraction area;
[0033] Match the feature points of the LOGO file with the feature points of the material area;
[0034] Subpixel-level alignment is achieved by optimizing the matching results using the RANSAC algorithm.
[0035] Preferably, if the vision software detects a positioning failure when locating the material, a rescanning mechanism is triggered:
[0036] Pause printing; control the camera to rescan the failed area from multiple angles.
[0037] Printing resumes after the localization results are updated based on rescan imaging.
[0038] Preferably, the vision software processing of real-time imaging includes:
[0039] Apply image filtering algorithms to reduce noise;
[0040] Material outlines are segmented using edge detection;
[0041] The template matching algorithm is used to locate the precise coordinates of the material on the track.
[0042] Preferably, a machine vision-based dynamic real-time positioning and instant printing system includes:
[0043] A tracked printer equipped with a printhead and a movable carriage;
[0044] A camera device is installed behind the printer beam, wherein the scanning direction of the camera device is consistent with the X-axis movement direction of the printer carriage, and the scanning field of view is perpendicular to the track.
[0045] The control unit, connected to the camera device and the printer, is configured as follows:
[0046] Control the track to step at a predetermined distance, and simultaneously control the printer carriage to move the camera equipment along the X-axis to scan the material;
[0047] Acquire real-time images from camera devices;
[0048] The vision software module, running on the processor, is configured to process the real-time imaging to automatically locate the material position;
[0049] Generate a printable image and send it to the printer;
[0050] The system performs scanning and printing operations simultaneously while workers continuously place materials, without needing to fill the entire conveyor belt.
[0051] Preferably, an electronic device includes: a processor, and a memory storing a computer program; when the program is executed by the processor, it implements the method described above.
[0052] Preferably, a computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described above.
[0053] Compared with existing technologies, the advantages of this invention are as follows: Firstly, addressing the problem of existing dynamic printing systems' inefficient synchronous scanning and printing, this invention installs a camera behind the crossbeam of a tracked printer and synchronously controls the track's stepping and the printer carriage's movement, achieving seamless synchronous execution of scanning and printing. As workers continuously place materials from behind the printer, the camera scans the materials on the track in real time and acquires images. The vision software processes the images and automatically generates printable images, sending them to the printer for immediate printing. This process eliminates the need to wait for the track to be fully loaded, improving production efficiency, reducing material waiting time, and optimizing the production process. Secondly, addressing the problem of insufficient positioning accuracy in existing systems, this invention uses vision software to perform image coordinate transformation based on a pre-established coordinate mapping relationship during material positioning, ensuring positioning accuracy. During initial system installation, a calibration process is used to lay reference paper on the track and print a checkerboard pattern. After the camera scans and acquires the calibration image, a nonlinear optimization algorithm is used to calculate the mapping relationship between the image coordinates and the material coordinates, storing it as a coordinate mapping model. During actual positioning, the vision software reduces noise through image filtering, segments the material contour through edge detection, and uses a template matching algorithm to locate the material on the track. Precise coordinates improve material positioning accuracy, avoid printing offset issues, and ensure that the printed pattern accurately falls on the designated position on the material. Finally, addressing the difficulty of template alignment in existing systems, this invention performs a template establishment process before printing, achieving automatic and precise alignment between the logo and the material area through feature matching algorithms and flexible registration technology. After the camera scans the material to obtain a template image, the user selects the material area through a vision software interface. The system imports a preset logo file and optimizes the matching results based on SIFT feature point matching and RANSAC algorithms, achieving sub-pixel-level alignment. Furthermore, the template establishment process includes a flexible registration step, which further optimizes the template alignment effect by uniformly selecting a set of control points on the marked boundaries and using thin-plate spline transformation to solve for the displacement field that minimizes the energy function. This automated template alignment method not only improves alignment efficiency but also achieves high-precision pattern alignment, ensuring a perfect match between the printed pattern and the material area. In summary, this invention solves the problems of asynchronous dynamic scanning and printing, insufficient positioning accuracy, and difficulty in template alignment in existing dynamic printing systems, improving the efficiency and quality of dynamic printing and meeting the demands of modern industrial production for high-efficiency and high-precision printing. Attached Figure Description
[0054] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely exemplary. For those skilled in the art, other embodiments can be derived from the provided drawings without creative effort.
[0055] Figure 1 This is a diagram illustrating the steps of the method of the present invention; Figure 2 This is a top view of the device structure of the present invention;
[0056] Figure 3 This is a production flow chart for the present invention;
[0057] Figure 4 This is a system structure diagram of the present invention. Detailed Implementation
[0058] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent.
[0059] To better illustrate this embodiment, some parts in the accompanying drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions;
[0060] It will be understood by those skilled in the art that certain well-known structures and their descriptions may be omitted in the accompanying drawings.
[0061] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0062] Example 1
[0063] Please see Figure 1-3 A machine vision-based dynamic real-time positioning and instant printing method includes the following steps: Installing a camera device behind the crossbeam of a tracked printer, wherein the scanning direction of the camera device is consistent with the X-axis movement direction of the printer carriage, and the scanning field of view is perpendicular to the track of the tracked printer.
[0064] Workers continuously place materials on the conveyor belt from behind the printer;
[0065] The track is controlled to step at a predetermined distance, and the printer carriage is simultaneously controlled to move the camera device along the X-axis to scan the material on the track and obtain real-time images.
[0066] The real-time imaging is processed by vision software to automatically locate the material position and generate the corresponding printed image;
[0067] The printed image is sent to the printer, which controls the print head to print on the material in real time. At the same time, the camera device continues to scan the newly placed material on the conveyor belt, so as to realize the synchronous execution of scanning and printing.
[0068] The vision software performs image coordinate transformation based on a pre-established coordinate mapping relationship during the material positioning process.
[0069] After installing the camera equipment, perform the calibration procedure:
[0070] Lay reference paper on the track and control the printer to print a checkerboard pattern on the reference paper.
[0071] Control the camera device to scan the checkerboard pattern to obtain a calibration image;
[0072] The mapping relationship between the image coordinates and material coordinates of the calibration imaging is calculated using vision software and stored as a coordinate mapping model;
[0073] The calibration process employs a nonlinear optimization algorithm.
[0074]
[0075] Where H is the homography matrix, For the theoretical coordinates of the calibration point, These are the measured coordinates; the calibration process is only executed once during the initial system installation.
[0076] The calculation mapping relationship includes:
[0077] Use feature extraction algorithms to identify corner points in a checkerboard pattern;
[0078] The Homography matrix is calculated based on the corner points to establish a linear transformation from image coordinates to material coordinates;
[0079] Verify that the error threshold of the Homography matrix is less than a preset value; otherwise, re-perform the calibration.
[0080] Perform the template creation process before printing:
[0081] Control the camera device to scan the material to obtain template images;
[0082] The visual software receives the material area selected by the user through its user interface.
[0083] Import the preset logo file and automatically align the logo to the material area based on the feature matching algorithm;
[0084] The aligned template is stored for subsequent printing image generation;
[0085] The template establishment process also includes an elastic registration step: uniformly selecting a set of control points on the labeled boundary; and using thin-plate spline transformation to solve for the displacement field that minimizes the energy function.
[0086] in, For the displacement field on the control point set, Let λ be the target point and λ be the regularization parameter.
[0087] The feature matching algorithm includes:
[0088] SIFT feature points of the material extraction area;
[0089] Match the feature points of the LOGO file with the feature points of the material area;
[0090] Subpixel-level alignment is achieved by optimizing the matching results using the RANSAC algorithm.
[0091] If the vision software detects a positioning failure when locating materials, it triggers a rescanning mechanism:
[0092] Pause printing; control the camera to rescan the failed area from multiple angles.
[0093] Printing resumes after the localization results are updated based on rescan imaging.
[0094] The vision software processes real-time imaging, including:
[0095] Apply image filtering algorithms to reduce noise;
[0096] Material outlines are segmented using edge detection;
[0097] The template matching algorithm is used to locate the precise coordinates of the material on the track.
[0098] A high-resolution camera is fixed behind the crossbeam of the tracked printer, ensuring that the camera's scanning direction is consistent with the X-axis movement direction of the printer carriage, and that the scanning field of view is perpendicular to the track surface. Fine adjustments are required during installation to ensure that the camera's scanning range can completely cover the area where the material is placed on the track. After installation, tests are conducted to confirm that the camera and the printer carriage move in sync, without any significant lag or deviation.
[0099] The calibration process is performed only once during the initial system installation, and the specific steps are as follows:
[0100] Lay a flat reference sheet on the track, and control the printer to print a regular checkerboard pattern on the reference sheet. The grid distribution of the pattern should be uniform and clear to facilitate feature recognition.
[0101] The camera is controlled to scan the checkerboard pattern to obtain a clear calibration image. The image quality must meet the requirements of being blur-free and distortion-free to ensure the accuracy of the calculation.
[0102] The vision software processes the acquired calibration images, calculates the mapping relationship between image coordinates and material coordinates, and stores it as a coordinate mapping model. This process uses a nonlinear optimization algorithm to achieve coordinate transformation by solving the homography matrix, as shown in the following formula:
[0103]
[0104] Where H is the homography matrix, For the theoretical coordinates of the calibration point, These are the measured coordinates.
[0105] The calculated matrix is verified to check whether its error is within the preset range. If the error exceeds the preset value, the calibration process is re-executed until the accuracy requirements are met.
[0106] The camera device is controlled to scan standard electronic components to obtain images for creating templates. The selected standard electronic components must be representative and reflect the general characteristics of such components. Through the user interface of the vision software, the operator selects the area on the material that needs to be printed, such as a specific area on the front of the component.
[0107] Import the preset logo file, and the vision software uses the SIFT feature point extraction algorithm to extract feature points from the material area and the logo file respectively.
[0108] The feature points of the logo file are matched with the feature points of the material area, and then the matching results are optimized by the RANSAC algorithm to eliminate erroneous matching points, achieving sub-pixel level precision alignment.
[0109] To further improve alignment accuracy, the template establishment process also includes an elastic registration step: a set of control points is uniformly selected on the boundary of the marked material area, and the displacement field that minimizes the energy function is solved using thin-plate spline transformation, as shown in the following formula:
[0110]
[0111] in, For the displacement field on the control point set, For the corresponding target point, λ is the regularization parameter. The aligned template is stored for subsequent generation of printed images.
[0112] Workers continuously place electronic components on the conveyor belt from behind the printer, maintaining a certain continuity in the placement process. At the same time, they control the conveyor belt to move gradually at a set distance, and simultaneously control the printer carriage to move the camera equipment along the X-axis to scan the materials on the conveyor belt and acquire images of the materials in real time.
[0113] After receiving the real-time image, the vision software processes it according to the following steps:
[0114] Image filtering algorithms are applied to process the images, reducing noise interference and making material features clearer.
[0115] The outline of the material is segmented using an edge detection algorithm, thus defining the material's extent within the image.
[0116] Using a template matching algorithm, the material in real-time imaging is compared with a pre-established template to accurately locate the coordinates of the material on the track.
[0117] Based on a pre-established coordinate mapping relationship, the image coordinates obtained from the location are converted into physical coordinates that the printer can recognize.
[0118] The vision software generates a corresponding printable image based on the positioning results and sends it to the printer. After receiving the instruction, the printer controls the print head to print instantly at the designated position of the material. During the printing process, the camera device continues to scan the newly placed materials on the conveyor belt, realizing the synchronous execution of scanning and printing, without having to wait for the conveyor belt to be full of materials before batch processing.
[0119] If the vision software detects a positioning failure during the positioning process, such as an abnormal material placement that prevents recognition, it will immediately trigger a rescanning mechanism:
[0120] Pause the current printing operation to avoid printing deviations due to positioning errors.
[0121] The camera device is controlled to rescan the area where positioning failed from multiple angles and at multiple frequencies to obtain imaging information from more angles.
[0122] Based on the image obtained from the rescan, the vision software recalculates the positioning, updates the positioning results, and then resumes the printing operation.
[0123] By adopting the method of this embodiment, the marking printing in the electronic component manufacturing process is automated, eliminating the need for manual intervention in the positioning process and improving production efficiency. At the same time, through the high-precision positioning and template alignment technology of machine vision, the accuracy of printing is guaranteed, reducing waste caused by positioning deviations and meeting the needs of modern production for high-efficiency and high-precision printing.
[0124] Example 2
[0125] Please see Figure 2-4 A machine vision-based dynamic real-time positioning and instant printing system includes:
[0126] A tracked printer equipped with a printhead and a movable carriage;
[0127] A camera device is installed behind the printer beam, wherein the scanning direction of the camera device is consistent with the X-axis movement direction of the printer carriage, and the scanning field of view is perpendicular to the track.
[0128] The control unit, connected to the camera device and the printer, is configured as follows:
[0129] Control the track to step at a predetermined distance, and simultaneously control the printer carriage to move the camera equipment along the X-axis to scan the material;
[0130] Acquire real-time images from camera devices;
[0131] The vision software module, running on the processor, is configured to process the real-time imaging to automatically locate the material position;
[0132] Generate a printable image and send it to the printer;
[0133] The system performs scanning and printing operations simultaneously while workers continuously place materials, without needing to fill the entire conveyor belt.
[0134] The tracked printer is equipped with a printhead and a movable carriage. The printhead is used to perform printing operations on the surface of the material, and the movable carriage can move along the X-axis to drive the related equipment to complete the position adjustment for scanning and printing. The track serves as the material conveying carrier and can move step by step at a set distance to achieve continuous material conveying.
[0135] The camera is installed behind the printer beam, and its scanning direction is consistent with the X-axis movement direction of the printer carriage. The scanning field of view is perpendicular to the surface of the track. The camera has high resolution and fast imaging capabilities, and can capture clear images of the material on the track in real time, providing data support for positioning calculations.
[0136] The control unit connects to the camera and printer, and is responsible for coordinating the operation of each device.
[0137] The control system moves the track step by step at a predetermined distance, while simultaneously controlling the printer carriage to move the camera along the X-axis to ensure that the scanning range can cover the material.
[0138] It receives real-time imaging data transmitted from the camera device and sends it to the vision software module for processing.
[0139] It receives printing instructions generated by the vision software module and controls the printer's print head to perform printing operations.
[0140] The vision software module runs on the processor and is the core module for implementing machine vision functions. Its main functions include:
[0141] The real-time images acquired by the camera device are processed, and material features are extracted through algorithms such as filtering and edge detection.
[0142] The template matching algorithm is used to locate the material, and the image coordinates are converted into physical coordinates by a coordinate mapping model.
[0143] Based on the positioning results and the pre-established template, a printable image is generated and sent to the control unit to drive the printer to print.
[0144] Install the tracked printer at a designated location on the production line to ensure its stability and prevent printing accuracy from being affected by equipment shaking.
[0145] A camera is installed behind the printer beam. Mechanical adjustments are made to ensure that the camera's scanning direction is consistent with the X-axis movement direction of the printer carriage, and that the scanning field of view is perpendicular to the surface of the track. A calibration tool is used to finely adjust the camera's installation angle and position to ensure that the scanning range covers the material conveying path. The wiring between the control unit, the camera, and the printer is connected to ensure smooth and accurate transmission of data and control commands.
[0146] After the system is installed, the calibration process is executed (the specific steps are the same as the calibration process in the method embodiment), the mapping relationship between image coordinates and material coordinates is established, and the data is stored as a coordinate mapping model to provide a basis for positioning calculation.
[0147] According to the template creation process in the method embodiment, standard electronic components are scanned by a camera device to obtain template images. The printing template is created and stored through steps such as feature matching and flexible registration. Relevant parameters of the template, such as printing size and position offset, are set.
[0148] Through the control unit's operating interface, parameters such as the track's stepping distance, the printer carriage's moving speed, and the camera's scanning frequency can be set to ensure that the operating parameters of each device are matched to meet the needs of synchronous scanning and printing.
[0149] Workers place electronic components continuously on the conveyor belt from behind the printer. The conveyor belt moves step by step at a set distance, transporting the material to the scanning and printing area. At the same time, the control unit drives the printer carriage to move the camera equipment along the X-axis to scan the material on the conveyor belt in real time, acquire the image data of the material, and transmit it to the vision software module.
[0150] The vision software module processes the real-time images, calculates the positioning of the material, generates a printable image, and sends it to the control unit. The control unit drives the printer's print head to print instantly at the designated position on the material. During the printing process, the camera continuously scans the material that newly enters the scanning area, achieving synchronous scanning and printing.
[0151] When the system detects a positioning failure, the control unit immediately pauses the printing operation, controls the camera to rescan the failed area from multiple angles, and the vision software module recalculates the positioning result based on the new imaging data. Printing resumes after successful positioning to ensure the continuity of the production process.
[0152] This system automates and intelligentizes label printing in electronic component manufacturing scenarios. Through high-precision positioning and synchronous operation mechanisms using machine vision technology, it improves production efficiency, reduces errors caused by human factors, and lowers the scrap rate. The system can adapt to continuous and dynamic production environments and meet the demands of modern production for high-efficiency and high-precision printing.
[0153] Example 3
[0154] An electronic device includes: a processor and a memory storing a computer program; when the program is executed by the processor, it implements the method described above.
[0155] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described above.
[0156] The electronic device is the core of the machine vision-based dynamic real-time positioning and instant printing function. This device includes a high-performance processor and sufficient memory to run complex computer programs. The processor uses a multi-core architecture, such as an Intel Core i7 or AMD Ryzen 7 series, with a clock speed of at least 3.0 GHz to ensure rapid processing of image data and execution of complex algorithms. The memory includes at least 16 GB of RAM and 512 GB of SSD for temporary storage of image data and long-term storage of the operating system, applications, and image templates. When the computer program stored on the SSD is executed by the processor, the device can perform functions such as image acquisition and processing, coordinate transformation and positioning, instant printing control, and fault detection and handling. Specifically, the device acquires images in real time through a connected camera, applies image filtering algorithms to reduce noise, segments the material outline through edge detection, and uses template matching algorithms to locate the precise coordinates of the material on the conveyor belt. Based on a pre-established coordinate mapping relationship, the device converts the image coordinates into coordinates recognizable by the print head, generates a print image, and sends it to the printer, controlling the print head to perform instant printing on the material. If a positioning failure is detected, the device triggers a rescanning mechanism to ensure printing accuracy.
[0157] To achieve machine vision-based dynamic real-time positioning and instant printing, a storage medium is needed to store and distribute the relevant computer programs. Computer-readable storage media can be solid-state drives (SSDs), USB flash drives, or optical discs (CDs / DVDs). SSDs offer high capacity and high read / write speeds, making them suitable for internal device storage; USB flash drives facilitate portable storage and distribution of programs; and optical discs are used for backup and distribution. These storage media should possess good compatibility and durability. When the programs stored on these media are executed by a processor, they should be able to perform the same functions as electronic devices, including image acquisition and processing, coordinate transformation and positioning, instant printing control, and fault detection and handling. This ensures efficient system operation and maintenance, meeting the demands of modern industrial production for high-efficiency, high-precision printing.
[0158] By combining the aforementioned electronic devices and computer-readable storage media, machine vision-based dynamic real-time positioning and instant printing functions can be realized, improving production efficiency and print quality, reducing human error and scrap rate, and meeting the demands of modern production for high-efficiency and high-precision printing.
[0159] The same or similar labels correspond to the same or similar parts;
[0160] The terms used to describe positional relationships in the accompanying drawings are for illustrative purposes only and should not be construed as limiting this patent.
[0161] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. For those skilled in the art, other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all implementation methods here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the claims of the present invention.
Claims
1. A method for dynamic real-time positioning and instant printing based on machine vision, characterized in that, Includes the following steps: A camera device is installed behind the crossbeam of the tracked printer, wherein the scanning direction of the camera device is consistent with the X-axis movement direction of the printer carriage, and the scanning field of view is perpendicular to the track of the tracked printer. Workers continuously place materials on the conveyor belt from behind the printer; The track is controlled to step at a predetermined distance, and the printer carriage is simultaneously controlled to move the camera device along the X-axis to scan the material on the track and obtain real-time images. The real-time imaging is processed by vision software to automatically locate the material position and generate the corresponding printed image; The printed image is sent to the printer, which controls the print head to print on the material in real time. At the same time, the camera device continues to scan the newly placed material on the conveyor belt, so as to realize the synchronous execution of scanning and printing. The vision software performs image coordinate transformation based on a pre-established coordinate mapping relationship during the material positioning process.
2. The method as described in claim 1, characterized in that, After installing the camera equipment, perform the calibration procedure: Lay reference paper on the track and control the printer to print a checkerboard pattern on the reference paper; Control the camera device to scan the checkerboard pattern to obtain a calibration image; The mapping relationship between the image coordinates and material coordinates of the calibration imaging is calculated using vision software and stored as a coordinate mapping model; The calibration process employs a nonlinear optimization algorithm. Where H is the homography matrix, For the theoretical coordinates of the calibration point, These are the measured coordinates; the calibration process is only executed once during the initial system installation.
3. The method as described in claim 2, characterized in that, The calculation mapping relationship includes: Use feature extraction algorithms to identify corner points in a checkerboard pattern; The Homography matrix is calculated based on the corner points to establish a linear transformation from image coordinates to material coordinates; Verify that the error threshold of the Homography matrix is less than a preset value; otherwise, re-perform the calibration.
4. The method as described in claim 1, characterized in that, Perform the template creation process before printing: Control the camera device to scan the material to obtain template images; The visual software receives the material area selected by the user through its user interface. Import the preset logo file and automatically align the logo to the material area based on the feature matching algorithm; The aligned template is stored for subsequent printing image generation; The template establishment process also includes an elastic registration step: uniformly selecting a set of control points on the labeled boundary; and using thin-plate spline transformation to solve for the displacement field that minimizes the energy function. ;in, For the displacement field on the control point set, Let λ be the corresponding target point, and λ be the regularization parameter.
5. The method as described in claim 4, characterized in that, The feature matching algorithm includes: SIFT feature points of the material extraction area; Match the feature points of the LOGO file with the feature points of the material area; Subpixel-level alignment is achieved by optimizing the matching results using the RANSAC algorithm.
6. The method as described in claim 1, characterized in that, If the vision software detects a positioning failure when locating materials, it triggers a rescanning mechanism: Pause printing; control the camera to rescan the failed area from multiple angles. Printing resumes after the localization results are updated based on rescan imaging.
7. The method as described in claim 1, characterized in that, The vision software processes real-time imaging, including: Apply image filtering algorithms to reduce noise; Material outlines are segmented using edge detection; The template matching algorithm is used to locate the precise coordinates of the material on the track.
8. A machine vision-based dynamic real-time positioning and instant printing system, implemented by the method described in any one of claims 1-7, characterized in that, include: A tracked printer equipped with a printhead and a movable carriage; A camera device is installed behind the printer beam, wherein the scanning direction of the camera device is consistent with the X-axis movement direction of the printer carriage, and the scanning field of view is perpendicular to the track. The control unit, connected to the camera device and the printer, is configured as follows: Control the track to step at a predetermined distance, and simultaneously control the printer carriage to move the camera equipment along the X-axis to scan the material; Acquire real-time images from camera devices; The vision software module, running on the processor, is configured to process the real-time imaging to automatically locate the material position; Generate a printable image and send it to the printer; The system performs scanning and printing operations simultaneously while workers continuously place materials, without needing to fill the entire conveyor belt.
9. An electronic device, characterized in that, include: The processor and memory store a computer program; when the program is executed by the processor, it implements the method as described in any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.