CN109242897B - Binary pattern defocused projection method of structured light measurement system - Google Patents

Binary pattern defocused projection method of structured light measurement system Download PDF

Info

Publication number
CN109242897B
CN109242897B CN201811063204.4A CN201811063204A CN109242897B CN 109242897 B CN109242897 B CN 109242897B CN 201811063204 A CN201811063204 A CN 201811063204A CN 109242897 B CN109242897 B CN 109242897B
Authority
CN
China
Prior art keywords
binary
phase
stripe
value
projection
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
CN201811063204.4A
Other languages
Chinese (zh)
Other versions
CN109242897A (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.)
Guangdong University of Technology
Original Assignee
Guangdong University 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 Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201811063204.4A priority Critical patent/CN109242897B/en
Publication of CN109242897A publication Critical patent/CN109242897A/en
Application granted granted Critical
Publication of CN109242897B publication Critical patent/CN109242897B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • G06T7/521Depth or shape recovery from laser ranging, e.g. using interferometry; from the projection of structured light
    • 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/2545Measuring 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 with one projection direction and several detection directions, e.g. stereo

Abstract

The invention discloses a binary pattern defocusing projection method of a structured light measurement system, which solves the problem that the generated binary defocusing projection pattern has larger error due to the length of the period width of stripes, provides a novel method for continuously adjusting the period width of the projection stripes according to different application occasions, reduces the continuous iteration jump times, is suitable for the application occasions of rapid measurement, projects positive and negative gray code stripes under the defocusing projection condition, solves the problem of larger phase solving error due to fuzzy gray code stripe edges, and ensures that the positions of intersection points determined by using a positive and negative gray code method are irrelevant to the defocusing degree and are all on the same pixel point, thereby ensuring the stability and high precision of the method.

Description

