Printing screen calibration method and its application
By automatic adjustment of the visual system and the coordinate system conversion of the mathematical transformation system, the problem of calibration dependent operation of the visual system calibration dependent operation of the existing technology, and the automatic calibration process of high -precision and stability.
Patent Information
- Application Number
- CN202411591081.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-11-08
AI Technical Summary
The calibration of existing solder paste printing press vision systems relies on manual operation, which consumes time, is complex in operation, and is susceptible to human factors, making it difficult to meet the needs of high-precision application scenarios.
Through the introduction of automatic adjustment visual systems and mathematical transformation coordinate system conversion, the automatic imaging definition adjustment of the printing network and calibration board is realized, and the conversion matrix between the printed network physical coordinates and the visual system image coordinates will be established to reduce artificial intervention.
The degree of automation of the calibration process has been increased, the impact of human factors on calibration accuracy has been reduced, the calibration accuracy and stability are improved, and it is suitable for high -precision tin paste printing applications.
Smart Images

Figure CN119090979B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing, and in particular relates to a printing screen calibration method and application thereof. Background Art
[0002] The solder paste printer is one of the most important equipment in the field of electronic manufacturing. Especially in the process of high-precision circuit board printing, the accurate printing of solder paste has a key impact on the subsequent assembly and welding. In order to ensure the accuracy of the printing process, the calibration of the visual system is an important part of the solder paste printer.
[0003] Most existing solder paste printer vision system calibrations use traditional manual operation methods. Specifically, the operator needs to manually adjust the Z-axis position of the camera, rely on the human eye to observe the imaging effect, and manually take a photo after the image is clear. After that, the calibration process is completed by manually calculating and inputting the coordinate data of the marker points. This manual calibration method has many problems.
[0004] Manual calibration is time-consuming and complicated. It requires precise adjustment of the camera position and observation of the imaging effect by human eyes. This process is often time-consuming and laborious, especially in application scenarios that require high precision. Repeated adjustments and observations further prolong the operation time. Moreover, the accuracy of calibration is easily affected by human factors. Since the imaging clarity is subjectively judged by the operator, it is difficult to achieve a unified standard, which can easily lead to differences in calibration results between different operators or by the same operator at different times. This calibration error caused by human factors will directly affect the accuracy and stability of solder paste printing.
[0005] Therefore, it is necessary to provide a new solution to the above technical problems. Summary of the invention
[0006] The object of the present invention is to provide a printing screen calibration method and application thereof, which can improve the degree of automation in the calibration process and reduce the interference of human factors.
[0007] To achieve the above purpose, the technical solution provided by the present invention is as follows:
[0008] In a first aspect, the present invention provides a method for calibrating a printed screen, comprising: placing a printed screen and a calibration plate on the upper and lower sides of a visual unit, respectively; adjusting the position of the visual unit in the Z-axis direction and the position of the calibration plate in the Z-axis direction so that the imaging clarity of the printed screen and the calibration plate in the visual unit meets preset requirements; the visual unit acquires images of the printed screen and the calibration plate, and based on the images of the printed screen and the calibration plate, acquires image coordinates of Mark points on the printed screen and image coordinates of calibration points on the calibration plate; based on the affine transformation between the image coordinates of the Mark points and the physical coordinates of the Mark points, and the affine transformation between the image coordinates of the calibration points and the physical coordinates of the calibration points, establishes a transformation matrix M1 between the physical coordinates of the printed screen and the image coordinates of the visual unit, and a transformation matrix M2 between the physical coordinates of the calibration plate and the image coordinates of the visual unit; based on the transformation matrix M1 and the transformation matrix M2, establishes a transformation matrix between the printed screen coordinate system and the calibration plate coordinate system.
[0009] In one or more embodiments, making the imaging clarity of the printed screen in the visual unit meet preset requirements includes: gradually adjusting the shooting position of the visual unit along the Z axis to obtain the image of the printed screen at each shooting position; calculating the imaging clarity of the printed screen at each shooting position, and determining a final shooting position at which the imaging clarity of the printed screen in the visual unit meets the preset requirements based on changes in the imaging clarity of the printed screen.
[0010] In one or more embodiments, the calibration method specifically includes: setting an upper limit P1 and a lower limit P2 of the search position of the visual unit on the Z axis; moving the visual unit to a position between P1 and P2, photographing the image of the printed screen and calculating its imaging clarity D1; moving the visual unit along the Z axis in the search direction for a first distance, photographing the image of the printed screen again and calculating its imaging clarity D2; if D2 is greater than D1 and the difference between D2 and D1 is greater than a preset threshold, then continuing to move the visual unit along the search direction for a first distance, photographing the image of the printed screen again and calculating its imaging clarity, until the printed screen reaches the desired image resolution. The difference between the current imaging clarity of the printing screen and the imaging clarity of the previous shot is less than or equal to a preset threshold; if D2 is less than D1 and the difference between D2 and D1 is greater than the preset threshold, the visual unit is moved a second distance in the opposite direction of the search direction, and the image of the printing screen is re-photographed and its imaging clarity is calculated until the difference between the current imaging clarity of the printing screen and the imaging clarity of the previous shot is less than or equal to the preset threshold; wherein the second distance is less than the first distance; if the difference between D2 and D1 is less than or equal to the preset threshold, the search is stopped and the current position of the visual unit is used as the final shooting position of the printing screen.
[0011] In one or more embodiments, the imaging clarity of the calibration plate in the visual unit meets preset requirements, including: gradually adjusting the shooting position of the calibration plate along the Z axis to obtain an image of the calibration plate at each shooting position; calculating the imaging clarity of the calibration plate at each shooting position, and determining a final shooting position at which the imaging clarity of the calibration plate in the visual unit meets the preset requirements based on changes in the imaging clarity of the calibration plate.
[0012] In one or more embodiments, the calibration method specifically includes: setting an upper limit P3 and a lower limit P4 of the search position of the calibration plate on the Z axis; moving the calibration plate to a position between P3 and P4, photographing an image of the calibration plate through a visual unit and calculating its imaging clarity D3; after moving the calibration plate along the Z axis in the search direction by a third distance, photographing the image of the calibration plate again and calculating its imaging clarity D4; if D4 is greater than D3 and the difference between D4 and D3 is greater than a preset threshold, then continuing to move the calibration plate along the search direction by a third distance, re-photographing the image of the calibration plate and calculating its imaging clarity, until the calibration plate reaches the position where the image is at the search direction. The difference between the current imaging clarity of the calibration plate and the imaging clarity of the previous shot is less than or equal to a preset threshold; if D4 is less than D3 and the difference between D4 and D3 is greater than the preset threshold, the calibration plate is moved a fourth distance in the opposite direction of the search direction, and the image of the calibration plate is re-shot and its imaging clarity is calculated until the difference between the current imaging clarity of the calibration plate and the imaging clarity of the previous shot is less than or equal to the preset threshold; wherein the fourth distance is less than the third distance; if the difference between D4 and D3 is less than or equal to the preset threshold, the search is stopped and the current position of the calibration plate is used as the final shooting position of the calibration plate.
[0013] In one or more embodiments, the calibration method specifically includes: calculating the actual physical size corresponding to a single pixel of the image of the printed net based on the physical distance between the mark points on the printed net and the pixel distance in the image of the printed net; mapping the physical coordinates of the mark points on the printed net to their corresponding image coordinates through affine transformation, and establishing a transformation matrix M1 between the physical coordinates of the printed net and the visual unit image coordinates; and / or calculating the actual physical size corresponding to a single pixel of the image of the calibration plate based on the physical distance between the calibration points on the calibration plate and the pixel distance in the image of the calibration plate; mapping the physical coordinates of the calibration points on the calibration plate to their corresponding image coordinates through affine transformation, and establishing a transformation matrix M2 between the physical coordinates of the calibration plate and the visual unit image coordinates.
[0014] In a second aspect, the present invention provides a printed screen calibration system, which includes: a moving module, used to place a printed screen and a calibration plate on the upper and lower sides of a visual unit, respectively; an adjusting module, used to adjust the position of the visual unit in the Z-axis direction and the position of the calibration plate in the Z-axis direction, so that the imaging clarity of the printed screen and the calibration plate in the visual unit meets the preset requirements; an acquisition module, used to acquire the images of the printed screen and the calibration plate through the visual unit, and based on the images of the printed screen and the calibration plate, acquire the image coordinates of the Mark points on the printed screen and the image coordinates of the calibration points on the calibration plate; a first conversion module, used to establish a conversion matrix M1 between the physical coordinates of the printed screen and the image coordinates of the visual unit, and a conversion matrix M2 between the physical coordinates of the calibration plate and the image coordinates of the visual unit based on the affine transformation between the image coordinates of the Mark points and the physical coordinates of the Mark points, and the affine transformation between the image coordinates of the calibration points and the physical coordinates of the calibration points; a second conversion module, used to establish a conversion matrix between the printed screen coordinate system and the calibration plate coordinate system based on the conversion matrix M1 and the conversion matrix M2.
[0015] In a third aspect, the present invention provides a printing press, which comprises the printing screen calibration system as described above.
[0016] In a fourth aspect, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the printing screen calibration method as described above when executing the program.
[0017] In a fifth aspect, the present invention provides a computer-readable medium, wherein the computer-readable medium carries computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the printing screen calibration method as described above.
[0018] Compared with the prior art, the calibration method and application of the printing screen provided by the present invention, by introducing an automatically adjusted visual system and a coordinate system conversion based on mathematical transformation, makes the calibration process no longer rely on human intervention, thereby eliminating the influence of human errors on the calibration accuracy; at the same time, based on the mathematical mapping between image coordinates and physical coordinates, a conversion matrix is established, so that the physical coordinates of the printing screen and the image coordinates of the visual system can be accurately converted, thereby improving the calibration accuracy and stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 is a flow chart of a method for calibrating a printing screen in one embodiment of the present invention;
[0021] Figure 2 It is a structural block diagram of a printing network calibration system in one embodiment of the present invention;
[0022] Figure 3 FIG. 4 is a structural block diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0024] With the development of increasingly miniaturized and high-density electronic products, the precision requirements of solder paste printers are getting higher and higher, especially in the field of precision manufacturing such as miniLED circuit boards. Any slight calibration error may cause the finished product to be unqualified. However, the existing calibration method mainly relies on manual operation, especially in the process of camera focusing and imaging. The operator usually observes the image clarity by human eyes to judge the best focus position, which is not only time-consuming and labor-intensive, but also the subjectivity of the operation makes the calibration accuracy unstable, which is difficult to meet the needs of high-precision application scenarios.
[0025] In visual positioning and guidance equipment, camera calibration is a key technology. It calculates the internal and external parameters of the camera by taking an image of a calibration plate and using the spatial coordinates of known feature points in the calibration plate and the corresponding image coordinates. The purpose of camera calibration is to establish a conversion model between the image coordinate system and the spatial coordinate system, so that the relationship between the three-dimensional geometric position of a point on the surface of an object and the corresponding point in the image can be accurately solved.
[0026] In order to solve the above problems, the present invention proposes an automated printing screen calibration method, which introduces an automatically adjusted visual system and a coordinate system conversion based on mathematical transformation, so that the calibration process no longer relies on human intervention. The method aims to automatically adjust the position of the visual unit and the calibration plate so that the imaging clarity of the printing screen and the calibration plate can reach the preset standard, thereby eliminating the influence of human errors on the calibration accuracy. At the same time, based on the mathematical mapping between image coordinates and physical coordinates, the present invention establishes an accurate conversion matrix, which enables accurate conversion between the physical coordinates of the printing screen and the image coordinates of the visual system, thereby improving the calibration accuracy and stability.
[0027] Please refer to Figure 1 FIG. 1 is a flow chart of a method for calibrating a printing screen according to an embodiment of the present invention. The method for calibrating a printing screen specifically comprises the following steps:
[0028] S101: placing the printed screen and the calibration plate on the upper and lower sides of the vision unit respectively.
[0029] In the specific implementation process, the printed net can be fixed above the visual unit, and the calibration plate can be placed below the visual unit. The visual unit can be an industrial camera, and the position of the visual unit can be accurately adjusted by the moving mechanism of the XY axis. The printed net and the calibration plate are placed on the upper and lower sides of the visual unit to ensure that the visual unit can be used to obtain image data of the printed net and the calibration plate. This setting method can ensure that the two objects are imaged under the same viewing angle conditions, minimizing the deviation caused by different viewing angles.
[0030] By placing the printed screen and the calibration plate on the upper and lower sides of the vision unit, the vision unit can obtain images of the two targets, and in subsequent steps, the mapping relationship between the physical coordinates and the image coordinates of the two targets is unified through the calculation of affine transformation and conversion matrix.
[0031] S102: adjusting the position of the visual unit in the Z-axis direction and the position of the calibration plate in the Z-axis direction so that the imaging clarity of the printing screen and the calibration plate in the visual unit meets the preset requirements.
[0032] By adjusting the position of the visual unit and the calibration plate in the Z-axis direction, ensure that the image clarity of both reaches the preset standard. The image clarity directly affects the calibration accuracy. If the image is blurred, the recognition accuracy of the calibration point and the mark point will be greatly reduced, thus affecting the subsequent coordinate transformation and the establishment of the calibration matrix.
[0033] Adjustment in the Z-axis direction can rely on an automatic control system rather than manual operation. The vision unit can be a camera system that can move along the Z-axis to adjust the focus. The calibration plate is mounted on a mechanism that can move along the Z-axis so that it can be precisely adjusted as needed. Through automated adjustment, the vision system can calculate the clarity of the image in real time through an algorithm, such as judging the quality of the current image through indicators such as gradient, edge intensity or image contrast. The automatic control system will continuously adjust the Z-axis position of the vision unit or calibration plate until the image clarity reaches the preset standard.
[0034] Specifically, the visual unit first aligns with the printed screen above, and obtains a clear image by automatically adjusting the position in the Z-axis direction. At this time, the visual unit will judge whether the imaging meets the preset requirements based on the image clarity index. When the imaging clarity of the printed screen reaches the expected standard, the position of the visual unit at this time can be recorded, and the visual unit can be fixed at this position. Then, the visual unit begins to focus on the calibration plate below, and ensures that its imaging is equally clear by adjusting the Z-axis position of the calibration plate. When the imaging clarity of the calibration plate reaches the expected standard, the position of the calibration plate at this time can be recorded, and this position can be used as the printing position of the actual production on the printed target (such as a PCB board).
[0035] In an exemplary embodiment, the method for making the imaging clarity of the printed screen in the visual unit meet the preset requirements specifically includes: gradually adjusting the shooting position of the visual unit along the Z axis to obtain the image of the printed screen at each shooting position; calculating the imaging clarity of the printed screen at each shooting position, and determining the final shooting position at which the imaging clarity of the printed screen in the visual unit meets the preset requirements based on the change in the imaging clarity of the printed screen.
[0036] The position of the visual unit can be adjusted according to the preset step length, for example, starting from an initial Z-axis position, gradually moving to the next position, shooting and acquiring the printed screen image at each position. After shooting at each position, the clarity of the image is calculated. Commonly used clarity evaluation indicators include image contrast, gradient, edge strength, etc. For example, if the Mark point in the image has clear edges, sharp contours and no blur, it indicates that the image quality at this position is high. The system automatically records the image clarity at each position, and finds a Z-axis position with the best image quality as the final shooting position based on the change trend of the clarity.
[0037] In production scenarios, this automatic adjustment method is particularly suitable for printing processes that require high precision. For example, in miniLED circuit board printing, the mark points on the printing net need to be accurately aligned with the corresponding positions on the PCB board, and any slight imaging error may cause printing deviation. By gradually adjusting the Z-axis position, the best focus can be found with micron-level accuracy, ensuring that the clarity of the printed net image in the visual unit fully meets production requirements.
[0038] Compared with the traditional manual adjustment method, this automatic process of step-by-step adjustment reduces human involvement, avoids subjective errors caused by human factors, and ensures the accuracy and consistency of the calibration process. Moreover, step-by-step adjustment enables the system to accurately capture images at different Z-axis positions and determine the optimal imaging position in a quantitative manner, thereby improving efficiency.
[0039] In the process of adjusting the shooting position, as the Z-axis position of the vision unit or calibration plate gradually approaches the optimal shooting position, the change in image clarity caused by moving the same step length will gradually decrease. This principle is based on the focus principle in the optical system, that is, when the focus of the camera gradually approaches the target object, the image clarity will tend to be flat with a slight change in the Z-axis position.
[0040] Specifically, at the beginning of adjustment, the position of the visual unit or calibration plate is quite different from the optimal focus, and the image clarity changes significantly when it moves a certain distance. As the system gradually approaches the optimal focus position, the change in image clarity will gradually decrease. Finally, when the position approaches or reaches the optimal focus, the image clarity changes slightly after moving the same step length. This is because at the optimal focus position, the light focusing effect reaches the best state and the image blur is minimal.
[0041] In this way, the system can automatically determine whether it is close to the best shooting position. For example, the system can set a clarity threshold. When the calculated change in imaging clarity after two adjustments is less than the threshold, the system can stop further adjustment and consider the current shooting position to be the best position. This adjustment method can not only be completed automatically, but also ensure the accuracy and efficiency of the adjustment.
[0042] Specifically, the upper limit P1 and lower limit P2 of the search position of the visual unit on the Z axis can be set; the visual unit is moved to a position between P1 and P2, the image of the printing screen is photographed and its imaging clarity D1 is calculated; after the visual unit is moved along the Z axis in the search direction by a first distance, the image of the printing screen is photographed again and its imaging clarity D2 is calculated. If D2 is greater than D1 and the difference between D2 and D1 is greater than a preset threshold, the visual unit is moved along the search direction by a first distance, the image of the printing screen is photographed again and its imaging clarity is calculated until the difference between the current imaging clarity of the printing screen and the imaging clarity of the previous photograph is less than or equal to the preset threshold. If D2 is less than D1 and the difference between D2 and D1 is greater than the preset threshold, the visual unit is moved along the opposite direction of the search direction by a second distance, the image of the printing screen is photographed again and its imaging clarity is calculated until the difference between the current imaging clarity of the printing screen and the imaging clarity of the previous photograph is less than or equal to the preset threshold; wherein the second distance is less than the first distance. If the difference between D2 and D1 is less than or equal to a preset threshold, the search is stopped and the current position of the visual unit is used as the final shooting position of the printing screen.
[0043] When implementing this process, first set the search range of the visual unit on the Z axis, that is, the upper limit P1 and the lower limit P2. These positions define the possible movement range of the visual unit, thereby ensuring that the best shooting position is found within a reasonable range. Next, move the visual unit to a position between P1 and P2, shoot an image of the printing network, and calculate the image clarity D1 at this position.
[0044] After acquiring D1, the visual unit moves a set first distance along the Z axis in a certain search direction, captures the image again, and calculates the clarity D2. At this point, the system compares the difference between D1 and D2 to determine whether the image has become clearer. If D2 is greater than D1, and their difference is greater than the preset threshold, it indicates that the visual unit is moving in the direction of the best focus. The system will continue to move the first distance in the same direction and repeat the process of capturing and calculating clarity. In this way, the visual unit gradually approaches the best focus position.
[0045] If D2 is less than D1, and the difference is greater than the preset threshold, it indicates that the vision unit has passed the optimal focus position. At this time, the system will adjust the search direction, move in the opposite direction a smaller second distance, and perform shooting and clarity calculation again. This reverse fine-tuning design ensures that the vision unit will not over-adjust the Z-axis position, thereby avoiding missing the optimal focus.
[0046] When the difference between D2 and D1 is less than or equal to the preset threshold, the system considers that the current Z-axis position is close to the optimal focus, stops searching at this time, and uses this position as the final shooting position. Through this step-by-step optimization method, the system can find the position with the best imaging clarity.
[0047] In an exemplary embodiment, the method for making the imaging clarity of the calibration plate in the visual unit meet the preset requirements specifically includes: gradually adjusting the shooting position of the calibration plate along the Z axis to obtain the image of the calibration plate at each shooting position; calculating the imaging clarity of the calibration plate at each shooting position, and determining the final shooting position at which the imaging clarity of the calibration plate in the visual unit meets the preset requirements based on the change in the imaging clarity of the calibration plate.
[0048] The calibration plate is located below the visual unit and is used as a reference for camera calibration through its known feature points (such as a circle array or a chessboard). By adjusting the position of the calibration plate on the Z axis, a shooting position is found that allows the calibration plate image to reach a preset clarity.
[0049] In specific implementation, the shooting position of the calibration plate can be gradually adjusted along the Z-axis direction to obtain the calibration plate image at each position. At each position, the clarity of the image is calculated by an image processing algorithm. Common methods include calculating the contrast, sharpness or edge strength of the image. These indicators can quantify the image quality and reflect the clarity of the calibration plate in the image. For example, the clearer the edges of the dots or checkerboards on the calibration plate, the more accurately the system can identify the coordinates of the calibration points. In the process of gradual adjustment, the Z-axis position is dynamically adjusted according to the changes in clarity at different shooting positions until a position with high imaging clarity is found.
[0050] Specifically, the upper limit P3 and lower limit P4 of the search position of the calibration plate on the Z axis can be set; the calibration plate is moved to a position between P3 and P4, and the image of the calibration plate is photographed by the visual unit and its imaging clarity D3 is calculated; after the calibration plate is moved along the Z axis in the search direction by a third distance, the image of the calibration plate is photographed again and its imaging clarity D4 is calculated. If D4 is greater than D3 and the difference between D4 and D3 is greater than a preset threshold, the calibration plate is moved along the search direction by a third distance, and the image of the calibration plate is photographed again and its imaging clarity is calculated until the difference between the current imaging clarity of the calibration plate and the imaging clarity of the previous shot is less than or equal to the preset threshold. If D4 is less than D3 and the difference between D4 and D3 is greater than a preset threshold, the calibration plate is moved a fourth distance in the opposite direction of the search direction, and the image of the calibration plate is re-photographed and its imaging clarity is calculated until the difference between the current imaging clarity of the calibration plate and the imaging clarity of the previous shot is less than or equal to a preset threshold; wherein the fourth distance is less than the third distance. If the difference between D4 and D3 is less than or equal to the preset threshold, the search is stopped and the current position of the calibration plate is used as the final shooting position of the calibration plate.
[0051] The search range of the calibration plate on the Z axis can be set, including the upper limit position P3 and the lower limit position P4. These position ranges define the movement area of the calibration plate, ensuring that the calibration plate finds the best focus position within this range. Next, the calibration plate is moved to an initial position within this range, and the image of the calibration plate is captured by the vision unit and its clarity D3 is calculated.
[0052] The calibration plate is moved along the Z axis in a certain direction by a set third distance, and the image of the calibration plate is taken again and its clarity D4 is calculated. At this time, the difference between D4 and D3 is compared to determine whether the image quality has improved. If the clarity of D4 is higher than that of D3, and the difference is greater than the preset clarity threshold, it means that the calibration plate is moving towards the optimal focus. The calibration plate will continue to move the third distance in the same direction, repeatedly taking pictures and calculating the clarity, until the improvement in image clarity after each movement becomes insignificant, and the difference is less than or equal to the preset clarity threshold.
[0053] If the clarity of D4 is less than that of D3, and the difference is greater than the threshold, it indicates that the calibration plate has passed the optimal focus. At this point, the calibration plate is moved in the opposite direction by a smaller fourth distance, the image is taken again, and the clarity is recalculated. This reverse fine-tuning method helps prevent over-adjustment and ensures that the system can eventually accurately find the optimal focus position. The purpose of gradually reducing the moving step size is to make finer adjustments when approaching the optimal focus to avoid missing the optimal position due to excessive step size.
[0054] When the difference in clarity between D4 and D3 is less than or equal to the preset threshold, the search stops and the current Z-axis position is set as the final shooting position of the calibration plate. At this point, the imaging clarity of the calibration plate has reached the preset standard.
[0055] S103: The visual unit acquires the images of the printing screen and the calibration plate, and acquires the image coordinates of the Mark points on the printing screen and the image coordinates of the calibration points on the calibration plate based on the images of the printing screen and the calibration plate.
[0056] In step S103, the visual unit (such as a high-resolution industrial camera) captures images of the printed screen and the calibration plate. The mark points on the printed screen can be precise positioning marks, which are used as positioning references in the subsequent production process. The calibration plate is a tool for visual unit calibration, which contains calibration points with known spatial coordinates, such as a circular array or a chessboard. The relationship between the image coordinates and physical coordinates of these calibration points is the key to solving the camera parameters and converting the image coordinates into physical coordinates.
[0057] In actual operation, image processing algorithms such as edge detection and shape recognition can be used to automatically extract the coordinates of the mark points and calibration points in the image. For example, the dot array on the calibration board can determine its center coordinates by detecting the edges of the circle, while the mark points on the printing screen can identify their edges and center positions through similar algorithms.
[0058] S104: Based on the affine transformation between the image coordinates of the Mark point and the physical coordinates of the Mark point, and the affine transformation between the image coordinates of the calibration point and the physical coordinates of the calibration point, a transformation matrix M1 between the physical coordinates of the printing network and the image coordinates of the visual unit, and a transformation matrix M2 between the physical coordinates of the calibration plate and the image coordinates of the visual unit are established.
[0059] In an exemplary embodiment, the actual physical size corresponding to a single pixel of the image of the printed net can be calculated based on the physical distance between the Mark points on the printed net and the pixel distance in the image of the printed net; the physical coordinates of the Mark points on the printed net are mapped to their corresponding image coordinates through affine transformation, and a transformation matrix M1 between the physical coordinates of the printed net and the image coordinates of the visual unit is established.
[0060] By obtaining the physical distance of the Mark points on the printing network and their pixel distance in the image, the actual physical size corresponding to a single pixel can be calculated. In other words, by comparing the pixel distance between two Mark points in the image with their actual distance in the physical world, the distance represented by each pixel in the image in the physical world can be deduced. For example, if the distance between two Mark points in the physical world is 10 mm, and the pixel distance in the image is 100 pixels, then the physical size of a single pixel is 0.1 mm. Through this calculation method, the actual physical size corresponding to each pixel in the image can be accurately determined.
[0061] The physical coordinates of the Mark point on the printing network are mapped to its image coordinates through affine transformation, and the transformation matrix M1 between the physical coordinates of the printing network and the image coordinates of the visual unit is further established. Affine transformation is a linear transformation that can handle translation, rotation, and scaling, and can also maintain linearity. The mapping relationship between the physical coordinates and image coordinates on the printing network can be calculated efficiently and accurately through matrix operations. The transformation matrix M1 can represent how each Mark point of the printing network corresponds in the image plane of the visual unit, thereby providing a basis for subsequent calibration and alignment operations.
[0062] In an exemplary embodiment, the actual physical size corresponding to a single pixel of the image of the calibration plate can be calculated based on the physical distance between the calibration points on the calibration plate and the pixel distance in the image of the calibration plate; the physical coordinates of the calibration points on the calibration plate are mapped to the corresponding image coordinates through affine transformation, and a transformation matrix M2 between the physical coordinates of the calibration plate and the image coordinates of the visual unit is established.
[0063] The same operation can be applied to the calibration plate. By obtaining the physical distance between the calibration points on the calibration plate and their pixel distance in the image, the physical size of a single pixel of the calibration plate image can be calculated. This step is similar to the operation of the printing screen, ensuring that each calibration point of the calibration plate in the visual system can be accurately mapped to its physical coordinates. Through affine transformation, the physical coordinates of the calibration plate are mapped to the image coordinates, and a transformation matrix M2 between the physical coordinates of the calibration plate and the image coordinates of the visual unit is established.
[0064] The formula for affine transformation can be expressed as:
[0065]
[0066] Among them, (x, y) is the physical coordinate of the mark point or calibration point, (x′, y′) is the image coordinate of the mark point or calibration point, a, b, c, d are the parameters of the linear transformation, and tx, ty are the translation parameters. The parameters of this matrix can be solved by the least squares method or other optimization algorithms to accurately describe the relationship between the physical coordinates and the image coordinates.
[0067] S105: Based on the transformation matrix M1 and the transformation matrix M2, a transformation matrix between the printing screen coordinate system and the calibration plate coordinate system is established.
[0068] M1 is the conversion matrix between the physical coordinates of the printing screen and the image coordinates of the visual unit, and M2 is the conversion matrix between the physical coordinates of the calibration plate and the image coordinates of the visual unit. Through these two matrices, the coordinates of the printing screen and the calibration plate can be mapped to the image coordinate system of the visual system. Based on these two matrices, the direct conversion matrix between the printing screen coordinate system and the calibration plate coordinate system can be derived.
[0069] This conversion can be achieved through matrix operations. For example, let M1 be the transformation matrix from the physical coordinates of the printing network to the image coordinates, and M2 be the transformation matrix from the physical coordinates of the calibration plate to the image coordinates. The conversion between the printing network coordinate system and the calibration plate coordinate system can be expressed as:
[0070]
[0071] in, It is the transformation matrix from the printing screen coordinate system to the calibration plate coordinate system.
[0072] In the solder paste printer, the printing screen is used to accurately print the solder paste to the specified position on the PCB board, and the PCB board is calibrated by the calibration board. After the calibration is completed, the calibration board is replaced with the PCB board, and the mark points of the printing screen need to be accurately aligned with the corresponding positions on the PCB board. Through the conversion matrix generated in step S105, the system can convert the physical coordinates of the printing screen into the physical coordinate system of the calibration board (i.e., the PCB board), thereby ensuring the precise alignment of the two objects.
[0073] Please refer to Figure 2 As shown, based on the same inventive concept as the aforementioned printing screen calibration method, the present invention provides a printing screen calibration system 200 , which includes: a moving module 201 , an adjusting module 202 , an acquiring module 203 , a first conversion module 204 and a second conversion module 205 .
[0074] The moving module 201 is used to place the printing net and the calibration plate on the upper and lower sides of the visual unit respectively. The adjusting module 202 is used to adjust the position of the visual unit in the Z-axis direction and the position of the calibration plate in the Z-axis direction, so that the imaging clarity of the printing net and the calibration plate in the visual unit meets the preset requirements. The acquiring module 203 is used to acquire the images of the printing net and the calibration plate through the visual unit, and acquire the image coordinates of the Mark points on the printing net and the image coordinates of the calibration points on the calibration plate based on the images of the printing net and the calibration plate. The first conversion module 204 is used to establish the conversion matrix M1 between the physical coordinates of the printing net and the image coordinates of the visual unit, and the conversion matrix M2 between the physical coordinates of the calibration plate and the image coordinates of the visual unit based on the affine transformation between the image coordinates of the Mark points and the physical coordinates of the Mark points, and the affine transformation between the image coordinates of the calibration points and the physical coordinates of the calibration points. The second conversion module 205 is used to establish the conversion matrix between the printing net coordinate system and the calibration plate coordinate system based on the conversion matrix M1 and the conversion matrix M2.
[0075] The embodiment of the present invention further provides a printing machine, which includes the aforementioned printing screen calibration system 200 .
[0076] Please refer to Figure 3 As shown, an embodiment of the present invention further provides an electronic device 300, which includes at least one processor 301, a memory 302 (such as a non-volatile memory), a memory 303, and a communication interface 304, and the at least one processor 301, the memory 302, the memory 303, and the communication interface 304 are connected together via a bus 305. The at least one processor 301 is used to call at least one program instruction stored or encoded in the memory 302, so that the at least one processor 301 performs various operations and functions of the calibration method of the printed network described in various embodiments of this specification.
[0077] In the embodiments of the present specification, the electronic device 300 may include, but is not limited to, personal computers, server computers, workstations, desktop computers, laptop computers, notebook computers, mobile electronic devices, smart phones, tablet computers, cellular phones, personal digital assistants (PDAs), handheld devices, messaging devices, wearable electronic devices, consumer electronic devices, and the like.
[0078] An embodiment of the present invention further provides a computer-readable medium carrying computer-executable instructions, which, when executed by a processor, can be used to implement various operations and functions of the printing network calibration method described in various embodiments of this specification.
[0079] The computer-readable medium in the present invention can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0080] In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0081] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0082] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatuses, systems, and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as a combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0083] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
[0084] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
Claims
1. A method for calibrating a printing screen, characterized in that: include: Place the printed screen and calibration plate on the upper and lower sides of the vision unit respectively; Adjusting the position of the visual unit in the Z-axis direction and the position of the calibration plate in the Z-axis direction so that the imaging clarity of the printing screen and the calibration plate in the visual unit meets the preset requirements; The visual unit acquires the images of the printing net and the calibration plate, and acquires the image coordinates of the Mark points on the printing net and the image coordinates of the calibration points on the calibration plate based on the images of the printing net and the calibration plate; Based on the affine transformation between the image coordinates of the Mark point and the physical coordinates of the Mark point, and the affine transformation between the image coordinates of the calibration point and the physical coordinates of the calibration point, a transformation matrix M1 between the physical coordinates of the printing network and the image coordinates of the visual unit, and a transformation matrix M2 between the physical coordinates of the calibration plate and the image coordinates of the visual unit are established; Based on the transformation matrix M1 and the transformation matrix M2, a transformation matrix between the printing screen coordinate system and the calibration plate coordinate system is established.
2. The method for calibrating a printing screen according to claim 1, characterized in that: The imaging clarity of the printing screen in the visual unit meets the preset requirements, including: Stepwise adjusting the shooting position of the visual unit along the Z axis to obtain the image of the printing screen at each shooting position; The imaging clarity of the printing screen at each shooting position is calculated, and according to the change of the imaging clarity of the printing screen, a final shooting position is determined so that the imaging clarity of the printing screen in the visual unit meets the preset requirements.
3. The method for calibrating a printing screen according to claim 2, characterized in that: The calibration method specifically includes: Setting an upper limit P1 and a lower limit P2 of the search position of the visual unit on the Z axis; Move the visual unit to a position between P1 and P2, take an image of the printing screen and calculate its imaging clarity D1; After the visual unit is moved along the Z axis in the search direction by a first distance, the image of the printing screen is photographed again and its imaging definition D2 is calculated; If D2 is greater than D1 and the difference between D2 and D1 is greater than a preset threshold, the visual unit is moved along the search direction for a first distance, and the image of the printing screen is re-photographed and its image definition is calculated until the difference between the current image definition of the printing screen and the image definition of the previous image is less than or equal to the preset threshold; If D2 is less than D1 and the difference between D2 and D1 is greater than a preset threshold, the visual unit is moved a second distance in the opposite direction of the search direction, and the image of the printing screen is re-photographed and its image clarity is calculated until the difference between the current image clarity of the printing screen and the image clarity of the previous photo is less than or equal to the preset threshold; wherein the second distance is less than the first distance; If the difference between D2 and D1 is less than or equal to a preset threshold, the search is stopped and the current position of the visual unit is used as the final shooting position of the printing screen.
4. The method for calibrating a printing screen according to claim 1, characterized in that: The imaging clarity of the calibration plate in the visual unit meets preset requirements, including: Stepwise adjusting the shooting position of the calibration plate along the Z axis to obtain images of the calibration plate at various shooting positions; The imaging clarity of the calibration plate at each shooting position is calculated, and according to the change of the imaging clarity of the calibration plate, a final shooting position at which the imaging clarity of the calibration plate in the visual unit meets a preset requirement is determined.
5. The method for calibrating a printing screen according to claim 4, characterized in that: The calibration method specifically includes: Setting the upper limit P3 and lower limit P4 of the search position of the calibration plate on the Z axis; Move the calibration plate to a position between P3 and P4, capture an image of the calibration plate through a visual unit and calculate its imaging clarity D3; After the calibration plate is moved along the Z axis in the search direction by a third distance, the image of the calibration plate is captured again and its imaging definition D4 is calculated; If D4 is greater than D3 and the difference between D4 and D3 is greater than a preset threshold, the calibration plate is moved further along the search direction by a third distance, and the image of the calibration plate is re-taken and its imaging clarity is calculated until the difference between the current imaging clarity of the calibration plate and the imaging clarity of the previous shot is less than or equal to the preset threshold; If D4 is less than D3 and the difference between D4 and D3 is greater than a preset threshold, the calibration plate is moved a fourth distance in the opposite direction of the search direction, and the image of the calibration plate is re-photographed and its imaging clarity is calculated until the difference between the current imaging clarity of the calibration plate and the imaging clarity of the previous shot is less than or equal to the preset threshold; wherein the fourth distance is less than the third distance; If the difference between D4 and D3 is less than or equal to a preset threshold, the search is stopped and the current position of the calibration plate is used as the final shooting position of the calibration plate.
6. The method for calibrating a printing screen according to claim 1, characterized in that: The calibration method specifically includes: Calculate the actual physical size corresponding to a single pixel of the image of the printing screen based on the physical distance between the Mark points on the printing screen and the pixel distance in the image of the printing screen; Mapping the physical coordinates of the Mark points on the printing network to their corresponding image coordinates through affine transformation, and establishing a transformation matrix M1 between the physical coordinates of the printing network and the image coordinates of the visual unit; and / or Calculating the actual physical size corresponding to a single pixel of the image of the calibration plate based on the physical distance between the calibration points on the calibration plate and the pixel distance between the calibration points in the image of the calibration plate; The physical coordinates of the calibration points on the calibration plate are mapped to their corresponding image coordinates through affine transformation, and a conversion matrix M2 between the physical coordinates of the calibration plate and the image coordinates of the visual unit is established.
7. A printing screen calibration system, characterized in that: include: A moving module is used to place the printing screen and the calibration plate on the upper and lower sides of the vision unit respectively; An adjustment module, used for adjusting the position of the visual unit in the Z-axis direction and the position of the calibration plate in the Z-axis direction, so that the imaging clarity of the printing screen and the calibration plate in the visual unit meets the preset requirements; An acquisition module, used to acquire images of the printing net and the calibration plate through the visual unit, and acquire image coordinates of the Mark points on the printing net and the calibration points on the calibration plate based on the images of the printing net and the calibration plate; A first conversion module, for establishing a conversion matrix M1 between the physical coordinates of the printing network and the image coordinates of the visual unit, and a conversion matrix M2 between the physical coordinates of the calibration plate and the image coordinates of the visual unit based on an affine transformation between the image coordinates of the Mark point and the physical coordinates of the Mark point, and an affine transformation between the image coordinates of the calibration point and the physical coordinates of the calibration point; The second conversion module is used to establish a conversion matrix between the printing screen coordinate system and the calibration plate coordinate system based on the conversion matrix M1 and the conversion matrix M2.
8. A printing press, characterized in that: Comprising a printing screen calibration system as claimed in claim 7.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the printing screen calibration method according to any one of claims 1 to 6 is implemented.
10. A computer-readable medium, characterized in that The computer readable medium carries computer executable instructions, and when the computer executable instructions are executed by a processor, they are used to implement the printing screen calibration method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Calibration and alignment method of printing platform of solder paste printer
CN106643500A
Visual calibrating device of photovoltaic cell printing equipment and positioning method
CN107554050A