Background
The structured light three-dimensional imaging technology is an active non-contact optical three-dimensional imaging technology, and the phase measurement profilometry (Phase Measuring Profilometry, PMP) is one of the commonly used structured light three-dimensional imaging technologies, and is widely applied to various industries due to the advantages of imaging precision, speed, cost and the like.
The PMP three-dimensional reconstruction system mainly comprises a camera, a projector and a computer, wherein the projector projects a preset sinusoidal deformation stripe pattern onto the surface of a measured object, the camera is responsible for capturing the deformation stripe back, and finally the computer generates a three-dimensional point cloud through a solution phase to reconstruct the surface profile of the measured object. If the light intensity value of the collected deformed stripe light intensity exceeds the quantization range of the camera, the light intensity is saturated, saturation errors are generated, and the point where the saturation errors are generated is called a saturation point. Therefore, the saturation point is accurately detected, and the occurrence of light intensity saturation is avoided, so that the three-dimensional reconstruction precision of the highly reflective object can be effectively improved. In the self-adaptive stripe method, a uniform gray pattern is projected onto a measured high-reflection object, a pattern captured by a camera is used as a reference pattern for detecting a saturation point, and when the illumination intensity of the reference pattern reaches a set saturation threshold value, the reference pattern is judged to be the saturation point. The conventional saturation point detection method ignores the influence of the light-dark change area in the stripe pattern on the saturation point in the actual situation, which is called multipath effect, i.e. the light intensity information of each pixel point can be included in the fieldMN-1Light intensity information of individual pixels. Therefore, when three-dimensional reconstruction is performed on a mirror-like object with high surface reflectivity, saturation errors are caused by light intensity saturation, and the reconstruction accuracy is low.
Therefore, the present invention proposes an adaptive stripe method for detecting saturation points by using high frequency signals, so as to at least solve the above-mentioned part of technical problems.
Disclosure of Invention
The invention aims to solve the technical problems that: an adaptive stripe method for detecting saturation points by using high-frequency signals is provided to solve at least some of the above technical problems.
In order to achieve the above purpose, the technical scheme adopted by the invention is as follows:
an adaptive striping method for detecting saturation points using high frequency signals, comprising:
step 1, projector generates and projectsKA set of deformed high frequency fringe patterns, each set of deformed high frequency fringe patterns comprisingNA plurality of deformed high frequency fringes;
step 2, projection-basedKGroup deformation high-frequency fringe pattern, and camera acquisition to obtain corresponding imageKA set of acquisition high frequency fringe patterns, each set of acquisition high frequency fringe patterns comprisingNCollecting high frequency stripes, combining each groupNIntegrating the acquired high-frequency stripes into a fused high-frequency stripe, and combining each groupNThe deformation high-frequency stripes are integrated into one deformation high-frequency stripe;
step 3, detecting saturation points of the fusion high-frequency stripes to obtain saturation points;
step 4, calculating the environment light intensity and the reflectivity of the surface of the measured object based on the saturation point;
step 5, obtaining an optimal projection light intensity value of the projector pixel point according to the environment light intensity and the reflectivity of the surface of the measured object;
step 6, determining a coordinate mapping relation between the camera and the projector;
and 7, replacing the projection light intensity of the saturated point with the optimal projection light intensity according to the coordinate mapping relation between the camera and the projector, and generating the self-adaptive projection stripes by the projector.
Further, in the step 1, a coding method is adopted to generate K groups of deformed high-frequency fringe patterns, and the coding method of the light intensity value of each deformed high-frequency fringe pattern is as follows:wherein: />For projecting the height of the picture +.>For the projector ordinate, T is the maximum quantization value of the camera, < >>Group number for deforming high-frequency stripe group, < >>,nFor the phase shift index,Nfor the total number of phase shifts,n=0,1,2,3,...,N-1,/>is the light intensity difference between two adjacent groups of deformed high-frequency fringe patterns, +.>Is the highest frequency of the deformed high frequency streak.
Further, in the step 2, each group is fused by using an image fusion methodNLight intensity values of the high-frequency stripes are acquiredLight intensity value integrated as a fused high-frequency stripe +.>The image fusion method comprises the following steps: />Wherein:representing the collection +.>Is a maximum value of (a).
Further, in the step 2, the light intensity values of each set of N deformed high-frequency fringes are calculatedLight intensity value integrated as a deformed high-frequency stripe +.>,/>。
Further, in the step 3, the light intensity value of the high-frequency stripe is fusedDetecting a line saturation point to obtain a saturation point, wherein the method for detecting the saturation point comprises the following steps: />Wherein: />Equal to 1 indicates saturation, ">An equal to 0 represents unsaturation, and T is the maximum quantization value of the camera.
Further, in the step 4, a simultaneous equation set is constructed by using the saturation point, and the environmental light intensity is calculatedAnd the reflectivity of the surface of the object to be measured>The simultaneous equations are: />Wherein: />Needs to meet->Andare all 0->1.
Further, in said step 5, an optimal projection light intensity valueThe calculation method of (1) is as follows:wherein: 249 is the set light intensity saturation threshold.
Further, in the step 6, a coordinate mapping relationship between the camera and the projector is established by projecting a bi-directional phase shift stripe with low light intensity onto the surface of the measured object, where the coordinate mapping relationship between the camera and the projector is:wherein: />For projector abscissa, +.>For the projector ordinate, +.>For the absolute phase in the vertical direction of the camera, +.>For the absolute phase of the camera in the horizontal direction, +.>For camera abscissa, +.>For the ordinate of the camera, +.>For projecting the height of the picture +.>Is the width of the projected picture.
Compared with the prior art, the invention has the following beneficial effects:
the invention adopts a projection high-frequency stripe pattern instead of a uniform gray pattern as a detection saturation point, solves the reflectivity of the surface of a detected object and the ambient light based on the detection saturation point simultaneously, calculates an optimal projection light intensity value, and then changes the projection light intensity value pixel by combining the coordinate mapping relation of a camera and a projector to generate a group of self-adaptive projection stripes. The self-adaptive stripe generated by the invention is utilized to perform the phase resolution and the three-dimensional reconstruction of the object, thereby improving the three-dimensional reconstruction precision and having higher signal to noise ratio.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings, in order to make the objects, technical solutions and advantages of the present invention more apparent. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the self-adaptive stripe method, a uniform gray pattern is projected onto a measured high-reflection object, a pattern captured by a camera is used as a reference pattern for detecting a saturation point, and when the illumination intensity of the reference pattern reaches a set saturation threshold, the reference pattern is judged to be the saturation point. The saturation point detection method ignores the influence of the light and shade change area in the stripe pattern on the saturation point under the actual condition, which is called multipath effect, i.e. the light intensity information of each pixel point can be contained in the fieldMN-1The smaller the gray value of other pixels in the field, the smaller the light intensity information of each pixel, and the light intensity value of the captured pattern by the camera. Because of the existence of black stripes in the sinusoidal fringe pattern of the gray scale pattern, the multipath effect in the sinusoidal fringe pattern has a relatively obvious influence on the light intensity value of the camera capturing pattern, and under the influence of the multipath effect, some saturated points detected by the uniform gray scale pattern are not saturated points in the actual sinusoidal fringe pattern.
In view of the above problems, the present invention provides an adaptive fringe method for detecting saturation points using a high frequency signal, as shown in fig. 1. The invention adopts the coding methodGenerating K groups of deformation high-frequency fringe patterns, wherein the coding method of the light intensity value of each deformation high-frequency fringe is as follows:wherein->For the height of the projected picture,for the projector ordinate, T is the maximum quantization value of the camera, < >>To distort the group number of the high frequency stripe group,,nfor the phase shift index,Nfor the total number of phase shifts,n=0,1,2,3,...,N-1,/>is the light intensity difference between two adjacent groups of deformed high-frequency fringe patterns, +.>Generally taking a fixed constant, +.>For deforming the highest frequency of the high frequency stripe, < >>Also a fixed constant.
Then adopting an image fusion method to integrate each groupNLight intensity values of the high-frequency stripes are acquiredLight intensity value integrated as a fused high-frequency stripe +.>The image fusion method comprises the following steps: />Wherein: />Representing a collectionIs a maximum value of (a).
At the same time, the light intensity values of each group of N deformation high-frequency stripesLight intensity value integrated into a deformed high-frequency stripe,/>。
And then the light intensity value of the high-frequency stripes is fusedDetecting a line saturation point to obtain a saturation point, wherein the method for detecting the saturation point comprises the following steps:wherein: />Equal to 1 indicates saturation, ">An equal to 0 represents unsaturation, and T is the maximum quantization value of the camera. The light intensity value of the high-frequency stripes is fused +.>Equal to or exceeding the maximum quantization value of the cameraTIs taken as the saturation point.
The light intensity captured by the camera mainly comprises three parts of projected light intensity, light intensity of environment light intensity reflected by the surface of the measured object and environment light intensity directly entering the camera, wherein the light intensity of environment light intensity reflected by the surface of the measured object comprises the light of projected light intensity reflected by the surface of the measured object and the environment light intensityLight reflected back through the surface of the object under test. In the conventional algorithm, the reflectivity of the surface of the measured object, the ambient light intensity and the light reflected by the surface of the measured object are calculated by projecting a Quan Bai chart and a full black chart. According to the invention, the reference pattern for detecting the saturation point is utilized to establish an equation set to respectively solve the reflectivity of the surface of the measured object and the ambient light intensity, and then the ambient light intensity and the light reflected by the surface of the measured object are solved, so that the data can be ensured to be less disturbed by noise by utilizing the higher light intensity pattern for solving, and the result can be more accurate. The system of equations that are associated with the reference pattern of saturation points is:wherein: />Needs to meet->And->Are all 0->1.
Further, the above formula is rewritten as:for this purpose, the ambient light intensity can be solved>And the reflectivity of the surface of the object to be measured>Then obtaining the ambient light intensity and the light reflected by the surface of the measured object。
Theoretically, the projected light intensity when the light intensity captured by the camera does not exceed 255 is the optimum projected light intensity,however, in practice, the saturation threshold is generally properly taken, and the present invention sets 249 a light intensity saturation threshold, so based on the obtained ambient light intensity and the light reflected by the surface of the measured object, the optimal projection light intensity can be expressed as:. In calculating the optimum projection light intensity value +.>Then, the coordinates of the camera and the projector need to be matched to change the projection light intensity pixel by pixel so as to generate the self-adaptive projection stripes. The invention establishes the coordinate mapping relation between the camera and the projector by projecting the low-light-intensity bidirectional phase shift stripes on the surface of the measured object, and the coordinate mapping relation between the camera and the projector is as follows: />Wherein: />For projector abscissa, +.>For the projector ordinate, +.>For the absolute phase in the vertical direction of the camera, +.>For the absolute phase of the camera in the horizontal direction, +.>For camera abscissa, +.>For the ordinate of the camera, +.>For projecting the height of the picture +.>Is the width of the projected picture.
Then, according to the coordinate mapping relation between the camera and the projector, the projected light intensity of the saturated point is replaced by the optimal projected light intensity, and the projector generates self-adaptive projection stripes; and finally, carrying out three-dimensional reconstruction of the object by utilizing the generated self-adaptive stripes.
A three-dimensional reconstruction experiment is performed on a stainless steel plate with a large surface flatness and reflectivity range by using a Prosilicon GC650C camera with a resolution of 640 pixels by 480 pixels, a Casio XJ-A155V projector with a resolution of 800 pixels by 600 pixels and a computer for controlling experimental equipment and data processing.
Firstly, the exposure time of a camera is adjusted to 4791 microseconds by using software on a computer, the highest light intensity of projection is 255, the frequencies are 1, 4, 16 and 32, each frequency is 160-step phase shift, and the total of 800 sine fringe patterns acquire the real phase of a stainless steel plate for subsequent error analysis so as to more obviously distinguish the reconstruction effects of different methods. After the true phase is acquired, the camera exposure time is again adjusted to 8000 microseconds with software, at which time subsequent experiments are performed.
Then using the coding method:in the formula->Set to 32->Is set to be 5 and is set to be a constant value,Tinitially set to 255 and then generate maximum intensityT48 sets of deformed high-frequency fringe patterns sequentially decreasing from 255 to 20; the camera acquires 48 groups of corresponding acquired high-frequency fringe patterns, performs image fusion and then performs saturation point detection; calculating the environment light intensity, the stainless steel plate surface reflectivity and the optimal projection light intensity value of the projector pixel point based on the detected saturation point; according to the objects with different reflectivity, the empirical values of different low gray values can be taken, generally, 100 is taken as the highest light intensity of projectionThen projecting a sinusoidal fringe pattern with the highest light intensity of 100 in the two directions to solve the absolute phase +.>Absolute phase in the vertical direction of the camera>The method comprises the steps of carrying out a first treatment on the surface of the And finally, determining a coordinate mapping relation between the camera and the projector, and finally, combining the calculated optimal projection light intensity to generate a group of self-adaptive sine stripes with the highest light intensity of 255 and the frequencies of 1, 4, 16 and 32, wherein the total number of the self-adaptive sine stripes is 32 for three-dimensional reconstruction of the stainless steel plate, and each frequency is 8-step phase shift.
Meanwhile, a traditional PMP method is adopted to carry out three-dimensional reconstruction experiments on the same stainless steel plate, and the three-dimensional reconstruction experiments are used as comparison. Table 1 compares the Root Mean Square Error (RMSE) and the maximum error (MaxE) of the reconstructed images obtained by the method of the present invention and the PMP method and the number of sets of desired projection images, with the assumption that 48 saturation detected images are recorded as one set.
TABLE 1
Compared with the traditional PMP method, the method has the highest precision, and the root mean square error in the 295 th column, the root mean square error in the saturated region and the maximum error in the saturated region are respectively reduced by 97.88%, 95.71% and 98.49%.
In order to verify the application range of the method, three-dimensional reconstruction is carried out on the insulator workpiece with a more complex shape, meanwhile, the reconstruction result of the PMP method has larger reconstruction error and cannot reconstruct the three-dimensional shape of the insulator workpiece by adopting the PMP method for comparison, and the method can reconstruct the three-dimensional shape, and the reconstruction result has higher signal to noise ratio and smoother signal to noise ratio.
Finally, it should be noted that: the above embodiments are merely preferred embodiments of the present invention for illustrating the technical solution of the present invention, but not limiting the scope of the present invention; although the 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 scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions; that is, even though the main design concept and spirit of the present invention is modified or finished in an insubstantial manner, the technical problem solved by the present invention is still consistent with the present invention, and all the technical problems are included in the protection scope of the present invention; in addition, the technical scheme of the invention is directly or indirectly applied to other related technical fields, and the technical scheme is included in the scope of the invention.