CN114739321B - Structural light striation correction method for precise grating measurement - Google Patents

Structural light striation correction method for precise grating measurement Download PDF

Info

Publication number
CN114739321B
CN114739321B CN202210514853.1A CN202210514853A CN114739321B CN 114739321 B CN114739321 B CN 114739321B CN 202210514853 A CN202210514853 A CN 202210514853A CN 114739321 B CN114739321 B CN 114739321B
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.)
Active
Application number
CN202210514853.1A
Other languages
Chinese (zh)
Other versions
CN114739321A (en
Inventor
周海波
张超龙
陈博宇
段吉安
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Central South University
Original Assignee
Central South University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Central South University filed Critical Central South University
Priority to CN202210514853.1A priority Critical patent/CN114739321B/en
Publication of CN114739321A publication Critical patent/CN114739321A/en
Application granted granted Critical
Publication of CN114739321B publication Critical patent/CN114739321B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/24Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
    • G01B11/25Measuring 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/2531Measuring 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis 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 measurement of a grating, 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 the multiple pairs of corresponding corner points to obtain a pose transformation matrix; correcting the pose of the structural light stripe according to the pose conversion matrix; shooting a blank pattern projected to 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 stripes on the reference surface according to the gray data of the blank pattern A0; the intensity of the structured light fringes is compensated according to the degree of attenuation. 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

Structural light striation correction method for precise grating measurement
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 correction 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 required 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 structured 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 corrected by the pose, and the blank image projected by the projector is consistent with the background light intensity of the structured light striations; determining the attenuation degree of the intensity of the structured light stripes 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.
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:
Figure BDA0003641071170000021
wherein the pose transformation matrix is H, H 1 To h 9 Is 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 transformation relation according to the coordinates of the multiple pairs of corresponding corner points to obtain H in the pose transformation matrix H 1 To h 8 Wherein h is 9 At 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-th line by utilizing polynomial fitting based on the x-th line gray scale data of the blank pattern A0 x (y):
Figure BDA0003641071170000022
In the formula, x and y respectively represent row and column coordinates of the image, a i Is 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 light intensity
Figure BDA0003641071170000031
Attenuation degree function S 'of line x' x (y) is:
Figure BDA0003641071170000032
further, compensating the intensity of the structured light fringes according to the attenuation degree comprises:
current light intensity I based on the x-th line of the structured light stripe pattern x (y) divided by an attenuation function S' x (y) sinusoidal intensity decay for line x of the current fringe pattern may be compensated, compensated intensity I 'for line x' x Comprises the following steps:
I' x (y)=I x (y)/S' x (y);
using ideal light intensity I' x (y) and corrected I' x (y) obtaining a light intensity compensation error E x (y), wherein the ideal light intensity I " x (y) is preconfigured, said E x (y) is defined as follows:
E x (y)=I” x (y)-I' x (y);
if E x (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) and using the suitable attenuation fitting function S' x (y) calculated to give I' x The difference of (y) is less than a preconfigured error threshold.
In the embodiment of the application, a camera is adopted to shoot an image projected on a reference surface by a projector to obtain a camera shot 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 corrected by the pose, and the blank image projected by the projector is consistent with the background light intensity of the structured light striations; determining the attenuation degree of the intensity of the structured light stripes on the reference surface according to the gray 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. 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.
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 of camera acquisitions according to embodiments 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 streak diagram 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 pose correction according to an embodiment of the 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 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, in the present application, the embodiments and features of the embodiments 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 the standard structured light sine fringes on the projection plane and realize correct dephasing in the three-dimensional reconstruction process to ensure the 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 standard structured light stripes according to the resolution ratio of the projector and the pose conversion matrix, generating the 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 stripes according to the generated standard structured light stripes 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 striations;
step S112, determining the attenuation degree of the intensity of the structured light stripe on the reference surface according to the gray 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,
obtaining the light intensity function S of the x-th line by utilizing polynomial fitting based on the x-th line gray scale data of the blank pattern A0 x (y):
Figure BDA0003641071170000061
In the formula, x and y respectively represent row and column coordinates of the image, a i Is 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 intensity
Figure BDA0003641071170000062
Attenuation degree function S 'of line x' x (y) is:
Figure BDA0003641071170000063
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 x-th line of the structured light stripe pattern x (y) divided by an attenuation function S' x (y) sinusoidal intensity decay for line x of the current fringe pattern may be compensated, compensated intensity I 'for line x' x Comprises the following steps:
I' x (y)=I x (y)/S' x (y);
using ideal light intensity I' x (y) and corrected I' x (y) obtaining a light intensity compensation error E x (y), wherein the ideal light intensity I " x (y) is preconfigured, said E x (y) is defined as follows:
E x (y)=I” x (y)-I' x (y);
if E is x (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 to give 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, a pose correction method for streaks and a light intensity correction method for streaks are mainly 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:
Figure BDA0003641071170000071
in the formula, s c Is a scale factor, m and n respectively represent the horizontal and vertical coordinates in the camera pixel coordinate system, A c Is an internal parameter of the camera, only related to the hardware structure of the camera, R c And T c Is an external space pose change matrix; h c Is a homography matrix, x, describing the mapping relationship between pixel coordinates and world coordinates w 、y w 、z w The 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:
Figure BDA0003641071170000072
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 s p Is the proportionality coefficient, A p Is an internal parameter of the projector, R p And T p Is an external space pose change matrix of the projector; h p Is 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:
Figure BDA0003641071170000081
Figure BDA0003641071170000082
Figure BDA0003641071170000083
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) 1 To h 9 As an element in the matrix H), the pixel coordinate system of the camera is used as the "world coordinate system" of the projector, the pose transformation relationship between the two pixel coordinate systems is determined, and based on the relationship, the "premodulation fringe" in the pixel coordinate system of the projector can be reversely solved by taking the undistorted fringe in the pixel coordinate system of the camera as a reference, so as to realize the sinusoidal pose correction of the structured light fringe.
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) Finding out at least 4 pairs of corresponding points, wherein the angular point coordinates of the image collected by the camera are brought into (m, n), and the angular point coordinates of the burnt image of the projector are brought into (u, v).
(4) As can be seen from perspective geometric transformation in the camera calibration process, 8 degrees of freedom are defined for the 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 in general, collected corner coordinates contain a large amount of noise, and real corner coordinate values are difficult to estimate, so that 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 matrix 1 To h 8 Wherein h is 9 It 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 introduced into the pose transformation model formula (5), so that the pose transformation matrix H can be obtained by solving, the existing mathematical solving method can be used in the solving process, 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 conversion 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 solved resolution ratio 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 =912, v =1140, h in equation (5) 1 To h 9 It 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.
Structured light standard sinusoidal imageThe light intensity of a row defines:
Figure BDA0003641071170000091
I n (x, y) represents the intensity at coordinates (x, y), A (x, y) is the background intensity, B (x, y) is the modulated intensity,
Figure BDA0003641071170000092
for corresponding sinusoidal phase, δ n Is the phase shift step.
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-correction 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 (u, v) and (m, n) established by the formula (5), and obtaining the pre-correction 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).
And Step4, determining the intensity attenuation degree of the fringe light.
The projector projects a blank pattern consistent with the background light intensity of the structured light stripes on the reference surface (at the moment, the projected pattern is corrected by the pose of Step1-Step 3), and the camera collects 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.
Obtaining the light intensity function S of the x-th line by utilizing polynomial fitting based on the x-th line gray scale data of the blank pattern A0 x
Figure BDA0003641071170000101
In the formula, x and y respectively represent row and column coordinates of the image, a i Is 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 determined
Figure BDA0003641071170000102
So the decay function S 'of line x' x (y)
Figure BDA0003641071170000103
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, for a 2048 × 2448 fringe pattern, 2048 may be divided into j intervals, that is, the interval length is 2048/j, the size of j depends on the requirement of image correction, and if the requirement is high in precision, a larger j is set; if the required calibration efficiency is higher, then design smaller j.
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 pattern x (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' x Is composed of
I' x (y)=I x (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 E x (y) if E x If (y) is larger, optimizing parameters of polynomial fitting to obtain a proper attenuation fitting function S' x (y) to E x (y) is less than a preconfigured threshold,
wherein E x (y) is defined as follows:
E x (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 realized. 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 embodiment is not only suitable for sinusoidal correction of the structured light stripe in the field of grating precision measurement, but also suitable for trapezoidal correction of a projector and projector distortion correction (such as DLP4500 of TI company) of a DMD chip using a diamond array;
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), a pose transformation matrix H = [0.1169, -0.0167,289.2146 is firstly solved by applying the method disclosed by the invention; -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 image A0 (fig. 10) is acquired based on the camera, and the light intensity gray scale data of the 1000 th line thereof and the polynomial fitting condition are 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 shown in fig. 13, compared with the original image (fig. 5), the original image has unequal intervals of the structured light fringes, darker left light intensity and brighter right lower 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 structured 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, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (5)

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 pattern projected by the projector is subjected to pose correction, and the blank pattern 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 stripes on the reference surface according to the gray data of the blank pattern A0; wherein determining the degree of attenuation of the intensity of the structured light fringes over the reference surface comprises:
obtaining the light intensity function S of the x-th line by utilizing polynomial fitting based on the x-th line gray scale data of the blank pattern A0 x (y):
Figure FDA0003942957220000011
In the formula, x and y respectively represent row and column coordinates of the image, a i Is 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 light intensity
Figure FDA0003942957220000012
Attenuation degree function S 'of line x' x (y) is:
Figure FDA0003942957220000013
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 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.
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:
constructing a conversion relation between a camera pixel coordinate system and a projector pixel coordinate system as follows:
Figure FDA0003942957220000021
wherein the pose transformation matrix is H, H 1 To h 9 Is 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 transformation relation according to the coordinates of the multiple pairs of corresponding corner points to obtain H in the pose transformation matrix H 1 To h 8 Wherein h is 9 With 1, the coordinates (m, n) and (u, v) of the corresponding corner points of the pairs are known, the pairs being more than 4 pairs.
5. The method of claim 1, wherein compensating the intensity of the structured light fringes based on the degree of attenuation comprises:
current light intensity I based on the x-th line of the structured light stripe pattern x (y) divided by an attenuation function S' x (y) the current fringe pattern can be compensatedLine x with an attenuated sinusoidal intensity and a compensated intensity I' x Comprises the following steps:
I' x (y)=I x (y)/S' x (y);
using ideal light intensity I' x (y) and corrected I' x (y) obtaining a light intensity compensation error E x (y), wherein the ideal light intensity I " x (y) is preconfigured, said E x (y) is defined as follows:
E x (y)=I” x (y)-I' x (y);
if E x (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 The difference of (y) is less than a preconfigured error threshold.
CN202210514853.1A 2022-05-12 2022-05-12 Structural light striation correction method for precise grating measurement Active CN114739321B (en)

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 CN114739321A (en) 2022-07-12
CN114739321B true 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)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2950182A1 (en) * 2009-09-16 2011-03-18 Thomson Licensing IMAGE PROCESSING METHOD
CN112614075B (en) * 2020-12-29 2024-03-08 凌云光技术股份有限公司 Distortion correction method and equipment for surface structured light 3D system
CN114264253B (en) * 2021-12-09 2023-08-11 北京科技大学 Non-contact measuring device and measuring method for three-dimensional profile of high-temperature object
CN114594588B (en) * 2022-01-20 2023-03-28 西安电子科技大学 Structured light illumination microscopic device and method based on grating projection and SLM phase shift

Also Published As

Publication number Publication date
CN114739321A (en) 2022-07-12

Similar Documents

Publication Publication Date Title
CN107110637B (en) The calibration of three-dimension measuring system is updated
CN107607060B (en) A kind of phase error compensation method applied in the measurement of grating tripleplane
Douxchamps et al. High-accuracy and robust localization of large control markers for geometric camera calibration
US8339582B2 (en) Apparatus and method to correct image
WO2018029950A1 (en) Calibration device, calibration method, optical device, imaging device and projection device
US9605961B2 (en) Information processing apparatus that performs three-dimensional shape measurement, information processing method, and storage medium
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
CN112614075B (en) Distortion correction method and equipment for surface structured light 3D system
CN110738608B (en) Plane image correction method and system
CN109325927B (en) Image brightness compensation method for industrial camera photogrammetry
CN113298886B (en) Calibration method of projector
CN114111633A (en) Projector lens distortion error correction method for structured light three-dimensional measurement
CN112179292B (en) Projector-based line structured light vision sensor calibration method
CN116608794B (en) Anti-texture 3D structured light imaging method, system, device and storage medium
CN111006599B (en) Object surface micro-scale measurement method based on pixel grating and computer vision
CN114739321B (en) Structural light striation correction method for precise grating measurement
CN113865514B (en) Calibration method of line structured light three-dimensional measurement system
CN112529792B (en) Distortion correction method for distortion-free model camera
CN112985258B (en) Calibration method and measurement method of three-dimensional measurement system
CN113160393A (en) High-precision three-dimensional reconstruction method and device based on large field depth and related components thereof
Chen et al. Self recalibration of a structured light vision system from a single view
CN117073578B (en) Active projection nonlinear Gamma correction method for fringe projection profilometry
CN113686264B (en) Three-dimensional measurement method and system based on polar line geometry

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