Line scanning system fast calibration device and calibration method thereof

By integrating the coded optical wedge and the composite target, rapid focusing and precise attitude calibration of the line scanning system are achieved, solving the problems of low efficiency and insufficient automation in the existing technology, and improving calibration accuracy and flexibility.

CN121384963BActive Publication Date: 2026-03-24JIHUA LAB
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing line scanning system calibration methods rely on high-precision motion platforms, which are inefficient, prone to wear, lack real-time feedback, have low automation, insufficient flexibility, and are difficult to deploy quickly and calibrate online.

Method used

By integrating the coded optical wedge and the composite target, the camera achieves rapid focusing and precise attitude calibration through static observation. It utilizes the binary coding pattern of the coded optical wedge and the angle calibration line group of the composite target, combined with the lifting and adjustment mechanisms, to automatically adjust the spatial attitude of the camera.

Benefits of technology

It achieves efficient and rapid multi-parameter calibration, reduces mechanical wear, improves automation, shortens calibration time, and enhances usage flexibility and calibration accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121384963B_ABST
    Figure CN121384963B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of industrial vision detection, and particularly relates to a line scanning system rapid calibration device and a calibration method thereof, which comprises a camera and an adjusting mechanism, and further comprises a mounting seat, a line laser emitter, a laser receiving sensor, a coded optical wedge, a composite target and a lifting mechanism for driving the composite target to lift, the lifting mechanism and the coded optical wedge are both fixed on the mounting seat, the camera is arranged above the coded optical wedge, rapid focusing and precise attitude calibration are respectively realized by respectively observing the coded optical wedge and the composite target statically, the calibration process is efficient and fast, mechanical wear and maintenance cost are reduced, and calibration time is significantly shortened, the coded optical wedge and the composite target are integrated, use flexibility is improved, the adjusting mechanism adjusts the spatial attitude of the camera based on deviation data calculated by static observation, and the degree of automation and calibration precision are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial vision inspection technology, and in particular to a rapid calibration device and calibration method for a line scanning system. Background Technology

[0002] In current industrial production lines, line scan cameras are widely used for product surface defect detection, dimensional measurement, and other applications. To ensure measurement accuracy, the camera needs to be precisely calibrated before use or periodically, including focusing and calibration of its parallelism and perpendicularity (i.e., spatial orientation) with the conveyor belt direction.

[0003] Currently, common line scanning system calibration methods generally rely on high-precision motion platforms. During calibration, the platform needs to be controlled to dynamically scan a specific target (such as a grid plate) within the camera's field of view. The camera's focal length, optical axis, and the parallelism and perpendicularity to the direction of motion are indirectly deduced through post-processing analysis of the stitched image. This method has significant drawbacks: First, the entire calibration process is highly dependent on the platform's precise movements, which is not only inefficient but also prone to equipment wear due to frequent mechanical movements. Second, this method is essentially a "trial and error" model, lacking real-time feedback; the accuracy of the calibration results largely depends on the operator's experience, reducing automation. Finally, different calibration functions (such as focusing and angle calibration) are often performed on different targets and workstations, making target switching and re-clamping time-consuming and inflexible. These problems severely restrict the rapid deployment of production lines and the realization of online calibration.

[0004] Therefore, there is an urgent need for a line scanning system calibration solution that can eliminate dependence on motion platforms, is easy to operate, fast and intuitive, and can complete multi-parameter calibration in one integrated manner. Summary of the Invention

[0005] In order to overcome the shortcomings of the prior art, the purpose of this invention is to provide a rapid calibration device and calibration method for a line scan system that is integrated, improves flexibility, extends equipment life, has a high efficiency and speed in the calibration process, improves automation and calibration accuracy.

[0006] The technical solution adopted in this invention is as follows:

