Downsampling-based single-frequency wrapped phase unwrapping method and system, computer readable storage medium and computer program product

By downsampling the main value phase map and mass graph-oriented phase expansion method, the problem of inefficient calculation time of single-frequency wrapping phase expansion algorithm is solved, and a faster phase expansion process is achieved.

CN119919533AActive Publication Date: 2025-05-02GUANGDONG AOPUTE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411996446.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-02
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

In the prior art, the single-frequency wrap phase expansion algorithm has problems with inefficiency in computing time, which leads to a long time-consuming phase expansion process.

Method used

A single-frequency wrapped phase expansion method based on downsampling is used to downsample the image of the main value phase map to obtain a sub-image, and then phase expansion is performed using the mass map guidance method, and the number of layers of the rectangular dot matrix is ​​calculated according to the expanded phase value for phase expansion filling.

Benefits of technology

The time required for the overall algorithm is reduced, and the efficiency of phase expansion of the quality graph-oriented method is improved. The algorithm is time-consuming and fast.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919533A_ABST
    Figure CN119919533A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, and discloses a down-sampling-based single-frequency wrapped phase unwrapping method and system, a computer readable storage medium and a computer program product. The method comprises the following steps: carrying out image downsampling on an obtained principal value phase diagram to obtain a sub-image; unwrapping the single-frequency wrapped phase of the sub-image by adopting a quality map guiding method, and solving the hierarchy number k of the rectangular dot matrix to which the pixel points in the main value phase diagram corresponding to the pixel points of the sub-image belong according to the unwrapped phase values of the pixel points of the sub-image; k-order phase unwrapping is carried out on the rectangular dot matrix of the principal value phase diagram, and absolute phase values of all pixel points in the rectangular dot matrix are calculated and filled according to the hierarchy number k. According to the method, the downsampling method is combined with the single-frequency wrapped phase unwrapping method, so that the sampling efficiency is improved, the requirement for computing power is not high, the calculated amount is small, the algorithm time consumption is small, the speed is high, the time required by the whole algorithm is shortened, and the efficiency of phase unwrapping of the quality map guiding method is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method, system, computer-readable storage medium and computer program product for single-frequency wrapped phase unwrapping based on downsampling. Background Art

[0002] In recent years, with the rapid development of computer technology and optics, optical 3D shape measurement technology has been widely used in many fields such as industrial 3D measurement, cultural relics protection, reverse engineering, quality control, medical diagnosis, etc.

[0003] Among them, the grating projection three-dimensional surface measurement method based on phase analysis has been deeply studied and widely used because of its advantages of non-contact, fast measurement speed and high accuracy. This method is to use a projector to project a set of grating images with sinusoidal light intensity to the object to be measured, and use a camera to simultaneously shoot the grating image that is deformed by the surface modulation of the object to be measured, and then use the captured grating image to analyze the acquired deformation fringe pattern to calculate the corresponding absolute phase value to calculate the three-dimensional point cloud data on the surface of the object to be measured to reconstruct the three-dimensional surface distribution of the object to be measured. Since the phase demodulation is obtained by the inverse tangent function operation in the phase calculation, the calculated phase value is truncated within the function main value range (-π,π], and is distributed in a sawtooth discontinuous manner, which is not unique, so phase unwrapping must be performed to obtain the absolute phase of the continuous distribution.

[0004] Phase unwrapping refers to the process of unwrapping a truncated phase image into a continuous and truly distributed phase image. Among them, the single-frequency wrapped phase unwrapping algorithm can be unwrapped using the path-related QGPU (Quality Guided Phase Unwrapping) method. This method relies on the phase value between spatially adjacent pixels to restore the absolute phase. Therefore, it is necessary to traverse the pixels of the entire phase image for phase unwrapping, which leads to a surge in calculation time and reduces the efficiency of phase unwrapping.

[0005] Therefore, how to reduce the time required for the overall algorithm and improve the efficiency of the phase unfolding of the quality graph-guided method has become a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention

[0006] The object of the present invention is to provide a method, system, computer-readable storage medium and computer program product for single-frequency wrapped phase unwrapping based on downsampling, so as to solve or at least partially solve the technical problems mentioned in the above background technology.

[0007] To achieve this object, the present invention adopts the following technical solutions:

[0008] In a first aspect, the present invention provides a method for single-frequency wrapped phase unwrapping based on downsampling, comprising:

[0009] Step 110, obtaining a main value phase diagram obtained after phase wrapping calculation;

[0010] Step 120, downsampling the acquired principal value phase image to obtain a sub-image; wherein the size of the sub-image is 1 / n of the size of the principal value phase image, n is the sampling step of the image downsampling, and n≥2;

[0011] Step 130: unfolding the single-frequency wrapped phase of the sub-image using a quality map-guided method to obtain an unfolded phase value of each pixel point of the sub-image;

[0012] Step 140, according to the unfolded phase value of the pixel point of the sub-image, obtain the level number k of the rectangular lattice to which the pixel point in the principal value phase map corresponding to the pixel point of the sub-image belongs;

[0013] Step 150: Perform k-order phase unfolding on the rectangular dot matrix of the principal value phase map, calculate the absolute phase values ​​of all the pixel points in the rectangular dot matrix according to the order k, and fill them.

[0014] Optionally, after step 150, the following steps are further included:

[0015] Step 160, determine whether n is greater than 2; if so, first execute step 161, then execute step 162; if not, execute step 162;

[0016] Step 161, using a quality map-oriented method to perform phase unwrapping on the principal value phase map;

[0017] Step 162, determining whether the phase difference of adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range; if so, executing step 1621; if not, executing step 1622;

[0018] Step 1621, the current absolute phase value of the pixel point remains unchanged;

[0019] Step 1622: correct the current absolute phase value of the pixel in the rectangular dot matrix, and use the corrected absolute phase value to overwrite the current absolute phase value of the pixel.

[0020] Optionally, step 130 specifically includes:

[0021] Initialize a priority queue for storing the pixel points to be processed and their corresponding truncated phase difference absolute values, and set the priority queue to be arranged in descending order according to the magnitude of the truncated phase difference absolute values;

[0022] Select the pixel point (i, j) in the sub-image as the starting point of phase unwrapping, set its initial truncated phase difference to 0 and push it into the queue; push the pixel point (i, j) and its truncated phase difference out of the queue for four-connectivity search, and perform phase unwrapping on the pixels in the four neighborhoods of the pixel point (i, j) respectively;

[0023] Then, the pixel points after phase expansion in the four neighborhoods and their corresponding truncated phase difference absolute values ​​are queued and arranged in descending order, and the size of the truncated phase difference absolute value is used as the quality size of the quality map; as long as the queue is not empty, the point with the highest quality in the current queue is dequeued, and the pixel points in the four neighborhoods of the dequeued pixel point that have not been queued and phase expanded are phase expanded and queued until the queue is empty, and the expanded phase value of each pixel point in the sub-image is obtained.

[0024] Optionally, the absolute phase calculation method of the pixel points expanded into the sub-image is:

[0025]

