A coaxial vision correction method, device and equipment
By performing local and global calibration in the laser coaxial vision positioning system, the positioning error caused by the wavelength difference between the laser source and the illumination source is solved, achieving high-precision conversion from pixel coordinates to galvanometer coordinates, simplifying the calibration process and reducing labor costs.
Patent Information
- Application Number
- CN202311508086.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-13
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-11-13
AI Technical Summary
In existing laser coaxial vision positioning systems, due to the color difference between the wavelength of the laser source and the wavelength of the illumination source, the use of a single calibration during multi-position deflection photography positioning results in positioning errors, leading to complex calibration, high labor costs, and large errors.
After obtaining the laser calibration file of the calibration system and verifying its accuracy, the laser galvanometer and CCD camera are controlled to perform local and global calibrations to obtain the mapping relationship between local and global calibrations. The local calibration results are then used to complete all calibrations, realizing the conversion from pixel coordinates to galvanometer coordinates.
It effectively reduces positioning errors, simplifies the calibration process, lowers labor costs, and improves positioning accuracy.
Smart Images

Figure CN117372547B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of laser marking technology, and in particular to a coaxial vision correction method, device and equipment. Background Technology
[0002] In recent years, machine vision positioning systems have been widely used in industrial fields. In laser equipment, machine vision positioning is particularly important, serving as an indispensable function in laser welding and laser cutting, greatly improving the working accuracy of the equipment and achieving precision machining. To improve the accuracy of machine vision in laser equipment, a coupling lens is used to couple the laser and vision optical paths together at the front end of the galvanometer, achieving coaxial vision positioning. Generally speaking, a coaxial vision positioning system for laser equipment consists of the following components: laser galvanometer, laser focusing field lens, coupling lens, CCD industrial camera, industrial lens, illumination source, industrial control computer, and software algorithm platform. In existing technologies, with the increase in processing efficiency or the complexity of welded product structures, positioning is often not limited to taking pictures at the center of the galvanometer, but rather involves swivel the galvanometer to locate multiple mark points in multiple areas for multiple processing steps. Due to the field curvature of the focusing field lens, the refractive index at the edge is inconsistent with the refractive index at the center. In laser control software, the influence of field curvature is reduced by calibrating the box. However, the illumination source of a CCD is also affected by field curvature, and the wavelength of the laser differs greatly from that of the CCD illumination source. Therefore, the parameters of the calibration box cannot be used for CCD calibration. To address these issues, existing technologies typically involve laser engraving nine (or more) small circles at each imaging point. The position of the circles is visually identified, and a visual calibration algorithm is used to bind the camera image coordinates to the laser galvanometer coordinates. When the imaging position of the device changes frequently and the number of images is large, this method will result in complex calibration, high labor costs, and large errors. Summary of the Invention
[0003] In view of this, the embodiments of this application provide a coaxial vision correction method, apparatus and device, which can effectively overcome the positioning error caused by the use of a single calibration when taking pictures and positioning multiple positions in existing laser coaxial vision due to the color difference between the wavelength of the laser source and the wavelength of the illumination source.
[0004] In a first aspect, embodiments of this application provide a coaxial vision correction method, which is applied to a coaxial vision positioning system of a laser device. The coaxial vision positioning system of the laser marking device includes: a laser galvanometer, a laser focusing field lens, a CCD camera, an illumination source, and an industrial control device. The method includes: Obtain the laser calibration file for image distortion from the calibration system, and verify whether the laser calibration file meets the first preset accuracy. If the first preset accuracy is met, then the laser galvanometer and the CCD camera are locally calibrated to obtain a local calibration mapping relationship, and the local calibration mapping relationship is verified to meet the second preset accuracy. If the local calibration meets the second preset accuracy, then control the global calibration of the laser galvanometer and the CCD camera to obtain a global calibration model, and verify whether the global calibration model meets the third preset accuracy.
[0005] In some embodiments, the calibration system is connected to the laser marking equipment; The laser calibration file for image distortion obtained by the calibration system includes: The calibration system sets the calibration pattern parameters, and controls the laser marking equipment to emit light and engrave a nine-point calibration pattern according to the calibration pattern parameters. Using the center point of the nine-point calibration chart as the center coordinate, measure the coordinates of the remaining points of the nine-point calibration chart, and input the coordinates of the nine points of the nine-point calibration chart into the calibration system to generate the laser calibration file.
[0006] In some embodiments, verifying whether the laser calibration file meets a first preset accuracy includes: A test shape is drawn using marking software and engraved onto calibration paper; The actual size of the test shape drawn on the calibration paper is measured and compared with the size drawn by the marking software. If the deviation of any side is greater than the first preset deviation, then the laser calibration file does not meet the first preset accuracy.
[0007] In some embodiments, the control performs local calibration of the laser galvanometer and the CCD camera to obtain a local calibration mapping relationship, including: The marking software connected to the laser marking equipment is controlled to draw a first nine-point image and record the first galvanometer coordinates of the nine points in the first nine-point image; wherein, the length and width of the first nine-point image are smaller than the length and width of the field of view of the CCD camera, and the center of the first nine-point image is the origin of the laser galvanometer coordinate system. The laser marking device is controlled to engrave the first nine-dot pattern onto the calibration paper to form the first nine-dot image; Control the CCD camera to take a picture of the first nine-point image and identify the first image coordinates of the nine points in the first nine-point image; The local calibration mapping relationship is obtained by using the coordinates of the first galvanometer and the coordinates of the first image.
[0008] In some embodiments, obtaining the local calibration mapping relationship through the first galvanometer coordinates and the first image coordinates includes: The transformed coordinates are obtained by applying a translation transformation matrix to the coordinates of the first image; The formula for the translation transformation matrix is as follows: Formula 1; The transformed coordinates are obtained by applying a scaling transformation matrix to the coordinates of the first image; The scaling transformation matrix formula is as follows: Formula 2; The transformed coordinates are obtained by applying a rotation transformation matrix to the coordinates of the first image; The formula for the rotation transformation matrix is as follows: Formula 3; The transformed coordinates are obtained by applying a shear transformation matrix to the coordinates of the first image; The formula for the shear transformation matrix is as follows: Formula 4; Based on Equations 1, 2, 3, and 4, the combined transformation matrix is obtained as follows: Formula 5; In the formula, (x, y) are the coordinates of the first image, (u, v) are the coordinates after transformation, a represents the translation length along the X-axis, b represents the translation length along the Y-axis, s1 represents the scaling ratio in the X-axis direction, s2 represents the scaling ratio in the Y-axis direction, θ represents the rotation angle, α1 represents the shear angle in the X-axis direction, and α2 represents the shear angle in the Y-axis direction. Substitute the first galvanometer coordinates and the first image coordinates into Formula 5, and use the least squares method to obtain the values of the unknowns A, B, C, D, E, and F; wherein, the first galvanometer coordinates are substituted into (u, v) in Formula 5, and the first image coordinates are substituted into (x, y) in Formula 5. The mapping relationship between the first image coordinates and the first galvanometer coordinates is obtained according to Formula 5 and the values of the unknowns A, B, C, D, E, and F. The mapping relationship is given by Formula 6: u = Ax + By + C v = Dx + Ey + F.
[0009] In some embodiments, verifying whether the local calibration mapping relationship meets the second preset accuracy includes: The marking software is used to draw a point Q within the field of view of the CCD camera and engrave it on calibration paper as the first verification point; wherein the coordinates of the point Q are (x0, y0). The image coordinates (x, y) of the first verification point are captured and identified by the CCD camera. The verification galvanometer coordinates P(xp,yp) are calculated based on the image coordinates (x,y) of the first verification point and Formula 6. The coordinates (x0, y0) of point Q are compared with the coordinates P(xp, yp) of the verification galvanometer in the X-axis and Y-axis directions respectively. If the deviation in either direction is greater than the second preset deviation, then the local calibration mapping relationship does not meet the second preset accuracy.
[0010] In some embodiments, the control performs global calibration of the laser galvanometer and the CCD camera to obtain a global calibration model, including: The marking software connected to the laser marking equipment is controlled to draw a second nine-dot pattern and engrave it on the calibration plate to form a second nine-dot image; wherein the length and width of the second nine-dot pattern are 5mm-10mm larger than the length and width of the galvanometer. The second image coordinates of the second nine-point image are identified by the galvanometer tilt. Substitute the second image coordinates into Formula 6 to obtain the coordinates of the oscillating mirror. The global coordinates of the nine-point galvanometer are calculated by summing the yaw mirror coordinates with the galvanometer coordinates B(s,t) at the imaging position. The global calibration model is obtained based on the global coordinates of the galvanometer, the second image coordinates, and Formula 5. The global calibration model is Equation 7:
[0011]
[0012] Wherein, (z, w) are (u, v) in Formula 6; and (o, p) are the global coordinates of the galvanometer.
[0013] In some embodiments, verifying whether the global calibration model meets the third preset accuracy includes: A point R is drawn within a range of 5mm-10mm larger than the galvanometer area using the marking software, and then engraved on the calibration paper as a second verification point; wherein the coordinates of the point R are (x1, y1). The image coordinates (x2, y2) of the second verification point are captured and identified by the CCD camera. The global verification coordinates T(x3,y3) are calculated based on the image coordinates (x2,y2) of the second verification point and Formula 7. The coordinates (x1, y1) of point R are compared with the global verification coordinates T(x3, y3) in the X-axis and Y-axis directions respectively. If the deviation in either direction is greater than the third preset deviation, then the global calibration model does not meet the third preset accuracy.
[0014] Secondly, embodiments of this application provide a coaxial vision correction device, which is applied to the coaxial vision positioning system of a laser device. The coaxial vision positioning system of the laser marking equipment includes: a laser galvanometer, a laser focusing field lens, a CCD camera, an illumination source, and an industrial control device. The device includes: The first calibration module is used to acquire the laser calibration file for image distortion of the calibration system and verify whether the laser calibration file meets the first preset accuracy.
[0015] The second calibration module is used to control the local calibration of the laser galvanometer and the CCD camera if the first preset accuracy is met, to obtain the local calibration mapping relationship, and to verify whether the local calibration mapping relationship meets the second preset accuracy.
[0016] The third calibration module is used to control the global calibration of the laser galvanometer and the CCD camera if the local calibration meets the second preset accuracy, to obtain a global calibration model, and to verify whether the global calibration model meets the third preset accuracy.
[0017] Thirdly, embodiments of this application provide a laser marking device, which includes a processor and a memory. The memory stores a computer program, and the processor executes the computer program to implement the coaxial vision correction method described above.
[0018] The embodiments of this application have the following beneficial effects: This application employs a method involving galvanometer scanning image distortion calibration; local calibration of the camera coordinate system and galvanometer coordinate system, using a calibrated galvanometer to establish the relationship between the two coordinate systems within a small area; and then global calibration of the camera coordinate system and galvanometer coordinate system, using the local calibration results to complete the entire calibration. This allows the pixel coordinates of the image captured within the galvanometer scanning range to be converted into galvanometer coordinates to guide the laser's working position. This method overcomes the positioning errors inherent in existing coaxial laser vision systems, where the chromatic aberration between the laser source wavelength and the illumination source wavelength leads to the use of a single calibration for positioning during multi-position deflection imaging. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A schematic flowchart of a coaxial vision correction method according to an embodiment of this application is shown; Figure 2 A schematic diagram of the input drawing parameters for a calibration software according to an embodiment of this application is shown; Figure 3 This illustration shows a schematic diagram of a nine-dot pattern drawn by a marking software according to an embodiment of this application; Figure 4 A schematic diagram of a coaxial vision correction device according to an embodiment of this application is shown. Detailed Implementation
[0021] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0022] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0023] In the following text, the terms "comprising," "having," and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more combinations thereof. Furthermore, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0024] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.
[0025] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0026] The coaxial vision correction method will be explained below with reference to some specific embodiments.
[0027] Figure 1 A schematic flowchart of a coaxial vision correction method according to an embodiment of this application is shown.
[0028] The coaxial vision correction method of this application is applied to the coaxial vision positioning system of laser equipment. The coaxial vision positioning system of the laser marking equipment includes: a laser galvanometer, a laser focusing field lens, a CCD camera, an illumination source, and an industrial control device.
[0029] Exemplary, this coaxial vision correction method includes the following steps: S10: Obtain the laser calibration file for image distortion from the calibration system, and verify whether the laser calibration file meets the first preset accuracy.
[0030] Before applying the method of this application, a coaxial vision module needs to be installed on the laser marking equipment.
[0031] In this step, the calibration system sets the calibration pattern parameters, and controls the laser marking equipment to output light to engrave a nine-point calibration pattern according to the calibration pattern parameters; wherein the calibration system is connected to the laser marking equipment; taking the center point of the nine-point calibration pattern as the center coordinate, the coordinates of the remaining points of the nine-point calibration pattern are measured, and the coordinates of the nine points of the nine-point calibration pattern are input into the calibration system to generate the laser calibration file.
[0032] like Figure 2 As shown, the calibration system in this application uses the Golden Orange CalibrationWizard software. Typically, 2DXY calibration is selected and the corresponding calibration drawing parameters are set. Calibration paper is placed at the laser focus, and the laser control software performs laser engraving. The actual nine-point spacing of the laser engraving is measured using a two-dimensional measuring instrument and then input into the software to generate a laser calibration file.
[0033] Further, verifying whether the laser calibration file meets the first preset accuracy includes: A test shape is drawn using marking software and engraved on calibration paper. To facilitate subsequent measurement and comparison, the test shape is usually rectangular or square. The marking software can be selected by the user.
[0034] The actual dimensions of the test shape drawn on the calibration paper are measured and compared with the dimensions drawn by the marking software. If the deviation of any side is greater than the first preset deviation, the laser calibration file does not meet the first preset accuracy. Specifically, a two-dimensional measuring instrument is used to measure the test shape engraved on the calibration paper. The shape of each side needs to be measured. For example, if the test shape is a rectangle, the length and width of the rectangle are measured. Then, the measured actual dimensions are compared with the dimensions drawn by the marking software. For example, if the length of the rectangle drawn is 100mm, and the actual length of the engraved rectangle is 99.95mm, the deviation is 0.05. Usually, the first preset deviation is set to 0.01. If the deviation is 0.05, the first preset accuracy is not met, and recalibration is required until the first preset deviation is met.
[0035] If the laser calibration file is verified to meet the first preset accuracy in step S10, then step S20 is executed to control the local calibration of the laser galvanometer and the CCD camera to obtain the local calibration mapping relationship, and to verify whether the local calibration mapping relationship meets the second preset accuracy.
[0036] Step S20, which involves controlling the local calibration of the laser galvanometer and the CCD camera to obtain a local calibration mapping relationship, includes: If the marking software used is EzCad3, then as follows Figure 3 As shown, the marking software connected to the laser marking equipment is controlled to draw a first nine-point image and record the coordinates of the first galvanometer of the nine points in the first nine-point image. The length and width of the first nine-point image are smaller than the field of view of the CCD camera, and the center of the first nine-point image is the origin of the laser galvanometer coordinate system.
[0037] The laser marking device is controlled to engrave the first nine-dot pattern onto the calibration paper to form the first nine-dot image. After the nine dots are engraved onto the calibration paper, the galvanometer returns to its origin.
[0038] The CCD camera is controlled to take pictures of the first nine-point image and the first image coordinates of the nine points in the first nine-point image are identified; wherein, after the camera takes pictures of the first nine-point image on the calibration paper, the first image coordinates of the nine points in the first nine-point image can be identified by the OpenCV operator HoughCircles.
[0039] The local calibration mapping relationship is obtained by using the coordinates of the first galvanometer and the coordinates of the first image.
[0040] Specifically, the first image coordinates (x, y) are transformed using a translation transformation matrix to obtain the transformed coordinates (u, v); The formula for the translation transformation matrix is as follows: Formula 1; The transformed coordinates are obtained by applying a scaling transformation matrix to the coordinates of the first image; The scaling transformation matrix formula is as follows: Formula 2; The transformed coordinates are obtained by applying a rotation transformation matrix to the coordinates of the first image; The formula for the rotation transformation matrix is as follows: Formula 3; The transformed coordinates are obtained by applying a shear transformation matrix to the coordinates of the first image; The formula for the shear transformation matrix is as follows: Formula 4; Based on Equations 1, 2, 3, and 4, the combined transformation matrix is obtained as follows: Right now Formula 5 is obtained: Formula 5; In the formula, (x, y) are the coordinates of the first image, (u, v) are the coordinates after transformation, a represents the translation length along the X-axis, b represents the translation length along the Y-axis, s1 represents the scaling ratio in the X-axis direction, s2 represents the scaling ratio in the Y-axis direction, θ represents the rotation angle, α1 represents the shear angle in the X-axis direction, and α2 represents the shear angle in the Y-axis direction.
[0041] Substitute the first galvanometer coordinates and the first image coordinates into Formula 5, and use the least squares method to obtain the values of the unknowns A, B, C, D, E, and F; wherein, the first galvanometer coordinates are substituted into (u, v) in Formula 5, and the first image coordinates are substituted into (x, y) in Formula 5. The mapping relationship between the first image coordinates and the first galvanometer coordinates is obtained according to Formula 5 and the values of the unknowns A, B, C, D, E, and F. The mapping relationship is given by Formula 6: u = Ax + By + C v = Dx + Ey + F.
[0042] Further, step S20, verifying whether the local calibration mapping relationship meets the second preset accuracy, includes: The marking software is used to draw a point Q within the field of view of the CCD camera and engrave it on calibration paper as the first verification point; wherein the coordinates of the point Q are (x0, y0).
[0043] The image coordinates (x, y) of the first verification point are captured by the CCD camera.
[0044] The coordinates of the verification galvanometer, P(xp,yp), are calculated based on the image coordinates (x, y) of the first verification point and Formula 6.
[0045] The coordinates (x0, y0) of point Q are compared with the coordinates (xp, yp) of the verification galvanometer P in the X and Y directions respectively. If the deviation in either direction is greater than the second preset deviation, the local calibration mapping relationship does not meet the second preset accuracy. That is, the sizes of points P and Q are compared (the X and Y axes of the two coordinate points are subtracted respectively). If the deviation in either the X or Y direction exceeds the second preset accuracy, then step S20 is continued, where the second preset accuracy is 0.01 mm.
[0046] If the local calibration mode described in step S20 meets the second preset accuracy, then step S30 is executed to control the global calibration of the laser galvanometer and the CCD camera to obtain a global calibration model, and to verify whether the global calibration model meets the third preset accuracy.
[0047] Specifically, step S30 involves controlling the global calibration of the laser galvanometer and the CCD camera to obtain a global calibration model, including: The marking software connected to the laser marking equipment is controlled to draw a second nine-point image file and engrave it on the calibration plate to form a second nine-point image; wherein the length and width of the second nine-point image file are 5mm-10mm larger than the length and width of the galvanometer image; the second image coordinates of the second nine-point image are identified by galvanometer tilt; the second image coordinates are substituted into Formula 6 to obtain the tilt galvanometer coordinates; the tilt galvanometer coordinates are summed with the galvanometer coordinates B(s,t) of the image capture position to calculate the global galvanometer coordinates of the nine points; a global calibration model is obtained based on the global galvanometer coordinates, the second image coordinates, and Formula 5; that is, the global galvanometer coordinates of the nine points and the image file coordinates are substituted into Formula 5 to calculate the transformation relationship between the two coordinate systems.
[0048] The global calibration model is Equation 7:
[0049]
[0050] Wherein, (z, w) are (u, v) in Formula 6; (o, p) are the global coordinates of the galvanometer; H, I, J, K, L and M are unknowns.
[0051] Furthermore, based on Formulas 6 and 7, the relationship between the image coordinate system and the global coordinate system of the galvanometer can be derived: o = H*((Ax + By + C) + s) + I*((Dx + Ey + F ) + t) + J Formula 8 P = K*((Ax + By + C) + s) + L*((Dx + Ey + F ) + t) + M Formula 9 Where S and t are the galvanometer coordinates B(s,t) at the image capture position.
[0052] Further, in step S30, verifying whether the global calibration model meets the third preset accuracy includes: drawing a point R within a range of 5mm-10mm larger than the galvanometer area using the marking software, and engraving it on calibration paper as a second verification point; wherein the coordinates of the point R are (x1, y1); taking a picture with the CCD camera and identifying the image coordinates (x2, y2) of the second verification point; calculating the verification global coordinates T(x3, y3) based on the image coordinates (x2, y2) of the second verification point and Formula 7; comparing the coordinates (x1, y1) of the point R with the verification global coordinates T(x3, y3) in the X-axis and Y-axis directions respectively, and if the deviation in either direction is greater than the third preset deviation, then the global calibration model does not meet the third preset accuracy, wherein the third preset accuracy is 0.01mm.
[0053] In existing technologies, to prevent deviations, positioning is often not done solely at the center of the galvanometer, but rather by tilting the galvanometer to multiple regions to locate multiple mark points, requiring multiple processing steps. Due to field curvature in the focusing lens of the field lens, the refractive index at the edge differs from that at the center. Laser control software uses calibration boxes to reduce the impact of field curvature. However, the CCD's illumination source is also affected by field curvature, and the laser wavelength differs significantly from the CCD's illumination source wavelength. Therefore, the parameters of the calibration box cannot be used for CCD calibration. To address these issues, existing technologies typically laser-engrave nine (or more) small circles at each imaging point, visually identifying the circle's position and using a visual calibration algorithm to bind the camera image coordinates to the laser galvanometer coordinates. However, the inventors found that this calibration method resulted in significant errors.
[0054] This application compares the calibration method of the prior art with the calibration method of the present application through the following experiment. The comparison shows that the calibration method of the present application has a relatively smaller deviation and is more accurate than the calibration method of the prior art.
[0055] Experimental apparatus parameters: galvanometer aperture 10. Field lens focal length: 160mm, field lens scanning area: 200*200, field lens working distance: 192, CCD camera resolution: 2448*2048, CCD lens focal length: 75mm. Experimental method: After calibrating the CCD using both traditional visual calibration and the method described in this application, a circle with a radius of 1mm was engraved on calibration paper. The circle was placed at different positions under the field lens (a new circle needed to be engraved at each position). The center position of the circle was identified by coaxial vision and fed back to the galvanometer. The galvanometer then engraved a circle with a radius of 2mm with the center of the circle as the center of the circle fed back by the visual feedback. The concentricity of the two circles was measured in two dimensions, and the difference between the centers of the two circles in the x and y directions was calculated. The experimental results are shown in Table 1.
[0056]
[0057] This application employs galvanometer scanning image distortion calibration. After the distortion calibration meets preset accuracy requirements, local calibration is performed using the camera coordinate system and the galvanometer coordinate system. Based on the calibrated galvanometer, the relationship between the two coordinate systems is locally calibrated. Once the local calibration result meets the preset accuracy requirements, global calibration is performed using the camera coordinate system and the galvanometer coordinate system. Using the local calibration result, all calibrations are completed, enabling the conversion of pixel coordinates of the captured image within the galvanometer scanning range into galvanometer coordinates to guide the laser's working position. This method overcomes the positioning error inherent in existing coaxial laser vision systems, where the color difference between the laser source wavelength and the illumination source wavelength leads to the use of a single calibration for positioning during multi-position deflection imaging.
[0058] Figure 4 A schematic diagram of a coaxial vision correction device according to an embodiment of this application is shown. Exemplarily, this coaxial vision correction device is applied to a coaxial vision positioning system of a laser device. The coaxial vision positioning system of the laser marking device includes: a laser galvanometer, a laser focusing field lens, a CCD camera, an illumination source, and an industrial control device. The method includes: The first calibration module 100 is used to acquire the laser calibration file of the calibration system for image distortion and verify whether the laser calibration file meets the first preset accuracy.
[0059] The second calibration module 200 is used to control the local calibration of the laser galvanometer and the CCD camera if the first preset accuracy is met, to obtain the local calibration mapping relationship, and to verify whether the local calibration mapping relationship meets the second preset accuracy.
[0060] The third calibration module 300 is used to control the laser galvanometer and the CCD camera to perform global calibration if the local calibration meets the second preset accuracy, to obtain a global calibration model, and to verify whether the global calibration model meets the third preset accuracy.
[0061] It is understood that the device in this embodiment corresponds to the coaxial vision correction method in the above embodiments, and the options in the above embodiments are also applicable to this embodiment, so they will not be described again here.
[0062] This application also provides a terminal device, exemplary of which includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to enable the terminal device to perform the functions of the various modules in the coaxial vision correction method or the coaxial vision correction device described above.
[0063] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0064] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.
[0065] This application also provides a readable storage medium for storing the computer program used in the aforementioned terminal device.
[0066] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0067] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0068] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0069] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A coaxial vision correction method, characterized by, The method is applied to the coaxial vision positioning system of a laser marking equipment, and the method includes: Obtain the laser calibration file for image distortion from the calibration system, and verify whether the laser calibration file meets the first preset accuracy. If the first preset accuracy is met, then control the local calibration of the laser galvanometer and CCD camera to obtain the local calibration mapping relationship, and verify whether the local calibration mapping relationship meets the second preset accuracy. If the local calibration meets the second preset accuracy, then control the global calibration of the laser galvanometer and the CCD camera to obtain a global calibration model, and verify whether the global calibration model meets the third preset accuracy. The control of local calibration of the laser galvanometer and CCD camera to obtain a local calibration mapping relationship includes: controlling the marking software connected to the laser marking equipment to draw a first nine-point image and recording the first galvanometer coordinates of the nine points in the first nine-point image; wherein the length and width of the first nine-point image are smaller than the length and width of the field of view of the CCD camera, and the center of the first nine-point image is the origin of the laser galvanometer coordinate system; controlling the laser marking equipment to engrave the first nine-point image on calibration paper to form a first nine-point image; controlling the CCD camera to take a picture of the first nine-point image and identify the first image coordinates of the nine points in the first nine-point image; and obtaining a local calibration mapping relationship through the first galvanometer coordinates and the first image coordinates. Wherein, the mapping relationship is Equation 6: u=Ax+By+C; v=Dx+Ey+F; where A, B, C, D, E, and F are the coefficients of the mapping relationship; (x, y) are the first image coordinates; (u, v) are the first galvanometer coordinates; The control process involves globally calibrating the laser galvanometer and the CCD camera to obtain a global calibration model, including: The marking software connected to the laser marking equipment is controlled to draw a second nine-dot pattern and engrave it on the calibration paper to form a second nine-dot image; wherein the length and width of the second nine-dot pattern are 5mm-10mm larger than the length and width of the galvanometer. The second image coordinates of the second nine-point image are identified by the galvanometer tilt. Substitute the second image coordinates into Formula 6 to obtain the coordinates (z, w) of the oscillating mirror; The global coordinates (o,p) of the nine-point galvanometer are calculated by summing the yaw mirror coordinates with the galvanometer coordinates B(s,t) of the imaging position. The coefficients H, I, J, K, L, and M of the global calibration model are obtained by fitting the global coordinates (o, p) of the galvanometer and the coordinates (z, w) of the yaw galvanometer, so as to construct the global calibration model. The global calibration model is Equation 7: ; 。 2. The coaxial vision correction method of claim 1, wherein, The calibration system is connected to the laser marking equipment; The laser calibration file for image distortion obtained by the calibration system includes: The calibration system sets the calibration pattern parameters, and controls the laser marking equipment to emit light and engrave a nine-point calibration pattern according to the calibration pattern parameters. Using the center point of the nine-point calibration chart as the center coordinate, measure the coordinates of the remaining points of the nine-point calibration chart, and input the coordinates of the nine points of the nine-point calibration chart into the calibration system to generate the laser calibration file.
3. The coaxial vision correction method of claim 1, wherein, The verification of whether the laser calibration file meets the first preset accuracy includes: A test shape is drawn using marking software and engraved onto calibration paper; The actual size of the test shape drawn on the calibration paper is measured and compared with the size drawn by the marking software. If the deviation of any side is greater than the first preset deviation, then the laser calibration file does not meet the first preset accuracy.
4. The coaxial vision correction method of claim 1, wherein, The step of obtaining the local calibration mapping relationship through the first galvanometer coordinates and the first image coordinates includes: The transformed coordinates are obtained by applying a translation transformation matrix to the coordinates of the first image; The formula for the translation transformation matrix is as follows: Formula 1 ; The transformed coordinates are obtained by applying a scaling transformation matrix to the coordinates of the first image; The scaling transformation matrix formula is as follows: Official 2; The transformed coordinates are obtained by applying a rotation transformation matrix to the coordinates of the first image; The formula for the rotation transformation matrix is as follows: Equation 3; The transformed coordinates are obtained by applying a shear transformation matrix to the coordinates of the first image; The formula for the shear transformation matrix is as follows: Formula 4; Based on Equations 1, 2, 3, and 4, the combined transformation matrix is obtained as follows: Equation 5; In the formula, (u, v) are the transformed coordinates, a represents the translation length along the X-axis, b represents the translation length along the Y-axis, s1 represents the scaling ratio in the X-axis direction, s2 represents the scaling ratio in the Y-axis direction, θ represents the rotation angle, α1 represents the shear angle in the X-axis direction, and α2 represents the shear angle in the Y-axis direction. Substitute the first galvanometer coordinates and the first image coordinates into Formula 5, and use the least squares method to obtain the values of A, B, C, D, E, and F; wherein, the first galvanometer coordinates are substituted into (u, v) in Formula 5, and the first image coordinates are substituted into (x, y) in Formula 5. The mapping relationship between the first image coordinates and the first galvanometer coordinates is obtained according to Formula 5 and the values of A, B, C, D, E, and F.
5. The coaxial vision correction method of claim 1, wherein, The step of verifying whether the local calibration mapping relationship meets the second preset accuracy includes: The marking software is used to draw a point Q within the field of view of the CCD camera and engrave it on calibration paper as the first verification point; wherein the coordinates of the point Q are (x0, y0). The image coordinates (x, y) of the first verification point are captured and identified by the CCD camera. The coordinates of the verification galvanometer, P(xp,yp), are calculated based on the image coordinates (x, y) of the first verification point and Formula 6. The coordinates (x0, y0) of point Q are compared with the coordinates P(xp, yp) of the verification galvanometer in the X-axis and Y-axis directions respectively. If the deviation in either direction is greater than the second preset deviation, then the local calibration mapping relationship does not meet the second preset accuracy.
6. The coaxial vision correction method of claim 1, wherein, The verification of whether the global calibration model meets the third preset accuracy includes: A point R is drawn within a range of 5mm-10mm larger than the galvanometer area using the marking software, and then engraved on the calibration paper as a second verification point; wherein the coordinates of the point R are (x1, y1). The image coordinates (x2, y2) of the second verification point are captured and identified by the CCD camera. The global verification coordinates T(x3,y3) are calculated based on the image coordinates (x2,y2) of the second verification point and Formula 7. The coordinates (x1, y1) of point R are compared with the global verification coordinates T(x3, y3) in the X-axis and Y-axis directions respectively. If the deviation in either direction is greater than the third preset deviation, then the global calibration model does not meet the third preset accuracy.
7. A coaxial vision correction device, characterized in that, The device is used in the coaxial vision positioning system of a laser marking equipment, and the device includes: The first calibration module is used to acquire the laser calibration file of the calibration system for image distortion, and to verify whether the laser calibration file meets the first preset accuracy. The second calibration module is used to control the local calibration of the laser galvanometer and CCD camera if the first preset accuracy is met, to obtain the local calibration mapping relationship, and to verify whether the local calibration mapping relationship meets the second preset accuracy. The third calibration module is used to control the global calibration of the laser galvanometer and the CCD camera if the local calibration meets the second preset accuracy, to obtain a global calibration model, and to verify whether the global calibration model meets the third preset accuracy. The control of local calibration of the laser galvanometer and CCD camera to obtain a local calibration mapping relationship includes: controlling the marking software connected to the laser marking equipment to draw a first nine-point image and recording the first galvanometer coordinates of the nine points in the first nine-point image; wherein the length and width of the first nine-point image are smaller than the length and width of the field of view of the CCD camera, and the center of the first nine-point image is the origin of the laser galvanometer coordinate system; controlling the laser marking equipment to engrave the first nine-point image on calibration paper to form a first nine-point image; controlling the CCD camera to take a picture of the first nine-point image and identify the first image coordinates of the nine points in the first nine-point image; and obtaining a local calibration mapping relationship through the first galvanometer coordinates and the first image coordinates. Wherein, the mapping relationship is Equation 6: u=Ax+By+C; v=Dx+Ey+F; where A, B, C, D, E, and F are the coefficients of the mapping relationship; (x, y) are the first image coordinates; (u, v) are the first galvanometer coordinates; The control process involves globally calibrating the laser galvanometer and the CCD camera to obtain a global calibration model, including: The marking software connected to the laser marking equipment is controlled to draw a second nine-dot pattern and engrave it on the calibration paper to form a second nine-dot image; wherein the length and width of the second nine-dot pattern are 5mm-10mm larger than the length and width of the galvanometer. The second image coordinates of the second nine-point image are identified by the galvanometer tilt. Substitute the second image coordinates into Formula 6 to obtain the coordinates (z, w) of the oscillating mirror; The global coordinates (o,p) of the nine-point galvanometer are calculated by summing the yaw mirror coordinates with the galvanometer coordinates B(s,t) of the imaging position. The coefficients H, I, J, K, L, and M of the global calibration model are obtained by fitting the global coordinates (o, p) of the galvanometer and the coordinates (z, w) of the yaw galvanometer, so as to construct the global calibration model. The global calibration model is Equation 7: ; 。 8. A laser marking device, characterized in that, The laser marking device includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the coaxial visual correction method according to any one of claims 1-6.
Citation Information
Patent Citations
High-precision calibration method and device for laser processing system
CN113989369A
Scan head calibration system and method
US20100292947A1