[0007] A rapid calibration device for a line scanning system includes a camera and an adjustment mechanism for adjusting the camera's spatial attitude. It also includes a mounting base, a line laser emitter, a laser receiving sensor, an coded optical wedge, a composite target, and a lifting mechanism for driving the composite target to move up and down. The lifting mechanism and the coded optical wedge are both fixed to the mounting base. The camera is positioned above the coded optical wedge. The line laser emitter is symmetrically positioned on both sides of the coded optical wedge, and the laser receiving sensor is symmetrically positioned on both sides of the camera. The top surface of the coded optical wedge is inclined, and its top surface has coded strips. Several coded strips are evenly arranged along the inclined direction. Each coding strip is located at a different height and has a unique binary coding pattern. The composite target includes a substrate, an angle calibration line group, a central reference line, a first protrusion, and a second protrusion. The angle calibration line group, the central reference line, the first protrusion, and the second protrusion are all disposed on the upper side of the substrate. The first protrusion and the second protrusion are symmetrically disposed on both sides of the central reference line. The height of the first protrusion is higher than that of the second protrusion. The top surface of the first protrusion is provided with a first inclined surface, and the top surface of the second protrusion is provided with a second inclined surface. The inclination angles of the first inclined surface and the second inclined surface are the same. Inclined lines are provided on both the first inclined surface and the second inclined surface.

[0008] Preferably, the lifting mechanism includes a ball screw and a servo motor. The output end of the servo motor is connected to the upper end of the ball screw, and the lower end of the ball screw is rotatably connected to the mounting base. The base plate is fixedly connected to the nut of the ball screw, and guide rods are provided on both sides of the ball screw. The base plate is slidably connected to the guide rods.

[0009] Preferably, the angle calibration line group includes 87° line, 89° line, 90° line, 91° line and 93° line. The 90° line is set parallel to the central reference line. The 87° line, 89° line, 90° line, 91° line and 93° line are all fan-shaped with the same endpoint as the origin.

[0010] Preferably, the coded optical wedge is made of transparent glass.

[0011] Preferably, the angle between the first inclined plane and the horizontal plane and the angle between the second inclined plane and the horizontal plane are both 30°, and the height difference between the first inclined plane and the second inclined plane is 0.3mm.

[0012] Preferably, one side edge of the coded optical wedge is etched with height reference scales that correspond one-to-one with each coded band.

[0013] As a preferred option, the angle calibration line group is arranged symmetrically in two groups with the central reference line as the center line.

[0014] This invention also provides a calibration method for a rapid calibration device for a line scanning system, comprising the following steps:

[0015] S1 spatial coarse positioning includes:

[0016] S11. Place the rapid calibration device of the line scanning system in the center of the conveyor belt;

[0017] S12. Activate the two line laser emitters to emit lasers to the two laser receiving sensors respectively, and read the distance values ​​of the two laser receiving sensors based on the distance from the laser emission to the reception.

[0018] S13. Adjust the camera's roll angle using the adjustment mechanism until the two distance values ​​are consistent, so that the camera is initially aligned.

[0019] S2 fast focus includes:

[0020] S21. The camera takes an image of the inclined surface of the coding wedge to obtain the binary coding pattern of each coding band.

[0021] S22. Calculate the binary ordinal number of the binary coded pattern corresponding to each coded band, analyze the clarity of the binary coded pattern corresponding to each coded band, and determine the target ordinal number corresponding to the coded band with the highest clarity of the binary coded pattern.

[0022] S23. Determine the target height position of the corresponding coding band based on the target ordinal number, and use the target height position as the optimal focal plane of the camera;

[0023] S24. The lifting mechanism drives the composite target to rise or fall so that the upper surface of the substrate moves to the height of the optimal focal plane.

[0024] S3 Precision Attitude Calibration includes:

[0025] S31. Use a camera to acquire a single-frame image of the composite target to obtain the target image;

[0026] S32. Use Hough transform to detect the actual imaging angle of the angle calibration line group in the target image, compare the actual imaging angle with the standard angle to obtain the comparison result, and determine the yaw angle deviation based on the comparison result.

[0027] S33. The first pixel offset of the inclined surface line on the first inclined surface relative to the central reference line and the second pixel offset of the inclined surface line on the second inclined surface relative to the central reference line are measured with sub-pixel precision.

[0028] S34. Identify the vertical distance from the current camera's imaging surface to the upper surface of the substrate as the calibration working distance;

[0029] S35. Based on the calibration working distance, the first pixel offset, the second pixel offset, and the height difference between the first and second inclined planes, the camera's pitch angle deviation and roll angle deviation are calculated synchronously through geometric projection relationships.

[0030] S36. The adjustment mechanism automatically adjusts the spatial attitude of the camera based on the yaw angle deviation, pitch angle deviation, and roll angle deviation.

