Three-dimensional measurement method and system

By adding time-disguised phase shift and empty-disguised phase shift to the three-dimensional measurement technology, the problem of high computational volume in the prior art is solved, and more efficient and faster three-dimensional information measurement is achieved, reducing costs and retaining image quality.

CN115507773BActive Publication Date: 2025-02-18GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110634492.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-07
Publication Date
2025-02-18
Estimated Expiration
2041-06-07

AI Technical Summary

Technical Problem

Among the existing three-dimensional measurement technologies, the calculation amount is large, which leads to a high cost of computing resources for electronic devices when performing three-dimensional automatic optical detection.

Method used

By adding time-disguised phase shift and empty-disguised phase shift to the projected multiple projected images, the electronic device determines the phase sequence according to the phase change after receiving the reflected image, and obtains the real phase in combination with the wrapped phase, so as to realize the three-dimensional information on the surface of the object Measurement.

Benefits of technology

The number of images that electronic devices need to process is reduced, the amount of calculation is reduced, the detection efficiency and speed is improved, the cost is reduced, and the high sinusoidal amplitude of the image is retained, ensuring image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115507773B_ABST
    Figure CN115507773B_ABST
Patent Text Reader

Abstract

The present application provides a three-dimensional measurement method and system. In addition to adding a time-varying phase shift to the projection image projected onto the surface of the object to be detected, a space-varying phase shift related to the position in the projection image is also added, so that after receiving the reflected image, the electronic device can determine the phase series according to the phase change in the reflected image, and combined with the wrapped phase that can be determined from the reflected image, the real phase corresponding to the multiple reflected images can be obtained, and finally the three-dimensional information of the object surface is measured according to the real phase. The present application can reduce the amount of calculation of the electronic device when performing three-dimensional optical detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a three-dimensional measurement method and system. Background Art

[0002] In the 3D Automatic Optic Inspection (3D AOI) technology, the 3D AOI technology detects the 3D point cloud data of the object surface in a non-contact manner through optical projection. The electronic device projects a sinusoidal phase-shifted fringe image onto the surface of the object through a transmitting device, and then the electronic device collects the image of the surface of the object through a collecting device. Since the uneven position of the object surface will cause the light to bend, the wrapped phase value including the deformation information of the surface of the detected object in the phase-shifted fringe image in the image collected by the collecting device can obtain the change of the phase of the projected image on the object through the image collected by the collecting device, and then determine the uneven position and height of the surface and other information.

[0003] In the prior art, the multi-frequency differential phase shift method is widely used in three-dimensional automatic optical inspection scenarios. An electronic device generates multiple sinusoidal phase-shifted fringe images of different frequencies, and the multiple fringe images of each frequency are phase-modulated. The generated images are then sent to the surface of the object in sequence through a transmitting device. The electronic device then collects the images presented on the surface of the object through an acquisition device, and then decodes the images through an inverse tangent function to obtain a multi-frequency deformation phase map corresponding to each frequency. The multiple deformation phase maps are then heterodyned to obtain a wrapped phase map. Finally, the wrapped phase map is phase unwrapped to obtain a true phase map corresponding to the object surface. Then, information such as the uneven position and height of the object surface can be determined based on the true phase map.

[0004] However, using the existing technology, a large number of images need to be processed during the entire three-dimensional measurement process, resulting in a large amount of calculation for the three-dimensional measurement. Summary of the invention

[0005] The present application provides a three-dimensional measurement method and system to solve the technical problem of large amount of calculation in the three-dimensional measurement process.

[0006] The first aspect of the present application provides a three-dimensional measurement method, comprising: projecting a plurality of projection images sequentially onto the surface of an object to be detected through visible light, wherein each of the projection images comprises a plurality of sinusoidal fringes, the sinusoidal fringes of the plurality of projection images have the same frequency, and the phases corresponding to the plurality of sinusoidal fringes in each projection image are shifted according to a preset rule; collecting a plurality of reflection images obtained after the object to be detected reflects light from the plurality of projection images; determining the wrapping phases corresponding to the plurality of reflection images based on the sinusoidal fringes of the plurality of reflection images; determining the phase series corresponding to the plurality of reflection images based on the preset rule of the sinusoidal fringes phase shift in the plurality of reflection images; and determining the three-dimensional information of the surface of the object to be detected based on the wrapping phase and the phase series.