[0026] Wherein, Φ(m) is the absolute phase value of the mth point, Φ(0) is the wrapped phase value of the starting point of phase unwrapping, and Φ(n) is the absolute phase value of the nth pixel point of the sub-image;

[0027] Δ{} is the difference operator, defined as:

[0028] Δ{Φ(n)}=Φ(n+1)-Φ(n).

[0029] Φ(n+1) is the absolute phase value of the n+1th pixel of the sub-image;

[0030] W{} is the truncation operator, defined as:

[0031] W{Φ(n)}=Φ(n)-2π*round{Φ(n) / 2π};

[0032] round{} is the rounding operator.

[0033] Optionally, assuming that the level number of the corresponding pixel point (i*n, j*n) of the sub-image pixel point (i, j) in the main value phase map is k(i*n, j*n), the calculation method of k(i*n, j*n) is:

[0034] k(i*n,j*n)=round{|Φ(i,j)-φ(i*n,j*n)| / 2π};

[0035] Where n is the sampling step of image downsampling, Φ(i, j) is the absolute phase value of the pixel point (i, j) of the sub-image, φ(i*n, j*n) is the wrapped phase value of the corresponding pixel point (i*n, j*n) of the pixel point (i, j) of the sub-image in the main value phase map, | | is the absolute value operator, and round{} is the rounding operator.

[0036] Optionally, step 150 specifically includes:

[0037] According to k(i*n, j*n), the absolute phases of all the pixels in the rectangular lattice [(i*n, j*n), (i*n+n-1, j*n+n-1)] in the principal value phase map are calculated and filled respectively; where point (i*n, j*n) is the upper left vertex in the rectangular lattice, and point (i*n+n-1, i*n+n-1) is the lower right vertex in the rectangular lattice. The absolute phase calculation method of the ath pixel in the rectangular lattice is:

[0038] Φ(a)=φ(a)+2πk(i*n,j*n);

[0039] Φ(a) is the absolute phase value of the a-th pixel, and φ(a) is the wrapped phase value of the a-th pixel.

[0040] Optionally, the adjacent point phase difference includes a first adjacent point phase difference and a second adjacent point phase difference; the difference range is set to [-π, π];

[0041] The first adjacent point phase difference is expressed as:

[0042] ΔΦ(c1)=Φ(x,y)-Φ(x,y-1).

[0043] ΔΦ(c1) is the difference in absolute phase value between the pixel point (x, y) and its left neighbor point (x, y-1) in the rectangular lattice;

[0044] The second adjacent point phase difference is expressed as:

[0045] ΔΦ(c2)=Φ(x,y)-Φ(x-1,y).

[0046] ΔΦ(c2) is the difference in absolute phase value between the pixel point (x, y) and its upper neighbor point (x-1, y) in the rectangular lattice;

[0047] The step of judging whether the phase difference between adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range is as follows:

[0048] If ΔΦ(c1)>π, the absolute phase value of the pixel (x, y) is corrected to:

[0049] Φ(x, y) = Φ(x, y) - 2π.

[0050] If ΔΦ(c1)<-π, the absolute phase value of the pixel (x, y) is corrected to:

[0051] φ(x, y)=Φ(x, y)+2π.

[0052] If ΔΦ(c2)>π, the absolute phase value of the pixel (x, y) is corrected to:

[0053] Φ(x, y) = Φ(x, y) - 2π;

[0054] If ΔΦ(c2)<-π, the absolute phase value of the pixel (x, y) is corrected to:

[0055] Φ(x,y)=Φ(x,y)+2π.

[0056] Optionally, step 120 is specifically implemented as follows: using a nearest neighbor interpolation method to perform image downsampling on the acquired main value phase image to obtain a sub-image, including:

[0057] Create a new image with the same data type as the original main value phase image but with a size reduced by n times to store the downsampled image data;

[0058] Traverse each row and column of the original principal value phase map, let the variable i represent the row index currently being processed, and the variable j represent the column index currently being processed. For each pixel point (i*n, j*n) in the original principal value phase map, assign its value directly to the corresponding pixel point (i, j) in the new image to obtain the sub-image.

[0059] Optionally, step 140 specifically includes:

[0060] Traverse all rows and columns of the sub-image, and divide the entire sub-image space into multiple sub-ranges; wherein each sub-range can be executed independently on different threads;

[0061] By means of multi-threaded parallel processing, the hierarchy number k of the rectangular lattice to which the pixel points in the principal value phase image corresponding to the pixel points in each sub-range belong is obtained.

[0062] Optionally, step 140 and steps subsequent to step 140 all use the TBB parallel algorithm for accelerated processing.

[0063] In a second aspect, the present invention provides a system for single-frequency wrapped phase unwrapping based on downsampling, comprising:

[0064] A storage unit, used for acquiring and storing a main value phase diagram obtained after phase wrapping calculation;

[0065] A downsampling unit, electrically connected to the storage unit, for performing image downsampling on the acquired main value phase image to obtain a sub-image; wherein the size of the sub-image is 1 / n of the size of the main value phase image, n is a sampling step of image downsampling, and n≥2;

[0066] A sub-image phase unwrapping unit, electrically connected to the downsampling unit, for unwrapping the single-frequency wrapped phase of the sub-image using a quality map-guided method to obtain an unwrapped phase value of each pixel point of the sub-image;

[0067] A layer number calculation unit, electrically connected to the phase unwrapping unit, for obtaining the layer number k of the rectangular dot matrix to which the pixel point in the main value phase map corresponding to the pixel point of the sub-image belongs according to the unwrapped phase value of the pixel point of the sub-image;

[0068] The main value phase map phase unwrapping unit is electrically connected to the level number calculation unit and is used to perform k-order phase unwrapping on the rectangular dot matrix of the main value phase map, calculate the absolute phase values ​​of all pixel points in the rectangular dot matrix according to the level number k, and fill them.

[0069] Optionally, the main value phase diagram phase unwrapping unit is also electrically connected to a rechecking unit;

[0070] The rechecking unit is used to determine whether n is greater than 2; and

[0071] If n=2, determine whether the phase difference between adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range;

[0072] If n>2, the quality map-oriented method is first used to perform phase expansion on the principal value phase map, and then it is determined whether the phase difference of the neighboring points of the pixel point in the rectangular dot matrix is ​​within the predetermined difference range;

[0073] After determining whether the phase difference between adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range, the rechecking unit is further used to:

[0074] If the phase difference between adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range, the current absolute phase value of the pixel remains unchanged;

[0075] If the phase difference of adjacent points of a pixel point in the rectangular dot matrix is ​​not within the predetermined difference range, the current absolute phase value of the pixel point in the rectangular dot matrix is ​​corrected, and the corrected absolute phase value overwrites the current absolute phase value of the pixel point.

[0076] Optionally, the sub-image phase unwrapping unit is specifically used for:

[0077] Initialize a priority queue for storing the pixel points to be processed and their corresponding truncated phase difference absolute values, and set the priority queue to be arranged in descending order according to the magnitude of the truncated phase difference absolute values;

