An automatic labeling process

By using a combination of machine vision and industrial robots in the automatic labeling machine to perform camera calibration and hand-eye calibration, the automatic labeling process based on visual guidance is realized, the labeling accuracy and efficiency are improved, and the problem of low work efficiency in the existing technology is solved.

CN115520479BActive Publication Date: 2025-06-27SEVENUS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211110825.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-13
Publication Date
2025-06-27
Estimated Expiration
2042-09-13

AI Technical Summary

Technical Problem

The existing automatic labeling machines have low working efficiency, especially the double-sided automatic labeling machines based on visual systems, which consume a lot of time in the identification and positioning accuracy of workpieces.

Method used

Using machine vision as the theoretical basis, through camera calibration, hand-eye calibration and lens setting, an automatic labeling process based on vision guidance is constructed. The process includes preprocessing images, template matching positioning workpieces and labeling positions, and performing labeling operations through industrial robots.

Benefits of technology

The labeling accuracy and efficiency of the automatic labeling machine are improved, and the problems of poor labeling flexibility and low efficiency of traditional automatic labeling equipment are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115520479B_ABST
    Figure CN115520479B_ABST
Patent Text Reader

Abstract

The present invention discloses an automatic labeling process, which belongs to the technical field of packaging labeling; based on machine vision theory, it constructs a process method for automatic labeling of industrial robots based on vision guidance; it sends the pose information of the workpiece recognized by vision to the industrial robot and controls the robot to complete the labeling operation of the workpiece. Among them, in the calibration of the vision system, first analyze the camera imaging model and calibrate the internal parameters of the camera, and then correct the distorted image to improve the labeling accuracy; hand-eye calibration is a key step in the vision guidance system; through hand-eye calibration, the problems of poor labeling flexibility and low efficiency of traditional automatic labeling equipment can be further solved. An automatic labeling process of the present invention solves the technical problem of low working efficiency in the existing automatic labeling process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of packaging labeling, and particularly to an automatic labeling process. Background Art

[0002] With the development of the economy and the improvement of people's living standards, people pay more and more attention to product quality and appearance beautification. Labels are one of the best reflections of product information and appearance. There are mainly two requirements for the labels on product packaging. One is the requirement for label quality, that is, no wrinkles, no double images, no ink leakage, no warping, good adhesion, etc.; the other is the new requirement in the information age, that is, carrying more product introductions. Currently, the role of labels is gradually transitioning from product identification to the level of information carriers, and they are gradually applied to various industries, such as: food labels, postal parcel labels, electromechanical product labels, product price labels, book labels, inventory management labels, and anti-counterfeiting encryption labels, etc. Labels are diverse in types and wide in application scope, and have already become a large industry. In the future, labels will become one of the main collection carriers of big data.

[0003] An automatic labeling machine, as the name implies, is a labeling device that automatically pastes labels on objects to be labeled. Currently, according to the different types of labels, this kind of automatic labeling machine can be divided into: self-adhesive labeling machines and paste labeling machines. The former has glue on the label itself, and the self-adhesive labeling machine peels off the label and then pastes it on the object to be labeled; while the labels of the paste labeling machine do not have glue attached, and the paste labeling machine needs to apply glue to it first, and then, the labeled label is pasted on the specified object. The whole self-adhesive labeling machine is controlled by a programmable logic controller PLC and operated through a human-machine interface. However, the existing automatic labeling machines usually only adopt a single-sided pasting structure and can only paste on one surface. At the same time, its position is fixed with the position of the object to be labeled. When the position of the object to be labeled shifts due to external factors, the label will be pasted crookedly. Based on this, Chinese Patent CN112644822A discloses a double-sided automatic labeling machine based on a vision system, which includes a label printing structure and a label pasting structure. The label printing structure and the label pasting structure are placed adjacent to each other, and a vision system is also installed on this automatic labeling machine; the label printing structure is composed of a label printer and a first base, and the label printer is installed on the first base; the label pasting structure is composed of a labeling component and a second base, and an installation bracket is installed on the left side of the second base; the vision system is composed of two cameras, and the two cameras are respectively installed on the camera bracket and the camera installation slot. Through the above method, this kind of automatic labeling machine can automatically locate the real-time position of the object to make the labeling position more accurate; at the same time, it also has the function of double-sided labeling.

