Background technology
The optics non-contact three-dimensional technology for information acquisition of
One's name is legion is widely used in the modern industrial and agricultural production process; Wherein structured light technique is because its active measuring principle; Sampling density is adjustable, and the measuring accuracy advantages of higher is widely used in reverse-engineering, archaeology, medical science, dress ornament, anthropological measuring etc. to be needed to recover in the field of 3D shape of objects.Structured light technique be utilize common or laser as light source, known pattern is projected the surface of measured object, according to the image that obtains from another angle through imaging device, utilize the triangle principle to obtain the three-dimensional information of sampled point.
structured light technique can be divided into single-point structured light, single line structured light, multi-line structured light and coded structured light etc. according to the difference of projection pattern.Wherein single-point and single line structured light can not cause numerous researchers' interest because it needs high-precision surface sweeping machinery and high-precision location device.Multi-line structured light is not suitable in the actual measurement owing to must confirm the problem that striped is corresponding when using yet.But coded structured light need not consider that the advantage of other geometrical constraints has become this hot research fields at present because its striped order is clear and definite.The coding structure optical tech throws coding pattern to measured object, and measuring speed has not been improved owing to do not need scanister greatly.Under through the condition of demarcating clear and definite system structure parameter in advance, confirm the measured object sampled point and itself and stripe pattern, coding pattern are mapped, be coded structured light main studying a question at present.
coded structured light can be divided into time encoding, space encoding and direct coding, each tool advantage of three according to coding method.With respect to space encoding and direct coding, time encoding has easy identification, accuracy advantages of higher and has broad application prospects.Time encoding can be divided into numerical coding and two kinds of technology of continuous programming code again, and the continuous programming code method has the continuous advantage of measurement space coding, and the advantage that antijamming capability is strong is paid attention to by more and more researchers.
continuous programming code method at present mainly are divided into sinusoidal phase-shift coding method and strength ratio compiling method.Sinusoidal phase-shift coding method has the sampling density height; In independent one-period, phase value is continuous and unique, but it is inaccurate in many all codings, to exist the periodicity judgement; Be easy to generate polysemy; And this technology relates to a large amount of tangents and arctangent computation, and calculated amount is big, these drawbacks limit this The Application of Technology scope.The strength ratio method has exactly remedied the big shortcoming of sinusoidal phase-shift method calculated amount.The ratio of pixel value under each pixel value and the continuous light under this techniques make use linear change illumination, promptly strength ratio substitutes the phase value in the sinusoidal phase method; It is fast to have speed; The advantage that calculated amount is little, but should technology inevitably exist when separating parcel the problem that sampled point is not unique.
a Chinese remainder theorem is introduced in the continuous sinusoidal coding structured light decoding; The current encoder method adopts two coding frequencies that measured object is sampled; During decoding except finding the solution congruence; Good errors table is revised also need to inquire about prior demarcation, and the sampling precision of this type technology does not significantly improve.
What
three cycle sinusoidal coding methods also were used to carry out sinusoidal phase shift separates the parcel algorithm, but calculated amount is big in the inevitable sinusoidal phase shifting method of this method, and the numerous problem of projection coding pattern.
Summary of the invention
the object of the present invention is to provide a kind of raising phase-shift coding structural light measurement scope; Reduce measuring error; Improve measuring accuracy, overcome the measured object surface reflectivity inconsistent with the three primary colours trapezoidal phase shift 3 D information obtaining method of surround lighting to three code period measuring influence.
The object of the invention is realized through following step:
(1) selects code period, make coding pattern: on three primary color space, confirm relatively prime each other code period respectively according to projection source and measurement range; Coding pattern is the initiative information that is projected the testee surface by the projection source, is by on coding pattern, and the primary colours grade of pressing X and the tactic encoded point of Y direction constitutes; The geometric position that obtains dress according to projection source and stripe pattern confirm coding staff to, be the make progress repetition of encoded point primary colours grade of coding staff on another direction; Code period is meant that the primary colours grade of encoded point accomplishes the once sum of whole encoded points of trapezoidal coding; The primary colours grade is from the encoded point of minimum primary colours grade maintenance some in one-period, and linear change keeps the encoded point of some to the highest primary colours grade then, and linear change is to minimum primary colours grade again; On primary colours grade-encoded point coordinate system, form trapezoidal variation; Antijamming capability and measuring accuracy during for the decoding that improves coded image; Adopt identical code period for a primary color space; Make three width of cloth along coding staff to the coding pattern that only moved for 1/3 cycle successively, amount to the colored phase-shift coding pattern of 3 width of cloth based on the trapezoidal coding of three primary colours;
(2) successively 3 width of cloth coloud coding phase-shift patterns are projected to the testee surface via the projection source; The coding pattern on plane receives the modulation of testee surface three dimension information; Produce distortion; Utilize the stripe pattern deriving means, obtain 3 width of cloth color fringe images that include testee and distortion coding pattern;
(3) the primary colours data in three same primary colours of same sampled point are handled, calculated sampled point relative coding point corresponding to coding pattern in this primary color space, obtain the remainder equation of sampled point in this and the color space; Carry out same treatment to same sampled point all the other width of cloth stripe patterns in all the other 2 different base colors spaces; Total obtains 3 remainder equations; Simultaneous obtains the congruence of the corresponding specific coding point of sampled point, adopts a Chinese remainder theorem to confirm the multiplying factor of congruence, and then waits until separating of this congruence; Be the corresponding specific coding point of sampled point, and then obtain the corresponding projection angle of sampled point;
(4) also need the three-dimensional information of confirming sampled point according to the geometric relationship and the triangle principle of projection source and stripe pattern deriving means behind the projection angle of the correspondence of confirming sampled point.
The present invention has following beneficial effect:
1. the inventive method keeping the phase encoding method to the continuous advantage of dividing of projected angle simultaneously, has been expanded three code period doubly to the measurement range of phase encoding through selecting the different coding cycle in three primary color space;
2. the inventive method is in identical measurement range; Can select three kinds of less primary colours grade uniform encondings of cycle; Reduced counting that the primary colours grade distributes in same amplitude range like this, under square one, compared with the coloud coding of large period; The minimizing that the primary colours grade distributes is more obvious, and possibility for error greatly reduces;
3. the inventive method need be throwed 3 width of cloth coding patterns, has reduced the quantity of projective patterns effectively, has improved the speed that three-dimensional information obtains;
4. the inventive method is throwed the coding pattern that three width of cloth moved for 1/3 cycle to same primary color space, can improve antijamming capability, has reduced the inconsistent influence of three-dimensional information being obtained the result of ambient lighting and measured object surface reflectance simultaneously;
5. the inventive method adopts encoded point as the intermediate variable of confirming projected angle, can reduce calculated amount, has further improved the speed that three-dimensional information obtains;
6. the inventive method is encoded through three primary colours space primary colours grade when decoding, has enlarged the expression scope of specific coding point, and projected angle has further been segmented;
7. the inventive method in when decoding; Do not rely on the data of the pixel around the corresponding picture point of sampled point in the stripe pattern; Only the half-tone information of dependence itself has blocked the possible of propagation of error from principle, has avoided the appearance of accumulative total mistake.
Relatively prime and the primary colours grade of the three primary colours code period that
the present invention proposes is the coding and decoding technology of trapezoidal profile, can solve the continuous partition problem of projected angle, can improve accuracy of measurement and sampling density again.
Embodiment
Below in conjunction with accompanying drawing and embodiment the present invention is further described:
the inventive method need be throwed the source in force, stripe pattern deriving means and the computing machine that is used to control and calculate.Be used for measuring the measured object surface by the three-dimensional information of sampled point.Wherein being comprised by the three-dimensional information of sampled point, being initial point with projection source projection optics system optical centre, is X-direction with initial point and stripe pattern deriving means camera optical system optical centre line direction; Optical axis direction with projection source projection optics system is in the left hand space coordinates (world coordinate system) of Z-direction; By three coordinate axis of sampled point distance apart from x, y, z; Perhaps according to (x; Y, z) and necessary space analysis geometrical calculation method, can obtain such as being got normal vector, curvature by sample point or combining the information such as bending, inclination, distortion, warpage on other the measured object surfaces that can be calculated by sampled point.
Fig. 1 is the implementing procedure block diagram that the trapezoidal phase shift three-dimensional information of three primary colours of three code period obtains technology.Need demarcate the projector, stripe pattern deriving means and distance between the two that measuring system comprises before use, those skilled in the art is understood that this step is to utilize trigonometry to carry out the steps necessary that three-dimensional information obtains.
generate the trapezoidal coding of primary colours grade by 3 code period; Each generates each code period along the coding pattern of coding staff to 1/3 cycle of moving; Amount to 3 width of cloth coloud coding patterns; Utilize the projector, throw 3 width of cloth three primary colours coloud coding coding patterns, describe though the projection of production of coding pattern here and coding pattern is an order to measured object; But those skilled in the art is understood that to be implemented in time of preceding 1 width of cloth coding pattern projection through simultaneous techniques and generates following 1 width of cloth coding pattern, uses for next projection time.
are through the stripe pattern deriving means; Collection comprises by measured object surface institute and produces the striped that is out of shape and the stripe pattern of environmental background, by analysis, control and treating apparatus stripe pattern is carried out pre-service after, confirm that sampled point is corresponding to the point of the relative coding in the coding pattern in the stripe pattern; Set up the remainder equation in same-code cycle under this primary color space; 33 interior remainder equations simultaneousnesses of primary color space obtain the congruence group, confirm multiplying factor according to a Chinese remainder theorem, obtain the specific coding point of sampled point in coding pattern; Confirm the projection angle that sampled point is corresponding, obtain the three-dimensional information of sampled point according to the triangle principle.
Fig. 2 is the sequence number that some primary color space primary colours grade codings are arranged in the coding pattern family by the computing machine generation.Computer control projection source, according to the projection order and the projection time of design, the coding pattern with the trapezoidal primary colours grade coding of three primary colours shown in Figure 2 projects the measured object surface successively.The coding formula is suc as formula shown in (1):
In the formula
I
Max
With
I
Min
The maximum primary colours grade and the minimum primary colours grade of giving encoded point when being primary colours grade coding, Δ I is the primary colours rank difference of maximum primary colours grade and minimum primary colours grade, mod (n,
T
i
) presentation code point in coding pattern with the sequence number in the delegation to the cycle
T
i
Get the surplus remainder that obtains.
Fig. 3 is the primary colours grade synoptic diagram of the trapezoidal primary colours grade coding of the three primary colours of the inventive method employing.Wherein each width of cloth coding pattern is according to the maximum projection in projection source resolving power, according to the coding staff of row to, with cycle T
i
(i=1,2,3) repeated encoding is given the line direction encoded point with concrete primary colours grade, and the primary colours grade of the encoded point of column direction repeats the primary colours grade of lastrow encoded point in the same row respectively.One skilled in the art will appreciate that coding pattern is that column direction is parallel, the color fringe coding pattern of line direction primary colours change of rank.
The coding pattern that throw to the measured object surface through the projection source when Fig. 4 is the inventive method practical application
.On the principle a code period
T i Trapezoidal primary colours grade coding pattern of employing and the maximum primary colours grade of width of cloth coding pattern in (being same primary color space)/or the minimum primary colours grade of width of cloth coding pattern; Also can be used for calculating the three-dimensional information of measured object surface sampled point; But in order to overcome of the influence of surround lighting and measured object surface sampled point surface reflectance difference to measuring; The coding pattern that adopts projection 3 width of cloth gray levels to change, robustness and anti-jamming capacity in the time of can effectively improving the calculating of sampled point gray scale.
The coding pattern that
computing machine generates is to adopt relatively prime code period three primary color space, and the coding of the same base color space is formed along coding staff 1/3 cycle that moved up successively in the different coding pattern, amounts to 3 width of cloth coloud coding patterns; Coding pattern in each primary color space is trapezoidal coding; Code period is meant that the primary colours grade of encoded point accomplishes the once sum of whole encoded points of trapezoidal coding.The primary colours grade is from the encoded point of minimum primary colours grade maintenance some in one-period, and linear change keeps the encoded point of some to the highest primary colours grade then, and linear change is to minimum primary colours grade again.On primary colours grade-encoded point coordinate system, form trapezoidal variation.The corresponding trapezoidal primary colours grade code period of three code period are that any two cycles all are relatively prime, relatively prime are meant that the highest common factor of two code period is 1 here.
The stripe pattern that
stripe pattern deriving means is obtained comprises: when measured object shines at several coding patterns, and the reflected light of body surface under a plurality of lighting conditions; Through change-over circuit, convert into and can be identified also accessible 3 width of cloth stripe patterns; Its time and mode of obtaining stripe pattern is calculated definite by computing machine according to the cycle of coding pattern and the projection time of coding pattern.
The primary colours rating calculation is carried out to 3 width of cloth stripe patterns of same primary color space in
, confirm sampled point in this primary color space in the coding pattern corresponding relative coding point r (m, n), solution formula is suc as formula shown in (2).
In the formula
I
1
,
I
2
With
I
3
Be in three width of cloth stripe patterns that obtain of same code period, the different base colors grade of same sampled point,
TBe the corresponding codes cycle.
According to code period T
i
, relative coding point r
i
(m, n), structure remainder a
i
, set up relative coding point r
i
(m, n), at code period T
i
Interior remainder equation r
i
(m, n) ≡ a
i
(mod T
i
); Wherein i representes the numbering of three code period, i=1,2,3;
Fig. 5 is with code period T
1
=3, T
2
=4, T
3
=5 is example, and the stripe pattern sampled point under the coding pattern illuminate condition in different coding cycle, is found the solution the possible relative coding point value of remainder equation in the corresponding code period.
if only a code period is carried out encoding and decoding, the sampled point corresponding codes point that exceeds so beyond the one-period is not unique.
Can find out and utilize two code period can confirm two cycle products specific coding point, but this moment is in order to acquire higher sampling precision, the following several method of necessary employing:
1. increase each code period; Unique corresponding to satisfy in the whole measuring quantity space sampled point with encoded point; But the increase of code period inevitably makes the sampled point half-tone information obtain and receives the influence that other sampled points reflect half-tone informations easily, is easy to generate error simultaneously;
2. in not changing with one-period, under the prerequisite of gray shade scale quantity, can only increase in the coding pattern, the number of same gray-coded point has reduced sampling precision like this on principle;
3. extra other constraint conditions of increase; In order to get access to the sampling precision identical with this method; Must move coding pattern with the identical line of the same gray-coded point number of projection, the coding pattern quantity well beyond this method projection has reduced whole measuring speed.
two code period have been utilized two primary color space, and the color of composition is imperfect, and there is 1/3 redundancy in the data of obtaining.
Foundation is about corresponding specific coding point x and the congruence group of 3 code period: x (m, n) the ≡ a in the projection source of sampled point under 3 primary color space coding pattern illuminate conditions
i
(mod T
i
);
Calculate sampled point corresponding to the specific coding point x on the coding pattern (m, n): the multiplying factor K that confirms the congruence group according to a Chinese remainder theorem
i
, utilize formula (3) and then wait until separating of this congruence group;
Separate according to the congruence group
, can confirm the specific coding point of sampled point correspondence in coding pattern.
Fig. 6 is with code period T
1
=3, T
2
=4, T
3
=5 is example, and the stripe pattern sampled point under the coding pattern illuminate condition in different coding cycle, is found the solution the possible relative coding point value of remainder equation in the corresponding code period.
The specific coding point x (m of sampled point correspondence in coding pattern is confirmed in
; N) after; According to the projection optical system of the camera optical system of the projection scope angle of the projection source projection optical system of demarcating in advance, stripe pattern deriving means and the actual range between the camera optical system, calculate the three-dimensional information of sampled point.
The notebook computer that
the inventive method application apparatus can produce coding pattern by the digital camera of the DLP projector, one or more capturing and coding images of a projection coding pattern, one, carry out system's control and data processing is formed; Be characterized in not containing movement parts, pattern coding conveniently, and all parts can be buied on market all.System calibrating moves in the visual field through the standard flat that control has unique point, adopts photogrammetric method to accomplish.Existing technological level can satisfy the processing request of principle prototype and caliberating device fully.