A structural light locating method and device based on DIC double-circle cross ratio
Through the structured cursor calibration method based on DIC double circle intersecting ratio, the double circle feature pattern and subpixel edge extraction technology are used, combined with the intersection characteristics and Zhang Zhengyou algorithm, the image blur problem caused by the defocus effect is solved, and the structured cursor calibration and Depth-aware precision simplifies calculations and reduces costs.
Patent Information
- Application Number
- CN202211309854.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-25
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-10-25
AI Technical Summary
Image blur caused by the defocus effect makes the coordinates of feature patterns in structured light perception inaccurate, affecting calibration accuracy and depth perception accuracy.
Using the structured cursor calibration method based on DIC double circle intersecting ratio, the double circle feature pattern calibration plate, sub-pixel edge extraction and intersecting characteristic positioning algorithm, combined with the Zhang Zhengyou binocular camera calibration algorithm, the internal and external parameters of the camera are calculated, and DIC is used. Correction and linear constraints optimize the center positioning to improve calibration accuracy.
It effectively solves the image blur problem caused by the defocus effect, improves the structured cursor calibration accuracy and depth perception accuracy, simplifies the calculation complexity, reduces costs, and improves efficiency.
Smart Images

Figure CN115841517B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of structured light depth perception calibration, and in particular relates to a structured light calibration method and device based on DIC double circle intersection ratio. Background Art
[0002] In structured light depth calculation, depth information is calculated using calibration parameters and triangulation principles, so calibration parameters directly affect the accuracy of perception. The calibration accuracy of structured light perception is the main factor restricting the accuracy of structured light perception. The camera will produce radial distortion, tangential distortion, gamma distortion and defocus effects during image acquisition. Usually, lens or device distortion can reduce errors by optimizing the model, but the defocus effect is the main factor restricting the calibration accuracy of structured light perception. During the calibration process, the extraction of collected checkerboard corner points and the center fitting of the dots are based on the grayscale distribution of the neighborhood of the feature pattern. Due to the image blur caused by the defocus effect, the fitted feature pattern coordinates are not the true projection of the feature pattern in the calibration plate in the captured image.
[0003] The modeling scheme of the acquisition device composed of the camera and lens in structured light perception has a great influence on the calibration accuracy. The calibration accuracy is related to the accuracy of depth perception. The mapping from the matching parallax of the pixel point to the depth is a proportional relationship. This mapping process is based on the calibration parameters. The accuracy of the calibration parameters directly affects the accuracy of depth perception. Therefore, the camera model is crucial for calibration. By improving the edge recognition accuracy and optimizing the circle center positioning algorithm, the calibration accuracy and perception accuracy of structured light perception can be improved. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] The technical problem to be solved by the present invention is how to provide a structured light calibration method and device based on the DIC two-circle intersection ratio to solve the problem that the image blur caused by the defocus effect results in the fitted feature pattern coordinates being not the true projection of the feature pattern in the calibration plate in the acquired image.
[0006] (II) Technical solution
[0007] In order to solve the above technical problems, the present invention proposes a structural light locating method based on DIC two-circle intersection ratio, which comprises the following steps:
[0008] S1, place the double-circle feature pattern calibration plate in the common field of view of the two cameras, use the projector P to project horizontal sinusoidal stripes and vertical sinusoidal stripes onto the double-circle feature pattern calibration plate, and the camera collects the stripe projection image; use two cameras C l and C r The double-circle feature pattern calibration plate is collected simultaneously to obtain image I l and Ir , based on sub-pixel edge extraction and cross-ratio characteristics, the center of the double circle is located; Zhang Zhengyou binocular camera calibration algorithm is used to calculate the internal and external parameters of the camera;
[0009] S2. According to the camera parameter calibration result of step S1, image I l and I r Perform DIC correction to transform the distorted elliptical image into a relatively normal standard circular image;
[0010] S3, converting the world coordinate system of the left camera and the right camera to obtain the external parameters of the structured light stereo vision system;
[0011] S4. Calculate the calibration results multiple times, optimize the external parameters of the structured light stereo vision, and take the average value as the final calibration result.
[0012] Furthermore, in the step S1, sub-pixel edge extraction is performed based on Zernike moments.
[0013] Furthermore, in step S1, the specific steps based on sub-pixel edge extraction are as follows:
[0014] S101, preprocessing the original image collected by the camera: first grayscale and Gaussian filter the image, and then use the maximum inter-class variance method to find a suitable threshold to perform binary segmentation on the image;
[0015] S102, ROI (Region of Interest) segmentation: using the Canny algorithm to extract the edge information of the marker points in the obtained binary image, and obtain the pixel-level marker point edge position; finally, based on the marker point edge information, extract the region of interest (ROI) from the image; the region of interest is set to include the entire marker point edge and the extended boundary, and the scale of the extended boundary is proportional to the marker point edge scale;
[0016] S103, edge positioning of the marker point at the sub-pixel level: using the Zernike moment integral operator, the gradient of the grayscale value of the pixel-level edge of all the marker points in the ROI obtained in S102 is calculated to perform edge positioning of the marker point at the sub-pixel level;
[0017] S104, based on the obtained sub-pixel level edge of the marker point, use the least square method to perform ellipse fitting, and then obtain the equation of the fitted ellipse, and preliminarily obtain the coordinates of the center of the ellipse.
[0018] Furthermore, in step S103, the sub-pixel edge point expression of the characteristic pattern is:
[0019]
[0020] In the above formula (x i ,y i ) is the sub-pixel coordinate value of the edge of the double circle feature pattern; (x, y) is the pixel-level coordinate value of the edge of the double circle feature pattern; l is the effective distance from the center of the circle to the edge; Represents the angle between the perpendicular line of the edge and the coordinate axis; N is the size of the template.
[0021] Furthermore, the template is 7×7.
[0022] Furthermore, in step S1, locating the centers of the two circles based on the cross ratio characteristic includes the following steps:
[0023] For the standard double circle, a line intersects at points A and A′ of the outer circle and points B and B′ of the inner circle, and the midpoint P on the line segment of AA′ and BB′; for the distorted double circle, under the camera field of view, the double circle is a pair of conic sections after projection transformation;
[0024] The projection of the intersection point is as follows:
[0025] {A,B;A′,B′}={a,b;a′,b′}
[0026] Where a, a′, b and b′ are the images of the measurable intersection points A, A′, B and B′ in the image in the mapping space respectively;
[0027] After iteration at any point P on the plane, assuming that after i iterations, the midpoint P is obtained i The formula is as follows:
[0028] |OP1|>|OP2|>…>|OP i |
[0029] Among them, compared with OP i-1 , OP i Closer to the center O, thus obtaining the double circle center positioning.
[0030] Furthermore, in step S1, when calculating the internal parameters and external parameters of the camera, distortion parameters are also obtained.
[0031] Furthermore, in step S2, the DIC correction includes: inversely mapping the acquired image to a standard posture according to internal parameters, distortion parameters and external parameters, obtaining an orthographic calibration pattern, and extracting the center coordinates of the circle using the orthographic calibration pattern.
[0032] Furthermore, based on the obtained center of the calibration plate pattern, the center data is optimized by linear constraints using the linear distribution characteristics of the center coordinates.
[0033] The present invention also provides a structural light calibration device based on DIC double circle cross ratio, the device comprising: a double circle characteristic pattern calibration plate, an image acquisition module, an image projection module and an image processing module;
[0034] The image acquisition module is used to obtain a target image of a calibration plate containing a double-circle feature pattern;
[0035] The image projection module is used for projecting the coding pattern;
[0036] The image processing module is used to execute the calibration method.
[0037] (III) Beneficial effects
[0038] The present invention proposes a structured light calibration method and device based on the DIC double circle intersection ratio. Compared with the prior art, the embodiments of the present invention have the following beneficial effects: through a structured light calibration method and device based on the DIC (DIC, Digital Image Correlation) double circle intersection ratio, it is possible to design a feature pattern positioning optimization solution for the problem of the influence of lens defocus and camera imaging model on calibration accuracy, with low cost, more comprehensive functions and higher efficiency. In the center fitting, due to the problem of camera viewing angle, the collected feature pattern is not a regular ellipse, so the center of the fitted ellipse is not the actual center of the circle. Using a double circle feature pattern as a calibration plate pattern for the calibration method, this pattern is geometrically richer than a dot feature pattern. Based on the extraction of the center of the double circle, the calculation complexity is greatly simplified. Based on the study of the sub-pixel extraction method of the characteristic pattern of the intersection ratio of two circles in the defocused state, an optimization algorithm for sub-pixel edge extraction based on Zernike moments is proposed; in order to further improve the positioning accuracy of the center of the two circles, a double circle center positioning algorithm based on the intersection ratio characteristic is proposed; the DIC digital image correlation algorithm is used to obtain the calibration pattern under the positive viewing angle, and then the linear constraint of the center data is used to obtain the precise position of the center. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flow chart of a method and device for locating a structural light based on a DIC double-circle intersection ratio according to the present invention;
[0040] Figure 2 Schematic diagram of the sub-pixel edge extraction optimization algorithm of Zernike moments;
[0041] Figure 3 Schematic diagram of the correction of the collected image based on DIC image transformation, (a) is the collected image, (b) is the image after DIC correction;
[0042] Figure 4 Schematic diagram of the center extraction of the distorted double circle, (a) is the standard double circle, and (b) is the distorted double circle. DETAILED DESCRIPTION
[0043] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.
[0044] The present invention relates to a structured light calibration method and device based on the DIC (Digital Image Correlation) double circle intersection ratio, which can design a feature pattern positioning optimization solution for the problem of the influence of lens defocus and camera imaging model on calibration accuracy, with low cost, more comprehensive functions and higher efficiency. In the center fitting, due to the problem of camera viewing angle, the collected feature pattern is not a regular ellipse, so the center of the fitted ellipse is not the actual center. The double circle feature pattern is used as the calibration plate pattern of the calibration method, and this pattern is geometrically richer than the dot feature pattern. Based on the extraction of the center of the double circle, the calculation complexity is greatly simplified. Based on the research on the sub-pixel extraction method of the feature pattern of the defocused double circle intersection ratio, a sub-pixel edge extraction optimization algorithm based on the Zernike moment is proposed; in order to further improve the positioning accuracy of the double circle center, a double circle center positioning algorithm based on the intersection characteristic is proposed; the DIC digital image correlation algorithm is used to obtain the calibration pattern under the positive viewing angle, and then the linear constraint of the center data is used to obtain the precise position of the center.
[0045] In view of this, an embodiment of the present invention provides a structured light calibration method and device based on the DIC (Digital Image Correlation) double-circle intersection ratio, which can design a feature pattern positioning optimization solution to address the problem of lens defocus and camera imaging model affecting calibration accuracy. The solution has low cost, more comprehensive functions and higher efficiency.
[0046] The embodiments of this specification provide the following technical solutions:
[0047] According to a first aspect of an embodiment of the present invention, a structured light depth perception calibration method is provided, comprising: acquiring a target image containing a calibration plate with a double-circle feature pattern through an image acquisition module, and performing calculations using an image processing module, wherein feature pattern extraction comprises: a sub-pixel edge extraction optimization algorithm based on Zernike moments, and using grayscale gradients to calculate the optimal edge for the image blur problem caused by defocus; an algorithm for extracting the center of a circle based on ellipse fitting, and proposing a high-precision and high-efficiency sub-pixel edge detection algorithm; obtaining the precise center of the acquired pattern and preliminary calibration parameters of the system based on the cross-ratio invariance constraint of the double circles; and obtaining a calibration pattern under a positive viewing angle using a DIC digital image correlation algorithm, and obtaining the precise position of the center of the circle using the linear constraint of the center of the circle data, thereby calculating precise system parameters.
[0048] According to a second aspect of an embodiment of the present invention, a structured light depth perception calibration device is provided, comprising: a double-circle feature pattern calibration plate, an image acquisition module, an image projection module and an image processing module, which is configured to obtain a target image containing a double-circle feature pattern calibration plate through the image acquisition module provided by the calibration device, and project a coded pattern using the image projection module, wherein a double-circle pattern is used as a calibration plate for the calibration method, and this pattern is geometrically richer than dot features. Double circles can provide more information than a single circle, so the calibration result will be better. In the center positioning of the double circle, the cross-ratio characteristics of the center position and the edge are mainly considered. In the collected calibration plate pattern, the center coordinates cannot be directly fitted based on edge fitting due to lens distortion. In contrast, due to the cross-ratio feature constraint of the double circle, the cross-ratio invariance is achieved in the distorted image, and the accurate center coordinates can be obtained based on the cross-ratio feature.
[0049] Embodiment 1:
[0050] In order to deepen the understanding of the present invention, the present invention will be further described in detail below with reference to the embodiments.
[0051] In structured light depth calculation, depth information is calculated using calibration parameters and triangulation principles, so calibration parameters directly affect the accuracy of perception. On the one hand, two sets of structured light depth perception results can be used for registration to obtain a fused point cloud under dual perspectives. This perception method uses the parameters of monocular structured light, that is, the internal and external parameters of the camera and projector. On the other hand, the structured light code values can be solved separately to achieve binocular registration, and the depth information can be directly solved in the binocular field of view. This method is independent of the internal and external parameters of the projector, but only related to its defocus parameters. In order to improve the stability of structured light depth perception, this paper adopts a depth perception method that uses stereo vision to solve the structured light code values separately, that is, stereo vision decodes separately to obtain the registration relationship between the two eyes, and uses the parameters of stereo vision to calculate the depth information. It can be seen that the depth perception accuracy of structured light stereo vision is related to the calibration accuracy of stereo vision.
[0052] In the calibration of the stereo vision system, the characteristic point information of the calibration plate under different viewing angles is collected, and then the internal and external parameters of the camera are calculated using Zhang Zhengyou's calibration method. Common characteristic patterns of calibration plates are dot calibration plates and checkerboard calibration plates, where the characteristic pattern of the dot calibration plate is dots, and the characteristic pattern of the checkerboard calibration plate is corner points. Usually, the characteristic pattern will produce a defocus effect in the camera's field of view, that is, the characteristic pattern appears in a defocused state, the clarity will be affected, and errors will occur in the positioning of the characteristic pattern. The corner point extraction method obtains the corner point information based on the fitted line information, and the lines in the checkerboard are based on threshold segmentation. In the defocused state, the line pattern appears jagged in two adjacent checkerboards. In contrast, the feature extraction method for circular feature patterns is ellipse fitting, and the coordinates of the center of the circle are calculated by extracting the edge of the defocused ellipse, and the error of the edge has little effect on the center fitting.
[0053] In the circle center fitting, due to the camera perspective, the collected feature pattern is not a regular ellipse, so the center of the fitted ellipse is not the actual center of the circle. This paper uses a double circle feature pattern as the calibration plate pattern for the calibration method in this paper. This pattern is geometrically richer than the dot feature pattern. The center extraction based on the double circle greatly simplifies the computational complexity.
[0054] The present invention aims at the image blur problem caused by defocusing, and proposes a sub-pixel edge extraction optimization algorithm of Zernike moment, which improves the accuracy and efficiency of sub-pixel edge detection. Since the center of the circle obtained by the traditional algorithm is easily affected by the ellipse extraction accuracy and camera distortion, the center projection of the spatial circle feature pattern does not coincide with the boundary projection and the center of the fitted ellipse. To solve this problem, the present invention obtains the precise center of the collected pattern and the preliminary calibration parameters of the system based on the cross ratio invariance constraint of the double circles. Then, the DIC digital image correlation algorithm is used to obtain the calibration pattern under the positive viewing angle, and the precise position of the center of the circle is obtained based on the linear constraint of the center of the circle data, thereby calculating the precise system parameters.
[0055] The structured light stereo vision perception system proposed in the present invention consists of two cameras and a projector. Therefore, parameter calibration requires calibrating the projector and the two cameras separately. The main steps are camera calibration, projector calibration and system calibration. The specific calibration steps are as follows:
[0056] S1, place the double-circle feature pattern calibration plate in the common field of view of the two cameras, use the projector P to project horizontal sinusoidal stripes and vertical sinusoidal stripes onto the double-circle feature pattern calibration plate, and the camera collects the stripe projection image; use two cameras C1 and C r The double-circle feature pattern calibration plate is collected simultaneously to obtain images I1 and I r, based on sub-pixel edge extraction and cross-ratio characteristics, the center of the double circle is located; using Zhang Zhengyou's binocular camera calibration algorithm, the internal and external parameters of the camera are calculated.
[0057] S2. According to the camera parameter calibration result of step S1, image I l and I r DIC correction is performed to transform the distorted elliptical image into a relatively normal circular image.
[0058] S3, converting the world coordinate system of the left camera and the right camera to obtain the external parameters of the structured light stereo vision system;
[0059] S4. Calculate the calibration results multiple times, optimize the external parameters of the structured light stereo vision, and take the average value as the final calibration result.
[0060] In step S1, sub-pixel edge extraction based on Zernike moments is used, and the steps are as follows:
[0061] S101, preprocessing the original image captured by the camera. The purpose of preprocessing is to separate the circle from the background. The image is first grayed and Gaussian filtered, and then the maximum inter-class variance method is used to find a suitable threshold to perform binary segmentation on the image.
[0062] S102, Region of Interest (ROI) segmentation. The Canny algorithm is used to extract the edge information of the marker points in the binary image to obtain the pixel-level marker point edge position; finally, based on the marker point edge information, the region of interest (ROI) is extracted from the image to reduce the amount of calculation and improve the reliability of the algorithm. The region of interest is set to include the entire marker point edge and the extended boundary, and the scale of the extended boundary is proportional to the marker point edge scale;
[0063] S103: Sub-pixel edge location of the marker point: The gradient of the grayscale value of the pixel-level edge of all the marker points in the ROI obtained in S102 is calculated using the Zernike moment integral operator to locate the sub-pixel edge of the marker point.
[0064] S104, based on the obtained sub-pixel level edge of the marker point, use the least square method to perform ellipse fitting, and then obtain the equation of the fitted ellipse, and preliminarily obtain the coordinates of the center of the ellipse.
[0065] The present invention uses Zernike moments to traverse each pixel of the double-circle feature pattern and calculate its edge parameters, thereby obtaining the sub-pixel edge point expression of the feature pattern as follows:
[0066]
[0067] In the above formula (x i ,y i ) is the sub-pixel coordinate value of the edge of the double circle feature pattern; (x, y) is the pixel-level coordinate value of the edge of the double circle feature pattern. l is the effective distance from the center of the circle to the edge; It represents the angle between the perpendicular line of the edge and the coordinate axis; N is the size of the template. Taking into account the edge extraction accuracy and calculation time, the template designed by the present invention is 7×7.
[0068] The steps for locating the centers of the two circles based on the intersection characteristics in step S1 are as follows:
[0069] The cross ratio feature is a basic feature in distorted images. In a single circle, the cross ratio feature cannot be used to effectively solve the circle center data because the proportional relationship cannot be accurately analyzed. In contrast, in a double circle image, the cross ratio feature of the radius can be used to obtain the precise location of the circle center.
[0070] like Figure 4 As shown in the figure, (a) shows a standard double circle, a line intersects at points A and A' of the outer circle and points B and B' of the inner circle. The midpoint P on the line segment of AA' and BB'; (b) shows a distorted double circle. In the camera field of view, the double circle is a pair of conic sections after projection transformation.
[0071] The following conclusions can be drawn about the projection of the intersection point, as shown in the following formula:
[0072] {A,B;A′,B′}={a,b;a′,b′}
[0073] where a, a′, b and b′ are the images of the measurable intersection points A, A′, B and B′ in the image in the mapping space, respectively.
[0074] The above method of calculating the midpoint using a pair of conic sections can be iterated at any point P on the plane. Assuming that after i iterations, the midpoint P is obtained i The formula is as follows:
[0075] |OP1|>|OP2|>…>|OP i |
[0076] Among them, compared with OP i-1 , OP i Closer to the center O.
[0077] The steps of performing DIC correction on the image based on the acquired parameters in step S2 are as follows:
[0078] After obtaining a set of circle center data, the present invention can complete the calibration and calculate the internal parameters and external parameters. In addition, when calculating the internal and external parameters of the camera, the distortion parameters are automatically solved together. Then, the image can be DIC corrected based on the obtained parameters, so that the distorted elliptical image is transformed into a relatively normal standard circular image. Figure 3 As shown, based on the acquired parameters, DIC correction is performed on Figure (a), that is, the acquired image is inversely mapped to the standard posture according to the internal parameters, distortion parameters and external parameters to obtain the front view calibration pattern, as shown in Figure (b).
[0079] Based on the acquired parameters, image I l and I r DIC correction is to collect images based on internal parameters, distortion parameters and external parameters, inversely map the images to standard poses, obtain the calibration pattern of the front view, and then use the calibration pattern of the front view to extract the coordinates of the center of the circle. In the calibration plate pattern, the characteristic pattern is a linear topological distribution. The center of a single characteristic pattern can be extracted based on sub-pixel edge extraction and cross-ratio invariant center extraction. However, the error in the center extraction process needs to be based on global linear optimization. In the global center distribution, the line connecting the center points should be linearly distributed. Therefore, based on the obtained calibration plate pattern center, the linear distribution characteristics of the center coordinates can be used to linearly constrain and optimize the center data.
[0080] Embodiment 2:
[0081] Since it is impossible to effectively obtain the actual center of the circle in the actual captured image to verify the accuracy of edge extraction and center fitting. Therefore, it is necessary to build a simulation model for the calibration of structured light equipment. The model is based on the pinhole imaging model and the distortion model. In the simulation environment, the system model parameters are consistent with the parameters of the preliminary calibration. To this end, we first designed a double-circle standard circle with an inner circle diameter of 0.7 cm and an outer circle diameter of 1 cm. Then use the rotation and translation matrix to map the standard circle to the camera coordinate system, map the standard circle to the image coordinate system based on the internal parameters, and then use radial distortion, tangential distortion and Gaussian blur to obtain the simulated standard circle. Calculate the nearest Euclidean distance to the true value in the acquired edge image, and then solve the average deviation, as shown in the following formula:
[0082]
[0083] in c p x is the calculated edge point x-coordinate, t p x is the actual x-coordinate of the edge point. c p y is the calculated edge point y-coordinate, t p yis the actual y-coordinate of the edge point.
[0084] Based on the edge extraction error calculation results obtained by the above three methods, the average edge extraction error proposed by the present invention is 1.723.
[0085] Embodiment 3:
[0086] Figure 4 It is the DIC experimental result. The number of iterations for calculating the optimized calibration parameters is related to the reprojection error. However, after the number of iterations reaches 5, the parameter optimization effect decreases. The linear constraint reprojection error of the DIC transformation in this embodiment is the smallest and can be kept below 0.05. By changing the position and posture of the calibration plate, multiple sets of corresponding point sets can be obtained, and then the internal and external parameters of stereoscopic vision can be calibrated. The experimental results are shown in the following table.
[0087]
[0088] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: through a structured light calibration method and device based on the DIC (DIC, Digital Image Correlation) double circle intersection ratio, it is possible to design a feature pattern positioning optimization solution for the problem of the influence of lens defocus and camera imaging model on calibration accuracy, with low cost, more comprehensive functions and higher efficiency. In the center fitting, due to the problem of camera viewing angle, the collected feature pattern is not a regular ellipse, so the center of the fitted ellipse is not the actual center of the circle. The double circle feature pattern is used as the calibration plate pattern of the calibration method, and this pattern is geometrically richer than the dot feature pattern. Based on the extraction of the center of the double circle, the calculation complexity is greatly simplified. Based on the study of the feature pattern sub-pixel extraction method of the defocused double circle intersection ratio, a sub-pixel edge extraction optimization algorithm based on the Zernike moment is proposed; in order to further improve the positioning accuracy of the double circle center, a double circle center positioning algorithm based on the intersection characteristic is proposed; the DIC digital image correlation algorithm is used to obtain the calibration pattern under the positive viewing angle, and then the linear constraint of the center data is used to obtain the precise position of the center.
[0089] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A structural light locating method based on DIC two-circle intersection ratio, characterized in that: The method comprises the following steps: S1, place the double-circle feature pattern calibration plate in the common field of view of the two cameras, use the projector P to project horizontal sinusoidal stripes and vertical sinusoidal stripes onto the double-circle feature pattern calibration plate, and the camera collects the stripe projection image; use two cameras C l and C r The double-circle feature pattern calibration plate is collected simultaneously to obtain image I l and I r , based on sub-pixel edge extraction and cross-ratio characteristics, the center of the double circle is located; Zhang Zhengyou binocular camera calibration algorithm is used to calculate the internal and external parameters of the camera; S2. According to the camera parameter calibration result of step S1, image I l and I r Perform DIC correction to transform the distorted elliptical image into a relatively normal standard circular image; S3, converting the world coordinate system of the left camera and the right camera to obtain the external parameters of the structured light stereo vision system; S4, calculating the calibration results multiple times, optimizing the external parameters of the structured light stereo vision, and taking the average value as the final calibration result; Among them, in step S1, the specific steps based on sub-pixel edge extraction are as follows: S101, preprocessing the original image captured by the camera: first grayscale and Gaussian filter the image, and then use the maximum inter-class variance method to find a suitable threshold to perform binary segmentation on the image; S102, ROI (Region of Interest) segmentation: using the Canny algorithm to extract the edge information of the marker points in the obtained binary image, and obtain the pixel-level marker point edge position; finally, based on the marker point edge information, extract the region of interest (ROI) from the image; the region of interest is set to include the entire marker point edge and the extended boundary, and the scale of the extended boundary is proportional to the marker point edge scale; S103, edge positioning of the marker point at the sub-pixel level: using the Zernike moment integral operator, the gradient of the grayscale value of the pixel-level edge of all the marker points in the ROI obtained in S102 is calculated to perform edge positioning of the marker point at the sub-pixel level; S104, based on the obtained sub-pixel level edge of the marker point, using the least square method to perform ellipse fitting, thereby obtaining an equation of the fitted ellipse and preliminarily obtaining the coordinates of the center of the ellipse; In step S1, locating the centers of the two circles based on the cross ratio characteristic includes the following steps: For the standard double circle, a line intersects at points A and A' of the outer circle and points B and B' of the inner circle, and the midpoint P on the line segments AA' and BB'; for the distorted double circle, under the camera's field of view, the double circle is a pair of conic sections after projection transformation; The projection of the intersection point is shown below: {A,B;A′,B′}={a,b;a′,b′} Where a, a', b and b' are the images of the measurable intersection points A, A', B and B' in the image in the mapping space respectively; After iteration at any point P on the plane, assuming that after i iterations, the midpoint P is obtained i The formula is as follows: |OP1|>|OP2|>…>|OP i | Among them, compared with OP i-1 , OP i Closer to the center O, thus obtaining the double circle center positioning.
2. The structural light locating method based on DIC two-circle intersection ratio according to claim 1, characterized in that: In the step S1, sub-pixel edge extraction is performed based on Zernike moments.
3. The structural light locating method based on DIC two-circle intersection ratio according to claim 1, characterized in that: In step S103, the sub-pixel edge point expression of the characteristic pattern is: In the above formula (x i ,y i ) is the sub-pixel coordinate value of the edge of the double circle feature pattern; (x, y) is the pixel-level coordinate value of the edge of the double circle feature pattern; l is the effective distance from the center of the circle to the edge; Represents the angle between the perpendicular line of the edge and the coordinate axis; N is the size of the template.
4. The structural light locating method based on DIC two-circle intersection ratio according to claim 3, characterized in that: The template is 7×7.
5. The structural light locating method based on DIC two-circle intersection ratio according to claim 1, characterized in that: In step S1, when calculating the internal and external parameters of the camera, distortion parameters are also obtained.
6. The structural light locating method based on DIC two-circle intersection ratio according to claim 5, characterized in that: In step S2, the DIC correction includes: inversely mapping the acquired image to a standard posture according to internal parameters, distortion parameters and external parameters, obtaining an orthographic calibration pattern, and extracting the center coordinates of the circle using the orthographic calibration pattern.
7. The structural light locating method based on DIC two-circle intersection ratio according to claim 6, characterized in that: Based on the obtained calibration plate pattern center, the linear distribution characteristics of the center coordinates are utilized to linearly constrain and optimize the center data.
8. A structured light positioning device based on DIC two-circle intersection ratio for implementing the method of any one of claims 1 to 7, characterized in that: The device comprises: a double-circle characteristic pattern calibration plate, an image acquisition module, an image projection module and an image processing module; The image acquisition module is used to obtain a target image of a calibration plate containing a double-circle feature pattern; The image projection module is used for projecting the coding pattern; The image processing module is used to execute the calibration method.
