Disclosure of Invention
In order to solve the problems of high cost, large volume, low precision and the like in the existing structured light three-dimensional measurement, the invention provides a three-dimensional measuring instrument based on optical fiber coding structured light projection.
In order to achieve the above object, the present invention provides the following technical solutions:
the invention provides a three-dimensional measuring instrument based on optical fiber coding structured light projection, which comprises:
a light source unit for emitting light beams and controlling each light beam based on a timing;
The structure light projection unit is used for conducting the light beams through the optical fiber bundles, wherein one light beam corresponds to one optical fiber bundle, all the optical fiber bundles are combined, coding is carried out on the end faces of the combined bundles in a longitudinal alternating arrangement mode, and coding patterns are projected through the projection lens;
The acquisition unit is used for acquiring a surface image of the measured object after the coding pattern is projected on the surface of the measured object;
And the processing unit is used for processing and analyzing the surface image, carrying out three-dimensional reconstruction on the measured object and generating a three-dimensional digital entity.
According to a specific embodiment, in the three-dimensional measuring instrument, the encoding is performed by adopting longitudinal alternate arrangement on the beam combining end face, and specifically includes:
dividing the beam combining end face into coupling end faces corresponding to the light beams, and respectively fixing the coupling end faces into a coupling structure;
the fiber tails of each path of fiber bundles are longitudinally arranged into N column items, and the fiber bundles are sequentially circulated until all the fiber bundles are sequentially and tightly arranged, so that the coding is completed;
wherein N is a positive integer.
According to a specific embodiment, in the three-dimensional measuring apparatus, the processing unit is configured to process and parse the surface image, and specifically includes:
Outputting a truncated phase map and a texture map by adopting a phase shift correction algorithm, and detecting characteristic points;
And generating a point cloud according to the detected characteristics, and then combining the truncated phase diagram and the texture diagram to splice to generate a three-dimensional digital entity of the measured object.
According to a specific embodiment, in the three-dimensional measuring instrument, the processing unit is further configured to denoise the surface image by using an adaptive contrast enhancement algorithm.
According to a specific embodiment, in the three-dimensional measuring apparatus, the collecting unit adopts left and right dual-channel synchronous cameras, and the left and right dual-channel synchronous cameras are respectively arranged at two sides of the projection lens.
According to a specific embodiment, in the three-dimensional measuring apparatus, the processing unit is further configured to calculate the surface image acquired by the acquisition unit by using a random unknown phase shift fringe phase, so that the object to be measured obtains a correct unwrapped phase.
According to a specific embodiment, in the three-dimensional measuring apparatus, the acquisition unit adopts a synchronous camera and is disposed on the same plane with the projection lens.
According to a specific embodiment, in the three-dimensional measuring instrument, the light beam emitted by the light source unit comprises two or three beams, and the coding pattern corresponds to the light beam and comprises a two-step phase shift pattern and a three-step phase shift pattern.
According to a specific embodiment, in the three-dimensional measuring instrument, the instrument further includes a display unit for displaying the surface image and the three-dimensional digital entity
According to a specific embodiment, in the three-dimensional measuring apparatus, in the structured light projection unit, a diameter of the beam combining end face is matched with an imaging range of the projection lens.
Compared with the prior art, the invention has the beneficial effects that:
The three-dimensional measuring instrument provided by the invention adopts optical fiber illumination, codes are carried out through the beam combination arrangement sequence of the optical fiber beams, and the sinusoidal structure light pattern is realized, so that the projected code pattern can be guaranteed to have strict and accurate phase difference, and the accurate phase shift pattern is obtained through time sequence control of the light source, so that the three-dimensional measuring instrument has the remarkable characteristics of high speed, high precision, high reliability and the like when the three-dimensional measuring instrument is used for three-dimensionally measuring a measured object, and can overcome the three-dimensional acquisition measurement and identification of a moving object.
Detailed Description
The present invention will be described in further detail with reference to test examples and specific embodiments. It should not be construed that the scope of the above subject matter of the present invention is limited to the following embodiments, and all techniques realized based on the present invention are within the scope of the present invention.
The invention is a brand new technical research in the aspect of structured light measurement, and can replace the traditional expensive and complex structured light projection system of the optical machine. The invention projects multi-frame sinusoidal structure light with fixed phase difference as a measuring medium through optical fiber coding, the phase difference between frames can be strictly and stably controlled through ingenious coding mode, and the projection and the extraction integrated design forms any movable detection unit. The application scene of the traditional three-dimensional measurement is greatly expanded. Is suitable for narrow space, such as oral cavity tooth measurement, endoscopic system application and the like.
The invention uses the electronic switch to time-share and sequentially gate the corresponding projection channels, has the advantages of simple control, high switching speed, stability, reliability, no adjustment, good maintainability and the like, and the optical fiber projection replaces the traditional high-cost optical projector projection device, thereby greatly reducing the technical difficulty in control and greatly reducing the cost. The illumination system adopts an optical fiber system, so that the light source utilization rate is improved, and the contrast of the projection stripes is improved. The projection effect is projected by an actual prototype device, and the steps of projection acquisition, edge analysis, phase expansion, calibration and the like, and the image processing and algorithm verification show that the method has good effect and reaches the design expectation.
Fig. 1 is a schematic diagram showing a projection effect provided by an embodiment of the present invention, and fig. 2 is a schematic diagram showing an actual effect of projection of an object to be measured provided by an embodiment of the present invention.
The three-dimensional measuring instrument based on optical fiber coding structure light projection provided by the invention is used for obtaining a high-precision three-dimensional measuring entity model, and the self-designed phase shift coding and adaptive calibration method and the method for obtaining an accurate phase shift pattern are key technologies of the technical scheme of the invention.
The effect verification is carried out by measuring the curved surface of the face and carrying out the three-dimensional reconstruction test, namely, the effect of the binocular stereoscopic vision projection three-dimensional instrument unit based on the optical fiber bundle is shown in fig. 3, which is a schematic diagram of the modulation pattern collected by the left-view camera provided by the embodiment of the invention, and fig. 4, which is a schematic diagram of the modulation pattern collected by the right-view camera provided by the embodiment of the invention. The three-dimensional model established through multiple measurements and algorithm processing is shown in fig. 5, and is compared with a high-precision three-dimensional laser scanner for testing.
The invention adopts the design of integrated casting and mining, thereby increasing the convenience of application and the adaptability to multiple scenes. The invention can project a plurality of groups of sinusoidal structured light with fixed phase difference at high speed and measure, and simultaneously control the camera to synchronously collect, namely, the illumination control optical fiber codes and projects stable structured light, and after the modulated object to be measured, images are collected to carry out three-dimensional digital entity measurement.
In the existing three-dimensional measurement and identification system, the structured light three-dimensional measurement has very wide application prospect in public safety, finance, traffic and other civil fields due to no contact, high identification rate and high anti-counterfeiting performance, and is one of important core technologies for constructing an intelligent public service platform, a smart city and a peace city. As is well known, the rapid development of structured light three-dimensional measurement is premised on a high-integration, high-speed and high-precision three-dimensional projection acquisition device.
At present, the technology and application in the aspect of high speed and high precision are not perfect, and the measurement practicability of special scenes and special materials is not strong.
The existing high-precision three-dimensional reconstruction method is mainly based on structured light three-dimensional measurement profilometry, and is based on the principles of active structured light and triangulation, and the effect of the face complex surface is usually evaluated by taking the face complex surface as a detection object. Among the most promising and market prospect is Fringe Projection Profilometry (FPP), which can be used to measure dynamic objects. Two schemes are most commonly used in FPP, one is fourier transform contour measurement (FTP), which is a representative single frame scheme, and only one frame of fringes is required to complete three-dimensional reconstruction, which is very suitable for high-speed 3D measurement. However, due to limitations of band-pass filtering and limitations of parameter selection, the measurement accuracy of the method is relatively low compared with multi-frame phase shift, and the FTP method has great challenges when implementing automatic processing in a complex dynamic scene where the shape of an object changes with time. Another is Phase Shift Profilometry (PSP), which is known for its higher precision, greater resolution, lower complexity and insensitivity to ambient light compared to FTP. Therefore, the PSP is more suitable for collecting high-speed and high-precision three-dimensional face data.
On the basis, most of the applied technical schemes are optical machine projection, namely DLP projection components or lcos projection devices and the like, which have the factors of complex system, high manufacturing cost and the like.
However, how to reduce the integrated volume, reduce the cost and realize high-speed acquisition while ensuring the measurement precision, and finally design a low-cost, miniaturized, high-speed and high-precision dynamic three-dimensional measuring instrument is still an important challenge in engineering realization.
The three-dimensional measuring instrument based on optical fiber coding structured light projection provided by the invention is further described and illustrated below with reference to specific embodiments.
Referring to fig. 6, a schematic structural diagram of a three-dimensional measuring instrument based on optical fiber coding structured light projection according to an embodiment of the present invention is shown, including:
a light source unit for emitting light beams and controlling each light beam based on a timing;
The structure light projection unit is used for conducting the light beams through the optical fiber bundles, wherein one light beam corresponds to one optical fiber bundle, all the optical fiber bundles are combined, coding is carried out on the end faces of the combined bundles in a longitudinal alternating arrangement mode, and coding patterns are projected through the projection lens;
The acquisition unit is used for acquiring a surface image of the measured object after the coding pattern is projected on the surface of the measured object;
And the processing unit is used for processing and analyzing the surface image, carrying out three-dimensional reconstruction on the measured object and generating a three-dimensional digital entity.
The invention adopts the optical fiber bundles as the important components of the three-dimensional measurement structure light conduction and the coding thereof, designs the overall framework of the optical fiber structure light projection system of the non-digital optical machine, realizes the pattern coding by utilizing the multi-in-one optical fiber bundles, respectively performs asynchronous illumination on each branch structure, alternately arranges the optical fiber bundles at the beam combining end row items, controls the beam combining end emergent ends to form alternating row item bright-dark areas when the light source is asynchronously started, and then projects the pattern to the real three-dimensional measurement space through the projection lens. The invention can project a plurality of groups of (sine) structured light with high contrast and low noise in a time-sharing way to carry out three-dimensional measurement and modeling application.
The invention is different from the traditional optical machine DMD projection device, is a simple and easy-to-control space structure light projection unit, and the multi-frame sine structure light phase coding and modulation are realized by using the arrangement and combination of optical fibers and asynchronous driving of a light source. The projector is characterized by being independent of a complex fringe projection control program, being different from a mechanical dragging displacement optical fiber and a preregistration phase projector, adopting a projector without a mechanical moving part, adopting a light source which can be an infrared light source, carrying out non-sensing measurement by matching with an infrared camera, and carrying out object measurement by matching with a visible light wave band or a blue light wave band, wherein the projector can be used only by matching with a corresponding sensor and a corresponding wave band filter. The light source projection realizes a projection channel gating and phase shifting mechanism through a high-speed electronic switch, and can realize the functions of accurate pattern coding and projection which can be completed by complex electronic optical systems such as a projection optical machine by matching with synchronous acquisition of cameras, the production process does not need high-precision installation and adjustment, the large-scale batch production can be realized with low cost, and considerable economic benefits can be realized.
In one possible implementation manner, the projection lens and the lens of the acquisition unit adopt the same parameters and model, so that influence factors of errors caused by distortion and the like are eliminated as much as possible. Specifically, the light source unit includes an LED light source, a diaphragm, a light source coupling system (such as a light collecting lens) and a structural link member, and is configured to project the light beam to the optical fiber bundle in the structural light projection unit, so as to form a beam-combining optical fiber structure arranged according to the design.
Specifically, in one possible implementation manner, in the three-dimensional measuring apparatus, the collecting unit adopts left and right dual-channel synchronous cameras, and the left and right dual-channel synchronous cameras are respectively arranged at two sides of the projection lens. In another possible implementation manner, the acquisition unit adopts a synchronous camera and is arranged on the same plane with the projection lens.
Based on the three-dimensional measuring instrument provided by the invention, the embodiment of the invention can develop two design frameworks according to the application scene requirements:
1) A fiber bundle type movable casting three-dimensional measuring instrument unit aiming at a narrow space or a miniature target;
2) The binocular stereoscopic vision projection three-dimensional instrument unit based on the optical fiber bundles aims at a free space three-dimensional object (the embodiment of the invention takes a face curved surface as a test example).
In one possible implementation, taking the light source unit to project a three-in-one light beam as an example. Referring to fig. 7, a schematic structural diagram of an optical fiber bundle type arbitrarily movable projection unit provided by the embodiment of the invention is shown, the unit design is a three-dimensional measuring instrument based on structured light projection of three-in-one optical fiber coding, theoretical calculation and experimental verification are performed on the design, the design adopts three-in-one (three-step phase shift) coding, but not limited to three-in-one (three-in-one-out), and the theory can be expanded to multiple-in-one and corresponds to multi-step phase shift coding. The invention does not need complex control, and only needs to alternately turn on and off the light source corresponding to each channel and control the acquisition of the camera synchronous signals. No complex projection optics are required to generate the pattern. In consideration of the reduction of the sine of the pattern formed by the whole bright and dark stripes caused by the tiny gaps in the arrangement of the optical fiber bundles, the embodiment of the invention needs to be closely arranged when the optical fibers in each row are arranged, meanwhile, the projection lens can smooth the tiny defocusing according to the projection effect, and the noise removal treatment and the like can be carried out on the bright and dark boundary edge position after the image acquisition. In one possible implementation, after the system is connected, the distance between the projection lens and the beam combining end face can be finely adjusted according to the sine effect, and the design itself has the property of adjustable adaptation so as to better solve the projected sine to improve the measurement effect and accuracy.
Fig. 8 is a schematic structural diagram of a binocular stereoscopic vision projection three-dimensional instrument unit based on optical fiber bundles according to an embodiment of the present invention.
Further, in one possible implementation manner, taking three-in-one optical fiber coding as an example, the embodiment of the invention specifically describes how to implement coding among multiple frames of sinusoidal stripes, projection control thereof and synchronous acquisition of cameras.
Specifically, the three-in-one (all-in-one) optical fiber structural code is designed as follows:
In combination with the LED1, the LED2 and the LED3 in fig. 8 as light sources, the LED1, the LED2 and the LED3 are controlled to be coupled into the corresponding optical fiber bundle incident end surfaces in turn, and arrangement coding is performed for the manufacturing process when the three-in-one (multiple-in-one) optical fiber is manufactured, so that each branch of the three-in-one (multiple-in-one) optical fiber is subjected to alternate row item sequential arrangement on the beam combining end surfaces, that is, each time the light sources are sequentially turned on, the row items of the beam combining end surfaces form sine stripe images which are alternately bright and dark and are transversely sequential, and three frames (multiple frames) standard phase shift stripes can be formed by matching with synchronous acquisition of cameras, and phase expansion and three-dimensional reconstruction can be performed.
Referring to fig. 9, which shows a schematic view of a beam combining end face provided by the embodiment of the present invention, due to the multiple groups of alternating arrangement, the algorithm requirement of sine is considered, that is, when each light source is on, the entire end face of the outgoing end face needs to form a sine pattern with equal brightness and alternating gradient instantaneously. Taking 2 channels as an example, when the light source 2 is lighted and the columns with the sequence of 2 are all lighted, a certain emergent angle is generated at the tail of the emergent fiber according to the proper numerical aperture of the optical fiber, and particularly, the effect that the widths of bright and dark areas are nearly equal is formed by calculating a=arcsin (NA), and at the moment, the sequences of 1 and 3 are dark areas, and a continuous sinusoidal structure light pattern can be formed on the column items.
According to the requirement of a multi-frame sine structured light algorithm, the multi-frame sine stripes are required to meet the equal interval phase shift relation, so that a light source is driven to sequentially turn on and off, and a synchronous camera is controlled to perform acquisition processing, phase expansion and reconstruction to form three-dimensional point cloud data.
The coding and engineering realization method of the optical fiber bundle of the optical fiber structured light casting three-dimensional instrument comprises the following steps:
The diameter of a single-mode fiber for optical communication is generally 4-10 mu m, a mature product in the market is selected to be combined with the requirement of designing a sine pattern, and a single-mode fiber bundle of 5 mu m is preferably adopted as a base material, and multimode fibers can also be adopted. Considering that the transmission distance is short, the transmission loss can be ignored, and the transmission loss can be arbitrarily customized according to the application length. The diameter and the number of the total optical fiber bundles are determined according to the imaging range of the rear end face of the projection lens through calculation. And equally dividing the rear end of the optical fiber bundle into three bundles which respectively correspond to the light source coupling end faces and are respectively fixed in the coupling structure. And then, the fiber tails in the path of the LED1 are longitudinally arranged into N column items, and N=3 (fixing tool and bearing surface of the wavy groove fixer) is obtained through calculation and empirical value balance. And then, longitudinally arranging the fiber tails in the LED2 path into N column items, and then longitudinally arranging the fiber tails in the LED3 path into N column items, and sequentially circulating until all the fiber bundles are sequentially and tightly arranged, thereby completing the code manufacturing.
It will be appreciated that determining the total fiber bundle diameter and number from the rear face imaging range of the projection lens includes determining the total fiber number from the applicable target parameters of the rear end of the projection lens, i.e., lens compatible maximum target D/fiber diameter d=total number of fibers n. According to the three-in-one mode, namely the emergent optical fiber end, the coupling end of each light source should be n/3 in the optical fiber manufacturing process, namely the light source beam and the coupling lens of the light source coupling are designed according to the size.
Similarly, the three-in-one beam processing can be applied to two-in-one, that is, the light source unit emits two beams, which will not be described herein.
The embodiment of the invention mainly applies three channels of optical fiber codes with fixed phases to perform space projection of time-sharing sinusoidal structured light, and applies a sinusoidal fringe pattern modulated by a target to synchronously acquire the sinusoidal fringe pattern by a camera. The method comprises the following specific steps:
1) The integrated optical fiber projection acquisition device is opposite to the measured object, and three modulated patterns can be obtained by controlling the illumination light sources in the three channels to be sequentially switched on and off and controlling the cameras to synchronously take a candid photograph.
2) Each time a frame is projected, the left and right cameras take a snapshot simultaneously, forming a plurality of left views L0, L1, L2 and right views R0, R1, R2 with spatially modulated patterns of determined phase shift.
3) And after the calibrated optical system framework is used for realizing the projection and collection of the measured object, the collected pattern is subjected to image processing and analysis, and the space calculation of the three-dimensional image is performed.
4) Generating point cloud, corresponding texture splicing and the like, and forming reconstruction information of the space three-dimensional digital entity.
Specifically, in the image processing section (taking projection acquisition face as test verification scene):
1) Phase extraction and phase unwrapping, please refer to fig. 11.
Specifically, the three-dimensional reconstruction can be completed by adopting an M (M is more than or equal to 3) Zhang Tiaowen graph. The algorithm uses the face feature points as priori knowledge, adopts a phase adjustment algorithm to determine accurate phase level difference K, adjusts relative phases to the same phase reference through a phase adjustment relation of 2K pi, and performs sub-pixel level three-dimensional matching to finally obtain high-precision three-dimensional face reconstruction.
2) The phase shift correction algorithm outputs a truncated phase map and a texture map and performs feature point detection, please refer to fig. 12.
Specifically, a corresponding phase matching pair is found in the truncated phase according to the detected (face) feature points. The (face) feature point coordinates (x L,i,yL,i) and (x R,i,yR,i) are extracted in the texture image pair, which correspond to phases Φ L(xL,i,yL,i and Φ R(xR,i,yR,i in the truncated phases), i being the number of feature points. Each detected feature point has its own nature, and the feature point at the corresponding position (of the left and right faces) can be regarded as a set of feature point pairs. Since the acquired modulated image has undergone the level line correction, the phase pair corresponding to the coordinates of the (face) feature point pair in the truncated phase can be regarded as a group of phase matching pairs. The phase difference between the phase matching pairs (Φ L(xL,i,yL,i) and Φ R(xR,i,yR,i) corresponding to the feature point pairs is calculated by the formula 1, and divided by 2pi to obtain the stripe level difference K i (x, y) corresponding to each group of (face) feature point pairs.
(1)
The final fringe order difference K is obtained on the basis of K i (x, y) through a voting strategy. And a phase adjustment algorithm is adopted, the relative phase of the left camera is taken as a reference, after the absolute phase of the right camera is added with 2K pi according to formulas (2) and (3), the relative phase of the left camera and the right camera is adjusted to the same phase reference, and sub-pixel level phase matching is carried out, so that high-precision three-dimensional (face) data is finally obtained.
(2)
(3)
3) Three-dimensional effects are generated, please refer to fig. 13.
The invention optimizes the light source optical fiber coupling light system, adopts the design of an object space telecentric light path, the collimating lens and the diaphragm can adjust the illumination angle, improves the light energy utilization rate and illumination uniformity of the illumination system, improves the contrast of projection stripes, and projects an image illuminated by the optical fiber to the surface of an object by using the lens. The invention is an innovative design with independent research and development design, and aims at solving the factors of technical limitations such as foreign DLP and the like, and the novel research is carried out according to related technical theory. The optical fiber casting and picking integrated structure applied by the invention can move the optical fiber coding casting and picking structure at will, is a brand new design mode, increases the flexibility of the three-dimensional measuring instrument, widens the application scene, and is suitable for narrow spaces such as oral cavity tooth measurement, endoscopic system application and the like. The invention completely ensures that the projected stripes have strict and accurate phase difference through ingenious optical fiber arrangement and coding modes, and the electronic switching meets the requirement of high-speed measurement. And at the same time, there is no moving mechanism, thereby increasing the reliability of measurement. The method for obtaining the accurate phase shift pattern by using the phase shift coding and the adaptive calibration method which are designed independently is one of key technologies of the technical scheme of the invention. The invention has excellent performance compared with the traditional stripe structure light measurement, has the obvious characteristics of high speed, high precision, high reliability and the like, and can overcome the three-dimensional acquisition measurement and identification of moving objects by testing the three-frame projection-acquisition time within 10 ms. After multiple measurements, the three-dimensional precision is close to 0.1mm, which is superior to the same type of measured products.
Furthermore, the method obtains the correct unfolding phase through the random unknown phase shift fringe phase calculation, the algorithm not only solves the problem that the relative phase obtained by the three-dimensional camera through the spatial phase unfolding algorithm cannot be directly used for three-dimensional matching due to different phase references, but also only needs three phase shift modes, so that the method has lower sensitivity to dynamic scenes, can be applied to dynamic (face) measurement, has certain divergence angle and defocus adjustment through the optical fiber outgoing end, increases the sine, and further improves the three-dimensional modeling precision. For this, verification is performed by the preferred three frame phase shift device herein. The method is not limited by complex algorithms such as projection frequency, measurement depth range and the like.
Further, the present invention uses adaptive contrast enhanced ACE for denoising, and the algorithm uses a unsharp masking technique in which the image is first divided into two parts. One is the low frequency unsharp mask (unsharp mask) portion, which can be obtained by low pass filtering (smoothing, blurring technique) of the image. And secondly, the high-frequency component can be obtained by subtracting the unsharp mask from the original image. The high frequency part is then amplified (the set of amplification factors is the contrast gain CG) and added to the unsharp mask, resulting in an enhanced image. And a strategy for recovering the original signal as much as possible and removing coarse noise points.
It can be understood that the processing unit provided by the embodiment of the invention can be composed of high-performance artificial intelligence computing processing devices such as a central processing unit (central processing unit, CPU), a graphic processor (graphics processing unit, GPU), a field programmable gate array (field programmable GATE ARRAY, FPGA) and the like, so as to realize an image processing function.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.