[0004] However, in the technical solution of a double-sided automatic labeling machine based on a vision system disclosed above, although vision has an advantage in the recognition and positioning accuracy of workpieces, affected by computer hardware and vision hardware factors, the time consumed to complete labeling using machine vision is more than that of mechanical positioning. Therefore, at present, many automatic labeling devices in the labeling industry still use the form of mechanical positioning. With the progress of technology, it can be foreseen that in the future, the workpiece recognition and positioning and the labeling operation of labeling devices will mainly be dominated by machine vision and industrial robots. At present, although industrial robots can replace humans to complete some work, they are all limited to some simple actions and cannot handle emergencies. Therefore, it is necessary to combine machine vision and industrial robots so that an industrial robot equipped with machine vision can collect images through the vision system, recognize and position the actual position of the workpiece, and adjust the control strategy of the robot in real time to realize the operation of the robot on the workpiece, thereby improving the working efficiency of the automatic labeling machine based on machine vision. Summary of the Invention

[0005] Based on this, it is necessary to provide an automatic labeling process to solve the technical problem of low working efficiency of the automatic labeling process in the prior art.

[0006] An automatic labeling process includes the following steps:

[0007] S1: Perform camera calibration, hand-eye calibration, and lens setting in advance; camera calibration refers to obtaining the internal parameters of the camera, distortion coefficients, and performing distortion correction on the image; hand-eye calibration refers to calibrating the relative position between the camera and the end effector of the industrial robot, that is, converting pixel coordinates into world coordinates; lens setting refers to manually adjusting the exposure and focal length parameters of the camera.

[0008] S2: Then, obtain the label; that is, the pre-prepared label is fixedly placed at a preset position, and the industrial robot takes the label according to the set points; when the industrial robot arrives, the solenoid valve is opened, and the pneumatic suction nozzle sucks the label; then, the process robot returns to the original position, and the flag bit in the first text document changes from 0 to 1.

[0009] S3: Next, position the workpiece; that is, first take a picture with the first camera, preprocess the obtained image, and the position of the workpiece in the pixel coordinates of the image is located as (r1, c1) by template matching; the radian arc of the labeling surface orientation is the angle between the workpiece in the template image and the workpiece in the current image; the data is recorded and saved in the second text document, and the flag bit in the third text document changes from 0 to 1.

[0010] S4: Then, the end of the industrial robot moves to the preset position point Px: The computer reads the second text document and converts the pixel coordinate data (r1, c1) in the second text document into world coordinate data (xl, Yl); sets the z-axis value to a fixed value; calculates the attitude R of the label to be pasted based on the arc data. X , R y , R Z ; Then, based on the workpiece position and the label-pasting orientation attitude data, it is determined that after the end effector of the industrial robot reaches the specified position, the flag bit in the fourth text document changes from 0 to 1.

[0011] S5: Next, position the label-pasting position; that is, first use the second camera to take a picture, preprocess the obtained image and perform template matching; the pixel coordinates of the position where the label is to be pasted are (r2, c2), and the data is recorded and saved in the fifth text document; the flag bit in the fifth text document changes from 0 to 1.

[0012] S6: Finally, perform reset after label pasting; that is, the computer reads the data recorded in the fifth text document, and then converts the pixel coordinate data (r2, c2) in the fifth text document into world coordinate data (x2, Y2) to obtain the accurate label-pasting position data as (x2, Y2, Z, R X , R Y , R Z ); The robot moves orderly according to the set point positions. When the pneumatic suction nozzle installed at the end of the industrial robot touches the label-pasting center position, the solenoid valve is closed and the label pasting is completed; after completion, the end of the industrial robot returns to the initial point position, and at the same time, all the flag bits of the text documents are reset to 0.

[0013] Specifically, before each step, the program needs to judge whether the flag bit of the previous step is 1; if it is 1, then execute this step; if it is 0, then wait.

[0014] Specifically, in step S4, the position of the preset position point P X is: a point centered at (x1, Y,1), with an azimuth of arc radians and a distance of 620.0 mm from the center point.

[0015] Specifically, in step S6, the workpiece positioning is based on the coordinate system with the x-axis and Y-axis of the industrial robot as the plane.