[0078] Select the pixel point (i, j) in the sub-image as the starting point of phase unwrapping, set its initial truncated phase difference to 0 and push it into the queue; push the pixel point (i, j) and its truncated phase difference out of the queue for four-connectivity search, and perform phase unwrapping on the pixels in the four neighborhoods of the pixel point (i, j) respectively;

[0079] Then, the pixel points after phase expansion in the four neighborhoods and their corresponding truncated phase difference absolute values ​​are queued and arranged in descending order, and the size of the truncated phase difference absolute value is used as the quality size of the quality map; as long as the queue is not empty, the point with the highest quality in the current queue is dequeued, and the pixel points in the four neighborhoods of the dequeued pixel point that have not been queued and phase expanded are phase expanded and queued until the queue is empty, and the expanded phase value of each pixel point in the sub-image is obtained.

[0080] Optionally, the absolute phase calculation method of the pixel points expanded into the sub-image is:

[0081]

[0082] Wherein, Φ(m) is the absolute phase value of the mth point, Φ(0) is the wrapped phase value of the starting point of phase unwrapping, and Φ(n) is the absolute phase value of the nth pixel point of the sub-image;

[0083] Δ{} is the difference operator, defined as:

[0084] Δ{Φ(n)}=Φ(n+1)-Φ(n);

[0085] Φ(n+1) is the absolute phase value of the n+1th pixel of the sub-image;

[0086] W{} is the truncation operator, defined as:

[0087] W{Φ(n)}=Φ(n)-2π*round{Φ(n) / 2π};

[0088] round{} is the rounding operator.

[0089] Optionally, assuming that the level number of the corresponding pixel point (i*n, j*n) of the sub-image pixel point (i, j) in the main value phase map is k(i*n, j*n), the calculation method of k(i*n, j*n) is:

[0090] k(i*n,j*n)=round{|Φ(i,j)-Φ(i*n,j*n)| / 2π};

[0091] Where n is the sampling step of image downsampling, Φ(i, j) is the absolute phase value of the pixel point (i, j) of the sub-image, φ(i*n, j*n) is the wrapped phase value of the corresponding pixel point (i*n, j*n) of the pixel point (i, j) of the sub-image in the main value phase map, | | is the absolute value operator, and round{} is the rounding operator.

[0092] Optionally, the main value phase diagram phase unwrapping unit is specifically used for:

[0093] According to k(i*n, j*n), the absolute phases of all the pixels in the rectangular lattice [(i*n, j*n), (i*n+n-1, j*n+n-1)] in the principal value phase map are calculated and filled respectively; where point (i*n, j*n) is the upper left vertex in the rectangular lattice, and point (i*n+n-1, j*n+n-1) is the lower right vertex in the rectangular lattice. The absolute phase calculation method of the ath pixel in the rectangular lattice is:

[0094] Φ(a)=φ(a)+2πk(i*n,j*n);

[0095] Φ(a) is the absolute phase value of the a-th pixel, and φ(a) is the wrapped phase value of the a-th pixel.

[0096] Optionally, the adjacent point phase difference includes a first adjacent point phase difference and a second adjacent point phase difference; the difference range is set to [-π, π];

[0097] The first adjacent point phase difference is expressed as:

[0098] ΔΦ(c 1)=Φ(x, y)-Φ(x, y-1).

[0099] ΔΦ(c1) is the difference in absolute phase value between the pixel point (x, y) and its left neighbor point (x, y-1) in the rectangular lattice;

[0100] The second adjacent point phase difference is expressed as:

[0101] ΔΦ(c2)=Φ(x,y)-Φ(x-1,y).

[0102] ΔΦ(c2) is the difference in absolute phase value between the pixel point (x, y) and its upper neighbor point (x-1, y) in the rectangular lattice;

[0103] The step of judging whether the phase difference between adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range is as follows:

[0104] If ΔΦ(c1)>π, the absolute phase value of the pixel (x, y) is corrected to:

[0105] Φ(x, y) = Φ(x, y) - 2π.

[0106] If αΦ(c1)<-π, the absolute phase value of the pixel (x, y) is corrected to:

[0107] φ(x, y) = Φ(x, y) + 2π;

[0108] If ΔΦ(c2)>π, the absolute phase value of the pixel (x, y) is corrected to:

[0109] Φ(x, y) = Φ(x, y) - 2π.

[0110] If ΔΦ(c2)<-π, the absolute phase value of the pixel (x, y) is corrected to:

[0111] Φ(x,y)=Φ(x,y)+2π.

[0112] Optionally, the sub-image phase unwrapping unit is specifically used to perform image downsampling on the acquired main value phase image using a nearest neighbor interpolation method to obtain a sub-image, including:

[0113] Create a new image with the same data type as the original main value phase image but with a size reduced by n times to store the downsampled image data;

[0114] Traverse each row and column of the original principal value phase map, let the variable i represent the row index currently being processed, and the variable j represent the column index currently being processed. For each pixel point (i*n, j*n) in the original principal value phase map, assign its value directly to the corresponding pixel point (i, j) in the new image to obtain the sub-image.

[0115] Optionally, the level number calculation unit is specifically used for:

[0116] Traverse all rows and columns of the sub-image, and divide the entire sub-image space into multiple sub-ranges; wherein each sub-range can be executed independently on different threads;

[0117] By means of multi-threaded parallel processing, the hierarchy number k of the rectangular lattice to which the pixel points in the principal value phase image corresponding to the pixel points in each sub-range belong is obtained.

[0118] Optionally, the layer number calculation unit, the main value phase diagram phase unwrapping unit and the re-check unit are all electrically connected to the TBB library, and the TBB parallel algorithm in the TBB library can accelerate the processing speed of the layer number calculation unit, the main value phase diagram phase unwrapping unit and the re-check unit.

[0119] In a third aspect, the present invention further provides a computer-readable storage medium, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to implement the single-frequency wrapped phase unwrapping method based on downsampling as described above.

[0120] In a fourth aspect, the present invention further provides a computer program product, comprising a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the above-mentioned method of single-frequency wrapped phase unwrapping based on downsampling is implemented.

[0121] Compared with the prior art, the present invention has the following beneficial effects:

[0122] The present invention provides a single-frequency wrapped phase expansion method based on downsampling, which improves the sampling efficiency by combining the downsampling method with the single-frequency wrapped phase expansion method, has low requirements on computing power, small amount of calculation, short algorithm time consumption and high speed, reduces the time required for the overall algorithm, and improves the efficiency of the phase expansion of the quality graph guided method. BRIEF DESCRIPTION OF THE DRAWINGS

[0123] In order to more clearly illustrate the embodiments of the present invention 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 invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0124] Figure 1 A flow chart of a method for single-frequency wrapped phase unwrapping based on downsampling provided in an embodiment of the present invention.

[0125] Figure 2 A flow chart of another method for single-frequency wrapped phase unwrapping based on downsampling provided in an embodiment of the present invention.

[0126] Figure 3 An architectural schematic diagram of a system for single-frequency wrapped phase unwrapping based on downsampling provided in an embodiment of the present invention.