[0031] Preferably, step S32 specifically includes the following steps:

[0032] S321. Use Hough transform to detect the actual imaging angle of each line in the angle calibration line group in the target image, compare the actual imaging angle of each line with the standard angle of the corresponding line, and obtain the comparison result of a line.

[0033] S322. Calculate the yaw angle deviation by fitting the comparison results of multiple scribe lines.

[0034] Preferably, the following steps are included after step S36:

[0035] S37. Repeat steps S31 to S36 until the yaw angle deviation, pitch angle deviation and roll angle deviation are all less than the preset deviation threshold.

[0036] The beneficial effects of this invention are as follows:

[0037] This line scan system's rapid calibration device achieves rapid focusing and precise attitude calibration by performing static observations on the coded optical wedge and the composite target, respectively. The calibration process is efficient and fast, reducing mechanical wear and maintenance costs and significantly shortening calibration time. The integrated design of the coded optical wedge and composite target enhances usability. The adjustment mechanism adjusts the camera's spatial attitude based on deviation data calculated from static observations, improving automation and calibration accuracy. Attached Figure Description

[0038] Figure 1 A three-dimensional schematic diagram of a rapid calibration device for a line scanning system.

[0039] Figure 2 A front view of the rapid calibration device for the line scanning system.

[0040] Figure 3 Left view of the rapid calibration device for the line scanning system.

[0041] Figure 4 A top view of the rapid calibration device for the line scanning system.

[0042] Figure 5 This is a top view of the composite target.

[0043] Figure 6 This is a schematic diagram of the binary encoding pattern of the encoding band.

[0044] Figure 7 This is a flowchart of the calibration method for a rapid calibration device for a line scanning system.

[0045] In the figure: 1. Line laser emitter; 2. Camera; 3. Laser receiving sensor; 4. Encoded optical wedge; 5. Encoded strip; 6. Height reference scale; 7. Lifting mechanism; 8. Composite target; 9. Angle calibration line group; 10. First protrusion; 11. Center reference line; 12. Adjustment mechanism; 13. Mounting base; 14. Substrate; 15. Second protrusion; 16. First inclined surface; 17. Second inclined surface; 18. Ball screw; 19. Servo motor; 20. Guide rod; 21. Inclined surface line. Detailed Implementation

[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0047] For ease of description, a spatial rectangular coordinate system is defined in this invention: the direction of the conveyor belt movement is the Y-axis, the direction perpendicular to the top surface of the conveyor belt is the Z-axis, and the direction perpendicular to both the Y-axis and Z-axis is the X-axis. The camera's attitude deviation can be decomposed into three Euler angles: yaw angle (rotation about the Z-axis), roll angle (rotation about the Y-axis), and pitch angle (rotation about the X-axis).

[0048] Please see Figures 1-6This invention provides a technical solution: a rapid calibration device for a line scanning system, including a camera 2 and an adjustment mechanism 12 for adjusting the spatial attitude of the camera 2, and also including a mounting base 13, a line laser emitter 1, a laser receiving sensor 3, an coded optical wedge 4, a composite target 8, and a lifting mechanism 7 for driving the composite target 8 to rise and fall. The lifting mechanism 7 and the coded optical wedge 4 are both fixed on the mounting base 13. The camera 2 is positioned above the coded optical wedge 4, the line laser emitter 1 is symmetrically positioned on both sides of the coded optical wedge 4, and the laser receiving sensor 3 is symmetrically positioned on both sides of the camera 2. The top surface of the coded optical wedge 4 is inclined, and its top surface is provided with coded strips 5. Several coded strips 5 are evenly arranged along the inclined direction, and each coded strip 5... The composite target 8, which is located at different heights and has a unique binary coding pattern, includes a substrate 14, an angle calibration line group 9, a central reference line 11, a first protrusion 10, and a second protrusion 15. The angle calibration line group 9, the central reference line 11, the first protrusion 10, and the second protrusion 15 are all disposed on the upper side of the substrate 14. The first protrusion 10 and the second protrusion 15 are symmetrically disposed on both sides of the central reference line 11. The height of the first protrusion 10 is higher than that of the second protrusion 15. The top surface of the first protrusion 10 is provided with a first inclined surface 16, and the top surface of the second protrusion 15 is provided with a second inclined surface 17. The first inclined surface 16 and the second inclined surface 17 have the same inclination angle. Inclined surface lines 21 are provided on both the first inclined surface 16 and the second inclined surface 17.