[0007] In an embodiment of the first aspect of the present application, the preset rule includes: performing phase shift processing on each sinusoidal fringe according to a shift value corresponding to the position of each sinusoidal fringe in the projection image.

[0008] In an embodiment of the first aspect of the present application, the light intensity distribution function of the projected image is:

[0009]

[0010] Where I′(x, y) is the light intensity bias value, I″(x, y) is the sine amplitude, δ n =2π / 2N, 2N is the number of steps of the time-varying phase shift, and z(x, y) is the shift value of the (x, y) position in the projection image according to the preset rule.

[0011] In an embodiment of the first aspect of the present application, the method further comprises: according to the formula z(x, y)=S N (n) σ(x, y) calculates the shift value of the position (x, y) in the projection image according to the preset rule;

[0012] Among them, S N (n) is the sign function. When n<N, S N (n)=-1, when n≥N, S N (n) = 1; σ(x, y) is the space-variable phase shift value, k(x, y) is the phase series, f is the frequency of the sinusoidal fringes, and R is the upper limit of the preset regular shift value.

[0013] In an embodiment of the first aspect of the present application, determining the phase order corresponding to the multiple reflected images according to the preset rule of sinusoidal stripe phase shifting in the multiple reflected images includes: determining, according to the light intensity of the multiple reflected images and the preset rule of phase change of the multiple reflected images, the spatially variable phase shift value of the multiple projected images shifted according to the preset rule; determining the phase order corresponding to the multiple projected images according to the spatially variable phase shift value and the frequency of the sinusoidal stripes in the multiple reflected images.

[0014] In an embodiment of the first aspect of the present application, determining, based on the light intensities of the multiple reflected images and the preset law of phase changes of the multiple reflected images, the spatially variable phase shift values ​​of the multiple projected images shifted according to the preset law includes:

[0015] When N is an even number, the formula Determine the space-variable phase shift value σ(x, y);

[0016] When N is an odd number, the formula , determine the space-variable phase shift value σ.

[0017] In an embodiment of the first aspect of the present application, determining the phase order corresponding to the plurality of projection images according to the spatially variable phase shift value and the frequency of the sinusoidal fringes includes:

[0018] according to The phase order k(x,y) is determined.

[0019] In an embodiment of the first aspect of the present application, determining the wrapping phases corresponding to the multiple reflected images according to the sinusoidal fringes of the multiple reflected images includes:

[0020] According to the formula Determine the package phase

[0021] In an embodiment of the first aspect of the present application, determining the three-dimensional information of the surface of the object to be detected according to the wrapped phase and the phase order includes: according to the formula Determine the real phase φ(x, y) of the surface to be detected; and determine the three-dimensional information of the surface of the object to be detected according to the change of the real phase.

[0022] The second aspect of the present application provides a three-dimensional measurement system for executing the three-dimensional measurement method provided in the first aspect of the present application, the system comprising: an electronic device, a transmitting device and a collecting device, wherein the transmitting device and the collecting device are respectively connected to the electronic device; the electronic device is used to control the transmitting device to sequentially project a plurality of projection images onto the surface of the object to be detected through visible light, wherein each of the projection images comprises a plurality of sinusoidal fringes, the sinusoidal fringes of the plurality of projection images have the same frequency, and the phases corresponding to the plurality of sinusoidal fringes in each projection image are shifted according to a preset rule; the electronic device is also used to control the collecting device to collect a plurality of reflection images obtained after the object to be detected reflects the light of the plurality of projection images; the electronic device is also used to determine the wrapping phases corresponding to the plurality of reflection images according to the sinusoidal fringes of the plurality of reflection images; determine the phase series corresponding to the plurality of reflection images according to the preset rule of the sinusoidal fringes phase shift in the plurality of reflection images; and determine the three-dimensional information of the surface of the object to be detected according to the wrapping phase and the phase series.

[0023] In summary, the three-dimensional measurement method and system provided by the present application, in addition to adding a time-varying phase shift to the projection image projected onto the surface of the object to be detected, also adds a space-varying phase shift related to the position in the projection image, so that after the electronic device receives the reflected image, it can determine the phase series according to the phase change in the reflected image, and combined with the wrapped phase that can be determined from the reflected image, it can obtain the real phase corresponding to the multiple reflected images, and finally complete the measurement of the three-dimensional information of the object surface according to the real phase. That is to say, in the embodiment of the present application, the electronic device only needs to determine multiple projection images of the same frequency, and after the acquisition device sends multiple projection images, the acquisition device collects multiple reflection images of a frequency, and the electronic device can measure the three-dimensional information of the object surface according to the multiple reflection images of a frequency.