[0127] Figure 4 A principal value phase map with an image width and height of 2448*2048 is provided in an embodiment of the present invention.

[0128] Figure 5 The sampling step length is n = 4 pairs Figure 3 The sub-image obtained by downsampling.

[0129] Figure 6 For Figure 5 The image obtained after phase unwrapping.

[0130] Figure 7 A schematic diagram of absolute phase values ​​of a rectangular dot matrix in a main value phase diagram before filling is provided in an embodiment of the present invention.

[0131] Figure 8 For Figure 6 Schematic diagram of the absolute phase values ​​of the rectangular dot matrix obtained after absolute phase calculation and filling.

[0132] Fig. 9 For Figure 7 Schematic diagram of the absolute phase value obtained by performing phase unwrapping on the rectangular lattice using the mass graph guided method.

[0133] Fig.10 An embodiment of the present invention provides an image obtained by phase unfolding a principal value phase map with an image width and height of 2448*2048.

[0134] Fig.11 For Figure 4 Phase unwrapping image before optimization of the wrapped phase in the image.

[0135] Fig.12 For Figure 4 Phase unwrapping image after optimizing the wrapped phase in the image.

[0136] Fig.13 For Fig.12 and Fig.11 The phase difference image is obtained by subtracting the phase unwrapped image.

[0137] Fig.14 A wrapped phase image with an image resolution of 4096*3000 is provided in an embodiment of the present invention.

[0138] Fig.15 For Figure 4 and attached Fig.14 A comparison of the time required for phase unwrapping is shown in the figure.

[0139] In the figure:

[0140] 10. Shooting component; 20. Storage unit; 30. Model building unit; 40. Image alignment calculation unit; 50. Image cropping unit; 60. Image fusion unit. DETAILED DESCRIPTION

[0141] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0142] Embodiment 1:

[0143] Please refer to Figure 1 , Figure 1 A flowchart of a method for single-frequency wrapped phase unwrapping based on downsampling provided in an embodiment of the present invention, the method specifically includes:

[0144] Step 110: Obtain a principal value phase diagram obtained after phase wrapping calculation.

[0145] Step 120: downsample the acquired main value phase image to obtain a sub-image.

[0146] Specifically, this embodiment uses the nearest neighbor interpolation method to downsample the acquired main value phase image to obtain a sub-image. The implementation method specifically includes:

[0147] First, a new image with the same data type as the original principal value phase image but with a size reduced by n times is created to store the downsampled image data;

[0148] Then, traverse each row and column of the original principal value phase map, set the variable i to represent the row index currently being processed, and the variable j to represent the column index currently being processed. For each pixel point (i*n, j*n) in the original principal value phase map, assign its value directly to the corresponding pixel point (i, j) in the new image to obtain the sub-image.

[0149] The size of the sub-image is 1 / n of the size of the principal value phase image, n is the sampling step of image downsampling, and n≥2.

[0150] For example, Figure 4 and Figure 5 As shown, Figure 4 A principal value phase image with a width and height of 2448*2048 is provided in an embodiment of the present invention. Figure 5 The sampling step length is n = 4 pairs Figure 3 The sub-image obtained by downsampling.

[0151] Step 130: Use a quality map-guided method to unfold the single-frequency wrapped phase of the sub-image to obtain an unfolded phase value of each pixel point of the sub-image.

[0152] Specifically, the implementation of step 130 includes:

[0153] First, a priority queue is initialized for storing the pixel points to be processed and their corresponding truncated phase difference absolute values, and the priority queue is set to be arranged in descending order according to the size of the truncated phase difference absolute values;

[0154] Then, the pixel point (i, j) in the sub-image is selected as the starting point of phase unwrapping, and its initial truncated phase difference is set to 0 and pushed into the queue; the pixel point (i, j) and its truncated phase difference are pushed out of the queue for four-connectivity search, and the pixel points in the four neighborhoods of the pixel point (i, j) are phase unwrapped respectively;

[0155] Finally, the pixel points after the phase expansion of the four neighborhoods and their corresponding truncated phase difference absolute values ​​are queued and arranged in descending order, and the magnitude of the truncated phase difference absolute value is used as the quality magnitude of the quality map;

[0156] As long as the queue is not empty, the point with the highest quality in the current queue is removed from the queue, and the pixel points in the four neighborhoods of the removed pixel points that have not been queued and phase-unwrapped are phase-unwrapped and added to the queue until the queue is empty, and the unwrapped phase value of each pixel in the sub-image is obtained.

[0157] More specifically, in this embodiment, the absolute phase calculation method of the pixel points expanded into the sub-image is:

[0158]

[0159] Wherein, Φ(m) is the absolute phase value of the mth point, Φ(0) is the wrapped phase value of the starting point of phase unwrapping, and Φ(n) is the absolute phase value of the nth pixel point of the sub-image;

[0160] Δ{} is the difference operator, defined as:

[0161] Δ{Φ(n)}=Φ(n+1)-Φ(n);

[0162] Φ(n+1) is the absolute phase value of the n+1th pixel of the sub-image;

[0163] W{} is the truncation operator, defined as:

[0164] W{Φ(n)}=Φ(n)-2π*round{Φ(n) / 2π};

[0165] round{} is the rounding operator.

[0166] For example, please refer to Figure 6 , Figure 6 For Figure 5 The image obtained after phase unwrapping.

[0167] Step 140 : According to the unfolded phase value of the pixel point of the sub-image, the level number k of the rectangular lattice to which the pixel point in the principal value phase map corresponding to the pixel point of the sub-image belongs is obtained.

[0168] For the sake of convenience, let the level number of the corresponding pixel point (i*n, j*n) of the sub-image (i, j) in the main value phase map be k(i*n, j*n);

[0169] In this embodiment, the calculation method of k(i*n, j*n) is:

[0170] k(i*n,j*n)=round{|Φ(i,j)-φ(i*n,j*n)| / 2π};

[0171] Among them, n is the sampling step of image downsampling, Φ(i, j) is the absolute phase value of the pixel point (i, j) of the sub-image, φ(i*n, j*n) is the wrapped phase value of the corresponding pixel point (i*n, j*n) of the pixel point (i, j) of the sub-image in the main value phase map, || is the absolute value operator, and round{} is the rounding operator.

[0172] For example, when i=4, j=4, Φ(i, j)=3.9483, φ(i*n, j*n)=-2.3349, k(16, 16)=1.

[0173] Step 150: Perform k-order phase unfolding on the rectangular dot matrix of the principal value phase map, calculate the absolute phase values ​​of all the pixel points in the rectangular dot matrix according to the order number k, and fill them.

[0174] Specifically, according to k(i*n, j*n), absolute phase calculation and filling are performed on all pixel points in the rectangular dot matrix [(i*n, j*n), (i*n+n-1, j*n+n-1)] in the main value phase map;

[0175] Among them, point (i*n, j*n) is the upper left vertex in the rectangular dot matrix, point (i*n+n-1, j*n+n-1) is the lower right vertex in the rectangular dot matrix, and the absolute phase calculation method of the a-th pixel in the rectangular dot matrix is:

[0176] Φ(a)=φ(a)+2πk(i*n,j*n).

[0177] Φ(a) is the absolute phase value of the a-th pixel, and φ(a) is the wrapped phase value of the a-th pixel.

[0178] For example, please refer to Figure 7 and Figure 8 , when k(16,16)=1, fill the front rectangular lattice [(16,16), (19,19)] as Figure 7 As shown, after absolute phase calculation and filling, the rectangular lattice [(16, 16), (19, 19)] is as follows Figure 8 shown.

[0179] Please refer to Figure 7 and Figure 8 , Figure 7 A schematic diagram of absolute phase values ​​of a rectangular dot matrix in a main value phase diagram before filling provided by an embodiment of the present invention, Figure 8 For Figure 6 Schematic diagram of the absolute phase values ​​of the rectangular dot matrix obtained after absolute phase calculation and filling.

[0180] Please refer to Figure 2 , Figure 2 A flow chart of another method for single-frequency wrapped phase unwrapping based on downsampling provided in an embodiment of the present invention;

[0181] As a preferred implementation, after step 150, the following steps are further included:

[0182] Step 160, determine whether n is greater than 2; if so, first execute step 161, then execute step 162; if not, execute step 162.

[0183] Step 161: Use the quality map-guided method to perform phase unwrapping on the principal value phase map.

[0184] Step 162, determine whether the phase difference between adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range; if so, execute step 1621; if not, execute step 1622.

[0185] Step 1621: The current absolute phase value of the pixel remains unchanged.

[0186] Step 1622: correct the current absolute phase value of the pixel in the rectangular dot matrix, and use the corrected absolute phase value to overwrite the current absolute phase value of the pixel.

[0187] Specifically, the adjacent point phase difference includes a first adjacent point phase difference and a second adjacent point phase difference; the difference range is set to [-π, π];

[0188] The first adjacent point phase difference is expressed as:

[0189] ΔΦ(c 1)=Φ(x, y)-Φ(x, y-1).

[0190] ΔΦ (c 1 ) is the difference in absolute phase value between the pixel point (x, y) and its left neighbor point (x, y-1) in the rectangular dot matrix;

[0191] The second adjacent point phase difference is expressed as:

[0192] ΔΦ(c2)=Φ(x,y)-Φ(x-1,y).

[0193] ΔΦ (c2 ) is the difference in absolute phase value between the pixel point (x, y) and its upper neighbor point (x-1, y) in the rectangular dot matrix;

[0194] The step of judging whether the phase difference between adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range is as follows:

[0195] If Δ Φ (c 1 )>π, the absolute phase value of the pixel point (x, y) is corrected to:

[0196] Φ(x, y) = Φ(x, y) - 2π.

[0197] If ΔΦ(c1)<-π, the absolute phase value of the pixel (x, y) is corrected to:

[0198] φ(x, y)=Φ(x, y)+2π.

[0199] If Δ Φ (c 2 )>π, the absolute phase value of the pixel point (x, y) is corrected to:

[0200] Φ(x, y) = Φ(x, y) - 2π.

[0201] If Δ Φ (c 2 )<-π, the absolute phase value of the pixel (x, y) is corrected to:

[0202] Φ(x,y)=Φ(x,y)+2π.

[0203] Furthermore, the idea of ​​upsampling is used to apply the k-order phase unwrapping to the absolute phase calculation of the original wrapped phase image. At the same time, several steps are added to enhance the stability and accuracy of the phase unwrapping process, and the TBB (Intel Threading Building Blocks) library is used for parallel computing to accelerate the algorithm to complete the phase unwrapping of the original resolution phase image. This method can reduce the time required for the overall algorithm and improve the efficiency of the quality graph-guided method (QGPU) phase unwrapping.

[0204] In this embodiment, step 140 and steps after step 140 all use the TBB parallel algorithm for accelerated processing.

[0205] Exemplarily, the specific implementation of step 140 is:

[0206] Traverse all rows and columns of the sub-image, and divide the entire sub-image space into multiple sub-ranges; wherein each sub-range can be executed independently on different threads;

[0207] By means of multi-threaded parallel processing, the hierarchy number k of the rectangular lattice to which the pixel points in the principal value phase image corresponding to the pixel points in each sub-range belong is obtained.

[0208] To compare the effect of phase unwrapping before and after overall algorithm optimization, please continue to refer to Figure 11-13 , Fig.11 For Figure 4 Phase unwrapping diagram before optimization of the wrapped phase in the image, Fig.12 For Figure 4 The phase unwrapping diagram after optimizing the wrapped phase in the image is Fig.13 For Fig.12 and Fig.11 The phase difference image is obtained by subtracting the phase unwrapped image;

[0209] First of all Figure 4 The wrapped phase in is used to perform phase unwrapping before optimization, and then the phase unwrapping diagram before optimization is obtained, see Fig.11 Then use the optimized algorithm to Figure 4 The phase wrapping in the image is phase unwrapped to obtain the optimized phase unwrapped image, see the attached Fig.12 (sampling step n = 2), and finally the phase difference image is obtained by subtracting the phase unwrapped images before and after optimization, see the attached Fig.13 , by the attached Fig.13 It can be observed that:

[0210] In the comparison of the effects before and after the overall algorithm optimization, the phase difference image shows that the phase difference value in most areas is 0 or almost 0, so the results of phase unwrapping before and after optimization show significant similarities, and the difference in effects tends to be negligible.

[0211] For further information, please refer to Fig.14 and Fig.15 , Fig.14 A wrapped phase image with an image resolution of 4096*3000 is provided in an embodiment of the present invention. Fig.15 For Figure 4 and attached Fig.14 A comparison of the time required for phase unwrapping is shown in the figure;

