A method, system, computer-readable storage medium, and computer program product for single frequency unwrapping based on down-sampling

By downsampling the principal phase map and using multi-threaded parallel processing, the problem of excessive computation time in the single-frequency wrapping phase unwrapping algorithm is solved, achieving fast and efficient phase unwrapping and improving the efficiency and accuracy of phase unwrapping.

CN119919533BActive Publication Date: 2025-11-04GUANGDONG AOPUTE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing single-frequency wrapping phase unwrapping algorithms have excessively long computation time in phase calculation, resulting in low phase unwrapping efficiency and failing to meet the requirements for speed and efficiency.

Method used

The principal phase map is downsampled to obtain a sub-image. The sub-image is then subjected to single-frequency wrapping phase unwrapping using the quality map-guided method. The hierarchy number and absolute phase value of the rectangular dot matrix are calculated through multi-threaded parallel processing, and the TBB parallel algorithm is used to accelerate the processing.

Benefits of technology

It significantly reduces the overall algorithm's computation time, improves the efficiency and accuracy of phase unfolding, reduces the hierarchical judgment error caused by neighboring point phase differences, and increases computation speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919533B_ABST
    Figure CN119919533B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image processing, and discloses a method, a system, a computer readable storage medium and a computer program product for single-frequency wrapped phase unwrapping based on down-sampling. The method comprises the following steps: performing image down-sampling on an acquired main-value phase map to obtain a sub-image; adopting a quality map guided method to perform unwrapping on the single-frequency wrapped phase of the sub-image; according to the unwrapped phase value of a pixel point of the sub-image, obtaining the order number k of a rectangular lattice to which a pixel point in the main-value phase map corresponding to the pixel point of the sub-image belongs; performing k-order phase unwrapping on the rectangular lattice of the main-value phase map; and according to the order number k, calculating the absolute phase value of all pixel points in the rectangular lattice and filling the same. The application combines the down-sampling method with the single-frequency wrapped phase unwrapping method, improves the sampling efficiency, has low requirements on computing power, small calculation amount, small time consumption of the algorithm, high speed, reduces the required time of the overall algorithm, and improves the efficiency of the quality map guided phase unwrapping.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of image processing, and in particular to a method and system for single-frequency wrapped phase unwrapping based on down-sampling, a computer readable storage medium and a computer program product. BACKGROUND

[0002] In recent years, with the rapid development of computer technology and optics, optical three-dimensional topography measurement technology has been widely applied in industrial three-dimensional measurement, cultural heritage protection, reverse engineering, quality control, medical diagnosis and many other fields.

[0003] Among them, the grating projection three-dimensional surface measurement method based on phase analysis has been deeply researched and widely applied because of its non-contact, fast measurement speed, high precision and other advantages. This kind of method uses a projector to project a set of grating images with sinusoidal intensity distribution to the measured object, and uses a camera to simultaneously shoot the deformed grating image modulated by the measured object surface. Then, by analyzing the obtained deformed fringe pattern, the corresponding absolute phase value is calculated to calculate the three-dimensional point cloud data of the measured object surface to reconstruct the three-dimensional surface distribution of the measured object. Since the phase demodulation in the phase calculation is obtained by the inverse tangent function operation, the calculated phase value is truncated within the function principal value range (-π, π], which is jagged and discontinuous, and does not have uniqueness, so phase unwrapping must be performed to obtain continuous absolute phase.

[0004] Phase unwrapping refers to the process of unwrapping the truncated phase image into a continuous and real distribution phase image. Among them, the single-frequency wrapped phase unwrapping algorithm can use the QGPU (Quality Guided Phase Unwrapping) based on path correlation for unwrapping. This method relies on the phase values between adjacent pixel points in space to restore the absolute phase, so it needs to traverse all the pixel points of the phase image for phase unwrapping, which leads to a sharp increase in calculation time and reduces the efficiency of phase unwrapping.

[0005] Therefore, how to reduce the required time of the overall algorithm and improve the efficiency of the QGPU phase unwrapping has become a technical problem to be solved by those skilled in the art. SUMMARY

[0006] The present application aims to provide a method and system for single-frequency wrapped phase unwrapping based on down-sampling, a computer readable storage medium and a computer program product to solve or at least partially solve the technical problems mentioned in the background.

[0007] To achieve this purpose, the present application adopts the following technical solutions:

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

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

[0010] Step 120, performing image down-sampling on the obtained main-value phase map to obtain a sub-image; wherein the size of the sub-image is 1 / n of the size of the main-value phase map, n is a sampling step of image down-sampling, and n≥2;

[0011] Step 130, using a quality map guided method to unwrap the single-frequency wrapped phase of the sub-image to obtain unwrapped phase values of each pixel point of the sub-image;

[0012] Step 140, according to the unwrapped phase values of the pixel points of the sub-image, obtaining the order number k of the rectangular lattice to which the pixel points in the main-value phase map corresponding to the pixel points of the sub-image belong;

[0013] Step 150, performing k-order phase unwrapping on the rectangular lattice of the main-value phase map, and calculating and filling the absolute phase values of all pixel points in the rectangular lattice according to the order number k.

[0014] Optionally, after step 150, the method further comprises:

[0015] Step 160, determining whether n is greater than 2; if yes, performing step 161 first and then performing step 162; if no, performing step 162;

[0016] Step 161, performing phase unwrapping on the main-value phase map again using the quality map guided method;

[0017] Step 162, determining whether the phase difference of the neighboring pixel points of the pixel points in the rectangular lattice is within a predetermined difference range; if yes, performing step 1621; if no, performing step 1622;

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

[0019] Step 1622, correcting the current absolute phase value of the pixel point in the rectangular lattice, and covering the corrected absolute phase value with the current absolute phase value of the pixel point.

[0020] Optionally, step 130 specifically comprises:

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