[0049] The rapid calibration device of this line scan system achieves coarse spatial positioning through a line laser emitter 1 and a laser receiving sensor 3; achieves rapid focusing through an coded optical wedge 4 and its binary coded band 5; achieves simultaneous and precise measurement of multiple parameters (yaw angle, pitch angle, roll angle) in a single frame image through a composite target 8; and finally, the adjustment mechanism 12 automatically adjusts the spatial attitude of the camera 2 according to the measurement deviation, thereby completing a rapid and integrated calibration that does not rely on dynamic scanning of a motion platform.

[0050] To facilitate precise lifting and lowering of the composite target 8, in this embodiment, preferably, the lifting mechanism 7 includes a ball screw 18 and a servo motor 19. The output end of the servo motor 19 is connected to the upper end of the screw of the ball screw 18, and the lower end of the screw of the ball screw 18 is rotatably connected to the mounting base 13. The base plate 14 is fixedly connected to the nut of the ball screw 18. Guide rods 20 are provided on both sides of the ball screw 18, and the base plate 14 is slidably connected to the guide rods 20. The purpose is to drive the ball screw 18 to rotate through the servo motor 19, thereby driving the nut and the base plate 14 fixed thereto to move precisely up and down along the guide rods 20, achieving precise control of the height of the composite target 8, and ensuring that it can be accurately positioned to the optimal focal plane of the camera 2.

[0051] To facilitate accurate measurement of the yaw angle deviation of camera 2, in this embodiment, preferably, the angle calibration line group 9 includes an 87° line, an 89° line, a 90° line, a 91° line, and a 93° line. The 90° line is set parallel to the central reference line 11. The 87°, 89°, 90°, 91°, and 93° lines are all fan-shaped with the same endpoint as the origin. The purpose is to provide multiple lines with known standard angles as references. By detecting the actual imaging angle of these lines in the image through Hough transform and comparing it with the standard angle, the yaw angle deviation of camera 2 can be accurately calculated. For example, if the actual imaging angle of the 89° line in the image detected by Hough transform is 89.2°, then the yaw angle deviation is 89.2° - 89° = 0.2°. The accuracy can be improved by calculating the average value of the yaw angle deviations of multiple lines.

[0052] In order to facilitate light transmission and image formation of the coded pattern, in this embodiment, the coded light wedge 4 is preferably made of transparent glass. The purpose is to ensure good optical transmittance so that the camera 2 can clearly capture the coded strip 5 pattern on the surface of the coded light wedge 4. At the same time, the glass material is easy to perform precision photolithography.

[0053] To facilitate the calculation of attitude deviation, in this embodiment, preferably, the angle between the first inclined plane 16 and the horizontal plane and the angle between the second inclined plane 17 and the horizontal plane are both 30°, and the height difference between the first inclined plane 16 and the second inclined plane 17 is 0.3mm.

[0054] To facilitate intuitive reading of height information, in this embodiment, preferably, one side edge of the coded optical wedge 4 is etched with a height reference scale 6 corresponding to each coded band 5. The purpose is to provide a physical height reference value for each coded band 5, which facilitates manual comparison during debugging or verification, thereby enhancing the readability and reliability of the system.

[0055] To enhance the robustness and accuracy of yaw angle calibration, in this embodiment, preferably, two sets of angle calibration line groups 9 are symmetrically arranged with the central reference line 11 as the center line. The purpose is to enhance the robustness and accuracy of yaw angle calibration through the redundant design of the double-sided lines. Specifically, the angle calibration line groups 9 on both sides of the central reference line 11 can be detected simultaneously. The averaging or cross-verification of the angle measurement results of the lines at symmetrical positions can effectively suppress the imaging distortion or local error that may be introduced by single-sided measurement and improve the reliability of yaw angle calibration.

[0056] Please see Figure 7 The present invention also provides a calibration method for a rapid calibration device for a line scanning system, comprising the following steps:

[0057] S1 spatial coarse positioning includes:

[0058] S11. Place the rapid calibration device of the line scanning system in the center of the conveyor belt;

[0059] In this embodiment, the operator places the rapid calibration device of the line scanning system stably in the center of the conveyor belt, ensuring that the bottom of the rapid calibration device of the line scanning system is in good contact with the surface of the conveyor belt.

[0060] S12. Start the two line laser emitters 1 to emit lasers to the two laser receiving sensors 3 respectively, and read the distance values ​​of the two laser receiving sensors 3 from the laser emission to the reception respectively.

[0061] In this embodiment, the two line laser emitters 1 on both sides simultaneously emit lasers to the two laser receiving sensors 3, thereby measuring the distance from both sides of the camera 2 to the fixed boundary of the device in real time, obtaining two distance values, and uploading the two distance values ​​to the control system in real time.

[0062] S13. Adjust the roll angle of camera 2 through adjustment mechanism 12 until the two distance values ​​are consistent, so that camera 2 is initially aligned;

[0063] In this embodiment, the control system compares the distance values ​​on both sides. If there is a difference, the adjustment mechanism 12 is used to control the camera 2 to rotate around the Y-axis and fine-tune the roll angle of the camera 2 until the distance values ​​on both sides are consistent, thus completing the initial vertical calibration of the optical axis of the camera 2 and the direction of the conveyor belt.

[0064] S2 fast focus includes:

[0065] S21. Camera 2 takes an image of the inclined surface of the coded light wedge 4 to obtain the binary coding pattern of each coding band 5.

[0066] In this embodiment, the camera 2 remains stationary and takes a picture of the tilted surface of the coded light wedge 4 to obtain an image containing all the coded bands 5.

[0067] S22. Calculate the binary ordinal number of the binary coded pattern corresponding to each coded band 5, and analyze the clarity of the binary coded pattern corresponding to each coded band 5, and determine the target ordinal number corresponding to the coded band 5 with the highest clarity of the binary coded pattern.

[0068] In this embodiment, the binary encoding pattern of encoding band 5 is generated based on the following principle: each encoding band 5 corresponds to a unique binary ordinal number. (Taking 5-bit encoding as an example, binary ordinal number) (0, 1, 2...31), binary ordinal numbers The N-bit binary representation is Each binary bit The value (0 or 1) is mapped to a physical region of width M pixels, and the mapping function is defined as:

[0069]

[0070] In this sequence, "101010..." represents an alternating black and white stripe sequence (black pixel value is 1, white pixel value is 0), with a period of 2 pixels. A single bit region contains M / 2 complete periods. "000000..." represents a pure white sequence. Each coded band of 5 corresponds to a complete binary coded pattern, which is the horizontal stitching of its binary bit mapping patterns. For example, the binary ordinal number of the coded band... The value is 13, which can be represented in 5-bit binary (N=5) as 01101. When the highest bit is 0, the corresponding area is completely white. =1, and its corresponding area is black and white stripes. =1, and its corresponding area is black and white stripes. =0, the corresponding area is completely white. (Least significant bit) = 1, and its corresponding area is black and white stripes. Therefore, the complete binary code pattern with 5 is the splicing of these five areas from left to right (from high bit to low bit): [all white] + [stripes] + [stripes] + [all white] + [stripes]. When the width is 6 pixels, the splicing of these five areas is: [white white white white white white] + [black and white black and white white] + [black and white black and white white] + [white white white white white] + [black and white black and white white], that is, [000000] + [101010] + [101010] + [000000] + [101010].

[0071] Since the binary ordinal number of each coded band 5 is unique, the resulting striped / all-white combination pattern is also unique. Camera 2 only needs to identify this combination pattern to directly decode which coded band 5 it is. Then, it analyzes the sharpness of the binary coded pattern corresponding to each coded band 5 by calculating the focus function. To quantize binary encoded patterns The degree of defocus is defined by the formula:

[0072]

[0073] in, To utilize image processing techniques to determine the total number of black pixels actually identified in this binary coded pattern, This represents the theoretical total number of black pixels in the binary encoded pattern under ideal focusing conditions. When a certain encoding band 5 is at the optimal focal plane, its binary encoded pattern has sharp edges and high contrast. The maximum value is found by iterating through all coded bands with 5. The code that obtains the maximum value is 5.