Binary pattern defocused projection method of structured light measurement system
Technical Field
The invention relates to the field of optics, in particular to a binary pattern defocusing projection method of a structured light measurement system.
Background
The current structured light three-dimensional measurement technology is mainly to obtain the three-dimensional appearance of an object by projecting sinusoidal stripes to a target object and acquiring phase information by utilizing stripe images acquired by a computer. But limited by the principle of a projector, the conventional projected sine stripes cannot meet the requirement of high-speed measurement. Meanwhile, the projected sinusoidal stripes are changed due to the nonlinear characteristic of the projector, so that additional phase errors can be introduced in subsequent processing.
Aiming at the problem of projector projection, a binary stripe is projected by defocusing instead, so that the measurement speed of a measurement system is improved, and the problem of nonlinearity of the projector is avoided. But the key point for the out-of-focus projection technique of the projector is to design out-of-focus projection binary fringes. The common defocused projection binary stripes mainly comprise binary stripes, a Pulse Width Modulation (PWM) technology, binary stripes generated by a dithering algorithm, optimal candidate block binary stripe generation and the like.
The binary fringe projection method is simple, the projection speed is high, the measurement speed is also high, but a large amount of higher harmonics always exist, the sine property of the generated fringes can be reduced, the quality of the projected fringes is greatly influenced, and therefore phase errors are introduced. The Pulse Width Modulation (PWM) technology can effectively reduce the influence of higher harmonics on the stripe quality and reduce the phase error of measurement, but the PWM technology is often used for processing binary stripes with narrow stripes, and the effect is poor when the period width of the binary stripes is large. Although the problem of poor quality of wide-period stripes can be solved by the binary stripe method generated by the dithering algorithm, the design of short-period binary stripes is difficult to process, different effects are achieved corresponding to different application occasions, and the measurement phase precision is different. The method for generating the optimal candidate block binary fringes can continuously adjust the projected binary fringes according to the measurement occasion, so that the phase error obtained by measurement is minimum, and the measurement accuracy is improved.
Disclosure of Invention
The invention provides a binary pattern defocusing projection method of a structured light measurement system, which is used for solving the technical problems that the speed of generating binary stripes by projection is low and the application occasion of rapid measurement is not suitable due to the fact that the existing generated best candidate block binary stripes need continuous iterative jumping.
The invention provides a binary pattern defocusing projection method of a structured light measurement system, which comprises the following steps:
according to the symmetry and periodicity of sine stripes generated by defocusing, selecting a binary image with the pixel size of Sx multiplied by Sy as a binary block, and splicing the binary block to generate a stripe image, wherein Sx represents the length in the X direction, and Sy represents the length in the Y direction;
the binary block is a half of a period for generating projection stripes, and the binary block is symmetrical to obtain a periodic binary block;
determining the gray value distribution of each pixel in the two-value block, wherein the gray value of each pixel is 1 or 0;
the determining the gray value distribution of each pixel in the two-value block specifically includes: dividing Sx into three parts, wherein the front part and the rear part have equal length and opposite pixel gray values, and determining the range value Mx of the middle part according to the parity formula of Sx, wherein the parity formula specifically comprises the following steps:
Figure BDA0001797646060000021
wherein n is less than or equal to Sx/2;
according to the value interval of the middle part range Mx, then carrying out value selection from small to large according to Mx;
carrying out random assignment on the Sx multiplied by Sy binary blocks, then carrying out symmetry by using the determined Sx multiplied by Sy binary blocks, and splicing to generate at least one stripe pattern of the whole period;
selecting one stripe pattern with the minimum phase root mean square error between an image obtained by defocusing the whole binary image in at least one stripe pattern through a projector and an ideal sinusoidal image as an optimal projection binary pattern under the Mx value;
changing the range value of the middle part, comparing the phase root mean square error between the phase and the ideal sine stripe obtained by defocusing projection of Mx under different values, and taking the stripe pattern with the minimum phase root mean square error as an optimal projection binary pattern;
and carrying out projector defocusing projection on the generated binary pattern, carrying out defocusing projection on gray code stripes, respectively projecting defocused forward gray codes and reverse gray codes, positioning the edges of the stripes by solving the intersection point of the two stripe profiles, determining the number of the gray codes, and solving an absolute phase.
Preferably, Sx represents the length direction of the stripe, and is half of the stripe period, and the value of Sx is determined by a second parity formula, where the second parity formula specifically is:
Figure BDA0001797646060000031
preferably, the performing projector out-of-focus projection on the generated binary pattern, performing out-of-focus projection on gray code stripes, projecting out-of-focus forward gray codes and backward gray codes, respectively, locating edges of the stripes by solving an intersection point of outlines of the two stripes, determining the number of gray codes, and solving an absolute phase further includes:
generating a binary pattern by a defocusing binary pattern generation method, generating three optimal binary patterns according to a three-step phase shift method, and defocusing and projecting the three optimal binary patterns on a reference plane and a measured object by a DLP (digital light processing) projector;
acquiring three fringe patterns which are not modulated on a reference plane and three fringe patterns which are modulated and deformed by the height of a measured object through a camera;
generating positive and negative two groups of gray code stripes, projecting the positive and negative gray code stripes on a reference plane and a measured object through a projector, and acquiring the two groups of positive and negative gray code stripes which are not modulated on the reference plane and the two groups of positive and negative gray code stripes after the height modulation deformation of the measured object through a camera;
respectively solving phase main values of the two groups of phase-shifted binary patterns;
utilizing positive and negative Gray codes to accurately position the edges of the Gray code stripes, decoding the Gray codes and determining the gray codesObtaining the fringe period number k of the pixel point, and obtaining the absolute phase according to the relation between the absolute phase and the phase main value
Figure BDA0001797646060000032
Determining alpha (x, y) as absolute phase solved by fringe on reference plane without object modulation, determining beta (x, y) as absolute phase solved by fringe after object modulation, and obtaining difference value of the two as object continuous phase difference
Figure BDA0001797646060000033
Figure BDA0001797646060000034
Calibrating a camera and a projector, and calibrating the overall parameters of the system;
and solving the height information of each point on the surface of the object by utilizing the object height information solving expression according to the data calibrated by the system.
Preferably, the performing symmetry by using the determined Sx × Sy binary block specifically includes:
when the stripe period T is an odd number, the two-value block Sx multiplied by Sy takes the middle of the Sx-1 th row and the Sx-1 th row as a symmetrical line, takes the interval [0, Sx-1] as a symmetrical interval, and obtains the stripe pattern of the whole period by keeping the gray value of the Sx-1 th row unchanged;
when the stripe period T is even, the two-valued block Sx Sy takes the Sx-th row end as the symmetric line and the interval [0, Sx ] as the symmetric interval to obtain the stripe pattern of the whole period.
Preferably, the respectively solving of the phase principal values of the two sets of phase shifted binary patterns specifically includes:
according to the three-step phase shift method, the phase shift amount of the two groups of binary fringe patterns can be determined to be 0 respectively,
Figure BDA0001797646060000041
assume that the light intensity distribution over the two sets of phase shifted binary patterns is:
Ia1(b1)=Aa(b)(x,y)+Ba(b)(x,y)cos(φa(b)(x,y))
Figure BDA0001797646060000042
Figure BDA0001797646060000043
wherein, a represents three fringe patterns which are not modulated on the reference plane, B represents three fringe patterns which are modulated and deformed by the height of the measured object, A (x, y) is the fringe background, B (x, y) is the fringe contrast,
Figure BDA0001797646060000044
and (3) solving the phase main values of the two groups of fringe patterns for the phase main values:
Figure BDA0001797646060000045
preferably, the phase main value is a wrapped phase, and the corresponding value range is [ -pi, pi ].
Preferably, the object height information solving expression specifically includes:
Figure BDA0001797646060000046
wherein, L is the vertical distance between the camera optical center and the reference plane, D0 is the distance between the camera optical center and the projector optical center, and T is the distance corresponding to the periodic intensity ratio.
According to the technical scheme, the invention has the following advantages:
the invention provides a binary pattern defocusing projection method of a structured light measurement system, which comprises the following steps: according to the symmetry and periodicity of sine stripes generated by defocusing, selecting a binary image with the pixel size of Sx multiplied by Sy as a binary block, and splicing the binary block to generate a stripe image, wherein Sx represents the length in the X direction, and Sy represents the length in the Y direction; the binary block is a half of a period for generating projection stripes, and the binary block is symmetrical to obtain a periodic binary block; determining the gray value distribution of each pixel in the two-value block, wherein the gray value of each pixel is 1 or 0; the determining the gray value distribution of each pixel in the two-value block specifically includes: dividing Sx into three parts, wherein the front part and the rear part have equal length and opposite pixel gray values, and determining the range value Mx of the middle part according to the odd-even formula of Sx; according to the value interval of the middle part range Mx, then carrying out value selection from small to large according to Mx; carrying out random assignment on the Sx multiplied by Sy binary blocks, then carrying out symmetry by using the determined Sx multiplied by Sy binary blocks, and splicing to generate at least one stripe pattern of the whole period; selecting one stripe pattern with the minimum phase root mean square error between an image obtained by defocusing the whole binary image in at least one stripe pattern through a projector and an ideal sinusoidal image as an optimal projection binary pattern under the Mx value; changing the range value of the middle part, comparing the phase root mean square error between the phase and the ideal sine stripe obtained by defocusing projection of Mx under different values, and taking the stripe pattern with the minimum phase root mean square error as an optimal projection binary pattern; and carrying out projector defocusing projection on the generated binary pattern, carrying out defocusing projection on gray code stripes, respectively projecting defocused forward gray codes and reverse gray codes, positioning the edges of the stripes by solving the intersection point of the two stripe profiles, determining the number of the gray codes, and solving an absolute phase.
The invention provides a new application occasion which can continuously adjust the period width of the projection stripe according to different application occasions, reduce the continuous iteration jump times and is suitable for the rapid measurement. And the positive and negative gray code stripes are projected under the condition of out-of-focus projection, the problem of large phase solving error caused by fuzzy gray code stripe edges is solved, and the positions of the intersection points determined by the positive and negative gray code method are irrelevant to out-of-focus degrees and are all on the same pixel point, so that the stability and high precision of the method are ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a schematic flowchart of an embodiment of a binary pattern defocused projection method of a structured light measurement system provided by the present invention;
FIG. 2 is a schematic flowchart of another embodiment of a binary pattern defocused projection method of a structured light measurement system according to the present invention;
fig. 3 is a symmetrical graph of sinusoidal stripes with T-15;
fig. 4 is a symmetrical graph of a sinusoidal stripe with T-16.
Detailed Description
The embodiment of the invention provides a binary pattern defocusing projection method and device of a structured light measurement system, and solves the technical problems that the speed of generating binary stripes by projection is low and the application occasion of rapid measurement is not suitable due to the fact that the existing generated best candidate block binary stripes need continuous iterative jumping.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, an embodiment of the present invention provides an embodiment of a binary pattern defocused projection method of a structured light measurement system, including:
s101: according to the symmetry and periodicity of sine stripes generated by defocusing, selecting a binary image with the pixel size of Sx multiplied by Sy as a binary block, and splicing the binary block to generate a stripe image, wherein Sx represents the length in the X direction, and Sy represents the length in the Y direction;
in the embodiment of the invention, when binary pattern defocusing projection of a structured light measurement system is required, a binary image with the pixel size of SxSy is selected as a binary block according to the symmetry and periodicity of sinusoidal stripes generated by defocusing, and the binary block is spliced to generate a stripe image, wherein Sx represents the length in the X direction, and Sy represents the length in the Y direction;
s102: the binary block is a half of a period for generating projection stripes, and the binary block is symmetrical to obtain a periodic binary block;
selecting a binary image with a pixel size of Sx multiplied by Sy as a binary block according to the symmetry and periodicity of sine stripes generated by defocusing, splicing the binary blocks to generate a stripe image, wherein Sx represents the length in the X direction, Sy represents the length in the Y direction, the binary block is required to be half of the period of generating projection stripes, and the binary block is symmetrical to obtain a periodic binary block;
sx represents the length direction of the stripe, which is half of the stripe period, and the value of Sx is determined by a second parity formula, which specifically comprises:
Figure BDA0001797646060000071
alternatively, the binary block Sx × Sy is half of the period of the generated projected fringe, and then symmetrical to obtain the binary block of the whole period. However, when different Sx sizes are taken according to the odd and even numbers of T, the symmetry mode is different. When the stripe period T is odd, the two-valued block Sx Sy takes the middle of the Sx-1 th column and the Sx-1 th column as a symmetric line, the interval [0, Sx-1] as a symmetric interval, and the gray-level value of the Sx-th column is kept unchanged to obtain the stripe pattern of the whole period. However, when the stripe period T is an even number, the binary block Sx × Sy obtains a stripe pattern of the entire period with the Sx-th column end as a symmetric line and the section [0, Sx ] as a symmetric section, and fig. 3, fig. 4, and fig. 4 are sinusoidal stripe symmetric diagrams with T ═ 15 and T ═ 16, respectively.
S103: determining the gray value distribution of each pixel in the two-value block, wherein the gray value of each pixel is 1 or 0;
after the binary block is a half of a period for generating a projected fringe, and the binary block is symmetrical to obtain a periodic binary block, determining the gray value distribution of each pixel in the binary block, wherein the gray value of each pixel is 1 or 0;
s104: determining the gray value distribution of each pixel in the two-value block specifically includes: dividing Sx into three parts, wherein the front part and the rear part have equal length and opposite pixel gray values, and determining the range value Mx of the middle part according to the parity formula of Sx, wherein the parity formula specifically comprises the following steps:
Figure BDA0001797646060000072
wherein n is less than or equal to Sx/2;
after determining the gray-scale value distribution of each pixel in the binary block, where the gray-scale value of each pixel is 1 or 0, the determining the gray-scale value distribution of each pixel in the binary block specifically includes: dividing Sx into three parts, wherein the front part and the rear part have equal length and opposite pixel gray values, and determining the range value Mx of the middle part according to the odd-even formula of Sx;
s105: according to the value interval of the middle part range Mx, then carrying out value selection from small to large according to Mx;
the determining the gray value distribution of each pixel in the two-value block specifically includes: the method comprises the following steps of dividing Sx into three parts, wherein the front part and the rear part are equal in length and opposite in pixel gray value, determining a range value Mx of the middle part according to an odd-even formula of the Sx, and then, taking a value according to the size of the range Mx of the middle part according to the size of the Mx;
s106: carrying out random assignment on the Sx multiplied by Sy binary blocks, then carrying out symmetry by using the determined Sx multiplied by Sy binary blocks, and splicing to generate at least one stripe pattern of the whole period;
after values are taken according to the value range Mx of the middle part range and Mx is increased from small to large, the SxSy binary blocks need to be randomly assigned, and then the determined SxSy binary blocks are used for symmetry and are spliced to generate at least one stripe pattern of the whole period;
the step of performing symmetry by using the determined Sx × Sy binary block specifically includes:
when the stripe period T is odd, the two-valued block Sx Sy takes the middle of the Sx-1 th column and the Sx-1 th column as a symmetric line, the interval [0, Sx-1] as a symmetric interval, and the gray-level value of the Sx-th column is kept unchanged to obtain the stripe pattern of the whole period.
When the stripe period T is even, the two-valued block Sx Sy takes the Sx-th row end as the symmetric line and the interval [0, Sx ] as the symmetric interval to obtain the stripe pattern of the whole period.
S107: selecting one stripe pattern with the minimum phase root mean square error between an image obtained by defocusing the whole binary image in at least one stripe pattern through a projector and an ideal sinusoidal image as an optimal projection binary pattern under the Mx value;
randomly assigning values to the SxSy binary blocks, then, symmetrically using the determined SxSy binary blocks, and splicing to generate at least one stripe pattern in the whole period, wherein one stripe pattern with the minimum phase root mean square error between an image obtained by defocusing the whole binary image in the at least one stripe pattern through a projector and an ideal sinusoidal image needs to be selected as an optimal projection binary pattern under the Mx value;
s108: changing the range value of the middle part, comparing the phase root mean square error between the phase and the ideal sine stripe obtained by defocusing projection of Mx under different values, and taking the stripe pattern with the minimum phase root mean square error as an optimal projection binary pattern;
after one stripe pattern with the minimum phase root mean square error between an image obtained by defocusing the whole binary image in at least one stripe pattern through a projector and an ideal sinusoidal image is selected as an optimal projection binary pattern under an Mx value, the value of the middle part range needs to be changed, the Mx is compared with defocused projections under different values to obtain the phase root mean square error between the phase and the ideal sinusoidal stripe, and the stripe pattern with the minimum phase root mean square error is selected as the optimal projection binary pattern.
S109: carrying out projector defocusing projection on the generated binary pattern, carrying out defocusing projection on gray code stripes, respectively projecting defocused forward gray codes and reverse gray codes, positioning the edges of the stripes by solving the intersection point of the two stripe profiles, determining the number of gray codes, and solving an absolute phase;
the method comprises the steps of changing the range value of the middle part, comparing the phase root mean square error between the phase and the ideal sinusoidal stripe obtained by defocusing projection of Mx under different values, after taking the stripe pattern with the minimum phase root mean square error as an optimal projection binary pattern, conducting projector defocusing projection on the generated binary pattern, conducting defocusing projection on the gray code stripe, projecting a defocused forward gray code and a defocused reverse gray code respectively, locating the edge of the stripe by solving the intersection point of the two stripe profiles, determining the number of the gray code, and solving the absolute phase.
The invention provides a binary pattern defocusing projection method of a structured light measurement system, which comprises the following steps: according to the symmetry and periodicity of sine stripes generated by defocusing, selecting a binary image with the pixel size of Sx multiplied by Sy as a binary block, and splicing the binary block to generate a stripe image, wherein Sx represents the length in the X direction, and Sy represents the length in the Y direction; the binary block is a half of a period for generating projection stripes, and the binary block is symmetrical to obtain a periodic binary block; determining the gray value distribution of each pixel in the two-value block, wherein the gray value of each pixel is 1 or 0; determining the gray value distribution of each pixel in the two-value block specifically includes: dividing Sx into three parts, wherein the front part and the rear part have equal length and opposite pixel gray values, and determining the range value Mx of the middle part according to the odd-even formula of Sx; according to the value interval of the middle part range Mx, then carrying out value selection from small to large according to Mx; carrying out random assignment on the Sx multiplied by Sy binary blocks, then carrying out symmetry by using the determined Sx multiplied by Sy binary blocks, and splicing to generate at least one stripe pattern of the whole period; selecting one stripe pattern with the minimum phase root mean square error between an image obtained by defocusing the whole binary image in at least one stripe pattern through a projector and an ideal sinusoidal image as an optimal projection binary pattern under the Mx value; changing the range value of the middle part, comparing the phase root mean square error between the phase and the ideal sine stripe obtained by defocusing projection of Mx under different values, and taking the stripe pattern with the minimum phase root mean square error as an optimal projection binary pattern; and carrying out projector defocusing projection on the generated binary pattern, carrying out defocusing projection on gray code stripes, respectively projecting defocused forward gray codes and reverse gray codes, positioning the edges of the stripes by solving the intersection point of the two stripe profiles, determining the number of the gray codes, and solving an absolute phase. The method provides a new application occasion which can continuously adjust the period width of the projection fringe according to different application occasions, reduce the continuous iteration jump times and is suitable for the rapid measurement. And the positive and negative gray code stripes are projected under the condition of out-of-focus projection, the problem of large phase solving error caused by fuzzy gray code stripe edges is solved, and the positions of the intersection points determined by the positive and negative gray code method are irrelevant to out-of-focus degrees and are all on the same pixel point, so that the stability and high precision of the method are ensured.
The above is a description of an embodiment of a binary pattern off-focus projection method of a structured light measurement system, and another embodiment of a binary pattern off-focus projection method of a structured light measurement system will be described in detail below.
Referring to fig. 2, another embodiment of a binary pattern defocus projection method of a structured light measurement system according to the present invention includes performing projector defocus projection on a generated binary pattern, performing defocus projection on gray code fringes, projecting defocused forward gray code and backward gray code, respectively, locating an edge of a fringe by solving an intersection of two fringe profiles, determining the number of gray codes, and solving an absolute phase, and further includes:
s201: generating a binary pattern by a defocusing binary pattern generation method, generating three optimal binary patterns according to a three-step phase shift method, and defocusing and projecting the three optimal binary patterns on a reference plane and a measured object by a DLP (digital light processing) projector;
in the embodiment of the invention, when the binary pattern of the structured light measurement system needs to be subjected to out-of-focus projection, a binary pattern needs to be generated by a method for generating an out-of-focus binary pattern, three optimal binary patterns are generated according to a three-step phase shift method, and three optimal binary patterns are subjected to out-of-focus projection by a DLP (digital light processing) projector on a reference plane and an object to be measured;
s202: acquiring three fringe patterns which are not modulated on a reference plane and three fringe patterns which are modulated and deformed by the height of a measured object through a camera;
after a binary pattern is generated by a defocusing binary pattern generation method, three optimal binary patterns are generated according to a three-step phase shift method, and three optimal binary patterns are defocused and projected on a reference plane and a measured object by a DLP projector, three fringe patterns which are not modulated on the reference plane and three fringe patterns which are modulated and deformed by the height of the measured object need to be obtained by a camera;
s203: generating positive and negative two groups of gray code stripes, projecting the positive and negative gray code stripes on a reference plane and a measured object through a projector, and acquiring the two groups of positive and negative gray code stripes which are not modulated on the reference plane and the two groups of positive and negative gray code stripes after the height modulation deformation of the measured object through a camera;
after three fringe patterns which are not modulated on a reference plane and three fringe patterns which are subjected to height modulation deformation of a measured object are obtained through a camera, positive and negative groups of gray code fringes need to be generated, the positive and negative gray code fringes are projected on the reference plane and the measured object through a projector, and the two groups of positive and negative gray code fringes which are not modulated on the reference plane and two groups of positive and negative gray code fringes which are subjected to height modulation deformation of the measured object are obtained through the camera;
s204: according to the three-step phase shift method, the phase shift amount of the two groups of binary fringe patterns can be determined to be 0 respectively,
Figure BDA0001797646060000111
assume that the light intensity distribution over the two sets of phase shifted binary patterns is:
Ia1(b1)=Aa(b)(x,y)+Ba(b)(x,y)cos(φa(b)(x,y))
Figure BDA0001797646060000112
Figure BDA0001797646060000113
wherein, a represents three fringe patterns which are not modulated on the reference plane, B represents three fringe patterns which are modulated and deformed by the height of the measured object, A (x, y) is the fringe background, B (x, y) is the fringe contrast,
Figure BDA0001797646060000114
obtaining the phase main values of the two groups of fringe patterns for the phase main values, wherein the phase main values are wrapping phases, and the corresponding value ranges are [ -pi, pi [ -pi [ ]]:
Figure BDA0001797646060000115
After generating two sets of positive and negative gray code stripes, projecting the positive and negative gray code stripes on a reference plane and a measured object through a projector, acquiring two sets of positive and negative gray code stripes which are not modulated on the reference plane and two sets of positive and negative gray code stripes which are modulated and deformed by the height of the measured object through a camera, determining that the phase shift quantities of two sets of binary stripe patterns are respectively 0 according to a three-step phase shift method,
Figure BDA0001797646060000116
assuming the light intensity distribution on two sets of phase-shifted binary patterns, wherein a represents three fringe patterns which are not modulated on the reference plane, B represents three fringe patterns after the height modulation deformation of the measured object, A (x, y) is the fringe background, B (x, y) is the fringe contrast,
Figure BDA0001797646060000117
obtaining the phase main values of the two groups of fringe patterns for the phase main values, wherein the phase main values are wrapping phases, and the corresponding value ranges are [ -pi, pi [ -pi [ ]];
S205: accurate positioning of edges of gray code stripes using positive and negative gray codesAnd finally, decoding the Gray code, determining the number k of fringe cycles where the pixel points are located by the Gray code, and obtaining the absolute phase according to the relation between the absolute phase and the phase main value
Figure BDA0001797646060000121
When it can be determined that the two sets of binary fringe patterns are respectively 0 according to the three-step phase shift method,
Figure BDA0001797646060000122
assuming the light intensity distribution on two sets of phase-shifted binary patterns, wherein a represents three fringe patterns which are not modulated on the reference plane, B represents three fringe patterns after the height modulation deformation of the measured object, A (x, y) is the fringe background, B (x, y) is the fringe contrast,
Figure BDA00017976460600001211
obtaining the phase main values of the two groups of fringe patterns for the phase main values, wherein the phase main values are wrapping phases, and the corresponding value ranges are [ -pi, pi [ -pi [ ]]Then, the positive and negative gray codes are needed to be used for accurately positioning the edge of the gray code stripe, the gray codes are decoded, the number k of the stripe period where the pixel point is located is determined by the gray codes, and the absolute phase is obtained according to the relation between the absolute phase and the phase main value
Figure BDA0001797646060000123
S206: determining alpha (x, y) as absolute phase solved by fringe on reference plane without object modulation, determining beta (x, y) as absolute phase solved by fringe after object modulation, and obtaining difference value of the two as object continuous phase difference
Figure BDA0001797646060000124
Figure BDA0001797646060000125
The gray code is decoded to determine whether the gray code is coded by gray code when the positive and negative gray codes are used to accurately position the edge of the gray code stripeObtaining the fringe period number k of the pixel point, and obtaining the absolute phase according to the relation between the absolute phase and the phase main value
Figure BDA0001797646060000126
Then, it is determined that α (x, y) is the absolute phase obtained by solving the fringes which are not modulated by the object on the reference plane, β (x, y) is the absolute phase obtained by solving the fringes which are modulated by the object, and the difference value of the two is obtained as the continuous phase difference of the object
Figure BDA0001797646060000127
Figure BDA0001797646060000128
S207: calibrating a camera and a projector, and calibrating the overall parameters of the system;
determining alpha (x, y) as the absolute phase solved by the fringes without object modulation on the reference plane, determining beta (x, y) as the absolute phase solved by the fringes after object modulation, and obtaining the difference between the two phases as the continuous phase difference of the object
Figure BDA0001797646060000129
Figure BDA00017976460600001210
Then, calibrating a camera and a projector, and calibrating the overall parameters of the system;
s208: according to the data calibrated by the system, solving the height information of each point on the surface of the object by using the object height information solving expression;
after calibrating a camera and a projector and calibrating the overall parameters of the system, solving the height information of each point on the surface of an object by using an object height information solving expression according to the calibrated data of the system;
optionally, the object height information solving expression specifically includes:
Figure BDA0001797646060000131
wherein, L is the vertical distance between the camera optical center and the reference plane, D0 is the distance between the camera optical center and the projector optical center, and T is the distance corresponding to the periodic intensity ratio.
The embodiment of the invention provides a binary pattern defocused projection method of a structured light measurement system, which comprises the following steps: generating a binary pattern by a defocusing binary pattern generation method, generating three optimal binary patterns according to a three-step phase shift method, and defocusing and projecting the three optimal binary patterns on a reference plane and a measured object by a DLP (digital light processing) projector; acquiring three fringe patterns which are not modulated on a reference plane and three fringe patterns which are modulated and deformed by the height of a measured object through a camera; generating positive and negative two groups of gray code stripes, projecting the positive and negative gray code stripes on a reference plane and a measured object through a projector, and acquiring the two groups of positive and negative gray code stripes which are not modulated on the reference plane and the two groups of positive and negative gray code stripes after the height modulation deformation of the measured object through a camera; respectively solving phase main values of the two groups of phase-shifted binary patterns; utilizing positive and negative Gray codes to accurately position the edge of a Gray code stripe, decoding the Gray codes, determining the number k of the stripe cycles where pixel points are located by Gray codes, and obtaining an absolute phase according to the relation between the absolute phase and a phase main value; determining alpha (x, y) as absolute phase solved by fringe on reference plane without object modulation, determining beta (x, y) as absolute phase solved by fringe after object modulation, and obtaining difference value of the two as object continuous phase difference
Figure BDA0001797646060000132
Calibrating a camera and a projector, and calibrating the overall parameters of the system; according to the data calibrated by the system, the height information of each point on the surface of the object is solved by using the object height information solving expression, the positive and negative Gray code stripes are projected under the out-of-focus projection condition, the problem of large phase solving error caused by fuzzy gray code stripe edges is solved, and the two values of the intersection points determined by using the positive and negative Gray code method are irrelevant to the out-of-focus degree and are all in the same positionOn the pixel point, the stability and high precision of the method are ensured, and the technical problems that the projection generates the binary stripe at a low speed and is not suitable for the application occasion of rapid measurement due to the fact that the currently generated optimal candidate block binary stripe needs continuous iterative hopping are solved.
The specific implementation in this embodiment has been described in the above embodiments, and is not described here again.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the system and the module described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed modules and methods may be implemented in other ways. For example, the above-described module embodiments are merely illustrative, and for example, a division of a module is merely a logical division, and an actual implementation may have another division, for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
Modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (7)

1. A binary pattern defocusing projection method of a structured light measurement system is characterized by comprising the following steps:
according to the symmetry and periodicity of sine stripes generated by defocusing, selecting a binary image with the pixel size of Sx multiplied by Sy as a binary block, and splicing the binary block to generate a stripe image, wherein Sx represents the length in the X direction, and Sy represents the length in the Y direction;
the binary block is a half of a period for generating projection stripes, and the binary block is symmetrical to obtain a periodic binary block;
determining the gray value distribution of each pixel in the two-value block, wherein the gray value of each pixel is 1 or 0;
the determining the gray value distribution of each pixel in the two-value block specifically includes: dividing Sx into three parts, wherein the front part and the rear part have equal length and opposite pixel gray values, and determining the range value Mx of the middle part according to the parity formula of Sx, wherein the parity formula specifically comprises the following steps:
Figure FDA0003250166060000011
wherein n is less than or equal to Sx/2;
according to the value interval of the middle part range Mx, then carrying out value selection from small to large according to Mx;
carrying out random assignment on the Sx multiplied by Sy binary blocks, then carrying out symmetry by using the determined Sx multiplied by Sy binary blocks, and splicing to generate at least one stripe pattern of the whole period;
selecting one stripe pattern with the minimum phase root mean square error between an image obtained by defocusing the whole binary image in at least one stripe pattern through a projector and an ideal sinusoidal image as an optimal projection binary pattern under the Mx value;
changing the range value of the middle part, comparing the phase root mean square error between the phase and the ideal sine stripe obtained by defocusing projection of Mx under different values, and taking the stripe pattern with the minimum phase root mean square error as an optimal projection binary pattern;
and carrying out projector defocusing projection on the generated binary pattern, carrying out defocusing projection on gray code stripes, respectively projecting defocused forward gray codes and reverse gray codes, positioning the edges of the stripes by solving the intersection point of the two stripe profiles, determining the number of the gray codes, and solving an absolute phase.
2. The method of claim 1, wherein Sx represents a length direction of a stripe and is a half of a stripe period, and a value of Sx is determined by a second parity formula, and the second parity formula specifically is:
Figure FDA0003250166060000021
3. the method for defocused projection of binary patterns of the structured light measurement system according to claim 2, wherein the step of performing symmetry by using the determined sxxsy binary block specifically comprises:
when the stripe period T is an odd number, the two-value block Sx multiplied by Sy takes the middle of the Sx-1 th row and the Sx-1 th row as a symmetrical line, takes the interval [0, Sx-1] as a symmetrical interval, and obtains the stripe pattern of the whole period by keeping the gray value of the Sx-1 th row unchanged;
when the stripe period T is even, the two-valued block Sx Sy takes the Sx-th row end as the symmetric line and the interval [0, Sx ] as the symmetric interval to obtain the stripe pattern of the whole period.
4. The method of claim 3, wherein the method for defocusing projection of binary patterns includes performing projector defocusing projection on the generated binary patterns, performing defocusing projection on gray code stripes, projecting defocused forward gray codes and backward gray codes respectively, locating edges of the stripes by solving an intersection point of two stripe profiles, determining the number of gray codes, and solving an absolute phase, and further comprising:
generating a binary pattern by a defocusing binary pattern generation method, generating three optimal binary patterns according to a three-step phase shift method, and defocusing and projecting the three optimal binary patterns on a reference plane and a measured object by a DLP (digital light processing) projector;
acquiring three fringe patterns which are not modulated on a reference plane and three fringe patterns which are modulated and deformed by the height of a measured object through a camera;
generating two sets of positive and negative gray code stripes, projecting the positive and negative gray code stripes on a reference plane and a measured object through a projector, and acquiring the two sets of positive and negative gray code stripes which are not modulated on the reference plane and the two sets of positive and negative gray code stripes after the height modulation deformation of the measured object through a camera;
respectively solving phase main values of the two groups of phase-shifted binary patterns;
utilizing positive and negative Gray codes to accurately position the edge of the Gray code stripe, decoding the Gray codes, determining the number k of the stripe cycles where the pixel points are located by the Gray codes, and obtaining the absolute phase according to the relation between the absolute phase and the phase main value
Figure FDA0003250166060000022
Wherein phi (x, y) is the phase principal value of the two phase-shifted binary patterns, determining alpha (x, y) as the absolute phase solved by the fringe on the reference plane without object modulation, determining beta (x, y) as the absolute phase solved by the fringe after object modulation, and obtaining the difference between the two phases as the continuous phase difference of the object
Figure FDA0003250166060000031
Figure FDA0003250166060000032
Calibrating a camera and a projector, and calibrating the overall parameters of the system;
and solving the height information of each point on the surface of the object by utilizing the object height information solving expression according to the data calibrated by the system.
5. The method of claim 4, wherein the respectively solving phase main values of the two sets of phase-shifted binary patterns comprises:
according to the three-step phase shift method, the phase shift amount of the two groups of binary fringe patterns can be determined to be 0 respectively,
Figure FDA0003250166060000033
assume that the light intensity distribution over the two sets of phase shifted binary patterns is:
Figure FDA0003250166060000034
wherein, a represents three fringe patterns which are not modulated on the reference plane, B represents three fringe patterns after the height modulation deformation of the measured object, A (x, y) is the fringe background, B (x, y) is the fringe contrast, phi (x, y) is the phase principal value, and the phase principal values of the two groups of fringe patterns are obtained:
Figure FDA0003250166060000035
wherein, I1、I2、I3The light intensity distribution of the three fringe patterns is shown.
6. The method of claim 5, wherein the phase principal value is a wrapped phase, and the corresponding value range is [ - π, π ].
7. The method for defocused projection of binary patterns of the structured light measurement system according to claim 6, wherein the object height information solving expression specifically comprises:
Figure FDA0003250166060000036
wherein L is the vertical distance between the optical center of the camera and the reference plane, and D0T is the distance between the optical center of the camera and the optical center of the projector, and T is the distance corresponding to the periodic intensity ratio.
CN201811063204.4A 2018-09-12 2018-09-12 Binary pattern defocused projection method of structured light measurement system Active CN109242897B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811063204.4A CN109242897B (en) 2018-09-12 2018-09-12 Binary pattern defocused projection method of structured light measurement system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811063204.4A CN109242897B (en) 2018-09-12 2018-09-12 Binary pattern defocused projection method of structured light measurement system

Publications (2)

Publication Number Publication Date
CN109242897A CN109242897A (en) 2019-01-18
CN109242897B true CN109242897B (en) 2022-02-15

Family

ID=65058207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811063204.4A Active CN109242897B (en) 2018-09-12 2018-09-12 Binary pattern defocused projection method of structured light measurement system

Country Status (1)

Country Link
CN (1) CN109242897B (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111750803B (en) * 2019-03-26 2021-07-30 天津理工大学 Fringe projection measuring method based on dynamic focusing principle
CN110108230B (en) * 2019-05-06 2021-04-16 南京理工大学 Binary grating projection defocus degree evaluation method based on image difference and LM iteration
CN110223337B (en) * 2019-06-11 2021-08-27 张羽 Descrambling method for multipath interference of structured light imaging
CN110375673B (en) * 2019-07-01 2021-04-16 武汉斌果科技有限公司 Large-depth-of-field binary out-of-focus three-dimensional measurement method based on multi-focus projection system
CN110986828B (en) * 2019-12-13 2023-09-01 杨鑫鑫 Novel acquisition and display method for three-dimensional color data of real scene
CN114279356B (en) * 2021-12-09 2023-07-25 南京信息工程大学 Gray scale fringe pattern design method for three-dimensional measurement
CN114234851B (en) * 2021-12-20 2022-06-17 广东工业大学 Three-dimensional measurement method for modulating binary code at periodic edge
CN114234849B (en) * 2021-12-20 2022-07-15 广东工业大学 Three-dimensional measurement method for modulating Gray code information at periodic edge
CN114399445A (en) * 2022-01-18 2022-04-26 东南大学 Global illumination resistant self-alignment exclusive or code method
CN114526692B (en) * 2022-04-24 2022-08-09 广东工业大学 Structured light three-dimensional measurement method and device based on defocusing unwrapping
CN116839509A (en) * 2023-09-01 2023-10-03 南京信息工程大学 Three-dimensional measurement method combining binary coding with error diffusion algorithm

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103557808A (en) * 2013-11-19 2014-02-05 东南大学 Defocusing projection grating measurement method based on Sierra Lite dithering algorithm
JP2014052210A (en) * 2012-09-05 2014-03-20 Canon Inc Three-dimensional shape measurement device, three-dimensional shape measurement method, program, and recording medium
CN104457614A (en) * 2014-11-11 2015-03-25 南昌航空大学 Stripe reflection three-dimensional measurement method based on binary stripe defocusing
CN105806259A (en) * 2016-04-29 2016-07-27 东南大学 Three-dimensional measuring method based on binary grating out-of-focus projection

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3516328B1 (en) * 2016-09-21 2023-05-03 Philip M. Johnson Non-contact coordinate measuring machine using hybrid cyclic binary code structured light

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014052210A (en) * 2012-09-05 2014-03-20 Canon Inc Three-dimensional shape measurement device, three-dimensional shape measurement method, program, and recording medium
CN103557808A (en) * 2013-11-19 2014-02-05 东南大学 Defocusing projection grating measurement method based on Sierra Lite dithering algorithm
CN104457614A (en) * 2014-11-11 2015-03-25 南昌航空大学 Stripe reflection three-dimensional measurement method based on binary stripe defocusing
CN105806259A (en) * 2016-04-29 2016-07-27 东南大学 Three-dimensional measuring method based on binary grating out-of-focus projection

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Three-dimensional shape measurement technique for shiny surfaces by adaptive pixel-wise projection intensity adjustment;Gao Jian等;《OPTICS AND LASERS IN ENGINEERING》;20170430;第206-215页 *
基于二值光栅离焦投影的三维测量方法研究;赵立伟;《中国优秀硕士学位论文全文数据库2018年信息科技辑》;20180415(第4期);第1-67页 *

Also Published As

Publication number Publication date
CN109242897A (en) 2019-01-18

Similar Documents

Publication Publication Date Title
CN109242897B (en) Binary pattern defocused projection method of structured light measurement system
He et al. Quaternary gray-code phase unwrapping for binary fringe projection profilometry
CN109341589B (en) Grating image projection method, three-dimensional reconstruction method and three-dimensional reconstruction system
CN105806259B (en) A kind of method for three-dimensional measurement based on the projection of two-value grating defocus
CN109540039B (en) A kind of three dimension profile measurement method based on the complementary Gray code of circulation
CN108195313B (en) High dynamic range three-dimensional measurement method based on light intensity response function
CN107036556A (en) Structural light three-dimensional measurement method based on segment quantization phase code
CN107798698B (en) Structured light stripe center extraction method based on gray correction and adaptive threshold
JP6598673B2 (en) Data processing apparatus and method
CN110230997B (en) Shadow region phase noise correction method based on improved monotony method
CN109903377B (en) Three-dimensional face modeling method and system without phase unwrapping
CN111307066B (en) Phase unwrapping method for interval processing
JP2007192608A (en) Method and device for measuring three-dimensional shape
CN113607085B (en) Binary defocus three-dimensional measurement method and device based on half-broken sine stripes
CN114170345A (en) Fringe pattern design method for structured light projection nonlinear correction
CN114941999A (en) Binary coding stripe design method for structured light projection
Porras-Aguilar et al. Optimum projection pattern generation for grey-level coded structured light illumination systems
Xiao et al. High-quality binary fringe generation via joint optimization on intensity and phase
CN111951377A (en) Three-dimensional object reconstruction method and terminal equipment
An et al. The absolute phase retrieval based on the rotation of phase-shifting sequence
CN110108230A (en) Two-value optical grating projection defocus degree assessment method based on image difference Yu LM iteration
CN116774428A (en) Structured light coding method based on asymmetric error diffusion kernel function
CN111141230A (en) Three-dimensional depth data acquisition method based on frequency optimization dithering algorithm
Cheng et al. 3D object scanning system by coded structured light
CN114440794B (en) High-precision three-dimensional measurement method for high-dynamic surface

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