[0022] Selecting a pixel point (i, j) in the sub-image as a phase unwrapping starting point, setting its initial truncated phase difference as 0 and pushing it into a queue; pushing the pixel point (i, j) and its truncated phase difference out of the queue to perform a four-connectedness search, and performing phase unwrapping on the pixel points in the four-neighbor domain of the pixel point (i, j) respectively;

[0023] Arranging the pixel points in the four-neighbor domain after phase unwrapping and their corresponding absolute values of the truncated phase difference in a queue in descending order, taking the size of the absolute value of the truncated phase difference as the quality size of the quality map; as long as the queue is not empty, taking out the point with the highest quality in the current queue, and performing phase unwrapping on the pixel points in the four-neighbor domain of the taken-out pixel point which have not been put into the queue and have not been unwrapped, and putting them into the queue, until the queue is empty, to obtain the unwrapped phase values of the pixel points in the sub-image.

[0024] Optionally, the method for calculating the absolute phase of the pixel points in the sub-image is as follows:

[0025]

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

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

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

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

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

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

[0032] round{} is a rounding operator.

[0033] Optionally, the number of the order in which the pixel point (i*n, j*n) corresponding to the pixel point (i, j) in the sub-image is located in the primary value phase map is k(i*n, j*n), and the calculation method of k(i*n, j*n) is as follows:

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

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

[0036] Optionally, the step 150 specifically comprises:

[0037] According to k(i*n, j*n), absolute phase calculation and filling are respectively performed on all pixel points in a rectangular lattice [(i*n, j*n), (i*n+n-1, j*n+n-1)] in the principal value phase map; wherein the point (i*n, j*n) is a top-left vertex in the rectangular lattice, the point (i*n+n-1, i*n+n-1) is a bottom-right vertex in the rectangular lattice, and an absolute phase calculation method of an a-th pixel point in the rectangular lattice is:

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

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

[0040] Optionally, the neighbor point phase difference comprises a first neighbor point phase difference and a second neighbor point phase difference; and the difference value range is set as [-π, π];

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

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

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

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

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

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

[0047] The judgment of whether the neighbor point phase difference of the pixel point in the rectangular lattice is in the predetermined difference value range is specifically:

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

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

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

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

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

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

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

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

[0056] Optionally, the step 120 is implemented as: using a nearest neighbor interpolation method to image down-sample the acquired primary value phase map to obtain a sub-image, including:

[0057] A new image with the same data type as the original primary value phase map but with a size reduced by n times is created to store the down-sampled image data;

[0058] Each row and each column of the original primary value phase map is traversed, a variable i represents the row index currently processed, and a variable j represents the column index currently processed. For each pixel point (i*n, j*n) in the original primary value phase map, the value thereof is directly assigned to the corresponding pixel point (i, j) in the new image to obtain the sub-image.

[0059] Optionally, the step 140 specifically includes:

[0060] All rows and columns of the sub-image are traversed to divide the entire sub-image space into a plurality of sub-ranges; wherein each sub-range can be independently executed on different threads;

[0061] The number of orders k of the rectangular lattice to which the pixel point in each sub-range corresponds in the primary value phase map is obtained through a multi-thread parallel processing manner.

[0062] Optionally, the step 140 and the steps after the step 140 are processed by using a TBB parallel algorithm for acceleration.

[0063] In a second aspect, the present application provides a system for unwrapping single frequency wrapped phase based on down-sampling, including:

[0064] A storage unit is configured to acquire and store a primary value phase map obtained after phase unwrapping calculation;

[0065] a downsampling unit electrically connected to the storage unit, configured to perform image downsampling on the obtained primary value phase map to obtain a sub-image, wherein a size of the sub-image is 1 / n of a size of the primary value phase map, n is a sampling step of the image downsampling, and n≥2;

[0066] a sub-image phase unwrapping unit electrically connected to the downsampling unit, configured to perform unwrapping on single-frequency wrapped phases of the sub-image by using a quality map guided method to obtain unwrapped phase values of each pixel point of the sub-image;

[0067] a layer number calculation unit electrically connected to the phase unwrapping unit, configured to obtain, according to the unwrapped phase values of the pixel points of the sub-image, a layer number k of a rectangular lattice to which a pixel point in the primary value phase map corresponding to the pixel point of the sub-image belongs;

[0068] a primary value phase map phase unwrapping unit electrically connected to the layer number calculation unit, configured to perform k-order phase unwrapping on the rectangular lattice of the primary value phase map, and calculate and fill absolute phase values of all pixel points in the rectangular lattice according to the layer number k.

[0069] Optionally, the primary value phase map phase unwrapping unit is further electrically connected to a rechecking unit.

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

[0071] if n=2, determine whether a neighbor phase difference of a pixel point in the rectangular lattice is within a predetermined difference range;

[0072] if n>2, perform phase unwrapping on the primary value phase map again by using the quality map guided method, and then determine whether the neighbor phase difference of the pixel point in the rectangular lattice is within the predetermined difference range;

[0073] after determining whether the neighbor phase difference of the pixel point in the rectangular lattice is within the predetermined difference range, the rechecking unit is further configured to:

[0074] if the neighbor phase difference of the pixel point in the rectangular lattice is within the predetermined difference range, maintain the current absolute phase value of the pixel point unchanged;

[0075] if the neighbor phase difference of the pixel point in the rectangular lattice is not within the predetermined difference range, correct the current absolute phase value of the pixel point in the rectangular lattice, and cover the corrected absolute phase value on the current absolute phase value of the pixel point.

[0076] Optionally, the sub-image phase unwrapping unit is specifically configured to:

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

[0078] Select a pixel point (i, j) in the sub-image as a phase unwrapping starting point, 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 to perform a four-connectedness search, and perform phase unwrapping on the pixel points in the four-neighbor domain of the pixel point (i, j) respectively;

