Color fringe projection three-dimensional measurement method based on improved three-step phase shift

文档序号:187635 发布日期:2021-11-02 浏览:33次 中文

阅读说明:本技术 一种基于改进三步相移的彩色条纹投影三维测量方法 (Color fringe projection three-dimensional measurement method based on improved three-step phase shift ) 是由 段晓杰 刘广丽 汪剑鸣 于 2021-08-18 设计创作,主要内容包括:本发明公开了一种基于改进三步相移的彩色条纹投影的三维测量方法,只需要采集一幅彩色条纹图像就可以实现待测物体的三维测量;其实现过程是:(1)将希尔伯特变换引入到三步相移法中,用一幅光强度与相移条纹图像直流分量相同的灰度图像代替传统三步相移法中的一幅条纹图像;(2)通过投影仪将编码后条纹投射至待测物体表面,再通过与投影仪呈一定角度设置的彩色面阵相机获取被物体调制后的变形彩色条纹图像;(3)从彩色条纹图像中分离出R、G、B三个通道图像;(4)利用改进的三步相移法从三幅灰度图像中计算出包裹相位图像;(5)通过相位解包裹算法得到连续相位分布图,最后再根据参数标定结果实现对待测物体的三维测量。(The invention discloses a three-dimensional measurement method based on color fringe projection with improved three-step phase shift, which can realize the three-dimensional measurement of an object to be measured only by acquiring a color fringe image; the realization process is as follows: (1) introducing Hilbert transform into a three-step phase shift method, and replacing a fringe image in the traditional three-step phase shift method with a gray image with the same light intensity as the direct-current component of the phase shift fringe image; (2) projecting the coded stripes to the surface of an object to be measured through a projector, and acquiring a deformed color stripe image modulated by the object through a color area array camera arranged at a certain angle with the projector; (3) separating R, G, B three channel images from the color stripe image; (4) calculating a wrapping phase image from the three gray level images by using an improved three-step phase shift method; (5) and obtaining a continuous phase distribution diagram through a phase unwrapping algorithm, and finally realizing three-dimensional measurement on the object to be measured according to a parameter calibration result.)

1. The technical scheme adopted by the invention is a color fringe projection three-dimensional measurement method based on improved three-step phase shift, which comprises the following steps:

(1) the method is improved on the basis of the traditional three-step phase shift method, Hilbert transform is introduced into the three-step phase shift method, direct-current components in a fringe image are obtained by the Hilbert transform, the light intensity distribution of the direct-current components replaces a fringe image in the traditional three-step phase shift method, and three gray level images with improved three-step phase shift are integrally coded into a color fringe image according to a color coding principle;

(2) projecting the stripe structure light coded in the step (1) to the surface of an object to be measured by a color digital projector, and then acquiring a deformed color stripe image modulated by the object to be measured by a color area array camera arranged at a certain angle with the projector;

(3) preprocessing the deformed color stripe image obtained in the step (2);

(4) separating three gray level images of red, green and blue color channels from the color stripe image preprocessed in the step (3) respectively;

(5) calculating a wrapped phase image related to the surface height of the object to be measured by using an improved three-step phase shift method for the three gray level images obtained in the step (4);

(6) unwrapping the wrapped phase image calculated in the step (5), solving a continuous phase by adopting a four-way least square phase unwrapping algorithm based on transverse shearing, and finally completing three-dimensional measurement of the object to be measured according to a phase-height calibration result;

in the step (1), introducing a Hilbert transform method in a traditional three-step phase shift method, converting the phase difference of 1 st and 2 th fringe images in the three-step phase shift method into pi/2 by using the Hilbert transform, obtaining a direct current component of the fringe images by using the Hilbert transform, replacing the 3 rd fringe image with the light intensity distribution of the direct current component, and finally encoding the three gray level images into a color fringe image according to an RGB color model and a color encoding method;

in the step (2), a hardware platform of the measuring system is constructed, wherein the hardware platform comprises a digital color projector, a color area-array camera and a computer, the lens of the projector is 1m away from the plane where the object to be measured is located, the definition of a projection image is enabled to be the highest by finely adjusting the focal length, then a color area-array camera arranged at a certain angle with the projector is used for obtaining a deformed color stripe image modulated by the object to be measured, and the effect of the acquired deformed stripe image is enabled to be the best by finely adjusting the focal length and the aperture size of the lens of the camera;