[0024] Therefore, since the embodiment of the present application embeds the phase series into the space-varying phase shift of the image, the number of images that need to be determined, emitted, collected and detected is smaller, and at least four images are needed to complete the detection, thereby reducing the number of images that need to be processed by the electronic device, the transmitting device and the collecting device during the entire three-dimensional automatic optical detection process, reducing the amount of calculation of the electronic device when performing three-dimensional optical detection, avoiding the large occupation of the computing resources of the electronic device, and improving the detection speed and efficiency due to the smaller number of processing. At the same time, it also reduces the requirements for the computing power of the electronic device, reduces the cost required for three-dimensional automatic optical detection, and makes the entire detection process more cost-effective. In addition, since the embodiment of the present application embeds the phase series into the space-varying phase shift of the fringe image instead of the pixel intensity of the image, it can also retain the higher sinusoidal amplitude of the image to ensure the quality of the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0026] Figure 1 A schematic diagram of an application scenario of this application;

[0027] Figure 2 It is a schematic diagram of the processing performed by the transmitting device in the multi-frequency differential phase shift method;

[0028] Figure 3 It is a schematic diagram of the processing performed by the acquisition device in the multi-frequency differential phase shift method;

[0029] Figure 4 A schematic diagram of a flow chart of an embodiment of a three-dimensional measurement method provided by the present application;

[0030] Figure 5 A schematic diagram of determining a projection image provided for this application;

[0031] Figure 6 A schematic diagram of determining a projection image provided in this application. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0033] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] Before formally introducing the embodiments of the present application, the application scenarios of the present application and the problems existing in the prior art are first described in conjunction with the accompanying drawings. Specifically, the present application is applied in the 3D Automatic Optic Inspection (3D AOI) technology. The 3D AOI technology measures the 3D point cloud data of the surface of an object non-contactly by means of optical projection. For example, it can be specifically applied to the production line of products such as printed circuit boards (PCBs) to perform high-speed and high-precision quantitative defect detection on the products produced.

[0035] For example, Figure 1 A schematic diagram of an application scenario of this application is shown in FIG. Figure 1 In the scene shown, the three-dimensional measurement system composed of an electronic device 40, a transmitting device 20 and a collecting device 30 is used together to measure the three-dimensional information of the surface of the object 10 to be detected. The transmitting device 20 and the collecting device 30 can be controlled by the same electronic device 40, or the transmitting device 20 and the collecting device 30 are controlled by electronic devices connected separately. In order to measure the three-dimensional information of the surface of the object 10 to be detected, the electronic device 40 first projects a projection image of sinusoidal phase-shifted fringes onto the surface of the object 10 through the transmitting device 20. The transmitting device 20 can be a device such as a projector. Subsequently, when the light of the projected image on the surface of the object 10 is reflected, the electronic device 40 collects the light on the surface of the object 10 through the collecting device 30 to obtain a reflected image. The collecting device 30 can be a device such as a camera. Since the uneven position on the surface of the object 10 may cause the light to bend, the sinusoidal fringes in the projection image projected by the emitting device 20 onto the surface of the object 10 are phase-shifted due to the uneven area of ​​the object 10. As a result, the acquisition device 30 acquires the reflected image, including the wrapped phase value of the surface deformation information of the detected object 10. Therefore, the electronic device 40 can obtain the phase change through the reflected image acquired by the acquisition device 30, and further determine the three-dimensional information of the object surface.

[0036] In some embodiments, the multi-frequency differential phase shift method is widely used because of its high accuracy, high resolution and insensitivity to changes in the reflectivity of the object surface. Figure 1 Specifically, Figure 2The figure is a schematic diagram of the processing performed by the transmitting device in the multi-frequency differential phase shift method, wherein before the transmitting device transmits the projection image, the electronic device generates multiple sinusoidal phase-shifted fringe projection images of different frequencies, and the multiple projection images of each frequency are phase-modulated, and then the generated projection images are sequentially sent to the surface of the object through the transmitting device. Figure 2 In step S11 shown, the electronic device generates three projection images of frequency ① and three projection images of frequency ② as an example, and in the three projection images of each frequency, the phase is modulated according to a certain step length, that is, in the three projection images of each frequency, the three projection images have the same frequency and different phases. In some embodiments, the projected image can be expressed by the following formula 1:

[0037]

[0038] Among them, I n (x, y) represents the light intensity at the pixel position (x, y) in the nth projection image, i.e., the image coding intensity, n = 0, 1, ..., 2N-1, I′(x, y) is the light intensity bias value, I″(x, y) is the sine amplitude, δ n =2π / 2N, 2N is the number of phase shift steps.

[0039] When electronic devices Figure 2 After the multiple projection images of multiple frequencies generated in the above are sequentially projected onto the surface of the object through the form of visible light by the transmitting device, the electronic device then collects the reflected images of the light of each image on the surface of the object through the collecting device. The number of reflected images is the same as the number of projected images. Then, the electronic device uses the acquired images to reversely calculate the phase information corresponding to the fringes in the reflected image from Formula 1. For example, Figure 3 The schematic diagram of the processing performed by the acquisition device in the multi-frequency differential phase shift method, wherein Figure 3 In step S21, the electronic device obtains the information of the transmitting device through the collecting device. Figure 2 The same number of reflected images of the object surface emitted in the image, and it can be seen that due to the influence of the uneven surface of the object, Figure 2 The stripes in the vertical reflected image are changed in distribution direction. Then in S22, the electronic device decodes the reflected image through the inverse tangent function to obtain a multi-frequency deformation phase diagram corresponding to each frequency, for example Figure 3 In the example shown, a multi-frequency deformation phase image can be obtained based on the three reflection images of frequency ①, and another multi-frequency deformation phase image can be obtained based on the three reflection images of frequency ②. Then in S23, the electronic device obtains an equivalent phase image, which can also be called a wrapped phase image, by heterodyning the multiple deformation phase images in S22.

[0040] Since the inverse tangent function can only obtain the wrapped phase in the range of (-π, π) during phase decoding, the wrapped phase diagram obtained in S23 is equivalent to a 2π modulo processing of the real phase, which makes the wrapped phase not unique and leads to phase ambiguity. Therefore, the electronic device also needs to perform phase unwrapping (Phase Unwrapping) on ​​the wrapped phase obtained in S23. Through the correspondence between the deformed phase in S23 and the original phase in S11, after obtaining the wrapped phase in S23, the real phase in S24 can be restored. The correspondence between the wrapped phase of S23 and the real phase of S24 can be expressed by the following formula 2:

[0041]

[0042] Where k(x, y) is the phase series. From Formula 2, it can be seen that phase unwrapping is equivalent to determining the phase series. After heterodyning multiple deformed phase images in S22 to obtain the phase series, the wrapped phase can be combined with Get the true phase φ(x, y).

[0043] In summary, through the above Figure 2-Figure 3 In the method of using the multi-frequency phase shift method for three-dimensional automatic optical detection shown in the figure, although the electronic device can determine the image phase value after being reflected by the object through the transmitted and received sinusoidal fringe images, and then determine the three-dimensional information, in the above process, each frequency of S21-S22 needs to be processed by multiple frequencies of images to obtain a deformation phase map, and S22-S23 also needs to be processed by heterodyning deformation phase maps of multiple different frequencies to determine the wrapping phase, so that the electronic device needs to process a large number of images during the entire three-dimensional automatic optical detection process. Figure 2 In the encoding stage shown in FIG. 1 , the electronic device needs to encode more projection images. Figure 3 In the decoding stage shown, the electronic device also needs to decode more reflected images before it can obtain the wrapped phase and the true phase. This greatly increases the amount of calculation of the electronic device when performing three-dimensional automatic optical detection, occupies the valuable computing resources of the electronic device, and places higher requirements on the computing power of the electronic device, and also increases the cost required for three-dimensional automatic optical detection.