[0212] In order to compare the time required for phase unwrapping before and after the overall algorithm optimization, the attached Figure 4 (image resolution is 2448*2048) and Fig.14 The comparison experiment was carried out with the wrapped phase image (with an image resolution of 4096*3000). Figure 4 ( Fig.15 In Figure 1 )and Fig.14 ( Fig.15 In Figure 2 The comparative experimental results are shown in the attached Fig.15 As shown;

[0213] By the attached Fig.15 The data analysis shows that from the comparison of the algorithm time consumption between the algorithm before optimization (sampling step n=1) and the optimized algorithm (sampling step n=2 to n=10), it can be concluded that the use of the optimized algorithm to perform phase unwrapping on the wrapped phase image can significantly reduce the calculation time, thereby improving the calculation efficiency of the quality graph-guided method in the phase unwrapping process.

[0214] In summary,

[0215] This embodiment provides a single-frequency wrapped phase unwrapping method based on downsampling, which improves sampling efficiency by combining the downsampling method with the single-frequency wrapped phase unwrapping method, has low requirements on computing power, small amount of calculation, short algorithm time consumption and high speed;

[0216] By performing the steps of phase unwrapping (n>2) and adjacent point phase difference judgment by the quality map-guided method on the rectangular dot matrix of the phase unwrapped sub-image, the stability and accuracy of the phase unwrapping process are enhanced, and the layer judgment error caused by the large adjacent point phase difference is reduced;

[0217] The algorithm logic is simpler and easier to implement;

[0218] Moreover, the more time-consuming steps in the algorithm are implemented in multi-threaded parallelism in combination with the TBB parallel algorithm, which uses the capabilities of multi-core processors to accelerate image processing tasks, reduce algorithm time consumption, and increase speed.

[0219] Embodiment 2:

[0220] Please refer to Figure 3 , Figure 3 An architectural schematic diagram of a system for single-frequency wrapped phase unwrapping based on downsampling provided in an embodiment of the present invention.

[0221] The system specifically includes:

[0222] A storage unit 10 is used to obtain and store a main value phase diagram obtained after phase wrapping calculation;

[0223] A downsampling unit 20 is electrically connected to the storage unit 10 and is used to perform image downsampling on the acquired main value phase image to obtain a sub-image; wherein the size of the sub-image is 1 / n of the size of the main value phase image, where n is a sampling step of image downsampling, and n≥2;

[0224] The sub-image phase unwrapping unit 30 is electrically connected to the downsampling unit 20 and is used to unwrap the single-frequency wrapped phase of the sub-image using a quality map-guided method to obtain an unwrapped phase value of each pixel point of the sub-image;

[0225] A layer number calculation unit 40, electrically connected to the phase unwrapping unit 30, for obtaining the layer number k of the rectangular dot matrix to which the pixel point in the main value phase map corresponding to the pixel point of the sub-image belongs according to the unwrapped phase value of the pixel point of the sub-image;

[0226] The main value phase map phase unwrapping unit 50 is electrically connected to the level number calculation unit 40, and is used to perform k-order phase unwrapping on the rectangular dot matrix of the main value phase map, and calculate and fill the absolute phase values ​​of all pixel points in the rectangular dot matrix according to the level number k.

[0227] Specifically, the main value phase diagram phase unwrapping unit 50 is also electrically connected to a rechecking unit 60;

[0228] The recheck unit 60 is used to determine whether n is greater than 2; and

[0229] If n=2, determine whether the phase difference between adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range;

[0230] If n>2, the quality map-oriented method is first used to perform phase expansion on the principal value phase map, and then it is determined whether the phase difference of the neighboring points of the pixel point in the rectangular dot matrix is ​​within the predetermined difference range;

[0231] After determining whether the phase difference between adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range, the rechecking unit is further used to:

[0232] If the phase difference between adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range, the current absolute phase value of the pixel remains unchanged;

[0233] If the phase difference between adjacent points of a pixel point in the rectangular dot matrix is ​​not within the predetermined difference range, the current absolute phase value of the pixel point in the rectangular dot matrix is ​​corrected, and the corrected absolute phase value overwrites the current absolute phase value of the pixel point.

[0234] Since the method of single-frequency wrapped phase unwrapping based on downsampling has been described in detail in the first embodiment, it will not be repeated in this embodiment.

[0235] This embodiment proposes a single-frequency wrapped phase unwrapping system based on downsampling. First, the resolution of the wrapped phase image is reduced by using the downsampling method. Then, the sub-image after the downsampling process is subjected to phase unwrapping using the quality map-guided method. The k-order phase unwrapping is applied to the absolute phase calculation of the original wrapped phase image using the idea of ​​upsampling. At the same time, several steps are added to enhance the stability and accuracy of the phase unwrapping process, and the algorithm is accelerated by using the Intel Threading Building Blocks (TBB) library for parallel computing to complete the phase unwrapping of the original resolution phase image. This method can reduce the time required for the overall algorithm and improve the efficiency of the phase unwrapping using the quality map-guided method.

[0236] Embodiment three:

[0237] This embodiment also provides a computer-readable storage medium, in which at least one instruction is stored. The instruction is loaded and executed by a processor to implement a single-frequency wrapped phase unwrapping method based on downsampling as described in the first embodiment.

[0238] Since the method of single-frequency wrapped phase unwrapping based on downsampling has been described in detail in the first embodiment, it will not be repeated in this embodiment.

[0239] Embodiment 4:

[0240] The present invention also provides a computer program product, including a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, a method for single-frequency wrapped phase unwrapping based on downsampling as described in Example 1 is implemented.

[0241] Since the method of single-frequency wrapped phase unwrapping based on downsampling has been described in detail in the first embodiment, it will not be repeated in this embodiment.

[0242] Those skilled in the art can understand that all or part of the steps of the above embodiments can be completed by hardware, or by a program to instruct the relevant hardware to complete, and the program can be stored in a computer-readable storage medium, and the storage medium mentioned above can be a read-only memory, a disk or an optical disk, etc. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0243] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for single-frequency wrapped phase unwrapping based on downsampling, characterized in that: include: Step 110, obtaining a main value phase diagram obtained after phase wrapping calculation; Step 120, downsampling the acquired principal value phase image to obtain a sub-image; wherein the size of the sub-image is 1 / n of the size of the principal value phase image, n is the sampling step of the image downsampling, and n≥2; Step 130: unfolding the single-frequency wrapped phase of the sub-image using a quality map-guided method to obtain an unfolded phase value of each pixel point of the sub-image; Step 140, according to the unfolded phase value of the pixel point of the sub-image, obtain the level number k of the rectangular lattice to which the pixel point in the principal value phase map corresponding to the pixel point of the sub-image belongs; Step 150: Perform k-order phase unfolding on the rectangular dot matrix of the principal value phase map, calculate the absolute phase values ​​of all the pixel points in the rectangular dot matrix according to the order k, and fill them.

2. The method for single-frequency wrapped phase unwrapping based on downsampling according to claim 1, characterized in that: After step 150, the following steps are also included: Step 160, determine whether n is greater than 2; if so, first execute step 161, then execute step 162; if not, execute step 162; Step 161, using a quality map-oriented method to perform phase unwrapping on the principal value phase map; Step 162, determining whether the phase difference of adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range; if so, executing step 1621; if not, executing step 1622; Step 1621, the current absolute phase value of the pixel point remains unchanged; Step 1622: correct the current absolute phase value of the pixel in the rectangular dot matrix, and use the corrected absolute phase value to overwrite the current absolute phase value of the pixel.

3. The method for single-frequency wrapped phase unwrapping based on downsampling according to claim 2, characterized in that: Step 130 specifically includes: Initialize a priority queue for storing the pixel points to be processed and their corresponding truncated phase difference absolute values, and set the priority queue to be arranged in descending order according to the magnitude of the truncated phase difference absolute values; Select the pixel point (i, j) in the sub-image as the starting point of phase unwrapping, set its initial truncated phase difference to 0 and push it into the queue; push the pixel point (i, j) and its truncated phase difference out of the queue for four-connectivity search, and perform phase unwrapping on the pixels in the four neighborhoods of the pixel point (i, j) respectively; Then, the pixel points after phase expansion in the four neighborhoods and their corresponding truncated phase difference absolute values ​​are queued and arranged in descending order, and the size of the truncated phase difference absolute value is used as the quality size of the quality map; as long as the queue is not empty, the point with the highest quality in the current queue is dequeued, and the pixel points in the four neighborhoods of the dequeued pixel point that have not been queued and phase expanded are phase expanded and queued until the queue is empty, and the expanded phase value of each pixel point in the sub-image is obtained.

