CN117168313A - Phase error model correction method and system based on grating projection three-dimensional reconstruction - Google Patents

Phase error model correction method and system based on grating projection three-dimensional reconstruction Download PDF

Info

Publication number
CN117168313A
CN117168313A CN202311450910.5A CN202311450910A CN117168313A CN 117168313 A CN117168313 A CN 117168313A CN 202311450910 A CN202311450910 A CN 202311450910A CN 117168313 A CN117168313 A CN 117168313A
Authority
CN
China
Prior art keywords
phase
grating
height
obtaining
relative
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
Application number
CN202311450910.5A
Other languages
Chinese (zh)
Other versions
CN117168313B (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.)
Wuhan Institute of Technology
Original Assignee
Wuhan Institute of Technology
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 Wuhan Institute of Technology filed Critical Wuhan Institute of Technology
Priority to CN202311450910.5A priority Critical patent/CN117168313B/en
Publication of CN117168313A publication Critical patent/CN117168313A/en
Application granted granted Critical
Publication of CN117168313B publication Critical patent/CN117168313B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Length Measuring Devices By Optical Means (AREA)

Abstract

The application discloses a phase error model correction method based on grating projection three-dimensional reconstruction, which comprises the following steps: constructing a grating projection three-dimensional reconstruction measurement system; calibrating the mapping relation between the phase and the height of the system; manufacturing a grating pattern with a periodic relation, obtaining a relative phase of the grating pattern, obtaining a low-frequency phase after the relative phase is differenced, obtaining a single-frequency phase after the low-frequency phase is differenced, projecting the obtained low-frequency phase and the single-frequency phase, shooting to obtain a synthesized grating picture of an object to be reconstructed, and calculating the relative phase of the grating picture; performing solution phase calculation on the relative phase to obtain continuous absolute phases, associating phases of different frequencies, establishing a phase error model, and compensating the phase error based on the error model; and obtaining the height of the object to be measured by using the calibrated mapping relation between the phase and the height, and obtaining the three-dimensional information of the object. The application can obtain accurate phase information and a three-dimensional reconstruction model of an object with a complex surface.

Description

Phase error model correction method and system based on grating projection three-dimensional reconstruction
Technical Field
The application relates to the field of structured light three-dimensional reconstruction, in particular to a phase error model correction method and system based on grating projection three-dimensional reconstruction.
Background
In the last twenty years, the requirements of various fields on non-contact scanning are higher and higher, and the structured light technology has the advantages of high measurement precision, high measurement speed, convenience in use and the like, so that the structured light technology rapidly becomes a popular research field. For example, in the field of industrial measurement, some precision devices cannot acquire three-dimensional information by using a contact method, and by using the advantages of a structured light technology, the precision devices can be prevented from being damaged, and the three-dimensional information can be accurately and rapidly acquired.
In grating projection measurement, whether the phase position accurately determines the reconstruction accuracy or not, so the phase position expansion is a crucial step in three-dimensional reconstruction of structured light. The multi-frequency heterodyne method is a phase unwrapping method commonly used in the complex fine reconstruction at present, however, in a poor environment, some small errors often cause larger jumps in phase due to heterodyne processes, and for objects needing fine reconstruction, such as a circuit board, it is difficult to meet the requirements of accurate and complete reconstruction. It is therefore necessary to design an applicable phase correction algorithm for these application requirements.
Disclosure of Invention
Aiming at the defect that the surface reconstruction of a complex object such as a circuit board is not accurate and complete in the prior art, the application provides a phase error model correction method and a phase error model correction system based on three-dimensional reconstruction of grating projection, which can enable reconstructed point cloud to be more accurate and complete.
The technical scheme adopted by the application is as follows:
the phase error model correction method based on grating projection three-dimensional reconstruction comprises the following steps:
s1, constructing a grating projection three-dimensional measurement system, wherein the grating projection three-dimensional measurement system comprises a projector and a camera which are vertically arranged, and a plurality of groups of synthesized grating images are burnt in the projector;
s2, calibrating the mapping relation between the phase and the height of the grating projection three-dimensional measurement system, namely shooting at least three groups of grating phase shift pictures with known height planes, and calculating absolute phases of the grating phase shift pictures to obtain the mapping relation between the phase and the height;
s3, manufacturing a grating pattern with a periodic relation, obtaining a relative phase of the grating pattern, obtaining a low-frequency phase after the relative phase is differed, obtaining a single-frequency phase after the low-frequency phase is differed, finally projecting the obtained low-frequency phase and the single-frequency phase onto an object to be reconstructed through a projector, shooting through a camera to obtain a composite grating picture of the object to be reconstructed, and calculating the relative phase of the composite grating picture;
s4, performing solution phase calculation on the relative phases of the synthetic grating pictures to obtain continuous absolute phases, associating phases of different frequencies, establishing a phase error model, and performing phase error compensation on the relative phases of the synthetic grating pictures of the object to be reconstructed based on the phase error model to obtain compensated absolute phases;
s5, obtaining the height of the object to be measured according to the compensated absolute phase and by using the calibrated mapping relation between the phase and the height, and obtaining the three-dimensional information of the object by combining the coordinates and the corresponding height of the object to be measured.
In connection with the technical scheme, the specific method for constructing the grating projection three-dimensional measurement system in the step S1 comprises the following steps:
the projector and the camera are vertically and fixedly arranged, the synthesized grating image is burnt into the projector, and the projector is adjusted so that the projected grating pattern can cover the part of the object to be measured; adjusting the camera so that the field of view of the camera can shoot the part to be detected; a synchronous trigger mode is used between the camera and the projector.
With the above technical solution, the specific method in step S2 is as follows:
three sets of phase-shifted grating pictures with known height planes are taken, and the phase of each set of planes is calculated:
(1)
(2)
wherein the method comprises the steps ofReference phase representing a point of the plane of height 0 of the first group, +.>Representing the phase distribution at a point caused by the distortion of the object, N being the number of phase shift steps, +.>Gray scale of a certain point of the stripe pattern;
the mapping equation from phase to height is obtained by adopting a quadratic curve fitting method:
(3)
substituting a group of plane phases with the height of 0 and the heights and phases of three groups of non-zero height planes, and calculating to obtain three unknown parameters of a certain point、/>、/>Thereby obtaining the mapping relation between the phase and the height of the whole system.
With the above technical solution, the specific method in step S3 is as follows:
the period is respectively T 1 、T 2 、T 3 Three sets of grating fringes:
(4)
wherein, (T) 1 -T 2 )-(T 2 -T 3 )=1,Is the gray scale of a certain point of the stripe pattern, row is the number of lines of the grating pattern, +.>、/>The background light intensity and the modulation intensity of a certain point are respectively, N is the phase shift step number, and T is the phase shift period;
calculating the grating pattern by using a phase shift method to obtain the relative phase of the grating pattern:
(5)
(6)
wherein,is the pixel value of a point of each raster pattern,/->The relative phase of a certain point is calculated by N phase shift gratings, N is the phase shift step number, and the difference calculation is carried out on the relative phase by using the following formula:
(7)
wherein the method comprises the steps ofAnd->Is of period T 1 And T 2 Relative phase of a point->Is thatAnd->Obtaining the relative phase of a certain point after making difference, < >>Is->And->Obtaining the relative phase of a certain point after making difference, < >>Is->And->Obtaining the relative phase of a certain point after the difference is made;
will beAnd->The phase pattern of the object to be measured is burned into a projector, projected by the projector, then the synthesized deformation grating fringe pattern projected on the object to be measured is shot by a camera, and the relative phase is calculated.
With the above technical solution, the specific method in step S4 is as follows:
the phase has the following relation with a certain point on the surface of the measured object:
(8)
(9)
(10)
(11)
in the middle ofRepresenting the relative phase of the generation->Is the number of pattern rows/period, < ->Represents a grating fringe order comprising an integer fraction +.>And decimal part->,/>Representing absolute phase; because the periodic relationship is (T) 1 -T 2 )-(T 2 -T 3 ) =1, then its corresponding pitch +.>、/>、/>So that the relative phase +.>Is>Covering the whole field, i.e. with period 1, when there is only one stripe, the integer part of the number of stripe stages +.>Zero, i.e
(12)
(13)
(14)
Or (b)
(15)
Wherein round () represents taking the nearest neighbor integer;
in theory, under the condition that the relative positions of the projector, the camera and the measured object are unchanged, the absolute phases calculated by the formula (14) and the formula (15) should be the same, but the phase difference solved by the two methods is larger due to the influence of wrapping phase errors, so that an error value is assumed first:
(16)
wherein the method comprises the steps of、/>Representing the actual wrap phase value,/->、/>Indicating the theoretical wrapped phase value, +.>、/>An error value representing the wrapping phase;
because the step of making difference is omitted after the synthetic pattern is directly projected, the error of wrapping phase is not added in the calculation, and then there is
(17)
Wherein the method comprises the steps ofIs->The pitch is the number of lines/period of the pattern, the absolute phase difference obtained by the calculation is ζ,
(18)
according to the ideal condition, there are
(19)
Thereby obtaining
(20)
Regarding error values greater than 2pi as shaded areas not participating in error compensation and calculation:
(21)
the unwrapped phase after compensation is:
(22)
when generating the point cloud, the shadow region can be eliminated by skipping the part with the phase of 0.
With the above technical solution, the specific method in step S5 is as follows:
and according to the unfolded phase, obtaining object height information by using calibrated phase height mapping parameters:
(23)
wherein the method comprises the steps of,/>Reference phase representing a point of the plane of height 0 of the first group, +.>For the relative phase value of a point, +.>、/>、/>Mapping parameters for the phase height of a certain point;
the height corresponding to each pixel coordinate is obtained by utilizing the object height information, so that three-dimensional point cloud information of the object is obtained:
(24)
wherein the method comprises the steps ofFor the three-dimensional coordinates of a point of the object, (-)>,/>) Is the world coordinate corresponding to a pixel of a certain point of the object.
By adopting the technical scheme, the object to be rebuilt is a circuit board.
The application also provides a phase error model correction system based on the three-dimensional reconstruction of the grating projection, which comprises the following steps:
the system comprises a measuring system building module, a grating projection three-dimensional measuring system and a measuring system, wherein the grating projection three-dimensional measuring system comprises a projector and a camera which are vertically arranged, and a plurality of groups of synthesized grating images are burnt in the projector;
the calibration module is used for calibrating the mapping relation between the phase and the height of the grating projection three-dimensional measurement system, specifically shooting at least three groups of grating phase shift pictures with known height planes, and calculating the absolute phase of the grating phase shift pictures to obtain the mapping relation between the phase and the height;
the relative phase calculation module is used for manufacturing a grating pattern with a periodic relation, obtaining a relative phase of the grating pattern, obtaining a low-frequency phase after the relative phase is differenced, obtaining a single-frequency phase after the low-frequency phase is differenced, finally projecting the obtained low-frequency phase and the single-frequency phase onto an object to be reconstructed through a projector, obtaining a synthetic grating picture of the object to be reconstructed through camera shooting, and calculating the relative phase of the synthetic grating picture;
the phase compensation module is used for carrying out solution phase calculation on the relative phase of the synthetic grating picture to obtain continuous absolute phases, correlating phases of different frequencies, establishing a phase error model, and carrying out phase error compensation on the relative phase of the synthetic grating picture of the object to be reconstructed based on the phase error model to obtain the compensated absolute phases;
and the three-dimensional information is obtained according to the compensated absolute phase and by using the mapping relation between the calibrated phase and the height, and the three-dimensional information of the object is obtained by combining the coordinates of the object to be measured and the corresponding height.
The technical scheme is adopted, and the method utilizes the phase error model correction method based on the three-dimensional reconstruction of the grating projection to carry out the three-dimensional reconstruction of the circuit board.
The application also provides a computer storage medium, in which a computer program executable by a processor is stored, and the computer program executes the phase error model correction method based on the three-dimensional reconstruction of grating projection.
The application has the beneficial effects that: according to the phase error model correction method based on the grating projection three-dimensional reconstruction, the phase difference making process during the later three-dimensional object reconstruction can be skipped by changing the stripe pattern projected by the projector, so that accumulation of phase errors is avoided, and then different phase resolving formulas and phase errors are combined to compensate the phase, so that the phenomenon of incomplete elements in the object to be detected caused by phase resolving errors is solved.
Further, by restraining the phase value, an error value larger than 2 pi is regarded as a shadow area and does not participate in error compensation and calculation to inhibit error fluctuation caused by the shadow area, so that the problem of partial height error of an object to be rebuilt, such as a circuit board, caused by shadow is solved, and a solution is provided for the requirement of complete reconstruction of complex elements on the circuit board; the method can accurately perform phase expansion and three-dimensional reconstruction on complex elements on the circuit board, and can meet the special requirements of industrial detection on too bright background, too dark background, dense detection elements, small volume and the like.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a phase error model correction method based on three-dimensional reconstruction of grating projection according to an embodiment of the present application;
FIG. 2 is a diagram of a synthesized low frequency grating pattern according to an embodiment of the present application;
FIG. 3 is a diagram of a grating pattern captured by an embodiment of the present application;
FIG. 4 is a relative phase diagram obtained according to an embodiment of the present application;
FIG. 5 is an uncorrected absolute phase diagram according to an embodiment of the application;
FIG. 6 is an absolute phase diagram obtained after correction by a phase error model correction method according to an embodiment of the present application;
FIG. 7 is a diagram of a circuit board to be rebuilt according to an embodiment of the present application;
fig. 8 is a circuit board point cloud reconstructed by using a phase error model correction method according to an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Example 1
As shown in fig. 1, the phase error model correction method based on the three-dimensional reconstruction of grating projection in this embodiment includes the following steps:
s1, constructing a grating projection three-dimensional measurement system;
s2, shooting at least three groups of grating phase shift pictures with known height planes, and calculating phases of the grating phase shift pictures to obtain a mapping relation between the phases and the heights;
s3, obtaining low-frequency grating patterns after the high-frequency grating patterns are subjected to pairwise difference, obtaining single-frequency patterns after the low-frequency patterns are subjected to difference, finally projecting the obtained low-frequency patterns and the single-frequency patterns, shooting to obtain a composite grating picture of an object to be reconstructed, and calculating the relative phase of the composite grating patterns by using a four-step phase shift method;
s5, performing phase unwrapping calculation on the phase main value to obtain continuous absolute phases covering the whole view field, associating phases of different frequencies, establishing a phase error model, compensating the phase error by using the phase error model, and reducing the influence of the error on the phase;
and S7, obtaining the height information of the object to be detected by using the calibrated mapping relation between the phase and the height, and generating the three-dimensional point cloud of the object according to the coordinates of the object to be detected and the corresponding height information.
Further, the method for performing system building in the step S1 of the present application specifically includes:
the projector and the camera are fixedly placed, a grating projection three-dimensional measurement system model is established, the synthesized grating image is burnt into the projector, and the projector is adjusted so that the projected grating pattern can cover a part to be measured; adjusting the camera so that the field of view of the camera can shoot the part to be detected; a synchronous trigger mode is used between the camera and the projector.
Further, the specific method of step S2 of the present application is as follows:
three sets of phase-shifted grating pictures with known height planes are taken, and the phase ϕ of each set of planes is calculated:
(1)
(2)
wherein the method comprises the steps ofReference phase representing a point of the plane of the first group with a height of 0mm +.>Representing the phase distribution at a point caused by the distortion of the object.
The quadratic curve fitting method is adopted, and the phase to height mapping equation is as follows:
(3)
substituting the heights and phases of the four groups of planes can obtain three unknown parameters of a certain point、/>Thereby obtaining the mapping relation between the phase and the height of the whole system.
Further, the specific method of step S3 of the present application is as follows:
the period is respectively T 1 、T 2 、T 3 Of the three sets of grating fringes (wherein (T 1 -T 2 )-(T 2 -T 3 )=1):
(4)
Wherein the method comprises the steps ofGray is the gray of a certain point of the stripe pattern, row is the number of lines of the pattern, < >>、/>The background light intensity and the modulation intensity of a certain point are respectively, N is the phase shift step number, and T is the phase shift period.
Calculating the grating pattern by using a phase shift method to obtain the relative phase of the grating pattern:
(5)
(6)
wherein,is the pixel value of a point of each raster pattern,/->The relative phase of a certain point is calculated by N phase shift gratings, N is the phase shift step number, and the difference calculation is carried out on the relative phase by using the following formula:
(7)
wherein the method comprises the steps ofAnd->Is of period T 1 And T 2 Relative phase of a point->Is->And->Obtaining the relative phase of a certain point after making difference, < >>And->And the same is true.
Will beAnd->The phase pattern obtained by the synthesis is projected by the projector, and then the synthesized deformation grating fringe pattern projected on the object to be measured is shot by the camera.
Further, the specific method of step S4 of the present application is as follows:
the phase has the following relation with a certain point on the surface of the measured object:
(8)
(9)
(10)
(11)
in p i Representing the relative phase ϕ generated i Pitch (pitch is number of lines/period of pattern), n i Representing a number of grating fringe orders comprising an integer part N i And a fractional part deltan i ,φ i Representing the absolute phase. Because the periodic relationship is (T) 1 -T 2 )-(T 2 -T 3 ) =1, its corresponding pitch、/>、/>So that the relative phase +.>Is>Covering the whole field, i.e. with period 1, when there is only one stripe, the integer part of the number of stripe stages +.>Zero, i.e.:
(12)
(13)
(14)
or (b)
(15)
Where round () represents taking the nearest neighbor integer.
In theory, under the condition that the relative positions of the projector, the camera and the measured object are unchanged, the absolute phases calculated by the formula (14) and the formula (15) should be the same, but the phase difference solved by the two methods is larger due to the influence of wrapping phase errors, so that the error value can be assumed first:
(16)
wherein the method comprises the steps of、/>Representing the actual wrap phase value,/->、/>Indicating the theoretical wrapped phase value, +.>、/>Representing the error value of the wrapping phase.
Because the step of making difference is omitted after the synthetic pattern is directly projected, the error of wrapping phase is not added in the calculation, and then there is
(17)
Wherein p is i ϕ of a shape of ϕ i The pitch (pitch is the number of lines per period of the pattern), the absolute phase difference calculated as described above is ζ,
(18)
according to the ideal condition that they are equal to each other
(19)
Thereby obtaining
(20)
In actual measurement of a circuit board, a shadow is generated by projection of a component with a complex appearance, the shadow part has no phase information, the calculated error is larger, a shadow area can be eliminated by restraining a phase error value, the phase error is caused by the change of the grating fringe series n caused by a round () function, the correct phase error value cannot exceed the change of one series, and therefore, the error value larger than 2 pi is regarded as the shadow area and is not involved in error compensation and calculation:
(21)
the unwrapped phase after compensation is:
(22)
when generating the point cloud, the shadow region can be eliminated by skipping the part with the phase of 0.
Further, the specific method of step S5 of the present application is as follows:
according to the unfolded phase, the calibrated phase height mapping parameters are utilized to obtain object height information:
(23)
wherein the method comprises the steps of,/>Reference phase representing a point of the plane of the first group with a height of 0mm +.>For the relative phase value of a point, +.>For the height of a point of the object, +.>、/>The phase height mapping parameter for a point.
The height corresponding to each pixel coordinate can be obtained by utilizing the object height information, and the three-dimensional point cloud information of the object can be obtained:
(24)
wherein P (x, y, z) is the three-dimensional coordinates of a point of the object, x w And y w Is the world coordinate corresponding to a pixel of a certain point of the object.
Example 2
The camera used in the phase error model correction method of the embodiment of the application is a large constant-water star series MER-502-79U3C, and the resolution of the shot image is 2448 multiplied by 2048; the projector is DLP4500 produced by TI corporation of America, the resolution is 912×1140, and the object to be measured is a circuit board. The method of this embodiment mainly comprises the steps of:
s1, fixedly placing a projector and a camera, establishing a grating projection three-dimensional measurement system, burning a synthesized grating image into the projector, and adjusting the projector to enable the projected grating pattern to cover a part to be measured; adjusting the camera so that the field of view of the camera can shoot the part to be detected; a synchronous trigger mode is used between the camera and the projector.
S2, shooting plane phase shift grating pictures with heights of 0mm, 11.8mm and 23.6mm respectively, and calculating the phase of each group of planes:
(1)
(2)
wherein the method comprises the steps ofReference phase representing a point of the plane of the first group with a height of 0mm +.>Representing the phase distribution at a point caused by the distortion of the object.
The quadratic curve fitting method is adopted, and the phase to height mapping equation is as follows:
(3)
substituting a group of plane phases with 0 height and the heights and phases of three groups of non-zero height planes can obtain three unknown parameters of a certain point、/>、/>Thereby obtaining the mapping relation between the phase and the height of the whole system.
S3, respectively making the periods to be T by the following steps 1 、T 2 、T 3 Three sets of grating fringes (periods 56, 50, 45 in this example):
(4)
wherein the method comprises the steps ofGray is the gray of a certain point of the stripe pattern, row is the number of lines of the pattern, < >>、/>The background light intensity and the modulation intensity of a certain point are respectively, N is the phase shift step number, and T is the phase shift period.
Calculating the grating pattern by using a phase shift method to obtain the relative phase of the grating pattern:
(5)
(6)
wherein,is the pixel value of a point of each raster pattern,/->The relative phase of a certain point is calculated by N phase shift gratings, N is the phase shift step number, and the difference calculation is carried out on the relative phase by using the following formula:
(7)
wherein the method comprises the steps ofAnd->Is of period T 1 And T 2 Relative phase of a point->Is->And->The relative phase obtained after the difference is made, +.>And->And the same is true. />
Will beAnd->The phase pattern obtained by the synthesis is projected by the projector, and then the synthesized deformation grating fringe pattern projected on the object to be measured is shot by the camera. The synthesized grating pattern is shown in fig. 2, the photographed synthesized grating picture is shown in fig. 3, and the calculated three sets of relative phase diagrams are shown in fig. 4.
S4, the phase and a certain point on the surface of the measured object have the following relation:
(8)
(9)
(10)
(11)
in p i Representing the relative phase ϕ generated i Pitch (pitch is number of lines/period of pattern), n i Representing a number of grating fringe orders comprising an integer part N i And a fractional part deltan i ,φ i Representing the absolute phase. Selection of the appropriate p 1 、p 2 、p 3 So that ϕ 123 Is of pitch p of (2) 123 Covering the whole field, N 123 Zero, i.e
(12)
(13)
(14)
Or (b)
(15)
N23, N2, N3 are the same, where round () represents taking the nearest integer.
In theory, under the condition that the relative positions of the projector, the camera and the measured object are unchanged, the absolute phases calculated by the formula (14) and the formula (15) should be the same, but the phase difference solved by the two methods is larger due to the influence of wrapping phase errors, so that the error value can be assumed first:
(16)
wherein the method comprises the steps of、/>Representing the actual wrap phase value,/->、/>Indicating the theoretical wrapped phase value, +.>、/>Representing the error value of the wrapping phase.
Because the step of phase difference in the later reconstruction of the three-dimensional object is omitted after the pattern is synthesized by direct projection, the error of wrapping the phase is calculated without additional superposition, and the method comprises the following steps
(17)
Wherein p is i ϕ of a shape of ϕ i The pitch (pitch is the number of lines per period of the pattern), the absolute phase difference calculated as described above is ζ,
(18)
according to the ideal condition that they are equal to each other
(19)
Thereby obtaining
(20)
Regarding error values greater than 2pi as shaded areas not participating in error compensation and calculation:
(21)
the unwrapped phase after compensation is:
(22)
when generating the point cloud, the shadow region can be eliminated by skipping the part with the phase of 0.
In this example, an uncorrected absolute phase diagram is shown in fig. 5, and an absolute phase diagram corrected by a phase error model correction method is shown in fig. 6.
S5, according to the unfolded phase, the calibrated phase height mapping parameters are utilized to obtain object height information:
(22)/>
wherein the method comprises the steps of,/>Reference phase representing a point of the plane of the first group with a height of 0mm +.>For the relative phase value of a point, +.>For the height of a point of the object, +.>、/>The phase height mapping parameter is a certain point.
The height corresponding to each pixel coordinate can be obtained by utilizing the object height information, and the three-dimensional point cloud information of the object can be obtained:
(23)
wherein P (x, y, z) is the three-dimensional coordinates of a point of the object, x w And y w Is the world coordinate corresponding to a pixel of a certain point of the object.
In this embodiment, a physical diagram of a circuit board to be rebuilt is shown in fig. 7, and a circuit board point cloud diagram rebuilt by using a correction method based on a phase error model is shown in fig. 8.
Example 3
This embodiment is used to implement the above method embodiment, which is based on a phase error model correction system for three-dimensional reconstruction of grating projections, comprising:
the system comprises a measuring system building module, a grating projection three-dimensional measuring system and a measuring system, wherein the grating projection three-dimensional measuring system comprises a projector and a camera which are vertically arranged, and a plurality of groups of synthesized grating images are burnt in the projector;
the calibration module is used for calibrating the mapping relation between the phase and the height of the grating projection three-dimensional measurement system, specifically shooting at least three groups of grating phase shift pictures with known height planes, and calculating the absolute phase of the grating phase shift pictures to obtain the mapping relation between the phase and the height;
the relative phase calculation module is used for manufacturing a grating pattern with a periodic relation, obtaining a relative phase of the grating pattern, obtaining a low-frequency phase after the relative phase is differenced, obtaining a single-frequency phase after the low-frequency phase is differenced, finally projecting the obtained low-frequency phase and the single-frequency phase onto an object to be reconstructed through a projector, obtaining a synthetic grating picture of the object to be reconstructed through camera shooting, and calculating the relative phase of the synthetic grating picture;
the phase compensation module is used for carrying out solution phase calculation on the relative phase of the synthetic grating picture to obtain continuous absolute phases, correlating phases of different frequencies, establishing a phase error model, and carrying out phase error compensation on the relative phase of the synthetic grating picture of the object to be reconstructed based on the phase error model to obtain the compensated absolute phases;
and the three-dimensional information is obtained according to the compensated absolute phase and by using the mapping relation between the calibrated phase and the height, and the three-dimensional information of the object is obtained by combining the coordinates of the object to be measured and the corresponding height.
The modules are mainly used to implement the steps of the method embodiments described above, and are not described herein.
Example 4
The present application also provides a computer readable storage medium such as a flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, etc., on which a computer program is stored that when executed by a processor performs a corresponding function. The computer readable storage medium of the present embodiment, when executed by a processor, implements the phase error model correction method based on the three-dimensional reconstruction of grating projection of the method embodiment.
It should be noted that each step/component described in the present application may be split into more steps/components, or two or more steps/components or part of operations of the steps/components may be combined into new steps/components, according to the implementation needs, to achieve the object of the present application.
The sequence numbers of the steps in the above embodiments do not mean the execution sequence, and the execution sequence of the processes should be determined according to the functions and internal logic, and should not limit the implementation process of the embodiments of the present application.
It will be understood that modifications and variations will be apparent to those skilled in the art from the foregoing description, and it is intended that all such modifications and variations be included within the scope of the following claims.

Claims (10)

1. A phase error model correction method based on grating projection three-dimensional reconstruction is characterized by comprising the following steps:
s1, constructing a grating projection three-dimensional measurement system, wherein the grating projection three-dimensional measurement system comprises a projector and a camera which are vertically arranged, and a plurality of groups of synthesized grating images are burnt in the projector;
s2, calibrating the mapping relation between the phase and the height of the grating projection three-dimensional measurement system, namely shooting at least three groups of grating phase shift pictures with known height planes, and calculating absolute phases of the grating phase shift pictures to obtain the mapping relation between the phase and the height;
s3, manufacturing a grating pattern with a periodic relation, obtaining a relative phase of the grating pattern, obtaining a low-frequency phase after the relative phase is differed, obtaining a single-frequency phase after the low-frequency phase is differed, finally projecting the obtained low-frequency phase and the single-frequency phase onto an object to be reconstructed through a projector, shooting through a camera to obtain a composite grating picture of the object to be reconstructed, and calculating the relative phase of the composite grating picture;
s4, performing solution phase calculation on the relative phases of the synthetic grating pictures to obtain continuous absolute phases, associating phases of different frequencies, establishing a phase error model, and performing phase error compensation on the relative phases of the synthetic grating pictures of the object to be reconstructed based on the phase error model to obtain compensated absolute phases;
s5, obtaining the height of the object to be measured according to the compensated absolute phase and by using the calibrated mapping relation between the phase and the height, and obtaining the three-dimensional information of the object by combining the coordinates and the corresponding height of the object to be measured.
2. The method for correcting the phase error model based on the three-dimensional reconstruction of the grating projection according to claim 1, wherein the specific method for constructing the three-dimensional measurement system of the grating projection in the step S1 is as follows:
the projector and the camera are vertically and fixedly arranged, the synthesized grating image is burnt into the projector, and the projector is adjusted so that the projected grating pattern can cover the part of the object to be measured; adjusting the camera so that the field of view of the camera can shoot the part to be detected; a synchronous trigger mode is used between the camera and the projector.
3. The method for correcting a phase error model based on three-dimensional reconstruction of grating projection according to claim 1, wherein the specific method of step S2 is as follows:
three sets of phase-shifted grating pictures with known height planes are taken, and the phase of each set of planes is calculated:
(1)
(2)
wherein the method comprises the steps ofReference phase representing a point of the plane of height 0 of the first group, +.>Representing the phase distribution at a point caused by the distortion of the object, N being the number of phase shift steps, +.>Gray scale of a certain point of the stripe pattern;
the mapping equation from phase to height is obtained by adopting a quadratic curve fitting method:
(3)
substituting a group of plane phases with the height of 0 and the heights and phases of three groups of non-zero height planes, and calculating to obtain three unknown parameters of a certain point、/>、/>Thereby obtaining the mapping relation between the phase and the height of the whole system.
4. The method for correcting a phase error model based on three-dimensional reconstruction of grating projection according to claim 1, wherein the specific method of step S3 is as follows:
the period is respectively T 1 、T 2 、T 3 Three sets of grating fringes:
(4)
wherein, (T) 1 -T 2 )-(T 2 -T 3 )=1,The gray scale of a certain point of the stripe pattern, row is the number of lines of the grating pattern,、/>the background light intensity and the modulation intensity of a certain point are respectively, N is the phase shift step number, and T is the phase shift period;
calculating the grating pattern by using a phase shift method to obtain the relative phase of the grating pattern:
(5)
(6)
wherein,is the pixel value of a point of each raster pattern,/->The relative phase of a certain point is calculated by N phase shift gratings, N is the phase shift step number, and the difference calculation is carried out on the relative phase by using the following formula:
(7)
wherein the method comprises the steps ofAnd->Is of period T 1 And T 2 Relative phase of a point->Is->Andobtaining the relative phase of a certain point after making difference, < >>Is->And->Obtaining the relative phase of a certain point after making difference, < >>Is->And->Obtaining the relative phase of a certain point after the difference is made;
will beAnd->The phase pattern of the object to be measured is burned into a projector, projected by the projector, then the synthesized deformation grating fringe pattern projected on the object to be measured is shot by a camera, and the relative phase is calculated.
5. The method for correcting a phase error model based on three-dimensional reconstruction of grating projection according to claim 1, wherein the specific method of step S4 is as follows:
the phase has the following relation with a certain point on the surface of the measured object:
(8)
(9)
(10)
(11)
in the middle ofRepresenting the relative phase of the generation->Is the number of pattern rows/period, < ->Represents a grating fringe order comprising an integer fraction +.>And decimal part->,/>Representing absolute phase; because the periodic relationship is (T) 1 -T 2 )-(T 2 -T 3 ) =1, then its corresponding pitch +.>、/>、/>So that the relative phase +.>Is>Covering the whole field, i.e. with period 1, when there is only one stripe, the integer part of the number of stripe stages +.>Zero, i.e
(12)
(13)
(14)
Or (b)
(15)
Wherein round () represents taking the nearest neighbor integer;
under the condition that the relative positions of the projector, the camera and the measured object are unchanged, the absolute phases calculated by the formula (14) and the formula (15) are the same, but the phase difference solved by the two methods is larger due to the influence of wrapping phase errors, so that an error value is firstly assumed:
(16)
wherein the method comprises the steps of、/>Representing the actual wrap phase value,/->、/>Indicating the theoretical wrapped phase value, +.>、/>An error value representing the wrapping phase;
because the step of making difference is omitted after the synthetic pattern is directly projected, the error of wrapping phase is not added in the calculation, and then there is
(17)
Wherein the method comprises the steps ofIs->The pitch is the number of lines/period of the pattern, the absolute phase difference obtained by the calculation is ζ,
(18)
according to the ideal condition, there are
(19)
Thereby obtaining
(20)
Regarding error values greater than 2pi as shaded areas not participating in error compensation and calculation:
(21)
the unwrapped phase after compensation is:
(22)
when generating the point cloud, the shadow region can be eliminated by skipping the part with the phase of 0.
6. The method for correcting a phase error model based on three-dimensional reconstruction of grating projection according to claim 1, wherein the specific method of step S5 is as follows:
and according to the unfolded phase, obtaining object height information by using calibrated phase height mapping parameters:
(23)
wherein the method comprises the steps of,/>Reference phase representing a point of the plane of height 0 of the first group, +.>For the relative phase value of a point, +.>、/>、/>Mapping parameters for the phase height of a certain point;
the height corresponding to each pixel coordinate is obtained by utilizing the object height information, so that three-dimensional point cloud information of the object is obtained:
(24)
wherein the method comprises the steps ofFor the three-dimensional coordinates of a point of the object, (-)>,/>) Is the world coordinate corresponding to a pixel of a certain point of the object.
7. The method for correcting a phase error model based on three-dimensional reconstruction of grating projection according to any one of claims 1 to 6, wherein the object to be reconstructed is a circuit board.
8. A phase error model correction system based on three-dimensional reconstruction of grating projections, comprising:
the system comprises a measuring system building module, a grating projection three-dimensional measuring system and a measuring system, wherein the grating projection three-dimensional measuring system comprises a projector and a camera which are vertically arranged, and a plurality of groups of synthesized grating images are burnt in the projector;
the calibration module is used for calibrating the mapping relation between the phase and the height of the grating projection three-dimensional measurement system, specifically shooting at least three groups of grating phase shift pictures with known height planes, and calculating the absolute phase of the grating phase shift pictures to obtain the mapping relation between the phase and the height;
the relative phase calculation module is used for manufacturing a grating pattern with a periodic relation, obtaining a relative phase of the grating pattern, obtaining a low-frequency phase after the relative phase is differenced, obtaining a single-frequency phase after the low-frequency phase is differenced, finally projecting the obtained low-frequency phase and the single-frequency phase onto an object to be reconstructed through a projector, obtaining a synthetic grating picture of the object to be reconstructed through camera shooting, and calculating the relative phase of the synthetic grating picture;
the phase compensation module is used for carrying out solution phase calculation on the relative phase of the synthetic grating picture to obtain continuous absolute phases, correlating phases of different frequencies, establishing a phase error model, and carrying out phase error compensation on the relative phase of the synthetic grating picture of the object to be reconstructed based on the phase error model to obtain the compensated absolute phases;
and the three-dimensional information is obtained according to the compensated absolute phase and by using the mapping relation between the calibrated phase and the height, and the three-dimensional information of the object is obtained by combining the coordinates of the object to be measured and the corresponding height.
9. A method for three-dimensional reconstruction of a circuit board, characterized in that the method utilizes the phase error model correction method based on three-dimensional reconstruction of grating projections as set forth in any one of claims 1-6 to perform three-dimensional reconstruction of the circuit board.
10. A computer storage medium, characterized in that a computer program executable by a processor is stored therein, which computer program performs the phase error model correction method based on three-dimensional reconstruction of raster projections as claimed in any one of claims 1-6.
CN202311450910.5A 2023-11-03 2023-11-03 Phase error model correction method and system based on grating projection three-dimensional reconstruction Active CN117168313B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311450910.5A CN117168313B (en) 2023-11-03 2023-11-03 Phase error model correction method and system based on grating projection three-dimensional reconstruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311450910.5A CN117168313B (en) 2023-11-03 2023-11-03 Phase error model correction method and system based on grating projection three-dimensional reconstruction

Publications (2)

Publication Number Publication Date
CN117168313A true CN117168313A (en) 2023-12-05
CN117168313B CN117168313B (en) 2024-01-23

Family

ID=88932149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311450910.5A Active CN117168313B (en) 2023-11-03 2023-11-03 Phase error model correction method and system based on grating projection three-dimensional reconstruction

Country Status (1)

Country Link
CN (1) CN117168313B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107607060A (en) * 2017-08-24 2018-01-19 东南大学 A kind of phase error compensation method in the measurement applied to grating tripleplane
CN113983960A (en) * 2021-10-12 2022-01-28 安徽农业大学 Multi-frequency fringe projection nonlinear error correction method
WO2022147976A1 (en) * 2021-01-11 2022-07-14 浙江商汤科技开发有限公司 Three-dimensional reconstruction method, related interaction and measurement method, related apparatuses, and device
CN115329256A (en) * 2022-10-13 2022-11-11 南京理工大学 Underwater optical measurement error compensation method based on FPP
US20230043791A1 (en) * 2022-10-05 2023-02-09 Intel Corporation Holographic image processing with phase error compensation
CN116379965A (en) * 2023-04-21 2023-07-04 惠州市微米立科技有限公司 Structured light system calibration method and device, structured light system and storage medium
CN116734771A (en) * 2023-08-16 2023-09-12 武汉工程大学 Circuit board component geometry detection method based on active Gamma correction
CN116878416A (en) * 2023-04-06 2023-10-13 三亚学院 Phase correction method for three-dimensional surface shape measurement reconstruction of structured light

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107607060A (en) * 2017-08-24 2018-01-19 东南大学 A kind of phase error compensation method in the measurement applied to grating tripleplane
WO2022147976A1 (en) * 2021-01-11 2022-07-14 浙江商汤科技开发有限公司 Three-dimensional reconstruction method, related interaction and measurement method, related apparatuses, and device
CN113983960A (en) * 2021-10-12 2022-01-28 安徽农业大学 Multi-frequency fringe projection nonlinear error correction method
US20230043791A1 (en) * 2022-10-05 2023-02-09 Intel Corporation Holographic image processing with phase error compensation
CN115329256A (en) * 2022-10-13 2022-11-11 南京理工大学 Underwater optical measurement error compensation method based on FPP
CN116878416A (en) * 2023-04-06 2023-10-13 三亚学院 Phase correction method for three-dimensional surface shape measurement reconstruction of structured light
CN116379965A (en) * 2023-04-21 2023-07-04 惠州市微米立科技有限公司 Structured light system calibration method and device, structured light system and storage medium
CN116734771A (en) * 2023-08-16 2023-09-12 武汉工程大学 Circuit board component geometry detection method based on active Gamma correction

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈晓波: "结构光三维测量系统误差分析、控制及补偿技术的研究", 《万方数据》 *