[0016] Specifically, in step S6, the label-pasting position positioning is based on the coordinate system with the combination of the xy-axis and the z-axis of the industrial robot as the plane.

[0017] Specifically, the quadrant judgment basis for the movement point positions of the industrial robot and the orientation of the workpiece label-pasting surface comes from (x2, Y2).

[0018] In summary, an automatic labeling process of the present invention is based on machine vision and constructs a process method for automatic labeling of industrial robots based on vision guidance. It sends the pose information of the workpiece recognized by vision to the industrial robot and controls the robot to complete the labeling operation of the workpiece. Among them, in the calibration of the vision system, the internal parameters of the camera are first analyzed according to the camera imaging model, and then the image is corrected for distortion to improve the labeling accuracy. Hand-eye calibration is a key step in the vision guidance system. Through hand-eye calibration, the problems of poor labeling flexibility and low efficiency of traditional automatic labeling equipment can be further solved. Therefore, an automatic labeling process of the present invention solves the technical problem of low working efficiency in the existing automatic labeling process. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flowchart of an automatic labeling process of the present invention;

[0020] Figure 2 It is a structural diagram of the labeling system adopted by an automatic labeling process of the present invention;

[0021] Figure 3 It is a schematic diagram of the geometric relationship for lens selection reference of an automatic labeling process of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0022] In order to make the above objects, features, and advantages of the present invention more obvious and understandable, the following detailed description of the specific embodiments of the present invention will be made in conjunction with the accompanying drawings. Many specific details are set forth in the following description in order to fully understand the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.

[0023] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as limiting the present invention.

[0024] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0025] In the present invention, unless otherwise clearly specified and defined, terms such as "mounted", "connected", "coupled", "fixed", etc. should be construed broadly. For example, it may be a fixed connection, a detachable connection, or integrated; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal communication of two components or the interaction relationship between two components, unless otherwise clearly defined. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0026] In the present invention, unless otherwise clearly specified and defined, the first feature being "on" or "under" the second feature may be that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, the first feature being "above", "over" and "on top of" the second feature may be that the first feature is directly above or obliquely above the second feature, or merely indicates that the first feature has a higher horizontal height than the second feature. The first feature being "under", "below" and "beneath" the second feature may be that the first feature is directly below or obliquely below the second feature, or merely indicates that the first feature has a lower horizontal height than the second feature.

[0027] It should be noted that when an element is referred to as "fixed to" or "disposed on" another element, it may be directly on the other element or there may also be an intermediate element. When an element is considered to be "connected" to another element, it may be directly connected to the other element or there may be an intermediate element at the same time. The terms "vertical", "horizontal", "up", "down", "left", "right" and similar expressions used herein are for illustrative purposes only and do not represent the only embodiments.

[0028] Please refer to Figure 1 , Figure 1 which is a flowchart of an automatic labeling process of the present invention. As Figure 1 shown, an automatic labeling process of the present invention includes the following steps:

[0029] S1: Perform camera calibration, hand-eye calibration, and lens settings separately in advance. Camera calibration refers to obtaining the internal parameters of the camera, distortion coefficients, and performing distortion correction on the images. Hand-eye calibration refers to calibrating the relative position between the camera and the industrial robot actuator, that is, converting pixel coordinates into world coordinates. Lens setting refers to manually adjusting the exposure and focal length parameters of the camera.

[0030] S2: Then, obtain the label. That is, the pre-prepared label is fixedly placed at a preset position, and the industrial robot picks up the label according to the set points. When the industrial robot arrives, the solenoid valve is opened, and the pneumatic suction nozzle sucks the label. Then, the process robot returns to the original position, and the flag bit in the first text document changes from 0 to 1. The flag bit recorded as 0 indicates that this step has not been performed or is in progress; while the flag bit recorded as 1 indicates that this step has been completed. Before each step starts, the program needs to judge whether the flag bit of the previous step is 1. If it is 1, then execute this step; if it is 0, then wait, and the same applies hereinafter.

[0031] S3: Next, position the workpiece. That is, first use the first camera to take a picture, preprocess the obtained image, and perform template matching to locate the position of the workpiece in the image pixel coordinates as (r1, c1). The radian arc of the labeling surface orientation is the angle between the workpiece in the template image and the workpiece in the current image. The data is recorded and saved in the second text document, and the flag bit in the third text document changes from 0 to 1.