[0074] S23. Determine the target height position of the corresponding coding band 5 according to the target ordinal number, and use the target height position as the optimal focal plane of camera 2;

[0075] In this embodiment, the system finds The maximum value of the encoding band 5 is obtained, and based on the target ordinal number decoded from the encoding band 5, combined with the pre-calibrated correspondence table between the ordinal number and the physical height, the precise height value of the encoding band 5 is obtained by directly looking up the table, and this height plane is determined as the current optimal focal plane of camera 2.

[0076] S24, The lifting mechanism 7 drives the composite target 8 to rise or fall so that the upper surface of the substrate 14 moves to the height of the optimal focal plane.

[0077] In this embodiment, the control system sends a command to the servo motor 19 of the lifting mechanism 7 to drive the ball screw 18 to rotate, thereby moving the substrate 14 of the composite target 8 precisely along the guide rod 20 until the upper surface of the substrate 14 coincides with the optimal focal plane determined in step S23.

[0078] S3 Precision Attitude Calibration includes:

[0079] S31. Use camera 2 to acquire a single frame image of the composite target 8 to obtain the target image;

[0080] In this embodiment, after the composite target 8 is positioned, the camera 2 performs a high-resolution image acquisition on the stationary composite target 8.

[0081] S32. Use Hough transform to detect the actual imaging angle of the angle calibration line group 9 in the target image, compare the actual imaging angle with the standard angle to obtain the comparison result, and determine the yaw angle deviation based on the comparison result.

[0082] In this embodiment, Hough transform is applied to the acquired image based on the image processing algorithm to detect the actual tilt angle of each scale line (such as 87°, 89°, 90°, 91°, and 93° scale lines) in the angle calibration scale line group 9 in the image. The detected actual angle is compared with the standard design angle of these scale lines to calculate the angle deviation of each scale line. The yaw angle deviation can be obtained by calculating the average value of the deviations of multiple scale lines to improve the measurement accuracy and reliability.

[0083] S33. The first pixel offset of the inclined surface line 21 on the first inclined surface 16 relative to the central reference line 11 and the second pixel offset of the inclined surface line 21 on the second inclined surface 17 relative to the central reference line 11 are measured with subpixel precision.

[0084] In this embodiment, a subpixel edge detection algorithm is used to accurately extract the center line position of the inclined surface etched line 21 on the first inclined surface 16 and the second inclined surface 17, and calculate their vertical distances from the center reference etched line 11 in the image to obtain the first pixel offset d1 and the second pixel offset d2.

[0085] S34. Identify the vertical distance from the imaging surface of the current camera 2 to the upper surface of the substrate 14 as the calibration working distance;

[0086] In this embodiment, the lifting mechanism 7 moves the composite target 8 to the optimal focal plane height. At this time, the vertical distance from the imaging surface of the camera 2 to the upper surface of the substrate 14 is the calibration working distance. The calibration working distance can be obtained by feedback from the high-precision encoder of the lifting mechanism 7 (the imaging surface height of the camera 2, the initial position of the lifting mechanism 7, and the movement stroke are known).

[0087] S35. Based on the calibration working distance, the first pixel offset, the second pixel offset, and the height difference between the first inclined plane 16 and the second inclined plane 17, the pitch angle deviation and roll angle deviation of the camera 2 are calculated synchronously through the geometric projection relationship.

[0088] In this embodiment, pitch angle and roll angle Simultaneous calculation is performed using the following formula:

[0089]

[0090] in, The pixel equivalent (unit: mm / pixel) obtained from system calibration. This is a fixed height difference (e.g., 0.3 mm) between the first and second inclined planes. To calibrate the working distance, This is the offset of the first pixel. This is the offset of the second pixel.

[0091] S36. The adjustment mechanism 12 automatically adjusts the spatial attitude of the camera 2 according to the yaw angle deviation, pitch angle deviation and roll angle deviation;

[0092] In this embodiment, the control system sends the calculated yaw angle deviation, pitch angle deviation and roll angle deviation values ​​to the adjustment mechanism 12. The adjustment mechanism 12 is a multi-degree-of-freedom precision adjustment platform (such as including pitch, yaw and roll adjustment functions), which drives the corresponding motor or piezoelectric ceramic actuator to fine-tune the spatial attitude of the camera 2.