[0044] Therefore, in order to overcome the above Figure 2-Figure 3The technical problem in the technology shown, the present application provides a three-dimensional measurement method and system, which adds a spatially variable phase shift to the projected multiple projection images, so that after the electronic device receives the reflected image, it can determine the phase order according to the phase change in the reflected image, so that the transmitting device only needs to send multiple projection images of one frequency, and the acquisition device only needs to acquire multiple reflected images of one frequency. The electronic device can determine the phase order and true phase corresponding to the object surface according to the multiple reflected images of one frequency, and finally complete the measurement of the three-dimensional information of the object surface, thereby reducing the number of images that the electronic device needs to process in the entire three-dimensional automatic optical detection process, improving the detection efficiency and speed, and having higher cost-effectiveness.

[0045] The technical solution of the present application is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0046] Figure 4 A schematic diagram of a flow chart of an embodiment of a three-dimensional measurement method provided in this application, such as Figure 1 The method shown can be applied to Figure 1 In the scenario shown, the electronic device 40, the transmitting device 20 and the collecting device 30 jointly measure the three-dimensional information of the object 10 to be detected. Figure 4 The three-dimensional measurement methods shown include:

[0047] S101: The electronic device 40 determines a plurality of projection images to be projected.

[0048] Among them, each projection image provided by this embodiment can be specifically a phase-shifted image of sinusoidal fringes, each projection image includes multiple sinusoidal fringes, and at the same time, the sinusoidal fringes of multiple projection images have the same frequency, and when multiple projection images are phase modulated, both time-varying phase shift and space-varying phase shift are added, wherein the time-varying phase shift is that the phase of the sinusoidal fringes between multiple projection images is phase-shifted according to a preset phase shift step number, which is related to the sequence number of the image; the space-varying phase shift is that the phase of the sinusoidal fringes within each projection image is phase-shifted according to a preset rule, which is related to the coordinates within the image. In some embodiments, when performing space-varying phase shift on each sinusoidal fringes in the projection image, the sinusoidal fringes can be phase-shifted according to the space-varying phase shift value that uniquely corresponds to the position of the sinusoidal fringes in the projection image, so that the phase shift values ​​of the sinusoidal fringes at different positions in the projection image are different, and therefore it can be called "space-varying phase shift".

[0049] Specifically, in S101, the electronic device may determine the image to be projected according to the following formula 3:

[0050]

[0051] Wherein, the above formula 3 is specifically the light intensity distribution function of the projected image, I n (x, y) is the light intensity value of the nth image at the pixel position (x, y) in the multiple projected images, I′(x, y) is the light intensity bias value, I″(x, y) is the sine amplitude, and both I′(x, y) and I″(x, y) can be set to (2^bit-1) / 2, where bit represents the number of coding bits of the projector, δ n is the time-varying phase shift value, δ n =2π / 2N, 2N is the number of steps of the time-varying phase shift, N≥2, z(x, y) is the shift value of the position (x, y) in the projected image according to the preset rule, which includes the spatial phase shift value σ(x, y), see formula 4. From the above formula 3, it can be seen that the sinusoidal fringes in each projected image are shifted in phase, and the phase shift includes the time-varying phase shift δ n And the space-variable phase shift z(x, y) part.

[0052] In some embodiments, since the space-variant phase shift is used to reflect the difference between different positions in the projected image, any form that can uniquely determine the pixel coordinates or phase series can be used. For example, the shift value z(x, y) of a preset rule in the projected image can be calculated according to the following formula 4:

[0053] z(x,y)=S N (n)·σ(x, y) Formula 4

[0054] Among them, S N (n) is the sign function, k(x, y) is the phase series, f is the frequency of the sinusoidal fringes, that is, the number of sinusoidal cycles on a projected image, and R is the upper limit of the phase shift value of the space-variable shift term according to the preset rule.

[0055] In some embodiments, Figure 5 A schematic diagram for determining a projection image provided in the present application, wherein S311 is the distribution of space-variant phase shift values ​​at different positions in the projection image. It can be seen that according to the space-variant phase shift calculated by Formula 4, the phases at different positions in a projection image are different and may change periodically. S312 is a plurality of projection images. The plurality of projection images in S312 have undergone a time-variant phase shift. Subsequently, in S32, according to the plurality of projection images in S312, phase shifting is performed according to the space-variant phase shift in S311, so that the plurality of images obtained in S32 undergo both a time-variant phase shift and a space-variant phase shift.

[0056] S102: The electronic device 40 projects the multiple projection images determined in S101 onto the surface of the object to be detected 10 in sequence through the transmitting device 20 via visible light.