4. The method for single-frequency wrapped phase unwrapping based on downsampling according to claim 3, characterized in that: The absolute phase calculation method of the pixel points expanded into the sub-image is: Wherein, Φ(m) is the absolute phase value of the mth point, Φ(0) is the wrapped phase value of the starting point of phase unwrapping, and Φ(n) is the absolute phase value of the nth pixel point of the sub-image; △{} is the difference operator, defined as: Δ{Φ(n)}=Φ(n+1)-Φ(n); Φ(n+1) is the absolute phase value of the n+1th pixel of the sub-image; W{} is the truncation operator, defined as: W{Φ(n)}=Φ(n)-2π*round{Φ(n) / 2π}; round{} is the rounding operator.

5. The method for single-frequency wrapped phase unwrapping based on downsampling according to claim 4, characterized in that: Assume that the level number of the corresponding pixel point (i*n, j*n) of the sub-image pixel point (i, j) in the main value phase map is k(i*n, j*n), and the calculation method of k(i*n, j*n) is: k(i*n,j*n)=round{|Φ(i,j)-φ(i*n,j*n)| / 2π}; Among them, n is the sampling step of image downsampling, Φ(i, j) is the absolute phase value of the pixel point (i, j) of the sub-image, φ(i*n, j*n) is the wrapped phase value of the corresponding pixel point (i*n, j*n) of the pixel point (i, j) of the sub-image in the main value phase map, || is the absolute value operator, and round{} is the rounding operator.

6. The method for single-frequency wrapped phase unwrapping based on downsampling according to claim 5, characterized in that: Step 150 specifically includes: According to k(i*n, j*n), the absolute phases of all the pixels in the rectangular lattice [(i*n, j*n), (i*n+n-1, j*n+n-1)] in the principal value phase map are calculated and filled respectively; where point (i*n, j*n) is the upper left vertex in the rectangular lattice, and point (i*n+n-1, j*n+n-1) is the lower right vertex in the rectangular lattice. The absolute phase calculation method of the ath pixel in the rectangular lattice is: Φ(a)=φ(a)+2πk(i*n,j*n); Φ(a) is the absolute phase value of the a-th pixel, and φ(a) is the wrapped phase value of the a-th pixel.

7. The method for single-frequency wrapped phase unwrapping based on downsampling according to claim 6, characterized in that: The adjacent point phase difference includes the first adjacent point phase difference and the second adjacent point phase difference; the difference range is set to [-π, π]; The first adjacent point phase difference is expressed as: ΔΦ(c1)=Φ(x,y)-Φ(x,y-1); ΔΦ(c1) is the difference in absolute phase value between the pixel point (x, y) and its left neighbor point (x, y-1) in the rectangular lattice; The second adjacent point phase difference is expressed as: ΔΦ(c2)=Φ(x,y)-Φ(x-1,y); ΔΦ(c2) is the difference in absolute phase value between the pixel point (x, y) and its upper neighbor point (x-1, y) in the rectangular lattice; The step of judging whether the phase difference between adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range is as follows: If ΔΦ(c1)>π, the absolute phase value of the pixel point (x, y) is corrected to: Φ(x, y) = Φ(x, y) - 2π; If ΔΦ(c1)<-π, the absolute phase value of the pixel point (x, y) is corrected to: Φ(x, y) = Φ(x, y) + 2π; If ΔΦ(c2)>π, the absolute phase value of the pixel point (x, y) is corrected to: Φ(x, y) = Φ(x, y) - 2π; If ΔΦ(c2)<-π, the absolute phase value of the pixel (x, y) is corrected to: Φ(x,y)=Φ(x,y)+2π.

8. The method for single-frequency wrapped phase unwrapping based on downsampling according to claim 7, characterized in that: Step 130 is specifically implemented as follows: using the nearest neighbor interpolation method to perform image downsampling on the acquired main value phase image to obtain a sub-image, including: Create a new image with the same data type as the original main value phase image but with a size reduced by n times to store the downsampled image data; Traverse each row and column of the original principal value phase map, let the variable i represent the row index currently being processed, and the variable j represent the column index currently being processed. For each pixel point (i*n, j*n) in the original principal value phase map, assign its value directly to the corresponding pixel point (i, j) in the new image to obtain the sub-image.

9. The method for single-frequency wrapped phase unwrapping based on downsampling according to claim 1, characterized in that: Step 140 specifically includes: Traverse all rows and columns of the sub-image, and divide the entire sub-image space into multiple sub-ranges; wherein each sub-range can be executed independently on different threads; By means of multi-threaded parallel processing, the hierarchy number k of the rectangular lattice to which the pixel points in the principal value phase image corresponding to the pixel points in each sub-range belong is obtained.

10. The method for single-frequency wrapped phase unwrapping based on downsampling according to claim 2, characterized in that: Step 140 and steps subsequent to step 140 all use the TBB parallel algorithm for accelerated processing.

11. A system for single-frequency wrapped phase unwrapping based on downsampling, characterized in that: include: A storage unit, used for acquiring and storing a main value phase diagram obtained after phase wrapping calculation; A downsampling unit, electrically connected to the storage unit, for performing image downsampling on the acquired main value phase image to obtain a sub-image; wherein the size of the sub-image is 1 / n of the size of the main value phase image, n is a sampling step of image downsampling, and n≥2; A sub-image phase unwrapping unit, electrically connected to the downsampling unit, for unwrapping the single-frequency wrapped phase of the sub-image using a quality map-guided method to obtain an unwrapped phase value of each pixel point of the sub-image; A layer number calculation unit, electrically connected to the phase unwrapping unit, for obtaining the layer number k of the rectangular dot matrix to which the pixel point in the main value phase map corresponding to the pixel point of the sub-image belongs according to the unwrapped phase value of the pixel point of the sub-image; The main value phase map phase unwrapping unit is electrically connected to the level number calculation unit and is used to perform k-order phase unwrapping on the rectangular dot matrix of the main value phase map, calculate the absolute phase values ​​of all pixel points in the rectangular dot matrix according to the level number k, and fill them.

12. The system for single-frequency wrapped phase unwrapping based on downsampling according to claim 11, characterized in that: The main value phase diagram phase unwrapping unit is also electrically connected to a rechecking unit; The rechecking unit is used to determine whether n is greater than 2; and If n=2, determine whether the phase difference between adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range; If n>2, the quality map-oriented method is first used to perform phase expansion on the principal value phase map, and then it is determined whether the phase difference of the neighboring points of the pixel point in the rectangular dot matrix is ​​within the predetermined difference range; After determining whether the phase difference between adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range, the rechecking unit is further used to: If the phase difference between adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range, the current absolute phase value of the pixel remains unchanged; If the phase difference of adjacent points of a pixel point in the rectangular dot matrix is ​​not within the predetermined difference range, the current absolute phase value of the pixel point in the rectangular dot matrix is ​​corrected, and the corrected absolute phase value overwrites the current absolute phase value of the pixel point.

