Phase shift stripe coding and decoding method
Through adaptive adjustment of phase-shift fringe measurement equipment group parameters and decomposition and coding technology, the contradiction between phase-shift fringe continuity and anti-interference ability is solved, the three-dimensional reconstruction accuracy and equipment configuration requirements are improved, and efficient and economical technological innovation is achieved.
Patent Information
- Application Number
- CN202510608487.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-05-13
AI Technical Summary
In the prior art, the continuity of phase shift fringes is inconsistent with anti-interference ability, resulting in low-frequency long-period fringes being sensitive to disturbances and affecting decoding accuracy. High-frequency phase shift fringes are susceptible to adjacent pixels at peaks and valleys, reducing the resolution accuracy, and lacking effective solutions, limiting the three-dimensional reconstruction accuracy.
The phase-shift fringe measurement device group parameters are adaptively adjusted through the intelligent realm parameter adjustment algorithm, and the phase-shift fringe image is collected, and the optimized image is verified through intelligent inspection and optimization technology to generate a phase-shift fringe image set. Then, the image is decomposed into decomposed sub-fringes by using phase shift fringe decomposition encoding technology, the self-calibration correction value is calculated, and the original phase shift fringe image is restored through the decomposition fringe reconstruction technology, and finally the modulated phase value is calculated through the phase shift fringe decoding technology for three-dimensional reconstruction.
It improves the phase shift stripe decoding accuracy and three-dimensional reconstruction quality, reduces equipment configuration requirements, saves costs, and brings efficient and economical technological innovation to the field of industrial automation three-dimensional reconstruction.
Smart Images