[0057] The specific method of projecting the projection image in this embodiment can refer to the prior art and is not limited thereto. S101-S102 can be constituted as follows: Figure 4 Part P1 in the figure is a process in which the electronic device 40 determines and projects a projection image.

[0058] S103: The electronic device 40 uses the acquisition device 30 to sequentially acquire multiple reflected images obtained after the object to be detected reflects the light of the multiple projection images emitted by the emitting device 20 in S102.

[0059] S103 can be constructed as follows Figure 4 The P2 part in the process, and S102-S103 should be executed accordingly. For example, after the electronic device determines multiple projection images in S101, after sending the first projection image to the object to be detected through S102, the first reflection image corresponding to the first projection image is collected through S103; then the second projection image is sent to the object to be detected through S102, and the second reflection image corresponding to the second projection image is collected through S103, and so on, to finally obtain multiple reflection images.

[0060] Then, after the processing of the two parts of P1 projection and P2 acquisition, the electronic device 40 obtains a plurality of reflected images, which can be processed as follows: Figure 4 The P3 detection part measures the three-dimensional information of the object surface based on multiple reflection images. The P3 detection part specifically includes:

[0061] In S106, the wrapped phase calculated using the multiple reflection images And the phase series k(x, y), unpack the wrapped phase, and obtain the true phase value of the surface of the object to be detected corresponding to multiple reflected images through the formula. Ultimately, the three-dimensional information of the surface of the object to be detected can be determined based on the change of the true phase value φ(x, y), such as the specific location of the uneven area on the surface and the height of the uneven area. This application does not limit the subsequent processing of the true phase value.

[0062] For example, Figure 6 A schematic diagram of determining a projection image provided in this application, in order to obtain a true phase value (corresponding to Figure 6 In S44), it is also necessary to respectively pass through S104 according to the multiple reflection images (corresponding to Figure 6 S41 in the package phase (corresponding to Figure 6 S43 in ), and the phase order k(x, y) (corresponding to Figure 6 The actual phase value can then be determined in S106. The execution order of S104 and S105 is not limited, and they can be executed simultaneously or in sequence.

[0063] In S104, after the electronic device collects multiple projection images, each projection image can be represented by the intensity function of formula 3, and the electronic device can determine the wrapping phase by the following formula 5 in the form of an inverse tangent function:

[0064]

[0065] Among them, I n (x, y) is the intensity function of the nth projection image, δ n is the time-varying phase shift of the nth projection image. Due to the intensity function in Formula 3, when determining the wrapping phase in S104, there is a There are four unknown quantities: σ(x, y), I′(x, y) and I″(x, y). Therefore, the intensity functions of at least four projection images are required. After solving them together, we get the wrapped phase

[0066] In S105, since the projection image provided by the embodiment of the present application is encoded through Formula 3, a space-variant phase shift is also added, so that the space-variant phase shift carries information on the phase series. Therefore, after the electronic device collects multiple projection images, the space-variant phase shift values ​​corresponding to the multiple projection images can be jointly determined based on the light intensity function of the projection image and the preset law of phase change, and then the phase series k(x, y) included in the space-variant phase shift value can be determined.

[0067] In some embodiments, when the electronic device calculates the space-variable phase shift value through S105, the method used is related to the number of phase shift steps N. Specifically, when N is an even number, the space-variable phase shift value σ(x, y) can be calculated by the following formula 6:

[0068]

[0069] When N is an odd number, the space-variable phase shift value σ(x, y) can be calculated by the following formula 7:

[0070]

[0071] in, is the symbolic function,

[0072] In some embodiments, after the space-variable phase shift value is calculated by Formula 6 or Formula 7, the phase order k(x, y) can be calculated according to the following Formula 8:

[0073]

[0074] Among them, Round() is the rounding function.

[0075] In summary, in the three-dimensional measurement method provided in the embodiment of the present application, in addition to adding a time-varying phase shift to the projection image projected onto the surface of the object to be detected, a space-varying phase shift related to the position in the projection image is also added, so that after receiving the reflection image, the electronic device can determine the phase series according to the phase change in the reflection image, and combined with the wrapped phase that can be determined from the reflection image, the real phase corresponding to the multiple reflection images can be obtained, and finally the three-dimensional information of the object surface is measured according to the real phase. In other words, in the embodiment of the present application, the electronic device only needs to determine multiple projection images of the same frequency, and after the acquisition device sends multiple projection images, the acquisition device collects multiple reflection images of a frequency, and the electronic device can measure the three-dimensional information of the object surface according to the multiple reflection images of a frequency.

[0076] Therefore, since the embodiment of the present application embeds the phase series into the space-varying phase shift of the image, it is different from FIG. Figure 3 In the prior art shown, multiple reflected images corresponding to multiple frequencies are required to obtain the phase through heterodyne processing. Compared with the conventional technology, the number of images required to be determined, emitted, collected and detected is less, and at least four images are needed to complete the detection, thereby reducing the number of images that need to be processed by the electronic device, the transmitting device and the collecting device during the entire three-dimensional automatic optical detection process, reducing the amount of calculation of the electronic device when performing three-dimensional optical detection, avoiding the large occupation of the computing resources of the electronic device, and improving the detection speed and efficiency due to the smaller number of processing. At the same time, it also reduces the requirements for the computing power of the electronic device, reduces the cost required for three-dimensional automatic optical detection, and makes the entire detection process more cost-effective. In addition, since the embodiment of the present application embeds the phase series into the spatial phase shift of the fringe image instead of the pixel intensity of the image, it can also retain the higher sinusoidal amplitude of the image to ensure the quality of the image.

[0077] It should be noted that it should be understood that in the three-dimensional measurement system described above in this embodiment, the division of each device / device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. For example, the transmitting device and the collecting device can be integrated into the electronic device. And these modules can all be implemented in the form of software calling through the processing element; they can also be implemented in the form of hardware; some modules can also be implemented in the form of software calling through the processing element, and some modules can be implemented in the form of hardware. It can be a separate processing element, or it can be integrated in a chip of the above-mentioned device. In addition, it can also be stored in the memory of the above-mentioned device in the form of program code, and called and executed by a processing element of the above-mentioned device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0078] For example, the above modules / units may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (digital signal processors, DSP), or one or more field programmable gate arrays (FPGA), etc. For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0079] In the above embodiment, in the three-dimensional measurement system, all or part of the method steps performed by the electronic device can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0080] The present application also provides an electronic device, including: a processor and a memory; wherein a computer program is stored in the memory, and when the processor executes the computer program, the processor can be used to execute any of the three-dimensional measurement methods in the aforementioned embodiments of the present application.