[0079] Then, arrange the pixel points in the four-neighbor domain after phase unwrapping and their corresponding absolute values of the truncated phase difference in the queue in descending order, and take the size of the absolute value of the truncated phase difference as the quality of the quality map; as long as the queue is not empty, dequeue the pixel point with the highest quality in the current queue, and perform phase unwrapping on the pixel points in the four-neighbor domain of the dequeued pixel point which have not been enqueued and have not been phase unwrapped, and enqueue them, until the queue is empty, to obtain the unwrapped phase values of the pixel points in the sub-image.

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

[0081]

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

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

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

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

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

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

[0088] round{} is a rounding operator.

[0089] Optionally, the number of orders of the corresponding pixel point (i*n, j*n) of the pixel point (i, j) in the sub-image in the principal value phase map is k(i*n, j*n), and the calculation method of k(i*n, j*n) is as follows:

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

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

[0092] Optionally, the principal value phase map phase unwrapping unit is specifically configured to:

[0093] According to k(i*n, j*n), absolute phase calculation and filling are respectively performed on all pixel points in a rectangular lattice [(i*n, j*n), (i*n+n-1, j*n+n-1)] in the principal value phase map; wherein the point (i*n, j*n) is a top-left vertex in the rectangular lattice, the point (i*n+n-1, j*n+n-1) is a bottom-right vertex in the rectangular lattice, and an absolute phase calculation method of an a-th pixel point in the rectangular lattice is:

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

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

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

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

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

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

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

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

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

[0103] The judgment of whether the neighbor point phase difference of the pixel point in the rectangular lattice is in the predetermined difference value range is specifically:

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

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

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

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

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

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

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

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

[0112] Optionally, the sub-image phase unwrapping unit is specifically configured to perform image down-sampling on the acquired primary value phase map using a nearest neighbor interpolation method to obtain a sub-image, including:

[0113] A new image with the same data type as the original primary value phase map but with a size reduced by n times is created for storing the down-sampled image data;

[0114] Each row and each column of the original primary value phase map is traversed, a variable i represents the row index currently processed, and a variable j represents the column index currently processed. For each pixel point (i*n, j*n) in the original primary value phase map, the value thereof is directly assigned to a corresponding pixel point (i, j) in the new image to obtain the sub-image.

[0115] Optionally, the order number calculation unit is specifically configured to:

[0116] All rows and columns of the sub-image are traversed to divide the entire sub-image space into a plurality of sub-ranges; wherein each sub-range can be independently executed on different threads;

[0117] The order number k of the rectangular lattice to which the pixel point in each sub-range corresponds in the primary value phase map is obtained through a multi-thread parallel processing manner.

[0118] Optionally, the order number calculation unit, the primary value phase map phase unwrapping unit, and the re-inspection unit are electrically connected to a TBB library, and a TBB parallel algorithm in the TBB library can accelerate the processing speed of the order number calculation unit, the primary value phase map phase unwrapping unit, and the re-inspection unit.

[0119] In a third aspect, the present application further provides a computer readable storage medium, the storage medium storing at least one instruction, the instruction being loaded and executed by a processor to implement a method for unwrapping a single frequency wrapped phase based on down-sampling as described above.

[0120] Fourthly, 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, it implements the above-described method for single-frequency wrap-around phase expansion based on downsampling.

[0121] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0122] This invention provides a method for single-frequency wrap-around phase expansion based on downsampling. By combining downsampling with single-frequency wrap-around phase expansion, the sampling efficiency is improved. It does not require high computing power, has a small computational load, and the algorithm has a short processing time and high speed, thus reducing the overall algorithm time and improving the efficiency of phase expansion using the quality map guided method. Attached Figure Description

[0123] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0124] Figure 1 A flowchart of a single-frequency wrap-around phase expansion method based on downsampling provided in an embodiment of the present invention.

[0125] Figure 2 A flowchart of another method for single-frequency wrapping phase expansion based on downsampling provided in an embodiment of the present invention.

[0126] Figure 3 This is a schematic diagram of the architecture of a single-frequency wrap-around phase expansion system based on downsampling, provided for an embodiment of the present invention.

[0127] Figure 4 This invention provides a principal phase image with an image width and height of 2448*2048.

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

[0129] Figure 6 To Figure 5 The image obtained after phase unrolling.

[0130] Figure 7 This is a schematic diagram of the absolute phase values ​​of a rectangular dot matrix in a principal phase diagram before filling, provided as an embodiment of the present invention.

[0131] Figure 8 Absolute phase value diagram of the rectangular dot array obtained after absolute phase calculation and filling. Figure 6 Absolute phase value diagram of the rectangular dot array obtained after absolute phase calculation and filling.

[0132] Figure 9 Absolute phase value diagram of the rectangular dot array obtained after absolute phase calculation and filling. Figure 7 Absolute phase value diagram of the rectangular dot array obtained after absolute phase calculation and filling.

[0133] Figure 10 Image obtained after phase unwrapping of the primary value phase image with image width and height of 2448*2048 provided by the embodiment of the present application.

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

[0135] Figure 12 Phase unwrapping diagram after optimization of the wrapped phase in the image. Figure 4 Phase unwrapping diagram after optimization of the wrapped phase in the image.

[0136] Figure 13 Phase difference value image obtained by subtracting the phase unwrapping diagrams of Figure 12 and Figure 11 .

[0137] Figure 14 Wrapped phase image with image resolution of 4096*3000 provided by the embodiment of the present application.

[0138] Figure 15 Comparison result display diagram of time consumption required for phase unwrapping of Figure 4 and Figure 14 .

[0139] In the diagram:

[0140] 10, photographing assembly; 20, storage unit; 30, model construction unit; 40, image alignment calculation unit; 50, image cropping unit; 60, image fusion unit. DETAILED DESCRIPTION