[0032] S4: Then, the end of the industrial robot moves to the specified position point Px. The computer reads the second text document and converts the pixel coordinate data (r1, c1) in the second text document into world coordinate data (x1, y1). Since the placement height of the workpiece is relatively fixed, the z-axis value can be set to a fixed value. From the radian arc data, calculate the attitude R of the label to be pasted. X ,R y ,R Z 。 Then, according to the workpiece position and the label-to-be-pasted orientation attitude data, after the end effector of the industrial robot reaches the specified position, the flag bit in the fourth text document changes from 0 to 1. It should be noted that the position of the specified position point P X is: a point with (x1, y1) as the center, an azimuth of radian arc, and an Euclidean distance of 620.0 mm from the center point. The set distance value is related to the field of view of the second camera and the arm length of the industrial robot. That is, it is necessary to ensure that the industrial robot can touch the workpiece and that the second camera can completely capture the side image of the workpiece.

[0033] S5: Next, locate the labeling position. That is, first use the second camera to take a picture, preprocess the obtained image and perform template matching. Locate the pixel coordinates of the label-to-be-pasted position as (r2, c2), and the data is recorded and saved in the fifth text document. The flag bit in the fifth text document changes from 0 to 1.

[0034] S6: Finally, perform reset after labeling; that is, the computer reads the data recorded in the fifth text document, and then converts the pixel coordinate data (r2, c2) in the fifth text document into world coordinate data (x2, Y2) to obtain the accurate labeling position data as (x2, Y2, Z, R X , R Y , R Z ). The robot moves orderly according to the set points. When the pneumatic suction nozzle installed at the end of the industrial robot touches the labeling center position, the solenoid valve is closed and the labeling is completed. After completion, the end of the industrial robot returns to the initial point position, and at the same time, the flag bits of all text documents are reset to 0. It should be noted that in this step, the workpiece positioning is based on the coordinate system with the x-axis and Y-axis of the industrial robot as the plane; while the labeling position positioning is based on the coordinate system with the combined xy-axis and z-axis of the industrial robot as the plane, and the orientation radian arc of the combined xy-axis and the workpiece labeling surface is relevant. The movement points of the industrial robot and the orientation of the workpiece labeling surface are related to which quadrant they fall into, and the quadrant judgment basis comes from (x2, Y2).

[0035] Specifically, in an automatic labeling process of the present invention, visual guidance is mainly used to guide the industrial robot; by taking pictures with a camera to obtain the position and posture of the workpiece in the world coordinate system; and then through image processing technology, the positioning of the workpiece in the world coordinate system is realized, and further the industrial robot is guided to perform operations such as grasping or placing the workpiece, so that the industrial robot has certain intelligent operation capabilities. More specifically, please continue to refer to Figure 2 , Figure 2 which is the structure diagram of the labeling system adopted in an automatic labeling process of the present invention. As can be seen from Figure 2 , the industrial robot labeling system based on visual guidance consists of a hardware system and a software system. The hardware system includes: machine vision and motion control; the programs of the software system include: image processing algorithms, motion control programs, graphical user interfaces, etc.

[0036] Specifically, in the aforementioned industrial robot labeling system based on visual guidance, its hardware part includes: a six-degree-of-freedom industrial robot, a computer, a monocular vision multi-camera system, and other hardware. The monocular vision multi-camera system includes: an industrial camera, a camera lens, and vision software.

[0037] Further, according to the existing camera classification and combined with the requirements in the actual process; since the object to be photographed is static during the labeling process; therefore, in the present invention, static cameras are considered first. A CMOS photosensitive chip with rolling exposure can be selected; then, the camera resolution can be initially selected according to the size and accuracy of the photographed object. In the actual process, the accuracy needs to be judged by the camera field of view, but during the camera selection process, the camera field of view is an unknown quantity; therefore, the size of the photographed object can be used as a substitute. For example, when the labeling surface is 215mm * 70mm and the accuracy requirement for each pixel is about 0.1mm, the minimum resolution of the industrial camera is: H = (215 * 70) / (0.1 * 0.1) = 1505000. When selecting an industrial camera, in order to improve the accuracy, the defect area is controlled to be more than 3 to 5 pixels; therefore, the minimum resolution of the industrial camera should be greater than 3 * H = 4515000; that is, the resolution of the industrial camera can be selected as 5 million pixels. The key parameters of an embodiment of an industrial camera are shown in Table 1 below.

