Method, device and equipment for correcting distortion of structured light camera and storage medium
By adjusting the optomechanical tilt angle and coordinate transformation, Sham perspective distortion and aberration distortion were corrected, solving the problems of light intensity and pattern uniformity in 3D inspection using structured light cameras, thus improving the accuracy and reliability of 3D inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MECH MIND ROBOTICS TECH LTD
- Filing Date
- 2023-05-16
- Publication Date
- 2026-07-24
AI Technical Summary
Existing structured light cameras suffer from poor uniformity of optomechanical projection light intensity and pattern uniformity in 3D inspection, leading to Sham perspective distortion and aberration distortion, which affects the contrast and repeatability accuracy of 3D shape information data.
By adjusting the tilt of the optical engine around the long axis of its digital galvanometer to set the Sham angle, and combining the image information acquired by the camera, coordinate transformation is performed using transformation formulas and distortion parameters to correct Sham perspective distortion and distortion, and to determine the ideal coordinates.
It significantly improves the accuracy and reliability of 3D detection, reduces distortion in image data, and ensures the accuracy and repeatability of 3D shape data.
Smart Images

Figure CN116592793B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of measurement technology, and in particular to a method, apparatus, device and storage medium for distortion correction of a structured light camera. Background Technology
[0002] In scenarios requiring image acquisition at fixed locations or repeated image acquisition of the same object (such as traffic cameras and cameras on supermarket automated checkout machines), it is essential to ensure the repeatability accuracy of the data acquired by the camera equipment to guarantee the accuracy and reliability of the acquisition results. This is especially true when using structured light cameras to acquire the three-dimensional shape information of objects, where high repeatability accuracy within the camera's field of view is crucial.
[0003] Existing structured light cameras for 3D inspection typically utilize Scham's law, placing the optical engine used to generate the structured light pattern at a fixed tilt angle (i.e., the Scham angle) to the object being acquired, thereby expanding the depth of field coverage of the acquired image data. However, this results in poor uniformity of light intensity and pattern projection from the optical engine. Furthermore, distortion occurs when the structured light camera lens captures images from different locations, leading to poor contrast and repeatability of the obtained 3D shape information data. Summary of the Invention
[0004] This application provides a method, apparatus, device, and storage medium for distortion correction of a structured light camera, which can significantly improve the repeatability accuracy when capturing 3D inspection images.
[0005] In a first aspect, embodiments of this application provide a distortion correction method for a structured light camera. The structured light camera includes an optical engine and a camera. The optical engine includes at least one digital galvanometer, and the optical engine is tilted about a set Schahm angle around the major axis of its digital galvanometer. The distortion correction method for the structured light camera includes:
[0006] Acquire image information captured by the camera and determine the image coordinates, which are the coordinates to be corrected;
[0007] Based on the transformation relationship, the physical coordinates corresponding to the image coordinates are determined. The transformation relationship is used to represent the correspondence between the image coordinates and the corresponding physical coordinates. The physical coordinates are coordinates that include distortion and Sham perspective distortion.
[0008] Based on the coordinate expressions of distortion parameters and optomechanical coordinates, the optomechanical coordinates corresponding to the physical coordinates are determined; where the optomechanical coordinates are the coordinates that correct Sham perspective distortion and retain distortion distortion, and the distortion parameters are determined through the calibration of the structured light camera.
[0009] Based on the distortion expression and transformation relation in the form of coordinate expression, the ideal coordinates corresponding to the image coordinates are determined; where the ideal coordinates are the coordinates for correcting distortion and Sham perspective distortion, and the distortion expression is used to represent the correspondence between the optomechanical coordinates and the ideal coordinates.
[0010] Secondly, embodiments of this application provide a distortion correction device for a structured light camera. The structured light camera includes an optical engine and a camera. The optical engine includes at least one digital galvanometer. The optical engine is tilted about a set Schahm angle about the long axis of its digital galvanometer. The distortion correction device for the structured light camera includes:
[0011] The determination module is used to acquire image information captured by the camera and determine the image coordinates, which are the coordinates to be corrected.
[0012] The first conversion module is used to determine the physical coordinates corresponding to the image coordinates based on the conversion formula. The conversion formula is used to represent the correspondence between the image coordinates and the corresponding physical coordinates. The physical coordinates are coordinates that include distortion and Sham perspective distortion.
[0013] The second conversion module is used to determine the optomechanical coordinates corresponding to the physical coordinates based on the coordinate expressions of the distortion parameters and the optomechanical coordinates; wherein, the optomechanical coordinates are coordinates that correct Sham perspective distortion and retain distortion distortion, and the distortion parameters are determined by the calibration of the structured light camera;
[0014] The correction module is used to determine the ideal coordinates corresponding to the image coordinates based on the distortion expression and transformation relationship in the form of coordinate expressions. The ideal coordinates are used to correct distortion and Sham perspective distortion, and the distortion expression is used to represent the correspondence between the optomechanical coordinates and the ideal coordinates.
[0015] Thirdly, embodiments of this application also provide a control device, which includes:
[0016] At least one processor;
[0017] and memory that is communicatively connected to at least one processor;
[0018] The memory stores instructions that can be executed by at least one processor, which are executed by at least one processor to cause the control device to perform a structured light camera distortion correction method as described in any of the embodiments of the first aspect of this application.
[0019] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the structured light camera distortion correction method as described in any of the first aspects of embodiments of this application.
[0020] Fifthly, this disclosure also provides a computer program product comprising computer-executable instructions, which, when executed by a processor, are used to implement the structured light camera distortion correction method as described in any embodiment corresponding to the first aspect of this disclosure.
[0021] The structured light camera distortion correction method, apparatus, device, and storage medium provided in this application embodiment involve setting the optical engine to rotate around the major axis of its digital galvanometer and tilting it relative to the object being photographed by a set Sham angle. Then, image information acquired by the camera is obtained, and image coordinates are determined. Next, based on a transformation relation, the physical coordinates corresponding to the image coordinates are determined. Then, based on the distortion parameters and the coordinate expression of the optical engine coordinates, the optical engine coordinates corresponding to the physical coordinates are determined. Finally, based on the distortion expression in the form of a coordinate expression and the transformation relation, the ideal coordinates corresponding to the image coordinates are determined. Thus, by arranging the optical engine and the object being photographed at a Sham angle tilt, the depth-of-field coverage of the camera is expanded, thereby better capturing the three-dimensional features of the object and achieving more accurate 3D detection. Simultaneously, by performing coordinate transformation and processing on the images acquired by the camera, distortion and Sham perspective distortion in the obtained image data are significantly reduced, significantly improving data accuracy and thus improving the accuracy and reliability of 3D detection. Attached Figure Description
[0022] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0023] Figure 1a This is an application scenario diagram of the structured light camera distortion correction method provided in the embodiments of this application;
[0024] Figure 1b for Figure 1a A schematic diagram showing the correspondence between the structured light camera and the digital galvanometer.
[0025] Figure 2 This is a flowchart of a structured light camera distortion correction method provided in one embodiment of this application;
[0026] Figure 3a A flowchart illustrating a structured light camera distortion correction method provided in yet another embodiment of this application;
[0027] Figure 3b for Figure 3a The flowchart of the method for determining ideal coordinates in the embodiment shown is as follows;
[0028] Figure 4 This is a schematic diagram of the structure of a structured light camera distortion correction device provided in yet another embodiment of this application.
[0029] Figure 5 This is a schematic diagram of the structure of a control device provided in yet another embodiment of this application.
[0030] The accompanying drawings have illustrated specific embodiments of this disclosure, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this disclosure to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0031] In the following description, when referring to the accompanying drawings, the same numbers in different drawings denote the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.
[0032] The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0033] The following is a description of the terminology used in this disclosure:
[0034] Structured light camera: A device used to measure the three-dimensional features of an object, also called a structured light 3D camera. It includes an optical engine and a camera that cooperate with each other and are fixed in position. The optical engine projects a grating stripe pattern onto the surface of the object being measured, and then the camera takes pictures of the pattern on the surface of the object. Based on pre-encoded rules, the captured pattern data is decoded and processed to obtain a high-precision 3D point cloud of the object being measured.
[0035] Scheimpflug angle: In structured light camera setups based on Scheimpflug's principle, the Scheimpflug angle is the angle between the optical axis of the optical engine and the plane containing the object being measured. Scheimpflug's principle is a law governing depth of field in photography, stating that when the camera lens is not parallel to the imaging plane, the focal plane, lens plane, and imaging plane intersect at the same point. Structured light cameras based on Scheimpflug's principle, by arranging the optical engine at an angle to the imaging plane, can effectively reflect the influence of the object's height (or depth) characteristics on the image, thus achieving more accurate 3D detection.
[0036] Sham perspective distortion: Due to the tilt of the plane between the optical engine and the object being measured, the grating pattern projected by the optical engine onto the object being measured will be deformed (e.g., rectangular stripes will become trapezoidal). The distortion caused by the deformation is called Sham perspective distortion.
[0037] Distortion: Due to the optical characteristics of the camera lens, the information in the captured image data is misaligned, that is, image distortion or lens distortion. The image data distortion caused by distortion is called distortion.
[0038] Digital galvanometer: also known as digital micromirror device, it is a component of the optical engine lens. The optical engine lens contains a large number of digital galvanometers, which are usually rectangular. Each digital galvanometer can correspond to one or more pixels. The mirror surface of the digital galvanometer is connected to the optical engine through a hinge axis and can rotate around the hinge axis. By rotating the mirror surface of the digital galvanometer around the hinge axis, the mirror angle is changed to achieve rotation relative to the optical engine itself. By changing the mirror angle of the digital galvanometer, the shape of the pattern projected by the optical engine is changed.
[0039] In the field of camera-based measurement, existing technologies can effectively ensure the accuracy and reliability of measurement data by placing the camera and the object under test in a fixed position for image acquisition, or by repeatedly acquiring images of the same object. In particular, when it is necessary to acquire the three-dimensional shape information of an object using a structured light camera, there are high requirements for the accuracy of the acquired image data and the accurate reflection of the three-dimensional features of the acquired object.
[0040] To better reflect the three-dimensional features of an object, structured light cameras used for measurement typically utilize Scherm's law. This involves positioning the optical engine in the structured light camera, which generates the structured light pattern, at a fixed Scherm angle to the object being captured, thereby expanding the depth of field coverage of the acquired image data. However, this approach suffers from inconsistent light intensity projection from the optical engine, resulting in noticeable variations in the pattern's uniformity and causing Scherm perspective distortion. Furthermore, the structured light camera lens exhibits distortion when capturing images of the object from different positions, leading to poor contrast and repeatability of the acquired three-dimensional shape information data.
[0041] To address this issue, this disclosure provides a distortion correction method for a structured light camera. By using different conversion formulas, the method corrects distortion and Sham perspective distortion in the image data acquired by the camera, significantly improving the accuracy and reliability of the obtained three-dimensional shape data.
[0042] The application scenarios of the embodiments of this disclosure are explained below:
[0043] Figure 1a This diagram illustrates an application scenario of the structured light camera distortion correction method provided in this embodiment of the disclosure. Figure 1aAs shown, the structured light camera 100 includes an optical engine 110 and a camera 120. The optical engine 110 forms a Schermere angle A with the plane 140 where the object under test 130 is located. The optical engine 110 projects a pattern onto the surface of the object under test 130, so that the camera 120 can acquire the pattern on the surface of the object under test 130. Based on the coordinates of the pattern in the camera 120 (image coordinates), the corresponding coordinates of the pattern on the surface of the object under test 130 (physical coordinates), and the corresponding coordinates of the pattern in the optical engine 110 (optical engine coordinates), the ideal coordinates corresponding to the image coordinates for correcting distortion and Schermere perspective distortion are jointly determined, thereby realizing the distortion correction of the structured light camera so as to determine the three-dimensional coordinates of the object under test based on the ideal coordinates.
[0044] like Figure 1b As shown, it is a schematic diagram of the correspondence between the structured light camera and the digital galvanometer. The optical engine 110 contains a large number of digital galvanometers 111. The digital galvanometers correspond to the pixels in the optical engine projection pattern, and a specific digital galvanometer 112 corresponds to the location of the optical axis of the optical engine.
[0045] It should be noted that the optical engine, camera, and object under test mentioned in the above description are only one example, and the number of digital galvanometers is only shown as a certain number for illustration, but this disclosure is not limited to this. That is to say, the number of optical engine, camera, object under test, and digital galvanometers is arbitrary.
[0046] The distortion correction method for structured light cameras provided in this disclosure is described in detail below through specific embodiments.
[0047] Figure 2 This is a flowchart illustrating a distortion correction method for a structured light camera according to an embodiment of this disclosure. The structured light camera includes an optical engine and a camera. The optical engine includes at least one digital galvanometer, and the optical engine is tilted about the major axis of its digital galvanometer at a set Schahm angle. Figure 2 As shown, the distortion correction method for structured light cameras provided in this embodiment includes the following steps:
[0048] Step S201: Obtain image information captured by the camera and determine the image coordinates.
[0049] The image coordinates are the coordinates to be corrected.
[0050] Specifically, in a structured light camera based on Schermere's law, the optical axis of the optical engine needs to be at a fixed Schermere angle to the imaging plane of the object being measured (the value of the Schermere angle can be configured according to actual needs, such as the size of the object being measured). The optical engine is composed of several digital galvanometers, which are usually rectangles of the same size. Therefore, the optical engine is typically rotated around the major axis (i.e., the axis perpendicular to the short side of the digital galvanometer's geometry) or minor axis (i.e., the axis perpendicular to the long side of the digital galvanometer's geometry) of the digital galvanometer (starting from when the optical axis is perpendicular or parallel to the imaging plane) until the angle between the optical axis and the imaging plane reaches the set Schermere angle.
[0051] Since the pattern measured by the optical engine projection is generally a grating pattern, and the grating pattern is perpendicular to the line connecting the optical center of the optical engine and the center of the camera lens (i.e., the baseline), the grating pattern produced will have different types of distortion depending on whether the optical engine rotates around the major axis or the minor axis of the digital galvanometer, which is called Sham perspective distortion.
[0052] In this design, if the optomechanism rotates around its minor axis, the pattern projected by the optomechanism is stretched along a direction perpendicular to the minor axis of the digital galvanometer. This allows the projected pattern to cover a wider area, ensuring a greater depth of field for the structured light camera based on Scherm's law. This guarantees the measurement range in various 3D measurements, thus ensuring its practicality. However, this structure suffers from significant brightness differences between the near and far ends of the projected pattern relative to the optomechanism, as well as significant differences in fringe width between the near and far ends. This results in severe distortion, and even with Scherm's perspective distortion correction, the accuracy of the obtained 3D shape data remains poor, leading to insufficient reliability.
[0053] If the optical engine rotates around its major axis, the brightness difference between the near and far ends of the projected pattern is relatively insignificant, as is the difference in fringe width between the near and far ends. Therefore, Sham perspective distortion is also relatively mild. Correcting Sham perspective distortion based on this can better improve the accuracy of 3D shape data. Although the depth of field coverage is limited, in repetitive measurement applications where the structured light camera and the measured object are in relatively fixed positions, the requirements for depth of field are relatively low. Therefore, rotating the optical engine around its major axis can better ensure measurement accuracy.
[0054] However, existing Sham perspective distortion correction based on short-axis rotation cannot be applied to scenes based on long-axis rotation. Furthermore, existing algorithms based on short-axis rotation mainly perform direct coordinate conversion through distortion expressions, resulting in limited correction of Sham perspective distortion and failing to meet the high-precision requirements of repeated measurements. Therefore, this solution adjusts the algorithm to be based on long-axis rotation and improves the image correction algorithm to correct Sham perspective distortion and distortion caused by camera lenses. This greatly reduces the impact of Sham perspective distortion and distortion, significantly improving the accuracy and reliability of the obtained three-dimensional shape data.
[0055] Image information is information captured by the camera. Based on the calculation of image information, its coordinates in the camera coordinate system can be obtained, which is the image coordinates (i.e., image data).
[0056] Image coordinates are the coordinate data of image data acquired by the camera based on the camera coordinate system. The image data acquired by the camera is the feature of the pattern projected onto the object by the optical engine. By comparing and calculating the coordinates of this feature set in the optical engine (i.e., the optical engine coordinates) with the image coordinates, the three-dimensional shape data of the object (i.e., the three-dimensional point cloud) can be obtained. The specific calculation process is common knowledge in this field and will not be elaborated here.
[0057] However, in the above calculation process, due to the Sham perspective distortion caused by the Sham angle between the optical engine and the imaging plane, and the distortion distortion of the camera lens, the pattern projected onto the measured object itself will have obvious Sham perspective distortion. Therefore, the image coordinates and the optical engine coordinates corresponding to the pattern features projected onto the object cannot completely correspond (affected by Sham perspective distortion). At the same time, it will also be affected by the distortion distortion inherent in the camera itself. At this time, it is necessary to correct the effects of these distortions to maximize the correspondence between the image coordinates and the optical engine coordinates, thereby ensuring the accuracy of the obtained three-dimensional shape data of the measured object, that is, the accuracy of the three-dimensional point cloud.
[0058] Step S202: Based on the transformation formula, determine the physical coordinates corresponding to the image coordinates.
[0059] The transformation formula is used to represent the correspondence between image coordinates and corresponding physical coordinates, where physical coordinates include distortion and Sham perspective distortion.
[0060] Specifically, in the image data captured by the camera, each pixel corresponds to one or more pixels in the optical-mechanical projection pattern. Each pixel in the optical-mechanical projection pattern typically corresponds to one or more digital galvanometers. Therefore, by comparing the specific image of each pixel in the image data, its corresponding digital galvanometer can be determined, and the corresponding optical-mechanical image coordinates can be determined based on the position of the digital galvanometer in the optical engine. However, this process does not actually consider the Sham perspective distortion of the optical-mechanical projection image. That is, the corresponding coordinates are the physical coordinates projected onto the measured object, which include Sham perspective distortion (at this point, the distortion distortion inherent in the camera has not yet been processed, so it still includes distortion distortion).
[0061] Based on the above principles, a conversion formula is used to transform physical coordinates into image coordinates. Using this conversion formula, the physical coordinates corresponding to the image coordinates can be obtained.
[0062] Step S203: Determine the optomechanical coordinates corresponding to the physical coordinates based on the distortion parameters and the coordinate expressions of the optomechanical coordinates.
[0063] Among them, the optomechanical coordinates are the coordinates that correct Sham perspective distortion and retain distortion distortion, and the distortion distortion parameters are determined by the calibration of the structured light camera.
[0064] Specifically, after determining the relative positions of the optical engine and the camera, and their positions relative to the imaging plane, the structured light camera needs to be calibrated to determine the relationship between the three-dimensional geometric position of a point on the surface of a spatial object and its corresponding point in the image data. The parameters describing these relationships are the camera's intrinsic parameters (parameters that reflect the characteristics of the structured light camera itself), extrinsic parameters (parameters that reflect the pose characteristics of the structured light camera), and distortion parameters (parameters that reflect the Sham angle, radial, and tangential distortion characteristics of the optical engine). Any existing camera calibration method can be used for the calibration; no restrictions are imposed here.
[0065] Optical-mechanical coordinates are coordinates that eliminate Sham perspective distortion based on physical coordinates. They can better reflect the corresponding coordinates of the image projected by the optical engine on the optical engine (but in reality, there is still distortion due to the camera itself, so they are not perfectly correlated).
[0066] The coordinate expression is used to obtain the distortion parameters based on camera calibration. It reflects the relationship between the optomechanical coordinates and the physical coordinates. Based on the distortion parameters and the coordinate expression, the optomechanical coordinates corresponding to the physical coordinates can be obtained.
[0067] Step S204: Determine the ideal coordinates corresponding to the image coordinates based on the distortion expression and transformation relation in the form of coordinate expression.
[0068] Among them, the ideal coordinates are the coordinates for correcting distortion and Sham perspective distortion, and the distortion expression is used to represent the correspondence between the optomechanical coordinates and the ideal coordinates.
[0069] Specifically, ideal coordinates are coordinates that have been corrected for distortion based on optomechanical coordinates. By comparing ideal coordinates with image coordinates, they can accurately reflect the three-dimensional features of an object. Therefore, after obtaining the optomechanical coordinates, it is necessary to further correct for distortion based on them.
[0070] However, since distortion cannot be directly converted from distortion parameters, and existing distortion expressions can only provide the relative relationship between ideal coordinates and optomechanical coordinates, but cannot uniquely determine the accurate corresponding ideal coordinates through optomechanical coordinates, it is necessary to combine the aforementioned coordinate expressions and distortion expressions simultaneously. By reorganizing the distortion expressions into coordinate expressions, they can be combined with the optomechanical coordinates determined by the coordinate expressions for calculation (when both are in the same form, the amount of computation and the difficulty of computation can be reduced). Then, by combining the transformation relationship, the ideal coordinates corresponding to the optomechanical coordinates can be determined together to improve the accuracy of the obtained ideal coordinates, while ensuring that the amount of computation and the difficulty of computation are not too large, thereby ensuring computational efficiency and the accuracy of the obtained three-dimensional shape data.
[0071] The distortion correction method for a structured light camera provided in this application involves setting the optical engine to rotate around the major axis of its digital galvanometer and tilting it relative to the object being photographed by a set Sham angle. Then, image information acquired by the camera is obtained, and image coordinates are determined. Next, based on a transformation relation, the physical coordinates corresponding to the image coordinates are determined. Then, based on the distortion parameters and the coordinate expression of the optical engine coordinates, the optical engine coordinates corresponding to the physical coordinates are determined. Finally, based on the distortion expression in the form of the coordinate expression and the transformation relation, the ideal coordinates corresponding to the image coordinates are determined. Thus, by arranging the optical engine at a Sham angle tilt relative to the object being photographed, the depth-of-field coverage of the camera is expanded, thereby better capturing the three-dimensional features of the object and achieving more accurate 3D detection. Simultaneously, by performing coordinate transformation and processing on the images acquired by the camera, distortion and Sham perspective distortion in the obtained image data are significantly reduced, significantly improving data accuracy and thus enhancing the accuracy and reliability of 3D detection.
[0072] Figure 3a This is a flowchart illustrating a structured light camera distortion correction method according to an embodiment of this disclosure. Figure 3a As shown, the distortion correction method for structured light cameras provided in this embodiment includes the following steps:
[0073] Step S301: Obtain image information captured by the camera and determine the image coordinates.
[0074] The image coordinates are the coordinates to be corrected.
[0075] Specifically, in addition to the optical engine being at a Schahm angle to the imaging plane, the relative position of the optical engine and the camera also needs to be considered for structured light cameras.
[0076] Furthermore, the structured light camera includes a photosensitive element that satisfies the following conditions: both the photosensitive element and the digital galvanometer of the optomechanical system are rectangular, so as to correspond to the image coordinates of the image data and the optomechanical coordinates of the pattern projected onto the object; the major axis of the photosensitive element is perpendicular to the baseline connecting the photosensitive element and the digital galvanometer, and the major axis of the digital galvanometer is also perpendicular to the baseline connecting the photosensitive element and the digital galvanometer, thereby making the major axis of the digital galvanometer parallel to the major axis of the photosensitive element, so as to ensure the accurate correspondence between the image coordinates acquired by the camera and the optomechanical coordinates corresponding to the pattern projected by the optomechanical system; the direction of the pattern projected by the digital galvanometer is parallel to the major axis of the digital galvanometer.
[0077] Step S302: Determine the phase value of the image coordinates along the direction perpendicular to the long axis of the digital galvanometer.
[0078] Specifically, the phase value of the image coordinates along the direction perpendicular to the long axis of the digital galvanometer is the phase value corresponding to the pattern on the surface of the object being measured. Each image coordinate corresponds to one (or more) pixel of image data. This image data will have a corresponding optomechanical projection pattern on the surface of the object being measured. Since the optomechanical projection pattern is a sinusoidal grating fringe pattern, each pixel of the pattern on the surface of the object being measured can correspond to one pixel of the optomechanical projection pattern. Furthermore, depending on the different patterns on the surface of the object being measured, the phase value of the corresponding optomechanical projection pattern can be directly determined. Specific methods for solving the phase value can include existing Fourier methods, phase-shifting methods, etc., which will not be elaborated upon here.
[0079] Step S303: Determine the physical coordinates based on the phase value and the transformation formula.
[0080] Specifically, the transformation formula is used to determine the physical coordinates corresponding to the image coordinates. The physical coordinates are the coordinates of the optomechanical projection pattern on the surface of the object being measured, which corresponds to the image data corresponding to the image coordinates (that is, the coordinates of the surface of the object being measured). They directly correspond to the projection pattern on the optomechanical system.
[0081] Therefore, the transformation formula is actually based on the relationship between the phase value of the pattern corresponding to the physical coordinates of the measured object's surface and the optomechanical coordinates corresponding to the optomechanical projection pattern, to determine the physical coordinates (rather than directly converting image coordinates to physical coordinates). The transformation formula is:
[0082]
[0083] Among them, c yThis is the ordinate of the digital galvanometer mirror position corresponding to the projection point of the optical axis of the optomechanism onto the digital galvanometer mirror (this value can be directly determined during the calibration of the structured light camera). The optical axis of the optomechanism corresponds to a pixel in an optomechanical projection pattern. Therefore, there must be a corresponding digital galvanometer mirror in the optomechanism to project the pattern of that pixel. Thus, the position of this digital galvanometer mirror is also the position of the projection point of the optical axis onto the digital galvanometer mirror. The ordinate of this galvanometer position in the optomechanical coordinate system is the ordinate of the galvanometer position. However, since the x-coordinate of the corresponding image coordinate corresponds to the optomechanical projection pattern of the same phase, it is difficult to determine the corresponding image coordinate based on the phase. Therefore, only the ordinate is used for calculation here.
[0084] V D "′" represents the vertical floating-point galvanometer position of a pixel in the image data acquired by the camera on the digital galvanometer (that is, the physical coordinates corresponding to the position of the digital galvanometer on the optical engine corresponding to the projected image). D "′" represents the ordinate of the physical coordinates corresponding to the vertical floating-point galvanometer position (i.e., the physical coordinates that need to be determined), f y The focal length of the optical engine lens is expressed in pixels (the position of the digital galvanometer on the optical engine cannot be directly mapped to the coordinates of the optical engine projection pattern in the optical engine, nor can it be directly mapped to the actual position of the digital galvanometer, because the influence of the focal length must also be considered. This value is a built-in parameter of the optical engine and can be determined through the calibration of the structured light camera). The vertical direction is perpendicular to the long axis of the digital galvanometer, that is, the short axis direction of the digital galvanometer.
[0085] Furthermore, the longitudinal floating-point galvanometer position V D The formula for calculating "′" is:
[0086]
[0087] Where, φ v T is the phase value of the image data along the longitudinal direction (i.e., the phase value determined in step S202), and T is the period value of the pattern projected by the digital galvanometer in units of the number of galvanometers (i.e., the number of digital galvanometers occupied by the optomechanical projection pattern in each period, which can be determined by the calibration of the structured light camera).
[0088] Therefore, based on the phase value corresponding to the determined image coordinates, the position of the corresponding vertical floating-point galvanometer can be determined, and then the corresponding physical coordinates (vertical coordinates) can be determined.
[0089] Step S304: Determine the Sham perspective distortion matrix based on the distortion parameters.
[0090] The distortion parameters include distortion parameters and epipolar constraint parameters.
[0091] Specifically, the distortion parameters are distortion-related parameters determined during the calibration of the structured light camera to reflect the distortion caused by Sham perspective distortion and aberration distortion. These distortion parameters include the Sham angle parameter (τ). x ,τ y (This parameter is in coordinate form, reflecting the specific value of the Sham angle). Based on the Sham angle parameter, the Sham perspective distortion matrix can be calculated. The Sham perspective distortion matrix is a matrix used in coordinate transformation calculations to reflect the degree of Sham perspective distortion.
[0092] Furthermore, the Schahm perspective distortion matrix R(τ) x ,τ y )for:
[0093]
[0094] Step S305: Determine the inverse Sham perspective distortion matrix based on the Sham perspective distortion matrix.
[0095] Specifically, based on the Sham perspective distortion matrix, the corresponding inverse Sham perspective distortion matrix can be obtained for calculation purposes.
[0096] Furthermore, the inverse Sham perspective distortion matrix iR(τ) x ,τ y )for:
[0097]
[0098] Step S306: Input the physical coordinates, epipolar constraint parameters, and inverse Sham perspective distortion matrix into the coordinate expression, and output the optomechanical coordinates.
[0099] Specifically, the epipolar constraint parameter can reflect the constraint relationship between the same projection point on different projection planes (epidural plane and image plane). By combining the epipolar constraint parameter and the inverse Sham perspective distortion matrix, a coordinate expression reflecting the direct relationship between physical coordinates and optomechanical coordinates can be obtained, so as to calculate the corresponding optomechanical coordinates based on the physical coordinates corresponding to the image coordinates.
[0100] Furthermore, the epipolar constraint parameters (a, b) satisfy the following relationship:
[0101]
[0102] Where E is the third-order eigenvalue matrix determined by the calibration of the structured light camera. The eigenvalue matrix is also a parameter matrix determined by the calibration of the structured light camera. (x c ,y c () represents the image coordinates corresponding to the optomechanical coordinates and physical coordinates.
[0103] Furthermore, the coordinate expression for the optomechanical coordinates is:
[0104] y D "=a*x D "+b",
[0105] Among them, (x D ",y D ") are optomechanical coordinates, satisfying:
[0106]
[0107] In the coordinate expression, iR is the aforementioned inverse Sham perspective distortion matrix, Fx D "′ represents the physical coordinate x D "′ is derived from the optical engine coordinate y D "、Physical coordinates y D The functional relationship expressed by "″′ and iR, Gx D "To represent the optomechanical coordinate x" D "′ is derived from physical coordinates x D "′、y D The functional relationship expressed by "″′ and iR, expanded to the expression on the right side of the equation, allows us to obtain the corresponding optomechanical coordinates (x, y, y) based on the previously obtained physical coordinates by combining these equations. D ",y D ″).
[0108] Step S307: Construct the distortion expression into a coordinate expression.
[0109] Specifically, the distortion expression reflects the relationship between the optomechanical coordinates and the ideal coordinates. Through the distortion expression, the connection between the optomechanical coordinates and the ideal coordinates can be established. Depending on the specific model and type of structured light camera, different types of distortion need to be considered. Therefore, different distortion expressions can be selected, such as expressions specifically for radial distortion, tangential distortion, and thin prism distortion, or expressions involving multiple distortions simultaneously. This scheme does not impose any restrictions.
[0110] For ease of description, this section uses a distortion expression that involves both radial and tangential distortion, where the distortion parameters include both radial and tangential distortion parameters. The distortion expression used here is an existing expression and will not be elaborated upon further.
[0111] The distortion expression constructed in coordinate form can be represented as:
[0112] A(X)*X+B(X)-Y=0,
[0113] in:
[0114] A(X) is the coordinates of the ideal coordinates (x) D ′,yD The matrix formed by individual nth-degree polynomials of degree n is:
[0115] 1+k1(x D ′ 2 +y D ′ 2 )+…+k n (x D ′ 2 +y D ′ 2 ) n ,
[0116] k n This refers to the radial distortion parameter;
[0117] B(X) is derived from (x D ′,y D The matrix formed by the quadratic polynomials of (′) is:
[0118] αx D ′ 2 +βy D ′ 2 +γx D 'y D ′,
[0119] α, β, and γ are tangential distortion parameters; both radial and tangential distortion parameters can be determined through the calibration process of the structured light camera.
[0120] X and Y are the ideal coordinates to be solved, and Y is the already obtained optomechanical coordinate, which satisfies:
[0121]
[0122] Step S308: Determine the ideal coordinates corresponding to the image coordinates based on the distortion expression and transformation relation in the form of coordinate expression.
[0123] Specifically, the distortion expression in the form of a coordinate expression can reflect the relationship between the ideal coordinates and the optomechanical coordinates under the influence of distortion. By using the distortion expression in the form of a coordinate expression, a feasible solution for the ideal coordinates can be found. By iterating along a fixed direction to find the feasible solution, the ideal coordinates with a set accuracy (that is, the degree of correction of distortion and Sham perspective distortion reaches a set percentage) can be found.
[0124] Furthermore, such as Figure 3b The diagram shown is a flowchart of the method for determining ideal coordinates, which includes the following steps:
[0125] Step S3081: Construct an iterative expression based on the distortion expression in the form of the coordinate expression.
[0126] Specifically, in order to fix the iteration direction, it is necessary to first transform the distorted expression in the form of coordinate expression into the form of monotonic iteration, that is, the iteration expression:
[0127]
[0128] Where k is the number of iterations of the input X.
[0129] Combining the distortion expression, since Y is fixed, X k The changing trend and X k+1 The trend is the same.
[0130] Step S3082: Substitute the optomechanical coordinates as the initial value X0 into the iterative expression, and iterate the number of times corresponding to the value k to obtain the iterative result X. k+1 .
[0131] Specifically, the value of k varies depending on the set precision; generally, the higher the set precision, the larger the value of k.
[0132] Step S3083, X k+1 Substituting into the distortion expression, we obtain the optomechanical coordinates X. k+1 ″.
[0133] Specifically, the optical-mechanical coordinates obtained here are based on X. k+1 The optical-mechanical coordinates derived from the feasible solution of this ideal coordinate system are not the actual optical-mechanical coordinates.
[0134] Step S3084, combined with X k+1 "By combining the Sham perspective distortion matrix, we obtain the physical coordinates X of the uncorrected Sham perspective distortion and aberration distortion." k+1 ″′.
[0135] Specifically, similar to step S3083, based on the reversed optomechanical coordinates, the corresponding reversed physical coordinates X can be calculated. k+1 "′, i.e. X k+1 "′=R(τ x ,τ y )*X k+1 ″.
[0136] Step S3085: Determine the physical coordinate X by combining the transformation formula. k+1 The vertical physical coordinate y in "′ Dk+1 The pixel coordinates V corresponding to "′ Dk+1 The relational expression.
[0137] Specifically, based on the reverse-derived physical coordinates, the corresponding reverse-derived pixel floating-point galvanometer position (i.e., pixel coordinates) V can be further determined. Dk+1 V Dk+1 =yDk+1 "′*f y +c y .
[0138] Step S3086, with error value err = V Dk+1 -V D Minimize the value of X as the objective, and input X sequentially. k The iteration continues until the value of err is less than the preset threshold, or the number of inputs reaches the preset threshold, at which point the iteration ends.
[0139] With the goal of minimizing the error value, input X sequentially. k The iteration continues until the value of err is less than a preset threshold, or the number of inputs reaches a preset threshold, at which point the iteration ends.
[0140] Specifically, V D That is, the V calculated in the aforementioned steps D "', by comparing the inferred pixel floating-point mirror position with the actual pixel floating-point mirror position, and minimizing this value, X is iteratively calculated. k+1 This allows us to achieve ideal coordinates that approximate the true and complete elimination of distortion and Sham perspective distortion based on a set precision. The actual ideal coordinates obtained are those that correct distortion and Sham perspective distortion to the set precision.
[0141] The preset threshold value can be adjusted according to the required precision, and the number of inputs, i.e., the k value, can also be adjusted according to the set precision.
[0142] Step S3087: Calculate the X obtained at the end of the iteration. k+1 As an ideal coordinate system.
[0143] Specifically, through iterative input, ideal coordinates that meet the accuracy requirements can be obtained. At this time, the difference between the pixel floating-point galvanometer position corresponding to the ideal coordinates and the actual pixel floating-point galvanometer position can meet the set accuracy requirements.
[0144] By repeating the steps in this embodiment for each image coordinate, extremely high-precision correction of the image data from the structured light camera can be achieved, significantly correcting the effects of distortion and Sham perspective distortion, thereby ensuring the accuracy of the obtained data and improving the accuracy and reliability of 3D detection.
[0145] The structured light camera distortion correction method disclosed herein acquires image information from the camera and determines the image coordinates. Then, it determines the phase value corresponding to the image coordinates, and finally the physical coordinates corresponding to the image coordinates. Based on the coordinate expression of distortion parameters and optomechanical coordinates, the corresponding physical coordinates are further determined. A coordinate expression is constructed using distortion parameters to determine the corresponding optomechanical coordinates. Finally, the corresponding ideal coordinates are determined iteratively based on the distortion expression. Thus, under 3D measurement based on the Sham angle, the ideal coordinates corresponding to the image coordinates are quickly determined through the transformation of multiple relational formulas, completing the conversion from image coordinates to ideal coordinates that correct distortion and Sham perspective distortion. Based on these ideal coordinates, the 3D shape coordinates of the measured object are determined, thereby achieving high-precision 3D detection. The accuracy of calculating the ideal coordinates can be adjusted according to the required precision, thereby adjusting the calculation speed and achieving a balance and optimization between correction efficiency and accuracy, thus improving the reliability of 3D detection.
[0146] Figure 4 This is a schematic diagram of a structured light camera distortion correction device provided in one embodiment of this disclosure. Figure 4 As shown, in the structured light camera distortion correction device 400, the structured light camera includes an optical engine and a camera. The optical engine includes at least one digital galvanometer. The optical engine is tilted about a set Schahm angle around the major axis of its digital galvanometer. The structured light camera distortion correction device 400 includes: a determination module 410, a first conversion module 420, a second conversion module 430, and a correction module 440, wherein:
[0147] The determination module 410 is used to acquire image information captured by the camera and determine the image coordinates, which are the coordinates to be corrected.
[0148] The first conversion module 420 is used to determine the physical coordinates corresponding to the image coordinates based on the conversion formula. The conversion formula is used to represent the correspondence between the image coordinates and the corresponding physical coordinates. The physical coordinates are coordinates that include distortion and Sham perspective distortion.
[0149] The second conversion module 430 is used to determine the optomechanical coordinates corresponding to the physical coordinates based on the coordinate expression of the distortion parameters and the optomechanical coordinates; wherein, the optomechanical coordinates are coordinates that correct Sham perspective distortion and retain distortion distortion, and the distortion parameters are determined by the calibration of the structured light camera;
[0150] The correction module 440 is used to determine the ideal coordinates corresponding to the image coordinates based on the distortion expression and transformation relationship in the form of coordinate expression; wherein, the ideal coordinates are the coordinates for correcting distortion and Sham perspective distortion, and the distortion expression is used to represent the correspondence between the optomechanical coordinates and the ideal coordinates.
[0151] Furthermore, module 410 specifically includes a camera comprising a photosensitive element; both the photosensitive element and the digital galvanometer of the camera's optical engine are rectangular; the long axis of the photosensitive element is perpendicular to the baseline connecting the photosensitive element and the digital galvanometer; the long axis of the digital galvanometer is perpendicular to the baseline connecting the photosensitive element and the digital galvanometer; and the direction of the pattern projected by the digital galvanometer is parallel to the long axis of the digital galvanometer.
[0152] Furthermore, the first conversion module 420 is specifically used to determine the phase value of the image data along the direction perpendicular to the long axis of the digital galvanometer; and to determine the physical coordinates based on the phase value and the conversion formula.
[0153] Furthermore, the second conversion module 430 is specifically used to: if the distortion parameters include distortion parameters and epipolar constraint parameters, determine the Sham perspective distortion matrix based on the distortion parameters; determine the inverse Sham perspective distortion matrix based on the Sham perspective distortion matrix; input the physical coordinates, epipolar constraint parameters, and inverse Sham perspective distortion matrix into the coordinate expression, and output the optomechanical coordinates.
[0154] Furthermore, the first conversion module 420 specifically includes distortion parameters including the Schahm angle (τ). x ,τ y The polar constraint parameters are (a, b); the transformation formula is:
[0155] Among them, c y V represents the ordinate of the mirror position corresponding to the projection point of the optical axis of the optical engine onto the digital mirror. D "′ represents the vertical floating-point galvanometer position of a pixel in the image data acquired by the camera on the digital galvanometer, y D "′" represents the ordinate of the physical coordinates corresponding to the vertical floating-point galvanometer position, f y V represents the focal length of the optical-mechanical lens, expressed in pixels, with the vertical axis perpendicular to the major axis of the digital galvanometer, i.e., the minor axis direction of the digital galvanometer; D The formula for calculating "′" is: Where, φ v R is the phase value of the image data along the longitudinal direction, and T is the period value of the pattern projected by the digital galvanometer in units of the number of galvanometers; the Schahm perspective distortion matrix R(τ) x ,τ y )for:
[0156]
[0157] Inverse Sham perspective distortion matrix iR(τ) x ,τ y )for:
[0158]
[0159] The polar constraint parameters satisfy:
[0160]
[0161] Where E is the third-order eigenvalue matrix determined through the calibration of the structured light camera, (x c ,y c ) represents image coordinates; the coordinate expression for optomechanical coordinates is: y D "=a*x D "+b, where (x D ",y D ") are optomechanical coordinates, satisfying:
[0162]
[0163] Furthermore, the correction module 440 is specifically used to, if the distortion parameters include radial distortion parameters and tangential distortion parameters,
[0164] The distortion expression in coordinate form is: A(X)*X+B(X)-Y=0,
[0165] in:
[0166] A(X) is the coordinates of the ideal coordinates (x) D ′,y D The matrix formed by individual nth-degree polynomials of degree n is:
[0167] 1+k1(x D ′ 2 +y D ′ 2 )+…+k n (x D ′ 2 +y D ′ 2 ) n ,
[0168] k n This refers to the radial distortion parameter;
[0169] B(X) is derived from (x D ′,y D The matrix formed by the quadratic polynomials of (′) is:
[0170] αx D ′ 2 +βy D ′ 2 +γx D 'y D ′,
[0171] α, β, and γ are tangential distortion parameters;
[0172] X and Y satisfy:
[0173]
[0174] Furthermore, the correction module 440 is specifically used to construct an iterative expression based on the distortion expression in the form of a coordinate expression:
[0175]
[0176] Where k is the number of iterations of the input X; the optomechanical coordinates are substituted into the iterative expression as the initial value X0, and the iteration is performed for the number of times corresponding to the value k, to obtain the iteration result X. k+1 ; X k+1 Substituting into the distortion expression, we obtain the optomechanical coordinates X. k+1 "; combined with X k+1 "By combining the Sham perspective distortion matrix, we obtain the physical coordinates X of the uncorrected Sham perspective distortion and aberration distortion." k+1 "′:
[0177] X k+1 "′=R(τ x ,τ y )*X k+1 ";
[0178] By combining the transformation formula, determine the physical coordinate X. k+1 The vertical physical coordinate y in "′ Dk+1 The pixel coordinates V corresponding to "′ Dk+1 Relationship:
[0179] V Dk+1 =y Dk+1 "′*f y +c y ;
[0180] With the error value err = V Dk+1 -V D To minimize the value of X, input X sequentially. k The iteration continues until the value of err is less than a preset threshold, or the number of inputs reaches a preset threshold, at which point the iteration ends; the X obtained at the end of the iteration is... k+1 As an ideal coordinate system.
[0181] Figure 5 This is a schematic diagram of the structure of a control device provided in one embodiment of the present disclosure, as shown below. Figure 5 As shown, the control device 500 includes a memory 510 and a processor 520.
[0182] The memory 510 stores a computer program that can be executed by at least one processor 520. This computer program is executed by at least one processor 520 to enable the control device to implement the structured light camera distortion correction method provided in any of the above embodiments.
[0183] The memory 510 and the processor 520 can be connected via a bus 530.
[0184] The relevant explanations can be understood by referring to the corresponding descriptions and effects in the method embodiments, and will not be repeated here.
[0185] One embodiment of this disclosure provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the structured light camera distortion correction method provided in any of the above method embodiments.
[0186] The computer-readable storage medium can be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0187] One embodiment of this disclosure provides a computer program product comprising computer-executable instructions that, when executed by a processor, are used to implement the structured light camera distortion correction method provided in any of the above embodiments.
[0188] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0189] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope of this application is indicated by the claims.
[0190] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A method for distortion correction in a structured light camera, characterized in that, The structured light camera includes an optical engine and a camera, the optical engine including at least one digital galvanometer, the optical engine being tilted about the major axis of its digital galvanometer by a set Schahm angle, the method comprising: The image information captured by the camera is obtained, and the image coordinates are determined, wherein the image coordinates are the coordinates to be corrected; Based on the transformation formula, the physical coordinates corresponding to the image coordinates are determined. The transformation formula is used to represent the correspondence between the image coordinates and the corresponding physical coordinates. The physical coordinates are coordinates that include distortion and Sham perspective distortion. Based on the coordinate expressions of distortion parameters and optomechanical coordinates, the optomechanical coordinates corresponding to the physical coordinates are determined; wherein, the optomechanical coordinates are coordinates that correct Sham perspective distortion and retain distortion, and the distortion parameters are determined through the calibration of the structured light camera; Based on the distortion expression in the form of the coordinate expression and the transformation relationship, the ideal coordinates corresponding to the image coordinates are determined; wherein, the ideal coordinates are coordinates that correct distortion and Sham perspective distortion, and the distortion expression is used to represent the correspondence between the optical-mechanical coordinates and the ideal coordinates; The distortion parameters include distortion parameters and epipolar constraint parameters; The determination of the optomechanical coordinates corresponding to the physical coordinates based on the coordinate expression of distortion parameters and optomechanical coordinates includes: Based on the aforementioned distortion parameters, the Sham perspective distortion matrix is determined; Based on the aforementioned Sham perspective distortion matrix, determine the inverse Sham perspective distortion matrix; The physical coordinates, the epipolar constraint parameters, and the inverse Sham perspective distortion matrix are input into the coordinate expression, and the optomechanical coordinates are output.
2. The distortion correction method for a structured light camera according to claim 1, characterized in that, The camera includes an image sensor; Both the camera's photosensitive element and the optical engine's digital galvanometer are rectangular; The long axis of the photosensitive element is perpendicular to the baseline connecting the photosensitive element and the digital galvanometer. The major axis of the digital galvanometer is perpendicular to the baseline connecting the photosensitive element and the digital galvanometer. The pattern direction projected by the digital galvanometer is parallel to the major axis of the digital galvanometer.
3. The distortion correction method for a structured light camera according to claim 1, characterized in that, The process of determining the physical coordinates corresponding to the image coordinates based on the transformation relationship includes: Determine the phase value of the image coordinates along the direction perpendicular to the major axis of the digital galvanometer; The physical coordinates are determined based on the phase value and the transformation formula.
4. The distortion correction method for a structured light camera according to claim 1, characterized in that, The distortion parameters include the Sham angle. The polar constraint parameters are (a, b); The transformation relationship is as follows: , in, y is the ordinate of the mirror position corresponding to the projection point of the optical axis of the optical engine onto the digital mirror. This refers to the vertical floating-point galvanometer position of the pixels in the image data acquired by the camera on the digital galvanometer. The vertical coordinate is the ordinate of the physical coordinates corresponding to the position of the vertical floating-point galvanometer. The focal length of the optical-mechanical lens is expressed in pixels, and the vertical direction is perpendicular to the major axis of the digital galvanometer, i.e., the minor axis direction of the digital galvanometer. The calculation formula is: , in, The phase value of the image data along the vertical direction. The period value of the pattern projected by the digital galvanometer, in units of the number of galvanometers; The Sham perspective distortion matrix for: ; The inverse Sham perspective distortion matrix for: ; The polar constraint parameters satisfy: ; in, The third-order eigenvalue matrix is determined through the calibration of the structured light camera. The image coordinates; The coordinate expression for the optomechanical coordinates is: , in, Let the optical-mechanical coordinates satisfy: 。 5. The distortion correction method for a structured light camera according to claim 1, characterized in that, The distortion parameters include radial distortion parameters and tangential distortion parameters. The distortion expression of the coordinate expression is as follows: , in: For ideal coordinates A matrix consisting of a single nth-degree polynomial, where the nth-degree polynomial is: , The radial distortion parameter is... For the reason The matrix formed by the quadratic polynomials is: , , , The tangential distortion parameter; , satisfy: 。 6. The distortion correction method for a structured light camera according to claim 5, characterized in that, The determination of the ideal coordinates corresponding to the image coordinates based on the distortion expression in the form of the coordinate expression and the transformation relation includes: Based on the distorted expression of the coordinate expression, construct the iterative expression: , in, For iterative input The number of times; The optomechanical coordinates are used as initial values. Substitute the given iterative expression and iterate. The iteration result is obtained by counting the number of times the value corresponds to the iteration number. ; Will Substituting into the distortion expression, we obtain the optomechanical coordinates. ; Combination Using the Sham perspective distortion matrix, we obtain the physical coordinates of uncorrected Sham perspective distortion and aberration distortion. : ; By combining the transformation formula, the physical coordinates are determined. Vertical physical coordinates Corresponding pixel coordinates Relationship: ; With error value Minimize the value of as the objective, and input the following sequentially. until If the value is less than the preset threshold, or the number of inputs reaches the preset threshold, the iteration ends. The result obtained at the end of the iteration As the ideal coordinates.
7. A distortion correction device for a structured light camera, characterized in that, The structured light camera includes an optical engine and a camera. The optical engine includes at least one digital galvanometer, and the optical engine is tilted about the major axis of its digital galvanometer by a set Schahm angle. The device includes: The determination module is used to acquire image information captured by the camera and determine image coordinates, wherein the image coordinates are coordinates to be corrected; The first conversion module is used to determine the physical coordinates corresponding to the image coordinates based on the conversion formula. The conversion formula is used to represent the correspondence between the image coordinates and the corresponding physical coordinates. The physical coordinates are coordinates that include distortion and Sham perspective distortion. The second conversion module is used to determine the optomechanical coordinates corresponding to the physical coordinates based on the coordinate expression of the distortion parameters and the optomechanical coordinates; wherein the optomechanical coordinates are coordinates that correct Sham perspective distortion and retain distortion distortion, and the distortion parameters are determined by the calibration of the structured light camera; The correction module is used to determine the ideal coordinates corresponding to the image coordinates based on the distortion expression in the form of the coordinate expression and the transformation relationship; wherein, the ideal coordinates are coordinates for correcting distortion and Sham perspective distortion, and the distortion expression is used to represent the correspondence between the optical-mechanical coordinates and the ideal coordinates; The distortion parameters include distortion parameters and epipolar constraint parameters; The second conversion module is specifically used to determine the Sham perspective distortion matrix based on the distortion parameters; Based on the aforementioned Sham perspective distortion matrix, determine the inverse Sham perspective distortion matrix; The physical coordinates, the epipolar constraint parameters, and the inverse Sham perspective distortion matrix are input into the coordinate expression, and the optomechanical coordinates are output.
8. A control device, characterized in that, include: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, cause the control device to perform the structured light camera distortion correction method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the structured light camera distortion correction method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes computer execution instructions, which, when executed by a processor, are used to implement the structured light camera distortion correction method as described in any one of claims 1 to 6.