CN110081817B - Method and device for eliminating background light, computer equipment and storage medium - Google Patents
Method and device for eliminating background light, computer equipment and storage medium Download PDFInfo
- Publication number
- CN110081817B CN110081817B CN201910335841.0A CN201910335841A CN110081817B CN 110081817 B CN110081817 B CN 110081817B CN 201910335841 A CN201910335841 A CN 201910335841A CN 110081817 B CN110081817 B CN 110081817B
- Authority
- CN
- China
- Prior art keywords
- background light
- phase
- deformed
- calculating
- light component
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 60
- 230000010363 phase shift Effects 0.000 claims abstract description 48
- 238000004590 computer program Methods 0.000 claims description 14
- 238000004364 calculation method Methods 0.000 claims description 11
- 238000013507 mapping Methods 0.000 claims description 5
- 238000012545 processing Methods 0.000 abstract description 9
- 238000005259 measurement Methods 0.000 description 17
- 238000005286 illumination Methods 0.000 description 15
- 238000010586 diagram Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000012937 correction Methods 0.000 description 2
- 238000002474 experimental method Methods 0.000 description 2
- 210000001061 forehead Anatomy 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000000649 phase profilometry Methods 0.000 description 2
- 238000001314 profilometry Methods 0.000 description 2
- 238000001228 spectrum Methods 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000000691 measurement method Methods 0.000 description 1
- 238000003908 quality control method Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
- 238000012876 topography Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/02—Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/24—Measuring arrangements characterised by the use of optical techniques for measuring contours or curvatures
- G01B11/25—Measuring 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/2545—Measuring 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/77—Retouching; Inpainting; Scratch removal
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The invention relates to a method, a device, computer equipment and a computer readable storage medium for eliminating background light, which project a plurality of sets of phase shift sine stripes by a projector under the background light and acquire a plurality of deformation stripe images; calculating the fringe sum of each set of phase shift sine fringes according to the deformed fringe pattern; and then calculating the background light component of each deformed fringe image according to the fringe sum, and processing the plurality of deformed fringe images according to the background light component to eliminate the background light component in the plurality of deformed fringe images, so that the background light in the deformed fringe images can be quickly and accurately removed.
Description
Technical Field
The present invention relates to the field of optical three-dimensional measurement, and in particular, to a method, an apparatus, a computer device, and a computer-readable storage medium for eliminating background light.
Background
The optical three-dimensional sensing technology based on structured light illumination is widely applied to the fields of industrial detection, product quality control, machine vision, instant positioning and map construction (SLAM), film and television special effects, biomedicine and the like. Phase Measurement Profilometry (PMP) is an important optical three-dimensional sensing technology due to its high measurement accuracy and high density of acquired data. In phase profilometry, the background light is required to be constant in one measurement, otherwise, a wavy error with the same frequency as the fringe exists in the measured phase, and the error also exists in the finally obtained three-dimensional data. In indoor three-dimensional measurement, power frequency illumination environment light is common changing background light.
Conventionally, there are three methods for removing the background light, the first method is to use a projection light source with a special spectrum (such as ultraviolet light or infrared light) which does not exist in the spectrum of the ambient light, and add a light filtering device in front of the camera lens to filter the ambient light. The method has certain difficulty in realization and certain limitation on use occasions. For example, ultraviolet light sources are not suitable for three-dimensional measurement of human bodies or other organisms; and the ambient light has more short-wave infrared components, and the general image sensor has low sensitivity to long-wave infrared rays. The second method is to remove the ambient background light by performing an average value correction and a contrast correction on the acquired deformed fringe image. However, this method requires operations such as mean square error calculation and fourier transform of the image, and the algorithm is complicated. Meanwhile, the method assumes that the average value of each image acquired in the measurement process is approximately equal, and the assumed and actual deviation is large in some cases. The third method is to set the projection and acquisition image time to be an integer multiple of the period of the ambient light or the exposure time to be much longer than its period, but this method is not conducive to rapid measurement.
Disclosure of Invention
The embodiment of the application provides a method, a device, computer equipment and a computer readable storage medium for eliminating background light, which can quickly and accurately remove the background light in a deformed fringe pattern.
A method of eliminating background light, the method comprising:
projecting a plurality of sets of phase shift sine stripes by a projector under background light, and acquiring a plurality of deformation stripe images;
calculating the fringe sum of each set of phase shift sine fringes according to the deformed fringe pattern;
calculating the background light component of each deformed fringe image according to the fringe sum;
and processing the plurality of deformed fringe images according to the background light component so as to eliminate the background light component in the plurality of deformed fringe images.
In one embodiment, at least three sets of phase-shifted sinusoidal fringes are projected under background light.
In an embodiment, the background light includes an ambient background light, and the ambient background light is a power frequency illumination ambient light.
In one embodiment, said calculating a sum of fringes for each set of said phase shifted sinusoidal fringes from said deformed fringe pattern comprises:
establishing a background light intensity expression of each set of phase shift sine stripes in each deformation stripe graph according to the background light intensity of the projector, the direct current component of the ambient background light, the exposure time and the background light component parameters;
and calculating the sum of the stripes of each set of phase-shift sine stripes according to the background light intensity expression.
In one embodiment, said calculating a sum of fringes for each set of said phase shifted sinusoidal fringes comprises:
the fringe sums of at least three sets of phase-shifted sinusoidal fringes are calculated.
In an embodiment, the calculating the background light component of each deformed fringe pattern according to the fringe sums includes:
calculating to obtain a background light component parameter by utilizing a least square method according to the sum of the stripes of at least three sets of phase-shift sine stripes;
and substituting the background light component parameters into a background light intensity expression, and calculating to obtain the background light component of each deformed fringe pattern.
In an embodiment, the method further comprises:
acquiring image coordinates of each pixel point in a deformed fringe pattern for eliminating background light components;
calculating the phase of the deformed stripe of each pixel point according to the deformed stripe graph for eliminating the background light component;
searching a phase height mapping relation according to the deformed fringe phase of each pixel point to obtain the height coordinate of each pixel point;
and generating a three-dimensional image according to the image coordinates of each pixel point in the deformed fringe pattern and the height coordinates of each pixel point in the deformed fringe pattern.
An apparatus for removing background light, the apparatus comprising:
the acquisition module is used for projecting a plurality of sets of phase shift sine stripes through a projector under background light and acquiring a plurality of deformation stripe images;
the first calculation module is used for calculating the fringe sum of each set of phase-shift sine fringes according to the deformation fringe pattern;
the second calculation module is used for calculating the background light component of each deformed fringe image according to the fringe sum;
and the background light elimination module is used for processing the plurality of deformed fringe images according to the background light component so as to eliminate the background light component in the plurality of deformed fringe images.
The present application further provides a computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of the method when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method.
According to the method for eliminating the background light, a plurality of sets of phase shift sine stripes are projected by a projector under the background light, and a plurality of deformation stripe images are obtained; calculating the fringe sum of each set of phase shift sine fringes according to the deformed fringe pattern; then, according to the fringe sums, calculating the background light component of each deformed fringe image, and processing the plurality of deformed fringe images according to the background light components to eliminate the background light components in the plurality of deformed fringe images, so that the background light in the deformed fringe images can be removed quickly and accurately.
Drawings
In order to more clearly illustrate the embodiments of the present application 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, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow diagram of a method of removing background light provided in one embodiment;
FIG. 2 is a diagram of a deformed strip provided in one embodiment;
FIG. 3a is a deformed fringe pattern obtained by using same-frequency phase-shift sine fringes in the deformed fringe pattern of FIG. 1;
FIG. 3b is a deformed fringe pattern obtained by eliminating background light with the same-frequency phase-shift sine fringe in the deformed fringe pattern of FIG. 1;
FIG. 4 is a phase contrast diagram of 1 line of deformed stripes on the forehead of a plastic image before and after background light is eliminated, according to an embodiment;
FIG. 5a is a deformed fringe pattern of the deformed fringe pattern of FIG. 1 obtained by a multi-frequency heterodyne method using sinusoidal fringes with different frequency phase shifts;
FIG. 5b is a deformed fringe pattern obtained by removing background light from the deformed fringe pattern of FIG. 1 and then using a multi-frequency heterodyne method with different-frequency phase-shift sine fringes;
FIG. 6 is a schematic diagram of an apparatus for removing background light according to an embodiment;
fig. 7 is a schematic diagram of an internal structure of an electronic device in one embodiment.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, embodiments accompanying the present application are described in detail below with reference to the accompanying drawings. In the following description, numerous specific details are set forth to provide a thorough understanding of the present application, and in the accompanying drawings, preferred embodiments of the present application are set forth. This application may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete. This application is capable of embodiments in many different forms than those described herein and those skilled in the art will be able to make similar modifications without departing from the spirit of the application and it is therefore not intended to be limited to the specific embodiments disclosed below.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise. In the description of the present application, "a number" means at least one, such as one, two, etc., unless specifically limited otherwise.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Fig. 1 is a flowchart of a method for removing background light according to an embodiment, as shown in fig. 1, the method for removing background light includes steps 110 to 140, wherein,
and step 110, projecting a plurality of sets of phase shift sine stripes by a projector under the background light, and acquiring a plurality of deformation stripe images.
Phase profilometry is an important three-dimensional sensing technology, and can acquire the three-dimensional appearance of a measured object by projecting the measured object by a projector. The basic idea of the structured light three-dimensional measurement method is to obtain three-dimensional information of a measured object by using the geometric relation of structured light projection. The projector projects the stripe template with set rule onto the surface of the measured object, and the stripe template is deformed to produce deformed stripe pattern owing to the different depths of the points in the measured object.
In the embodiment of the application, the phase measurement profilometry can adopt a full-period equi-spaced N-step phase shift method, when the full-period equi-spaced N-step phase shift method is adopted, N stripes need to be projected when measuring the phase once, and N deformed stripes are shot back at the same time, namely, one set of stripe images need to be projected and shot at the same time when measuring once. The background light comprises projector background light and environment background light, the environment background light can be power frequency illumination environment light, and the power frequency of the power frequency illumination environment light is 50Hz or 60 Hz.
In this embodiment, a plurality of sets of phase-shifted sinusoidal fringes are projected within 1 or a plurality of periods of the power frequency illumination ambient light, so that multiple phase measurements are performed within 1 or a plurality of periods of the power frequency illumination ambient light, that is, each set of phase-shifted sinusoidal fringes corresponds to one phase measurement. The power frequency illumination ambient light that changes has reduced the precision of phase place measurement, and the purpose of this application is to eliminate the power frequency illumination ambient light of each deformation fringe pattern, improves measurement accuracy. Because each stripe power frequency illumination environment light can not be calculated through one set of stripes, a plurality of sets of phase shift sine stripes need to be projected within 1 or a plurality of periods of the power frequency illumination environment light, for example, at least three sets of phase shift sine stripes can be projected under the power frequency illumination environment light. A plurality of sinusoidal fringe patterns with the same period and the same amplitude but with a phase difference between two adjacent fringe patterns are called phase-shifted sinusoidal fringes. The phase-shifted sinusoidal stripes can be generated by a computer and projected to a measured object through a projector, and a plurality of deformed stripe images are obtained through shooting of a camera. Multiple sets of phase-shift sine stripes can be projected within 1 or a plurality of periods of power frequency illumination environment light, and the frequency between each set of phase-shift sine stripes can be the same or different. A plurality of sets of phase shift sine stripes projected under the environment background light can ensure that a plurality of sampling points are arranged in 1 period of the power frequency illumination environment light, and the measurement precision can be improved.
And step 120, calculating the fringe sum of each set of phase shift sine fringes according to the deformation fringe pattern.
The deformed fringe pattern can be expressed as:
wherein, ai(x, y) is the background light intensity, b (x, y) is the fringe amplitude of the deformed fringe pattern,fringe phase, which is a deformed fringe pattern, related to the topography of the object, δi2 pi i/N, i 1,2, N is the phase shift of the deformed fringe pattern. It will be appreciated that the background light intensity includes projector background light intensity and ambient background light intensity. And calculating the fringe sum of each set of phase-shift sine fringes according to the deformed fringe image, namely calculating the fringe sum of each set of phase-shift sine fringes in a plurality of deformed fringe images under the background light. The specific calculation process comprises the following steps:
establishing a background light intensity expression of each set of phase shift sine stripes in each deformation stripe graph according to the background light intensity of the projector, the direct current component of the ambient background light, the exposure time and the background light component parameters; and calculating the sum of the stripes of each set of phase-shift sine stripes according to the background light intensity expression.
The phase of the deformed fringe pattern is obtained by the following formula:
under the background light, the background light component of the j (j ═ 1, 2.. times, M) th set of phase-shifted sinusoidal stripes in the i (j ═ 1, 2.. times, N) th amplitude deformed stripe, namely the background light intensity expression can be expressed as follows:
wherein, in the formula Ip(x, y) is projector background light intensity, which is constant; i isba(x, y) is the ambient background light DC component, which is a constant; i isbb(x, y) is the fluctuation amplitude of the ambient background light; t isjiΔ T is the exposure start time, and is a constant; f is the ambient background light frequency.
the background light intensity expression can be expressed as follows:
and calculating the fringe sum of each set of phase-shift sine fringes according to a background light intensity expression. Taking the example of calculating the sum of the stripes of the jth set of phase-shifted sinusoidal stripes as an example, the sum of the stripes of the jth set of phase-shifted sinusoidal stripes and the background light intensity of the jth set of phase-shifted sinusoidal stripes in the N deformed stripes can be calculated by the following expression:
And calculating the fringe sum of at least three sets of phase-shift sine fringes by adopting the calculation method.
And step 130, calculating the ambient background light component of each deformed fringe image according to the fringe sums.
Calculating to obtain a background light component parameter by utilizing a least square method according to the sum of the stripes of at least three sets of phase-shift sine stripes; after obtaining the fringe sum of at least three sets of phase shift sine fringes, calculating the background light component parameters by using a least square method, which is specifically as follows:
setting x to NIc(x,y),y=I″bb(x,y)cos2πfT11,z=-I″bb(x,y)sin2πfT11To form a vector X ═ X y z]T;
Setting matrix
According to X ═ A-1B calculates X so that the solved quantities X, y, z can be:
2πfT11=-arctg(z/y) (11)
and substituting the background light component parameters into a background light intensity expression, and calculating to obtain the background light component of each deformed fringe pattern.
Unknown variable I 'in background light intensity expression'bb(x, y) may be expressed as:
the expression (12) and2πfT11substituting-arctg (z/y) into the background light intensity expression (5), and then combining the power frequency of the environmental background light and the exposure time delta T to obtain the background light component of the j (j is 1,2,.., M) set of phase-shifted sinusoidal stripes in the i (j is 1,2,.., N) set of deformation stripes, thereby obtaining the background light component a of each set of phase-shifted sinusoidal stripes in each deformation stripeji(x,y)。
And 140, processing the plurality of deformed fringe images according to the background light component so as to eliminate the background light component in the plurality of deformed fringe images.
And for each deformed fringe pattern, making a difference with the corresponding background light component of the deformed fringe pattern so as to eliminate the background light component in the deformed fringe pattern.
Each deformed stripe pattern can be specifically processed by the following formula:
therefore, the stripe of the j-th set of phase-shift sine stripe and the background light component of the ith deformed stripe can be removed, and the background light component in a plurality of deformed stripe images can be eliminated by taking i and j to different values. I'ji(x, y) is the background light component to be eliminatedThe deformed fringe pattern of (1).
In the method for eliminating the background light provided by the embodiment, a plurality of sets of phase-shifted sinusoidal stripes are projected by a projector under the background light, and a plurality of deformed stripe patterns are obtained; calculating the fringe sum of each set of phase shift sine fringes according to the deformed fringe pattern; and then, calculating the ambient background light component of each deformed fringe pattern according to the fringe sum, and processing the plurality of deformed fringe patterns according to the background light component to eliminate the background light component in the plurality of deformed fringe patterns, so that the background light in the deformed fringe patterns can be quickly and accurately removed.
In an embodiment, the method further comprises: acquiring image coordinates of each pixel point in a deformed fringe pattern for eliminating background light components; calculating the phase of the deformed stripe of each pixel point according to the deformed stripe graph for eliminating the background light component; searching a phase height mapping relation according to the deformed fringe phase of each pixel point to obtain the height coordinate of each pixel point; and generating a three-dimensional image according to the image coordinates of each pixel point in the deformed fringe pattern and the height coordinates of each pixel point in the deformed fringe pattern.
Each deformation fringe image comprises a plurality of rows or a plurality of columns of fringes, each row or each column of fringes comprises a plurality of pixel points, the image coordinates of the plurality of pixel points in each row or each column of fringes can be firstly obtained, and then the deformation fringe phase of each pixel point is calculated according to the deformation fringe image for eliminating the background light component. In addition, in the optical three-dimensional sensing technology, a certain mapping relation exists between the phase of the stripe and the height of the object, namely, the height of the object corresponding to a pixel point can be obtained according to the phase of a certain pixel point in the stripe, and then the horizontal coordinate (the height is a vertical coordinate, and the coordinate on a plane vertical to the height is a horizontal coordinate) of the object is obtained according to a camera model and the height coordinate of each pixel point in the deformed stripe image, so that a three-dimensional image can be generated. The prior art is to acquire a three-dimensional image of an object according to the phase of a deformed fringe pattern, and specifically refers to the plum tree, suzhou yu, PMP three-dimensional measurement system [ J ] capable of acquiring color textures (natural science edition), 2006(01):37-41, and the description in this embodiment is omitted.
In the embodiment of the application, 3 sets of same-frequency phase shift sine stripes with the period of 18 pixels and 3 sets of different-frequency phase shift sine stripes with the periods of 18 pixels, 21 pixels and 21.5 pixels are respectively used for carrying out experiments, and phase measurement results of background light which is eliminated and background light which is not eliminated are compared. In the experiment, a full-period equal-interval 3-step phase shift method is adopted, the same-frequency stripes are subjected to a reliability-oriented phase expansion method to obtain continuous phases, and different-frequency stripes are subjected to a multi-frequency heterodyne method to obtain continuous phases. The fringe projection-photographing cycle time was 1/200 seconds.
The experimental results are as follows (the phase in the results is the value minus the phase of the reference plane): fig. 2 is a diagram of one of the deformed stripes. FIG. 3a is a deformed fringe pattern when the same-frequency phase-shifted sine fringe does not eliminate the background light, and from the deformed fringe pattern, the wavy error with the same frequency as the fringe can be obviously seen. Fig. 3b is a deformed fringe pattern obtained after the background light removal processing. Fig. 4 is a comparison of the phase obtained before and after the treatment of the deformed stripe of line 1 on the forehead of the statue. As can be seen from fig. 3b and 4, the wavy error is eliminated after the processing of the method. Fig. 5a is a deformed fringe pattern obtained by the multi-frequency heterodyne method for the sinusoidal fringes with different frequency phase shifts, and it can be seen that a large number of fringe-level calculation errors are caused by too large phase errors, and the measurement result has no significance. Fig. 5b is a deformed fringe pattern obtained by the multi-frequency heterodyne method after being processed by the background light removal method. Therefore, the background light eliminating method provided by the application can accurately eliminate the background light in the deformed fringe pattern.
It should be understood that, although the steps in the flowchart of fig. 1 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 1 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
Fig. 6 is a schematic structural diagram of an apparatus for removing background light provided in an embodiment, and as shown in fig. 6, the apparatus for removing background light includes: an acquisition module 610, a first calculation module 620, a second calculation module 630, and a background light removal module 640, wherein,
an obtaining module 610, configured to project multiple sets of phase-shifted sinusoidal stripes through a projector under background light, and obtain multiple deformed stripe patterns;
in one embodiment, at least three sets of phase-shifted sinusoidal fringes are projected under background light.
In an embodiment, the background light includes an ambient background light, and the ambient background light is a power frequency illumination ambient light.
A first calculating module 620, configured to calculate a fringe sum of each set of phase-shifted sine fringes according to the deformed fringe pattern;
in one embodiment, the first calculating module 620 establishes a background light intensity expression of each set of phase-shifted sinusoidal stripes in each deformed stripe pattern according to the background light intensity of the projector, the direct-current component of the ambient background light, the exposure time and the background light component parameters;
and calculating the sum of the stripes of each set of phase-shift sine stripes according to the background light intensity expression.
In one embodiment, the fringe sums of at least three sets of phase-shifted sinusoidal fringes are calculated.
A second calculating module 630, configured to calculate a background light component of each deformed fringe pattern according to the fringe sums;
in an embodiment, the second calculating module 630 calculates the background light component parameter according to the sum of the fringes of at least three sets of phase-shifted sinusoidal fringes by using a least square method;
and substituting the background light component parameters into a background light intensity expression, and calculating to obtain the background light component of each deformed fringe pattern.
And the background light eliminating module 640 is configured to process the plurality of deformed fringe images according to the background light component to eliminate the background light component in the plurality of deformed fringe images.
In an embodiment, the apparatus for eliminating background light further includes a three-dimensional image generation module (not shown in the figure), configured to obtain an image coordinate of each pixel in a deformed fringe pattern for eliminating a background light component;
calculating the phase of the deformed stripe of each pixel point according to the deformed stripe graph for eliminating the background light component;
searching a phase height mapping relation according to the deformed fringe phase of each pixel point to obtain the height coordinate of each pixel point;
and generating a three-dimensional image according to the image coordinates of each pixel point in the deformed fringe pattern and the height coordinates of each pixel point in the deformed fringe pattern.
The division of each module in the above apparatus for removing background light is only used for illustration, in other embodiments, the apparatus for removing background light may be divided into different modules as required to complete all or part of the functions of the apparatus for removing background light.
For the specific definition of the device for eliminating the background light, reference may be made to the above definition of the method for eliminating the ambient background light, and details are not described here. The modules in the above background light eliminating device can be wholly or partially realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
The implementation of each module in the apparatus for eliminating background light provided in the embodiments of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. The program modules constituted by the computer program may be stored on the memory of the terminal or the server. Which when executed by a processor, performs the steps of the method described in the embodiments of the present application.
FIG. 7 is a diagram showing an internal configuration of a computer device according to an embodiment. As shown in fig. 7, the computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein, the processor is used for providing calculation and control capability and supporting the operation of the whole computer equipment. The memory is used for storing data, programs and the like, and the memory stores at least one computer program which can be executed by the processor to realize the wireless network communication method suitable for the computer device provided by the embodiment of the application. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by a processor for implementing a method for eliminating background light provided by the following embodiments. The internal memory provides a cached execution environment for the operating system computer programs in the non-volatile storage medium. The network interface may be an ethernet card or a wireless network card, etc. for communicating with an external computer device. The computer device may be a mobile terminal, a tablet computer or a personal digital assistant or a wearable device, etc.
The method for eliminating the background light mentioned above may specifically be: projecting a plurality of sets of phase shift sine stripes by a projector under background light, and acquiring a plurality of deformation stripe images; calculating the fringe sum of each set of phase shift sine fringes according to the deformed fringe pattern; calculating the background light component of each deformed fringe image according to the fringe sum; and processing the plurality of deformed fringe images according to the background light component so as to eliminate the background light component in the plurality of deformed fringe images.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of a method of eliminating backlight.
A computer program product containing instructions which, when run on a computer, cause the computer to perform a method of eliminating background light.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (7)
1. A method of removing background light, the method comprising:
projecting at least three sets of phase-shifted sinusoidal stripes by a projector under background light, and acquiring a plurality of deformed stripe patterns;
establishing a background light intensity expression according to the deformed fringe pattern, and calculating the sum of fringes of each set of phase-shifted sine fringes according to the background light intensity expression, wherein the sum of the fringes is the result of summing the light intensity values of each set of phase-shifted sine fringes in N deformed fringe patterns in the whole-period N-step phase shifting method;
wherein establishing the background light intensity expression comprises: establishing a background light intensity expression of each set of phase shift sine stripes in each deformation stripe graph according to the background light intensity of the projector, the direct current component of the ambient background light, the exposure time and the background light component parameters;
the background light intensity expression is as follows:
wherein, in the formula Ip(x, y) is a constant with respect to projector background light intensity, Iba(x, y) is the ambient background light DC component, which is constant, Ibb(x, y) is the fluctuation amplitude of the ambient background light, TjiThe exposure starting time is delta T, the exposure time is constant, and f is the frequency of the ambient background light;
obtaining a background light component parameter according to the fringe sum, and calculating the background light component of each deformed fringe image according to the background light component parameter;
calculating to obtain the background light component parameter according to the sum of at least three sets of phase shift sine stripes;
substituting the background light component parameters into the background light intensity expression, and calculating to obtain the background light component of each deformed fringe pattern;
and for each deformed fringe pattern, making a difference with the corresponding background light component so as to eliminate the background light component in the deformed fringe pattern.
2. The method of claim 1, wherein the ambient light comprises ambient light, and the ambient light is a line frequency lighting ambient light.
3. The method of claim 2, wherein calculating the background light component parameter from a sum of fringes of at least three sets of phase-shifted sinusoidal fringes comprises:
and calculating to obtain the background light component parameters by utilizing a least square method according to the sum of the stripes of at least three sets of phase-shift sine stripes.
4. The method of claim 2, further comprising:
acquiring image coordinates of each pixel point in a deformed fringe pattern for eliminating background light components;
calculating the phase of the deformed stripe of each pixel point according to the deformed stripe graph for eliminating the background light component;
searching a phase height mapping relation according to the deformed fringe phase of each pixel point to obtain the height coordinate of each pixel point;
and generating a three-dimensional image according to the image coordinates of each pixel point in the deformed fringe pattern and the height coordinates of each pixel point in the deformed fringe pattern.
5. An apparatus for removing background light, the apparatus comprising:
the acquisition module is used for projecting at least three sets of phase-shift sine stripes through a projector under background light and acquiring a plurality of deformation stripe images;
the first calculation module is used for establishing a background light intensity expression according to the deformed fringe pattern, and calculating the sum of fringes of each set of phase-shifted sine fringes according to the background light intensity expression, wherein the sum of the fringes is the result of summing the light intensity values of each set of phase-shifted sine fringes in N deformed fringe patterns in the whole-period N-step phase shifting method;
wherein establishing the background light intensity expression comprises: establishing a background light intensity expression of each set of phase shift sine stripes in each deformation stripe graph according to the background light intensity of the projector, the direct current component of the ambient background light, the exposure time and the background light component parameters;
the background light intensity expression is as follows:
wherein, in the formula Ip(x, y) is a constant with respect to projector background light intensity, Iba(x, y) is the ambient background light DC component, which is constant, Ibb(x, y) is the fluctuation amplitude of the ambient background light, TjiThe exposure starting time is delta T, the exposure time is constant, and f is the frequency of the ambient background light;
the second calculation module is used for obtaining background light component parameters according to the fringe sums and calculating the background light component of each deformed fringe image according to the background light component parameters; calculating to obtain the background light component parameter according to the sum of at least three sets of phase shift sine stripes; substituting the background light component parameters into the background light intensity expression, and calculating to obtain the background light component of each deformed fringe pattern;
and the background light eliminating module is used for subtracting the background light component corresponding to each deformed fringe image so as to eliminate the background light component in the deformed fringe image.
6. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910335841.0A CN110081817B (en) | 2019-04-24 | 2019-04-24 | Method and device for eliminating background light, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910335841.0A CN110081817B (en) | 2019-04-24 | 2019-04-24 | Method and device for eliminating background light, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110081817A CN110081817A (en) | 2019-08-02 |
CN110081817B true CN110081817B (en) | 2021-05-04 |
Family
ID=67416521
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910335841.0A Active CN110081817B (en) | 2019-04-24 | 2019-04-24 | Method and device for eliminating background light, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110081817B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US12196672B2 (en) | 2020-05-07 | 2025-01-14 | Hand Held Products, Inc. | Apparatuses, systems, and methods for sample testing |
CN111707216B (en) * | 2020-06-30 | 2021-07-02 | 西安工业大学 | A Surface Shape Detection Method Based on Random Two-step Phase Shift |
US11846574B2 (en) | 2020-10-29 | 2023-12-19 | Hand Held Products, Inc. | Apparatuses, systems, and methods for sample capture and extraction |
CN113758437B (en) * | 2021-11-05 | 2022-03-18 | 北京创米智汇物联科技有限公司 | Non-contact deformation monitoring system and method |
Family Cites Families (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100408972C (en) * | 2006-07-27 | 2008-08-06 | 西安交通大学 | Three-dimensional object contour phase measurement method based on dual-frequency color fringe projection |
CN102322822B (en) * | 2011-08-08 | 2013-04-17 | 西安交通大学 | Three-dimensional measurement method for triple-frequency color fringe projection |
KR101186103B1 (en) * | 2012-02-01 | 2012-09-27 | (주)펨트론 | Method and apparatus for measuring 3d height information of measured object |
DE102014205586A1 (en) * | 2013-03-28 | 2014-10-02 | Pmdtechnologies Gmbh | Time of flight camera system |
CN103234482B (en) * | 2013-04-07 | 2015-12-02 | 哈尔滨工程大学 | A kind of structured light measurement system scaling method based on sinusoidal grating |
CN103954238B (en) * | 2014-04-17 | 2016-07-06 | 天津工业大学 | A kind of fiber interference fringe image background light compensation method based on Gaussian function |
CN103940371A (en) * | 2014-05-12 | 2014-07-23 | 电子科技大学 | High-precision three-dimensional shape measurement method for jump object |
CN104199182B (en) * | 2014-09-26 | 2017-05-03 | 江苏大学 | Two-step diffraction phase imaging method and corresponding phase retrieval method |
CN105136060B (en) * | 2015-07-22 | 2017-12-08 | 南京师范大学 | The method for determining phase-shift phase main value in measuring three-dimensional morphology by plot of light intensity |
JP2017075781A (en) * | 2015-10-13 | 2017-04-20 | エーエルティー株式会社 | Three-dimensional measurement system |
CN107179058B (en) * | 2017-05-26 | 2019-07-30 | 山东大学 | The two step phase shift algorithms based on the optimization of structure optical contrast ratio |
CN108955571B (en) * | 2018-05-16 | 2019-07-09 | 南昌航空大学 | 3D Measurement Method Combined with Dual Frequency Heterodyne and Phase Shift Coding |
CN108981611B (en) * | 2018-07-25 | 2020-04-28 | 浙江大学 | Digital projection grating image fitting correction method based on distortion global correction |
CN109253708B (en) * | 2018-09-29 | 2020-09-11 | 南京理工大学 | A deep learning-based fringe projection temporal phase unwrapping method |
CN109341527B (en) * | 2018-10-22 | 2023-05-16 | 广东工业大学 | A three-dimensional measurement system and method for structured light projection with automatic shadow compensation |
CN109489585B (en) * | 2018-12-06 | 2020-08-18 | 广西师范大学 | Three-dimensional measurement method based on improved multi-frequency fringe structured light |
-
2019
- 2019-04-24 CN CN201910335841.0A patent/CN110081817B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN110081817A (en) | 2019-08-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110081817B (en) | Method and device for eliminating background light, computer equipment and storage medium | |
CN106931910B (en) | A kind of efficient acquiring three-dimensional images method based on multi-modal composite coding and epipolar-line constraint | |
CN111288925B (en) | Three-dimensional reconstruction method and device based on digital focusing structure illumination light field | |
CN109945802B (en) | Structured light three-dimensional measurement method | |
CN101608908A (en) | The three-dimension digital imaging method that digital speckle projection and phase measuring profilometer combine | |
CN110006365B (en) | Phase unwrapping method and device based on two-dimensional lookup table and electronic equipment | |
CN111174730B (en) | A Fast Phase Unwrapping Method Based on Phase Encoding | |
CN110174079A (en) | A kind of three-dimensional rebuilding method based on the code-shaped area-structure light of four-step phase-shifting | |
Guo et al. | High-quality defocusing phase-shifting profilometry on dynamic objects | |
CN108596008A (en) | The facial jitter compensation method measured for three-dimensional face | |
US10062171B2 (en) | 3D reconstruction from photometric stereo with shadows | |
CN111241317A (en) | A method for acquiring phase and modulation information based on multiple two-dimensional look-up tables | |
CN112767536A (en) | Three-dimensional reconstruction method, device and equipment of object and storage medium | |
Zhou et al. | Fourier transform profilometry based on convolution neural network | |
KR101555027B1 (en) | Appapatus for three-dimensional shape measurment and method the same | |
CN112729160B (en) | Projection calibration method, device and system based on telecentric imaging and storage medium | |
CN113959360B (en) | Three-dimensional surface shape vertical measurement method, device and medium based on phase shift and focal shift | |
CN117830504A (en) | Method and device for reconstructing three-dimensional model, electronic equipment and storage medium | |
CN111207697B (en) | Phase and modulation acquisition method, device and electronic device based on look-up table | |
CN109187583A (en) | A kind of body of a motor car defect Enhancement Method and device | |
CN114322843A (en) | Digital fringe projection-based three-dimensional measurement fringe principal value phase extraction method | |
CN110068287B (en) | Phase correction method, phase correction device, computer device and computer-readable storage medium | |
CN119251276A (en) | A three-dimensional measurement method for non-uniform periodic phase shift | |
Peng et al. | Using triangle-based cubic interpolation in generation of object-adaptive fringe pattern | |
Zhu et al. | Single frame color fringe projection profilometry based on empirical mode decomposition imbalance correction algorithm for fast three-dimensional reconstruction |
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 |