CN114739321A - Structural light striation correction method for precise grating measurement - Google Patents
Structural light striation correction method for precise grating measurement Download PDFInfo
- Publication number
- CN114739321A CN114739321A CN202210514853.1A CN202210514853A CN114739321A CN 114739321 A CN114739321 A CN 114739321A CN 202210514853 A CN202210514853 A CN 202210514853A CN 114739321 A CN114739321 A CN 114739321A
- Authority
- CN
- China
- Prior art keywords
- projector
- structured light
- pose
- intensity
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/24—Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
- G01B11/25—Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object
- G01B11/2531—Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures by projecting a pattern, e.g. one or more lines, moiré fringes on the object using several gratings, projected with variable angle of incidence on the object, and one detection device
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The application discloses a method for correcting structured light striations for precise grating measurement, which comprises the following steps: shooting an image projected by the projector by using a camera to obtain a camera shooting image; acquiring coordinates of a plurality of pairs of corresponding angular points in a camera shooting image and a projector burning image; solving an equation according to the coordinates of a plurality of pairs of corresponding corner points to obtain a pose transformation matrix; carrying out pose correction on the structural light stripes according to the pose conversion matrix; shooting a blank pattern projected onto a reference surface by a projector by using a camera to obtain a blank pattern A0; determining the attenuation degree of the intensity of the structured light stripe on the reference surface according to the gray scale data of the blank pattern A0; the intensity of the structured light fringes is compensated according to the attenuation degree. The method and the device solve the defects of the structural light striation correction method for the precise measurement of the grating in the prior art, thereby improving the precision of the precise measurement system of the grating.
Description
Technical Field
The application relates to the field of correction of structured light striations, in particular to a structured light striation correction method for precise grating measurement.
Background
The grating precision measurement technology is an important branch of the optical three-dimensional measurement field, can realize three-dimensional reconstruction and non-contact measurement of a measured object by matching a projector and an industrial camera, has the advantages of low cost, high measurement speed, high resolution and the like, and is widely applied to the fields of quality detection, reverse engineering, medical imaging, robot navigation, augmented reality and the like.
In the precise grating measurement process, the standard sine of the structured light striations projected by the projector is an important guarantee for high-precision three-dimensional reconstruction and detection. When the grating precision measurement technology is applied to a small area (such as three-dimensional reconstruction of a printed circuit board), in order to ensure the integrity of a reconstruction area, the system structure is usually that a plurality of projectors are obliquely arranged and cameras are vertically arranged (such as VR5000 series of Chinesian, Japan), and the arrangement mode destroys the periodicity and light intensity of the structured light stripes and seriously affects the measurement precision. Therefore, a calibration method is needed to obtain standard sinusoidal structured light stripes.
In the prior art, there are methods capable of correcting the structured light stripe to obtain a standard sinusoidal structured light stripe, but the prior art structured light stripe correction method for precise measurement of the grating has the following disadvantages:
1. the correction process is complex, the system parameters to be calibrated are excessive, and the precision of the system parameters is difficult to ensure;
2. various data tables need to be established, and correction is carried out in a table look-up mode, so that the correction speed is influenced;
3. the projector is required to project a plurality of fringe images, and through the steps of phase encoding, phase decoding and the like, more errors are introduced, so that the phase precision of the structured light fringes is not ensured.
Disclosure of Invention
The embodiment of the application provides a method for correcting structured light striations for precise measurement of a grating, which is used for at least solving the defects of the method for correcting the structured light striations for precise measurement of the grating in the prior art.
According to one aspect of the application, a method for correcting structured light striations for precise measurement of a grating is provided, which comprises the following steps: shooting an image projected on a reference surface by a projector by using a camera to obtain a camera shooting image, wherein the image projected by the projector is a projector burning image; acquiring coordinates of a plurality of pairs of corresponding angular points in a camera shooting image and a projector burning image; solving an equation according to the coordinates of the multiple pairs of corresponding corner points to obtain a pose transformation matrix, wherein the equation is a pose relation equation between the camera coordinate system and the projector coordinate system, unknown parameters in the relation equation are the pose transformation matrix, and the pose transformation matrix is used for describing the relation between the camera coordinate system and the projector coordinate system; carrying out pose correction on the structural light stripes according to the pose conversion matrix; shooting a blank pattern projected on a reference surface by a projector by using the camera to obtain a blank pattern A0, wherein the blank image projected by the projector is subjected to the pose correction, and the blank image projected by the projector is consistent with the background light intensity of the structured light stripes; determining the attenuation degree of the intensity of the structured light stripe on the reference surface according to the gray scale data of the blank pattern A0; and compensating the intensity of the structured light stripes according to the attenuation degree, wherein the difference value between the intensity of the structured light stripes after compensation and the intensity of ideal structured light stripes configured in advance is smaller than an error threshold value.
Further, the projector burning image is a checkerboard pattern.
Further, pose correction of the structured light stripes according to the pose transformation matrix includes: determining the resolution of standard structured light stripes according to the resolution of the projector and the pose transformation matrix; generating the standard structured light stripes by a computer according to the resolution ratio of the standard structured light stripes; and correcting the pose of the structured light stripe according to the generated standard structured light stripe and the pose conversion matrix.
Further, solving an equation according to the coordinates of the multiple pairs of corresponding corner points to obtain a pose transformation matrix includes:
the conversion relation between the camera pixel coordinate system and the projector pixel coordinate system is constructed as follows:
wherein the pose transformation matrix is H, H1To h9Is an element in the matrix H; m and n respectively represent horizontal and vertical coordinates in a camera pixel coordinate system, and u and v respectively represent horizontal and vertical coordinates in a projector pixel coordinate system; solving the conversion relation according to the coordinates of the multiple pairs of corresponding corner points to obtain H of the pose conversion matrix H1To h8Wherein h is9At 1, the coordinates (m, n) and (u and v) of the corresponding corner points of the pairs are known, the pairs being more than 4 pairs.
Further, determining the degree of attenuation of the intensity of the structured light stripe on the reference surface comprises: obtaining the light intensity function S of the x line by polynomial fitting based on the x line gray scale data of the blank pattern A0x(y):
In the formula, x and y respectively represent row and column coordinates of the image, aiIs a coefficient of polynomial fitting, i is more than or equal to 1 and less than or equal to n, and n represents an order;
determining the maximum value of the x-th line intensityAttenuation degree function S 'of line x'x(y) is:
further, compensating the intensity of the structured light stripe according to the attenuation degree comprises:
current light intensity I based on the x-th line of the structured light stripe patternx(y) divided by an attenuation function S'x(y) the sinusoidal intensity of the x-th line of the current fringe pattern can be compensatedAttenuated, line x compensated light intensity I'xComprises the following steps:
I'x(y)=Ix(y)/S'x(y);
using ideal light intensity I'x(y) and corrected I'x(y) obtaining a light intensity compensation error Ex(y) wherein, said ideal light intensity I "x(y) is preconfigured, said Ex(y) is defined as follows:
Ex(y)=I”x(y)-I'x(y);
if E isx(y) is greater than a preconfigured threshold, then the coefficients of the polynomial fit are adjusted until a suitable decaying fitting function S 'is obtained'x(y); wherein, I "x(y) fitting a function S 'to the appropriate attenuation'x(y) calculated I'xThe difference of (y) is less than a preconfigured error threshold.
In the embodiment of the application, a camera is used for shooting an image projected on a reference surface by a projector to obtain a camera shooting image, wherein the image projected by the projector is a projector burning image; acquiring coordinates of a plurality of pairs of corresponding angular points in a camera shooting image and a projector burning image; solving an equation according to the coordinates of the multiple pairs of corresponding corner points to obtain a pose transformation matrix, wherein the equation is a pose relation equation between the camera coordinate system and the projector coordinate system, unknown parameters in the relation equation are the pose transformation matrix, and the pose transformation matrix is used for describing the relation between the camera coordinate system and the projector coordinate system; carrying out pose correction on the structural light stripes according to the pose conversion matrix; shooting a blank pattern projected on a reference surface by a projector by using the camera to obtain a blank pattern A0, wherein the blank image projected by the projector is subjected to the pose correction, and the blank image projected by the projector is consistent with the background light intensity of the structured light stripes; determining the attenuation degree of the intensity of the structured light stripe on the reference surface according to the gray scale data of the blank pattern A0; and compensating the intensity of the structured light stripes according to the attenuation degree, wherein the difference between the intensity of the structured light stripes after compensation and the intensity of ideal structured light stripes configured in advance is smaller than an error threshold value. The method and the device solve the defects of the structural striation correction method for the precise grating measurement in the prior art, thereby improving the precision of the precise grating measurement system.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
FIG. 1 is a flow chart of a method for structured light streak correction according to an embodiment of the present application;
FIG. 2 is a checkerboard diagram burned by a projector according to an embodiment of the present application;
FIG. 3 is a checkerboard plot captured by a camera according to an embodiment of the present application;
FIG. 4 is a fringe pattern burned by a projector according to an embodiment of the present application;
FIG. 5 is a fringe pattern taken by a pre-correction camera according to an embodiment of the present application;
FIG. 6 is a pre-corrected fringe pattern burned by a projector according to an embodiment of the present application;
fig. 7 is a pose correction fringe pattern photographed by a camera according to an embodiment of the present application;
FIG. 8 is a schematic diagram of the pitch fluctuation of the 100 th row of stripes before and after correction according to an embodiment of the present application;
fig. 9 is a schematic diagram of a grayscale curve of line 100 of the corrected pose according to an embodiment of the present application;
fig. 10 is a pose-corrected blank map a0 according to an embodiment of the present application;
FIG. 11 is a diagram illustrating the variation of light intensity in line 1000 of a blank A0 according to an embodiment of the present application;
FIG. 12 is a diagram illustrating comparison of light intensity before and after light intensity correction according to an embodiment of the present application;
FIG. 13 is a light intensity corrected fringe pattern taken by a camera according to an embodiment of the present application;
fig. 14 is a flowchart of a method for correcting structured light striations for precision measurement of gratings according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
It should be noted that, although a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different than that shown or described herein.
When the grating precision measurement technology is applied to precision three-dimensional reconstruction of a small area, in order to ensure the integrity of a reconstruction area, the system structure is usually that a plurality of projectors are obliquely installed and a camera is vertically installed, so that the distances of structured light sine stripes obliquely projected by the projectors are sequentially increased from the optical axis to two sides, and the light intensity is attenuated from the optical axis to two sides, which is contrary to the periodic sine stripes with uniform light intensity required by a measurement system. Therefore, in order to obtain standard structured light sine fringes on a projection plane and realize correct phase solution in a three-dimensional reconstruction process to ensure measurement accuracy, the correction of the fringes is necessary. This embodiment can also be used for keystone correction of projectors, and projector distortion correction caused by DMD chips in a diamond array (such as DLP4500 projectors from TI corporation).
In the present embodiment, a method for correcting a structured light stripe for precise measurement of a grating is provided, and fig. 14 is a flowchart of a method for correcting a structured light stripe for precise measurement of a grating according to an embodiment of the present application, as shown in fig. 14, where the flowchart includes the following steps:
step S102, shooting an image (for example, the projector burning image can be a checkerboard pattern) projected on a reference surface by a projector by using a camera to obtain a camera shooting image, wherein the image projected by the projector is the projector burning image;
step S104, acquiring coordinates of a plurality of pairs of corresponding corner points in a camera shooting image and a projector burning image;
step S106, solving an equation according to the coordinates of the multiple pairs of corresponding corner points to obtain a pose transformation matrix, wherein the equation is a pose relation equation between the camera coordinate system and the projector coordinate system, unknown parameters in the relation equation are the pose transformation matrix, and the pose transformation matrix is used for describing the relation between the camera coordinate system and the projector coordinate system;
step S108, correcting the pose of the structured light stripe according to the pose transformation matrix;
in this step, the pose of the structured light stripe can be corrected as follows: and determining the resolution ratio of the standard structured light stripe according to the resolution ratio of the projector and the pose conversion matrix, generating the standard structured light stripe by using a computer according to the resolution ratio of the standard structured light stripe, and correcting the pose of the structured light stripe according to the generated standard structured light stripe and the pose conversion matrix.
Step S110, shooting a blank pattern projected on a reference surface by a projector by using the camera to obtain a blank pattern A0, wherein the blank image projected by the projector is subjected to pose correction, and the blank image projected by the projector is consistent with the background light intensity of the structured light stripes;
step S112, determining the attenuation degree of the intensity of the structured light stripe on the reference surface according to the gray scale data of the blank pattern A0;
and step S114, compensating the intensity of the structured light stripes according to the attenuation degree, wherein the difference value between the intensity of the structured light stripes after compensation and the intensity of ideal structured light stripes configured in advance is smaller than an error threshold value.
Through the steps, the pose of the structured light stripe is corrected, and the intensity of the structured light stripe is compensated, so that the defects of the structured light stripe correction method for grating precision measurement in the prior art are overcome, and the precision of the grating precision measurement system is improved.
In the above step S112, there are various ways of determining the degree of attenuation, for example,
x-th row gray data based on blank pattern A0Obtaining the light intensity function S of the x-th line by polynomial fittingx(y):
In the formula, x and y respectively represent row and column coordinates of the image, aiIs a coefficient of polynomial fitting, i is more than or equal to 1 and less than or equal to n, and n represents an order;
determining the maximum value of the x-th line intensityAttenuation degree function S 'of line x'x(y) is:
at this time, compensating the intensity of the structured light stripe according to the attenuation degree may include:
current light intensity I based on the xth line of the structured light stripe patternx(y) divided by an attenuation function S'x(y) the sinusoidal intensity decay of the current fringe pattern line x, line x compensated intensity l'xComprises the following steps:
I'x(y)=Ix(y)/S'x(y);
using ideal light intensity I'x(y) and corrected I'x(y) obtaining a light intensity compensation error Ex(y), wherein the ideal light intensity I "x(y) is preconfigured, said Ex(y) is defined as follows:
Ex(y)=I”x(y)-I'x(y);
if Ex(y) is greater than a preconfigured threshold, then the coefficients of the polynomial fit are adjusted until a suitable decaying fitting function S 'is obtained'x(y); wherein, I "x(y) fitting a function S 'to the appropriate attenuation'x(y) calculated I'x(y) the difference is less than a preconfigured threshold.
An alternative embodiment is described below with reference to the accompanying drawings. Fig. 1 is a flowchart of a method for correcting a structured light streak according to an embodiment of the present application, and an overall flow in the embodiment is illustrated in fig. 1. As shown in fig. 1, the projector projects a checkerboard, the camera shoots the projected checkerboard, and then the corner coordinates of the two checkerboards are identified (for example, the identification may be performed by a corner coordinate identification algorithm, and the calculation in this embodiment may be performed by using an existing corner coordinate identification algorithm as long as the corner coordinates can be identified). And solving the pose transformation matrix, calculating the length and width of the standard fringe image according to the resolution of the projector, and generating a digital standard image by using a computer (adding a blank map in the step). And correcting the pose of the structural light striations according to the pose transformation matrix. The method comprises the steps that a blank image projected by a projector is shot by a camera, a light intensity attenuation curve is obtained, the maximum value of light intensity on the attenuation curve is determined through polynomial fitting, a light intensity compensation function is defined, primary correction of stripe light intensity is completed, then correction error analysis is carried out, if the correction is proper, correction of the structural stripe is completed, and if the correction is not proper, the step of obtaining the light intensity attenuation curve is returned.
In the steps shown in fig. 1, mainly a streak pose correction method and a streak light intensity correction method are involved. These two aspects are explained below separately. Step (step) 1 to step 3 are methods for correcting the pose of the streak, and step4 to step 7 are methods for correcting the light intensity of the streak.
Step1, establishing a pose transformation model
According to the calibration process of the camera, the conversion relationship between the camera pixel coordinate system and the world coordinate system is as follows:
in the formula scIs a scale factor, m and n respectively represent the horizontal and vertical coordinates in the camera pixel coordinate system, AcIs an internal parameter of the camera, which is only related to the hardware structure of the camera, RcAnd TcIs an external space pose change matrix; hcIs described between pixel coordinates and world coordinatesHomography matrix of mapping relationships, xw、yw、zwThe coordinates are respectively corresponding to an x axis, a y axis and a z axis in a world coordinate system.
Since the projector projects a projected image inside hardware into the real world, which is the inverse process of the image taken by the camera, based on the conversion model of the pixel coordinate system of the camera to the world coordinates, the coordinate conversion relationship for the projector can be obtained:
wherein u and v respectively represent the horizontal and vertical coordinates in the projector pixel coordinate system, and the meaning of the other parameters is similar to that of formula (1), wherein spIs the proportionality coefficient, ApIs an internal parameter of the projector, RpAnd TpIs an external space pose change matrix of the projector; hpIs a homography matrix describing the mapping between world coordinates and pixel coordinates.
Therefore, based on the transformation relationship between the projector world coordinate system and the pixel coordinate system, the transformation relationship between the camera pixel coordinate system and the projector pixel coordinate system is constructed as follows:
therefore, the pose transformation model between the projector pixel coordinate system and the camera pixel coordinate system is shown in formula (5), wherein the pose transformation matrix H (H)1To h9As an element in the matrix H) is the "world coordinate system" with the camera's pixel coordinate system as the projectorBased on the relationship, taking the undistorted stripe in the pixel coordinate system of the camera as a reference, the pre-modulation stripe in the pixel coordinate system of the projector can be reversely solved, and the sinusoidal pose correction of the structured light stripe is realized.
And Step 2, solving a pose transformation matrix H.
(1) And the camera shoots the checkerboard pattern projected by the projector.
(2) And determining the coordinates of the corner points of the burnt images of the projector and the coordinates of the corner points of the images shot by the camera (the default camera and the camera are calibrated) by utilizing a findchessboardcorrers () function of a Matlab tool box or an OpenCV.
(3) And finding out at least 4 pairs of corresponding points, wherein the coordinates of the corner points of the image collected by the camera are substituted into (m, n), and the coordinates of the corner points of the burnt image of the projector are substituted into (u, v).
(4) According to perspective geometric transformation in the camera calibration process, 8 degrees of freedom are defined for a pose transformation matrix H of two planes, so that 8 parameters in the H matrix can be solved for 4 diagonal points corresponding to a camera pixel coordinate system-projector pixel coordinate system, but under normal conditions, collected corner coordinates contain a large amount of noise, real corner coordinate values are difficult to estimate, and therefore, the real H matrix needs to be estimated by using corner points far larger than 4 pairs.
(5) The equation formed by the multiple diagonal points is a homogeneous over-definite equation, and 8 parameters of the H matrix can be solved by using a Singular Value Decomposition (SVD) method. What is solved here is H in the H matrix1To h8Wherein h is9It is 1 because of the scale invariance of the homogeneous coordinate system as shown in (5).
It should be noted that a plurality of pairs of corresponding points can be found from the corner coordinates of the burnt image of the projector and the corner coordinates of the image shot by the camera, and the plurality of pairs of corresponding points are substituted into the pose transformation model formula (5), so that the pose transformation matrix H can be obtained by solving, the solving process can use the existing mathematical solving method, and the details are not repeated in this embodiment.
Step 3, solving the pre-corrected image.
And after the homography matrix is determined, the resolution of the structured light 'standard sine stripe image' is determined according to the resolution of the projector and the pose transformation matrix H. In the process, the problem that the resolution of an 'ideal pose image' is not an integer can occur, and an integer is obtained by selecting a nearby integer taking function, wherein the function has the defect that the image edge is in a sawtooth shape, but the smooth image edge is not obtained by the optimization algorithm processing in consideration of the fidelity of data.
And then, based on the obtained resolution of the structured light standard sine stripe image, obtaining an ideal pose image by using a digital image generation algorithm. Wherein, the ideal pose image is a structured light standard sine stripe image. And determining the resolution of the image of the ideal pose, namely simply: if the resolution of the image burned by the projector is 912 x 1140, then u is 912, v is 1140, h is in formula (5)1To h9It is known that the resolution m and n of the ideal pose can be solved. Then, after m and n are determined, a structured light standard sinusoidal fringe image of m x n is generated by a computer.
In(x, y) represents the intensity at coordinates (x, y), A (x, y) is the background intensity, B (x, y) is the modulated intensity,for corresponding sinusoidal phase, δnIs the phase shift step size.
According to the light intensity definition formula, the structural light standard sine image can be obtained by compiling related codes.
And finally, reversely solving a pre-correction image of the stripe based on the structured light 'standard sine stripe' image of the structured light stripe and the pose conversion matrix H to finish pose correction of the structured light stripe.
And (3) reversely solving a pre-corrected image of the fringe, namely replacing the light intensity at the position (u, v) with the light intensity at the position (m, n) by using the relationship between the position (u, v) and the position (m, n) established by the formula (5), and obtaining the pre-corrected image. Pre-correcting an image: the structured light standard pose image is pose precorrected (see fig. 6) so that the projector tilts the projected fringe image so that the fringes remain vertical and the phase remains standard sinusoidally varied (see fig. 7).
Step4, determining the degree of the light intensity attenuation of the stripes.
The projector projects a blank pattern consistent with the background light intensity of the structured light stripes to the reference surface (at the moment, the projected pattern is corrected by the pose of Step1-Step 3), and the camera acquires the blank pattern A0 to obtain the gray data of the blank pattern. The reference plane refers to a measurement plane perpendicular to the optical axis of the camera in the measurement system.
And Step 5, determining the attenuation function of the light intensity of the stripes.
Based on the x-th row gray scale data of the blank pattern A0, a polynomial fitting is utilized to obtain a light intensity function S of the x-th rowx:
In the formula, x and y respectively represent row and column coordinates of the image, aiIs the coefficient of polynomial fitting, i is more than or equal to 1 and less than or equal to n, and n represents the order.
Then, the maximum value of the light intensity of the x-th line is determinedSo the attenuation function S 'of line x'x(y)
It should be noted that, because the number of lines of the image captured by the camera is large, and adjusting the fitting parameters for each line is not favorable for the correction efficiency, the number of lines of the image is divided into a plurality of intervals, and the same fitting function is used in each interval. For example, 2048 × 2448 fringe patterns can be divided into j sections, that is, the length of each section is 2048/j, the size of j depends on the requirement of image correction, and if the requirement is high in precision, a large j is set; if the required calibration efficiency is high, a smaller j is designed.
And Step 6, calculating the compensation light intensity of the stripes.
Current light intensity I based on the x-th line of the structured light stripe patternx(y) divided by an attenuation function S'x(y) Compensation for sinusoidal intensity decay for line x of the current fringe pattern, compensated intensity l 'for line x'xIs composed of
I'x(y)=Ix(y)/S'x(y) (8)
And Step 7, iteratively optimizing parameters of the polynomial fitting function to obtain an optimal light intensity compensation function.
Using ideal light intensity I'x(y) and corrected I'x(y) obtaining a light intensity observation compensation condition Ex(y) if Ex(y) if the value is larger, optimizing the parameters of polynomial fitting to obtain a proper attenuation fitting function S'x(y) to Ex(y) is less than a preconfigured threshold,
wherein Ex(y) is defined as follows:
Ex(y)=I”x(y)-I'x(y) (9)
through the embodiment, the correction of the structured light striations is divided into pose correction and light intensity correction, and high-precision correction of the structured light striations is achieved. The method for correcting the pose of the structured light stripe provided by the embodiment only projects one checkerboard pattern, and an actual calibration board is not needed; the stripe pose correction in the embodiment completes the accurate identification of the corner points of the projection pattern by means of a mature camera calibration program, and the precision of the pose conversion model is effectively ensured.
The stripe pose correction method in the above embodiment is not only suitable for sinusoidal correction of structured light stripes in the field of precise grating measurement, but also suitable for trapezoidal correction of projectors and projector distortion correction using DMD chips with diamond arrays (such as DLP4500 of TI corporation);
the light intensity correction of the structured light stripes in the embodiment determines the light intensity attenuation by using the projection blank image, and quantifies the attenuation degree of the grating stripes. In addition, the light intensity correction of the structured light stripe in the embodiment accurately approximates the attenuation model of the structured light stripe by using a polynomial fitting method, which is beneficial to improving the accuracy of the stripe correction.
The effects of the present embodiment will be described below with reference to an example.
By utilizing a pattern burnt by a projector (figure 2) and an image collected by a camera (figure 3), firstly, a pose transformation matrix H is obtained by applying the method of the invention as [0.1169, -0.0167,289.2146; -0.0417,0.2468,331.2363; -2.87e-5, -1.75e-5,1 ].
Converting a fringe pattern (figure 4) of a pattern required to be burned into a projector into a pre-correction pattern (figure 6) by using a pose conversion matrix; correspondingly, the pattern shot by the camera is corrected from a distorted image (figure 5) to a standard pose fringe pattern (figure 7), figure 8 shows the fluctuation of the interval change of the structural light fringes before and after pose correction, the corrected interval fluctuation can be found to be within 8 pixels, the correction effect is good, figure 9 shows the corrected position change of the grating fringes, the intervals of the structural light fringes can be found to be basically the same, but the light intensity of the fringes is attenuated to a certain extent.
Then, a pose-corrected blank map a0 (fig. 10) is acquired based on the camera, and the light intensity gray scale data of the 1000 th line thereof is fitted with a polynomial as shown in fig. 11. By using the light intensity correction method provided by the invention, the sinusoid of the structured light stripe can be found to be effectively corrected by the method provided by the invention as shown in fig. 12 before and after the 1000 th line light intensity gray scale data of the stripe pattern is compensated. The corrected light intensity correction fringe pattern is as shown in fig. 13, compared with the original image (fig. 5), the original image has unequal intervals of the structural light fringes, dark left light intensity and bright right light intensity, and the corrected image 13 has almost the same fringe intervals, more uniform overall gray scale change of the fringes and almost no difference in gray scale change of the left side and the right side.
The embodiment overcomes the defects of the structural light striation correction method for the precise measurement of the grating in the prior art, thereby improving the precision of the precise measurement system of the grating.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.
Claims (6)
1. A method for correcting structured light striations for precise measurement of a grating is characterized by comprising the following steps:
shooting an image projected on a reference surface by a projector by using a camera to obtain a camera shooting image, wherein the image projected by the projector is a projector burning image;
acquiring coordinates of a plurality of pairs of corresponding angular points in a camera shooting image and a projector burning image;
solving an equation according to the coordinates of the multiple pairs of corresponding corner points to obtain a pose transformation matrix, wherein the equation is a pose relation equation between the camera coordinate system and the projector coordinate system, unknown parameters in the relation equation are the pose transformation matrix, and the pose transformation matrix is used for describing the relation between the camera coordinate system and the projector coordinate system;
carrying out pose correction on the structural light stripes according to the pose conversion matrix;
shooting a blank pattern projected on a reference surface by a projector by using the camera to obtain a blank pattern A0, wherein the blank image projected by the projector is subjected to the pose correction, and the blank image projected by the projector is consistent with the background light intensity of the structured light stripes;
determining the attenuation degree of the intensity of the structured light stripe on the reference surface according to the gray scale data of the blank pattern A0;
and compensating the intensity of the structured light stripes according to the attenuation degree, wherein the difference value between the intensity of the structured light stripes after compensation and the intensity of ideal structured light stripes configured in advance is smaller than an error threshold value.
2. The method of claim 1, wherein the projector burned image is a checkerboard pattern.
3. The method of claim 1, wherein pose correcting the structured light stripes according to the pose transformation matrix comprises:
determining the resolution of standard structured light striations according to the resolution of the projector and the pose transformation matrix;
generating standard structured light stripes by using a computer according to the resolution ratio of the standard structured light stripes;
and correcting the pose of the structured light stripe according to the generated standard structured light stripe and the pose conversion matrix.
4. The method of claim 1, wherein solving equations according to the coordinates of the pairs of corresponding corner points to obtain a pose transformation matrix comprises:
the conversion relation between the camera pixel coordinate system and the projector pixel coordinate system is constructed as follows:
wherein the pose transformation matrix is H, H1To h9Is an element in the matrix H; m and n respectively represent horizontal and vertical coordinates in a camera pixel coordinate system, and u and v respectively represent horizontal and vertical coordinates in a projector pixel coordinate system;
solving the conversion relation according to the coordinates of the multiple pairs of corresponding corner points to obtain H of the pose conversion matrix H1To h8Wherein h is9At 1, the coordinates (m, n) and (u and v) of the corresponding corner points of the pairs are known, the pairs being greater than 4 pairs.
5. The method of claim 1, wherein determining the degree of attenuation of the intensity of structured light fringes at the reference plane comprises:
based on the x-th row gray scale data of the blank pattern A0, a polynomial fitting is utilized to obtain a light intensity function S of the x-th rowx(y):
In the formula, x and y respectively represent row and column coordinates of the image, aiIs a coefficient of polynomial fitting, i is more than or equal to 1 and less than or equal to n, and n represents an order;
determining the maximum value of the x-th line intensityAttenuation degree function S 'of line x'x(y) is:
6. the method of claim 5, wherein compensating the intensity of the structured light fringes according to the attenuation level comprises:
current light intensity I based on the xth line of the structured light stripe patternx(y) divided by an attenuation function S'x(y) the sinusoidal intensity decay of the current fringe pattern line x, line x compensated intensity l'xComprises the following steps:
I′x(y)=Ix(y)/S′x(y);
using ideal light intensity Ix(y) and corrected I'x(y) obtaining a light intensity compensation error Ex(y), wherein the ideal light intensity I ″)x(y) is preconfigured, said Ex(y) is defined as follows:
Ex(y)=I″x(y)-I′x(y);
if E isx(y) is greater than a preconfigured threshold, then the coefficients of the polynomial fit are adjusted until a suitable decaying fitting function S 'is obtained'x(y); wherein, I ″)x(y) fitting a function S 'to the appropriate attenuation'x(y) calculated I'xThe difference of (y) is less than a preconfigured error threshold.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210514853.1A CN114739321B (en) | 2022-05-12 | 2022-05-12 | Structural light striation correction method for precise grating measurement |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210514853.1A CN114739321B (en) | 2022-05-12 | 2022-05-12 | Structural light striation correction method for precise grating measurement |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114739321A true CN114739321A (en) | 2022-07-12 |
CN114739321B CN114739321B (en) | 2023-01-24 |
Family
ID=82284842
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210514853.1A Active CN114739321B (en) | 2022-05-12 | 2022-05-12 | Structural light striation correction method for precise grating measurement |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114739321B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116147535B (en) * | 2023-02-27 | 2023-08-04 | 北京朗视仪器股份有限公司 | Color structure light calibration method and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120176547A1 (en) * | 2009-09-16 | 2012-07-12 | Hassane Guermoud | Image processing method |
CN112614075A (en) * | 2020-12-29 | 2021-04-06 | 凌云光技术股份有限公司 | Distortion correction method and equipment for surface structured light 3D system |
CN114264253A (en) * | 2021-12-09 | 2022-04-01 | 北京科技大学 | High-temperature object three-dimensional contour non-contact measuring device and measuring method thereof |
CN114594588A (en) * | 2022-01-20 | 2022-06-07 | 西安电子科技大学 | Structured light illumination microscopic device and method based on grating projection and SLM phase shift |
-
2022
- 2022-05-12 CN CN202210514853.1A patent/CN114739321B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120176547A1 (en) * | 2009-09-16 | 2012-07-12 | Hassane Guermoud | Image processing method |
CN112614075A (en) * | 2020-12-29 | 2021-04-06 | 凌云光技术股份有限公司 | Distortion correction method and equipment for surface structured light 3D system |
CN114264253A (en) * | 2021-12-09 | 2022-04-01 | 北京科技大学 | High-temperature object three-dimensional contour non-contact measuring device and measuring method thereof |
CN114594588A (en) * | 2022-01-20 | 2022-06-07 | 西安电子科技大学 | Structured light illumination microscopic device and method based on grating projection and SLM phase shift |
Non-Patent Citations (1)
Title |
---|
胡洋頔等: "基于逐点补偿方法的动态散射成像", 《激光与光电子学进展》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116147535B (en) * | 2023-02-27 | 2023-08-04 | 北京朗视仪器股份有限公司 | Color structure light calibration method and system |
Also Published As
Publication number | Publication date |
---|---|
CN114739321B (en) | 2023-01-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107110637B (en) | The calibration of three-dimension measuring system is updated | |
Douxchamps et al. | High-accuracy and robust localization of large control markers for geometric camera calibration | |
CN106504290B (en) | A kind of high-precision video camera dynamic calibrating method | |
US9605961B2 (en) | Information processing apparatus that performs three-dimensional shape measurement, information processing method, and storage medium | |
WO2018029950A1 (en) | Calibration device, calibration method, optical device, imaging device and projection device | |
CN107610183B (en) | Calibration method of fringe projection phase height conversion mapping model | |
Dufour et al. | Integrated digital image correlation for the evaluation and correction of optical distortions | |
Huang et al. | A single-shot-per-pose camera-projector calibration system for imperfect planar targets | |
JPWO2008078744A1 (en) | Three-dimensional shape measuring apparatus, method and program by pattern projection method | |
CN112614075B (en) | Distortion correction method and equipment for surface structured light 3D system | |
CN110738608B (en) | Plane image correction method and system | |
CN114111633A (en) | Projector lens distortion error correction method for structured light three-dimensional measurement | |
CN115457147A (en) | Camera calibration method, electronic device and storage medium | |
CN110108230B (en) | Binary grating projection defocus degree evaluation method based on image difference and LM iteration | |
CN112985258B (en) | Calibration method and measurement method of three-dimensional measurement system | |
CN116608794B (en) | Anti-texture 3D structured light imaging method, system, device and storage medium | |
CN114739321B (en) | Structural light striation correction method for precise grating measurement | |
CN111006599B (en) | Object surface micro-scale measurement method based on pixel grating and computer vision | |
CN113865514B (en) | Calibration method of line structured light three-dimensional measurement system | |
CN114234846B (en) | Rapid nonlinear compensation method based on double-response curve fitting | |
CN112529792B (en) | Distortion correction method for distortion-free model camera | |
CN113160393A (en) | High-precision three-dimensional reconstruction method and device based on large field depth and related components thereof | |
CN115900580B (en) | Structured light three-dimensional imaging system and nonlinear error suppression method | |
CN113686264B (en) | Three-dimensional measurement method and system based on polar line geometry | |
CN117073578B (en) | Active projection nonlinear Gamma correction method for fringe projection profilometry |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |