Rapid phase unwrapping method based on phase encoding
Technical Field
The invention relates to an optical three-dimensional measurement method, belongs to the technical field of photoelectric detection, and particularly relates to a rapid phase unwrapping method based on phase encoding.
Background
With the rapid development of modern industry and information technology, the requirements for the speed and precision of three-dimensional measurement of objects are higher and higher. Among a plurality of methods for acquiring three-dimensional information of an object, an optical three-dimensional measurement technology widely relates to various subjects such as optical imaging, computer technology, photoelectron information, image processing and the like, has the characteristic of integrating the advantages of other measurement methods, and gradually becomes a trend in the field of three-dimensional topography measurement. The optical three-dimensional measurement technology actually reconstructs a surface shape of a three-dimensional object by using a two-dimensional projection image, namely, information is acquired from the two-dimensional projection image, and then the geometric dimension of the object in a three-dimensional space is obtained by processing digital information. Among them, the three-dimensional measurement method based on the grating fringe projection is one of popular measurement methods in the optical three-dimensional measurement method, and has irreplaceable superiority for obtaining three-dimensional surface information, and in recent years, remarkable progress has been made in practical and commercial applications.
Through the current research situation and development trend analysis research at home and abroad, the traditional three-dimensional measurement technology is developed more mature, but is mostly static measurement. In recent years, high-speed, real-time and high-precision three-dimensional measurement is widely applied to the aspects of industrial on-line detection, virtual reality, medical diagnosis, object deformation analysis and the like, and along with the improvement of the performances of acquisition equipment, projection equipment and a high-speed processor, a high-speed, real-time and high-resolution three-dimensional measurement method is gradually becoming an important direction for the development of an optical three-dimensional measurement technology. Therefore, how to solve the absolute phase of the object to be measured by using less projection fringe frame number becomes a breakthrough. In the traditional measuring method, more than or equal to six fringe images are usually needed to realize the measurement of the absolute phase, so that the time consumption is long, and the measuring speed is directly influenced.
Compared with the traditional phase coding method, the rapid phase unwrapping method based on the phase coding has higher measurement precision and speed, and has potential application prospect and practical value in the field of rapid measurement.
Disclosure of Invention
The invention aims to provide a quick phase unwrapping method based on phase encoding, which only needs to project two frames of sinusoidal phase shift fringe patterns, two frames of phase encoding fringe patterns and one frame of blank patterns, has short time consumption, can effectively improve the measuring speed, and has potential application prospect and practical value in the field of quick measurement.
In order to achieve the purpose, the invention adopts the following technical scheme: a fast phase unwrapping method based on phase encoding, the method comprising the steps of:
generating two sinusoidal stripe graphs, two phase coding stripe graphs and a blank graph by using a computer, and shooting five graphs projected to an object to be measured by using a camera;
generating two additional sine stripe graphs and two phase coding stripe graphs by using the blank graph;
obtaining the wrapping phase of the object by using the four sinusoidal fringe patterns, obtaining the fringe order of the object by using the four phase coding fringe patterns, and further obtaining the absolute phase of the object to be measured through calculation;
and step four, obtaining real three-dimensional information of the object to be measured by using a phase-height conversion formula through the obtained absolute phase.
Preferably, the two sinusoidal fringe graphs generated by the computer in the first step are represented by I1(x,y)、I2(x, y), two phase encoded fringe patterns generated are shown as I3(x,y)、I4(x, y) and phase shifts of 0 and pi/2, respectively, and a blank graph represented by I5(x, y), the optical expressions of the five figures are respectively:
I5(x,y)=2A(x,y) (5)
where A (x, y) is background light intensity, B (x, y) is modulation intensity, T is fringe period number, I5(x, y) is twice the dc component of the blank.
Preferably, the specific implementation method of the second step is as follows: two additional sinusoidal fringe patterns I generated by equation (6)6(x,y)、I7(x, y) and two phase encoded fringe patterns I8(x,y)、I9(x, y) whose optical expressions are:
Ii(x,y)=I5(x,y)-Ij(x,y);j=1,2,3,4 (6)
preferably, the acquisition method of the wrapped phase, the fringe order and the absolute phase in the third step is as follows:
two sine fringe patterns I shot by a camera are solved by using a formula (11)1(x,y)、I2(x, y) and two additionally generated sinusoidal fringe patterns I6(x,y)、I7Wrapped phase contained in (x, y):
code phase
Expressed by equation (12):
where x is the pixel point of the projector in the horizontal direction, p is the fringe spacing or the number of pixels per fringe period, floor [ x ] is the rounding function, and mod (x, y) is the remainder function.
Embedding the code phase into the sinusoidal fringe pattern to obtain a phase code fringe pattern, and obtaining the step phase by using the formula (13):
from the step phase, the fringe order k (x, y) is determined using equation (14):
where fix x is a function rounded to 0.
After the fringe order is obtained, the final absolute phase is obtained using equation (15):
preferably, the specific implementation method of the step four is as follows: and performing phase-height conversion through the obtained absolute phase, and obtaining the real height information of the object to be measured by using a formula (16):
wherein f is0The method is characterized in that the method is a method for measuring the sine stripe frequency on a reference plane, delta phi is the absolute phase difference of corresponding points of the surface of an object to be measured and the reference plane, d is the distance between a projector and a camera, and L is the distance between the projector and the camera and the reference plane.
The invention has the advantages that:
(1) compared with the traditional phase encoding method: the traditional phase coding method can reconstruct the three-dimensional appearance of an object by using at least six images, the method can achieve the effect of 8 images in the traditional method by only five images, and the measuring speed is higher than that of the traditional method;
(2) the code word is determined by using the phase instead of the strength, so that the code word is insensitive to the surface contrast, the ambient light and the camera noise and has stronger robustness;
(3) because the projection stripe number is small, the measurement speed is high, and the method has potential application prospect and practical value in the rapid and real-time three-dimensional measurement of the dynamic object.
Drawings
FIG. 1 is a schematic view of a measurement system for three-dimensional measurements according to an embodiment of the present invention;
FIG. 2 is a graph of two sinusoidal fringe patterns, two phase-encoded fringe patterns and a blank pattern generated in the embodiment of the present invention, in which (a) is a sinusoidal fringe pattern I1(x, y), (b) are sine stripe patterns I2(x, y), (c) are blank I5(x, y), (d) are phase-encoded fringe patterns I6(x, y), (e) are phase-encoded fringe patterns I7(x,y);
FIG. 3 is a diagram of a row of wrapping phases and fringe orders of an object under test according to an embodiment of the present invention;
fig. 4 is an absolute phase diagram of an object to be measured according to an embodiment of the present invention.
Detailed Description
It is easily understood that various embodiments of the present invention can be conceived by those skilled in the art according to the technical solution of the present invention without changing the essential spirit of the present invention. Therefore, the following detailed description and the accompanying drawings are merely illustrative of the technical aspects of the present invention, and should not be construed as all of the present invention or as limitations or limitations on the technical aspects of the present invention. The present invention will be described in further detail with reference to the following description of the drawings, which are not intended to limit the present invention, and all similar structures and similar variations using the present invention shall fall within the scope of the present invention.
An optical three-dimensional measurement system based on a phase encoding fast phase unwrapping method is shown in fig. 1 and comprises a DLP projector 1, a CCD camera 2, a computer 3, a measurement support 4, a reference plane 5 and an object to be measured 6. The DLP projector 1 and the CCD camera 2 are placed on a measuring bracket 4; the DLP projector 1 and the CCD camera 2 are respectively connected with the computer 3 through data lines; the object 6 to be measured is placed on the reference plane 5; the computer 3 comprises an image acquisition card, projection software and measurement software. The DLP projector 1 focuses and projects stripes with characteristic information onto the surface of an object to be measured 6, the CCD camera 2 collects the stripe information, the characteristic information is extracted after the processing of the computer 3, and three-dimensional reconstruction is carried out according to a specific algorithm.
The invention relates to a fast phase unwrapping method based on phase encoding, which comprises the following steps:
the method comprises the following steps: two sinusoidal fringe patterns I generated by computer 31(x,y)、I2(x, y), two phase encoded fringe patterns I3(x,y)、I4The (x, y) phase shifts are respectively 0 and pi/2, and a blank diagram I5(x, y), the optical expressions of the five figures are respectively:
I5(x,y)=2A(x,y) (5)
where A (x, y) is background light intensity, B (x, y) is modulation intensity, T is fringe period number, I5(x, y) is twice the dc component of the blank.
Step two: two additional sinusoidal fringe patterns I generated by equation (6)6(x,y)、I7(x, y) and two phase encoded fringe patterns I8(x,y)、I9The (x, y) optical expressions are:
Ii(x,y)=I5(x,y)-Ij(x,y);j=1,2,3,4 (6)
step three: the acquisition method of wrapped phase, fringe order and absolute phase is as follows:
the wrapping phases contained in the two sinusoidal fringe patterns shot by the CCD camera 2 and the two additionally generated sinusoidal fringe patterns are solved by using the formula (11):
code phase
Expressed by equation (12):
wherein x is a pixel point in the horizontal direction of the DLP projector 1, p is a fringe spacing or a pixel number of each fringe period, floor [ x ] is a rounding function, and mod (x, y) is a remainder function.
Embedding the code phase into the sinusoidal fringe pattern to obtain a phase code fringe pattern, and obtaining the step phase by using the formula (13):
from the step phase, the fringe order k (x, y) is determined using equation (14):
where fix x is a function rounded to 0.
After the fringe order is obtained, the final absolute phase is obtained by equation (15).
Step four: three-dimensional reconstruction, phase-height conversion: obtaining the real height information of the object 6 to be measured by using the formula (16):
wherein f is0Is the frequency of the sine stripe on the reference plane 5, and delta phi is the absolute phase difference of the surface of the object to be measured 6 and the corresponding point of the reference plane 5. d is the distance between the DLP projector 1 and the CCD camera 2, and L is the distance between the DLP projector 1 and the CCD camera 2 to the reference plane 5.
Without being limited thereto, any changes or substitutions that are not thought of through the inventive work should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope defined by the claims.