Figure CN120125759A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of phase-shifting fringe, and particularly to a method for encoding and decoding phase-shifting fringes. Background Art
[0002] In the three-dimensional reconstruction technology in the field of industrial automation, the encoding and decoding scheme based on phase-shifting fringes is widely used due to its advantages of sub-pixel level pixel encoding and high decoding accuracy. Common encoding methods for single-frequency phase-shift reconstruction include three-step and four-step phase-shifting, etc. Multi-frequency multi-step phase-shifting such as three-frequency four-step phase-shifting can encode the entire projection space, and high-frequency and short-period phase-shifting fringes are crucial for improving the accuracy of three-dimensional reconstruction.
[0003] However, the existing technology has obvious defects. First, there is a contradiction between the continuity and anti-interference ability of phase-shifting fringes. Although the low-frequency long-period fringes with strong continuity are beneficial for encoding, they are sensitive to perturbations, and slight interference will seriously affect the decoding accuracy. Currently, it can only rely on improving the resolution of the camera or optomechanical device to cope with it. Second, although the high-frequency phase-shifting fringes are robust to perturbations, due to the characteristics of camera image acquisition, they are easily affected by adjacent pixels at the peak and valley values, resulting in abnormal gray values, thereby reducing the phase-unwrapping accuracy, and there is no effective solution yet. Restricted by the above problems, it is difficult for the three-dimensional reconstruction system to use high-quality high-frequency fringes to improve the accuracy, and it can only rely on increasing the device resolution, resulting in technical bottlenecks and cost limitations. Summary of the Invention
[0004] The present invention provides a method for encoding and decoding phase-shifting fringes, including: Step S1, adaptively adjusting the parameters of the phase-shifting fringe measurement device group according to the measurement task through the intelligent environment parameter adjustment algorithm, and collecting phase-shifting fringe images; Step S2, verifying and optimizing the phase-shifting fringe images by calculating the quality intelligent inspection value through the intelligent inspection and optimal acquisition technology to generate a set of phase-shifting fringe images; Step S3, decomposing each phase-shifting fringe image in the set of phase-shifting fringe images through the phase-shifting fringe decomposition and encoding technology to generate decomposed sub-fringes; Step S4, calculating the self-calibration correction value according to the decomposed sub-fringes and restoring the original phase-shifting fringe image through the decomposed fringe reconstruction technology; Step S5, calculating the modulation phase value according to the original phase-shifting fringe image through the phase-shifting fringe decoding technology for three-dimensional reconstruction.
[0005] The method for encoding and decoding phase-shifting fringes as described above, wherein adaptively adjusting the parameters of the phase-shifting fringe measurement device group according to the measurement task through the intelligent environment parameter adjustment algorithm and collecting phase-shifting fringe images includes the following sub-steps: Step S11, analyzing the measurement task to obtain the key measurement parameters; Step S12: Adaptively adjust the parameters of the phase-shift fringe measurement device group according to the measured key parameters through the intelligent environment parameter adjustment algorithm; Step S13: Sequentially collect phase-shift fringe images through the phase-shift fringe measurement device group.
[0006] A method for encoding and decoding phase-shift fringes as described above, wherein each phase-shift fringe image in the phase-shift fringe image set is decomposed through the phase-shift fringe decomposition encoding technology to generate decomposed sub-fringes, including the following sub-steps: Step S31: Analyze the phase-shift fringe image set to obtain detailed information of the phase-shift fringes; Step S32: Decompose each phase-shift fringe image in the phase-shift fringe image set through the phase-shift fringe decomposition encoding technology according to the detailed information of the phase-shift fringes to generate decomposed sub-fringes.
[0007] A method for encoding and decoding phase-shift fringes as described above, wherein the original phase-shift fringe image is restored through the decomposed fringe reconstruction technology according to the decomposed sub-fringes, including the following sub-steps: Step S41: Obtain the decomposed sub-fringe image through the phase-shift fringe measurement device group according to the decomposed sub-fringes; Step S42: Calculate the self-calibration correction value through the fringe self-calibration correction algorithm according to the decomposed sub-fringe image; Step S43: Restore the original phase-shift fringe image through the decomposition reconstruction algorithm according to the decomposed sub-fringe image and the self-calibration correction value.
[0008] A method for encoding and decoding phase-shift fringes as described above, wherein the modulation phase value is calculated through the phase-shift fringe decoding technology according to the original phase-shift fringe image for three-dimensional reconstruction, including the following sub-steps: Step S51: Calculate the modulation phase value through the phase-shift fringe decoding technology according to the original phase-shift fringe image; Step S52: Perform three-dimensional reconstruction through the phase unwrapping technology according to the modulation phase value.
[0009] The present invention also provides a phase-shift fringe encoding and decoding system, including: An image acquisition module, which adaptively adjusts the parameters of the phase-shift fringe measurement device group according to the measurement task through the intelligent environment parameter adjustment algorithm and acquires phase-shift fringe images; An image intelligent inspection and optimal acquisition module, which calculates the quality intelligent inspection value through the intelligent inspection and optimal acquisition technology to verify and optimize the phase-shift fringe images and generates a phase-shift fringe image set; A fringe decomposition module, which decomposes each phase-shift fringe image in the phase-shift fringe image set through the phase-shift fringe decomposition encoding technology to generate decomposed sub-fringes; An image restoration module, which calculates the self-calibration correction value according to the decomposed sub-fringes and restores the original phase-shift fringe image through the decomposed fringe reconstruction technology; A three-dimensional reconstruction module calculates modulation phase values through phase-shifted fringe decoding technology based on the original phase-shifted fringe images for three-dimensional reconstruction.
[0010] A coding and decoding system for phase-shifted fringes as described above, wherein the image acquisition module specifically includes: A task analysis sub-module analyzes the measurement task to obtain key measurement parameters; A device parameter adaptive adjustment sub-module adaptively adjusts the parameters of the phase-shifted fringe measurement device group according to the key measurement parameters through the intelligent environment parameter adjustment algorithm; An image acquisition sub-module sequentially acquires phase-shifted fringe images through the phase-shifted fringe measurement device group.
[0011] A coding and decoding system for phase-shifted fringes as described above, wherein the fringe decomposition module specifically includes: An image analysis sub-module analyzes the set of phase-shifted fringe images to obtain detailed information about the phase-shifted fringes; A sub-fringe decomposition and acquisition sub-module decomposes each phase-shifted fringe image in the set of phase-shifted fringe images through phase-shifted fringe decomposition coding technology according to the detailed information about the phase-shifted fringes to generate decomposed sub-fringes.
[0012] A coding and decoding system for phase-shifted fringes as described above, wherein the image restoration module specifically includes: A decomposed sub-fringe image acquisition sub-module obtains decomposed sub-fringe images through the phase-shifted fringe measurement device group according to the decomposed sub-fringes; A self-calibration correction value acquisition sub-module calculates self-calibration correction values through a fringe self-calibration correction algorithm according to the decomposed sub-fringe images; A phase-shifted fringe image restoration sub-module restores the original phase-shifted fringe images through a decomposition and reconstruction algorithm according to the decomposed sub-fringe images and the self-calibration correction values.
[0013] A coding and decoding system for phase-shifted fringes as described above, wherein the three-dimensional reconstruction module specifically includes: A modulation phase value acquisition sub-module calculates modulation phase values through phase-shifted fringe decoding technology based on the original phase-shifted fringe images; A three-dimensional reconstruction sub-module performs three-dimensional reconstruction through phase unwrapping technology according to the modulation phase values.
[0014] The beneficial effects achieved by the present invention are as follows: The present invention can improve the decoding stability and accuracy through phase-shifted fringe coding and decoding technology according to the core factors affecting the accuracy of phase-shifted fringes, thereby greatly improving the decoding accuracy of phase-shifted fringes and the quality of three-dimensional reconstruction, reducing the equipment configuration requirements, effectively saving costs, bringing efficient and economical technological innovation to the field of industrial automation three-dimensional reconstruction, and having significant application advantages and broad market prospects. Brief Description of the Drawings
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.
[0016] Figure 1 It is a flowchart of a method for encoding and decoding phase-shifted fringes provided in the first embodiment of the present application; Figure 2 It is a schematic diagram of a system for encoding and decoding phase-shifted fringes provided in the second embodiment of the present application. Detailed Embodiments
[0017] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0018] Embodiment 1 As Figure 1 shown, the first embodiment of the present application provides a method for encoding and decoding phase-shifted fringes, and the method includes the following steps: Step S1: Adaptively adjust the parameters of the phase-shifted fringe measurement device group according to the measurement task through the intelligent environment parameter adjustment algorithm, and collect phase-shifted fringe images; Further, adaptively adjusting the parameters of the phase-shifted fringe measurement device group according to the measurement task through the intelligent environment parameter adjustment algorithm and collecting phase-shifted fringe images includes the following sub-steps: Step S11: Analyze the measurement task to obtain key measurement parameters; Specifically, the key measurement parameters include but are not limited to measurement accuracy requirement parameters, measurement object surface feature parameters, measurement range parameters, measurement environment parameters, step size and frequency of phase-shifted fringes.
[0019] Step S12: Adaptively adjust the parameters of the phase-shifted fringe measurement device group according to the key measurement parameters through the intelligent environment parameter adjustment algorithm; Specifically, the phase-shifted fringe measurement device group includes a projector, a 2D camera, and an intelligent fill light device.
[0020] The specific implementation method of the intelligent environment parameter adjustment algorithm is as follows: Collect ambient light data in real time through an ambient light sensor, and calculate the real-time light balance adjustment value of the intelligent fill light device through the intelligent light balance adjustment formula where is the light balance adjustment value, is the minimum light adjustment intensity of the intelligent fill light device, is the maximum light adjustment intensity of the intelligent fill light device, is the ambient light intensity collected by the ambient light sensor, is the minimum light intensity of the environment for collecting the phase-shifted fringe image projection, is the maximum light intensity of the environment for collecting the phase-shifted fringe image projection, is the light balance adjustment factor. The intelligent fill light device adjusts the fill light brightness, angle, and color in real time according to the light balance adjustment value The intelligent fill light device adjusts the light intensity of the image projection acquisition environment according to the light balance adjustment value Adjust the light intensity of the image projection acquisition environment.
[0021] According to the light balance adjustment value and the measured key parameters, calculate the intelligent environment parameter adjustment value in real time through the intelligent environment parameter adjustment formula where, is the intelligent environment parameter adjustment value, is the 2D camera parameter adjustment coefficient, is the number of 2D camera parameters to be adjusted, The value range of is is the th 2D camera parameter value to be adjusted, is the light balance adjustment value is the adjustment factor for the th 2D camera parameter to be adjusted, is the adjustment weight of the measured key parameter for the th 2D camera parameter to be adjusted, is the number of measured key parameters for adjusting the th 2D camera parameter to be adjusted, The value range of is is the th sub-adjustment weight of the th measured key parameter for adjusting the th 2D camera parameter to be adjusted, is the th measured key parameter value for adjusting the is the th adjustment factor of the th measured key parameter for adjusting the is the projector parameter adjustment coefficient, is the number of projector parameters to be adjusted, The value range of , is the parameter value to be adjusted for the th projector, is the light balance adjustment value For the th projector, the adjustment factor of the parameter to be adjusted, is the adjustment weight for measuring the key parameter of the parameter to be adjusted for the th projector, For the th projector, the number of key measurement parameters for adjusting the parameter to be adjusted, The value range of , is the sub - adjustment weight of the th key measurement parameter for adjusting the parameter to be adjusted for the th projector, is the value of the th key measurement parameter for adjusting the parameter to be adjusted for the th projector, For the th projector, the adjustment factor of the th key measurement parameter for adjusting the parameter to be adjusted.
[0022] The parameters to be adjusted for the 2D camera include but are not limited to exposure time, gain, and aperture. The parameters to be adjusted for the projector include but are not limited to projection brightness, fringe frequency, and phase - shift step length.
[0023] According to the intelligent environment parameter adjustment value , projector parameters, and 2D camera parameters and their adjustable ranges, an adaptive parameter - adjustment model is trained through machine - learning technology so that it can output the adjustment parameters of the projector and 2D camera in real - time according to the real - time input intelligent environment parameter adjustment value, and the projector and 2D camera adaptively adjust their operating parameters according to the adjustment parameters.
[0024] Step S13: Sequentially collect phase - shift fringe images through the phase - shift fringe measurement device group; Specifically, the projector projects the pattern of the phase - shift fringe onto the surface of the measured object precisely in sequence, and the 2D camera synchronously collects the phase - shift fringe images with object topography information in sequence. During the image projection and collection, the operating parameters of the phase - shift fringe measurement device group are adjusted in real - time through the intelligent environment parameter adjustment algorithm to ensure that the projection and collection parameters of each phase - shift fringe image are the same.
[0025] Step S2: Calculate the quality intelligent inspection value through the intelligent inspection and optimal acquisition technology to verify and optimize the phase - shift fringe images, and generate a set of phase - shift fringe images; Specifically, the specific implementation method of the intelligent inspection and high-quality acquisition technology is to calculate the quality inspection value of each phase-shifted fringe image through the phase-shifted fringe intelligent inspection formula, set the quality verification threshold according to the measurement task, compare the quality inspection value of each phase-shifted fringe image with the quality verification threshold, determine whether the acquired phase-shifted fringe image meets the image acquisition requirements of the measurement task, regard the phase-shifted fringe image that meets the image acquisition requirements as a high-quality phase-shifted fringe image, re-project and acquire the phase-shifted fringe image that does not meet the image acquisition requirements through the phase-shifted fringe measurement device group and verify it through the phase-shifted fringe intelligent inspection formula to finally make it a high-quality phase-shifted fringe image, and construct a phase-shifted fringe image set according to the high-quality phase-shifted fringe images.
[0026] Furthermore, the expression of the phase-shifted fringe intelligent inspection formula is as follows: Wherein, is the quality inspection value, is the number of sub-image regions of the phase-shifted fringe image, is the contrast quality verification weight coefficient, is the th sub-image region's contrast quality verification sub-weight coefficient, is the th sub-image region's contrast value, is the th sub-image region's contrast quality verification scoring factor, is the sharpness quality verification weight coefficient, is the th sub-image region's sharpness quality verification sub-weight coefficient, is the th sub-image region's sharpness value, is the th sub-image region's sharpness quality verification scoring factor, is the uniformity quality verification weight coefficient, is the th sub-image region's uniformity quality verification sub-weight coefficient, is the th sub-image region's uniformity value, is the th sub-image region's uniformity quality verification scoring factor, is the noise quality verification weight coefficient, is the th sub-image region's noise quality verification sub-weight coefficient, is the th sub-image region's noise value, is the th sub-image region's noise quality verification scoring factor.
[0027] Step S3: Decompose each phase-shifted fringe image in the set of phase-shifted fringe images through the phase-shifted fringe decomposition and encoding technique to generate decomposed sub-fringes; Furthermore, decomposing each phase-shifted fringe image in the set of phase-shifted fringe images through the phase-shifted fringe decomposition and encoding technique to generate decomposed sub-fringes includes the following sub-steps: Step S31: Analyze the set of phase-shifted fringe images to obtain detailed information about the phase-shifted fringes; Specifically, the detailed information about the phase-shifted fringes includes the projection fringe period, fringe pixel position information, gray value difference between adjacent pixels, consistency of gray value changes of adjacent multiple pixels, light intensity information, etc. of each phase-shifted fringe image, providing a data basis for subsequent operations.
[0028] Step S32: Decompose each phase-shifted fringe image in the set of phase-shifted fringe images according to the detailed information about the phase-shifted fringes through the phase-shifted fringe decomposition and encoding technique to generate decomposed sub-fringes; Specifically, the specific implementation method of the phase-shifted fringe decomposition and encoding technique is to determine the positions of wave peaks and wave valleys and the number of decomposed sub-fringes in the phase-shifted fringe image based on the gray value difference between adjacent pixels and the consistency of gray value changes of adjacent multiple pixels, set the wave peak value or wave valley value maintaining one or more periods on the other side of the wave peak or wave valley according to the actual requirements of the measurement task, set the decomposition judgment conditions of each phase-shifted fringe image according to the projection fringe period, pixel position information, and light intensity value, and determine the combination method of light intensity components, and decompose each phase-shifted fringe image through the decomposition and encoding algorithm of the phase-shifted fringe encoding technique to generate U*G decomposed sub-fringes, where U is the number of phase-shifted fringe images, and G is the number of decomposed sub-fringes after decomposition of each phase-shifted fringe image.
[0029] The specific implementation method of the decomposition and encoding algorithm is as follows: Construct a decomposition and encoding formula based on the gray value difference between adjacent pixels and the consistency of gray value changes of adjacent multiple pixels , where, is the th decomposed sub-fringe of the th phase-shifted fringe image, is the light intensity value of the th phase-shifted fringe image at the pixel point , is an extreme value detection function, is the th decomposed sub-fringe range selection function of the th phase-shifted fringe image, is the th decomposed sub-fringe period constraint function of the th phase-shifted fringe image.
[0030] Extreme value detection function where 1 represents a pixel point is an extreme point, 0 represents a pixel point is not an extreme point is the gray - level gradient is the minimum integer (used to exclude non - extreme regions) is a pixel point is the local offset of the pixel point is a pixel point is the local neighborhood of the pixel point represents a peak represents a trough represents the th phase - shifted fringe image at the pixel point whose intensity value is the maximum in the local neighborhood, marked as a peak represents the th phase - shifted fringe image at the pixel point whose intensity value is the minimum in the local neighborhood, marked as a trough
[0031] The th phase - shifted fringe image's th decomposed sub - fringe range selection function where represents the phase value at the pixel point (the value range is ) represents the number of decomposed sub - fringes of the th phase - shifted fringe image represents the th phase - shifted fringe image's th decomposed sub - fringe, 1 means the phase belongs to the th phase - shifted fringe image's th decomposed sub - fringe, 0 means the phase does not belong to the th phase - shifted fringe image's th decomposed sub - fringe
[0032] The th phase - shifted fringe image's th decomposed sub - fringe period constraint function where represents the phase value at the pixel point (the value range is ) is the extreme value flag ( the flag is a peak the flag is a trough) is the number of cycles to be retained, represents the number of decomposed sub - fringes of the th phase - shifted fringe image. 1 indicates that the cycle constraint condition is satisfied, and 0 indicates that the cycle constraint condition is not satisfied.
[0033] Each phase - shifted fringe image is decomposed through the decomposition encoding formula, and the decomposed sub - fringes are output through the formula. The decomposed sub - fringes are put into a set, where represents the set of decomposed sub - fringes, represents the th decomposed sub - fringe of the
[0034] th phase - shifted fringe image. U is the number of phase - shifted fringe images, and G is the number of decomposed sub - fringes after decomposition of each phase - shifted fringe image. Furthermore, restoring the original phase - shifted fringe image according to the decomposed sub - fringes through the fringe reconstruction technology includes the following sub - steps: Step S41: Obtain the decomposed sub - fringe images according to the decomposed sub - fringes through the phase - shifted fringe measurement device group; Specifically, the projector projects the patterns of the decomposed sub - fringes onto the surface of the measured object in sequence, and the 2D camera synchronously collects the decomposed sub - fringe images in turn.
[0035] Step S42: Calculate the self - calibration correction value according to the decomposed sub - fringe images through the fringe self - calibration correction algorithm; Specifically, extract the fringe characteristics according to the decomposed sub - fringe images, and calculate the self - calibration correction value of each phase - shifted fringe image according to the characteristics of the phase - shifted fringe measurement device group, fringe characteristics, measured object characteristics, and measurement environment by adjusting the calibration adjustment algorithm , where is the self - calibration correction value, is the weight coefficient of the influence of the characteristics of the phase - shifted fringe measurement device group on the measurement accuracy, is the number of the influence of the characteristics of the phase - shifted fringe measurement device group on the measurement accuracy, is the th sub - weight coefficient of the influence of the th characteristic of the phase - shifted fringe measurement device group on the measurement accuracy, is the error influence value of the th characteristic of the phase - shifted fringe measurement device group on the measurement accuracy, is the weight coefficient of the influence of fringe characteristics on the measurement accuracy, is the number of the influence of fringe characteristics on the measurement accuracy, is the th sub - weight coefficient of the influence of the is the error influence value of the th stripe characteristic on the measurement accuracy, is the weight coefficient of the influence of the measured object characteristic on the measurement accuracy, is the quantity of the influence of the measured object characteristic on the measurement accuracy, is the th sub - weight coefficient of the influence of the th measured object characteristic on the measurement accuracy, is the error influence value of the th measured object characteristic on the measurement accuracy, is the weight coefficient of the influence of the measurement environment on the measurement accuracy, is the quantity of the influence of the measurement environment on the measurement accuracy, is the th sub - weight coefficient of the influence of the th measurement environment on the measurement accuracy,
[0036] Step S43: Restore the original phase - shifted fringe image through the decomposition and reconstruction algorithm according to the decomposed sub - fringe image and the self - calibration correction value; Specifically, restore the original phase - shifted fringe image through the decomposition and reconstruction algorithm according to the decomposed sub - fringe image and the self - calibration correction value, where is the restored original phase - shifted fringe image, is the number of images to be restored, The value range of is , is the number of decomposed sub - fringe images of the th image to be restored, is the th th decomposed sub - fringe image of the th image to be restored, is the self - calibration correction value of the
[0037] Step S5: Calculate the modulation phase value according to the original phase - shifted fringe image through the phase - shifted fringe decoding technique and perform 3D reconstruction; Furthermore, calculating the modulation phase value according to the original phase - shifted fringe image through the phase - shifted fringe decoding technique and performing 3D reconstruction includes the following sub - steps: Step S51: Calculate the modulation phase value according to the original phase - shifted fringe image through the phase - shifted fringe decoding technique; Specifically, calculate the modulation phase value according to the original phase - shifted fringe image through the phase - shifted fringe decoding formula , where is the modulation phase value, is the number of original phase-shifted fringe images, The value range of , is the light intensity of the th original phase-shifted fringe image, is the phase shift amount of the th original phase-shifted fringe image.
[0038] Step S52: Perform three-dimensional reconstruction according to the modulated phase value through the phase unwrapping technique; Specifically, the modulated phase value obtained by the arctangent function has a periodic phase wrapping phenomenon, resulting in a discontinuous stepped phase distribution. Through the phase unwrapping technique, the wrapped modulated phase value is unwrapped, and the truncated wrapped phase is restored to a continuous phase distribution reflecting the actual physical quantity change. A phase-three-dimensional coordinate mapping relationship is established to convert the phase value of each point into three-dimensional coordinates, and a three-dimensional model that meets the requirements is constructed.
[0039] Embodiment 2 As Figure 2 shown, Embodiment 2 of the present application provides a phase-shifted fringe encoding and decoding system, including: An image acquisition module 21, which adaptively adjusts the parameters of the phase-shifted fringe measurement device group according to the measurement task through the intelligent environment parameter adjustment algorithm, and acquires phase-shifted fringe images; Furthermore, the image acquisition module 21 includes the following sub-modules: A task analysis sub-module, which analyzes the measurement task to obtain key measurement parameters; Specifically, the key measurement parameters include but are not limited to the measurement accuracy requirement parameters, the surface feature parameters of the measured object, the measurement range parameters, the measurement environment parameters, the step length and frequency of the phase-shifted fringes.
[0040] A device parameter adaptive adjustment sub-module, which adaptively adjusts the parameters of the phase-shifted fringe measurement device group according to the key measurement parameters through the intelligent environment parameter adjustment algorithm; Specifically, the phase-shifted fringe measurement device group includes a projector, a 2D camera, and an intelligent fill light device.
[0041] The specific implementation method of the intelligent environment parameter adjustment algorithm is as follows: The ambient light data is collected in real time through an ambient light sensor, and the real-time light balance adjustment value of the intelligent fill light device is calculated through the intelligent light balance adjustment formula , where is the light balance adjustment value, is the minimum light adjustment intensity of the intelligent fill light device, is the maximum light adjustment intensity of the intelligent fill light device, is the ambient light intensity collected by the ambient light sensor, is the minimum light intensity of the phase-shift fringe image projection acquisition environment, is the maximum light intensity of the phase-shift fringe image projection acquisition environment, is the light balance adjustment factor, and the intelligent light compensation device adjusts the light compensation brightness, angle, and color in real time according to the light balance adjustment value The intelligent light compensation device adjusts the light intensity of the image projection acquisition environment according to the light balance adjustment value Adjust the light intensity of the image projection acquisition environment.
[0042] According to the light balance adjustment value and the measured key parameters, calculate the intelligent environment parameter adjustment value in real time through the intelligent environment parameter adjustment formula where, is the intelligent environment parameter adjustment value, is the 2D camera parameter adjustment coefficient, is the number of 2D camera parameters to be adjusted, The value range of is is the th 2D camera parameter value to be adjusted, is the light balance adjustment value for the th adjustment factor of the 2D camera parameter to be adjusted, is the adjustment weight of the measured key parameter for the th 2D camera parameter to be adjusted, is for the th number of measured key parameters for adjusting the 2D camera parameter to be adjusted, The value range of is is for the th th sub-adjustment weight of the measured key parameter for adjusting the 2D camera parameter to be adjusted, is for the th th measured key parameter value for adjusting the 2D camera parameter to be adjusted, is for the th th adjustment factor of the measured key parameter for adjusting the 2D camera parameter to be adjusted, is the projector parameter adjustment coefficient, is the number of projector parameters to be adjusted, The value range of is is the th projector parameter value to be adjusted, is the light balance adjustment value for the Adjustment factors for parameters to be adjusted for a projector For measuring the key parameters for the Adjustment weights for parameters to be adjusted for a projector For the Number of key measurement parameters for adjusting the parameters to be adjusted for a projector The value range of is For the Sub-adjustment weights for the th key measurement parameter for adjusting the parameters to be adjusted for a projector For the th key measurement parameter value for adjusting the parameters to be adjusted for a projector For the th key measurement parameter for adjusting the parameters to be adjusted for a projector th key measurement parameter for adjusting the parameters to be adjusted for a projector Adjustment factors for the
[0043] The parameters to be adjusted for the 2D camera include but are not limited to exposure time, gain, and aperture. The parameters to be adjusted for the projector include but are not limited to projection brightness, fringe frequency, and phase shift step size.
[0044] According to the intelligent environment parameter adjustment value , projector parameters, and 2D camera parameters and their adjustable ranges, an adaptive parameter adjustment model is trained through machine learning technology so that it can output the adjustment parameters of the projector and 2D camera in real time according to the real-time input intelligent environment parameter adjustment value, and the projector and 2D camera adaptively adjust their operating parameters according to the adjustment parameters.
[0045] Image acquisition sub-module, which sequentially acquires phase-shifted fringe images through a group of phase-shift fringe measurement devices Specifically, the projector projects the patterns of phase-shifted fringes onto the surface of the measurement object in sequence, and the 2D camera synchronously acquires the phase-shifted fringe images with object morphology information in sequence. During image projection and acquisition, the operating parameters of the group of phase-shift fringe measurement devices are adjusted in real time through the intelligent environment parameter adjustment algorithm to ensure that the projection and acquisition parameters of each phase-shifted fringe image are the same.
[0046] Image intelligent inspection and optimal acquisition module 22, which calculates the quality intelligent inspection value through intelligent inspection and optimal acquisition technology to verify and optimize the phase-shifted fringe images and generates a set of phase-shifted fringe images Specifically, the specific implementation method of the intelligent inspection and high-quality acquisition technology is to calculate the quality inspection value of each phase-shifted fringe image through the phase-shifted fringe intelligent inspection formula, set the quality verification threshold according to the measurement task, compare the quality inspection value of each phase-shifted fringe image with the quality verification threshold, determine whether the acquired phase-shifted fringe image meets the image acquisition requirements of the measurement task, regard the phase-shifted fringe image that meets the image acquisition requirements as a high-quality phase-shifted fringe image, re-project and acquire the phase-shifted fringe image that does not meet the image acquisition requirements through the phase-shifted fringe measurement device group and verify it through the phase-shifted fringe intelligent inspection formula to finally make it a high-quality phase-shifted fringe image, and construct a phase-shifted fringe image set according to the high-quality phase-shifted fringe images.
[0047] Further, the expression of the phase-shifted fringe intelligent inspection formula is as follows: Among them, is the quality inspection value, is the number of sub-image regions of the phase-shifted fringe image, is the contrast quality verification weight coefficient, is the th sub-contrast quality verification sub-weight coefficient of the sub-image region, is the th contrast value of the sub-image region, is the th contrast quality verification scoring factor of the sub-image region, is the sharpness quality verification weight coefficient, is the th sharpness quality verification sub-weight coefficient of the sub-image region, is the th sharpness value of the sub-image region, is the th sharpness quality verification scoring factor of the sub-image region, is the uniformity quality verification weight coefficient, is the th uniformity quality verification sub-weight coefficient of the sub-image region, is the th uniformity value of the sub-image region, is the th uniformity quality verification scoring factor of the sub-image region, is the noise quality verification weight coefficient, is the th noise quality verification sub-weight coefficient of the sub-image region, is the th noise value of the sub-image region, is the th noise quality verification scoring factor of the sub-image region.
[0048] The fringe decomposition module 23 decomposes each phase-shifted fringe image in the set of phase-shifted fringe images through phase-shifted fringe decomposition encoding technology to generate decomposed sub-fringes; Further, the fringe decomposition module 23 includes the following sub-modules: The image analysis sub-module analyzes the set of phase-shifted fringe images to obtain detailed information about the phase-shifted fringes; Specifically, the detailed information about the phase-shifted fringes includes the projected fringe period, fringe pixel position information, gray value difference between adjacent pixels, consistency of gray value changes of adjacent multiple pixels, light intensity information, etc. of each phase-shifted fringe image, providing a data basis for subsequent operations.
[0049] The decomposed sub-fringe obtaining sub-module decomposes each phase-shifted fringe image in the set of phase-shifted fringe images through phase-shifted fringe decomposition encoding technology according to the detailed information about the phase-shifted fringes to generate decomposed sub-fringes; Specifically, the specific implementation method of the phase-shifted fringe decomposition encoding technology is to determine the positions of peaks and valleys and the number of decomposed sub-fringes in the phase-shifted fringe image based on the gray value difference between adjacent pixels and the consistency of gray value changes of adjacent multiple pixels, set to maintain the peak value or valley value of one or more periods on the other side of the peak or valley according to the actual requirements of the measurement task, set the decomposition judgment conditions for each phase-shifted fringe image according to the projected fringe period, pixel position information and light intensity value, and determine the combination method of light intensity components, and decompose each phase-shifted fringe image through the decomposition encoding algorithm of the phase-shifted fringe encoding technology to generate U*G decomposed sub-fringes, where U is the number of phase-shifted fringe images and G is the number of decomposed sub-fringes after decomposition of each phase-shifted fringe image.
[0050] The specific implementation method of the decomposition encoding algorithm is as follows: Construct a decomposition encoding formula based on the gray value difference between adjacent pixels and the consistency of gray value changes of adjacent multiple pixels , where, is the th decomposed sub-fringe of the th phase-shifted fringe image, is the light intensity value of the th phase-shifted fringe image at the pixel point , is the extreme value detection function, is the th decomposed sub-fringe range selection function of the th phase-shifted fringe image, is the th decomposed sub-fringe period constraint function of the th phase-shifted fringe image.
[0051] Extreme value detection function , where 1 represents a pixel point is an extreme point, and 0 represents a pixel point is not an extreme point is the gray-scale gradient is the minimum integer (used to exclude non-extreme regions) is the pixel point 's local offset is the pixel point 's local neighborhood represents a peak represents a trough represents the th phase-shifted fringe image's light intensity value at the pixel point is the maximum value within the local neighborhood and is marked as a peak represents the th phase-shifted fringe image's light intensity value at the pixel point is the minimum value within the local neighborhood and is marked as a trough
[0052] The th phase-shifted fringe image's th decomposed sub-fringe range selection function , where represents the phase value at the pixel point (the value range is ), represents the number of decomposed sub-fringes of the th phase-shifted fringe image represents the th phase-shifted fringe image's th decomposed sub-fringe. 1 means the phase belongs to the th phase-shifted fringe image's th decomposed sub-fringe, and 0 means the phase does not belong to the th phase-shifted fringe image's th decomposed sub-fringe
[0053] The th phase-shifted fringe image's th decomposed sub-fringe period constraint function , where represents the phase value at the pixel point (the value range is ), is the extreme value flag ( the flag is a peak the flag is a trough), is the number of periods to be retained represents the The number of decomposed sub - fringes of the phase - shifted fringe image. 1 indicates that the period constraint condition is satisfied, and 0 indicates that the period constraint condition is not satisfied.
[0054] Each phase - shifted fringe image is decomposed through the decomposition coding formula, and the decomposed sub - fringes are output through the formula The decomposed sub - fringes are put into a set, where represents the set of decomposed sub - fringes, represents the th decomposed sub - fringe of the th phase - shifted fringe image. U is the number of phase - shifted fringe images, and G is the number of decomposed sub - fringes after decomposition of each phase - shifted fringe image.
[0055] The image restoration module 24 calculates the self - calibration correction value according to the decomposed sub - fringes and restores the original phase - shifted fringe image through the decomposed fringe reconstruction technology; Furthermore, the image restoration module 24 includes the following sub - modules: The decomposed sub - fringe image acquisition sub - module acquires the decomposed sub - fringe images according to the decomposed sub - fringes through the phase - shifted fringe measurement device group; Specifically, the projector projects the patterns of the decomposed sub - fringes onto the surface of the measured object in sequence, and the 2D camera synchronously acquires the decomposed sub - fringe images one by one.
[0056] The self - calibration correction value acquisition sub - module calculates the self - calibration correction value according to the decomposed sub - fringe images through the fringe self - calibration correction algorithm; Specifically, the fringe characteristics are extracted from the decomposed sub - fringe images, and the self - calibration correction value of each phase - shifted fringe image is calculated by adjusting the calibration adjustment algorithm according to the characteristics of the phase - shifted fringe measurement device group, fringe characteristics, measured object characteristics, and measurement environment. Among them, is the self - calibration correction value, is the weight coefficient of the influence of the characteristics of the phase - shifted fringe measurement device group on the measurement accuracy, is the number of the influence of the characteristics of the phase - shifted fringe measurement device group on the measurement accuracy, is the sub - weight coefficient of the influence of the th characteristic of the phase - shifted fringe measurement device group on the measurement accuracy, is the error influence value of the influence of the th characteristic of the phase - shifted fringe measurement device group on the measurement accuracy, is the weight coefficient of the influence of the fringe characteristics on the measurement accuracy, is the number of the influence of the fringe characteristics on the measurement accuracy, is the sub - weight coefficient of the influence of the th fringe characteristic on the measurement accuracy, is the sub - weight coefficient of the influence of the th fringe characteristic on the measurement accuracy, The error influence value of the stripe characteristics on the measurement accuracy Is the weight coefficient of the influence of the measured object characteristics on the measurement accuracy Is the quantity of the influence of the measured object characteristics on the measurement accuracy For the Sub - weight coefficient of the influence of the For the Error influence value of the influence of the Is the weight coefficient of the influence of the measurement environment on the measurement accuracy Is the quantity of the influence of the measurement environment on the measurement accuracy For the Sub - weight coefficient of the influence of the For the Error influence value of the influence of the
[0057] The phase - shift fringe image restoration sub - module restores the original phase - shift fringe image according to the decomposed sub - fringe image and the self - calibration correction value through the decomposition and reconstruction algorithm; Specifically, restore the original phase - shift fringe image according to the decomposed sub - fringe image and the self - calibration correction value through the decomposition and reconstruction algorithm Restore the original phase - shift fringe image, where Is the restored original phase - shift fringe image Is the number of images to be restored The value range of , For the Number of decomposed sub - fringe images of the For the For the Self - calibration correction value of the
[0058] The 3D reconstruction module 25 calculates the modulation phase value according to the original phase - shift fringe image through the phase - shift fringe decoding technology and performs 3D reconstruction; Furthermore, the 3D reconstruction module 25 includes the following sub - modules: The modulation phase value acquisition sub - module calculates the modulation phase value according to the original phase - shift fringe image through the phase - shift fringe decoding technology; Specifically, calculate the modulation phase value according to the original phase - shift fringe image through the phase - shift fringe decoding formula Calculate the modulation phase value, where Is the modulation phase value Is the number of original phase - shift fringe images The value range of , is the intensity of the th original phase-shifted fringe image, is the phase shift amount of the th original phase-shifted fringe image.
[0059] The 3D reconstruction sub-module performs 3D reconstruction based on the modulated phase value through phase unwrapping technology; Specifically, the modulated phase value calculated by the arctangent function has a periodic phase wrapping phenomenon, resulting in a discontinuous stepped phase distribution. Through the phase unwrapping technology, the wrapped modulated phase value is unwrapped, and the truncated wrapped phase is restored to a continuous phase distribution reflecting the actual physical quantity change. A phase-3D coordinate mapping relationship is established to convert the phase value of each point into 3D coordinates, and a 3D model meeting the requirements is constructed.
[0060] Corresponding to the above embodiments, an embodiment of the present invention provides a computer storage medium, including: at least one memory and at least one processor; The memory is used to store one or more program instructions; The processor is used to run one or more program instructions to execute a method for encoding and decoding phase-shifted fringes.
[0061] Corresponding to the above embodiments, an embodiment of the present invention provides a computer-readable storage medium. The computer storage medium contains one or more program instructions, and the one or more program instructions are used to be executed by the processor to perform a method for encoding and decoding phase-shifted fringes.
[0062] The embodiment disclosed by the present invention provides a computer-readable storage medium. Computer program instructions are stored in the computer-readable storage medium. When the computer program instructions run on a computer, the computer is enabled to execute the above method for encoding and decoding phase-shifted fringes.
[0063] In the embodiment of the present invention, the processor may be an integrated circuit chip with signal processing capabilities. The processor may be a general-purpose processor, a digital signal processor (DSP for short), an application-specific integrated circuit (ASIC for short), a field-programmable gate array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0064] The various methods, steps, and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor can be a microprocessor, or the processor can also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present invention can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc. The processor reads the information in the storage medium and combines its hardware to complete the steps of the above method.
[0065] The storage medium can be a memory, for example, it can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories.
[0066] Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory.
[0067] The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).
[0068] The storage media described in the embodiments of the present invention are intended to include, but are not limited to, these and any other suitable types of memories.
[0069] Those skilled in the art should be able to realize that in one or more of the above examples, the functions described in the present invention can be implemented by a combination of hardware and software. When applying software, the corresponding functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. The computer-readable medium includes computer storage media and communication media, where the communication media includes any medium that facilitates the transmission of a computer program from one place to another. The storage media can be any available medium accessible by a general-purpose or special-purpose computer.
[0070] The specific embodiments described above have further elaborated on the purpose, technical solutions, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for encoding and decoding phase-shifted fringes, characterized in that: include: Step S1, adaptively adjusting the parameters of the phase-shift fringe measurement equipment group through the intelligent parameter adjustment algorithm according to the measurement task, and collecting the phase-shift fringe image; Step S2, verifying and optimizing the phase-shift fringe image by calculating the quality intelligent inspection value through the intelligent inspection and optimization technology, and generating a phase-shift fringe image set; Step S3, decomposing each phase-shift fringe image in the phase-shift fringe image set by using the phase-shift fringe decomposition coding technology to generate decomposed sub-fringe images; Step S4, calculating the self-calibration correction value according to the decomposed sub-fringe and restoring the original phase-shifted fringe image by decomposing fringe reconstruction technology; Step S5: Calculate the modulation phase value according to the original phase-shift fringe image by using the phase-shift fringe decoding technology to perform three-dimensional reconstruction.
2. A method for encoding and decoding phase-shifted fringes as claimed in claim 1, characterized in that: According to the measurement task, the parameters of the phase-shift fringe measurement equipment group are adaptively adjusted through the intelligent parameter adjustment algorithm. The acquisition of the phase-shift fringe image includes the following sub-steps: Step S11, analyzing the measurement task to obtain key measurement parameters; Step S12, adaptively adjusting the phase shift fringe measurement equipment group parameters through the intelligent environment parameter adjustment algorithm according to the key measurement parameters; Step S13: sequentially collecting phase-shift fringe images through a phase-shift fringe measurement device group.
3. The method for encoding and decoding phase-shifted fringes according to claim 1, characterized in that: Decomposing each phase-shift fringe image in the phase-shift fringe image set by using the phase-shift fringe decomposition coding technology to generate decomposed sub-fringe images includes the following sub-steps: Step S31, analyzing the phase-shift fringe image set to obtain phase-shift fringe detailed information; Step S32: Decompose each phase-shift fringe image in the phase-shift fringe image set according to the phase-shift fringe detailed information by using the phase-shift fringe decomposition coding technology to generate decomposed sub-fringe images.
4. The method for encoding and decoding phase-shifted fringes according to claim 1, characterized in that: Restoring the original phase-shifted fringe image by decomposing the sub-fringe through the fringe reconstruction technique includes the following sub-steps: Step S41, obtaining a decomposed sub-fringe image through a phase-shift fringe measurement device group according to the decomposed sub-fringe; Step S42, calculating a self-calibration correction value according to the decomposed sub-fringe image by using a fringe self-calibration correction algorithm; Step S43, restoring the original phase-shifted fringe image by a decomposition and reconstruction algorithm according to the decomposed sub-fringe images and the self-calibration correction value.
5. The method for encoding and decoding phase-shifted fringes according to claim 1, characterized in that: The modulation phase value is calculated by the phase shift fringe decoding technology according to the original phase shift fringe image, and the three-dimensional reconstruction includes the following sub-steps: Step S51, calculating the modulation phase value by using the phase shift fringe decoding technology according to the original phase shift fringe image; Step S52: Perform three-dimensional reconstruction according to the modulation phase value by using phase unwrapping technology.
6. A phase shift fringe encoding and decoding system, characterized in that: include: The image acquisition module adaptively adjusts the parameters of the phase-shift fringe measurement equipment group through the intelligent parameter adjustment algorithm according to the measurement task, and collects the phase-shift fringe image; The image intelligent inspection and optimization module verifies and optimizes the phase-shift fringe image by calculating the quality intelligent inspection value through intelligent inspection and optimization technology, and generates a phase-shift fringe image set; A fringe decomposition module decomposes each phase-shift fringe image in the phase-shift fringe image set by using a phase-shift fringe decomposition coding technology to generate decomposed sub-fringe images; An image restoration module calculates self-calibration correction values based on the decomposed sub-stripes and restores the original phase-shifted fringe image through decomposed fringe reconstruction technology; The three-dimensional reconstruction module calculates the modulation phase value based on the original phase-shift fringe image through the phase-shift fringe decoding technology to perform three-dimensional reconstruction.
7. The phase shift fringe encoding and decoding system as claimed in claim 6, characterized in that: Image acquisition module, specifically including: The task analysis submodule analyzes the measurement task and obtains key measurement parameters; The device parameter adaptive adjustment submodule adaptively adjusts the phase shift fringe measurement device group parameters according to the key measurement parameters through the intelligent parameter adjustment algorithm; The image acquisition submodule collects phase-shift fringe images in sequence through a phase-shift fringe measurement device group.
8. The phase shift fringe encoding and decoding system as claimed in claim 6, characterized in that: Stripe decomposition module, including: An image analysis submodule analyzes the phase-shift fringe image set to obtain detailed information of the phase-shift fringe; The decomposition sub-fringe acquisition submodule decomposes each phase-shift fringe image in the phase-shift fringe image set according to the detailed information of the phase-shift fringe by using the phase-shift fringe decomposition coding technology to generate decomposition sub-fringe.
9. The phase shift fringe encoding and decoding system as claimed in claim 6, characterized in that: Image restoration module, specifically including: A decomposed sub-fringe image acquisition submodule is used to acquire a decomposed sub-fringe image through a phase-shift fringe measurement device group according to the decomposed sub-fringe; A self-calibration correction value acquisition submodule calculates a self-calibration correction value according to the decomposed sub-fringe image through a fringe self-calibration correction algorithm; The phase-shift fringe image restoration submodule restores the original phase-shift fringe image through a decomposition and reconstruction algorithm based on the decomposed sub-fringe images and the self-calibration correction values.
10. The phase shift fringe encoding and decoding system according to claim 6, characterized in that: 3D reconstruction module, including: The modulation phase value acquisition submodule calculates the modulation phase value according to the original phase-shift fringe image by using the phase-shift fringe decoding technology; The 3D reconstruction submodule performs 3D reconstruction based on the modulation phase value through phase unwrapping technology.
Citation Information
Patent Citations
Structured light three-dimensional measurement method for encoding fringe level based on phase shift amount
CN109974626A
Image coding method and device, electronic equipment and storage medium
CN117934640A
Digital fringe projection and multi-spectral polarization imaging for rapid 3D reconstruction
WO2019113445A2