[0141] In order to make the invention purposes, features and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the embodiments described below are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0142] Embodiment one:

[0143] Please refer to Figure 1 , Figure 1 A flowchart of a method for unwrapping single frequency wrapped phase based on down-sampling is provided for an embodiment of the present application, which specifically comprises:

[0144] Step 110, obtaining a main value phase map obtained after phase wrapping calculation.

[0145] Step 120, image down-sampling is performed on the obtained main value phase map to obtain a sub-image.

[0146] Specifically, the nearest neighbor interpolation method is used to perform image down-sampling on the obtained main value phase map to obtain a sub-image, and the implementation manner specifically comprises:

[0147] First, a new image with the same data type as the original main value phase map but with the size reduced by n times is created, which is used to store the image data after down-sampling;

[0148] Then, each row and each column of the original main value phase map is traversed, where a variable i represents the row index currently processed, and a variable j represents the column index currently processed. For each pixel point (i*n, j*n) in the original main value phase map, the value thereof is directly assigned to the corresponding pixel point (i, j) in the new image to obtain the sub-image.

[0149] Wherein, the size of the sub-image is 1 / n of the size of the main value phase map, n is the sampling step length of image down-sampling, and n≥2.

[0150] Exemplarily, as shown in Figure 4 and Figure 5 , Figure 4 A main value phase map with an image width and height of 2448*2048 is provided for an embodiment of the present application, Figure 5 A sub-image obtained by down-sampling the main value phase map with a sampling step length n=4. Figure 3

[0151] Step 130, using the quality map guided method to unwrap the single frequency wrapped phase of the sub-image to obtain the unwrapped phase value of each pixel point of the sub-image.

[0152] Specifically, the implementation manner of step 130 specifically comprises:

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

[0154] ​Then, a pixel point (i, j) in the sub-image is selected as a phase unwrapping starting point, an initial cut-off phase difference of the pixel point (i, j) is set as 0 and the pixel point (i, j) is pushed into a queue; the pixel point (i, j) and the cut-off phase difference of the pixel point (i, j) are pushed out of the queue to perform a four-connectedness search, and pixel points in a four-neighbor domain of the pixel point (i, j) are respectively subjected to phase unwrapping;

[0155] Finally, pixel points in the four-neighbor domain after phase unwrapping and corresponding absolute values of the cut-off phase differences of the pixel points are queued to be arranged in descending order, and the absolute values of the cut-off phase differences are taken as quality sizes of a quality map.

[0156] As long as the queue is not empty, a point with the highest quality in the current queue is dequeued, and pixel points in a four-neighbor domain of the dequeued pixel point which are not queued and not subjected to phase unwrapping are subjected to phase unwrapping and queued, until the queue is empty, to obtain unwrapped phase values of the pixel points in the sub-image.

[0157] More specifically, in the embodiment, an absolute phase calculation method of the pixel points in the sub-image is as follows:

[0158]

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

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

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

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

[0163] W{} is a cut-off operator, and is defined as:

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

[0165] round{} is a rounding operator.

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

[0167] In step 140, according to the unwrapped phase values of the pixel points in the sub-image, a number k of levels of a rectangular lattice to which the pixel points in a primary value phase map corresponding to the pixel points in the sub-image belong is obtained.

[0168] For the convenience of description, it is assumed that the order number 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 k(i*n, j*n);

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

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

