A detection method, device and storage medium for mark point positioning printing based on 2D vision
By printing checkerboards and positioning mark patterns on the printed samples, using 2D vision technology to establish coordinate relationships and template matching, the problem of artificial positioning in the existing technology is solved, and the precise positioning and efficient positioning of printed objects is achieved. on a variety of materials.
Patent Information
- Application Number
- CN202311444517.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-01
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2043-11-01
AI Technical Summary
The existing printing methods require manual alignment of the printed samples, resulting in inaccurate position of the printed objects, low pattern quality, and manual alignment of different materials requires a lot of time and effort.
Using the mark point positioning detection method based on 2D vision, by printing checkerboards and positioning mark patterns on the printed samples, establishing coordinate relationships and template matching, using cameras and vision algorithms to achieve precise positioning and measurement, selecting positioning areas and selecting positioning centers , calculate the center position and rotation angle of the printed object.
It improves the recognition and positioning accuracy of mark patterns, realizes accurate positioning of printed objects, is convenient to operate, is suitable for printing materials of various sizes, and reduces the time and energy of manual alignment.
Smart Images

Figure CN117495961B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of printing positioning technology, and in particular to a detection method, device and storage medium for mark point positioning printing based on 2D vision. Background Art
[0002] Printing refers to determining the position of the printed object or image on paper or other media during the printing process. Print positioning can ensure that the printed object is accurately placed in the required position, but the existing printing method requires manual alignment of the printed sample before the printer performs overlay printing. Due to the subjective influence of manual work, the alignment of the printed sample cannot be completely aligned with the printing position of the printer, resulting in low quality of the printed pattern; and there are many types of printed materials, and each type requires manual alignment, which takes a lot of time and energy. Summary of the invention
[0003] The purpose of the present invention is to provide a detection method, device and storage medium for mark point positioning printing based on 2D vision, which uses the mark pattern on the printed sample as a positioning mark, establishes a coordinate relationship and a template matching method to achieve precise positioning and measurement, and improves the recognition and positioning accuracy of the mark pattern by selecting the positioning area, selecting the appropriate mark pattern and positioning center, and establishing a matching template.
[0004] The purpose of the present invention can be achieved through the following technical solutions:
[0005] The present application provides a method for detecting mark point positioning printing based on 2D vision, comprising the following steps:
[0006] S1: Use a printer to print the chessboard, use a camera to take pictures, and then establish the coordinate relationship;
[0007] S2: It is necessary to print positioning mark patterns at the four corners of the printed sample;
[0008] S3: select the positioning area, select the positioning mark pattern, and select the positioning center to establish a matching template;
[0009] S4: The printer moves the camera to the mark point to take a picture. After the visual algorithm calculates the physical position of the mark, it feeds the data back to other tools.
[0010] Preferably, according to the establishment of the coordinate relationship described in step S1,
[0011] S11: The printer prints a chessboard with the same XY axis direction, and the distance between each grid is 10mm;
[0012] S12: Move the camera to the chessboard position to take pictures, and the visual algorithm establishes a coordinate relationship through the chessboard position.
[0013] Preferably, the steps of establishing the coordinate relationship according to step S12 include:
[0014] S121: Acquire a chessboard image, place the chessboard printed by the printer in the camera field of view, and use the camera to capture the image of the chessboard;
[0015] S122: Checkerboard corner point detection, using an image processing algorithm to detect checkerboard corner points in the captured checkerboard image;
[0016] S123: Calibrate corner point coordinates, assign physical coordinate values to the detected corner points of the chessboard according to the physical size of the chessboard actually printed;
[0017] S124: Calculate the camera internal parameters, and calculate the camera internal parameter matrix according to the camera parameters and geometric relationships;
[0018] S125: Estimating camera extrinsic parameters, using the physical coordinates of the checkerboard corner points and the pixel coordinates of the corner points detected in the image, and using a camera calibration algorithm to estimate the camera's extrinsic parameter matrix;
[0019] S126: Establishing a coordinate relationship, mapping and associating the pixel coordinates in the image with the coordinates in the actual physical world according to the camera intrinsic parameter matrix and the extrinsic parameter matrix.
[0020] Preferably, the printing positioning mark pattern according to step S2 includes:
[0021] S21: The user creates a mark pattern at the four corners of the printed material that can be distinguished from the background;
[0022] S22: After the camera is moved above the mark pattern, the user selects the area to be located and the pattern to be located on the software, and then creates template information.
[0023] Preferably, according to the establishment of the matching template described in step S3, the positioning area in the printed sample is selected using image processing software or a custom algorithm. This area should contain the mark pattern and other features used for positioning. In the positioning area, the mark pattern is selected and the matching template is established by selecting a suitable size and shape. A suitable position in each mark pattern is selected as the positioning center, and this position will be used as a reference point to calculate the accurate position of the printed object.
[0024] Preferably, the data in step S4 is fed back to other tools.
[0025] When entering production, the machine tool drives the camera to move near the three mark patterns. After the visual algorithm locates each mark pattern, the coordinate data is fed back to other tools for calculating the center position and rotation angle of the material.
[0026] Preferably, the physical position of the mark is calculated according to the visual algorithm described in step S4, and the specific formula is as follows:
[0027] By establishing the coordinate relationship, and the position of the mark pattern captured by the camera in the image is (x, y), the physical position of the mark is calculated by the following formula:
[0028] X = (x-cx)*s_x;
[0029] Y = (y-cy)*s_y;
[0030] Among them, X and Y are the positions of the mark pattern in the physical coordinate system; x and y are the positions of the mark pattern in the image coordinate system; cx and cy are the positions of the positioning center (reference point) in the image coordinate system; s_x and s_y are the scaling factors from image coordinates to physical coordinates.
[0031] Preferably, the calculation formula for the center position and rotation angle of the material is:
[0032] Set the coordinates of mark1 to (x1, y1), the coordinates of mark2 to (x2, y2), the coordinates of mark3 to (x3, y3), and the coordinates of the positioning center to (cx, cy);
[0033] Material center position: The x coordinate of the material center is (x1+x2+x3) / 3; the y coordinate of the material center is (y1+y2+y3) / 3;
[0034] Material rotation angle:
[0035] Set the angle between the line segment between mark1 and mark2 and the x-axis to θ1, and the angle between the line segment between mark2 and mark3 and the x-axis to θ2;
[0036] The rotation angle of the material is θ=(θ1+θ2) / 2.
[0037] A 2D vision-based mark point positioning printing detection device includes: at least one processor, at least one memory and computer program instructions stored in the memory, and when the computer program instructions are executed by the processor, the above-mentioned method is implemented.
[0038] A storage medium stores computer program instructions, which implement the above-mentioned method when the computer program instructions are executed by a processor.
[0039] The beneficial effects of the present invention are:
[0040] (1) This method realizes the positioning and measurement of the mark points on the printed sample, improves the recognition and positioning accuracy of the mark pattern, and then calculates the center position and rotation angle of the printed object by establishing coordinate relationships and calculation formulas, further improving the printing positioning function;
[0041] (2) High versatility. Using the same mark pattern for different materials can achieve accurate alignment for printing materials of various sizes;
[0042] (3) Easy to operate. Users only need to select the mark pattern to be located on the software to complete the template creation. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] For better understanding and implementation, the technical solution of the present application is described in detail below with reference to the accompanying drawings.
[0044] Figure 1 A flowchart of a method for detecting mark point positioning printing based on 2D vision provided in Example 1 of the present application;
[0045] Figure 2 A flow chart of establishing coordinate relationships for a method for detecting mark point positioning printing based on 2D vision provided in Example 1 of the present application;
[0046] Figure 3 A flow chart of establishing coordinate relationships through chessboard positions in a method for detecting mark point positioning printing based on 2D vision provided in Example 1 of the present application;
[0047] Figure 4 A flow chart of a printing positioning mark pattern for a 2D vision-based mark point positioning printing detection method provided in Example 1 of the present application. DETAILED DESCRIPTION
[0048] In order to further explain the technical means and effects taken by the present invention to achieve the predetermined invention purpose, exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of methods and systems consistent with some aspects of the present application as detailed in the attached claims.
[0049] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0050] The specific implementation methods, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments.
[0051] Example 1
[0052] See also Figure 1-Figure 4 In this embodiment, the mark pattern on the printed sample is used as a positioning mark, and accurate positioning and measurement are achieved by establishing a coordinate relationship and template matching. The recognition and positioning accuracy of the mark pattern are improved by selecting a positioning area, selecting a suitable mark pattern and a positioning center, and establishing a matching template.
[0053] This embodiment provides a method for detecting mark point positioning printing based on 2D vision, comprising the following steps:
[0054] S1: Use a printer to print a chessboard, and then use a camera to take a picture and establish a coordinate relationship; the printer prints a chessboard pattern according to specific specifications and spacing, ensuring that the size of the chessboard and the distance between the grids are accurate, and then use a camera to take a picture of the printed chessboard and obtain an image related to the actual coordinate system. Ensure that the camera and printer are aligned, and calibrate the camera parameters.
[0055] S2: It is necessary to print positioning marks at the four corners of the printed sample; design and print specific mark patterns at the four corners of the printed sample. These mark patterns should have sufficient contrast and recognition to facilitate subsequent positioning operations.
[0056] S3: select the positioning area, select the positioning mark pattern, and select the positioning center to establish a matching template;
[0057] S4: The printer moves the camera to the mark point to take a picture. After the visual algorithm calculates the physical position of the mark, it feeds the data back to other tools.
[0058] The printer moves the camera to the position of each mark pattern and triggers the camera to shoot. Ensure the synchronous movement of the camera and the printer.
[0059] The captured images are processed and analyzed using visual algorithms to identify and locate each mark pattern. This can be achieved through methods such as feature extraction, template matching or edge detection.
[0060] According to the physical position of the mark point and the established coordinate relationship, the accurate position information of the printed object is calculated.
[0061] In this embodiment, according to the establishment of the coordinate relationship described in step S1,
[0062] S11: The printer prints a checkerboard pattern in the same direction as its XY axis, with the distance between each grid being 10 mm; a grid pattern is generated on the printed sample, with the distance between each grid being 10 mm.
[0063] S12: The mobile camera is aimed at the chessboard positions to take pictures, and the visual algorithm establishes a coordinate relationship through the chessboard positions; the pixel coordinates in the image are mapped and associated with the coordinates in the actual physical world.
[0064] By establishing a mapping relationship between the camera coordinate system and the physical coordinate system of the printed sample, the corresponding coordinate values can be calculated by analyzing information such as feature points, edges or mark patterns in the image, thereby realizing the conversion from image coordinates to actual physical coordinates; this establishment of coordinate relationships can locate and measure objects or specific areas on the printed sample in the image. For example, if we need to determine the position of a mark pattern or calculate the distance between two objects, we can use the established coordinate relationship to accurately measure and locate, and can achieve accurate measurement and positioning of the position and size of objects on the printed sample.
[0065] In this embodiment, the steps of establishing the coordinate relationship through the chessboard positions in step S12 include:
[0066] S121: Acquire a chessboard image, place the chessboard printed by the printer in the camera field of view, and use the camera to capture the image of the chessboard;
[0067] S122: Checkerboard corner detection, using image processing algorithms to detect the corners of the checkerboard in the captured checkerboard image. This can be achieved through edge detection, corner detection and other algorithms. Commonly used corner detection algorithms include Harris corner detection, Shi-Tomasi corner detection, etc.
[0068] S123: Calibrate the corner point coordinates, and assign physical coordinate values to the detected corner points of the chessboard according to the physical size of the chessboard actually printed. For example, assuming that the distance between each grid is 10mm, the coordinates of the corner point of the upper left corner can be set to (0,0), and then the other corner points can be assigned appropriate physical coordinate values in turn, such as (0,10), (10,0), (10,10), and so on;
[0069] S124: Calculate the camera internal parameters, and calculate the camera internal parameter matrix according to the camera parameters and geometric relationships, including parameters such as focal length and optical center. The camera internal parameters are the inherent properties of the camera and do not change with the change of the shooting scene;
[0070] S125: Camera extrinsic parameter estimation, using the physical coordinates of the checkerboard corner points and the pixel coordinates of the corner points detected in the image, the camera calibration algorithm is used to estimate the camera's extrinsic parameter matrix, including the camera's rotation matrix and translation vector. These extrinsic parameter matrices describe the camera's posture and position in the world coordinate system;
[0071] S126: Establishing coordinate relationships, mapping and associating pixel coordinates in the image with coordinates in the actual physical world according to the camera intrinsic parameter matrix and extrinsic parameter matrix. Methods such as perspective projection transformation can be used to convert pixel coordinates into physical coordinates.
[0072] In this embodiment, the printing of the positioning mark pattern according to step S2 includes:
[0073] S21: The user creates mark patterns at the four corners of the printed material that can be distinguished from the background; design and print specific mark patterns at the four corners of the printed material so that they can be distinguished from the background in the subsequent positioning process. These mark patterns are unique in shape, color or texture to provide sufficient contrast and recognition.
[0074] S22: After moving the camera above the mark pattern, the user selects the area to be located and the pattern to be located on the software, and then establishes template information; by selecting the positioning area, the range to be located can be clearly specified. In the positioning area, the mark pattern is selected, and the appropriate size and shape are selected to establish a corresponding matching template. These template information contains the features and position information of the mark pattern, which is used for subsequent visual algorithm processing and positioning calculation.
[0075] By establishing the template information of the mark pattern and storing the corresponding image features and position data in the software, when the camera shoots the mark pattern in actual operation, the template information is used for image processing and matching calculation to accurately identify and locate the mark pattern; it is possible to create a unique mark pattern on the printed material and use the software tool to establish the corresponding template information. This can improve the recognition and positioning accuracy of the mark pattern, thereby achieving accurate printing positioning.
[0076] In this embodiment, according to the establishment of the matching template described in step S3,
[0077] Use image processing software or custom algorithms to select the positioning area in the printed sample. This area should contain the mark pattern and other features used for positioning, such as surrounding edges, textures, etc. Therefore, by accurately positioning the area, the accuracy of positioning can be improved. In the positioning area, select the mark pattern and select the appropriate size and shape to establish a matching template. By establishing a matching template, you can use template matching and other methods to identify and locate the mark pattern in subsequent visual algorithm processing. Select a suitable position in each mark pattern as the positioning center. This position will be used as a reference point to calculate the exact position of the printed object. By selecting a suitable positioning center, you can reduce errors and improve positioning accuracy.
[0078] By selecting the appropriate size and shape to establish a matching template, the recognition of the mark pattern can be improved. The appropriate template size and shape can better adapt to the characteristics of the mark pattern and provide more accurate matching results, thereby enhancing the recognition ability of the mark pattern.
[0079] In this embodiment, the data described in step S4 is fed back to other tools.
[0080] When entering production, the machine tool drives the camera to move near the three mark patterns. After the visual algorithm locates each mark pattern, the coordinate data is fed back to other tools for calculating the center position and rotation angle of the material.
[0081] In this embodiment, the physical position of the mark is calculated according to the visual algorithm described in step S4, and the specific formula is as follows:
[0082] By establishing the coordinate relationship, and the position of the mark pattern captured by the camera in the image is (x, y), the physical position of the mark is calculated by the following formula:
[0083] X = (x-cx)*s_x;
[0084] Y = (y-cy)*s_y;
[0085] Among them, X and Y are the positions of the mark pattern in the physical coordinate system; x and y are the positions of the mark pattern in the image coordinate system; cx and cy are the positions of the positioning center (reference point) in the image coordinate system; s_x and s_y are the scaling factors from image coordinates to physical coordinates.
[0086] The basic idea of this formula is to map image coordinates to physical coordinates by subtracting the coordinates of the positioning center and multiplying by the scaling factor to get the physical position.
[0087] When calculating the physical position of the mark, the established coordinate relationship and physical position calculation formula can be flexibly adjusted according to the different material sizes. For example, when calculating the center position of a material, different numbers of mark patterns can be selected to participate in the calculation according to the actual situation to meet the positioning requirements of materials of different sizes.
[0088] In this embodiment, the calculation formula of the center position and rotation angle of the material is:
[0089] Set the coordinates of mark1 to (x1, y1), the coordinates of mark2 to (x2, y2), the coordinates of mark3 to (x3, y3), and the coordinates of the positioning center to (cx, cy);
[0090] Material center position: The x coordinate of the material center is (x1+x2+x3) / 3; the y coordinate of the material center is (y1+y2+y3) / 3;
[0091] Material rotation angle:
[0092] Set the angle between the line segment between mark1 and mark2 and the x-axis to θ1, and the angle between the line segment between mark2 and mark3 and the x-axis to θ2;
[0093] The rotation angle of the material is θ=(θ1+θ2) / 2.
[0094] A 2D vision-based mark point positioning printing detection device includes: at least one processor, at least one memory and computer program instructions stored in the memory, and when the computer program instructions are executed by the processor, the above-mentioned method is implemented.
[0095] A storage medium stores computer program instructions, which implement the above-mentioned method when the computer program instructions are executed by a processor.
[0096] Example 2
[0097] This embodiment introduces real-time detection and tracking and uses a real-time detection and tracking algorithm to adjust the position of the camera in real time during the printing process to achieve more accurate positioning and alignment.
[0098] This embodiment provides a method for detecting mark point positioning printing based on 2D vision, comprising the following steps:
[0099] Select an appropriate target detection algorithm. The target detection algorithm is used to accurately locate the position of the mark pattern in the image or video. Common target detection algorithms include deep learning-based methods such as YOLO and FasterR-CNN, as well as traditional feature extraction and machine learning methods such as Haar features and support vector machines (SVM). Select an appropriate target detection algorithm based on the requirements of the application scenario and resource constraints.
[0100] Data collection and labeling: In order to train the target detection model, it is necessary to collect image data with mark patterns and label them. The labeling method can be manual labeling or automatic labeling using auxiliary tools. The labeling result needs to include the bounding box location information of the mark pattern;
[0101] Train the object detection model using the collected and annotated data. By inputting an image, the model can output the location information of the mark pattern, that is, the coordinates of the bounding box;
[0102] Real-time detection: During the printing process, the image captured by the camera is input into the target detection model to detect the position of the mark pattern in real time. Based on the detection results, the current position coordinates of the mark pattern are obtained;
[0103] Target tracking: Use target tracking algorithms to track the mark pattern to obtain its motion trajectory. Common target tracking algorithms include methods based on Kalman filters and particle filters. These algorithms can predict the next position of the mark pattern based on previous observations and system dynamics models, and update the tracking results;
[0104] Adjust the camera position in real time, and achieve more accurate positioning and alignment by controlling the movement of the camera according to the position and movement trajectory of the mark pattern. For example, if the mark pattern deviates from the expected position, the deviation can be corrected by adjusting the translation or rotation of the camera to align the mark pattern with the expected position;
[0105] Iterative loop: During the printing process, real-time detection, target tracking, and camera adjustment are continuously iterated to continuously monitor the position and motion trajectory of the mark pattern, and adjust the camera position in real time to achieve more accurate positioning and alignment effects.
[0106] This embodiment can improve the positioning and alignment accuracy of the camera during the printing process by introducing a real-time detection and tracking algorithm to monitor the position and motion trajectory of the mark pattern.
[0107] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A method for detecting mark point positioning printing based on 2D vision, characterized in that: The steps include: S1: Use a printer to print the chessboard, use a camera to take pictures, and then establish the coordinate relationship; S2: It is necessary to print positioning mark patterns at the four corners of the printed sample; S3: select the positioning area, select the positioning mark pattern, and select the positioning center to establish a matching template; S4: The printer moves the camera to the mark point to take a picture. After the visual algorithm calculates the physical position of the mark, it feeds the data back to other tools. In S2, after printing the positioning mark patterns at the four corners of the printed sample, a real-time detection and tracking module is added as follows: Algorithm selection, including deep learning-based methods, as well as traditional feature extraction and machine learning methods. Choose the appropriate target detection algorithm based on the needs of the application scenario and resource constraints; Data collection and labeling: In order to train the target detection model, image data with mark patterns are collected and labeled. There are two ways to label: manual labeling and automatic labeling using auxiliary tools. The labeling results need to include the position information of the bounding box of the mark pattern. Train the target detection model. Use the collected and annotated data to train the target detection model. By inputting the image, the model must output the location information of the mark pattern, that is, the coordinates of the bounding box; Real-time detection: During the printing process, the image captured by the camera is input into the target detection model to detect the position of the mark pattern in real time. Based on the detection results, the current position coordinates of the mark pattern are obtained; Target tracking: Use the target tracking algorithm to track the mark pattern to obtain its motion trajectory. The target tracking algorithm includes methods based on Kalman filter and particle filter. It predicts the next position of the mark pattern based on previous observations and system dynamics models, and updates the tracking results; Adjust the camera position in real time. According to the position and motion trajectory of the mark pattern, more accurate positioning and alignment can be achieved by controlling the movement of the camera. When the mark pattern deviates from the expected position, the deviation can be corrected by adjusting the translation or rotation of the camera to align the mark pattern with the expected position. Iteration: During the printing process, real-time detection, target tracking, and camera adjustment are continuously iterated to continuously monitor the position and motion trajectory of the mark pattern and adjust the camera position in real time to achieve more accurate positioning and alignment effects. According to the establishment of coordinate relationship described in step S1, S11: The printer prints a chessboard with the same XY axis direction, and the distance between each grid is 10mm; S12: Move the camera to the chessboard position to take pictures, and the visual algorithm establishes the coordinate relationship through the chessboard position; According to step S12, the steps of establishing the coordinate relationship include: S121: Acquire a chessboard image, place the chessboard printed by the printer in the camera field of view, and use the camera to capture the image of the chessboard; S122: Checkerboard corner point detection, using an image processing algorithm to detect checkerboard corner points in the captured checkerboard image; S123: Calibrate corner point coordinates, assign physical coordinate values to the detected corner points of the chessboard according to the physical size of the chessboard actually printed; S124: Calculate the camera internal parameters, and calculate the camera internal parameter matrix according to the camera parameters and geometric relationships; S125: Estimating camera extrinsic parameters, using the physical coordinates of the checkerboard corner points and the pixel coordinates of the corner points detected in the image, and using a camera calibration algorithm to estimate the camera's extrinsic parameter matrix; S126: Establishing a coordinate relationship, mapping and associating pixel coordinates in the image with coordinates in the actual physical world according to the camera intrinsic parameter matrix and the extrinsic parameter matrix; The step of printing a positioning mark pattern according to step S2 includes: S21: The user creates a mark pattern at the four corners of the printed material that can be distinguished from the background; S22: After the camera is moved above the mark pattern, the user selects the area to be located and the pattern to be located on the software, and then creates template information; According to the establishment of the matching template described in step S3, use image processing software or a custom algorithm to select a positioning area in the printed sample. This area should contain a mark pattern and other features used for positioning. In the positioning area, select the mark pattern and select a suitable size and shape to establish a matching template. Select a suitable position in each mark pattern as the positioning center. This position will be used as a reference point to calculate the exact position of the printed object.
2. The method for detecting mark point positioning printing based on 2D vision according to claim 1, characterized in that: Feedback the data in step S4 to other tools, When entering production, the machine tool drives the camera to move near the three mark patterns. After the visual algorithm locates each mark pattern, the coordinate data is fed back to other tools for calculating the center position and rotation angle of the material.
3. The method for detecting mark point positioning printing based on 2D vision according to claim 1, characterized in that: The physical position of the mark is calculated according to the visual algorithm described in step S4. The specific formula is as follows: By establishing the coordinate relationship, and the position of the mark pattern captured by the camera in the image is (x, y), the physical position of the mark is calculated by the following formula: X=(x-cx)*s_x; Y=(y-cy)*s_y; Among them, X and Y are the positions of the mark pattern in the physical coordinate system; x and y are the positions of the mark pattern in the image coordinate system; cx and cy are the positions of the positioning center in the image coordinate system; s_x and s_y are the scaling factors from image coordinates to physical coordinates.
4. The method for detecting mark point positioning printing based on 2D vision according to claim 2, characterized in that: The calculation formula for the center position and rotation angle of the material is: Set the coordinates of mark1 to (x1, y1), the coordinates of mark2 to (x2, y2), the coordinates of mark3 to (x3, y3), and the coordinates of the positioning center to (cx, cy); Material center position: The x coordinate of the material center is (x1+x2+x3) / 3; the y coordinate of the material center is (y1+y2+y3) / 3; Material rotation angle: Set the angle between the line segment between mark1 and mark2 and the x-axis to θ1, and the angle between the line segment between mark2 and mark3 and the x-axis to θ2; The rotation angle of the material is θ=(θ1+θ2) / 2.
5. A 2D vision-based mark point positioning printing detection device, characterized in that: include: At least one processor, at least one memory and computer program instructions stored in the memory, when the computer program instructions are executed by the processor, implement the method according to any one of claims 1 to 4.
6. A storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Laser cutting visual positioning method based on any template matching
CN110175621A
Screen frame aligning and registering method
CN113043723A
Handheld mobile printing device positioning method based on computer vision
CN113112545A
Method for positioning object on UV printer based on machine vision and deep learning
CN113838144A
Method / device for locating a printing substrate and printing method / system comprising said method / device for locating
WO2017149508A1