13. The system for single-frequency wrapped phase unwrapping based on downsampling according to claim 12, characterized in that: The sub-image phase unwrapping unit is specifically used for: Initialize a priority queue for storing the pixel points to be processed and their corresponding truncated phase difference absolute values, and set the priority queue to be arranged in descending order according to the magnitude of the truncated phase difference absolute values; Select the pixel point (i, j) in the sub-image as the starting point of phase unwrapping, set its initial truncation phase difference to 0 and push it into the queue; Push the pixel point (i, j) and its truncated phase difference out of the queue for four-connectivity search, and perform phase unwrapping on the pixels in the four neighborhoods of the pixel point (i, j) respectively; Then, the pixel points after the phase expansion of the four neighborhoods and their corresponding absolute values ​​of the truncated phase difference are queued and arranged in descending order, and the absolute value of the truncated phase difference is used as the quality size of the quality map; As long as the queue is not empty, the point with the highest quality in the current queue is removed from the queue, and the pixel points in the four neighborhoods of the removed pixel points that have not been queued and phase-unwrapped are phase-unwrapped and added to the queue until the queue is empty, and the unwrapped phase value of each pixel in the sub-image is obtained.

14. The system for single-frequency wrapped phase unwrapping based on downsampling according to claim 13, characterized in that: The absolute phase calculation method of the pixel points expanded into the sub-image is: Wherein, Φ(m) is the absolute phase value of the mth point, Φ(0) is the wrapped phase value of the starting point of phase unwrapping, and Φ(n) is the absolute phase value of the nth pixel point of the sub-image; △{} is the difference operator, defined as: Δ{Φ(n)}=Φ(n+1)-Φ(n); Φ(n+1) is the absolute phase value of the n+1th pixel of the sub-image; W{} is the truncation operator, defined as: w{Φ(n)}=Φ(n)-2π*round{φ(n) / 2π}; round{} is the rounding operator.

15. The system for single frequency wrapping phase unwrapping based on downsampling according to claim 14, characterized in that: Assume that the level number of the corresponding pixel point (i*n, j*n) of the sub-image pixel point (i, j) in the main value phase map is k(i*n, j*n), and the calculation method of k(i*n, j*n) is: k(i*n,j*n)=round{|Φ(i,j)-Φ(i*n,j*n)| / 2π}; Among them, n is the sampling step of image downsampling, Φ(i, j) is the absolute phase value of the pixel point (i, j) of the sub-image, φ(i*n, j*n) is the wrapped phase value of the corresponding pixel point (i*n, j*n) of the pixel point (i, j) of the sub-image in the main value phase map, || is the absolute value operator, and round{} is the rounding operator.

16. The system for single-frequency wrapped phase unwrapping based on downsampling according to claim 15, characterized in that: The main value phase diagram phase unwrapping unit is specifically used for: According to k(i*n, j*n), the absolute phases of all the pixels in the rectangular lattice [(i*n, j*n), (i*n+n-1, j*n+n-1)] in the principal value phase map are calculated and filled respectively; where point (i*n, j*n) is the upper left vertex in the rectangular lattice, and point (i*n+n-1, j*n+n-1) is the lower right vertex in the rectangular lattice. The absolute phase calculation method of the ath pixel in the rectangular lattice is: Φ(a)=φ(a)+2πk(i*n,j*n); Φ(a) is the absolute phase value of the a-th pixel, and φ(a) is the wrapped phase value of the a-th pixel.

17. The system for single-frequency wrapped phase unwrapping based on downsampling according to claim 16, characterized in that: The adjacent point phase difference includes the first adjacent point phase difference and the second adjacent point phase difference; the difference range is set to [-π, π]; The first adjacent point phase difference is expressed as: ΔΦ(c1)=Φ(x,y)-Φ(x,y-1); ΔΦ(c1) is the difference in absolute phase value between the pixel point (x, y) and its left neighbor point (x, y-1) in the rectangular lattice; The second adjacent point phase difference is expressed as: ΔΦ(c2)=Φ(x,y)-Φ(x-1,y); ΔΦ(c2) is the difference in absolute phase value between the pixel point (x, y) and its upper neighbor point (x-1, y) in the rectangular lattice; The step of judging whether the phase difference between adjacent pixels in the rectangular dot matrix is ​​within a predetermined difference range is as follows: If ΔΦ(c1)>π, the absolute phase value of the pixel point (x, y) is corrected to: Φ(x, y) = Φ(x, y) - 2π: If ΔΦ(c1)<-π, the absolute phase value of the pixel point (x, y) is corrected to: Φ(x, y) = Φ(x, y) + 2π; If ΔΦ(c2)>π, the absolute phase value of the pixel point (x, y) is corrected to: Φ(x, y) = Φ(x, y) - 2π; If ΔΦ(c2)<-π, the absolute phase value of the pixel (x, y) is corrected to: Φ(x,y)=Φ(x,y)+2π.

18. The system for single-frequency wrapped phase unwrapping based on downsampling according to claim 17, characterized in that: The sub-image phase unwrapping unit is specifically used to perform image downsampling on the acquired main value phase image using the nearest neighbor interpolation method to obtain a sub-image, including: Create a new image with the same data type as the original main value phase image but with a size reduced by n times to store the downsampled image data; Traverse each row and column of the original principal value phase map, let the variable i represent the row index currently being processed, and the variable j represent the column index currently being processed. For each pixel point (i*n, j*n) in the original principal value phase map, assign its value directly to the corresponding pixel point (i, j) in the new image to obtain the sub-image.

19. The system for single-frequency wrapped phase unwrapping based on downsampling according to claim 11, characterized in that: The layer number calculation unit is specifically used for: Traverse all rows and columns of the sub-image, and divide the entire sub-image space into multiple sub-ranges; wherein each sub-range can be executed independently on different threads; By means of multi-threaded parallel processing, the hierarchy number k of the rectangular lattice to which the pixel points in the principal value phase image corresponding to the pixel points in each sub-range belong is obtained.

20. The system for single-frequency wrapped phase unwrapping based on downsampling according to claim 12, characterized in that: The layer number calculation unit, the main value phase diagram phase unwrapping unit and the recheck unit are all electrically connected to the TBB library, and the TBB parallel algorithm in the TBB library can accelerate the processing speed of the layer number calculation unit, the main value phase diagram phase unwrapping unit and the recheck unit.

21. A computer-readable storage medium, wherein at least one instruction is stored in the storage medium, characterized in that: The instructions are loaded and executed by the processor to implement a method for single-frequency wrapped phase unwrapping based on downsampling as described in any one of claims 1-10.

22. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, a method for single-frequency wrapped phase unwrapping based on downsampling as described in any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Phase unwrapping method based on quality map

    CN107730491A

  • Discontinuous region phase unwrapping method and device

    CN117576039A

  • A deep learning-based temporal phase unwrapping method for fringe projection profilometry

    US20210356258A1