Method for correcting tissue body surface illuminance in space frequency domain imaging by TOF depth camera
Technical Field
The invention relates to the technical field of optical imaging, in particular to a method for correcting the surface illuminance of a tissue body in space frequency domain imaging by using a depth camera.
Background
The spatial frequency domain imaging technology is to project pattern light (such as bright and dark stripes) on tissues at different spatial frequencies and phases, measure the reflectivity by using an imaging camera, and reconstruct the optical characteristic parameter distribution of functional information and physiological information carried in the tissues by using a specific light transmission model, thereby completing the optical parameter imaging of the tissues to be measured. The tissue body that awaits measuring often the shape is complicated, and the surface each point is highly inconsistent for the illuminance that projects reference plane and tissue body surface corresponding point is inequality, thereby leads to the unsatisfied sinusoidal distribution law of structured light that projects tissue body surface, and tissue body surface each point is inconsistent with high spectral imaging camera distance, and the distribution on body surface can receive the interference of high modulation, causes the data distortion.
In order to overcome the illuminance acquisition error caused by the height inconsistency of each point on the surface of a complex-shaped tissue body and ensure that pattern light meets the distribution of a sine rule, the chinese patent CN105466889B, a method for acquiring the illuminance of the surface of the complex tissue body in spatial frequency domain imaging, provides a correction method for equating the complex tissue body into a plane tissue at the same height as a reference plane. The method projects sine modulation light to a reference plane and the surface of a complex tissue body respectively, collects illuminance distribution images, calculates the phase difference between the reference plane and the tissue body through phase measurement profilometry, and corrects the collected illuminance value according to the diffuse reflection characteristics of the lambertian surface. Chinese patent CN106950196A, a method and apparatus for nondestructive testing of optical characteristic parameters of agricultural products, provides a method for measuring the three-dimensional height of the tissue surface by phase measurement profilometry, and directly correcting the measured absorption coefficient and reduced scattering coefficient results by the height value. The method comprises the steps of projecting sine modulation light to a reference plane and the surface of a complex tissue body respectively, collecting an illuminance distribution image, calculating a final unwrapping phase value of the reference plane and the surface of the tissue body, obtaining a phase-distance relation from the final unwrapping phase value of the reference plane, obtaining a three-dimensional height map of the surface of the tissue body according to the final unwrapping phase value of the surface of the tissue body, and directly correcting an absorption coefficient and an approximation scattering coefficient of each pixel point. The two methods both adopt phase measurement profilometry, both adopt a DPL projector to perform sine modulation light projection, and Gamma nonlinear response of the projector and CCD camera nonlinear response of the projector jointly cause non-sine of a sine image, so that the sine image becomes a main error source of height difference. The invention provides a method for correcting tissue body surface illumination in space frequency domain imaging by using a TOF depth camera, aiming at the defects.
Disclosure of Invention
The invention aims to provide a method for correcting tissue surface illumination in space frequency domain imaging by using a TOF depth camera, which eliminates non-sinusoidal errors of modulated light caused by Gamma non-linearity of a projector and non-linear response of a CCD camera.
The invention is realized by the following scheme that the method for correcting the tissue surface illumination in the space frequency domain imaging by using the TOF depth camera comprises the following steps,
step 1, projecting an image with light intensity of 0-255 gray scale values to a standard diffuse reflection Lambert body, establishing a gray scale response curve according to the gray scale values of the collected diffuse reflection image, and obtaining a brightness correction fitting polynomial Iout=f(Iin);
Step 2, projecting the uniform whiteboard image to a reference plane and a complex tissue plane, and acquiring and identifying the distribution of gray value differences of the plane depth image and the complex depth image respectively to obtain the height difference distribution of the complex tissue plane and the reference plane;
step 3, projecting the gray level picture with modulation frequency to the complex tissue surface in the step 2, collecting a luminosity distribution image, and correcting and fitting a polynomial I according to the brightness obtained in the step 1out=f(Iin) Brightness correction is carried out on the luminosity distribution image, and the luminosity distribution image after brightness correction is modified according to the height difference distribution obtained in the step 2;
step 4, correcting the gray level picture with the modulation frequency by using the luminosity distribution image modified in the step 3, so that the luminosity distribution of the complex tissue surface meets a sine distribution rule;
step 5, acquiring a complex tissue surface illuminance distribution image, performing brightness correction on the illuminance distribution image according to the brightness correction fitting polynomial obtained in the step 1, and correcting the acquired complex tissue surface illuminance distribution image according to a Lambert surface diffuse reflection model based on the height difference distribution obtained in the step 2;
a spatial frequency domain imaging depth correction system comprises a computer, a DLP projector, a CCD camera, a projection objective, a standard diffuse reflection plate, a base, a complex organization body, two five-dimensional adjusting frames, a precision lifting platform and a TOF depth camera, wherein the computer is used for outputting image data to the DLP projector, the DLP projector and the projection objective are used for projecting an image with light intensity of 0-255 gray scale values in step 1, or a uniform white board image in step 2, or a gray scale image with modulation frequency in step 3, or a gray scale image with modulation frequency corrected in step 4, the CCD camera is used for collecting a diffuse reflection image in step 1, or a luminosity distribution image in step 3, or a light illumination distribution image in step 5, the TOF depth camera is used for collecting a plane depth image and a complex depth image in step 2, and the standard diffuse reflector and the complex organization body are used for reflecting the projection of the DLP projector and the projection objective, the DLP projector is fixed on the precise lifting platform, the base is fixed on the first five-dimensional adjusting frame, the CCD camera and the TOF depth camera are interchangeably fixed on the second five-dimensional adjusting frame, the standard diffuse reflection plate and the complex tissue body are interchangeably fixed on the base, and the projection area of the DLP projector coincides with the acquisition area of the CCD camera or the TOF depth camera.
Preferably, the specific steps are as follows:
firstly, a group of gray value images with light intensity of 0-255 are projected to a standard diffuse reflection Lambert body through a DPL projector, the average value of the gray of the diffuse reflection images is measured through a CCD camera, a gray response curve corresponding to a system is established, polynomial fitting is carried out on the gray response curve, and a fitting polynomial I of the brightness correction of the diffuse reflection images is obtainedout=f(Iin);
Selecting 97% of standard diffuse reflection plate surface as a reference plane, projecting uniform white images to the reference plane and the surface of the complex tissue body through a DPL projector, and collecting a depth image I of the reference plane by using a TOF depth camera0(x, y) and Complex tissue surface depth image I1The gray value of (x, y) according to the formula
Calculating the height difference distribution delta h (x, y) of the complex tissue body and a reference plane, wherein x and y represent pixel coordinates;
thirdly, the DPL projector projects sine modulation light with standard spatial frequency to the surface of the complex tissue, and the gray value of the sine modulation light is distributed in space as S0(x, y), and collecting the luminosity distribution image G of the surface of the complex tissue by a CCD camera0(x, y) fitting polynomial pair G with luminance correction0(x, y) luminance correction, G1(x,y)=f(G0(x, y)) calculating according to inverse square law, and correcting complexThe image gray-scale value G (x, y) of the sinusoidally modulated light of the tissue volume is:
G(x,y)=[G1(x,y)×(l-Δh(x,y))2]/l2
wherein l is the distance from the DPL projector to the reference plane, and the corrected output gray value S (x, y) of the DPL projector is calculated:
S0(x,y)/G(x,y)=S(x,y)/S0(x,y);
correcting the output gray value S (x, y) of the DPL projector by using the modified image gray value distribution G (x, y), and controlling the output image of the DPL projector to enable the luminosity distribution image G of the surface of the complex tissue0(x, y) obeys the sine distribution rule;
collecting the pixel value A of the illuminance distribution image of the surface of the complex tissue by a CCD camera0(x, y) fitting polynomial I using diffuse reflectance image intensity correctionout=f(Iin) Correcting the nonlinear error collected by CCD to obtain the corrected pixel value A of illumination distribution image1(x,y)=f(A0(x, y)), then according to a lambertian surface diffuse reflection model, the intensity of light emitted from the surface of the complex tissue is inversely proportional to the square of the distance, and the modified illumination pixel value is:
A(x,y)=[A1(x,y)×(l-△h(x,y))2]/l2
and (5) completing the acquisition of the illumination of the surface of the tissue with a complex shape in the space frequency domain imaging by utilizing the steps 1-5. The invention has the following positive effects: the method comprises the steps of directly calculating a height difference distribution value of the surface of a tissue body by using a depth image quickly obtained by a TOF depth camera, and quickly correcting a surface illumination value with inconsistent height of a complex tissue body in real time by using the height difference distribution value, so that the illumination acquisition error is reduced during space frequency domain imaging, meanwhile, the non-sinusoidal error of modulated light caused by Gamma non-linearity of a projector and CCD camera non-linear response is eliminated through a system gray response curve, and the projected modulated light is ensured to meet the sinusoidal regular distribution. After the step 5 is completed, when the space frequency domain imaging method of the invention images the complex tissue body, the distortion stripes and the brightness captured by the CCD camera are corrected
Drawings
FIG. 1 is a schematic diagram of a system architecture;
FIG. 2 is a system gray scale response curve;
FIG. 3 is a complex tissue volume height difference image;
fig. 4 is a correction flowchart.
In the figure, 1-computer, 2-DLP projector, 3-CCD camera, 4-projection objective, 5-standard diffuse reflection Lambert body, 6-base, 7-complex tissue body, 8-two five-dimensional adjusting frames, 9-precision lifting platform and 10-TOF depth camera.
Detailed Description
The invention will be further described with reference to the accompanying drawings and specific embodiments which are described herein and which are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.
The device comprises a computer 1, a DLP projector 2, a CCD camera 3, a projection objective 4, a standard diffuse reflection Lambert body 5, a base 6, a complex organization body 7, two five-dimensional adjusting frames 8, a precise lifting platform 9 and a TOF depth camera 10. Wherein, DLP projector 2 is fixed on precision elevating platform 9, CCD camera 3 and base 6 are respectively fixed on two five-dimensional adjusting frames 8, and CCD camera 3 and TOF depth camera 10 can be fixed on five-dimensional adjusting frames 8 in an exchange manner. The adjustment of the translation, elevation and depression angle can be performed by the five-dimensional adjustment frame 8 and the precision elevating stage 9 in order to adjust the DLP projector 2, the CCD camera 3(TOF depth camera 10) and the complex tissue volume 7 at the same level. The standard diffuse reflecting lambertian body 5 and the complex organiser 7 may be interchangeably fixed on the mount 6.
According to fig. 1, a DLP projector 2, which uses a Digital Micromirror (DMD) chip as an imaging device, is used as an illumination light source, and the gray scale level of light can be precisely controlled using a binary pulse width modulation technique. The sine modulation light gray scale picture 11 generated by the computer 1 is irradiated to the surface of the standard diffuse reflection lambertian body 5 or the complex tissue body 7 through the DPL projector 2 and the projection objective 4. The reflected light is received by the TOF depth camera 10 or the CCD camera 3 and then sent to the computer 1 for data processing, thereby calculating the object height and the illuminance. Wherein the distance between the standard diffuse reflection lambertian body 5 and the CCD camera 3 is l ═ 30cm, and the included angle between the DLP projector 2 and the CCD camera 3 is 18 °.
In this embodiment, after the system is built and adjusted, the specific steps of measurement are as follows:
step 1: projecting each gray value image within the range of 0-255 to a standard diffuse reflection Lambert body 5 through a DPL projector 2, measuring the gray average value, namely the light intensity output value, of the diffuse reflection image through a CCD camera 3, establishing a gray response curve corresponding to the DPL projector 2, performing polynomial fitting on the gray response curve, and obtaining a diffuse reflection image brightness correction fitting polynomial Iout=f(Iin) Correcting the projection light intensity of the DPL projector according to the response curve as shown in FIG. 2;
step 2: selecting 97% of diffuse reflection plate surface as a reference plane, generating a uniform whiteboard image by Matlab programming, and projecting the uniform whiteboard image to the reference plane and the surface of the complex tissue body 7 by the computer 1 through the DPL projector 2 to respectively form a plane depth image I0(x, y) and complex depth image I1(x, y), with the TOF depth camera 10 acquiring a planar depth image I normal to the reference plane and the complex tissue volume0(x, y) and complex depth image I1The gray value of each pixel point in (x, y) is I according to the formula delta h (x, y)1(x,y)-I0(x, y) calculating the height difference distribution Δ h (x, y) of the complex tissue body and the reference plane, as shown in fig. 3;
and step 3: generating a sine modulation light gray picture 11 with standard spatial frequency by adopting Matlab programming, wherein the gray value spatial distribution of the sine modulation light is S0(x, y), the computer 1 projects the sine modulation light gray picture 11 to the surface of the complex tissue 7 through the DPL projector 2, and then the CCD camera 3 collects the complex tissue when being vertical to the complex tissuePhotometric distribution image G of the surface of body 70(x, y) fitting polynomial pair G with luminance correction0(x, y) luminance correction, G1(x,y)=f(G0(x, y)), and correcting the image gray-scale value distribution G (x, y) of the sinusoidally modulated light of the complex tissue volume by calculating according to the inverse square law:
G(x,y)=[G1(x,y)×(l-Δh(x,y))2]/l2
wherein l is the distance from the DPL projector to the reference plane, and the corrected output gray value S (x, y) of the DPL projector is calculated:
and 4, step 4: the computer 1 corrects the output gray value S (x, y) of the DPL projector using the modified image gray value distribution G (x, y), controls the output image of the DPL projector 2 to make the luminosity distribution image G of the surface of the complex tissue0(x, y) obeys the sine distribution rule.
And 5: the CCD camera 3 collects the pixel value A of the illumination distribution image of the surface of the complex tissue0(x, y) fitting polynomial I using diffuse reflectance image intensity correctionout=f(Iin) Correcting the nonlinear error collected by CCD to obtain the corrected pixel value A of illumination distribution image1(x,y)=f(A0(x, y)), and then according to a lambertian surface diffuse reflection model, the intensity of light emitted from the surface of the complex tissue is inversely proportional to the square of the distance, and the pixel value of the modified illumination distribution image is:
A(x,y)=[A1(x,y)×(l-△h(x,y))2]/l2
and (3) the acquisition of the surface illumination of the complex tissue in the space frequency domain imaging can be completed by utilizing the steps 1-5.