[0093] To improve the accuracy of action recognition, in this embodiment, step S32 preferably includes the following steps:

[0094] S321. Use Hough transform to detect the actual imaging angle of each line in the angle calibration line group 9 in the target image, compare the actual imaging angle of each line with the standard angle of the corresponding line, and obtain the comparison result of a line.

[0095] In this embodiment, the Hough line detection algorithm is used to extract the line parameters of each etched line in the image. The actual imaging angle is calculated based on the slope of the line in the image coordinate system. The detected actual angle is compared with the preset standard angle of the etched line (such as 87°, 89°, 90°, etc.) to calculate the angle deviation of a single etched line and obtain the comparison result of a etched line.

[0096] S322. Calculate the yaw angle deviation by fitting the comparison results of multiple scribe lines;

[0097] In this embodiment, all detected comparison results are summed and the average value is calculated, or a weighted average method is used to calculate the yaw angle deviation.

[0098] To facilitate improved calibration accuracy, in this embodiment, preferably, the following step is included after step S36:

[0099] S37. Repeat steps S31 to S36 until the yaw angle deviation, pitch angle deviation and roll angle deviation are all less than the preset deviation threshold.

[0100] In this embodiment, after the control system completes the initial attitude adjustment, it automatically triggers a new round of image acquisition and deviation calculation process, that is, re-executes steps S31 to S36 to verify and fine-tune the adjusted camera attitude. This iterative calibration process will continue until the calculated yaw angle deviation, pitch angle deviation and roll angle deviation are all less than the system's preset deviation threshold (e.g., 0.02°), indicating that the camera spatial attitude has reached the required calibration accuracy. In addition, the system can set a maximum number of iterations (e.g., 5 times) to avoid infinite loops due to abnormal situations. Once all deviation values ​​meet the threshold requirements, the system determines that the calibration is complete and can output the calibration results or enter the ready state for subsequent visual inspection tasks.

[0101] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A rapid calibration device for a line scanning system, comprising a camera (2) and an adjustment mechanism (12) for adjusting the spatial attitude of the camera (2), characterized in that: It also includes a mounting base (13), a line laser emitter (1), a laser receiving sensor (3), an coded optical wedge (4), a composite target (8), and a lifting mechanism (7) for driving the composite target (8) to rise and fall. The lifting mechanism (7) and the coded optical wedge (4) are both fixed on the mounting base (13). The camera (2) is located above the coded optical wedge (4). The line laser emitter (1) is symmetrically arranged on both sides of the coded optical wedge (4). The laser receiving sensor (3) is symmetrically arranged on both sides of the camera (2). The top surface of the coded optical wedge (4) is inclined, and its top surface is provided with coded strips (5). Several coded strips (5) are evenly arranged along the inclined direction. Each coded strip (5) is at a different height position and has a unique binary coding pattern. The composite target (8) Includes a substrate (14), an angle calibration line group (9), a central reference line (11), a first protrusion (10) and a second protrusion (15). The angle calibration line group (9), the central reference line (11), the first protrusion (10) and the second protrusion (15) are all disposed on the upper side of the substrate (14). The first protrusion (10) and the second protrusion (15) are symmetrically disposed on both sides of the central reference line (11). The height of the first protrusion (10) is higher than that of the second protrusion (15). The top surface of the first protrusion (10) is provided with a first inclined surface (16), and the top surface of the second protrusion (15) is provided with a second inclined surface (17). The inclination angles of the first inclined surface (16) and the second inclined surface (17) are the same. Inclined lines are provided on both the first inclined surface (16) and the second inclined surface (17).

2. The rapid calibration device for the line scanning system according to claim 1, characterized in that: The lifting mechanism (7) includes a ball screw (18) and a servo motor (19). The output end of the servo motor (19) is connected to the upper end of the screw of the ball screw (18). The lower end of the screw of the ball screw (18) is rotatably connected to the mounting base (13). The base plate (14) is fixedly connected to the nut of the ball screw (18). Guide rods (20) are provided on both sides of the ball screw (18). The base plate (14) is slidably connected to the guide rods (20).

