Printing deviation correction method for roller printing machine and roller printing machine
By collecting and comparing printed images in real time, calculating deviation correction parameters, and automatically adjusting roller printer parameters, the problem that traditional printing deviation correction methods cannot correct deviations accurately in real time and achieve an efficient and accurate printing process.
Patent Information
- Application Number
- CN202510073711.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2045-01-17
AI Technical Summary
Traditional printing bias correction methods rely on manual inspection or simple mechanical adjustments, and cannot accurately monitor and correct deviations during the printing process in real time.
By collecting the surface images of the printed color layer in real time, comparing them with the surface images of the standard printed object, computing the pixel difference value and feature point matching, computing the displacement and scaling deviation correction parameters, and automatically adjusting the printing parameters of the roller printer.
Real-time and accurate printing deviation monitoring and correction are achieved, which avoids delays in manual intervention, improves the accuracy and production efficiency of the printing process, and reduces the human error rate.
Smart Images

Figure CN119459126B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image data processing, and in particular relates to a printing deviation correction method of a roller printing machine and the roller printing machine. Background Art
[0002] As the demand for high performance and miniaturization of modern electronic products continues to increase, the design and manufacturing process of electronic components are also continuing to develop. As a common electronic component, multilayer ceramic capacitors (MLCC) play an important role in modern electronic devices, especially in smartphones, computers and other high-precision circuits. In the production process of MLCC, precise surface printing technology is required to ensure the connection and function between different electrodes on the multilayer ceramic substrate.
[0003] In the manufacturing process of multilayer ceramic capacitors, traditional roller printers are widely used to print multi-color patterns, especially for precise layer overprinting on the surface of ceramic substrates. With the widespread application of electronic components such as multi-layer ceramic capacitors (MLCC), printing technology faces higher requirements. The manufacture of MLCC usually requires precise multi-layer printing, and the alignment, size and position of each layer of printed patterns must be strictly controlled. Therefore, how to accurately control the printing process of the roller printer to avoid quality problems caused by position deviation or dimensional error has become one of the key technologies to improve production efficiency and product quality.
[0004] However, traditional printing correction methods often rely on manual inspection or simple mechanical adjustments, and are unable to accurately monitor and correct deviations that occur during the printing process in real time. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a printing deviation correction method for a roller printing machine and a roller printing machine to solve the technical problem that traditional printing deviation correction methods often rely on manual inspection or simple mechanical adjustment and cannot accurately monitor and correct deviations occurring during the printing process in real time.
[0006] A first aspect of an embodiment of the present invention provides a printing deviation correction method for a roller printing machine, the printing deviation correction method for the roller printing machine comprising:
[0007] Acquire multiple color layers of a printed pattern and standard printed object surface images corresponding to each of the multiple color layers; the multiple color layers are used for multi-color overprinting to form the printed pattern; the standard printed object surface image refers to a standard printed image obtained by sequentially superimposing the color layers at preset positions of the object image; wherein different color layers have different printing orders;
[0008] Collecting in real time the surface image of the object with the printed color layer, and extracting the surface area of the object in the surface image of the object;
[0009] Extracting a first image region of the object surface region and a second image region of a current standard printed object surface image; the current standard printed object surface image refers to a standard printed object surface image corresponding to a printed color layer;
[0010] Calculating pixel differences at the same pixel positions between the first image area and the second image area, and counting the number of pixel positions at which the pixel differences are greater than a first threshold;
[0011] When the number of pixel positions is greater than a second threshold, acquiring a plurality of first feature points of the first image area and a plurality of second feature points of the second image area;
[0012] Matching displacement correction parameters according to the first distances between the plurality of first feature points and the object contour; the displacement correction parameters are used to correct the position deviation in the transmission direction;
[0013] Calculating a scaling correction parameter according to the distance difference between the plurality of first feature points and the plurality of second feature points; the scaling correction parameter is used to correct the excessive length or shortness of the longitudinal dimension of the printed color layer;
[0014] The printing parameters of the roller printing machine are adjusted according to the displacement correction parameters and / or the scaling correction parameters.
[0015] Furthermore, the step of collecting the surface image of the object having the printed color layer in real time and extracting the surface area of the object in the surface image of the object comprises:
[0016] Obtaining surface color information of the transmission structure;
[0017] Eliminating the image area corresponding to the surface color information in the surface image of the object to obtain an object image;
[0018] Identifying a plurality of first feature points in the object image;
[0019] Calculate the current direction vector formed by the two target first feature points, and obtain the standard direction vector of the target first feature point; the standard direction vector refers to the direction vector formed by the two target first feature points when the surface of the object is in the correct direction; the target first feature point refers to the first feature point pre-selected for direction correction;
[0020] Calculating the angle between the current direction vector and the standard direction vector;
[0021] The object image is rotated to a direction corresponding to the standard direction vector based on the included angle to obtain the surface area of the object.
[0022] Furthermore, the step of extracting the first image area of the object surface area and the second image area of the current standard printed object surface image includes:
[0023] Extracting a first current object surface area corresponding to a first preset area position in the object surface area; the first preset area position is a pre-set image area used to extract a key area on the object surface, and the key area refers to an object surface area used to carry a printed pattern;
[0024] According to the alignment parameter corresponding to the camera distance, the image size of the current standard printed object surface image is adjusted to the target size to obtain the adjusted current standard printed object surface image; the target size is consistent with the image size of the object surface image;
[0025] Extracting a second current object surface area corresponding to the first preset area position in the adjusted current standard printed object surface image;
[0026] Acquire original pixel value information of the key area on the surface of the object;
[0027] Eliminate the original pixel value information in the first current object surface area to obtain the first image area;
[0028] The original pixel value information in the second current object surface area is eliminated to obtain the second image area.
[0029] Furthermore, the step of identifying a plurality of first feature points in the object image includes:
[0030] Acquire a second preset area of the first feature point and a standard reference image of the first feature area; the second preset area is a preset image area, used to narrow the search area of the first feature point; the standard reference image refers to a preset standard image of the first feature area, and the first feature area refers to the first feature point and the surrounding image area of the first feature point;
[0031] Traversing each current pixel point in the second preset area, and extracting a rectangular pixel area based on each current pixel point; the rectangular pixel area is an area of fixed size and is centered on the current pixel point;
[0032] Calculating the similarity between the rectangular pixel area and the standard reference image;
[0033] The rectangular pixel area corresponding to the maximum similarity is taken as the first feature area;
[0034] The center of the first feature area is taken as the first feature point.
[0035] Furthermore, the step of calculating the similarity between the rectangular pixel area and the standard reference image includes:
[0036] Taking the same diagonal points of the rectangular pixel area and the standard reference image as the origin of the coordinate system respectively;
[0037] Calculating the pixel difference between two pixel points at the same coordinate position in the rectangular pixel area and the standard reference image; wherein the rectangular pixel area has the same image size as the standard reference image;
[0038] Counting the pixel values of the rectangular pixel area whose pixel difference is less than a third threshold;
[0039] The similarity is obtained by dividing the pixel value by the number of all pixels in the rectangular pixel area.
[0040] Furthermore, the step of matching the displacement correction parameter according to the first distance between the plurality of first feature points and the object contour includes:
[0041] Calculate the first center position of the surface contour of the object;
[0042] Calculating second center positions of the plurality of first feature points;
[0043] Obtaining the adjusted center position of the object surface contour and the center position of the second feature point in the current standard printed object surface image;
[0044] calculating a second distance between the first center position and the second center position;
[0045] Calculating a third distance between a center position of the surface contour of the object and a center position of the second feature point;
[0046] calculating a first difference between the second distance and the third distance;
[0047] If the first difference is greater than a fourth threshold, determining a correction direction according to a positive or negative value of the first difference;
[0048] The first difference is multiplied by the mapping coefficient to obtain the displacement correction parameter.
[0049] Furthermore, the step of calculating the scaling correction parameter according to the distance difference between the plurality of first feature points and the plurality of second feature points comprises:
[0050] Establishing a first coordinate system with the pre-selected first feature point as the origin;
[0051] Calculating a fourth distance between a preselected first feature point and other first feature points; the other first feature points refer to feature points other than the preselected first feature point among the plurality of first feature points;
[0052] A second coordinate system is established with the preselected second feature point as the origin; wherein the preselected first feature point and the preselected second feature point are the same feature point on the surface of the object;
[0053] Calculating a fifth distance between the pre-selected second feature point and other second feature points; the other second feature points refer to feature points other than the pre-selected second feature point among the plurality of second feature points;
[0054] Calculating a second difference between the fourth distance and the fifth distance corresponding to the same feature point on the surface of the object;
[0055] If the average of the plurality of second differences is greater than the fifth threshold, a feedback control algorithm is used based on the second differences to calculate the scaling correction parameter.
[0056] A second aspect of an embodiment of the present invention provides a printing deviation correction device for a roller printing machine, comprising:
[0057] A first acquisition unit is used to acquire a plurality of color layers of a printed pattern and standard printed object surface images corresponding to each of the plurality of color layers; the plurality of color layers are used for multi-color overprinting to form the printed pattern; the standard printed object surface image refers to a standard printed image obtained by sequentially superimposing the color layers at preset positions of the object image; wherein different color layers have different printing orders;
[0058] A collection unit, used for collecting the surface image of the object with the printed color layer in real time, and extracting the surface area of the object in the surface image of the object;
[0059] An extraction unit, used for extracting a first image area of an object surface area and a second image area of a current standard printed object surface image; the current standard printed object surface image refers to a standard printed object surface image corresponding to a printed color layer;
[0060] a first calculation unit, configured to calculate a pixel difference value of a same pixel position between the first image area and the second image area, and count the number of pixel positions where the pixel difference value is greater than a first threshold;
[0061] A second acquisition unit, configured to acquire a plurality of first feature points of the first image area and a plurality of second feature points of the second image area when the number of pixel positions is greater than a second threshold;
[0062] A matching unit, used to match a displacement correction parameter according to a first distance between the plurality of first feature points and the object contour; the displacement correction parameter is used to correct a position deviation in a transmission direction;
[0063] A second calculation unit is used to calculate a scaling correction parameter according to the distance difference between the plurality of first feature points and the plurality of second feature points; the scaling correction parameter is used to correct the excessive length or shortness of the longitudinal dimension of the printed color layer;
[0064] An adjustment unit is used to adjust the printing parameters of the roller printing machine according to the displacement correction parameter and / or the scaling correction parameter.
[0065] A third aspect of an embodiment of the present invention provides a roller printing machine, comprising a roller system, a camera, a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the printing deviation correction method of the roller printing machine described in the first aspect are implemented.
[0066] A fourth aspect of an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the printing deviation correction method of the roller printing machine described in the first aspect are implemented.
[0067] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: by collecting the surface image of the object with the printed color layer in real time and comparing it with the surface image of the standard printed object, the pattern deviation can be accurately identified, the delay of manual intervention is avoided, and the accuracy of the pattern alignment during the printing process is ensured. The present invention does not require manual participation, and uses image processing technology to automatically extract the surface area of the object and calculate the image difference, effectively avoiding manual inspection errors, improving production efficiency and accuracy, and reducing the human error rate. By analyzing the pixel difference of the image area and matching the feature points, the distance to the object contour is calculated, so as to accurately match the correction parameters. This process can be adjusted in real time during the printing process to ensure that each layer of the pattern is accurately aligned, and the quality and consistency of multi-color overprinting are improved. This method is suitable for overprinting of different color layers, wherein the printing order of each color layer may be different, and can flexibly adapt to various printing scenes, ensuring that a high level of printing accuracy can be maintained even in the multi-color printing process. By adjusting the printing deviation in a timely manner, the scrap rate caused by excessive deviation is avoided, and the time cost of manual inspection and adjustment is reduced, thereby improving the overall production efficiency. Since the deviation can be corrected in real time during the printing process, the present invention can effectively avoid printing defects such as pattern overlap and color deviation, ensure high-quality output in each printing cycle, and improve the overall quality and aesthetics of printed items. In short, the printing deviation correction method of the roller printing machine of the present invention solves the common problems of untimely deviation monitoring and low deviation correction accuracy in traditional methods through intelligent and automated technical means, and can greatly improve printing quality and production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0069] Figure 1 A schematic flow chart of a printing deviation correction method for a roller printing machine provided by the present invention is shown;
[0070] Figure 2 A schematic diagram of a printing deviation correction device of a roller printing machine provided by an embodiment of the present invention is shown;
[0071] Figure 3 A schematic diagram of a roller printing machine provided in one embodiment of the present invention is shown. DETAILED DESCRIPTION
[0072] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0073] The embodiment of the present invention provides a printing deviation correction method of a roller printing machine and a roller printing machine to solve the technical problem that traditional printing deviation correction methods often rely on manual inspection or simple mechanical adjustment and cannot accurately monitor and correct deviations occurring during the printing process in real time.
[0074] First, the present invention provides a printing deviation correction method for a roller printing machine. The printing deviation correction method for a roller printing machine is applied to a roller printing machine, which includes but is not limited to a roller system, a camera, a memory, a processor, and a printing deviation correction program for the roller printing machine stored in the memory and runnable on the processor. Figure 1 , Figure 1 FIG. 1 is a schematic flow chart of a printing deviation correction method for a roller printing machine provided by the present invention. Figure 1 As shown, the printing deviation correction method of the roller printing machine may include the following steps:
[0075] Step 101: obtaining a plurality of color layers of a printed pattern and standard printed object surface images corresponding to the plurality of color layers; the plurality of color layers are used for multi-color overprinting to form the printed pattern; the standard printed object surface image refers to a standard printed image obtained by sequentially superimposing the color layers at preset positions of the object image; wherein different color layers have different printing orders;
[0076] In the multi-color printing process, the printed pattern is formed by superimposing different color layers. Each color layer represents a part of the print, and these layers are superimposed in a specific order.
[0077] For each combination of color layers, a "standard" image is generated, which refers to the final printed image obtained on the surface of the object according to the predetermined color superposition sequence. This is an ideal image, which should be highly consistent with the actual printed image in theory.
[0078] Step 102: collecting an object surface image of the printed color layer in real time, and extracting an object surface area in the object surface image;
[0079] During the printing process, the surface images of the object with the completed color layer are collected in real time. These images are used to compare with the standard images to detect the deviation between the actual printing and the standard printing.
[0080] Extract the surface area of the object from the captured image. The surface area is the actual printed area, excluding the background or irrelevant parts, which is convenient for subsequent image analysis and comparison. The specific logic of extracting the surface area of the object in the object surface image is as follows:
[0081] Specifically, step 102 specifically includes steps 1021 to 1026:
[0082] Step 1021: Acquire surface color information of the transmission structure;
[0083] First, it is necessary to obtain the color data on the surface of the conveying structure (such as the conveyor belt) during the printing process. This color information is the color of the conveyor belt itself. By eliminating the image area corresponding to the surface color information, it is ensured that only the valid area related to the object surface is extracted, and the redundant background or interference information is effectively removed, thereby improving the extraction accuracy of the object surface area.
[0084] Step 1022: Eliminate the image area corresponding to the surface color information in the object surface image to obtain the object image;
[0085] In order to accurately extract the printed area of the object, this part of the color area needs to be eliminated to ensure that the subsequent image processing only focuses on the actual printed pattern on the surface of the object. After elimination, the "object image" is obtained, that is, the image after removing the background interference.
[0086] Step 1023: Identify a plurality of first feature points in the object image;
[0087] Specifically, step 1023 specifically includes steps A1 to A5:
[0088] Step A1: Acquire a second preset area of the first feature point and a standard reference image of the first feature area; the second preset area is a preset image area, used to narrow the search area of the first feature point; the standard reference image refers to a preset standard image of the first feature area, and the first feature area refers to the first feature point and the surrounding image area of the first feature point;
[0089] The second preset area is a predefined image area used to limit the range of feature point retrieval. By limiting the retrieval area, the whole image traversal is avoided and the algorithm efficiency is improved. This area is used to narrow the retrieval range, so as to focus on the area that may contain the first feature point and reduce unnecessary calculations.
[0090] The standard reference image is a standard image corresponding to the "first feature area". The standard reference image is an ideal image representing the "first feature area". By comparing with each candidate area in the current image, it is determined whether it meets the standard of the feature point.
[0091] Step A2: traverse each current pixel point in the second preset area, and extract a rectangular pixel area based on each current pixel point; the rectangular pixel area is a fixed-size area and is centered on the current pixel point;
[0092] This step traverses each pixel point of the second preset area to examine whether these pixels are the centers of potential first feature points one by one. The traversal process ensures that all possible areas in the image are considered and avoids missing key feature points.
[0093] For each current pixel point traversed, a fixed-size rectangular pixel area is extracted with the pixel point as the center. The size of this rectangular area is preset, and the position is determined based on the center of the current pixel point.
[0094] Step A3: Calculating the similarity between the rectangular pixel area and the standard reference image;
[0095] For each extracted rectangular pixel region, calculate its similarity with the standard reference image. The goal is to find the region that best matches the standard image, i.e. the "most similar region", by calculating the degree of match between each rectangular region and the standard reference image.
[0096] Specifically, step A3 includes steps A31 to A34:
[0097] Step A31: taking the same diagonal points of the rectangular pixel area and the standard reference image as the origin of the coordinate system respectively;
[0098] To ensure the accuracy of the comparison, the corresponding diagonal points of the rectangular pixel area and the standard reference image are used as the origin of the coordinate system. The two diagonal points of the rectangular area and the reference image will be aligned in the coordinate system to ensure that pixels at the same position can be directly compared.
[0099] Step A32: Calculate the pixel difference between two pixel points at the same coordinate position in the rectangular pixel area and the standard reference image; wherein the rectangular pixel area and the standard reference image have the same image size;
[0100] For each pair of pixels in the corresponding position of the rectangular pixel area and the standard reference image, calculate their differences. The purpose of this step is to quantify the difference in color or brightness of each pair of pixels as the basis for subsequent similarity calculations.
[0101] Step A33: counting the pixel values of the pixel points in the rectangular pixel area whose pixel difference is less than a third threshold;
[0102] A third threshold is set. For each pair of pixels in the rectangular pixel area and the standard reference image, if the pixel difference is less than the threshold, the difference between the two pixels is considered to be negligible, indicating that the two pixels are similar. By traversing all pixels in the rectangular area, the number of pixels whose pixel difference is less than the third threshold is counted. These pixels will be considered similar to the corresponding pixels in the standard reference image.
[0103] Step A34: Divide the pixel value by the number of all pixels in the rectangular pixel area to obtain the similarity.
[0104] The calculation of similarity is based on the ratio of "similar pixel count" to "total pixel count in the rectangular area". This step uses the ratio to represent the similarity between the rectangular area and the standard reference image. The closer the value is to 1, the more similar they are, and the closer it is to 0, the greater the difference. The high or low similarity value can be used to determine whether the rectangular area is a valid matching area of the standard reference image.
[0105] In this embodiment, by taking the same diagonal point of the rectangular pixel area and the standard reference image as the origin of the coordinate system and performing difference calculation on the pixel points at the same coordinate position, the difference between the two at each pixel can be accurately measured. This method ensures that the differences in all pixel positions can be accurately captured during the comparison process, thereby improving the accuracy of similarity calculation. The pixel value whose pixel difference is less than the preset threshold is statistically calculated and divided by the total number of pixels in the rectangular pixel area to obtain the similarity. In this way, the similarity between the rectangular area and the reference image can be quickly evaluated, avoiding the complexity of global comparison and improving the efficiency of calculation. A third threshold is set to determine whether the pixel difference is within an acceptable range, so that the technical solution can adapt to different image features and noise effects. The setting of the third threshold can be adjusted according to the needs of specific application scenarios, flexibly adapting to various image quality and detail requirements, and enhancing the robustness of the method. By counting the pixel points whose pixel difference is less than the third threshold, the differences caused by noise or slight deformation can be effectively ignored. Such processing helps to ensure that the final similarity value can reflect the true image similarity and reduce the possibility of misjudgment. The calculation of similarity only relies on simple comparison and statistics of pixel differences, and the operation is simple and efficient, and can be completed quickly in real-time applications. This solution does not require complex mathematical models or algorithms, reducing the calculation cost. By carefully comparing each pixel point, the calculated similarity is more accurate, which is helpful for subsequent image processing and feature point extraction.
[0106] Step A4: taking the rectangular pixel area corresponding to the maximum similarity as the first feature area;
[0107] After traversing all rectangular pixel areas, the area most similar to the standard reference image is selected. This area is considered to be the area that best meets the first feature point standard, that is, the first feature area.
[0108] The area corresponding to the maximum similarity should have the strongest visual match with the standard reference image, so this step ensures the accurate positioning of the feature points.
[0109] Step A5: taking the center of the first feature area as the first feature point.
[0110] In this embodiment, by limiting the feature point recognition to the second preset area, the search range is narrowed, and the efficiency and accuracy of feature point retrieval are greatly improved. This method can effectively avoid blind search within the entire image range, thereby accurately locating each first feature point and ensuring recognition accuracy. The standard reference image is used to perform matching calculations on each rectangular pixel area, and the position with the greatest similarity is the area where the first feature point is located. In this way, the area that best matches the standard reference image can be automatically identified, thereby ensuring the accurate positioning of the feature points and reducing misidentification caused by image deformation or noise interference. By limiting the second preset area to the preset image area and extracting a rectangular pixel area of a fixed size for each pixel point, the system can avoid processing too large or irrelevant areas in the calculation, thereby improving the computational efficiency of the feature point recognition process. Compared with the traditional feature point extraction method that simply relies on edge detection or color features, the present invention makes the extracted first feature points more accurate and reliable by performing similarity calculations on the standard reference image. Through maximum similarity matching, misidentification caused by image noise, blur or surface deformation can be effectively reduced, ensuring the accuracy and reliability of the feature points. The automated feature point extraction process of the present technical solution does not rely on manual intervention. By accurately identifying multiple feature points in the object image, basic data can be provided for subsequent calculations.
[0111] Step 1024: Calculate the current direction vector formed by the two target first feature points, and obtain the standard direction vector of the target first feature point; the standard direction vector refers to the direction vector formed by the two target first feature points when the surface of the object is in the correct direction; the target first feature point refers to the first feature point pre-selected for direction correction;
[0112] Select two target feature points and calculate the vector between them, which is called the "current direction vector". This vector describes the direction relationship in the object image, that is, the direction formed by the two feature points in the actual printing process.
[0113] Standard direction vector: A standard direction is set in advance, which represents the ideal vector between two feature points on the surface of an object in the correct direction. The standard direction vector is the theoretically correct direction, which is usually determined during design and ensures the correct alignment of the printed pattern.
[0114] Step 1025: Calculate the angle between the current direction vector and the standard direction vector;
[0115] Compare the angle between the current direction vector and the standard direction vector and calculate the degree of deviation between them. This angle value reflects the difference between the actual printing direction of the object surface and the expected correct direction.
[0116] Step 1026: Rotate the object image to a direction corresponding to the standard direction vector based on the angle to obtain the object surface area.
[0117] According to the calculated angle, the object image is rotated so that the current direction vector is aligned with the standard direction vector. The rotation operation can correct the direction deviation in the image and adjust the printed pattern of the object image to the correct direction. As a result of this step, the surface area of the object is correctly oriented, which is convenient for subsequent analysis or printing calibration. After the direction correction is completed, the actual printing area on the surface of the object (the area aligned after correction) is obtained. This is the area that is ultimately used for further printing correction or image analysis.
[0118] In this embodiment, by eliminating the image area corresponding to the surface color information, it is ensured that only the effective area related to the surface of the object is extracted, the redundant background or interference information is effectively removed, and the extraction accuracy of the surface area of the object is improved. By identifying multiple first feature points in the object image and calculating the angle between the current direction vector and the standard direction vector, the direction deviation of the object can be accurately obtained. This process can effectively correct the direction error caused by equipment offset or inaccurate object positioning during printing, and ensure the accuracy of the image direction. By pre-selecting the target first feature point for direction correction, feature point matching can be performed intelligently to accurately identify the correct direction of the object surface. The calculated angle enables the object image to be accurately rotated to the standard direction, greatly improving the automation and accuracy of image processing. Compared with the traditional manual inspection and adjustment method, the present invention adopts automated image processing technology, which can collect and correct the surface direction of the object in real time during the actual production process, avoid the delay and error of manual intervention, and improve production efficiency and the degree of automation of the production line. Through precise direction correction, it is possible to ensure that the printed pattern is accurately aligned on the surface of the object, reducing printing defects such as pattern distortion, overlap or misalignment caused by the wrong direction of the object, thereby improving the overall printing quality, especially in the multi-color printing process, ensuring the precise alignment of each color layer. The technical solution of the present invention realizes fast and accurate object surface area extraction and direction correction.
[0119] Step 103: extracting a first image region of the object surface region and a second image region of a current standard printed object surface image; the current standard printed object surface image refers to a standard printed object surface image corresponding to a printed color layer;
[0120] The first image area is a portion extracted from the acquired actual printing image, and represents the printing area of the object.
[0121] The second image region is a corresponding region extracted from the "standard printed object surface image" for comparison with the actual printed image.
[0122] Since different color layers correspond to different standard printed object surface images, it is necessary to match the current standard printed object surface image corresponding to the printed color layer.
[0123] Specifically, step 103 specifically includes steps 1031 to 1036:
[0124] Step 1031: extracting a first current object surface area corresponding to a first preset area position from the object surface area; the first preset area position is a preset image area used to extract a key area on the object surface, and the key area refers to an object surface area used to carry a printed pattern;
[0125] The first preset area position is a pre-set area in the surface area of the object, indicating a key area on the surface of the object. The key area is the part that carries the printed pattern. Based on the first preset area position, the corresponding area is extracted from the surface image of the object. The purpose of extraction is for subsequent analysis and comparison, especially for identifying the printed pattern area on the surface of the object.
[0126] Step 1032: adjusting the image size of the current standard printed object surface image to a target size according to the alignment parameter corresponding to the camera distance, to obtain an adjusted current standard printed object surface image; the target size is consistent with the image size of the object surface image;
[0127] The change of camera distance may result in different sizes of images. By obtaining the alignment parameters related to the camera distance, the size of the image can be adjusted to match the target size. Using the alignment parameters, the size of the current standard printed object surface image is adjusted to match the target size. The target size is usually the image size that matches the actual size of the object surface, which is used to ensure that the elements in the image are proportional to the actual object surface area.
[0128] Step 1033: extracting a second current object surface area corresponding to the first preset area position from the adjusted current standard printed object surface image;
[0129] After adjusting the image size, the corresponding area is extracted from the adjusted standard printed object surface image again based on the preset area position. At this time, since the image size has been adjusted, the extracted area should match the actual area in the object surface area. This ensures that the extracted area has a consistent scale and position with the actual object surface.
[0130] Step 1034: Obtaining original pixel value information of the key area on the surface of the object;
[0131] The original pixel value information refers to the original pixel value information of the key area before printing.
[0132] Step 1035: removing the original pixel value information in the first current object surface area to obtain the first image area;
[0133] The first image region is obtained by removing specific pixel information from the first current object surface region. This removal can be for the deletion of background, noise or unnecessary image parts, the purpose is to highlight the key area or remove irrelevant information, thereby improving the effectiveness of image processing.
[0134] Step 1036: Eliminate the original pixel value information in the second current object surface area to obtain the second image area.
[0135] Similarly, the original pixel value information is removed from the second current object surface region to obtain a second image region. Similar to the culling process of the first image region, the culling operation ensures that in subsequent processing and comparison, the region that actually needs to be analyzed can be focused on.
[0136] In this embodiment, by setting the position of the first preset area, the key area carrying the printed pattern on the surface of the object is accurately extracted. This method ensures that the extracted image area contains the most critical part related to the printed pattern, avoids interference from irrelevant areas, and thus improves the accuracy and effectiveness of image processing. The present invention adjusts the size of the current standard printed object surface image according to the alignment parameters corresponding to the camera distance, so that the adjusted standard image size is consistent with the image size of the object surface area. Through this adjustment, the problem of image size mismatch is solved, and it is ensured that different images have a unified scale during image comparison and area extraction, which effectively improves the accuracy of image alignment. By extracting the corresponding first current object surface area and the second current object surface area in the object surface area and the standard printed image area respectively, and removing the original pixel value information, the pure first image area and the second image area can be efficiently obtained. This operation ensures that unnecessary background information is eliminated, thereby improving the accuracy of image processing and the effectiveness of subsequent analysis.
[0137] Step 104: calculating pixel differences of the same pixel positions between the first image area and the second image area, and counting the number of pixel positions whose pixel differences are greater than a first threshold;
[0138] Coordinate systems are established at the same diagonal points in the first image area and the second image area, respectively. Pixel points at the same pixel position in the first image area and the second image area are obtained, and pixel differences are calculated. If the pixel difference is greater than a first threshold, it means that the difference between the pixel values of the two is large.
[0139] Step 105: when the number of pixel positions is greater than a second threshold, acquiring a plurality of first feature points of the first image area and a plurality of second feature points of the second image area;
[0140] The number of pixel positions with large differences is counted. If the number is greater than the second threshold, it means that a large deviation has occurred in the entire printing process and correction processing is required.
[0141] A plurality of feature points are extracted from the first image region and the second image region. These feature points are usually parts with significant changes in the image and can represent the structure of the image. By calculating the distance between these feature points and the object contour, the deviation of the image position can be obtained, and the nature and size of the deviation can be further determined.
[0142] Step 106: matching displacement correction parameters according to the first distances between the plurality of first feature points and the object contour; the displacement correction parameters are used to correct the position deviation in the transmission direction;
[0143] Specifically, step 106 specifically includes steps 1061 to 1068:
[0144] Step 1061: Calculate the first center position of the surface contour of the object;
[0145] First, the geometric center (i.e., centroid) of the contour is calculated based on the contour line or boundary of the object surface. This center position represents the geometric center of the object contour and is the reference point for subsequent correction and comparison.
[0146] Step 1062: Calculate the second center positions of the plurality of first feature points;
[0147] The first feature point is a point with obvious features on the surface of an object or in a printed pattern (for example, a corner point, a key mark point, etc.). By calculating the geometric center of these feature points, their second center position is obtained. This is the average position of multiple feature points and is usually used to describe the overall position of a group of feature points.
[0148] Step 1063: Obtain the adjusted center position of the object surface contour and the center position of the second feature point in the current standard printed object surface image;
[0149] It can be understood that the center position of the object surface contour and the center position of the second feature point are the correct center positions, which are used as standard reference positions. Then, based on the distance between the center position of the object surface contour and the center position of the second feature point, which are the correct center positions, it is determined whether the second center position is displaced.
[0150] Step 1064: Calculate a second distance between the first center position and the second center position;
[0151] The difference between the first center position of the object surface contour and the second center position of the plurality of first feature points is calculated using the Euclidean distance or other measurement methods. By calculating the distance between the two center positions, the relative displacement between the object contour and the feature point group can be evaluated.
[0152] Step 1065: Calculate a third distance between the center position of the object surface contour and the center position of the second feature point;
[0153] It can be understood that the third distance is the correct standard distance, while the second distance is the distance generated during the actual printing process.
[0154] Step 1066: Calculate a first difference between the second distance and the third distance;
[0155] The first difference is obtained by calculating the difference between the second distance and the third distance. This difference reflects the relative displacement change between the object contour and the center position of the feature point. The larger the difference, the more obvious the position offset between the contour and the feature point.
[0156] Step 1067: If the first difference is greater than a fourth threshold, determining a correction direction according to a positive or negative value of the first difference;
[0157] A fourth threshold is set to determine whether displacement correction is required. If the first difference exceeds this threshold, it indicates that there is a large displacement deviation and correction is required. The direction of correction is determined based on the positive or negative value of the first difference. For example, if the first difference is positive, it means that the actual position of the object deviates from a certain direction (such as the transmission direction), and correction is required in the opposite direction.
[0158] Step 1068: Multiply the first difference by the mapping coefficient to obtain the displacement correction parameter.
[0159] In order to convert the displacement difference into the actual correction amount, a mapping coefficient is used. This coefficient converts the difference into the actual displacement correction amount, which is used to adjust the positioning of the image or object. By multiplying the first difference with the mapping coefficient, a final displacement correction parameter is obtained.
[0160] In this embodiment, by calculating the first center position of the surface contour of the object and the second center position of the plurality of first feature points, the object surface and the feature points are accurately positioned. Accurately calculating the two center positions provides a basis for subsequent error correction and displacement correction, and ensures the accuracy of the correction process. By calculating the second distance between the first center position and the second center position, and the third distance between the center position of the surface contour of the object and the center position of the second feature point, the present technology can accurately measure the displacement error between the object contour and the feature point. By comparing the two distances, the deviation between the object position and the image coordinates can be effectively identified. The present invention calculates the first difference between the second distance and the third distance, and determines the correction direction according to the positive and negative values of the difference. When the first difference is greater than the fourth threshold, it can intelligently determine whether correction is required and determine the direction of correction. This mechanism can dynamically adjust the correction parameters, flexibly respond in different situations, and ensure accurate positioning of the image or object. By multiplying the first difference with the mapping coefficient to obtain the displacement correction parameter, the present technology realizes automatic correction parameter adjustment. Through this algorithm, the system can automatically adjust the correction force according to the actual error size without manual intervention, thereby improving processing efficiency and accuracy. This technical solution can accurately detect the deviation between the object and the standard image, and dynamically adjust the image position, so as to improve the alignment accuracy between the object surface and the printed pattern. In the long-term or high-speed production process, the slight deviation between the object and the image may gradually accumulate, thus affecting the product quality. The real-time deviation correction of displacement by this technology can effectively avoid the accumulation of errors, ensure that each batch of production can maintain consistent accuracy, and reduce quality fluctuations and defective products. Since this technology can accurately calculate the relative position difference between the object surface and the image feature points, it can effectively improve the accuracy of the automatic detection and calibration system. In summary, the present invention can efficiently and accurately perform displacement correction of images or objects by calculating the first distance, the second distance and the third distance, as well as intelligently judging the correction direction and adjusting the displacement correction parameters.
[0161] Step 107: Calculating a scaling correction parameter according to the distance difference between the plurality of first feature points and the plurality of second feature points; the scaling correction parameter is used to correct the excessive length or shortness of the longitudinal dimension of the printed color layer;
[0162] Specifically, step 107 includes steps 1071 to 1076:
[0163] Step 1071: Establishing a first coordinate system with the pre-selected first feature point as the origin;
[0164] Among multiple first feature points, select one feature point as the reference point, i.e. the "origin". Create a new coordinate system with the pre-selected first feature point as the origin. The positions of all other first feature points will be expressed relative to the origin, so that their positions can be standardized for subsequent calculations.
[0165] Step 1072: Calculate a fourth distance between the pre-selected first feature point and other first feature points; the other first feature points refer to feature points other than the pre-selected first feature point among the plurality of first feature points;
[0166] Calculate the Euclidean distance or other metric difference between the pre-selected first feature point and all other first feature points. Since these points are in the same coordinate system, these distances can measure the relative positions of these feature points relative to the pre-selected first feature point.
[0167] Step 1073: Establishing a second coordinate system with the pre-selected second feature point as the origin; wherein the pre-selected first feature point and the pre-selected second feature point are the same feature point on the surface of the object;
[0168] Select one of the multiple second feature points as the reference point, i.e. the "origin". Create a new coordinate system with the pre-selected second feature point as the origin. The positions of all other second feature points will be expressed relative to the origin for subsequent calculations and comparisons.
[0169] Step 1074: Calculate a fifth distance between the pre-selected second feature point and other second feature points; the other second feature points refer to feature points other than the pre-selected second feature point among the plurality of second feature points;
[0170] The distance differences between the pre-selected second feature point and all other second feature points are calculated. These distances reflect the position changes of other feature points relative to the pre-selected second feature point.
[0171] Step 1075: Calculate a second difference between the fourth distance and the fifth distance corresponding to the same feature point on the surface of the object;
[0172] On the surface of the object, the pre-selected first feature point and the pre-selected second feature point are corresponding points on the same object. By calculating the difference between the fourth distance (the distance in the first coordinate system) and the fifth distance (the distance in the second coordinate system) corresponding to the two feature points, the relative scaling difference between the two sets of feature points on the surface of the object can be reflected.
[0173] Step 1076: If the average of the plurality of second differences is greater than the fifth threshold, a feedback control algorithm is used based on the second differences to calculate the scaling correction parameters.
[0174] The second differences corresponding to all the same feature points are averaged to obtain an overall scaling difference value. A threshold is set. If the average of the second differences is greater than this threshold, it means that there is an obvious scaling error between the feature points on the surface of the object, reaching the level that requires correction. The feedback control algorithm is used to calculate and obtain the final scaling correction parameters. The feedback control algorithm is used to dynamically adjust the parameters. It detects the error (i.e., the second difference) and adjusts the roller speed according to the size of the error until the error is reduced to an acceptable range. The feedback control algorithm is used to calculate the roller speed (i.e., the scaling correction parameter).
[0175] Optionally, the feedback control algorithm may adopt a traditional feedback control algorithm, and this embodiment provides a new feedback control algorithm, as shown in the following mathematical model:
[0176]
[0177] in, Indicates the adjusted roller speed (i.e. scaling correction parameter), Indicates the current roller speed. Indicates the ratio of speed adjustment. represents the integral of the speed adjustment, represents the second difference, Indicates the correction cycle duration. represents the differential coefficient of speed adjustment, and Represents the dynamic adjustment factor related to the abnormal amount. Represents the damping coefficient of the system, which is used to ensure stability. Represents the time constant used to smooth the response of speed adjustment.
[0178] By directly dividing the current error (the second difference) by a proportionality constant Multiply them together to determine the adjustment range. Indicates that if the current abnormal amount The larger the size, the greater the roller speed needs to be adjusted to reduce the printing pattern error.
[0179] It is to compensate for the historical accumulation of errors by weighting the historical integral term of the abnormal amount (through the coefficient The function of the integral term is to eliminate long-term errors. For example, if the printed pattern is always too large, the proportional control can only make an immediate correction, but the integral control can slowly adjust the speed by continuously accumulating the deviation, and eventually eliminate these long-term errors. It can help eliminate persistent small errors or system offsets.
[0180] Based on the rate of change of error (i.e. ), used to predict the future trend of abnormal quantity and respond in advance when the abnormal quantity changes rapidly. For example, if the abnormal quantity changes very quickly, the differential control will appropriately increase the speed adjustment to prevent the accumulation of excessive deviations. The differential control can reduce the overshoot and oscillation of the system and improve the response speed and stability.
[0181] This term combines the amount of anomaly and a factor that decays over time , which acts as a dynamic correction for short-term anomalies, gradually reducing the adjustment over time. Often, anomalies may require a quick response when they occur, but their impact will gradually weaken over time. Therefore, the attenuation factor ensures that the adjustment of roller speed does not last too long and avoid over-correction. Controls the strength of the dynamic response.
[0182] This term is used to adjust the stability of the system. It suppresses excessive speed fluctuations and mutations by integrating the square of the abnormal quantity change rate (speed change). Specifically, if the abnormal quantity changes drastically, the damping term will increase the speed adjustment strength, slow down the system response, and prevent excessive response or oscillation. Control the intensity of the damping effect to ensure a smooth response of the system. The integral form is weighted by the rate of change of the squared error, which can provide stronger suppression for drastic changes.
[0183] The control strategy objectives of the feedback control algorithm are:
[0184] Instant correction: Respond to current and future abnormalities through proportional and derivative control.
[0185] Long-term adjustment: Eliminate persistent deviations through integral control.
[0186] Dynamic response: Respond to abnormal quantities in a timely manner through dynamic adjustment items to avoid over-correction.
[0187] System stability: The damping term is used to suppress excessive fluctuations in abnormal quantity changes to ensure smooth adjustment of the system.
[0188] The core principle of the feedback control algorithm is the combination of response and stability. When the system detects an anomaly in the printing pattern in the conveying direction, the mathematical model adjusts the roller speed according to the current anomaly amount and its history and rate of change. Through proportional, integral and differential adjustments, combined with dynamic adjustment and damping mechanisms, the system can respond to anomalies quickly and accurately, and avoid over-adjustment or oscillation.
[0189] In this embodiment, by establishing the first coordinate system and the second coordinate system with the preselected first feature point and the second feature point as the origin, the accurate positioning and coordinate conversion of the feature points on the surface of the object are ensured. This method provides a stable reference framework, which is helpful for further distance calculation and correction of scaling errors. By calculating the fourth distance between the preselected first feature point and the other first feature point, and the fifth distance between the preselected second feature point and the other second feature point, the present technology can accurately measure the relative position between the feature points on the surface of the object. The calculation of these distances provides core data for subsequent scaling error analysis. The present invention can effectively identify the scaling error between the surface image of the object or the object by calculating the second difference between the fourth distance and the fifth distance corresponding to the same feature point on the surface of the object. This difference analysis method can accurately reflect the size and distribution of the scaling error for the relative changes between different feature points, thereby providing a reliable basis for subsequent correction calculations. When the mean of multiple second differences is greater than the fifth threshold, the scaling correction parameter is calculated based on the second difference by a feedback control algorithm. This feedback mechanism can dynamically adjust the correction force to ensure the automation and accuracy of the correction process. As the error changes, the feedback algorithm can adjust the correction strategy in real time, avoid manual intervention, and improve the automation and intelligence level of the production process. In a long or high-frequency production process, the scaling error of the surface image of the object may gradually accumulate, affecting product quality and production stability. This technical solution can effectively eliminate this error accumulation through real-time scaling correction, ensuring that each batch of production can maintain consistent accuracy, thereby improving the overall production quality.
[0190] Step 108: adjusting the printing parameters of the roller printing machine according to the displacement correction parameters and / or the scaling correction parameters.
[0191] In this embodiment, by collecting the surface image of the object with the printed color layer in real time and comparing it with the surface image of the standard printed object, the pattern deviation can be accurately identified, the delay of manual intervention is avoided, and the accuracy of the pattern alignment during the printing process is ensured. The present invention does not require manual participation, and uses image processing technology to automatically extract the surface area of the object and calculate the image difference, effectively avoiding manual inspection errors, improving production efficiency and accuracy, and reducing the human error rate. By analyzing the pixel difference of the image area and matching the feature points, the distance to the object contour is calculated, so as to accurately match the correction parameters. This process can be adjusted in real time during the printing process to ensure that each layer of the pattern is accurately aligned, and the quality and consistency of multi-color overprinting are improved. This method is suitable for overprinting of different color layers, wherein the printing order of each color layer may be different, and can flexibly adapt to various printing scenes, ensuring that a high level of printing accuracy can be maintained even in the multi-color printing process. By adjusting the printing deviation in a timely manner, the scrap rate caused by excessive deviation is avoided, and the time cost of manual inspection and adjustment is reduced, thereby improving the overall production efficiency. Since the deviation can be corrected in real time during the printing process, the present invention can effectively avoid printing defects such as pattern overlap and color deviation, ensure high-quality output in each printing cycle, and improve the overall quality and aesthetics of printed items. In short, the printing deviation correction method of the roller printing machine of the present invention solves the common problems of untimely deviation monitoring and low deviation correction accuracy in traditional methods through intelligent and automated technical means, and can greatly improve printing quality and production efficiency.
[0192] like Figure 2 The present invention provides a printing deviation correction device for a roller printing machine, see Figure 2 , Figure 2 A schematic diagram of a printing deviation correction device of a roller printing machine provided by the present invention is shown. Figure 2 The printing deviation correction device of a roller printing machine shown comprises:
[0193] The first acquisition unit 21 is used to acquire multiple color layers of the printed pattern and standard printed object surface images corresponding to the multiple color layers; the multiple color layers are used for multi-color overprinting to form the printed pattern; the standard printed object surface image refers to a standard printed image obtained by sequentially superimposing the color layers at preset positions of the object image; different color layers have different printing orders;
[0194] The acquisition unit 22 is used to acquire the surface image of the object with the printed color layer in real time and extract the surface area of the object in the surface image of the object;
[0195] An extraction unit 23 is used to extract a first image area of the object surface area and a second image area of the current standard printed object surface image; the current standard printed object surface image refers to the standard printed object surface image corresponding to the printed color layer;
[0196] A first calculation unit 24 is used to calculate the pixel difference between the first image area and the second image area at the same pixel position, and count the number of pixel positions where the pixel difference is greater than a first threshold;
[0197] A second acquisition unit 25, configured to acquire a plurality of first feature points of the first image area and a plurality of second feature points of the second image area when the number of pixel positions is greater than a second threshold;
[0198] A matching unit 26, configured to match a displacement correction parameter according to a first distance between the plurality of first feature points and the object contour; the displacement correction parameter is used to correct a position deviation in a transmission direction;
[0199] A second calculation unit 27 is used to calculate a scaling correction parameter according to the distance difference between the plurality of first feature points and the plurality of second feature points; the scaling correction parameter is used to correct the excessive length or shortness of the longitudinal dimension of the printed color layer;
[0200] The adjustment unit 28 is used to adjust the printing parameters of the roller printing machine according to the displacement correction parameter and / or the scaling correction parameter.
[0201] The present invention provides a printing deviation correction device for a roller printing machine. By real-time acquisition of the surface image of the object with the printed color layer and comparison with the surface image of the standard printed object, the pattern deviation can be accurately identified, the delay of manual intervention is avoided, and the accuracy of the pattern alignment during the printing process is ensured. The present invention does not require manual participation, and uses image processing technology to automatically extract the surface area of the object and calculate the image difference, effectively avoiding manual inspection errors, improving production efficiency and accuracy, and reducing the human error rate. By analyzing the pixel difference of the image area and matching the feature points, the distance to the object contour is calculated, so as to accurately match the deviation correction parameters. This process can be adjusted in real time during the printing process to ensure that each layer of the pattern is accurately aligned, and the quality and consistency of multi-color overprinting are improved. The method is suitable for overprinting of different color layers, wherein the printing order of each color layer may be different, and can flexibly adapt to various printing scenes, ensuring that a high level of printing accuracy can be maintained even in the multi-color printing process. By timely adjusting the printing deviation, the scrap rate caused by excessive deviation is avoided, and the time cost of manual inspection and adjustment is reduced, thereby improving the overall production efficiency. Since the deviation can be corrected in real time during the printing process, the present invention can effectively avoid printing defects such as pattern overlap and color deviation, ensure high-quality output in each printing cycle, and improve the overall quality and aesthetics of printed items. In short, the printing deviation correction method of the roller printing machine of the present invention solves the common problems of untimely deviation monitoring and low deviation correction accuracy in traditional methods through intelligent and automated technical means, and can greatly improve printing quality and production efficiency.
[0202] Figure 3 FIG. 1 is a schematic diagram of a roller printing machine provided by an embodiment of the present invention. Figure 3 As shown, a roller printing machine 3 of this embodiment includes: a processor 30, a memory 31, a roller system 33, a camera 34, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as a printing deviation correction program of a roller printing machine. When the processor 30 executes the computer program 32, the steps of the printing deviation correction method of the roller printing machine described above are implemented, such as Figure 1 Alternatively, when the processor 30 executes the computer program 32, the functions of each unit in the above-mentioned device embodiments are realized, for example, Figure 2 Function of the unit shown.
[0203] Exemplarily, the computer program 32 may be divided into one or more units, which are stored in the memory 31 and executed by the processor 30 to implement the present invention. The one or more units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 32 in the roller printing machine 3. For example, the computer program 32 may be divided into the following specific functions of each unit:
[0204] A first acquisition unit is used to acquire a plurality of color layers of a printed pattern and standard printed object surface images corresponding to each of the plurality of color layers; the plurality of color layers are used for multi-color overprinting to form the printed pattern; the standard printed object surface image refers to a standard printed image obtained by sequentially superimposing the color layers at preset positions of the object image; wherein different color layers have different printing orders;
[0205] A collection unit, used for collecting the surface image of the object with the printed color layer in real time, and extracting the surface area of the object in the surface image of the object;
[0206] An extraction unit, used for extracting a first image area of an object surface area and a second image area of a current standard printed object surface image; the current standard printed object surface image refers to a standard printed object surface image corresponding to a printed color layer;
[0207] a first calculation unit, configured to calculate a pixel difference value of a same pixel position between the first image area and the second image area, and count the number of pixel positions where the pixel difference value is greater than a first threshold;
[0208] A second acquisition unit, configured to acquire a plurality of first feature points of the first image area and a plurality of second feature points of the second image area when the number of pixel positions is greater than a second threshold;
[0209] A matching unit, used to match a displacement correction parameter according to a first distance between the plurality of first feature points and the object contour; the displacement correction parameter is used to correct a position deviation in a transmission direction;
[0210] A second calculation unit is used to calculate a scaling correction parameter according to the distance difference between the plurality of first feature points and the plurality of second feature points; the scaling correction parameter is used to correct the excessive length or shortness of the longitudinal dimension of the printed color layer;
[0211] An adjustment unit is used to adjust the printing parameters of the roller printing machine according to the displacement correction parameter and / or the scaling correction parameter.
[0212] The roller printing machine includes but is not limited to a processor 30 and a memory 31. Those skilled in the art will appreciate that Figure 3 It is only an example of a roller printing machine 3 and does not constitute a limitation of a roller printing machine 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the roller printing machine may also include input and output devices, network access devices, buses, etc.
[0213] The processor 30 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0214] The memory 31 may be an internal storage unit of the roller printing machine 3, such as a hard disk or memory of the roller printing machine 3. The memory 31 may also be an external storage device of the roller printing machine 3, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the roller printing machine 3. Further, the memory 31 may also include both an internal storage unit and an external storage device of the roller printing machine 3. The memory 31 is used to store the computer program and other required programs and data. The memory 31 may also be used to temporarily store data that has been output or is to be output.
[0215] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0216] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present invention. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0217] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0218] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0219] An embodiment of the present invention provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0220] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include at least: recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0221] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0222] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0223] In the embodiments provided by the present invention, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0224] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed over multiple network units.
[0225] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0226] It should also be understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0227] As used in the present specification and the appended claims, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to monitoring, depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is monitored" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is monitored" or "in response to monitoring [described condition or event]", depending on the context.
[0228] In addition, in the description of the present specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0229] References to "one embodiment" or "some embodiments" etc. described in the present specification mean that one or more embodiments of the present invention include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0230] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A printing deviation correction method for a roller printing machine, characterized in that: The printing deviation correction method of the roller printing machine comprises: Acquire multiple color layers of a printed pattern and standard printed object surface images corresponding to each of the multiple color layers; the multiple color layers are used for multi-color overprinting to form the printed pattern; the standard printed object surface image refers to a standard printed image obtained by sequentially superimposing the color layers at preset positions of the object image; wherein different color layers have different printing orders; Real-time acquisition of surface images of objects with printed color layers; Obtaining surface color information of the transmission structure; Eliminating the image area corresponding to the surface color information in the surface image of the object to obtain an object image; Identifying a plurality of first feature points in the object image; Calculate the current direction vector formed by the two target first feature points, and obtain the standard direction vector of the target first feature point; the standard direction vector refers to the direction vector formed by the two target first feature points when the surface of the object is in the correct direction; the target first feature point refers to the first feature point pre-selected for direction correction; Calculating the angle between the current direction vector and the standard direction vector; Rotating the object image to a direction corresponding to the standard direction vector based on the included angle to obtain a surface area of the object; Extracting a first image area of the object surface area and a second image area of the current standard printed object surface image; the current standard printed object surface image refers to a standard printed object surface image corresponding to the printed color layer; the first image area refers to a part extracted from the collected actual printed image, representing the printed area of the object; Calculating pixel differences at the same pixel positions between the first image area and the second image area, and counting the number of pixel positions at which the pixel differences are greater than a first threshold; When the number of pixel positions is greater than a second threshold, acquiring a plurality of first feature points of the first image area and a plurality of second feature points of the second image area; Matching displacement correction parameters according to the first distances between the plurality of first feature points and the object contour; the displacement correction parameters are used to correct the position deviation in the transmission direction; Calculating a scaling correction parameter according to the distance difference between the plurality of first feature points and the plurality of second feature points; the scaling correction parameter is used to correct the excessive length or shortness of the longitudinal dimension of the printed color layer; The printing parameters of the roller printing machine are adjusted according to the displacement correction parameters and / or the scaling correction parameters.
2. The printing deviation correction method of a roller printing machine according to claim 1, characterized in that: The step of extracting the first image area of the object surface area and the second image area of the current standard printed object surface image comprises: Extracting a first current object surface area corresponding to a first preset area position in the object surface area; the first preset area position is a pre-set image area used to extract a key area on the object surface, and the key area refers to an object surface area used to carry a printed pattern; According to the alignment parameter corresponding to the camera distance, the image size of the current standard printed object surface image is adjusted to the target size to obtain the adjusted current standard printed object surface image; the target size is consistent with the image size of the object surface image; Extracting a second current object surface area corresponding to the first preset area position in the adjusted current standard printed object surface image; Acquire original pixel value information of the key area on the surface of the object; Eliminate the original pixel value information in the first current object surface area to obtain the first image area; The original pixel value information in the second current object surface area is eliminated to obtain the second image area.
3. The printing deviation correction method of a roller printing machine according to claim 1, characterized in that: The step of identifying a plurality of first feature points in the object image comprises: Acquire a second preset area of the first feature point and a standard reference image of the first feature area; the second preset area is a preset image area, used to narrow the search area of the first feature point; the standard reference image refers to a preset standard image of the first feature area, and the first feature area refers to the first feature point and the surrounding image area of the first feature point; Traversing each current pixel point in the second preset area, and extracting a rectangular pixel area based on each current pixel point; the rectangular pixel area is an area of fixed size and is centered on the current pixel point; Calculating the similarity between the rectangular pixel area and the standard reference image; The rectangular pixel area corresponding to the maximum similarity is taken as the first feature area; The center of the first feature area is taken as the first feature point.
4. The printing deviation correction method of a roller printing machine as claimed in claim 3, characterized in that: The step of calculating the similarity between the rectangular pixel area and the standard reference image comprises: Taking the same diagonal points of the rectangular pixel area and the standard reference image as the origin of the coordinate system respectively; Calculating the pixel difference between two pixel points at the same coordinate position in the rectangular pixel area and the standard reference image; wherein the rectangular pixel area has the same image size as the standard reference image; Counting the pixel values of the rectangular pixel area whose pixel difference is less than a third threshold; The similarity is obtained by dividing the pixel value by the number of all pixels in the rectangular pixel area.
5. The printing deviation correction method of a roller printing machine according to claim 1, characterized in that: The step of matching the displacement correction parameters according to the first distances between the plurality of first feature points and the object contour comprises: Calculate the first center position of the surface contour of the object; Calculating second center positions of the plurality of first feature points; Obtaining the adjusted center position of the object surface contour and the center position of the second feature point in the current standard printed object surface image; calculating a second distance between the first center position and the second center position; Calculating a third distance between a center position of the surface contour of the object and a center position of the second feature point; calculating a first difference between the second distance and the third distance; If the first difference is greater than a fourth threshold, determining a correction direction according to a positive or negative value of the first difference; The first difference is multiplied by the mapping coefficient to obtain the displacement correction parameter.
6. The printing deviation correction method of a roller printing machine according to claim 1, characterized in that: The step of calculating the scaling correction parameter according to the distance difference between the plurality of first feature points and the plurality of second feature points comprises: Establishing a first coordinate system with the pre-selected first feature point as the origin; Calculating a fourth distance between a preselected first feature point and other first feature points; the other first feature points refer to feature points other than the preselected first feature point among the plurality of first feature points; A second coordinate system is established with the preselected second feature point as the origin; wherein the preselected first feature point and the preselected second feature point are the same feature point on the surface of the object; Calculating a fifth distance between the pre-selected second feature point and other second feature points; the other second feature points refer to feature points other than the pre-selected second feature point among the plurality of second feature points; Calculating a second difference between the fourth distance and the fifth distance corresponding to the same feature point on the surface of the object; If the average of the plurality of second differences is greater than the fifth threshold, a feedback control algorithm is used based on the second differences to calculate the scaling correction parameter.
7. A printing deviation correction device for a roller printing machine, characterized in that: The printing deviation correction device of the roller printing machine comprises: A first acquisition unit is used to acquire a plurality of color layers of a printed pattern and standard printed object surface images corresponding to each of the plurality of color layers; the plurality of color layers are used for multi-color overprinting to form the printed pattern; the standard printed object surface image refers to a standard printed image obtained by sequentially superimposing the color layers at preset positions of the object image; wherein different color layers have different printing orders; A collection unit is used to collect the surface image of the object with the printed color layer in real time; obtain the surface color information of the transmission structure; eliminate the image area corresponding to the surface color information in the surface image of the object to obtain the object image; identify multiple first feature points in the object image; calculate the current direction vector composed of two target first feature points, and obtain the standard direction vector of the target first feature point; the standard direction vector refers to the direction vector composed of two target first feature points when the surface of the object is in the correct direction; the target first feature point refers to the first feature point pre-selected for direction correction; calculate the angle between the current direction vector and the standard direction vector; based on the angle, rotate the object image to the direction corresponding to the standard direction vector to obtain the surface area of the object; An extraction unit is used to extract a first image area of the object surface area and a second image area of the current standard printed object surface image; the current standard printed object surface image refers to the standard printed object surface image corresponding to the printed color layer; the first image area refers to a part extracted from the collected actual printed image, representing the printed area of the object; a first calculation unit, configured to calculate a pixel difference value of a same pixel position between the first image area and the second image area, and count the number of pixel positions where the pixel difference value is greater than a first threshold; A second acquisition unit, configured to acquire a plurality of first feature points of the first image area and a plurality of second feature points of the second image area when the number of pixel positions is greater than a second threshold; A matching unit, used to match a displacement correction parameter according to a first distance between the plurality of first feature points and the object contour; the displacement correction parameter is used to correct a position deviation in a transmission direction; A second calculation unit is used to calculate a scaling correction parameter according to the distance difference between the plurality of first feature points and the plurality of second feature points; the scaling correction parameter is used to correct the excessive length or shortness of the longitudinal dimension of the printed color layer; An adjustment unit is used to adjust the printing parameters of the roller printing machine according to the displacement correction parameter and / or the scaling correction parameter.
8. A roller printing machine, characterized in that: The roller printing machine includes: a roller system, a camera, a memory, a processor, and a printing correction program of the roller printing machine stored in the memory and executable on the processor, wherein the printing correction program of the roller printing machine is configured to implement the steps in the printing correction method of the roller printing machine as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the printing deviation correction method of a roller printing machine as claimed in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and apparatus for detecting registering errors, and automatic register control apparatus for multi-color rotary presses
US20040118311A1