in the step (3), preprocessing a deformed color stripe image which is acquired by a camera and modulated by the height or depth information of the object to be detected, wherein filtering processing is mainly performed on the acquired image by adopting an improved color image vector median filtering method so as to reduce noise introduced in the image acquisition process and improve the image quality;

in the step (4), the filtered color stripe image is converted into three grayscale images of three separate color channels of R (Red ), G (Green, Red), and B (Blue, Red), and the grayscale image of each channel can be represented as: IB(x,y)=a(x,y);

in step (5), the object wrapping phase is obtained by using an improved three-step phase shift method

In the step (6), the value range of the arctangent function is (-pi/2, pi/2), and the pair is matchedPerforming a phase unwrapping process to obtain a substantially continuous phase of the object, i.e.Wherein W [. C]Four-way least square phase unwrapping operation based on transverse shearing, phi (x, y) is a continuous phase of an object, and finally three-dimensional measurement of the object to be measured is achieved according to a phase-height calibration result.

Technical Field

The invention relates to a three-dimensional measurement method of color stripe projection based on improved three-step phase shift, which realizes the generation and projection of color structure light stripes through a computer and a digital projector, and realizes the three-dimensional measurement of an object to be measured by collecting color stripe images through a color area-array camera and then processing the color stripe images through the computer; the invention belongs to the technical field of optical three-dimensional measurement, and can be used for three-dimensional measurement of any fixed and deformed object.

Background

In real life, common object size measurement modes comprise a graduated scale, a vernier caliper, a contourgraph and the like, the measurement modes play a great role in production and life, and although the methods are simple and efficient, the measurement precision is usually not high; with the rapid development of digital image processing technology, machine vision technology and other related technologies, people have higher and higher requirements on the accuracy, the measurement speed and the convenience degree of the measurement technology, and the measurement dimension gradually develops from two-dimensional measurement to three-dimensional measurement; because the limitations of human eye detection in objectivity, accuracy, sensitivity and other aspects are getting bigger and bigger, and the effect meeting the requirements is difficult to achieve in various application fields, people continuously try to develop machines similar to human visual ability, thereby ensuring the completion of the measurement task; three-dimensional measurement can be classified into contact type and non-contact type according to different measurement modes: the principle of a contact type measuring mode is based on three-dimensional measurement by a model method, a three-coordinate measuring machine is a typical representative of the contact type measuring mode, can replace various surface type measuring tools and complex combined system construction, the measuring precision can reach the micron level, and meanwhile, the color, the material and the texture of the surface of an object have no obvious influence on the measuring process; but the measurement speed is slow, the requirement on the environment is high, and the probe of the measuring machine is easy to be damaged or the probe scratches the measured object in the measurement process; the non-contact three-dimensional measurement method has the advantages of wide application range, higher measurement flexibility and the like, wherein the optical three-dimensional measurement technology based on the surface structure light has the characteristics of large measurement view field, high precision, high speed and the like, and is widely applied to the fields of aerospace engineering, industrial automatic detection, medical engineering and the like, the measurement principle is that structural light is projected to the surface of an object to be measured by an instrument and a corresponding digital image is acquired, the surface shape of the object to be measured is converted into cloud data in a geometric point coordinate form by an image processing algorithm, thereby completing the three-dimensional measurement; the method can realize rapid full-field measurement, and has the key points of phase measurement, the phase measurement based on a phase shift method has the advantages of simple calculation, strong noise resistance and the like, and the speed and the precision of the phase measurement can be further improved by using the color fringe.

Disclosure of Invention

The invention has the outstanding advantages that the color phase shift technology is combined with the improved three-step phase shift method to carry out three-dimensional measurement on the object to be measured, and the color stripe image has richer information content and better identification characteristic than the gray stripe image; the technical scheme adopted by the invention is a color fringe projection three-dimensional measurement method based on improved three-step phase shift, which comprises the following steps:

(1) the method is improved on the basis of the traditional three-step phase shift method, Hilbert transform is introduced into the three-step phase shift method, direct-current components in a fringe image are obtained by the Hilbert transform, the light intensity distribution of the direct-current components replaces a fringe image in the traditional three-step phase shift method, and three gray level images with improved three-step phase shift are integrally coded into a color fringe image according to a color coding principle;

(2) projecting the stripes coded in the step (1) to the surface of an object to be measured by a color digital projector, and then acquiring a deformed color stripe image modulated by the object to be measured by a color area array camera arranged at a certain angle with the projector;

(3) preprocessing the deformed color stripe image obtained in the step (2);

(4) separating three gray level images of red, green and blue color channels from the color stripe image preprocessed in the step (3) respectively;

(5) calculating a wrapped phase image related to the surface height of the object to be measured by using an improved three-step phase shift method for the three gray level images obtained in the step (4);

(6) unwrapping the wrapped phase image calculated in the step (5), solving a continuous phase by adopting a four-way least square phase unwrapping algorithm based on transverse shearing, and finally completing three-dimensional measurement of the object to be measured according to a phase-height calibration result;

in the step (1), introducing a Hilbert transform method in a traditional three-step phase shift method, converting the phase difference of 1 st and 2 th fringe images in the three-step phase shift method into pi/2 by using the Hilbert transform, obtaining a direct current component of the fringe images by using the Hilbert transform, replacing the 3 rd fringe image with the light intensity distribution of the direct current component, and finally encoding the three gray level images into a color fringe image according to an RGB color model and a color encoding method;

in the step (2), a hardware platform of the measuring system is constructed, wherein the hardware platform comprises a digital color projector, a color area-array camera and a computer, the lens of the projector is 1m away from the plane where the object to be measured is located, the definition of a projection image is enabled to be the highest by finely adjusting the focal length, then a color area-array camera arranged at a certain angle with the projector is used for obtaining a deformed color stripe image modulated by the object to be measured, and the effect of the acquired deformed stripe image is enabled to be the best by finely adjusting the focal length and the aperture size of the lens of the camera;

in the step (3), preprocessing a deformed color stripe image which is acquired by a camera and modulated by the height or depth information of the object to be detected, wherein filtering processing is mainly performed on the acquired image by adopting an improved color image vector median filtering method so as to reduce noise introduced in the image acquisition process and improve the image quality;

in the step (4), the filtered color stripe image is converted into three grayscale images of three separate color channels of R (Red ), G (Green, Red), and B (Blue, Red), and the grayscale image of each channel can be represented as:

in step (5), the object wrapping phase is obtained by using an improved three-step phase shift method

In the step (6), the value range of the arctangent function is (-pi/2, pi/2), and the pair is matchedPerforming a phase unwrapping process to obtain a substantially continuous phase of the object, i.e.Wherein W [. C]Four-way least square phase unwrapping operation based on transverse shearing, phi (x, y) is a continuous phase of an object, and finally three-dimensional measurement of the object to be measured is achieved according to a phase-height calibration result.

Compared with the prior art, the method has the following advantages:

1. faster measurement speed: the color fringe phase shift method can finish three-dimensional measurement on an object to be measured only by projecting color fringe structure light once, and can be suitable for the field of rapid and dynamic measurement, a color fringe image is formed by encoding 2 gray fringe images and a plane image with uniform light intensity, and the sensitivity of the plane image with uniform light intensity to the change of the external environment is lower than that of the fringe image, so the measurement error is smaller;

2. faster calculation speed: the arc tangent operation process of solving the phase value by the three-step phase shift method is complex, and irrational number operation is introduced; the phase calculation formula of the improved three-step phase shift method is simpler and has symmetrical structure, so the operation speed is higher;

3. higher measurement accuracy: because the digital projector and the color area-array camera generally have a gamma nonlinear effect, even if the projected uniform light intensity is the same as the mean value of the light intensity of the sine stripes, the captured light intensity distribution of the background image is not equal to the light intensity distribution of the direct current component of the deformed stripe image, and a measurement error is introduced.

Drawings