[0038] Table 1: Key Parameters of Industrial Camera

[0039]

[0040] Further, the lens is an important component in the vision system, and its function is to gather more light onto the camera sensor. Whether the selected lens is appropriate will directly affect the quality of the images captured by the camera and will also affect the subsequent labeling accuracy. The parameters to be considered for lens selection include: regional field of view size, object distance, focal length, etc. Please continue to refer to Figure 3 , Figure 3 which is a schematic diagram of the geometric relationship for lens selection in an automatic labeling process of the present invention. Among them, the camera field of view FOV, that is, Field of View; the object in the FOV passes through the lens and is mapped onto the camera sensor chip. f is the focal length of the camera, and WD1, that is, Work Distance, is the object distance; the sensor size, that is, SensorSize, is the target surface size of the camera; for example, for a 1 / 2.5-inch specification, the width and height of the target surface are 5.76mm * 4.29 mm. The camera field of view is the size of the camera imaging range and should be larger than the size of the workpiece to be photographed. According to the principle of similar triangles, the lens selection standard should satisfy the following formula 1:

[0041] Formula 1: f / WD = SensorSize / FOV

[0042] In the formula, f is the focal length of the camera; WD, that is, Work Distance, is the object distance; SensorSize is the target surface size of the camera; FOV, that is, Field of View, is the camera field of view, that is, the size of the camera imaging range.

[0043] Furthermore, according to the actual installation requirements, the selection parameters of the first camera are based on: taking pictures from top to bottom to locate the position of the workpiece and the orientation of the labeling surface, requiring the field of view to be as large as possible to be able to capture the workpiece. The object distance WD1 between the first camera and the workpiece is 390.0 mm. The length and width of the workpiece from a top-down view are 215 mm * 115 mm. The FOV should be at least 1 to 2 times larger than the length and width. That is, a lens with a focal length of 4 mm is selected, and the lens model is: OPT-C0420-SM. The horizontal distance WD2 between the center of the robot flange and the labeling position point is 620.0 mm. The length and width of the side of the workpiece are 215 mm * 70 mm. A lens with a focal length of 8 mm is selected, and the lens model is: OPT-C0825-SM. The following Table 2 gives the key parameters of the two lenses.

[0044] Table 2: Key Parameters of the First Camera Lens and the Second Camera Lens

[0045]

[0046] Furthermore, the computer has two functions: on the one hand, it receives the images collected by the industrial camera and makes analysis and judgment on the images, and on the other hand, it sends the workpiece positioning data to the industrial robot to guide the industrial robot to perform labeling. The speed and stability of the labeling system are affected by the performance of the computer. The system selects the computer mainly based on stability. Among them, the key parameters of the computer include: the CPU main frequency is greater than or equal to 3.40 GHz; the memory capacity is greater than or equal to 4.00 GB; the operating system is preferably Windows 7 64-bit. In addition, the computer is also installed with the python-2.7.16 scripting language, HALCON-12.0 vision software, and MATLAB2012a mathematical software, etc.

[0047] Furthermore, other hardware components include: pneumatic suction nozzles, solenoid valves, and polarizing lenses. Among them, regarding the pneumatic suction nozzle; generally, devices such as mechanical grippers and pneumatic suction nozzles are installed at the end of industrial robots. The mechanical gripper is usually driven by a motor to achieve the grasping action of the robot, and the clamping force is set based on the nature of the grasping object. It is suitable for workpieces with fixed dimensions, high hardness, and not easily damaged. The pneumatic suction nozzle achieves the target suction by the force formed by the vacuum system and the atmospheric pressure difference. It has advantages such as low cost, convenient use, and long service life. When sucking, it has lower requirements for the geometric dimensions and shapes of the target and causes less damage to the target, but it is not suitable for concave-convex surfaces or heavy objects. There is a certain threshold for suction. The suction object of an automatic labeling process in the present invention is a label, which meets the requirements of the pneumatic suction nozzle. Therefore, the present invention can adopt a pneumatic suction nozzle. In addition, regarding the solenoid valve; the function of the solenoid valve is to control the on-off of the air flow channel or change the flow direction of the compressed air, so as to achieve the purpose of controlling various actuators. The present invention uses a manual solenoid valve to control the suction of the label by the pneumatic suction nozzle. The model of the solenoid valve is: AirTAC-4L210-08. In actual applications, its intake pipe is connected to port A, and one end of the outlet pipe is connected to port R, and the other end is connected to the pneumatic suction nozzle. Thus, when the manual valve is pressed, the pneumatic suction nozzle can be controlled. In addition, regarding the polarizing lens; the polarizing lens can effectively filter out the scattered light in the light, making the images captured by the industrial camera clearer. The polarizing lens is installed in front of the lens. In the present invention, a polarizing lens can be installed for a camera lens with a focal length of 8 mm.