Also Published As

Publication number Publication date
CN117168313B (en) 2024-01-23

Similar Documents

Publication Publication Date Title
EP3238447B1 (en) Updating calibration of a three-dimensional measurement system
CN110514143B (en) Stripe projection system calibration method based on reflector
CN109489585B (en) Three-dimensional measurement method based on improved multi-frequency stripe structured light
CN110207614B (en) High-resolution high-precision measurement system and method based on double telecentric camera matching
CN109945802B (en) Structured light three-dimensional measurement method
CN109307483B (en) Phase unwrapping method based on geometric constraint of structured light system
CN109523627B (en) Three-dimensional reconstruction method of profile structured light based on Taylor index expression
JP6598673B2 (en) Data processing apparatus and method
CN108195316A (en) Method for three-dimensional measurement and device based on adaptive phase error correction
CN108195313A (en) A kind of high dynamic range method for three-dimensional measurement based on Intensity response function
CN108061517B (en) Surface structure photolysis method based on Moire sequence grating
CN114199160B (en) Circuit board component geometry detection method based on binary code grating defocusing projection
CN112097670A (en) Method and equipment for measuring three-dimensional surface shape of high-reflectivity object
CN115775303A (en) High-reflectivity object three-dimensional reconstruction method based on deep learning and illumination model
CN112945089A (en) Structured light coding method based on stripe width modulation
CN117168313B (en) Phase error model correction method and system based on grating projection three-dimensional reconstruction
CN113596423B (en) Brightness correction method and device, electronic equipment and readable storage medium
CN115115788B (en) Three-dimensional reconstruction method and device, electronic equipment and storage medium
CN108921902B (en) Method and device for correcting structured light camera deviation
Huang et al. Defocusing rectified multi-frequency patterns for high-precision 3D measurement
JPH05306916A (en) Method and device for analyzing distribution of fringe phase
CN114739321B (en) Structural light striation correction method for precise grating measurement
CN118009928A (en) Projector calibration method based on local homography of round edge points
CN116878382B (en) Remote high-speed surface measurement method based on structured light
Zhang et al. Generic nonsinusoidal phase error correction for 3D shape measurement using a digital video projector

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