FIG. 1 is a flow chart of an improved three-step phase shift phase extraction method;

FIG. 2 is a color-coded fringe pattern;

FIG. 3 is a schematic diagram of the measurement principle of the color phase shift method;

FIG. 4 shows the three-dimensional measurement results of a step model, wherein (a) is a deformed color stripe image modulated by the model; (b) the wrapped phase image is extracted by improving a three-step phase shift method; (c) unwrapping the phase image after the phase unwrapping processing is performed on the (b); (d) is a reconstructed three-dimensional structure diagram.

Detailed Description

The measurement principle of the color phase shift method is shown in figure 3, firstly, a color stripe image is generated by software coding, the color stripe image is projected to the surface of an object to be measured by a color digital projector, a color area array camera which is fixed at a certain angle with the projector is used for collecting a deformed color stripe image which is modulated by the height or depth information of the object to be measured, and then the deformed color stripe image is input to a computer; then, an improved color image vector median filtering method is adopted to carry out image filtering pretreatment, the filtered color stripe image is converted into three gray stripe images, and an improved three-step phase shift algorithm is utilized to obtain stripe wrapping phase information in the image, wherein the phase distribution is in the range of (-pi/2, pi/2); finally, unwrapping the wrapping phase to obtain the three-dimensional information of the object; the following describes in detail a specific implementation process of the technical solution of the present invention with reference to the accompanying drawings:

1. improvement is made on the basis of the traditional three-step phase shift method

A cosine fringe image is acquired by the camera, which can be expressed as:

wherein a (x, y) and b (x, y) are slow varying functions and can be regarded as constants; fringe phase information caused by surface height (depth) difference of object to be measuredChanges occur, the amount of which is related to the object height (depth) information;

and performing Hilbert transform on the cosine gray stripe image for the first time to obtain:

wherein the direct current component a (x, y) is filtered, the phase of the stripe after transformation is shifted by pi/2, and the stripe before Hilbert transformation forms an orthogonal relation, thus obtaining the sine component;

after a second hilbert transform of I2(x, y), we obtain:

(1) the direct current component of the fringe pattern can be obtained by adding the following equations (3):

I4(x,y)=a(x,y) (4)

(2) the formula (4) and the formula (b) are added to obtain:

the joint type (1), (4) and (5) are expressed, and the phase value is solved:

wherein the content of the first and second substances,is limited in the range of the main value (-pi, pi) of the arctangent function and is called wrapping phase;

2. generation of color stripe images from RGB color model coding

Respectively encoding the three gray level images into R, G, B three basic color channels to integrally generate a color stripe image, wherein an R channel and a G channel respectively carry cosine stripes with the same amplitude and frequency, the phase difference between stripe images is pi/2, and a B channel is a gray level image with the same intensity value;

3. extraction of phase information using color phase shift technology in combination with improved three-step phase shift method

Projecting the coded color stripe image to the surface of an object to be measured by a color digital projector, acquiring a deformed color stripe image by a color camera, and inputting the deformed color stripe image into a computer; then, an improved color image vector median filtering method is adopted for image filtering processing to improve the image quality, the filtered color fringe pattern is converted into three gray fringe patterns, an improved three-step phase shifting method is used for phase extraction, and the wrapping phase of the object to be detected is calculated;

in summary, the intensity expression of the color phase shift stripes can be written as:

wherein, IR(x,y)、IG(x,y)、IB(x, y) respectively representing the intensity values of each pixel point on R, G, B three channels, and performing phase extraction by using an improved three-step phase shift method to obtain the wrapping phase of the object to be detected

4. Performing unwrapping operation on the wrapped phase diagram;

because the wrapping phase is discontinuous, the process of recovering the wrapping phase into a continuous phase caused by inverse triangular operation is called phase unwrapping, the invention utilizes a four-way least square phase unwrapping operation based on transverse shearing to obtain the continuous phase of an object to be measured, and finally reconstructs the three-dimensional profile of the object according to a parameter calibration result to finish the three-dimensional measurement of the object;

wherein W [. cndot. ] represents the phase unwrapping operation, and phi (x, y) is the actual continuous phase of the object to be measured.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种测量切屑变形的方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!