[0048] Further, in an automatic labeling process of the present invention, considering the robot arm length and repeatability accuracy comprehensively, the camera mounting mode for positioning the workpiece pose is determined as the eye-to-hand-external structure; then, for positioning the center position of the label, since the orientation of the labeling surface is not fixed, the camera mounting mode for positioning the center position of the label is the eye-to-hand-internal structure. Specifically, the industrial camera with the eye-to-hand-external structure is called the first camera; while the industrial camera with the eye-to-hand-internal structure is called the second camera. The label is placed at a fixed position of the automatic labeling machine. Considering cost and layout issues, the light source can be selected as two strip light sources. The first light source and the second light source are respectively fixed on the bracket and the operating table to provide brightness for the first camera and the second camera respectively, thereby improving the accuracy of image processing. The workpiece is relatively small compared to the robot. To prevent the robot from colliding with the operating table during the labeling process, a bracket is required to support the overall height of the workpiece. The communication form between the above-mentioned various hardware is as follows: The industrial camera communicates with the computer through USB; the industrial robot controller communicates with the computer through the TCP / IP communication method; the IP address of the industrial robot is: 192.168.0.xxx, where xxx can be between 000 and 199, and its port number is 8899; while the computer IP address is 192.168.0.yyy, where it can be between 000 and 199, but different from xxx, and its port number is 1000.

[0049] Further, please continue to refer to Figure 3 , Figure 3 which is the software control flow chart applied to an automatic labeling process of the present invention. Among them, the system software design consists of an image processing algorithm, a motion control program, and a graphical user interface. The computer can be the Windows7 operating system, and the main software applications include: HALCON-12.0 vision software, python-2.7.16 integrated development environment, IDE, Integrated Development Environment. Specifically, the HALCON-12.0 vision software is used for writing the image processing algorithm to complete camera internal parameter calibration, image acquisition, image data acquisition, calibration plate production, and template matching, etc.; the motion control completes the writing of the industrial robot kinematics program, the point-to-point control system, and hand-eye calibration. The writing and running of the program are carried out in the IDE. The IDE has advantages such as fast startup speed and low memory occupancy. Among them, the software system is dominated by the graphical user interface designed by the IDE. The graphical user interface can call and run the image processing file and read the data output in the form of a text document by the HALCON vision software, and coordinate the sequential running order of the image processing algorithm and the motion control program through the data in the text document, so as to ensure the orderly progress of each step of the labeling system.

[0050] Further, to verify the labeling accuracy and efficiency of an automatic labeling process of the present invention, a comparative experiment was conducted with the automatic labeling equipment of the prior art and the experimental platform built according to the automatic labeling process of the present invention under the same controlled variables. The automatic labeling equipment of the prior art was used as the control group, and the present invention was used as the experimental group. The comparative experiment was conducted 20 times in total, and the average values were compared as shown in Table 3 below. It can be seen from the experimental results that the automatic labeling process of the present invention has significantly improved the system tolerance, labeling accuracy, and labeling efficiency compared with the prior art.

[0051] Table 3: Comparison of Labeling Errors

[0052]

[0053] In summary, an automatic labeling process of the present invention is based on machine vision theory and constructs a process method for automatic labeling of industrial robots based on visual guidance. It sends the pose information of the workpiece recognized by vision to the industrial robot and controls the robot to complete the labeling operation of the workpiece. Among them, in the calibration of the vision system, the camera imaging model is first analyzed to calibrate the internal parameters of the camera, and then the image is corrected for distortion to improve the labeling accuracy. Hand-eye calibration is a key step in the visual guidance system. Through hand-eye calibration, the problems of poor labeling flexibility and low efficiency of traditional automatic labeling equipment can be further solved. Therefore, an automatic labeling process of the present invention solves the technical problem of low working efficiency in the automatic labeling process of the prior art.

