Method for calculating deflection angle between camera and carrier, calibration plate and detection device
By calculating the deflection angle between the camera and the stage, and utilizing the checkerboard pattern at both ends of the calibration plate and the stage movement, the problem of inaccurate angle measurement under small field-of-view cameras was solved, and high-precision angle measurement was achieved.
Patent Information
- Application Number
- CN202210920164.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-02
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2042-08-02
AI Technical Summary
Existing technologies cannot accurately calculate the angle between the camera and the stage. Especially in high-precision testing, large-size calibration boards on the market cannot be fully captured by a small-field-of-view camera, making angle measurement difficult.
By controlling the relative translation of the camera and the stage along the X-axis, images of both ends of the calibration plate are acquired. The deflection angle is calculated using the checkerboard pattern at both ends of the calibration plate. Combining the stage motion mode and the structural characteristics of the calibration plate, the deflection angle between the camera and the stage is measured.
Accurately measure the deflection angle between the camera and the stage using a small field-of-view camera. The measurement method is simple and highly accurate, making it suitable for high-precision detection.
Smart Images

Figure CN115661256B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of visual detection, in particular to a method for calculating a deflection angle between a camera and a carrier, a calibration board and a detection device. BACKGROUND
[0002] With the development of the electronic information industry, the fine requirements of the automation industry are getting higher and higher. For some high-precision project detection projects, a high-magnification lens + line scanning method is needed to detect the surface of an object. At this time, a large field of view camera cannot be used to calculate the included angle between the camera and the carrier.
[0003] In addition, the field of view for shooting products is very small in general high-precision detection, generally about 1.68mm*1.41mm. In order to accurately measure the included angle between the camera and the carrier (the carrier is generally greater than 400mm*400mm), a calibration board needs to be used for quantitative calculation. The length of a single checkerboard in a large-size calibration board on the market is more than 5mm. A rectangular block cannot be completely photographed in the field of view of the camera, and it is difficult to be used for testing the angle. SUMMARY
[0004] The purpose of the present application is to provide a method for calculating a deflection angle between a camera and a carrier, a calibration board and a detection device.
[0005] The present application provides a method for calculating a deflection angle between a camera and a carrier, comprising the steps of:
[0006] controlling the relative translational motion of the camera and the carrier along the X-axis to obtain images of a calibration board placed on the carrier at two ends thereof, to obtain a first calibration image and a second calibration image, wherein the first calibration image and the second calibration image respectively contain a plurality of mark symbols located at the two ends of the calibration board;
[0007] detecting and calculating the deflection angles of the first calibration image and the second calibration image relative to the X-axis based on the key points of the mark symbols in the first calibration image and the second calibration image, to obtain a first deflection angle θ1 and a second deflection angle θ2;
[0008] obtaining the deflection angle between the camera and the carrier by calculating the difference between the first deflection angle and the second deflection angle, to obtain a third deflection angle θ3.
[0009] As a further improvement of the present application, before the step of controlling the relative translational motion of the camera and the carrier along the X-axis, the method further comprises:
[0010] placing a checkerboard calibration board on the carrier, so that a first checkerboard pattern and a second checkerboard pattern located at the two ends of the calibration board correspond to the beginning and the end of the carrier along the X-axis.
[0011] As a further improvement of the present application, the control camera and the platform relative to the X-axis translation movement, respectively, get the calibration board placed on the platform relative to both ends of the image, get the first calibration image and the second calibration image, specifically including:
[0012] Control the platform in the camera lens field of view along the X-axis from the beginning of the platform to the end of the platform, control the camera to shoot respectively to get the first checkerboard pattern and the second checkerboard pattern of the calibration board placed on the platform, get the first calibration image and the second calibration image, the first calibration image and the second calibration image respectively include at least 10 checkerboard rectangular blocks.
[0013] As a further improvement of the present application, the first calibration image and the second calibration image based on the key points of the mark symbol in the first calibration image and the second calibration image, respectively, detect and calculate the deflection angle of the first calibration image and the second calibration image relative to the X-axis, get the first deflection angle θ1 and the second deflection angle θ2, specifically including:
[0014] The starting point of the platform movement is the origin, the X-axis is the X-axis, and the surface of the platform perpendicular to the direction of the X-axis is the Y-axis to establish the coordinate system;
[0015] In the first calibration image, the same row of the rectangular block array is detected and identified as a group of key points, and the coordinates of the same row of the rectangular block adjacent edge side of the relative two ends of the rectangular block array are calculated, respectively, to get the first key point (x1, y1) and the second key point (x2, y2);
[0016] The deflection angle between the first key point and the second key point is calculated, and the first deflection angle θ1 is obtained, and the calculation formula is:
[0017]
[0018] Repeat the above steps in the second calibration image to get the second deflection angle θ2.
[0019] As a further improvement of the present application, the first calibration image and the second calibration image based on the key points of the mark symbol in the first calibration image and the second calibration image, respectively, detect and calculate the deflection angle of the first calibration image and the second calibration image relative to the X-axis, get the first deflection angle θ1 and the second deflection angle θ2, further including:
[0020] In the first calibration image, the end points of the multiple horizontal line segments in the rectangular block array relative to both ends are detected and identified as multiple pairs of key points, and the deflection angle between each pair of key points is calculated to get multiple deflection angles, and the average value between multiple groups of deflection angles is calculated to get the first deflection angle θ1;
[0021] The above steps are repeated in the second calibration image to obtain the second deflection angle θ2.
[0022] The present application also provides a calibration plate, which has a rectangular surface, and first and second checkerboard patterns are formed at opposite ends of the calibration plate along the long direction of the calibration plate. The first and second checkerboard patterns are separated by a vacant area. The rectangular blocks that form the first and second checkerboard patterns have a side length of no more than 0.35 mm.
[0023] As a further improvement of the present application, the first and second checkerboard patterns each have an array of rectangular blocks with at least 10x10.
[0024] As a further improvement of the present application, the length of the vacant area is set such that the first and second checkerboard patterns are located at the two ends of the stage when the calibration plate is placed on the stage.
[0025] As a further improvement of the present application, the calibration plate is a rectangular ceramic plate or a rectangular glass plate.
[0026] The present application also provides a detection device, which includes:
[0027] a stage, a camera, a motion control module, and a deflection angle calculation module,
[0028] The motion control module is configured to control the camera and the stage to perform relative translation motion.
[0029] The camera is configured to acquire images of opposite ends of a calibration plate placed on the stage to obtain first and second calibration images, wherein the first and second calibration images each contain a plurality of marker symbols at the two ends of the calibration plate.
[0030] The deflection angle calculation module is configured to detect and calculate the deflection angles of the first and second calibration images relative to the X-axis based on the key points of the marker symbols in the first and second calibration images to obtain first and second deflection angles θ1 and θ2, and to calculate the deflection angle between the camera and the stage by taking the difference between the first and second deflection angles to obtain a third deflection angle θ3.
[0031] The beneficial effects of the present application are: the present application detects the deflection angles in two calibration images at both ends of the calibration plate respectively, and subtracts the two deflection angles to obtain the deflection angle between the camera and the carrier, the method used is based on the carrier motion mode and the structural characteristics of the calibration plate, and the deflection angle between the camera and the carrier can be accurately measured when the field of view of the camera is much smaller than the size of the carrier, the measurement method is simple, and the measurement precision is high. BRIEF DESCRIPTION OF DRAWINGS
[0032] Figure 1 is a schematic diagram of a detection device in an embodiment of the present application.
[0033] Figure 2 is a schematic diagram of a calibration plate in an embodiment of the present application.
[0034] Figure 3 is a schematic diagram of the calculation method flow of the deflection angle between the camera and the carrier in an embodiment of the present application.
[0035] Figure 4 is a first calibration image photographed in an embodiment of the present application.
[0036] Figure 5 is a second calibration image photographed in an embodiment of the present application.
[0037] Figure 6 is a schematic diagram of step S2 of the calculation method flow of the deflection angle between the camera and the carrier in an embodiment of the present application.
[0038] Figure 7 is a first key point and a second key point in a first calibration image in an embodiment of the present application.
[0039] Figure 8 is a third key point and a fourth key point in a second calibration image in an embodiment of the present application.
[0040] Figure 9 is a plurality of key point pairs in a first calibration image in an embodiment of the present application. DETAILED DESCRIPTION
[0041] In order to make the purposes, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described clearly and completely below in combination with specific embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0042] Embodiments of the present application are described below in detail, examples of which are shown in the drawings, wherein the same or similar reference signs represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary and are for the purpose of explanation only, and should not be understood as limiting the present application.
[0043] For the convenience of description, the terms representing spatial relative positions, such as "upper", "lower", "rear", "front", etc., are used herein to describe the relationship of one unit or feature relative to another unit or feature as shown in the drawings. The terms of spatial relative positions can include different positions of the device in use or operation other than the positions shown in the drawings. For example, if the device in the drawings is turned over, the unit described as being "below" or "above" the other unit or feature will be "below" or "above" the other unit or feature. Therefore, the exemplary term "below" can encompass both the lower and upper spatial positions.
[0044] The present embodiment provides a method for calculating the deflection angle between a camera and a platform, which is used to calculate the deflection angle between a high-precision small-view industrial CCD camera and a large-size workpiece platform. For the convenience of understanding, in the present embodiment, the method is described in combination with a specific detection device and a calibration plate.
[0045] Specifically, as shown in Figure 1 , the detection device comprises a camera 1 device and a platform 2, the lens 11 of the camera 1 device has a field of view of 1.68 mm x 1.41 mm, and the size of the platform 2 is greater than 400 mm x 400 mm. As shown in Figure 2 , the calibration plate 3 is a rectangular ceramic plate with a size of 391.5 x 47.25 mm, and along the long direction of the calibration plate 3, first chessboard 31 patterns and second chessboard 32 patterns are respectively formed on the surface at the opposite ends, a vacant area 33 is formed between the first chessboard 31 and the second chessboard 32, and 37 x 36 rectangular block arrays are respectively formed in the first chessboard 31 and the second chessboard 32, and the length of each rectangular block is 0.25 mm. When the calibration plate 3 is placed on the platform 2, the first chessboard 31 patterns and the second chessboard 32 patterns at the opposite ends of the calibration plate 3 are also respectively located at the opposite ends of the platform 2.
[0046] As shown in Figure 3 , the method for calculating the deflection angle between the camera 1 and the platform 2 comprises the following steps:
[0047] S1: Control the camera 1 and the platform 2 to move relatively along the X-axis, and respectively acquire images of the opposite ends of the calibration plate 3 placed on the platform 2, to obtain a first calibration image and a second calibration image, and the first calibration image and the second calibration image respectively contain a plurality of marker symbols located at the opposite ends of the calibration plate 3.
[0048] S2: detecting the deflection angle of the camera 1 and the carrier 2 relative to the X-axis direction based on the key points of the marker symbols in the first calibration image and the second calibration image, respectively, to obtain a first deflection angle θ1 and a second deflection angle θ2.
[0049] S3: calculating the deflection angle between the camera 1 and the carrier 2 by subtracting the first deflection angle and the second deflection angle to obtain a third deflection angle θ3.
[0050] In step S1, before controlling the relative translation movement of the camera 1 and the carrier 2 along the X-axis direction, it further includes:
[0051] Placing the calibration board 3 on the carrier 2 so that the first chessboard pattern 31 and the second chessboard pattern 32 located at both ends of the calibration board 3 correspond to the beginning and the end of the carrier 2 along the X-axis direction.
[0052] Placing the calibration board 3 corresponding to the size of the carrier 2 on the carrier 2 so that the chessboard patterns at both ends of the calibration board 2 can calibrate the two ends of the carrier 2, respectively.
[0053] In step S1, it specifically includes:
[0054] Controlling the carrier 2 to move along the X-axis from the beginning of the carrier 2 to the end of the carrier 2 within the field of view of the lens 11 of the camera 1, and controlling the camera 1 to capture the first chessboard pattern 31 and the second chessboard pattern 32 of the chessboard calibration board 3 placed on the carrier 2, respectively, to obtain a first calibration image and a second calibration image, which respectively include at least 20 chessboard rectangular blocks.
[0055] Specifically, in this embodiment, the carrier 2 is subjected to a complete travel movement, i.e., the calibration board 3 placed thereon is subjected to a complete travel movement within the field of view of the lens 11 of the camera 1 along the movement direction, and the first chessboard 31 located at the beginning thereof is captured to obtain a first calibration image, and the second chessboard 32 located at the end thereof is captured to obtain a second calibration image. Through detection and recognition of the images at both ends of the calibration board 3, the deflection angle between the camera 1 and the carrier 2 is further calculated.
[0056] It is ensured that the first calibration image and the second calibration image respectively include at least 20 chessboard rectangular blocks, i.e., it is ensured that the single-shot field of view of the camera 1 contains at least 20 chessboard rectangular blocks, so as to ensure that there are enough rectangular blocks in the calibration image for deflection angle determination, and to avoid the situation that the deflection angle detection error is large due to too few rectangular blocks.
[0057] Further, in step S1, it further includes:
[0058] The first calibration image and the second calibration image are binarized, thresholded and image dilated, so that black and white rectangular blocks are formed in the first calibration image and the second calibration image.
[0059] The calibration image is preprocessed to facilitate subsequent calibration image recognition detection. The specific preprocessing algorithm can refer to the existing algorithm, which will not be described here.
[0060] As shown in Figure 4 and Figure 5 , the first calibration image and the second calibration image are photographed based on the foregoing detection device and the calibration board 3 and are preprocessed. Specifically, the camera 1 with a shooting field of view of 1.68mmx1.41mm is controlled to photograph the checkerboard calibration board 3 with a rectangular block side length of 0.25mm to obtain the first calibration image and the second calibration image. The first calibration image and the second calibration image each include a 6x5 rectangular block array, i.e., 30 rectangular blocks.
[0061] In other embodiments of the present application, specific shooting parameters can also be adjusted according to different detection machines. For example, in some embodiments, the lens 11 field of view of the camera 1 can be adjusted and other size calibration boards 3 can be set to match the lens 11 field of view, as long as at least 20 rectangular blocks are included in the lens 11 field of view of the camera 1. In some embodiments, the camera 1 can also be controlled to move along the platform 2, and the first calibration image and the second calibration image can be photographed by the movement of the camera 1. In some embodiments, a calibration board 3 with a circular dot grid array formed on the surface can also be used for determination. In summary, as long as the camera 1 and the platform 2 can be relatively moved to respectively photograph the images at both ends of the calibration board 3 on the platform 2.
[0062] As shown in Figure 6 , in step S2, it specifically includes:
[0063] S21: Establishing a coordinate system with the platform 2 movement starting point as the origin, the X-axis direction as the X-axis, and the direction perpendicular to the X-axis direction on the platform 2 surface as the Y-axis.
[0064] S22: In the first calibration image, detecting and identifying the same-row corner points on the adjacent edge sides of the rectangular blocks at the opposite ends of the same row in the rectangular block array as a group of key points, and calculating the coordinates thereof to respectively obtain the first key point (x1, y1) and the second key point (x2, y2).
[0065] As shown in Figure 7 , in this embodiment, the first key point is D1, and the second key point is D2.
[0066] In the second calibration image, the same-row corner points on the adjacent edge sides of the rectangular blocks at opposite ends of the same row in the array of rectangular blocks are detected as a group of key points, and the coordinates thereof are calculated, to obtain a third key point (x3, y3) and a fourth key point (x4, y4) respectively.
[0067] As shown in the drawings, Figure 8 In the present embodiment, the third key point is D3, and the fourth key point is D4.
[0068] Specifically, taking the first calibration image as an example, the rectangular blocks in the image are detected, and the interference rectangular blocks at the edges of the image are removed by using constraints such as aspect ratio, perimeter or area, so as to ensure that the complete rectangular blocks in the image can be identified. The rectangular block at the top left corner in the array of rectangular blocks is detected and identified, and the corner point at the top left corner thereof is obtained as a first key point. The rectangular block at the top right corner in the array of rectangular blocks is detected and identified, and the corner point at the top right corner thereof is obtained as a second key point. The two corner points that are farthest apart in the same row are taken as key points, so as to ensure that the error of the detected deflection angle in one calibration image is minimum.
[0069] S23: The deflection angle between the first key point and the second key point is calculated, to obtain a first deflection angle θ1, and the calculation formula is as follows:
[0070]
[0071] The deflection angle between the third key point and the fourth key point is calculated, to obtain a second deflection angle θ2, and the calculation formula is as follows:
[0072]
[0073] Thus, the deflection angles of the start end and the end end of the calibration plate 3 relative to the camera 1, i.e. the deflection angles of the start end and the end end of the stage 2 relative to the camera 1, can be obtained respectively.
[0074] In other embodiments of the present application, other pairs of corner points can be selected as key point pairs, such as the pairs of corner points at the middle positions of the image, so as to improve the accuracy of the deflection angle detection.
[0075] In addition, when the calibration plate 3 with the grid array of circular dots is selected, the above steps can be adaptively adjusted.
[0076] Further, in some embodiments of the present application, the step S2 can further include:
[0077] In the first calibration image, the same-row corner points on the adjacent edge sides of the rectangular blocks at opposite ends of multiple rows in the array of rectangular blocks are detected as a group of key points, the deflection angles between each group of key points are calculated, to obtain multiple deflection angles, and the average value of the multiple groups of deflection angles is obtained, to obtain a first deflection angle θ1.
[0078] Repeat the above steps in the second calibration image to obtain the second deflection angle θ2.
[0079] Specifically, such as Figure 9 As shown, taking the first calibration image as an example, the rectangular block located in the upper left corner of the rectangular block array is detected and identified, and its upper left corner point is obtained as the first keypoint; the rectangular block located in the upper right corner of the rectangular block array is detected and identified, and its upper right corner point is obtained as the second keypoint, forming the first keypoint pair Da. The detected target is moved down one row, and two opposite corner points are obtained as the second keypoint pair Db. The above steps are repeated until all 6 keypoint pairs Da, Db, Dc, Dd, De, and Df are obtained. The average deflection angle of all keypoint pairs is calculated to further reduce measurement error.
[0080] Furthermore, in some embodiments of the present invention, some key point pairs may be selected, such as obtaining a group of key point pairs every other row, to reduce the amount of calculation and improve the calculation speed. Alternatively, a weighted average of the deflection angles of all key point pairs can be calculated based on the location of each group of key point pairs; for example, key point pairs closer to the center region of calibration plate 3 have higher calculation weights.
[0081] In step S3, the difference between the first deflection angle and the second deflection angle is calculated to obtain the overall deflection angle between the camera 1 and the calibration plate 3, that is, the deflection angle between the camera 1 and the stage 2.
[0082] In summary, this invention captures different calibration images at both ends of the calibration plate, detects the deflection angle in each of the two calibration images, and subtracts the two images to obtain the final deflection angle between camera 1 and stage 2. The method used is based on the motion mode of stage 2 and the structural characteristics of calibration plate 3, offering both simplicity and high accuracy.
[0083] like Figure 2As shown, the present embodiment also provides a calibration plate 3, which has a rectangular surface, and along the long side direction of the calibration plate 3, first chessboard 31 and second chessboard 32 patterns are respectively formed at the opposite ends of the surface, and a vacant area 33 is formed between the first chessboard 31 and the second chessboard 32, and the side length of the rectangular blocks constituting the first chessboard 31 and the second chessboard 32 is not greater than 0.35 mm, and the small-size chessboard rectangular blocks are formed by electron beam lithography. The first chessboard 31 and the second chessboard 32 are not lithographically maintained vacant to form the vacant area 33, and the length of the vacant area 33 is set such that when the calibration plate 3 is placed on the stage 2, the first chessboard pattern 31 and the second chessboard pattern 32 are respectively located at the two ends of the stage 2, and by flexibly adjusting the length of the vacant area 33, the size matching between the calibration plate 3 and the stage 2 can be realized, and the setting of the vacant area 33 can reduce the manufacturing cost and process difficulty of the calibration plate 3, and avoid the interference of the pattern of the vacant area 33 on the first chessboard 31 pattern and the second chessboard 32 pattern.
[0084] The first chessboard 31 and the second chessboard 32 respectively form at least a 10x10 rectangular block array.
[0085] Specifically, in the present embodiment, the calibration plate 3 is a 391.5x47.25 mm rectangular ceramic plate. The first chessboard 31 and the second chessboard 32 respectively form a 37x36 rectangular block array, and the side length of each rectangular block is 0.25 mm, i.e. there are 1332 rectangular blocks in the first chessboard 31 and the second chessboard 32 respectively.
[0086] When the field of view of the camera 1 is 1.68 mm x 1.41 mm, the field of view of the camera 1 lens 11 will cover 5x6 rectangular blocks in a single shot.
[0087] In other embodiments of the present application, the size of the calibration plate 3 can also be adjusted according to the actual stage 2 and camera field of view size and other parameters, and the material of the calibration plate 3 can also be selected from glass and other materials, and the present application does not make specific limitations.
[0088] The present embodiment also provides a detection device, which comprises a stage 2, a camera 1, a motion control module, and a deflection angle calculation module.
[0089] Specifically, in the present embodiment, the field of view of the camera 1 is 1.68 mm x 1.41 mm, and the surface size of the stage 2 is greater than 400 mm x 400 mm.
[0090] The motion control module is configured to control the relative translational motion of the camera 1 and the stage 2. Specifically, in the present embodiment, the camera 1 is fixed, and the stage 2 can move in the XY axis in the plane in the transverse and longitudinal directions.
[0091] The camera 1 is configured to acquire images of the two ends of the calibration plate 3 placed on the stage 2 respectively, to obtain a first calibration image and a second calibration image, and the first calibration image and the second calibration image respectively contain a plurality of mark symbols located at the two ends of the calibration plate 3.
[0092] The deflection angle calculation module is configured to detect the deflection angles of the first calibration image and the second calibration image relative to the X-axis direction based on the key points of the mark symbols in the first calibration image and the second calibration image respectively, to obtain a first deflection angle θ1 and a second deflection angle θ2; and calculate the deflection angle between the camera 1 and the stage 2 by subtracting the first deflection angle and the second deflection angle, to obtain a third deflection angle θ3.
[0093] It should be understood that although the present specification is described in terms of embodiments, not every embodiment contains only one independent technical solution, and the description of the specification is only for the sake of clarity, and those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be combined appropriately to form other embodiments that those skilled in the art can understand.
[0094] The series of detailed descriptions listed above are only specific descriptions of the feasible embodiments of the present application, and are not intended to limit the protection scope of the present application, and any equivalent embodiments or changes made without departing from the spirit of the present application should be included in the protection scope of the present application.
Claims
1. A method for calculating the deflection angle between a camera and a stage, characterized in that, The method comprises the steps of: controlling the relative translational movement of the camera and the carrier along the X-axis to obtain images of the calibration board at the two ends of the carrier, respectively, to obtain a first calibration image and a second calibration image, wherein the first calibration image and the second calibration image respectively contain a plurality of mark symbols at the two ends of the calibration board; based on the key points of the mark symbols in the first calibration image and the second calibration image, respectively, the deflection angle of the first calibration image and the second calibration image relative to the X-axis is detected and calculated to obtain a first deflection angle and a second deflection angle; the difference between the first deflection angle and the second deflection angle is calculated to obtain the deflection angle between the camera and the carrier, and a third deflection angle is obtained; wherein the control of the relative translational movement of the camera and the carrier along the X-axis to obtain images of the calibration board at the two ends of the carrier, respectively, to obtain a first calibration image and a second calibration image, specifically comprises: controlling the carrier to move along the X-axis within the field of view of the camera lens from the beginning of the carrier to the end of the carrier, and controlling the camera to capture the first and second chessboard patterns of the calibration board on the carrier, respectively, to obtain a first calibration image and a second calibration image.
2. The method of claim 1, wherein the deflection angle is calculated by: Before the control of the relative translational movement of the camera and the carrier along the X-axis, it further comprises: placing the chessboard calibration board on the carrier so that the first and second chessboard patterns at the two ends of the calibration board correspond to the beginning and end of the carrier along the X-axis.
3. The method of claim 1, wherein the deflection angle is calculated by: The first calibration image and the second calibration image respectively include at least 10 chessboard rectangular blocks.
4. The method of claim 1, wherein the deflection angle is calculated by: The detection and calculation of the deflection angle of the first calibration image and the second calibration image relative to the X-axis based on the key points of the mark symbols in the first calibration image and the second calibration image, respectively, to obtain a first deflection angle and a second deflection angle, specifically comprises: establishing a coordinate system with the starting point of the carrier movement as the origin, the X-axis as the X-axis, and the direction perpendicular to the X-axis as the Y-axis; in the first calibration image, detecting and identifying the same row of corner points on the adjacent edges of the rectangular blocks at the two ends of the same row in the rectangular block array as a group of key points, and calculating their coordinates to obtain a first key point and a second key point, respectively; calculating the deflection angle between the first key point and the second key point to obtain a first deflection angle, and the calculation formula is: wherein, θ 1 is the first deflection angle, x 1 ,y 1) is the first key point coordinate, x 2 ,y 2) is the second key point coordinate; repeating the above steps in the second calibration image to obtain the second deflection angle.
5. The method of claim 1, wherein the deflection angle is calculated by: ###0001### where θ is the deflection angle, φ is the angle of the camera, and θ is the angle of the stage. The detection and calculation of the deflection angle of the first calibration image and the second calibration image relative to the X-axis based on the key points of the mark symbols in the first calibration image and the second calibration image, respectively, to obtain a first deflection angle and a second deflection angle, further comprises: in the first calibration image, detecting and identifying the end points of a plurality of horizontal line segments at the two ends of the rectangular block array as a plurality of pairs of key points, calculating the deflection angle between each pair of key points to obtain a plurality of deflection angles, and obtaining the average value between a plurality of groups of deflection angles to obtain the first deflection angle; repeating the above steps in the second calibration image to obtain the second deflection angle.
6. The method of claim 1, wherein: The method comprises the following steps: The first calibration image and the second calibration image are binarized, thresholded and image dilated, so that black and white rectangular blocks are formed in the first calibration image and the second calibration image.
7. The method of claim 1, wherein, The calibration plate is rectangular, and first and second chessboard patterns are formed at opposite ends of the calibration plate along the long direction of the calibration plate.
8. The method of claim 7, wherein the deflection angle is calculated by: ###0001### where θ is the deflection angle, φ is the angle of the camera, and θ is the angle of the stage. The first and second chessboard patterns each comprise an array of at least 10x10 rectangular blocks. 9. The method of claim 7, wherein the deflection angle is calculated by: ###0001### where θ is the deflection angle, φ is the angle of the camera, and θ is the angle of the stage. The calibration plate is a rectangular ceramic plate or a rectangular glass plate. 10. A detection device, characterized in that The method comprises the following steps: A stage, a camera, a motion control module and a deflection angle calculation module, The motion control module is configured to control the camera and the stage to move relative to each other along the X axis. The camera is configured to acquire images of opposite ends of a calibration plate placed on the stage, to obtain a first calibration image and a second calibration image. The deflection angle calculation module is configured to detect and calculate the deflection angles of the first calibration image and the second calibration image relative to the X axis based on the key points of the mark symbols in the first calibration image and the second calibration image, to obtain a first deflection angle and a second deflection angle, and to calculate the deflection angle between the camera and the stage by taking the difference between the first deflection angle and the second deflection angle, to obtain a third deflection angle. The motion control module is further configured to control the stage to move along the X axis from the beginning of the stage to the end of the stage within the field of view of the camera lens, and the camera is further configured to acquire the first and second chessboard patterns of the calibration plate placed on the stage, to obtain the first calibration image and the second calibration image.
Citation Information
Patent Citations
Camera horizontal plane inclination angle measuring method and device
CN112697112A
Gate crack detection method based on double-checkerboard calibration
CN113393538A