3. The rapid calibration device for the line scanning system according to claim 1, characterized in that: The angle calibration line group (9) includes an 87° line, an 89° line, a 90° line, a 91° line and a 93° line. The 90° line is set parallel to the central reference line (11). The 87° line, 89° line, 90° line, 91° line and 93° line are all fan-shaped with the same endpoint as the origin.

4. The rapid calibration device for the line scanning system according to claim 1, characterized in that: The coded optical wedge (4) is made of transparent glass.

5. The rapid calibration device for the line scanning system according to claim 1, characterized in that: The angle between the first inclined plane (16) and the horizontal plane and the angle between the second inclined plane (17) and the horizontal plane are both 30°, and the height difference between the first inclined plane (16) and the second inclined plane (17) is 0.3mm.

6. The rapid calibration device for the line scanning system according to claim 1, characterized in that: The edge of the coded optical wedge (4) is etched with height reference scales (6) that correspond one-to-one with each coded band (5).

7. The rapid calibration device for the line scanning system according to claim 1, characterized in that: The angle calibration line group (9) is symmetrically arranged in two groups with the central reference line (11) as the center line.

8. A calibration method for a rapid calibration device for a line scanning system based on any one of claims 1-7, characterized in that, Includes the following steps: S1 spatial coarse positioning includes: S11. Place the rapid calibration device of the line scanning system in the center of the conveyor belt; S12. Start the two line laser emitters (1) to emit lasers to the two laser receiving sensors (3) respectively, and read the distance values ​​of the laser from the emitter to the receiver according to the distance values ​​of the laser from the emitter to the receiver. S13. Adjust the roll angle of the camera (2) through the adjustment mechanism (12) until the two distance values ​​are consistent, so that the camera (2) is initially aligned; S2 fast focus includes: S21. The camera (2) takes a picture of the inclined surface of the coded light wedge (4) to obtain the binary coding pattern of each coding band (5); S22. Calculate the binary ordinal number of the binary coding pattern corresponding to each coding band (5), and analyze the clarity of the binary coding pattern corresponding to each coding band (5) to determine the target ordinal number corresponding to the coding band (5) with the highest clarity of the binary coding pattern. S23. Determine the target height position of the corresponding coding band (5) according to the target ordinal number, and use the target height position as the best focal plane of the camera (2); S24. The lifting mechanism (7) drives the composite target (8) to rise or fall so that the upper surface of the substrate (14) moves to the height of the optimal focal plane. S3 Precision Attitude Calibration includes: S31. Use camera (2) to acquire a single frame image of the composite target (8) to obtain the target image; S32. Use Hough transform to detect the actual imaging angle of the angle calibration line group (9) in the target image, compare the actual imaging angle with the standard angle, obtain the comparison result, and determine the yaw angle deviation based on the comparison result. S33. The first pixel offset of the inclined surface line on the first inclined surface (16) relative to the central reference line (11) and the second pixel offset of the inclined surface line on the second inclined surface (17) relative to the central reference line (11) are measured with subpixel precision respectively. S34. Identify the vertical distance from the imaging surface of the current camera (2) to the upper surface of the substrate (14) as the calibration working distance; S35. Based on the calibration working distance, the first pixel offset, the second pixel offset, and the height difference between the first inclined plane (16) and the second inclined plane (17), the pitch angle deviation and roll angle deviation of the camera (2) are calculated synchronously through the geometric projection relationship. S36. The adjustment mechanism (12) automatically adjusts the spatial attitude of the camera (2) according to the yaw angle deviation, pitch angle deviation and roll angle deviation.

9. The calibration method according to claim 8, characterized in that, Step S32 specifically includes the following steps: S321. Use Hough transform to detect the actual imaging angle of each line in the angle calibration line group (9) in the target image, compare the actual imaging angle of each line with the standard angle of the corresponding line, and obtain the comparison result of each line. S322. Calculate the yaw angle deviation by fitting the comparison results of multiple scribe lines.

10. The calibration method according to claim 8, characterized in that, The following steps are included after step S36: S37. Repeat steps S31 to S36 until the yaw angle deviation, pitch angle deviation and roll angle deviation are all less than the preset deviation threshold.

Citation Information

Patent Citations

  • Direction decoupling principle-based dual-optical wedge scanner calibration system and method

    CN116222968A

  • Water jet cutter robot autonomous operation three-dimensional detection and positioning calibration method and system

    CN119468976A