[0081] The present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed, it can be used to execute any of the three-dimensional measurement methods in the aforementioned embodiments of the present application.

[0082] An embodiment of the present application also provides a chip for executing instructions, wherein the chip is used to execute the three-dimensional measurement method executed by the electronic device in any of the aforementioned embodiments of the present application.

[0083] An embodiment of the present application also provides a program product, which includes a computer program. The computer program is stored in a storage medium. At least one processor can read the computer program from the storage medium. When the at least one processor executes the computer program, it can implement the three-dimensional measurement method performed by the electronic device in any of the aforementioned embodiments of the present application.

[0084] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0085] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A three-dimensional measurement method, characterized in that: include: Through visible light, a plurality of projection images are sequentially projected onto the surface of the object to be detected, wherein each projection image includes a plurality of sinusoidal fringes, the sinusoidal fringes of the plurality of projection images have the same frequency, and the phases corresponding to the plurality of sinusoidal fringes in each projection image are shifted according to a preset rule; Collecting a plurality of reflection images obtained after the light of the object to be detected is reflected by the plurality of projection images; Determining, according to the sinusoidal fringes of the plurality of reflected images, the wrapping phases corresponding to the plurality of reflected images; Determining the phase levels corresponding to the multiple reflected images according to the preset rule of sinusoidal fringe phase shift in the multiple reflected images; Determining three-dimensional information of the surface of the object to be detected according to the wrapped phase and the phase order; The determining, according to the preset rule of the sinusoidal fringe phase shift in the multiple reflected images, the phase levels corresponding to the multiple reflected images comprises: Determine, according to the light intensities of the multiple reflected images and the preset law of phase changes of the multiple reflected images, the spatial phase shift values ​​of the multiple projected images that are phase shifted according to the preset law; Determining the phase order corresponding to the plurality of projection images according to the spatially variable phase shift value and the frequency of the sinusoidal fringes in the plurality of reflected images; The determining, based on the light intensities of the multiple reflected images and the preset law of phase changes of the multiple reflected images, the spatial phase shift values ​​of the multiple projected images shifted according to the preset law comprises: When N is an even number, the formula Determining the space-variable phase shift value; When N is an odd number, the formula , determine the space-variable phase shift value, where, Represents the light intensity at the (x, y) pixel position in the nth projection image, n=0,1,...,2N-1, is the symbolic function, , is the time-varying phase shift of the nth projection image, and N is the number of phase shift steps.