[0054] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0055] The above embodiments only represent several implementation manners of the present invention. The description is relatively specific and detailed, but it should not be construed as a limitation on the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention patent shall be subject to the appended claims.

Claims

1. An automatic labeling process, characterized in that, It includes the following steps: S1: Perform camera calibration, hand-eye calibration, and lens setting in advance; Camera calibration means obtaining the internal parameters of the camera, distortion coefficients, and performing distortion correction on the image; Hand-eye calibration means calibrating the relative position between the camera and the industrial robot actuator, that is, converting pixel coordinates into world coordinates; Lens setting means manually adjusting the exposure and focal length parameters of the camera; S2: Then, obtain the label; that is, the pre-prepared label is fixedly placed at a preset position, and the industrial robot picks up the label according to the set points; when the industrial robot arrives, open the solenoid valve, and the pneumatic suction nozzle sucks the label; then; the process robot returns to the original position, and the flag bit in the first text document changes from 0 to 1; S3: Next, position the workpiece; that is, first take a picture with the first camera, preprocess the obtained image, and perform template matching to locate the position of the workpiece in the image pixel coordinates as (r1, c1); the radian arc of the labeling surface orientation is the angle between the workpiece in the template image and the workpiece in the current image; the data is recorded and saved in the second text document, and the flag bit in the third text document changes from 0 to 1; S4: Then, the end of the industrial robot moves to the preset position point Px: The computer reads the second text document and converts the pixel coordinate data (r1, c1) in the second text document into world coordinate data (x1, Y1); sets the z-axis value to a fixed value; calculates the attitude R of the label to be pasted according to the arc data X , R y , R Z ; Then, according to the workpiece position and the attitude data of the label to be pasted, it is determined that after the end effector of the industrial robot reaches the specified position, the flag bit in the fourth text document changes from 0 to 1; S5: Next, locate the labeling position; that is, first take a picture with the second camera, preprocess the obtained image and perform template matching; the pixel coordinates of the position where the label to be pasted is located are (r2, c2), and the data is recorded and saved in the fifth text document; The flag bit in the fifth text document changes from 0 to 1; S6: Finally, perform reset after labeling; that is, the computer reads the data recorded in the fifth text document, and then converts the pixel coordinate data (r2, c2) in the fifth text document into world coordinate data (x2, Y2) to obtain the accurate labeling position data as (x2, Y2, Z, R X , R Y , R Z ); The robot moves orderly according to the set points. When the pneumatic suction nozzle installed at the end of the industrial robot touches the labeling center position, the solenoid valve is closed and the labeling is completed; After completion, the end of the industrial robot returns to the initial point position, and at the same time, the flag bits of all text documents are reset to 0; In the above steps, the flag bit recorded as 0 indicates that the step has not been performed or is in progress, and the flag bit recorded as 1 indicates that the step has been completed; before each step starts, the program needs to judge whether the flag bit of the previous step is 1; if it is 1, then execute this step; if it is 0, then wait.

2. The automatic labeling process according to claim 1, wherein: In step S4, the preset position point P X is located at a point centered at (x1, Y1), with an azimuth of arc radians and a distance of 620.0 mm from the center point.

3. An automatic labeling process according to claim 1, characterized in that: In step S6, the workpiece positioning is based on the coordinate system with the x-axis and Y-axis of the industrial robot as the plane.

4. An automatic labeling process according to claim 3, characterized in that: In step S6, the labeling position positioning is based on the coordinate system with the combination of the xy-axis and the z-axis of the industrial robot as the plane.

5. An automatic labeling process according to claim 4, characterized in that: The quadrant judgment basis for the movement points of the industrial robot and the orientation of the workpiece labeling surface comes from (x2, Y2).

Citation Information

Patent Citations

  • Double-sided automatic labeling machine based on visual system

    CN112644822A

  • Device and method for intelligently labeling unstructured objects on assembly line

    CN113479442A