Method, system, terminal and storage medium for positioning and punching of printed sheet for vehicle lights
Through the cooperation of the robot and the detection frame, efficient punching of the positioning points of the headlight printing sheet is achieved, solving the problem of low efficiency in manual methods and ensuring the accuracy and completeness of the punching.
Patent Information
- Application Number
- CN202510919696.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-07-04
AI Technical Summary
In the prior art, the efficiency of manually punching the positioning points on the printed sheet of the headlight is low.
The printed sheet is moved to the preset working position by a robot, the position of the positioning point is identified and the punching coordinates are obtained, and the positioning point is punched using the punching coordinates. When the detection frame cannot identify the positioning point, a larger detection frame is used for identification and adjustment to ensure that all positioning points are punched.
The efficiency of positioning point punching is improved, processing defects caused by missing positioning points, recognition failure or omission of previous punching are avoided, and the accuracy and completeness of the punching operation are ensured.
Smart Images

Figure CN120396048B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of punching of printed sheets, and in particular to a method, system, terminal and storage medium for positioning punching of printed sheets for vehicle lights. Background Art
[0002] Currently, a touch-sensitive panel is usually used to control the on / off switch of a car's roof light. A touch-sensitive panel is usually provided on the roof light to control the on / off switch of the roof light by touch.
[0003] Reference Figure 1 A printed sheet includes a plurality of touch films 11 and positioning dots 12 printed on one side of the touch films 11. The positioning dots 12 are circular and require punching to serve as positioning points during the subsequent stamping process of the touch films 11. In the prior art, the positioning dots on the printed sheet are typically manually moved sequentially to a punching station. After the positioning dots 12 are aligned with the punching device, the punching is performed.
[0004] Regarding the above-mentioned related technologies, the efficiency of punching the positioning points on the printed sheet manually is low. Summary of the Invention
[0005] In order to improve the efficiency of punching positioning points on printed sheets, the present application provides a method, system, terminal and storage medium for positioning punching of printed sheets for automotive lights.
[0006] In a first aspect, the present application provides a method for positioning and punching a printed sheet of a vehicle lamp, which adopts the following technical solution:
[0007] A method for positioning and punching a printed sheet of a vehicle lamp, comprising:
[0008] The printing sheet is moved to the preset working position by the robot;
[0009] Moving the printing sheet so that the i-th positioning point among the positioning points of the printing sheet is located at the punching station, where i is a positive integer with an initial value of 1;
[0010] Executing a punching coordinate acquisition step, the punching coordinate acquisition step comprising: identifying the position of the i-th positioning point, and acquiring the coordinates of the i-th positioning point to obtain the punching coordinates;
[0011] Executing a punching operation step, the punching operation step comprising: performing a punching operation on the i-th positioning point according to the punching coordinates;
[0012] Executing a moving step, the moving step comprising: moving the printing sheet based on the i-th positioning point so that the i+1-th positioning point is located at the punching station, and updating i to i+1;
[0013] Repeating the steps of obtaining the punching coordinates, performing the punching operation, and moving the holes until the punching operation is completed for all the positioning points;
[0014] The brush sheet material after the punching operation is completed is transferred to a preset storage position by the robot.
[0015] By adopting the above technical solution, the printed sheet is moved to a preset working position by a robot, and the position of the positioning point is identified, the punching coordinates are obtained, and the positioning point is punched according to the punching coordinates. This is repeated to complete the punching operation for all the positioning points, and then the printed sheet on which the punching operation has been completed is transferred to a preset storage position. Compared with the method of manually punching the positioning points, the present application has a higher efficiency in punching the positioning points.
[0016] Optionally, in the process of identifying the position of the positioning point, determining whether the positioning point is located in the first detection frame;
[0017] If the positioning point is not within the first detection frame, use a second detection frame to detect and determine whether the positioning point is within the second detection frame, wherein the detection range of the second detection frame is larger than the detection range of the first detection frame;
[0018] If not, mark the position indicated by the current first detection frame to obtain the target coordinate point, and record the coordinates of the target coordinate point to obtain the target coordinates;
[0019] Obtaining adjacent positioning points on both sides of the target coordinate point, and obtaining the midpoint coordinates of the adjacent positioning points;
[0020] The target coordinates are updated using the midpoint coordinates, and the target coordinates are used as the punching coordinates.
[0021] By adopting the above technical solution, when the first detection frame cannot identify the positioning point, the second detection frame with a larger detection range is further used to identify the positioning point. If the second detection frame still cannot identify the positioning point, it means that there is a missing print in the current position of the printed sheet, resulting in the positioning point not being printed. Therefore, based on this situation, the position indicated by the current first detection frame is marked to obtain the target coordinate point, and the midpoint coordinates of the adjacent positioning points are used to update the target coordinates, and the updated target coordinates are used as the punching coordinates, so that when there is a missing print in the positioning point in the printed sheet, the punching coordinates can still be obtained to punch the printed sheet.
[0022] Optionally, in the process of detecting the positioning points using the second detection frame, determining whether the number of the positioning points is greater than one;
[0023] If so, use a third detection frame to detect the positioning point and identify the positioning point where the punching operation has been completed, wherein the detection range of the third detection frame is larger than the detection range of the second detection frame;
[0024] Mark the nearest positioning point to the positioning point where the punching operation has been completed as the positioning point to be punched;
[0025] The printed sheet is moved so that the positioning point to be punched is located within the first detection frame.
[0026] By adopting the above technical solution, in the process of using the second detection frame for detection, if the number of positioning points is greater than one, it is difficult to determine the positioning point that needs to be punched. Therefore, the third detection frame is used for detection to identify the positioning point that has completed the punching operation, and the positioning point closest to the positioning point that has completed the punching operation is marked as the positioning point to be punched. Then, the printed sheet is moved so that the positioning point to be punched is located in the first detection frame so that the punching operation can be performed on the positioning point to be punched.
[0027] Optionally, when there is only one adjacent positioning point on both sides of the target coordinate point, the number of positioning points that have completed the punching operation is counted to obtain the number of punchings;
[0028] Determining whether the punching number is less than a preset punching number;
[0029] If so, moving the printing sheet in the reverse direction according to the number of punching holes;
[0030] Using the second detection frame to detect and determine whether there are any positioning points that have not been punched;
[0031] If so, moving the printed sheet so that the positioning point where the punching operation is not performed is located within the first detection frame;
[0032] The coordinates of the positioning points where the punching operation is not performed are acquired to obtain the punching coordinates.
[0033] By adopting the above technical solution, when it is detected that there is only one positioning point on both sides of the target coordinate point, the number of completed punching operations can be counted and compared with the preset number of punchings. When the number of punchings is insufficient, the printed sheet is moved in the opposite direction and re-detected using the second detection frame to accurately find the missed unpunched positioning points, and control them to re-enter the first detection frame for positioning and punching, thereby effectively avoiding processing defects caused by missing positioning points, recognition failures or omissions of previous punching.
[0034] Optionally, acquiring an image corresponding to the positioning point to obtain a positioning point image;
[0035] Determining whether the positioning point image is a preset dot image;
[0036] If not, use an identification frame to select the positioning point image;
[0037] removing discrete images from the positioning point image, narrowing the range of the recognition frame, and selecting the main image in the positioning point image;
[0038] Obtain the midpoint coordinates of the line connecting the positioning points on both sides of the positioning point to obtain the midpoint reference coordinates;
[0039] Determining whether the distance between the center coordinates of the identification frame and the midpoint reference coordinates is greater than a preset distance;
[0040] If so, obtaining the midpoint coordinates between the center coordinates of the identification frame and the midpoint reference coordinates to obtain the punching coordinates;
[0041] If not, the center coordinates of the identification frame are used as the punching coordinates.
[0042] By adopting the above technical solution, when the positioning point image is not the preset dot image, the discrete images in the positioning image are removed, and the main image of the positioning point image of the identification frame is used for frame selection. When the distance between the center coordinates of the identification frame and the midpoint reference coordinates is greater than the preset distance, it means that there is a large position deviation of the positioning point during the printing process. Therefore, the midpoint coordinates of the center coordinates of the identification frame and the midpoint reference coordinates are selected as the punching coordinates. Otherwise, the center coordinates of the identification frame are used as the punching coordinates. This helps to improve the accuracy of obtaining the punching coordinates when the positioning point image is not the preset dot image, so that the punching position deviation of the positioning point is smaller.
[0043] Optionally, identifying an edge contour of the positioning point image;
[0044] Determining whether the edge profile conforms to a preset arc profile;
[0045] If so, three reference points are selected on the edge contour;
[0046] Acquire the center coordinates of the circle corresponding to the positioning point image based on the reference point;
[0047] Using the circle center coordinates as punching coordinates;
[0048] If not, the punching coordinates are obtained according to a preset coordinate acquisition method.
[0049] By adopting the above technical solution, by identifying the edge contour of the positioning point image and when the edge contour conforms to the preset arc contour, three reference points are selected on the edge contour and the center coordinates corresponding to the positioning point image are calculated based on the three reference points, and the center coordinates are used as the punching coordinates, so that even if the positioning point image is incomplete, the punching coordinates corresponding to the positioning point can still be obtained.
[0050] Optionally, the step of obtaining the punching coordinates according to a preset coordinate acquisition method includes:
[0051] Making a prediction frame based on the midpoint reference coordinates;
[0052] Determining whether the positioning point image is located within the prediction frame;
[0053] If yes, the center coordinates of the predicted frame are used as the punching coordinates;
[0054] If not, obtaining the deviation direction of the positioning point image based on the midpoint reference coordinates;
[0055] The printing sheet is moved according to the deviation direction so that the positioning point image is located within the prediction frame, and the center coordinates of the current prediction frame are used as the punching coordinates.
[0056] By adopting the above technical solution, based on the case where the edge contour does not conform to the preset arc contour, a prediction frame is made at the midpoint reference coordinates. If the positioning point image is located within the prediction frame, the prediction frame can be used to represent the outer contour of the positioning point image, and the center coordinates of the prediction frame are used as the punching coordinates. If the positioning point image is not located within the prediction frame, the printing sheet is moved so that the positioning point image is located within the prediction frame. The prediction frame can represent the outer contour of the positioning point image, and the center coordinates of the prediction frame at the current moment are used as the punching coordinates. This allows the punching coordinates corresponding to the positioning point to be obtained even if the positioning point image is incomplete.
[0057] In a second aspect, the present application provides a positioning and punching system for printed sheet materials for automotive lamps, which adopts the following technical solutions:
[0058] A positioning and punching system for printed sheet materials for vehicle lights, comprising:
[0059] Acquisition module, used to obtain the coordinates of the positioning point;
[0060] A memory for storing a program for the positioning and punching method of the printed sheet for the headlight;
[0061] The processor and the program in the memory can be loaded and executed by the processor to implement the positioning and punching method of the printed sheet of the vehicle lamp.
[0062] By adopting the above technical solution, the printed sheet is moved to a preset working position by a robot, and the position of the positioning point is identified, the punching coordinates are obtained, and the positioning point is punched according to the punching coordinates. This is repeated to complete the punching operation for all the positioning points, and then the printed sheet on which the punching operation has been completed is transferred to a preset storage position. Compared with the method of manually punching the positioning points, the present application has a higher efficiency in punching the positioning points.
[0063] In a third aspect, the present application provides a smart terminal that adopts the following technical solution:
[0064] An intelligent terminal includes a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute the above method.
[0065] In a fourth aspect, the present application provides a computer storage medium capable of storing a corresponding program, which has the characteristic of facilitating improving the efficiency of punching positioning points on a printed sheet, and adopts the following technical solution:
[0066] A computer-readable storage medium stores a computer program that can be loaded by a processor and execute any one of the above-mentioned positioning and punching methods for printed sheet materials for vehicle lamps.
[0067] In summary, this application includes at least one of the following beneficial technical effects:
[0068] The printing sheet is moved to a preset working position by a robot, and the position of the positioning point is identified, the punching coordinates are obtained, and the positioning point is punched according to the punching coordinates. This is repeated to complete the punching operation for all the positioning points, and then the printed sheet on which the punching operation has been completed is moved to a preset storage position. Compared with the method of manually punching the positioning points, the present application has a higher efficiency in punching the positioning points.
[0069] When it is detected that there is only one positioning point on both sides of the target coordinate point, the number of completed punching operations can be counted and compared with the preset punching number. When the number of punching is insufficient, the printing sheet is moved in the opposite direction and re-detected using the second detection frame to accurately find the missed unpunched positioning points and control them to re-enter the first detection frame for positioning and punching, thereby effectively avoiding processing defects caused by missing positioning points, recognition failures or omissions of previous punching.
[0070] By identifying the edge contour of the positioning point image and when the edge contour conforms to the preset arc contour, three reference points are selected on the edge contour and the center coordinates corresponding to the positioning point image are calculated based on the three reference points, and the center coordinates are used as the punching coordinates, so that even if the positioning point image is incomplete, the punching coordinates corresponding to the positioning point can still be obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is a structural schematic diagram of a printing sheet in an embodiment of the present application.
[0072] Figure 2 It is a flow chart of a method for positioning and punching a printed sheet for a headlight in an embodiment of the present application.
[0073] Figure 3 It is a flow chart of a method for obtaining punching coordinates through midpoint coordinates in an embodiment of the present application.
[0074] Figure 4 It is a flowchart of a method for determining a positioning point in an embodiment of the present application.
[0075] Figure 5 It is a flow chart of a method for preventing missed punching of positioning points in an embodiment of the present application.
[0076] Figure 6 It is a flow chart of a method for obtaining punching coordinates based on positioning point images in an embodiment of the present application.
[0077] Figure 7 This is a schematic diagram of identifying positioning points in an embodiment of the present application.
[0078] Figure 8 It is a flow chart of a method for obtaining punching coordinates in an embodiment of the present application.
[0079] Figure 9 It is a flow chart of the steps of obtaining punching coordinates according to a preset coordinate acquisition method in an embodiment of the present application.
[0080] Description of reference numerals: 11, touch film; 12, positioning point. DETAILED DESCRIPTION
[0081] In order to make the purpose, technical solutions and advantages of this application more clear, the following Figure 1-9 It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.
[0082] The embodiment of the present application discloses a method for positioning and punching holes in a printed sheet of a vehicle lamp. Figure 2 , the positioning punching method of the printed sheet of the headlight includes:
[0083] Step S101: The printing sheet is moved to a preset working position by a robot.
[0084] The preset working position refers to the position used for positioning punching of the printing sheet.
[0085] The robot is equipped with a suction cup that sucks up one side of the printed sheet and shakes it up and down to prevent adhesion between the upper and lower printed sheets. It then moves the printed sheet to a preset working position. During the transfer process and the subsequent punching process, the suction cup always maintains suction on the printed sheet to move the printed sheet.
[0086] Step S102: moving the printing sheet so that the i-th positioning point among the positioning points of the printing sheet is located at the punching station, where i is a positive integer with an initial value of 1.
[0087] The punching station is a station for punching positioning points on a printed sheet, wherein a detection camera for identifying the positioning points and a punching device for punching the positioning points are provided at the punching station.
[0088] Wherein, the positioning points are numbered with Pi. For example, refer to Figure 1 , with the upper left corner anchor point as the first anchor point, marked as P1, and the upper right corner anchor point as the last anchor point, and the numbering order is U-shaped.
[0089] When i is 1, the printed sheet is moved by the robot so that the first positioning point is located at the punching station. The robot is set with a preset program. After moving the printed sheet to the preset working position, it continues to move the sheet so that the first positioning point is within the recognizable range of the detection camera.
[0090] Step S103: executing the step of obtaining the punching coordinates, which includes: identifying the position of the i-th positioning point, and obtaining the coordinates of the i-th positioning point to obtain the punching coordinates.
[0091] The coordinates of a positioning point refer to the position of that positioning point in the image coordinate system, determined after the positioning point is identified by the image recognition algorithm within the detection camera's shooting range. The image coordinate system refers to a coordinate system with the first positioning point as the origin, the length of the printed sheet as the X-axis, and the width of the printed sheet as the Y-axis. After the positioning point is identified, a detection frame is formed in the image coordinate system that matches the shape of the positioning point. The detection frame has a center intersection line, and the intersection of the center intersection line is the position coordinate of the positioning point. The punching coordinates are the position coordinates of the positioning point.
[0092] Furthermore, when the positioning point is identified, the printing sheet is moved by the robot so that the center point of the positioning point is located at the origin in the image coordinate system.
[0093] Step S104: executing a punching operation step, the punching operation step including: performing a punching operation on the i-th positioning point according to the punching coordinates.
[0094] Among them, the position of the detection camera is fixed, and the punching device can move according to the position of the positioning point in the image coordinate system, that is, it can move according to the punching coordinates to perform punching operations on the positioning point.
[0095] Step S105: executing a moving step, the moving step including: moving the printing sheet based on the i-th positioning point so that the i+1-th positioning point is located at the punching station, and updating i to i+1.
[0096] Among them, when the center point of the positioning point is located at the origin of the image coordinate system, the current position of the manipulator is set to the zero point of the movement path. After the punching operation is completed for the i-th positioning point, the printed sheet is moved by the manipulator by a preset distance so that the i+1-th positioning point is located within the detection range of the detection camera. The movement path is preset by the operator, and the movement path corresponds to the numbering sequence of the positioning points. The preset distance is pre-set by the operator and is related to the distance between two adjacent positioning points. Figure 1 ,After the punching operation is completed for the positioning point at the lower left corner, the ,printed sheet needs to be moved horizontally so that the positioning point at the ,lower right corner is within the detection range of the detection camera.
[0097] After the i+1th positioning point is moved to the punching station, i is updated to i+1, so that in the subsequent steps, the i+1th positioning point is identified and the punching operation is performed.
[0098] Step S106: Repeat the steps of obtaining the punching coordinates, the punching operation, and the movement until the punching operation is completed for all the positioning points.
[0099] Steps S103, S104, and S105 are repeatedly executed to perform punching operations on the positioning points on the printing sheet in sequence. After the punching operations are completed on all the positioning points, step S107 is executed.
[0100] For example, refer to Figure 1 By executing steps S103, S104, and S105, starting from the upper left corner, the positioning points are punched, and the printed sheet is controlled to move upward, and the punching operation is completed in sequence for the positioning points on the left side, wherein the punching sequence is punching downward in sequence. After the punching operation is completed for the positioning point in the lower left corner, the printed sheet is moved horizontally to complete the punching of the positioning point in the lower right corner. Thereafter, the printed sheet is controlled to move downward, and the punching operation is completed in sequence for the positioning points on the right side, wherein the punching sequence is punching upward in sequence until the punching operation for the positioning point in the upper right corner is completed, and step S107 is executed.
[0101] Step S107: The brush sheet material after the punching operation is completed is transferred to a preset storage location by a robot.
[0102] The preset storage position is a position for storing printed sheets that have completed the punching operation. After the punching operation is completed for all the positioning points in the printed sheets, the printed sheets are moved to the preset storage position by the robot.
[0103] By adopting the above technical solution, the printed sheet is moved to a preset working position by a robot, and the position of the positioning point is identified, the punching coordinates are obtained, and the positioning point is punched according to the punching coordinates. This is repeated to complete the punching operation for all the positioning points, and then the printed sheet on which the punching operation has been completed is transferred to a preset storage position. Compared with the method of manually punching the positioning points, the present application has a higher efficiency in punching the positioning points.
[0104] In the following embodiment, when printing the touch film and the positioning points on the printed sheet, there is a probability of printing offset or positioning point printing error, such as missing printing. In order to solve this problem, the embodiment of the present application provides a method for obtaining the punching coordinates by the midpoint coordinates. Figure 3 , the method comprising:
[0105] Step S201: During the process of identifying the position of the positioning point, it is determined whether the positioning point is located in the first detection frame.
[0106] The first detection frame is a detection frame used to identify the positioning point.
[0107] In the process of identifying the position of the positioning point through the detection camera, due to the possibility of printing offset or missing printing of the positioning point, the first detection frame cannot detect the positioning point, so it is necessary to determine whether the positioning point is located in the first detection frame.
[0108] Step S202: If the positioning point is not located in the first detection frame, use the second detection frame to detect and determine whether the positioning point is located in the second detection frame, wherein the detection range of the second detection frame is larger than the detection range of the first detection frame.
[0109] On the other hand, if the positioning point is located within the first detection frame, refer to step S103 to obtain the coordinates of the positioning point.
[0110] The detection camera is a variable-focus camera with corresponding detection frames set at specific focal lengths. The detection frames include a first detection frame, a second detection frame, and a third detection frame. The area of the second detection frame is 1.5 times that of the first detection frame, and the area of the third detection frame is twice that of the first detection frame.
[0111] When the positioning point is not within the first detection frame, the focal length of the camera is changed and the positioning point is detected using the second detection frame. It is then determined whether the positioning point is within the second detection frame, thereby determining whether the positioning point is offset or missing.
[0112] Step S203: If not, mark the position indicated by the current first detection frame to obtain the target coordinate point, and record the coordinates of the target coordinate point to obtain the target coordinates.
[0113] In another aspect, if the positioning point is located within the second inspection frame, the printing sheet is moved by the robot arm so that the positioning point is located within the first inspection frame.
[0114] If not, it means that the positioning point is not located within the second detection frame, so the position indicated by the first detection frame is marked. The first detection frame has a cross line, and the position of the intersection is the position indicated by the first detection frame, that is, the target coordinate point. Furthermore, the current position of the manipulator corresponds to the position of the first detection frame. The coordinates of the intersection of the first detection frame can be obtained by obtaining the coordinates of the manipulator to obtain the coordinates of the target coordinate point. Since the positioning point cannot be detected within the second detection frame, the punching of the current positioning point is temporarily skipped, and the printing sheet is moved by the manipulator so that the next positioning point is located within the first detection frame, and the coordinates of the manipulator are recorded.
[0115] Step S204: Obtain adjacent positioning points on both sides of the target coordinate point, and obtain the midpoint coordinates of the adjacent positioning points.
[0116] The adjacent positioning point refers to the positioning point closest to the target coordinate point.
[0117] In the case that the second detection frame does not detect the positioning point, the detection of the positioning point is skipped, that is, the target coordinate point is skipped, and the coordinates of the next positioning point are detected and obtained, wherein the coordinates of the previous positioning point on the target coordinate point have been obtained when punching it. Therefore, the coordinates of the adjacent positioning points on both sides of the target coordinate point have been obtained, and the midpoint coordinates of the two adjacent positioning points are calculated based on the above two coordinates.
[0118] Exemplarily, when the punching operation is completed for the first positioning point, the robot's coordinate a1 is (0, 0). The robot moves the printed sheet so that the second positioning point is located at the punching station. However, neither the first detection frame nor the second detection frame detects the second positioning point, indicating that the second positioning point is offset or missing. The robot's movement distance is b, and the robot's coordinate a2 is (b, 0). Coordinate a2 is used as the target coordinate point, and the punching operation is skipped for the area corresponding to the target coordinate point. The robot moves the printed sheet so that the third positioning point is located at the punching station, and the first detection frame detects the third positioning point. If the third positioning point is detected, the printed sheet is moved so that the center point of the third positioning point is located at the center of the first detection frame. At this time, the robot's movement distance is c, and the robot's coordinate a3 is (b+c, 0). The coordinates of the midpoint between the first and third positioning points are ((b+c) / 2, 0).
[0119] Step S205: Use the midpoint coordinates to update the target coordinates, and use the target coordinates as the punching coordinates.
[0120] Among them, after obtaining the midpoint coordinates, the midpoint coordinates are used to update the target coordinates, and the target coordinates are moved into the detection range of the first detection frame by the robot, and the updated target coordinates are used as the punching coordinates to perform a punching operation on the area corresponding to the target coordinates.
[0121] By adopting the above technical solution, when the first detection frame cannot identify the positioning point, the second detection frame with a larger detection range is further used to identify the positioning point. If the second detection frame still cannot identify the positioning point, it means that there is a missing print in the current position of the printed sheet, resulting in the positioning point not being printed. Therefore, based on this situation, the position indicated by the current first detection frame is marked to obtain the target coordinate point, and the midpoint coordinates of the adjacent positioning points are used to update the target coordinates, and the updated target coordinates are used as the punching coordinates, so that when there is a missing print in the positioning point in the printed sheet, the punching coordinates can still be obtained to punch the printed sheet.
[0122] In the following embodiment, when printing the touch film and the positioning point, the printing distance between the adjacent touch films and the positioning points is relatively close, so that when using the second detection frame, it is easy to detect more than one positioning point, so that when determining the positioning point that needs to be punched, in order to improve this problem, the embodiment of the present application provides a positioning point determination method, referring to Figure 4 , the method comprising:
[0123] Step S301: in the process of detecting the positioning points using the second detection frame, determining whether the number of the positioning points is greater than one.
[0124] In some embodiments, because the distance between adjacent touch films and positioning points is relatively close, changing the focal length of the detection camera increases the detection range, resulting in the second detection frame including at least two positioning points during detection. Therefore, it is determined whether the number of positioning points in the second detection frame is greater than one.
[0125] Step S302: If yes, use a third detection frame to detect the positioning point and identify the positioning point where the punching operation has been completed, wherein the detection range of the third detection frame is larger than the detection range of the second detection frame.
[0126] On the other hand, if the number of positioning points is not greater than one during detection of the positioning points using the second detection frame, the printed sheet is moved by the robot so that the positioning points are located within the first detection frame to identify the positioning points and obtain the punching coordinates.
[0127] If yes, it means that the number of anchor points detected using the second detection frame is greater than one. In this case, a third detection frame is used to perform a wider range detection to distinguish between anchor points that have been punched and anchor points that have not been punched. The detection range of the second detection frame is 1.5 times that of the first detection frame, and the detection range of the third detection frame is twice that of the first detection frame.
[0128] Step S303: Mark the nearest positioning point to the positioning point where the punching operation has been completed as the positioning point to be punched.
[0129] When using the third detection frame for detection, since the detection range of the third detection frame is twice the detection range of the first detection frame, the detection range is larger, so as to detect the area near the current positioning point, so as to identify the positioning point where the punching operation has been completed and the positioning point closest to the positioning point where the punching operation has been completed, and mark the positioning point closest to the positioning point where the punching operation has been completed as the positioning point to be punched.
[0130] Step S304: moving the printed sheet so that the positioning point to be punched is located within the first detection frame.
[0131] The printed sheet is moved by a robot so that the positioning point to be punched is located within the first detection frame, and the center point of the positioning point to be punched is located at the intersection of the cross lines of the first detection frame, so that the corresponding punching coordinates can be obtained to perform punching operations on the point to be punched in subsequent steps.
[0132] By adopting the above technical solution, in the process of using the second detection frame for detection, if the number of positioning points is greater than one, it is difficult to determine the positioning point that needs to be punched. Therefore, the third detection frame is used for detection to identify the positioning point that has completed the punching operation, and the positioning point closest to the positioning point that has completed the punching operation is marked as the positioning point to be punched. Then, the printed sheet is moved so that the positioning point to be punched is located in the first detection frame so that the punching operation can be performed on the positioning point to be punched.
[0133] Reference Figure 5 , an embodiment of the present application provides a method for preventing missed punching of positioning points, the method comprising:
[0134] Step S401: When there is only one adjacent positioning point on both sides of the target coordinate point, the number of positioning points that have completed the punching operation is counted to obtain the number of punchings.
[0135] The number of punching holes specifies the number of anchor points that have completed the punching operation at the current moment.
[0136] When obtaining adjacent positioning points on both sides of the target coordinate point, if there is only one adjacent positioning point on one side, then the area corresponding to the printed sheet currently located at the punching station is a non-positioning point area. If the first positioning point to complete the punching operation is not the first positioning point in the printed sheet, then there is only one adjacent positioning point on both sides of the target coordinate point. In this case, the number of positioning points that have completed the punching operation is counted to obtain the number of punching holes. The specific steps for obtaining adjacent positioning points on both sides of the target coordinate point can be referred to step S204.
[0137] Step S402: Determine whether the punching quantity is less than a preset punching quantity.
[0138] The preset number of punching holes is a preset constant related to the sum of the number of positioning points on one side of the printed sheet minus one. Figure 1 , the number of positioning points on the left is 5, so the preset number of punching holes is 5-1=4.
[0139] By comparing the number of punching holes with the preset number of punching holes, it is possible to determine whether the positioning point during the initial punching is the first positioning point in the printed sheet. If the number of punching holes is less than the preset number of punching holes, it means that the positioning point during the initial punching is not the first positioning point in the printed sheet.
[0140] Step S403: If yes, move the printing sheet in the reverse direction according to the number of punching holes.
[0141] On the other hand, if the number of punching holes is not less than the preset number of punching holes, then refer to Figure 3 The steps in the embodiment obtain the punching coordinates.
[0142] If so, it means that the number of punching holes is less than the preset number of punching holes, that is, the positioning point during the initial punching is not the first positioning point in the printing sheet. Based on this situation, the printing material tray is moved in the reverse direction.
[0143] For example, refer to Figure 1 If the positioning points on the left side of the printed material are punched, the punching order is P2, P3, P4, and P5. The punching order is from top to bottom, and the moving direction of the printed sheet is from bottom to top. Therefore, the printing sheet is controlled by the robot to move from top to bottom.
[0144] Step S404: Use the second detection frame to detect and determine whether there are any positioning points that have not been punched.
[0145] During the process of moving the printing sheet in the reverse direction, the printing sheet is inspected in real time by the second inspection frame to determine whether there are any positioning points that have not been punched.
[0146] Step S405: If yes, move the printing sheet so that the positioning point where the punching operation is not performed is located within the first detection frame.
[0147] When there are positioning points that have not been punched, the printing sheet is moved by the robot so that the positioning points that have not been punched are located in the first detection frame during the process of using the second detection frame to detect the positioning points that have not been punched in real time.
[0148] Step S406: Acquire the coordinates of the positioning points where the punching operation has not been performed to obtain the punching coordinates.
[0149] After the positioning point that has not been punched is located within the first detection frame, the position coordinates of the positioning point that has not been punched in the image coordinate system are identified by an image recognition algorithm to obtain the punching coordinates.
[0150] By adopting the above technical solution, when it is detected that there is only one positioning point on both sides of the target coordinate point, the number of completed punching operations can be counted and compared with the preset number of punchings. When the number of punchings is insufficient, the printed sheet is moved in the opposite direction and re-detected using the second detection frame to accurately find the missed unpunched positioning points, and control them to re-enter the first detection frame for positioning and punching, thereby effectively avoiding processing defects caused by missing positioning points, recognition failures or omissions of previous punching.
[0151] In the following embodiment, there is a probability of printing errors during the printing process of the positioning points in the printed sheet, which makes the shape of the positioning points not a complete circle, making it difficult to obtain the coordinates of the positioning points. In order to improve this problem, the embodiment of the present application provides a method for obtaining the punching coordinates based on the positioning point image, referring to Figure 6 , the method comprising:
[0152] Step S501: Acquire the image corresponding to the positioning point to obtain the positioning point image.
[0153] The detection camera captures the area where the positioning point is located to obtain an image corresponding to the positioning point, thereby obtaining a positioning point image.
[0154] Step S502: Determine whether the positioning point image is a preset dot image.
[0155] The preset dot image is a preset circular image, wherein the positioning point is a circular image under normal printing conditions.
[0156] After acquiring the positioning point image, the positioning point image is identified through image recognition and compared with the preset origin image to determine whether it is the preset origin image, so as to determine whether there is a printing error in the positioning point.
[0157] Step S503: If not, use an identification frame to select the positioning point image.
[0158] On the other hand, if the positioning point image is a preset dot image, then refer to Figure 2 The steps in the embodiment obtain the punching coordinates corresponding to the positioning points.
[0159] If not, it means that the positioning point image is not a preset circle image, that is, the image corresponding to the positioning point is not a complete circle image. Based on this situation, the positioning point image is framed and selected through the identification frame.
[0160] For example, due to a printing error, the image corresponding to the positioning point presents two semicircular main images and a discrete image partially separated from the main image, so the image corresponding to the positioning point is completely selected through the identification frame.
[0161] Step S504: removing discrete images from the positioning point image, narrowing the range of the recognition frame, and selecting the main image in the positioning point image.
[0162] The discrete image refers to an image region in the positioning point image whose area is smaller than a first preset percentage of the area of the preset dot image. In this embodiment, the first preset percentage can be set to 10%.
[0163] The main image refers to an image region in the positioning point image whose area is larger than the area of the preset dot image by a second preset percentage. In this embodiment, the second preset percentage can be set to 30%.
[0164] Among them, through image recognition, the discrete image and the main image are marked separately, the discrete image is removed, the main image is retained, and the range of the recognition frame is narrowed so that the recognition frame only selects the area where the main image is located.
[0165] For example, refer to Figure 7 , Figure A is the image initially obtained, Figure B is the image after being framed using the recognition frame, Figure C is the image after the discrete image in the positioning point image is removed, and Figure D is the image after narrowing the range of the recognition frame and framing the main image.
[0166] Step S505: Obtain the midpoint coordinates of the line connecting the positioning points on both sides of the positioning point to obtain the midpoint reference coordinates.
[0167] In the case where the positioning point image is not a preset dot image, the punching operation for the current positioning point is temporarily skipped. The coordinates of the previous positioning point of the current positioning point have been obtained during the punching operation, that is, the coordinates of the robot when the punching operation was performed on the previous positioning point. The robot moves the printed sheet so that the next positioning point is located at the punching station and the coordinates of the robot are obtained. Therefore, the coordinates of the positioning points on both sides of the positioning point are obtained, the above two coordinates are connected, and the midpoint coordinates are selected as the midpoint reference coordinates. The coordinates of the robot can reflect the position of the positioning point in the printed sheet, that is, the coordinates in the printed sheet.
[0168] The method for obtaining the midpoint reference coordinates may also refer to step S204 .
[0169] Step S506: Determine whether the distance between the center coordinate of the identification frame and the midpoint reference coordinate is greater than a preset distance.
[0170] The center coordinates of the recognition frame are the coordinates of the intersection of the cross lines in the recognition frame in the image coordinate system.
[0171] The preset distance is a preset constant and can be adjusted according to actual needs.
[0172] By comparing the distance between the center coordinates and the midpoint coordinates of the recognition frame with the preset distance, if the distance between the center coordinates and the midpoint coordinates of the recognition frame is greater than the preset distance, step S501 is executed, otherwise step S508 is executed.
[0173] Step S507: If yes, obtain the midpoint coordinates between the center coordinates of the recognition frame and the midpoint reference coordinates to obtain the punching coordinates.
[0174] If so, it means that the distance between the center coordinates of the identification frame and the midpoint reference coordinates is greater than the preset distance. Based on this situation, the center coordinates of the identification frame and the midpoint reference coordinates are connected, and the midpoint coordinates are calculated. After obtaining the midpoint coordinates, the midpoint coordinates are used as the punching coordinates, and the positioning points can be punched according to the punching coordinates.
[0175] Step S508: If not, use the center coordinates of the identification frame as the punching coordinates.
[0176] If not, it means that the distance between the center coordinate of the identification frame and the midpoint reference coordinate is not greater than the preset distance, so the center coordinate of the identification frame is used as the punching coordinate.
[0177] By adopting the above technical solution, when the positioning point image is not the preset dot image, the discrete images in the positioning image are removed, and the main image of the positioning point image of the identification frame is used for frame selection. When the distance between the center coordinates of the identification frame and the midpoint reference coordinates is greater than the preset distance, it means that there is a large position deviation of the positioning point during the printing process. Therefore, the midpoint coordinates of the center coordinates of the identification frame and the midpoint reference coordinates are selected as the punching coordinates. Otherwise, the center coordinates of the identification frame are used as the punching coordinates. This helps to improve the accuracy of obtaining the punching coordinates when the positioning point image is not the preset dot image, so that the punching position deviation of the positioning point is smaller.
[0178] In the following embodiment, when the positioning points in the printed sheet are only partially printed during the printing process, it is impossible to identify the portion and thus impossible to obtain the corresponding punching coordinates. In order to solve this problem, the embodiment of the present application provides a method for obtaining punching coordinates, referring to Figure 8 , the method comprising:
[0179] Step S601: Identify the edge contour of the positioning point image.
[0180] After acquiring the positioning point image, the boundary lines constituting the positioning point image, namely the edge contours, are extracted through the edge detection algorithm.
[0181] Step S602: Determine whether the edge contour meets the preset arc contour.
[0182] The preset arc profile is a preset arc shape, which is related to the arc shape of the positioning point. In this embodiment, the proportion of the preset arc profile to the entire circle of the positioning point is greater than 40%.
[0183] By comparing the edge contour with the preset arc contour, if the edge contour meets the preset arc contour, step S603 is executed, otherwise step S606 is executed.
[0184] Step S603: If yes, three reference points are selected along the edge contour.
[0185] If so, it means that the edge contour conforms to the preset arc contour, so three reference points are randomly selected on the edge contour, and the center of the circle corresponding to the edge contour can be calculated through the three reference points.
[0186] Step S604: obtaining the center coordinates of the circle corresponding to the positioning point image based on the reference point.
[0187] After obtaining the three reference points, the coordinates of the center of the circle corresponding to the edge contour are calculated according to the geometric principle of determining the circle by three points, that is, the coordinates of the center of the circle corresponding to the positioning point image.
[0188] For example, let the three reference points be A(x1, y1), B(x2, y2), and C(x3, y3), calculate the perpendicular bisectors by connecting them two by two, and use the intersection of the perpendicular bisectors as the center coordinates of the circle, so as to obtain the center coordinates corresponding to the positioning point image.
[0189] Step S605: Use the circle center coordinates as punching coordinates.
[0190] Based on the fact that the edge contour conforms to the preset arc contour, after obtaining the center coordinates of the positioning point image, the center coordinates are used as the punching coordinates to perform a punching operation on the positioning point.
[0191] Step S606: If not, obtaining the punching coordinates according to a preset coordinate obtaining method.
[0192] If not, it means that the edge contour does not conform to the preset arc contour. Based on this situation, the punching coordinates are obtained according to the preset coordinate acquisition method. The specific steps for obtaining the punching coordinates according to the preset coordinate acquisition method can be referred to. Figure 9 Steps in the embodiment.
[0193] By adopting the above technical solution, by identifying the edge contour of the positioning point image and when the edge contour conforms to the preset arc contour, three reference points are selected on the edge contour and the center coordinates corresponding to the positioning point image are calculated based on the three reference points, and the center coordinates are used as the punching coordinates, so that even if the positioning point image is incomplete, the punching coordinates corresponding to the positioning point can still be obtained.
[0194] Reference Figure 9 The steps of obtaining the punching coordinates according to the preset coordinate acquisition method include:
[0195] Step S701: Make a prediction frame based on the midpoint reference coordinates.
[0196] The prediction box refers to a circular box corresponding to the size of the outer contour of the anchor point.
[0197] After obtaining the midpoint reference coordinates, a prediction box is drawn with the midpoint reference coordinates as the center of the circle. If the image corresponding to the positioning point is incomplete, the prediction box can be used to predict the position of the positioning point.
[0198] Step S702: Determine whether the positioning point image is within the prediction box.
[0199] After making the prediction frame, the positioning point image is compared with the prediction frame to detect whether the positioning point image and the prediction frame are located within the prediction frame. If the positioning point image is located within the prediction frame, step S703 is executed; otherwise, step S704 is executed.
[0200] Step S703: If yes, the center coordinates of the predicted box are used as the punching coordinates.
[0201] The center coordinates of the prediction box refer to the coordinates corresponding to the intersection of the cross lines of the prediction box in the image coordinate system.
[0202] If so, it means that the positioning point image is located within the prediction box, that is, the prediction box can represent the position of the positioning point if the image is in a complete state, and the center coordinates of the prediction box are used as the punching coordinates to perform a punching operation on the positioning point.
[0203] Step S704: If not, obtain the deviation direction of the positioning point image based on the midpoint reference coordinates.
[0204] If not, it means that the image of the positioning point is not located in the prediction box, that is, if the image corresponding to the positioning point is completed, the center position of the positioning point is different from the midpoint reference coordinate position, and the prediction box cannot be used to represent the position of the positioning point.
[0205] Before obtaining the deviation direction of the positioning point image, the coordinates corresponding to the positioning point image need to be obtained first. The steps of obtaining the coordinates of the positioning point can refer to steps S501 to S504, and the center coordinates of the identification frame are used as the coordinates corresponding to the positioning point image.
[0206] After obtaining the coordinates corresponding to the positioning point image, the coordinates corresponding to the positioning point image and the midpoint reference coordinates are connected with the midpoint reference coordinates as the origin to obtain an azimuth line. The azimuth line represents the deviation direction of the positioning point image, thereby obtaining the deviation direction of the positioning point image.
[0207] Step S705: moving the printing sheet according to the deviation direction so that the positioning point image is located within the prediction frame, and using the center coordinates of the current prediction frame as the punching coordinates.
[0208] After obtaining the deviation direction of the positioning point image, the printing sheet is moved by controlling the robot arm to move the positioning point image along the azimuth line. When the positioning point image completely enters the prediction frame and the coordinate point of the positioning point image is located at the center coordinate of the prediction frame, the outer contour of the point position can be represented by the prediction frame. Therefore, the center coordinate of the current prediction frame is used as the punching coordinate to punch the positioning point.
[0209] By adopting the above technical solution, based on the case where the edge contour does not conform to the preset arc contour, a prediction frame is made at the midpoint reference coordinates. If the positioning point image is located within the prediction frame, the prediction frame can be used to represent the outer contour of the positioning point image, and the center coordinates of the prediction frame are used as the punching coordinates. If the positioning point image is not located within the prediction frame, the printing sheet is moved so that the positioning point image is located within the prediction frame. The prediction frame can represent the outer contour of the positioning point image, and the center coordinates of the prediction frame at the current moment are used as the punching coordinates. This allows the punching coordinates corresponding to the positioning point to be obtained even if the positioning point image is incomplete.
[0210] Based on the same inventive concept, an embodiment of the present application provides a positioning and punching system for printed sheet materials for automotive lamps, comprising:
[0211] Acquisition module, used to obtain the coordinates of the positioning point;
[0212] A memory for storing a program for a method of positioning and punching holes in a printed sheet of a headlight;
[0213] The program in the processor memory can be loaded and executed by the processor to realize the positioning punching method of the printed sheet of the vehicle lamp.
[0214] Those skilled in the art will clearly understand that for the sake of convenience and brevity, the division of the above-mentioned functional modules is only used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working processes of the above-mentioned systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0215] An embodiment of the present application provides a computer-readable storage medium storing a computer program that can be loaded by a processor and executed by a method for positioning and punching a printed sheet for a vehicle lamp.
[0216] Computer storage media include, for example, various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical disks.
[0217] Based on the same inventive concept, an embodiment of the present application provides an intelligent terminal, including a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute a method for positioning and punching a printed sheet for a headlight.
[0218] Those skilled in the art will clearly understand that for the sake of convenience and brevity, the division of the above-mentioned functional modules is only used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working processes of the above-mentioned systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0219] The above are all preferred embodiments of the present application and are not intended to limit the scope of protection of this application. Unless otherwise specified, any feature disclosed in this specification (including the abstract and drawings) may be replaced by other equivalent or similar features. In other words, unless otherwise specified, each feature is merely an example of a series of equivalent or similar features.
Claims
1. A method for positioning and punching of printed sheet materials for vehicle lights, characterized in that: include: The printing sheet is moved to the preset working position by the robot; Moving the printing sheet so that the i-th positioning point among the positioning points of the printing sheet is located at the punching station, where i is a positive integer with an initial value of 1; Executing a punching coordinate acquisition step, the punching coordinate acquisition step comprising: identifying the position of the i-th positioning point, and acquiring the coordinates of the i-th positioning point to obtain the punching coordinates; Executing a punching operation step, the punching operation step comprising: performing a punching operation on the i-th positioning point according to the punching coordinates; Executing a moving step, the moving step comprising: moving the printing sheet based on the i-th positioning point so that the i+1-th positioning point is located at the punching station, and updating i to i+1; Repeating the steps of obtaining the punching coordinates, performing the punching operation, and moving the holes until the punching operation is completed for all the positioning points; The brush sheet material after the punching operation is moved to a preset storage position by the robot; In the process of identifying the position of the positioning point, determining whether the positioning point is located in the first detection frame; If the positioning point is not within the first detection frame, use a second detection frame to detect and determine whether the positioning point is within the second detection frame, wherein the detection range of the second detection frame is larger than the detection range of the first detection frame; If not, mark the position indicated by the current first detection frame to obtain the target coordinate point, and record the coordinates of the target coordinate point to obtain the target coordinates; Obtaining adjacent positioning points on both sides of the target coordinate point, and obtaining the midpoint coordinates of the adjacent positioning points; Using the midpoint coordinates to update the target coordinates, and using the target coordinates as the punching coordinates; In the process of detecting the positioning points using the second detection frame, determining whether the number of the positioning points is greater than one; If so, use a third detection frame to detect the positioning point and identify the positioning point where the punching operation has been completed, wherein the detection range of the third detection frame is larger than the detection range of the second detection frame; Mark the nearest positioning point to the positioning point where the punching operation has been completed as the positioning point to be punched; Moving the printed sheet so that the positioning point to be punched is located within the first detection frame; When there is only one adjacent positioning point on both sides of the target coordinate point, the number of positioning points that have completed the punching operation is counted to obtain the number of punchings; Determining whether the punching number is less than a preset punching number; If so, moving the printing sheet in the reverse direction according to the number of punching holes; Using the second detection frame to detect and determine whether there are any positioning points that have not been punched; If so, moving the printed sheet so that the positioning point where the punching operation is not performed is located within the first detection frame; The coordinates of the positioning points where the punching operation is not performed are acquired to obtain the punching coordinates.
2. A method for positioning and punching printed sheet materials for vehicle lights according to claim 1, characterized in that: The method further comprises: Acquire an image corresponding to the positioning point to obtain a positioning point image; Determining whether the positioning point image is a preset dot image; If not, use an identification frame to select the positioning point image; removing discrete images from the positioning point image, narrowing the range of the recognition frame, and selecting the main image in the positioning point image; Obtain the midpoint coordinates of the line connecting the positioning points on both sides of the positioning point to obtain the midpoint reference coordinates; Determining whether the distance between the center coordinates of the identification frame and the midpoint reference coordinates is greater than a preset distance; If so, obtaining the midpoint coordinates between the center coordinates of the identification frame and the midpoint reference coordinates to obtain the punching coordinates; If not, the center coordinates of the identification frame are used as the punching coordinates.
3. A method for positioning and punching printed sheet materials for vehicle lights according to claim 2, characterized in that: The method further comprises: Identifying the edge contour of the positioning point image; Determining whether the edge profile conforms to a preset arc profile; If so, three reference points are selected on the edge contour; Acquire the center coordinates of the circle corresponding to the positioning point image based on the reference point; Using the circle center coordinates as punching coordinates; If not, the punching coordinates are obtained according to a preset coordinate acquisition method.
4. A method for positioning and punching printed sheet materials for vehicle lights according to claim 3, characterized in that: The step of obtaining the punching coordinates according to a preset coordinate acquisition method includes: Making a prediction frame based on the midpoint reference coordinates; Determining whether the positioning point image is located within the prediction frame; If yes, the center coordinates of the predicted frame are used as the punching coordinates; If not, obtaining the deviation direction of the positioning point image based on the midpoint reference coordinates; The printing sheet is moved according to the deviation direction so that the positioning point image is located within the prediction frame, and the center coordinates of the current prediction frame are used as the punching coordinates.
Citation Information
Patent Citations
Silk screen printing device and image recognition contrapositioning method
CN101117043A
Silk screen detecting method, device and terminal equipment and storage medium
CN108357193A