2. The method according to claim 1, characterized in that The preset rule includes: performing phase shift processing on each sinusoidal fringe according to a shift value corresponding to a position of each sinusoidal fringe in the projection image.

3. The method according to claim 2, characterized in that The light intensity distribution function of the projected image is: in, is the light intensity bias value, is the sine amplitude, , 2N is the number of steps of the time-varying phase shift, and z(x, y) is the shift value of the (x, y) position in the projected image according to the preset rule.

4. The method according to claim 3, characterized in that Also includes: According to the formula Calculating the shift value of the (x, y) position in the projection image according to the preset rule; in, is a sign function. When n<N, , when n ≥ N, ; is the empty phase shift value, ; is the phase series, f is the frequency of the sinusoidal fringes, and R is the upper limit of the preset regular shift value.

5. The method according to claim 1, characterized in that The determining, according to the spatially variable phase shift value and the frequencies of the sinusoidal fringes in the multiple reflected images, the phase order corresponding to the multiple projected images comprises: according to , determine the phase order.

6. The method according to claim 5, characterized in that The step of determining the wrapping phases corresponding to the plurality of reflected images according to the sinusoidal fringes of the plurality of reflected images comprises: According to the formula Determine the package phase.

7. The method according to claim 6, characterized in that Determining the three-dimensional information of the surface of the object to be detected according to the wrapping phase and the phase order includes: According to the formula Determining the true phase of the surface of the object to be detected; According to the change of the real phase, the three-dimensional information of the surface of the object to be detected is determined.

8. A three-dimensional measurement system, characterized in that: include: An electronic device, a transmitting device and a collecting device, wherein the transmitting device and the collecting device are respectively connected to the electronic device; The electronic device is used to control the emitting device to sequentially project multiple projection images onto the surface of the object to be detected through visible light, wherein each projection image includes multiple sinusoidal fringes, the sinusoidal fringes of the multiple projection images have the same frequency, and the phases corresponding to the multiple sinusoidal fringes in each projection image are shifted according to a preset rule; The electronic device is further used to control the acquisition device to acquire multiple reflected images obtained after the light of the object to be detected is reflected by the multiple projection images; The electronic device is further used to determine the wrapping phases corresponding to the multiple reflected images according to the sinusoidal fringes of the multiple reflected images; determine the phase series corresponding to the multiple reflected images according to the preset law of the sinusoidal fringes phase shift in the multiple reflected images; and determine the three-dimensional information of the surface of the object to be detected according to the wrapping phase and the phase series; When the electronic device determines the phase levels corresponding to the multiple reflected images according to the preset rule of the sinusoidal fringes phase shift in the multiple reflected images, it is specifically used to: Determine, according to the light intensities of the multiple reflected images and the preset law of phase changes of the multiple reflected images, the spatial phase shift values ​​of the multiple projected images that are phase shifted according to the preset law; Determining the phase order corresponding to the plurality of projection images according to the spatially variable phase shift value and the frequency of the sinusoidal fringes in the plurality of reflected images; When the electronic device determines, according to the light intensities of the multiple reflected images and the preset law of phase changes of the multiple reflected images, the spatial phase shift values ​​of the multiple projected images shifted according to the preset law, the electronic device is specifically used to: When N is an even number, the formula Determining the space-variable phase shift value; When N is an odd number, the formula , determine the space-variable phase shift value, where, Represents the light intensity at the (x, y) pixel position in the nth projection image, n=0,1,...,2N-1, is the symbolic function, , is the time-varying phase shift of the nth projection image, and N is the number of phase shift steps.

Citation Information

Patent Citations

  • Three-dimensional reconstruction method based on four-step phase shift coding type surface structured light

    CN110174079A

  • Method and device for analysing phase distribution of fringe image using high-dimensional intensity information, and program for the same

    US20150049331A1