A calibration method for line scanning mechanism for cylindrical visual targets
By using calibration columns, calibration lines and calibration circles in the online scanning mechanism for image acquisition and adjustment, the problem of difficulty in maintaining parallelism when the line scanning camera acquires cylinder images is solved, and efficient and accurate image acquisition is achieved.
Patent Information
- Application Number
- CN202111209614.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-18
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2041-10-18
AI Technical Summary
When collecting cylinder images, existing line scanning cameras are difficult to keep parallel due to mechanical installation reasons, resulting in image deformation, and manual parameter adjustment takes a long time, low efficiency and insecure accuracy.
The calibration column is used to calibrate the line scanning mechanism, and the image acquisition height, angle and speed are adjusted through the first calibration line, the second calibration line and the calibration circle, and the angle adjustment mechanism, the inclination adjustment mechanism and the rotation driving mechanism are used to ensure the line scanning camera. Parallel to the cylinder to avoid image deformation.
The line sweeping mechanism is kept parallel to the cylinder, avoiding image deformation, improving acquisition efficiency and accuracy, and reducing the cost and time of manual parameter adjustment.
Smart Images

Figure CN113822947B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of machine vision and relates to a calibration method of a line scanning mechanism for a cylindrical visual target. Background Art
[0002] Line scan cameras can capture high-resolution images of objects moving at a constant speed. They are suitable for high-speed or high-resolution image acquisition. They are also suitable for high-precision inspection of curved surfaces such as bearings and for inspection and measurement of prints on the surface of cylindrical products in industry.
[0003] Due to mechanical installation and other reasons, it is difficult for the line scan camera to be parallel to the cylindrical surface of the workpiece to be measured, which causes the collected image to be deformed, and ultimately it is difficult to obtain a picture that can be used for measurement or defect detection. The existing method is to ensure that the line scan camera is parallel to the measuring cylinder through mechanical limiters and other means and set the appropriate speed to obtain an undeformed picture. However, the following problems still exist: First, it is very difficult to ensure that the final line scan mechanism is parallel, and the cost is not easy to control; second, the installation requirements are very high, and a small part that is not installed in parallel may cause the line scan camera to fail to work properly; third, manually setting the running speed of the object to be measured or the line frequency parameters of the line scan camera requires multiple acquisitions and adjustments, which is time-consuming, inefficient, and has no guarantee of accuracy. Summary of the invention
[0004] In order to solve the above problems, a cost-controlled calibration method is provided to ensure that the line scanning mechanism can maintain parallelism with the cylindrical surface of the workpiece to be measured and avoid image deformation. The present invention adopts the following technical solutions:
[0005] The present invention provides a calibration method for a line scanning mechanism for a cylindrical visual target, which is used for calibrating a line scanning mechanism for visually capturing a cylindrical surface of a workpiece, wherein the line scanning mechanism comprises a bearing platform for bearing the workpiece, a rotation driving mechanism for driving the workpiece to rotate, and a line scanning camera, and is characterized in that: a calibration column is used to calibrate the line scanning mechanism, and a first calibration line parallel to the axis, a plurality of second calibration lines perpendicular to the first calibration line, and a calibration circle are arranged on the cylindrical surface of the calibration column, and the calibration method comprises the following steps: step S1, placing the calibration column on the bearing platform, and calibrating the calibration column by using the line scanning camera In step S2, the image height of the line scan camera during acquisition is adjusted according to the image acquired in step S1, until the acquired cylindrical image includes two first calibration line graphics corresponding to the first calibration line, and the adjusted image height is set as the image acquisition height; in step S3, the line scan camera is used to acquire the cylindrical image of the calibration column at the image acquisition height, and the angle between the first calibration line graphics in the acquired cylindrical image and the projection of the acquisition line of the line scan camera on the camera chip plane is obtained, and the angle adjustment mechanism is used to adjust the camera chip plane angle of the carrier platform. The first calibration line pattern is adjusted so that the projection of the first calibration line pattern and the acquisition line of the line scan camera on the camera chip plane are parallel to each other; step S4, using the line scan camera to collect a cylindrical image of the calibration column, based on the pixel positions of the first part of the spacing and the last part of the spacing in the second calibration line pattern corresponding to the second calibration line in the collected cylindrical image, the vertical angle between the projection of the acquisition line of the line scan camera on the camera chip plane and the first calibration line pattern is solved, and the angle between the carrying platform and the camera chip plane is adjusted by the inclination adjustment mechanism until the acquisition line of the line scan camera is on the camera chip. The projection on the film plane is parallel to the first calibration line figure; step S5, using a line scan camera to capture a cylindrical image of the calibration cylinder, taking the projection of the capture line of the line scan camera on the camera chip plane as the direction, obtaining a calibration circle figure corresponding to the calibration circle contained in the captured cylindrical image, and when the calibration circle figure is displayed as an ellipse, adjusting at least one of the rotation speed of the rotation drive mechanism and the line frequency of the line scan camera according to the major axis and minor axis of the ellipse and the multiple of the major axis and minor axis, until the calibration circle figure in the captured cylindrical image meets the roundness error requirement of the set accuracy.
[0006] The calibration method of a line scan mechanism for a cylindrical visual target provided by the present invention may also have such a technical feature, wherein the major axis is the intercept of the projection of the acquisition line of the line scan camera on the camera chip plane passing through the center of the calibration circle figure and parallel to the line scan camera, and the minor axis is the intercept passing through the center of the calibration circle figure and perpendicular to the major axis.
[0007] The calibration method of a line scanning mechanism for a cylindrical visual target provided by the present invention may also have such a technical feature, wherein, during the cylindrical image acquisition process in steps S1 to S5, a light source system is used to perform external fill light on the calibration column.
[0008] The calibration method of a line scanning mechanism for a cylindrical visual target provided by the present invention may also have such a technical feature, wherein the adjustment process of step S2 is: when two first calibration line graphics corresponding to the first calibration lines are not displayed in the captured cylindrical image, the image height is doubled until two first calibration line graphics are captured, and the image height is set to twice the spacing between the two first calibration line graphics.
[0009] The calibration method of a line scanning mechanism for a cylindrical visual target provided by the present invention may also have such a technical feature, wherein, in step S5, only the rotation speed of the rotating drive mechanism is adjusted, and the adjustment is: dividing the rotation speed of the rotating drive mechanism by a multiple.
[0010] The calibration method of a line scan mechanism for a cylindrical visual target provided by the present invention may also have such a technical feature, wherein, in step S5, only the line frequency of the line scan camera is adjusted, and the adjustment is: multiplying the line frequency of the line scan camera by a multiple.
[0011] Function and Effect of the Invention
[0012] According to the calibration method of the line scanning mechanism for cylindrical visual targets of the present invention, the line scanning mechanism is adjusted and calibrated by a calibration column. The calibration process first completes the setting of the image acquisition height based on the first calibration line figure displayed in the image acquired by the line scanning camera, and then respectively based on the angle between the first calibration line figure and the projection of the acquisition line of the line scanning camera on the camera chip plane, the vertical angle between the first calibration line figure acquired and the projection of the acquisition line on the camera chip plane solved by the pixel position difference of the second calibration line figure spacing, and the multiples between the major and minor axes of the calibration circle figure corresponding to the calibration circle of the calibration column, the camera chip plane angle of the carrier platform, the angle between the carrier platform and the camera chip plane, and the rotation speed are adjusted in sequence by using an angle adjustment mechanism, an inclination adjustment mechanism, and a rotation drive mechanism to complete the calibration.
[0013] The calibration method of the line scanning mechanism for cylindrical visual targets of the present invention not only completes the setting of parameters such as the angle, the included angle and the rotation drive mechanism between the support platform and the camera chip plane, so that the workpiece to be measured can still be kept in a relatively parallel state with the line scanning camera during the operation of the line scanning mechanism, but also solves the problem of image deformation caused by the relative motion formed by the rotation speed and the incomplete matching of the acquisition rate of the line scanning camera, and avoids the high consumption and low efficiency and the inability to guarantee accuracy that occur when the line scanning mechanism is manually adjusted. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is a schematic diagram of a line scanning mechanism in an embodiment of the present invention;
[0015] Figure 2 is a schematic diagram of a calibration column in an embodiment of the present invention;
[0016] Figure 3 is a schematic diagram of an expansion of a calibration column in an embodiment of the present invention;
[0017] Figure 4 is a schematic diagram of an angle adjustment mechanism and an inclination adjustment mechanism in an embodiment of the present invention;
[0018] Figure 5 A schematic flow chart of a calibration method for a line scanning mechanism for a cylindrical visual target in an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to make the technical means, creative features, objectives and effects achieved by the present invention easy to understand, the following is a specific description of the calibration method of the line scanning mechanism for cylindrical visual targets of the present invention in combination with embodiments and drawings.
[0020] <Example>
[0021] Figure 1 Schematic diagram of the line scanning mechanism in an embodiment of the present invention.
[0022] The experimental environment of this embodiment is set on a line scanning mechanism for visually capturing the cylindrical surface of the workpiece. Figure 1 As shown, the line scanning mechanism 100 comprises a base 10 , a carrying platform 11 disposed on the base 10 for carrying a workpiece, a rotation driving mechanism for driving the workpiece to rotate on the carrying platform 11 , and a line scanning camera 12 .
[0023] The rotation drive mechanism includes a motor (not shown in the figure) and rollers 131 and 132 arranged side by side on the supporting platform 11. The motor can drive the rollers to rotate, so that when the workpiece is placed on the rollers 131 and 132, it can rotate at a uniform speed with the rotation speed of the rollers to cooperate with the image acquisition of the line scanning mechanism.
[0024] The correction device in this embodiment is used to correct the horizontal angle, vertical angle and rotation speed of the rotation drive mechanism between the above-mentioned supporting platform and the camera chip plane. The correction device has a calibration column 14, an angle adjustment mechanism 16, an inclination adjustment mechanism 17 and a control unit (not shown in the figure).
[0025] Figure 2 is a schematic diagram of a calibration column in an embodiment of the present invention, Figure 3Schematic diagram of the expansion of the calibration column in the embodiment of the present invention.
[0026] like Figure 2 and Figure 3 As shown, a first calibration line 141 parallel to the axis, 10 second calibration lines 142 perpendicular to the first calibration lines, and a calibration circle 143 are arranged on the cylindrical surface of the calibration column 14 .
[0027] Figure 4 Schematic diagram of an angle adjustment mechanism and an inclination adjustment mechanism in an embodiment of the present invention.
[0028] like Figure 4 As shown, the tilt adjustment mechanism 17 includes an adjustment plate 171, a first rotating shaft 172 and a first motor (not shown in the figure).
[0029] In this embodiment, the base 10 is provided with a protruding portion 151 protruding upward, and the adjustment plate 171 is hinged to the top of the protruding portion 151 through a first rotating shaft 172. The length direction of the first rotating shaft 172 is parallel to the planes of the adjustment plate 171 and the base 10, so that a structure similar to a seesaw is formed between the adjustment plate 171 and the base 10, and the adjustment plate 171 can swing relative to the base 10 through the first rotating shaft 172 to change the tilt angle relative to the base 10. In addition, a driven gear is provided on the adjustment plate 171 near the first rotating shaft 172, and a driving gear is provided on the output end of the first motor. The driven gear and the driving gear are meshed with each other so that the first motor can drive the adjustment plate 171 to change the tilt angle.
[0030] The angle adjustment mechanism 16 includes a second rotating shaft 161 and a second motor (not shown in the figure). The axial direction of the second rotating shaft 161 is perpendicular to the adjustment plate 171, and the supporting platform 11 is rotatably connected to the adjustment plate 171 through the second rotating shaft 161. In this embodiment, the supporting platform 11 is roughly parallel to the adjustment plate 171, and the supporting platform 11 can rotate relative to the adjustment plate 171 through the second rotating shaft 161 to change the plane angle between the supporting platform 11 and the adjustment plate 171. In addition, similar to the first motor, a driven gear is provided at the position of the second rotating shaft 161 on the bottom surface of the supporting platform 11, and a driving gear is provided on the output end of the second motor. The driven gear and the driving gear are meshed with each other so that the second motor can drive the adjustment plate 171 to change the angle.
[0031] The control unit is communicatively connected to the line scan camera 12, and can receive and analyze the images captured by the line scan camera 12; at the same time, the control unit is electrically connected to the rotation drive mechanism, the angle adjustment mechanism 16 and the inclination adjustment mechanism 17, and can send electrical signals to control the operation of these mechanisms, including: controlling the rotation speed in the rotation drive mechanism (i.e., controlling the output speed of the motor in the mechanism, so as to control the rotation speed of the two rollers to achieve the control speed of the workpiece); controlling the angle adjustment mechanism 16 to adjust the camera chip plane angle of the carrier platform 11; controlling the inclination adjustment mechanism 17 to adjust the angle between the carrier platform 11 and the camera chip plane.
[0032] Figure 5 It is a flow chart of a calibration method of a line scanning mechanism for a cylindrical visual target in an embodiment of the present invention.
[0033] like Figure 5 As shown, the calibration method includes the following steps:
[0034] Step S1, placing a calibration column on a carrying platform, and using a line scan camera to collect a cylindrical image of the calibration column.
[0035] In this embodiment, the specific operation of step S1 is: first complete the installation of the line scanning mechanism 100 and the correction device, reset all the parameter settings of the angle adjustment mechanism, the inclination adjustment mechanism and the rotation drive mechanism, and initialize the hardware modules in the line scanning mechanism 100 and the correction device; then start the rotation drive mechanism to drive the rollers 131 and 132 to start uniform motion; finally, place the calibration column 14 on the supporting platform 11, adjust the lens focal length of the line scanning camera 12, and use the light source system to perform external fill light on the calibration column 14.
[0036] Wherein, in this step S1, a preset image height is used when collecting the cylindrical image, and the preset image height is 2000 (ie, 2000 rows of pixels).
[0037] Step S2, adjusting the image height of the line scan camera during acquisition according to the image acquired in step S1, until the acquired cylindrical image contains two first calibration line graphics corresponding to the first calibration lines, and setting the adjusted image height as the image acquisition height.
[0038] When the captured cylindrical image does not display two first calibration line graphics corresponding to the first calibration line 141, the image height is doubled until two first calibration line graphics are captured, and the image height is set to twice the spacing between the two first calibration line graphics, which is the image capture height.
[0039] Step S3, using a line scan camera to capture a cylindrical image of the calibration column at an image acquisition height, and obtaining an angle between a first calibration line graphic in the captured cylindrical image and a projection of the acquisition line of the line scan camera on the camera chip plane, and using an angle adjustment mechanism to adjust the camera chip plane angle of the supporting platform so that the first calibration line graphic and the projection of the acquisition line of the line scan camera on the camera chip plane are parallel to each other.
[0040] Step S4, using a line scan camera to collect a cylindrical image of the calibration column, based on the first part of the second calibration line graph corresponding to the second calibration line in the collected cylindrical image (i.e. Figure 3 and Figure 4 The spacing of the first 1 to 5 segments of the 10 short lines shown in the figure and the spacing of the last segment (i.e. Figure 3 and Figure 4 The vertical angle between the projection of the acquisition line of the line scan camera on the camera chip plane and the first calibration line pattern is solved by the pixel position of the spacing of the 5th to 10th line segments among the 10 short lines shown in the figure, and the angle between the carrying platform and the camera chip plane is adjusted by the inclination adjustment mechanism until the projection of the acquisition line of the line scan camera on the camera chip plane is parallel to the first calibration line pattern.
[0041] In this embodiment, the measurement process of the vertical angle is as follows: when a vertical angle exists between the projection of the acquisition line of the line scan camera on the camera chip plane and the first calibration line figure, the spacings in the second calibration line figure in the cylindrical image acquired by the line scan camera are uneven, and therefore the vertical angle can be calculated by solving the equation using trigonometric functions according to the pixel positions of the first spacing and the last spacing in the second calibration line figure.
[0042] Step S5, using a line scan camera to capture a cylindrical image of the calibration cylinder, with the projection of the capture line of the line scan camera on the camera chip plane as the direction, obtaining a calibration circle graphic corresponding to the calibration circle contained in the captured cylindrical image, and when the calibration circle graphic is displayed as an ellipse, adjusting at least one of the rotation speed of the rotation drive mechanism and the line frequency of the line scan camera according to the major axis and minor axis of the ellipse and the multiple of the major axis and minor axis, until the calibration circle graphic in the captured cylindrical image meets the roundness error requirement of the set accuracy.
[0043] In this embodiment, the major axis is the intercept of the projection of the acquisition line of the line scan camera on the camera chip plane passing through the center of the calibration circle figure and parallel to the line scan camera, and the minor axis is the intercept passing through the center of the calibration circle figure and perpendicular to the major axis.
[0044] The roundness error requirement of this step is specifically set according to the different precisions of parameters such as pixels, line frequency and definition set by different models of line scanning mechanisms.
[0045] In step S5 of this embodiment, only the rotation speed of the rotation drive mechanism is adjusted, and the adjustment is: dividing the rotation speed of the rotation drive mechanism by the multiple of the major and minor axes. In other embodiments, if the rotation speed of the rotation drive mechanism cannot be adjusted (for example, the motor in the rotation drive mechanism is a non-speed-adjustable motor), then only the line frequency of the line scan camera can be adjusted, and the adjustment is: multiplying the line frequency of the line scan camera by the multiple of the major and minor axes.
[0046] In the process of collecting cylindrical images in the above steps S1 to S5 , the calibration column 14 is externally supplemented with light using a light source system.
[0047] After the above calibration is completed, the calibration column 14 is removed, and the workpiece to be measured is placed on the carrying platform 11. The line scan camera 12 can be used to capture the image of the cylindrical surface of the workpiece to obtain a clear, complete and non-deformed cylindrical image.
[0048] Example Function and Effect
[0049] According to the calibration method of the line scan mechanism for cylindrical visual targets provided in the present embodiment, a first calibration line, a plurality of second calibration lines perpendicular to the first calibration line, and a calibration circle are used to mark the calibration column, and the image acquisition height is set according to the first calibration line graphic displayed in the image acquired when the line scan camera acquires the image of the calibration column, and then the vertical angle between the acquired first calibration line graphic and the projection of the acquisition line of the line scan camera on the camera chip plane is solved based on the angle between the first calibration line graphic and the projection of the acquisition line of the line scan camera on the camera chip plane, the second calibration line graphic spacing pixel position difference, and the major and minor axis multiple relationship of the calibration circle graphic corresponding to the calibration circle of the calibration column. The camera chip plane angle of the carrying platform, the angle between the carrying platform and the camera chip plane, and the rotation speed are adjusted in sequence by using an angle adjustment mechanism, an inclination adjustment mechanism, and a rotation drive mechanism to complete the calibration.
[0050] The above calibration method not only completes the setting of parameters such as the angle, included angle and rotation drive mechanism between the carrying platform of the line scanning mechanism and the plane of the camera chip, so that the workpiece to be measured can still be kept in a relatively parallel state with the line scanning camera during the operation of the line scanning mechanism, so that the line scanning camera can clearly and completely capture the image of the cylindrical surface of the workpiece to be measured, but also solves the problem of image deformation caused by the incomplete match between the relative motion formed by the rotation speed and the acquisition rate of the line scanning camera, and avoids the high consumption and low efficiency and inability to guarantee accuracy when manually adjusting the parameters of the line scanning mechanism.
[0051] The above embodiments are only used to illustrate specific implementation modes of the present invention, and the present invention is not limited to the description scope of the above embodiments.
Claims
1. A calibration method for a line scanning mechanism for a cylindrical visual target, which is used to calibrate a line scanning mechanism for visually capturing a cylindrical surface of a workpiece, wherein the line scanning mechanism comprises a carrying platform for carrying the workpiece, a rotation driving mechanism for driving the workpiece to rotate, and a line scanning camera, and is characterized in that: The line scanning mechanism is calibrated by using a calibration column, and a first calibration line parallel to the axis, a plurality of second calibration lines perpendicular to the first calibration line, and a calibration circle are arranged on the cylindrical surface of the calibration column. The calibration method comprises the following steps: Step S1, placing the calibration column on the carrying platform, and using the line scan camera to collect a cylindrical image of the calibration column; Step S2, adjusting the image height during acquisition by the line scan camera according to the image acquired in step S1, until the acquired cylindrical image includes two first calibration line graphics corresponding to the first calibration lines, and setting the adjusted image height as the image acquisition height; Step S3, using the line scan camera to collect a cylindrical image of the calibration column at the image collection height, and obtaining an angle between the first calibration line pattern in the collected cylindrical image and a projection of the collection line of the line scan camera on the camera chip plane, and using an angle adjustment mechanism to adjust the camera chip plane angle of the carrying platform so that the first calibration line pattern and the projection of the collection line of the line scan camera on the camera chip plane are parallel to each other; Step S4, using the line scan camera to collect a cylindrical image of the calibration column, solving the vertical angle between the projection of the collection line of the line scan camera on the camera chip plane and the first calibration line figure based on the pixel positions of the first part of the spacing and the last part of the spacing in the second calibration line figure corresponding to the second calibration line in the collected cylindrical image, and using the inclination adjustment mechanism to adjust the angle between the carrying platform and the camera chip plane until the projection of the collection line of the line scan camera on the camera chip plane is parallel to the first calibration line figure, wherein the second calibration line figure includes ten short lines, the first part of the spacing is the first to fifth line segment spacing of the ten short lines, and the last part of the spacing is the fifth to tenth line segment spacing of the ten short lines; Step S5, using the line scan camera to collect a cylindrical image of the calibration cylinder, taking the projection of the collection line of the line scan camera on the camera chip plane as the direction, obtaining a calibration circle graphic corresponding to the calibration circle contained in the collected cylindrical image, and when the calibration circle graphic is displayed as an ellipse, adjusting at least one of the rotation speed of the rotation drive mechanism and the line frequency of the line scan camera according to the major axis and the minor axis of the ellipse and the multiple of the major axis and the minor axis, until the calibration circle graphic in the collected cylindrical image meets the roundness error requirement of the set accuracy.
2. The calibration method of the line scanning mechanism for cylindrical visual targets according to claim 1, characterized in that: The major axis is the intercept of the projection of the acquisition line of the line scan camera on the camera chip plane, passing through the center of the calibration circle figure and parallel to the line scan camera. The minor axis is an intercept passing through the center of the calibration circle figure and perpendicular to the major axis.
3. The calibration method of the line scanning mechanism for cylindrical visual targets according to claim 1, characterized in that: in, In the cylindrical image acquisition process in steps S1 to S5, a light source system is used to perform external fill light on the calibration column.
4. The calibration method of the line scanning mechanism for cylindrical visual targets according to claim 1, characterized in that: in, The adjustment process of step S2 is as follows: When the acquired cylindrical image does not display two first calibration line graphics corresponding to the first calibration line, the image height is doubled until two first calibration line graphics are acquired, and then the image height is set to twice the spacing between the two first calibration line graphics.
5. The calibration method of the line scanning mechanism for cylindrical visual targets according to claim 1, characterized in that: in, In the step S5, only the rotation speed of the rotation drive mechanism is adjusted, and the adjustment is: dividing the rotation speed of the rotation drive mechanism by the multiple.
6. The calibration method of the line scanning mechanism for cylindrical visual targets according to claim 1, characterized in that: in, In the step S5, only the line frequency of the line scan camera is adjusted, and the adjustment is: multiplying the line frequency of the line scan camera by the multiple.
Citation Information
Patent Citations
Cylindrical visual target acquisition equipment and calibration device of linear scanning mechanism thereof
CN216118852U