[0171] wherein, n is the sampling step of image down-sampling, Φ(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 and j = 4, Φ(i, j) = 3.9483, φ(i*n, j*n) = -2.3349, and k(16, 16) = 1.

[0173] Step 150, performing k-order phase unwrapping on the rectangular lattice of the main value phase map, and calculating the absolute phase values of all pixel points in the rectangular lattice according to the order number k and filling.

[0174] Specifically, according to k(i*n, j*n), the absolute phase of all pixel points in the rectangular lattice [(i*n, j*n), (i*n+n-1, j*n+n-1)] in the main value phase map is calculated and filled respectively.

[0175] wherein, the point (i*n, j*n) is the top-left vertex of the rectangular lattice, the point (i*n+n-1, j*n+n-1) is the bottom-right vertex of the rectangular lattice, and the absolute phase calculation method of the a-th pixel point in the rectangular lattice is as follows:

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

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

[0178] For example, refer to Figure 7 and Figure 8 When k(16, 16) = 1, the rectangular lattice [(16, 16), (19, 19)] before filling is as shown in Figure 7 and the rectangular lattice [(16, 16), (19, 19)] after absolute phase calculation and filling is as shown in Figure 8 .

[0179] Please refer to Figure 7 and Figure 8 , Figure 7 An absolute phase value schematic diagram of a rectangular lattice in a main value phase map before filling is provided for an embodiment of the present application, Figure 8 An absolute phase value schematic diagram of a rectangular lattice obtained after absolute phase calculation and filling is provided for Figure 6 .

[0180] Please refer to Figure 2 , Figure 2 Another method flowchart based on down-sampling single frequency wrapped phase unwrapping provided for an embodiment of the present application is provided;

[0181] As a more preferred embodiment, step 150 is followed by:

[0182] Step 160, determining whether n is greater than 2; if yes, performing step 161 first, and then performing step 162; if no, performing step 162.

[0183] Step 161, using a quality map guided method to perform phase unwrapping on the main value phase map again.

[0184] Step 162, determining whether the neighbor phase difference of the pixel point in the rectangular lattice is within a predetermined difference range; if yes, performing step 1621; if no, performing step 1622.

[0185] Step 1621, maintaining the current absolute phase value of the pixel point unchanged.

[0186] Step 1622, correcting the current absolute phase value of the pixel point in the rectangular lattice, and covering the corrected absolute phase value with the current absolute phase value of the pixel point.

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

[0188] The first neighbor phase difference is expressed as:

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

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

[0191] The second neighbor phase difference is expressed as:

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

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

[0194] The judgment whether the adjacent point phase difference of the pixel point in the rectangular lattice is within a predetermined difference range is specifically:

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

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

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

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

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

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

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

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

[0203] Further, the k-order phase unwrapping is applied to the absolute phase calculation of the original wrapped phase map by using the up-sampling idea, and several steps for enhancing the stability and accuracy of the phase unwrapping process are added, and the TBB (Intel Threading Building Blocks) library is used for parallel calculation to speed up the algorithm, so that the phase unwrapping of the original resolution phase map can be completed. This method can reduce the required time of the overall algorithm and improve the efficiency of the QGPU phase unwrapping.

[0204] In the embodiment, the step 140 and the steps after the step 140 are accelerated by using the TBB parallel algorithm.

[0205] For example, the specific implementation of the step 140 is as follows:

[0206] All rows and columns of the sub-image are traversed, and the entire sub-image space is divided into multiple sub-ranges; wherein each sub-range can be independently executed on different threads;

[0207] The number of layers k of the rectangular dot matrix to which the pixel point in the main value phase diagram corresponding to the pixel point in each sub-range belongs is obtained through multi-thread parallel processing.

[0208] In order to compare the phase unwrapping effects before and after the overall algorithm optimization, please continue to refer to Figures 11-13 , Figure 11 In order to compare the phase unwrapping effects before and after the overall algorithm optimization, please continue to refer to Figure 4 , Figure 12 is the phase unwrapping diagram of the wrapped phase in the image of Figure 4 , Figure 13 is the phase unwrapping diagram of the wrapped phase in the image of Figure 12 and Figure 11 ;

[0209] First, the phase unwrapping of the wrapped phase in Figure 4 before optimization is carried out, and the phase unwrapping diagram before optimization is obtained, see Figure 11 , and then the wrapped phase in the image of Figure 4 is unwrapped by using the algorithm after optimization to obtain the phase unwrapping diagram after optimization, see Figure 12 (sampling step n=2), and finally, the phase difference value image is obtained by subtracting the phase unwrapping diagrams before and after optimization, see Figure 13 , and it can be observed from Figure 13 that the conclusion is as follows:

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

[0211] Further, please continue to refer to Figure 14 and Figure 15 , Figure 14 is a wrapped phase diagram with an image resolution of 4096*3000 provided by the embodiment of the application, Figure 15 is a comparison result display diagram of the time consumed for phase unwrapping of Figure 4 and Figure 14 ;

[0212] In order to compare the time consumed for phase unwrapping before and after the overall algorithm optimization, comparison experiments are respectively carried out on the wrapped phase diagrams of Figure 4 (image resolution is 2448*2048) and Figure 14 (image resolution is 4096*3000), from Figure 4 ( Figure 15 in Figure 1 ) and Figure 14 ( Figure 15 inFigure 2 The comparative experimental results are attached. Figure 15 As shown;

[0213] From the appendix Figure 15 Data analysis shows that, by comparing the time consumption of the algorithm before optimization (sampling step size n=1) with that of the optimized algorithm (sampling step size n=2 to n=10), it can be concluded that using the optimized algorithm to perform phase unwrapping on the wrapped phase map can significantly reduce the computation time, thereby improving the computational efficiency of the quality map-guided method in the phase unwrapping process.

[0214] In conclusion,

[0215] This embodiment provides a single-frequency wrap-around phase expansion method based on downsampling. It combines downsampling with single-frequency wrap-around phase expansion to improve sampling efficiency. It has low computational requirements, low computational load, short algorithm time, and fast speed.

[0216] By performing a quality map-guided wrapping phase unwrapping (n>2) and neighbor point phase difference judgment on the rectangular point matrix of the phase-unwrapped sub-image, the stability and accuracy of the phase unwrapping process are enhanced, and the hierarchical judgment error caused by large neighbor point phase differences is reduced.

[0217] The algorithm logic is relatively simple and easy to implement;

[0218] Furthermore, the time-consuming steps in the algorithm are implemented in parallel using the TBB parallel algorithm with multiple threads, which utilizes the capabilities of multi-core processors to accelerate image processing tasks, reduce algorithm time, and increase speed.

[0219] Example 2:

[0220] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the architecture of a single-frequency wrap-around phase expansion system based on downsampling, provided for an embodiment of the present invention.

[0221] The system specifically includes:

[0222] Storage unit 10 is used to acquire and store the principal phase map obtained after phase wrapping calculation;

[0223] Downsampling unit 20, electrically connected to storage unit 10, is used to downsample the acquired principal phase map to obtain a sub-image; wherein the size of the sub-image is 1 / n of the size of the principal phase map, n is the sampling step size 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 wrapping phase of the sub-image using the quality map-guided method to obtain the unwrapped phase value of each pixel of the sub-image.

[0225] The order number calculation unit 40 is electrically connected to the phase unwrapping unit 30, and is configured to calculate the order number k of the rectangular lattice 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 order number calculation unit 40, and is configured to perform k-order phase unwrapping on the rectangular lattice of the main value phase map, and calculate and fill the absolute phase value of all pixel points in the rectangular lattice according to the order number k.

[0227] Specifically, the main value phase map phase unwrapping unit 50 is further electrically connected to the re-inspection unit 60.

[0228] The re-inspection unit 60 is configured to determine whether n is greater than 2; and

[0229] If n=2, it is determined whether the phase difference between adjacent points of the pixel point in the rectangular lattice is within a predetermined difference range.

[0230] If n>2, the quality map guided method is first used to perform phase unwrapping on the main value phase map, and then it is determined whether the phase difference between adjacent points of the pixel point in the rectangular lattice is within a predetermined difference range.

[0231] After determining whether the phase difference between adjacent points of the pixel point in the rectangular lattice is within a predetermined difference range, the re-inspection unit is further configured to:

[0232] If the phase difference between adjacent points of the pixel point in the rectangular lattice is within a predetermined difference range, the current absolute phase value of the pixel point is maintained unchanged.

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

[0234] Since the method of unwrapping the single frequency wrapped phase based on the down-sampling has been described in detail in Embodiment One, it will not be repeated here.

[0235] The embodiment provides a single frequency wrapped phase unwrapping system based on down-sampling, first, the resolution of a wrapped phase image is reduced by using a down-sampling method, then a sub-image after the down-sampling processing is subjected to quality map guided phase unwrapping, k-order phase unwrapping is applied to absolute phase calculation of the original wrapped phase image by using the up-sampling idea, several steps of enhancing stability and accuracy of the phase unwrapping process are added, and Intel Threading Building Blocks (TBB) library parallel computing is used to speed up the algorithm, so that phase unwrapping of the original resolution phase image can be completed, the method can reduce the required time of the overall algorithm, and improve the efficiency of the quality map guided phase unwrapping.

[0236] Embodiment three

[0237] The embodiment also provides a computer readable storage medium, and at least one instruction is stored in the storage medium.

[0238] Since the single frequency wrapped phase unwrapping method based on down-sampling has been described in detail in the embodiment one, the description is not repeated in the embodiment.

[0239] Embodiment four

[0240] The application also provides a computer program product, comprising a computer program / instruction, and the computer program / instruction is characterized by realizing the single frequency wrapped phase unwrapping method based on down-sampling when the computer program / instruction is executed by a processor.

[0241] Since the single frequency wrapped phase unwrapping method based on down-sampling has been described in detail in the embodiment one, the description is not repeated in the embodiment.

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

[0243] The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for part of the technical features. Such modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method of single frequency bundle phase unwrapping based on decimation, characterized by, include: Step 110: Obtain the principal phase map after phase wrapping calculation; Step 120: Downsample the obtained principal phase map to obtain a sub-image; wherein the size of the sub-image is 1 / n of the size of the principal phase map, and n is the sampling step size of the image downsampling, n≥2; Step 130: Use the quality map-guided method to expand the single-frequency wrapping phase of the sub-image to obtain the expanded phase value of each pixel in the sub-image; Step 140: Based on the unfolded phase value of the pixels in the sub-image, calculate the level k of the rectangular lattice to which the pixels in the principal phase map of the sub-image belong. Step 150: Perform k-order phase expansion on the rectangular dot matrix of the principal phase map, calculate the absolute phase value of all pixels in the rectangular dot matrix according to the order k, and fill it in; In step 140, the method for calculating the level number k is as follows: Let k(i*n, j*n) be the order number of the corresponding pixel (i*n, j*n) in the principal phase map of the subimage pixel (i, j). Then: k(i*n,j*n)=round{|Φ(i,j)-φ(i*n,j*n)| / 2π}; Where n is the sampling step size of image downsampling, Φ(i,j) is the absolute phase value of pixel (i,j) in the sub-image, φ(i*n,j*n) is the wrapping phase value of the corresponding pixel (i*n,j*n) in the principal phase map of pixel (i,j) in the sub-image, || is the absolute value operator, and round{} is the rounding operator. Step 150 specifically includes: Based on k(i*n, j*n), perform absolute phase calculation and filling on all pixels in the rectangular point matrix [(i*n, j*n), (i*n+n-1, j*n+n-1)] in the principal phase map; where point (i*n, j*n) is the top left vertex in the rectangular point matrix, and point (i*n+n-1, j*n+n-1) is the bottom right vertex in the rectangular point matrix.

2. The method of unwrapping single frequency phase based on down-sampling according to claim 1, characterized in that, Step 150 is followed by: Step 160: Determine if n is greater than 2; if yes, execute step 161 first, then execute step 162; if no, execute step 162. Step 161: Perform phase expansion on the principal phase map using the quality map-guided method; Step 162: Determine whether the phase difference between neighboring pixels in the rectangular dot matrix is ​​within the predetermined difference range; if yes, proceed to step 1621; if no, proceed to step 1622. Step 1621: The current absolute phase value of the pixel remains unchanged; Step 1622: Correct the current absolute phase value of the pixel in the rectangular dot matrix, and overwrite the current absolute phase value of the pixel with the corrected absolute phase value.

3. The method of unwrapping single frequency phase based on down-sampling according to claim 2, characterized in that, Step 130 specifically includes: Initialize a priority queue to store the pixels to be processed and their corresponding absolute values ​​of truncated phase differences, and set the priority queue to be sorted in descending order according to the size of the absolute values ​​of truncated phase differences; Select pixel (i, j) in the sub-image as the starting point for phase unrolling, set its initial truncated phase difference to 0 and push it into the queue; remove pixel (i, j) and its truncated phase difference from the queue for four-connectivity search, and perform phase unrolling on the pixels in the four neighboring regions of pixel (i, j) respectively. Next, the pixels with phase unfolded in the four neighboring regions and their corresponding absolute values ​​of truncated phase differences are enqueued and sorted in descending order. The magnitude of the absolute value of the truncated phase difference is used as the quality of the quality map. As long as the queue is not empty, the highest quality point in the current queue is dequeued, and the pixels in the four neighboring regions of the dequeued pixel that have not been enqueued and have not been phase unfolded are phase unfolded and enqueued, until the queue is empty, thus obtaining the unfolded phase value of each pixel in the sub-image.

4. The method of unwrapping single frequency phase based on down-sampling according to claim 3, characterized in that, The method for calculating the absolute phase of pixels in the unfolded sub-image is as follows: Where Φ(m) is the absolute phase value at the m-th point, Φ(0) is the wrapping phase value at the phase unwrapping starting point, and Φ(n) is the absolute phase value of the n-th pixel in the sub-image; △{} is the difference operator, defined as: Δ{Φ(n)}=Φ(n+1)-Φ(n); Φ(n+1) is the absolute phase value of the (n+1)th pixel in 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 of unwrapping single frequency phase based on down-sampling according to claim 4, characterized in that, The absolute phase of the a-th pixel in a rectangular dot matrix is ​​calculated as follows: Φ(a)=φ(a)+2πk(i*n,j*n); Φ(a) is the absolute phase value of the a-th pixel, and φ(a) is the wrapping phase value of the a-th pixel.

6. The method of unwrapping single frequency phase based on down-sampling according to claim 5, wherein, The neighboring point phase difference includes the first neighboring point phase difference and the second neighboring point phase difference; the difference range is set to [-π, π]; The phase difference between the first neighboring points is expressed as: ΔΦ(c1)=Φ(x,y)-Φ(x,y-1); ΔΦ(c1) is the difference in absolute phase between a pixel (x, y) in the rectangular dot matrix and its left neighbor (x, y-1). The phase difference between the second neighboring points is expressed as: ΔΦ(c2)=Φ(x,y)-Φ(x-1,y); ΔΦ(c2) is the difference in absolute phase between a pixel (x, y) in the rectangular dot matrix and its upper neighbor (x-1, y). The determination of whether the phase difference between neighboring pixels in the rectangular dot matrix is ​​within a predetermined range specifically involves: If ΔΦ(c1)>π, then the absolute phase value of pixel (x, y) is corrected as follows: Φ(x,y)=Φ(x,y)-2π; If ΔΦ(c1) < -π, then the absolute phase value of pixel (x, y) is corrected as follows: Φ(x,y)=Φ(x,y)+2π; If ΔΦ(c2)>π, then the absolute phase value of pixel (x, y) is corrected as follows: Φ(x,y)=Φ(x,y)-2π; If ΔΦ(c2) < -π, then the absolute phase value of pixel (x, y) is corrected as follows: Φ(x,y)=Φ(x,y)+2π.

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

8. The method of unwrapping single frequency phase based on down-sampling according to claim 1, wherein, Step 140 specifically includes: Traverse all rows and columns of the subimage to divide the entire subimage space into multiple sub-ranges; each sub-range can be executed independently on a different thread; By using multi-threaded parallel processing, the hierarchy number k of the rectangular lattice to which the pixel in the principal phase map belongs is obtained.

9. The method of unwrapping single frequency phase based on down-sampling according to claim 2, wherein, Step 140 and subsequent steps all employed the TBB parallel algorithm for accelerated processing.

10. A system based on downsampling single-frequency wrap-around phase expansion, characterized in that, include: Storage unit, used to acquire and store the principal phase map obtained after phase wrapping calculation; The downsampling unit, electrically connected to the storage unit, is used to downsample the acquired principal phase map to obtain a sub-image; wherein the size of the sub-image is 1 / n of the size of the principal phase map, and n is the sampling step size of the image downsampling, n≥2; The sub-image phase unwrapping unit is electrically connected to the downsampling unit and is used to unwrap the single-frequency wrapping phase of the sub-image using the quality map-guided method to obtain the unwrapped phase value of each pixel in the sub-image. The hierarchy calculation unit is electrically connected to the phase unrolling unit and is used to calculate the hierarchy number k of the rectangular dot matrix to which the pixel in the principal phase map of the sub-image belongs, based on the unrolled phase value of the pixel in the sub-image. The principal phase map phase expansion unit is electrically connected to the hierarchy calculation unit and is used to perform k-order phase expansion on the rectangular dot matrix of the principal phase map, calculate the absolute phase value of all pixels in the rectangular dot matrix according to the hierarchy number k, and fill it. The method for calculating the level number k is as follows: Let k(i*n, j*n) be the order number of the corresponding pixel (i*n, j*n) in the principal phase map of the subimage pixel (i, j). Then: k(i*n,j*n)=round{|Φ(i,j)-φ(i*n,j*n)| / 2π}; Where n is the sampling step size of image downsampling, Φ(i,j) is the absolute phase value of pixel (i,j) in the sub-image, φ(i*n,j*n) is the wrapping phase value of the corresponding pixel (i*n,j*n) in the principal phase map of pixel (i,j) in the sub-image, || is the absolute value operator, and round{} is the rounding operator. The phase expansion unit of the principal phase map is specifically used to perform absolute phase calculation and filling on all pixels in the rectangular dot matrix [(i*n, j*n), (i*n+n-1, j*n+n-1)] in the principal phase map according to k(i*n, j*n); where point (i*n, j*n) is the upper left vertex in the rectangular dot matrix, and point (i*n+n-1, j*n+n-1) is the lower right vertex in the rectangular dot matrix.

11. A system for single-frequency wrap-around phase expansion based on downsampling according to claim 10, characterized in that, The main value phase diagram phase expansion unit is also electrically connected to a re-inspection unit; The re-inspection unit is used to determine whether n is greater than 2; and, If n=2, determine whether the phase difference between neighboring pixels in the rectangular dot matrix is ​​within the predetermined difference range; If n>2, first use the quality map-guided method to perform phase expansion on the principal phase map, and then determine whether the phase difference between neighboring pixels in the rectangular dot matrix is ​​within the predetermined difference range. After determining whether the phase difference between neighboring pixels in the rectangular dot matrix is ​​within a predetermined difference range, the re-inspection unit is further configured to: If the phase difference between neighboring pixels in a rectangular dot matrix is ​​within a predetermined range, the current absolute phase value of that pixel remains unchanged. If the phase difference between neighboring pixels in a rectangular dot matrix is ​​not within a predetermined range, the current absolute phase value of the pixel in the rectangular dot matrix is ​​corrected, and the corrected absolute phase value is overwritten with the current absolute phase value of the pixel.

12. A system based on downsampling single-frequency wrap-around phase expansion according to claim 11, characterized in that, The sub-image phase unrolling unit is specifically used for: Initialize a priority queue to store the pixels to be processed and their corresponding absolute values ​​of truncated phase differences, and set the priority queue to be sorted in descending order according to the size of the absolute values ​​of truncated phase differences; Select pixel (i, j) in the sub-image as the starting point for phase expansion, set its initial truncation phase difference to 0, and push it into the queue; Remove pixel (i, j) and its truncated phase difference from the queue and perform a four-connectivity search, and perform phase expansion on the pixels in the four neighboring regions of pixel (i, j) respectively. Then, the pixels after the phase expansion of the four neighboring regions and their corresponding absolute values ​​of the truncated phase difference are queued and sorted in descending order, and the magnitude of the absolute value of the truncated phase difference is used as the quality of the quality map. As long as the queue is not empty, the highest quality point in the current queue is dequeued, and the pixels in the four neighborhoods of the dequeued pixel that have not been enqueued and have not been phase-expanded are phase-expanded and enqueued, until the queue is empty, thus obtaining the expanded phase value of each pixel in the sub-image.

13. A system based on downsampling single-frequency wrap-around phase expansion according to claim 12, characterized in that, The method for calculating the absolute phase of pixels in the unfolded sub-image is as follows: Where Φ(m) is the absolute phase value at the m-th point, Φ(0) is the wrapping phase value at the phase unwrapping starting point, and Φ(n) is the absolute phase value of the n-th pixel in the sub-image; △{} is the difference operator, defined as: Δ{Φ(n)}=Φ(n+1)-Φ(n); Φ(n+1) is the absolute phase value of the (n+1)th pixel in the sub-image; W{} is the truncation operator, defined as: W{Φ(n)}=Φ(n)-2π*round{Φ(n) / 2π}; round{} is the rounding operator.

14. A system for single-frequency wrap-around phase expansion based on downsampling according to claim 13, characterized in that, The absolute phase of the a-th pixel in a rectangular dot matrix is ​​calculated as follows: Φ(a)=φ(a)+2πk(i*n,j*n); Φ(a) is the absolute phase value of the a-th pixel, and φ(a) is the wrapping phase value of the a-th pixel.

15. A system based on downsampling single-frequency wrap-around phase expansion according to claim 14, characterized in that, The neighboring point phase difference includes the first neighboring point phase difference and the second neighboring point phase difference; the difference range is set to [-π, π]; The phase difference between the first neighboring points is expressed as: ΔΦ(c1)=Φ(x,y)-Φ(x,y-1); ΔΦ(c1) is the difference in absolute phase between a pixel (x, y) in the rectangular dot matrix and its left neighbor (x, y-1). The phase difference between the second neighboring points is expressed as: ΔΦ(c2)=Φ(x,y)-Φ(x-1,y); ΔΦ(c2) is the difference in absolute phase between a pixel (x, y) in the rectangular dot matrix and its upper neighbor (x-1, y). The determination of whether the phase difference between neighboring pixels in the rectangular dot matrix is ​​within a predetermined range specifically involves: If ΔΦ(c1)>π, then the absolute phase value of pixel (x, y) is corrected as follows: Φ(x,y)=Φ(x,y)-2π; If ΔΦ(c1) < -π, then the absolute phase value of pixel (x, y) is corrected as follows: Φ(x,y)=Φ(x,y)+2π; If ΔΦ(c2)>π, then the absolute phase value of pixel (x, y) is corrected as follows: Φ(x,y)=Φ(x,y)-2π; If ΔΦ(c2) < -π, then the absolute phase value of pixel (x, y) is corrected as follows: Φ(x,y)=Φ(x,y)+2π.

16. A system based on downsampling single-frequency wrap-around phase expansion according to claim 15, characterized in that, The sub-image phase unpacking unit is specifically used to downsample the acquired principal phase map using the nearest neighbor interpolation method to obtain a sub-image, including: Create a new image with the same data type as the original principal phase map but reduced in size by a factor of n, to store the downsampled image data; Traverse each row and column of the original principal phase image. Let variable i represent the current row index and variable j represent the current column index. For each pixel (i*n, j*n) in the original principal phase image, directly assign its value to the corresponding pixel (i, j) in the new image to obtain the sub-image.

17. A system for single-frequency wrap-around phase expansion based on downsampling according to claim 10, characterized in that, The hierarchical number calculation unit is specifically used for: Traverse all rows and columns of the subimage to divide the entire subimage space into multiple sub-ranges; each sub-range can be executed independently on a different thread. By using multi-threaded parallel processing, the hierarchy number k of the rectangular lattice to which the pixel in the principal phase map belongs is obtained.

18. A system for single-frequency wrap-around phase expansion based on downsampling according to claim 11, characterized in that, The hierarchy calculation unit, the principal value phase map phase expansion unit, and the re-inspection unit are all electrically connected to the TBB library. The TBB parallel algorithm in the TBB library can accelerate the processing speed of the hierarchy calculation unit, the principal value phase map phase expansion unit, and the re-inspection unit.

19. A computer-readable storage medium storing at least one instruction, characterized in that, The instructions are loaded and executed by the processor to implement a method for single-frequency wrap-around phase unwrapping based on downsampling as described in any one of claims 1-9.

20. A computer program product comprising a computer program / instructions, characterized in that, When a computer program / instruction is executed by a processor, it implements a method for single-frequency wrap-around phase expansion based on downsampling as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Phase unwrapping method based on quality map

    CN107730491A

  • Discontinuous region phase unwrapping method and device

    CN117576039A