A surface imaging method, storage medium, and device
By generating a compensated phase lookup table to compensate for the actual phase distribution, the phase error problem caused by nonlinear processing in commercial projectors is solved, thus improving the efficiency and accuracy of surface imaging.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-22
- Publication Date
- 2026-03-24
AI Technical Summary
Commercial projectors employ non-linear processing in their hardware design to handle the intensity response of projected light, resulting in non-sinusoidal fringe patterns captured by the camera. This leads to phase errors that affect the accuracy of surface imaging.
A block filtering process is used to generate a compensated phase lookup table, which compensates for the calculated actual phase distribution, thereby improving the noise resistance and accuracy of surface imaging.
By generating a compensated phase lookup table to compensate for the actual phase distribution, the efficiency and accuracy of surface imaging are improved, and the influence of nonlinear errors is overcome.
Smart Images

Figure CN116147530B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a surface imaging method, storage medium, and device. Background Technology
[0002] Fringe phase measurement profilometry is used in fields such as object contour scanning and facial recognition to obtain object contours. This involves projecting stripes onto the object using a projector, and then using a camera to capture the stripe images to calculate the contour. Commercial projectors often incorporate nonlinear processing in their hardware design to handle the intensity response of the projected light, resulting in a non-sinusoidal fringe pattern captured by the camera. This leads to a nonlinear phase error in the final calculated phase, which affects the accuracy of surface imaging. Summary of the Invention
[0003] This application provides a surface imaging method, apparatus, storage medium, and electronic device. It generates a compensated phase lookup table based on the reference phase distribution and phase error distribution after block filtering, and compensates for the calculated actual phase distribution using the compensated phase lookup table, thereby improving the noise resistance of surface imaging processing and enhancing the efficiency and accuracy of surface imaging. The technical solution is as follows:
[0004] In a first aspect, embodiments of this application provide a surface imaging method applied in an imaging device, the imaging device including a projection component and a camera component, the method comprising:
[0005] The projection component is used to project grating fringes onto the reference plane;
[0006] Using the camera assembly, a reference phase distribution and a phase error distribution for the reference plane are generated based on the grating stripes;
[0007] The reference phase distribution is subjected to block filtering to obtain the target phase distribution, and the phase error distribution is subjected to block filtering to obtain the target phase error distribution;
[0008] A compensation phase lookup table is generated based on the target phase distribution and the target phase error distribution;
[0009] Obtain the actual phase distribution of the object under test on the reference plane, and perform compensation processing on the actual phase distribution based on the compensation phase lookup table;
[0010] The surface imaging of the object under test is performed based on the actual phase distribution after the compensation process.
[0011] Secondly, embodiments of this application provide an imaging device, which includes: a projection component, a camera component, and a processor; wherein,
[0012] One end of the processor is connected to the projection component, and the other end of the processor is connected to the camera component;
[0013] The projection component projects grating stripes onto the reference plane;
[0014] The camera component acquires at least three grating stripe patterns based on the grating stripes, and sends the at least three grating stripe patterns to the processor;
[0015] The processor generates a reference phase distribution and a phase error distribution for the reference plane based on the at least three grating fringe patterns;
[0016] The processor performs block filtering on the reference phase distribution to obtain the target phase distribution, and performs block filtering on the phase error distribution to obtain the target phase error distribution;
[0017] The processor generates a compensated phase lookup table based on the target phase distribution and the target phase error distribution;
[0018] The processor acquires the actual phase distribution of the object under test on the reference plane and performs compensation processing on the actual phase distribution based on the compensation phase lookup table;
[0019] The processor performs surface imaging processing on the object under test based on the actual phase distribution after the compensation processing.
[0020] Thirdly, embodiments of this application provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the above-described method steps.
[0021] Fourthly, embodiments of this application provide an electronic device that may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the above-described method steps.
[0022] In one or more embodiments of this application, a projection component projects grating fringes onto a reference plane. A reference phase distribution and a phase error distribution for the reference plane are generated based on the grating fringes. The reference phase distribution and phase error distribution are then subjected to block filtering to obtain a target phase distribution and a target phase error distribution. A compensated phase lookup table is generated based on the target phase distribution and target phase error distribution to obtain the actual phase distribution of the object under test on the reference plane. The actual phase distribution is then compensated based on the compensated phase lookup table. Finally, surface imaging processing is performed on the object under test based on the compensated actual phase distribution. By generating a compensated phase lookup table based on the block-filtered reference phase distribution and phase error distribution, and then compensating the calculated actual phase distribution based on the compensated phase lookup table, the noise resistance of the surface imaging processing is improved, as well as the efficiency and accuracy of surface imaging. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of this application 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is an example schematic diagram of a surface imaging process provided in an embodiment of this application;
[0025] Figure 2 This is a schematic flowchart of a surface imaging method provided in an embodiment of this application;
[0026] Figure 3 This is a schematic flowchart of a surface imaging method provided in an embodiment of this application;
[0027] Figure 4 This is an example diagram illustrating a numerical matrix splitting provided in an embodiment of this application;
[0028] Figure 5 This is a schematic diagram illustrating an example of mean processing provided in an embodiment of this application;
[0029] Figure 6 This is a schematic diagram illustrating an example of obtaining a compensated phase value according to an embodiment of this application;
[0030] Figure 7 This is a schematic diagram of the structure of an imaging device provided in an embodiment of this application;
[0031] Figure 8 This is a schematic diagram of the structure of a surface imaging device provided in an embodiment of this application;
[0032] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0033] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0034] In the description of this application, it should be understood that the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. In the description of this application, it should be noted that, unless otherwise expressly specified and limited, "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances. Furthermore, in the description of this application, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist; for example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship.
[0035] The surface imaging method provided in this application embodiment can be implemented using a computer program and can run on a surface imaging device based on the von Neumann architecture. This computer program can be integrated into an application or run as a standalone utility application. The imaging device in this application embodiment includes a projection component and a camera component. The projection component is a component in the imaging device with projection functionality, capable of projecting grating fringes onto a reference plane. The camera component is a component in the imaging device capable of acquiring images or videos within the visible range, capable of obtaining a grating fringe pattern within the reference plane range. Please refer to... Figure 1 This embodiment of the application provides an example of surface imaging processing. The object to be imaged is placed on a reference plane. The projection component projects grating fringes onto the reference plane according to the projection angle. It can be understood that the grating fringes can be a sinusoidal pattern. The imaging component acquires the image corresponding to the reference plane, i.e., the grating fringe pattern. According to the Phase Measuring Profilometry (PMP) method, I...n (x, y) represents the grayscale value of the pixel in the x-th row and y-th column of the n-th frame of the raster fringe pattern modulated from the surface topography of the object under test, and:
[0036]
[0037] Where k represents the phase shift step of the projected grating, x∈[1,N], y∈[1,M], N and M represent the number of rows and columns of pixels in the grating fringe pattern, respectively, C(x,y) is the surface reflectivity of the object, which can be the ratio of the light intensity projected by the projection component to the light intensity captured by the camera component; A(x,y) is the ambient light intensity of the environment in which the imaging device is located; B(x,y) is the modulation amplitude of the grating fringe, which is the amplitude value of the sine function corresponding to the gray value of the pixel in the x-th row and y-th column of the grating fringe pattern. Given the phase distribution after height modulation of the object under test, we can obtain:
[0038]
[0039] in It is discontinuous, restricted to the range (-π, π) by the tangent and inverse tangent functions, therefore it is necessary to... Phase expansion, or phase unwrapping, yields a continuous full-field phase distribution. The PMP algorithm can be used according to This yields a surface image of the object under test. This is understandable. The accuracy of the imaging can affect the clarity and accuracy of the image of the object being measured. Existing projection components employ nonlinear processing of the intensity response of the projected light during hardware design, causing the grating fringe pattern captured by the imaging component to exhibit non-sinusoidal behavior, resulting in a different overall phase distribution in the final calculation. There is a nonlinear phase error, which affects the accuracy of the surface imaging of the object under test. The imaging device in this application embodiment can perform compensation processing on the acquired full-field phase distribution, and then generate the surface image of the object under test based on the compensated full-field phase distribution, thereby improving the clarity and accuracy of the surface imaging of the object under test.
[0040] The surface imaging method provided in this application will be described in detail below with reference to specific embodiments.
[0041] Please see Figure 2 This is a schematic flowchart illustrating a surface imaging method provided in an embodiment of this application. Figure 2 As shown, the method described in this application embodiment may include the following steps S101-S106.
[0042] S101, the projection component is used to project grating stripes onto the reference plane.
[0043] In one embodiment, before placing the object under test on a reference plane for surface imaging processing, the imaging device may first use a projection component to project grating stripes onto the reference plane.
[0044] S102, using the camera component, and generating a reference phase distribution and a phase error distribution for the reference plane based on the grating stripes.
[0045] In one embodiment, the imaging device may employ a camera assembly to acquire at least three grating fringe patterns on a reference plane, and calculate the full-field phase distribution based on these three patterns. This full-field phase distribution is then identified as the reference phase distribution for the reference plane. A surface fitting is then performed on the reference phase distribution to obtain the desired phase distribution, and the difference between the reference phase distribution and the desired phase distribution is used to obtain the phase error distribution. It is understood that if the imaging device uses a three-step phase-shifting method to calculate the full-field phase distribution and then obtains the surface image of the object under test based on the full-field phase distribution, the imaging device needs to acquire three grating fringe patterns using the camera assembly; if the imaging device uses a four-step phase-shifting method to calculate the full-field phase distribution, the imaging device needs to acquire four grating fringe patterns using the camera assembly.
[0046] S103, perform block filtering on the reference phase distribution to obtain the target phase distribution, and perform block filtering on the phase error distribution to obtain the target phase error distribution.
[0047] In one embodiment, the imaging device can perform block filtering on the reference phase distribution to obtain the target phase distribution, and then perform block filtering on the phase error distribution to obtain the target phase error distribution. Block filtering can remove noise and erroneous values from the reference phase distribution and the phase error distribution, improving the noise resistance of surface imaging processing.
[0048] S104, Generate a compensated phase lookup table based on the target phase distribution and the target phase error distribution.
[0049] In one embodiment, the imaging device can generate a compensated phase lookup table based on the target phase distribution and the target phase error distribution.
[0050] S105, obtain the actual phase distribution of the object under test on the reference plane, and perform compensation processing on the actual phase distribution based on the compensation phase lookup table.
[0051] In one embodiment, the object under test is placed on a reference plane. The imaging device can use a projection component to project grating fringes onto the object under test on the reference plane, and then obtain the phase distribution across the entire range for the object under test, confirming it as the actual phase distribution. The imaging device can find the compensated phase of each pixel in the actual phase distribution in a compensated phase lookup table, generate a compensated phase distribution, and then subtract the actual phase distribution from the compensated phase distribution to obtain the compensated actual phase distribution.
[0052] S106, perform surface imaging processing on the object under test based on the actual phase distribution after the compensation processing.
[0053] In one embodiment, the imaging device can perform surface imaging processing on the object under test using the PMP algorithm based on the actual phase distribution after compensation processing. Since the compensation phase lookup table is generated based on the reference phase distribution and phase error distribution after block filtering processing, and then the actual phase distribution is compensated according to the compensation phase lookup table, the noise resistance of the surface imaging is improved, and the clarity and accuracy of the surface imaging of the object under test are improved. There is no need to make and project grating stripes to overcome nonlinear errors, which improves the convenience and efficiency of surface imaging processing.
[0054] In this embodiment, a projection component projects grating fringes onto a reference plane. A reference phase distribution and a phase error distribution for the reference plane are generated based on the grating fringes. The reference phase distribution and phase error distribution are then subjected to block filtering to obtain the target phase distribution and target phase error distribution. A compensated phase lookup table is generated based on the target phase distribution and target phase error distribution to obtain the actual phase distribution of the object under test on the reference plane. The actual phase distribution is then compensated based on the compensated phase lookup table. Finally, surface imaging processing is performed on the object under test based on the compensated actual phase distribution. By generating a compensated phase lookup table based on the block-filtered reference phase distribution and phase error distribution, and then compensating the calculated actual phase distribution based on the compensated phase lookup table, the noise resistance of the surface imaging processing is improved, as well as the efficiency and accuracy of surface imaging.
[0055] Please see Figure 3 This is a schematic flowchart illustrating a surface imaging method provided in an embodiment of this application. Figure 3 As shown, the method described in this application embodiment may include the following steps S201-S211.
[0056] S201, the projection component is used to project grating stripes onto the reference plane.
[0057] In one embodiment, before placing the object under test on a reference plane for surface imaging processing, the imaging device may first use a projection component to project grating stripes onto the reference plane.
[0058] S202, using the camera component and based on at least three grating fringe patterns acquired by the grating fringe, obtain a reference phase distribution for the reference plane.
[0059] In one embodiment, the imaging device may employ a camera assembly to acquire at least three grating fringe patterns on a reference plane, and calculate the full-field phase distribution based on these three grating fringe patterns, confirming this full-field phase distribution as the reference phase distribution for the reference plane. It is understood that if the imaging device uses a three-step phase-shifting method to calculate the full-field phase distribution, and then obtains a surface image of the object under test based on the full-field phase distribution, the imaging device needs to acquire three grating fringe patterns using a camera assembly; if the imaging device uses a four-step phase-shifting method to calculate the full-field phase distribution, the imaging device needs to acquire four grating fringe patterns using a camera assembly.
[0060] S203, the reference phase distribution is fitted with a cubic polynomial surface using the least squares method to obtain the desired phase distribution.
[0061] In one embodiment, the imaging device may use the least squares method to perform cubic polynomial surface fitting on the reference phase distribution to obtain the desired phase distribution.
[0062] S204, Subtract the reference phase distribution from the desired phase distribution to obtain the phase error distribution.
[0063] In one embodiment, the imaging device can obtain the phase error distribution by subtracting the reference phase distribution from the desired phase distribution, as shown in the following formula:
[0064]
[0065] in, For the phase error distribution, As a reference phase distribution, For the desired phase distribution, x∈[1,N], y∈[1,M], where N and M represent the number of rows and columns of pixels in the raster stripe pattern, respectively.
[0066] S205, obtain the first numerical matrix corresponding to the reference phase distribution, split the first numerical matrix into at least two first block matrices with each row number satisfying a preset number, obtain the second numerical matrix corresponding to the phase error distribution, and split the second numerical matrix into at least two second block matrices with each row number satisfying the preset number.
[0067] In one embodiment, the imaging device can acquire a first numerical matrix corresponding to a reference phase distribution, where the element values in the first numerical matrix are the phase values of each pixel in the reference phase distribution. The first numerical matrix is then divided into at least two first block matrices with an equal number of rows, and the number of rows in all first block matrices satisfies a preset number. Similarly, the imaging device can acquire a second numerical matrix corresponding to a phase error distribution, where the element values in the second numerical matrix are the phase error values of each pixel in the phase error distribution. The second numerical matrix is then divided into at least two second block matrices with an equal number of rows, and the number of rows in all second block matrices satisfies a preset number. The preset number can be an initial setting of the imaging device or can be set by relevant personnel and stored in the imaging device. It is understood that the number of rows in both the first and second numerical matrices is an integer multiple of the number of rows of pixels in the grating fringe pattern.
[0068] Please see Figure 4 This document provides an example of numerical matrix decomposition in an embodiment of this application. Taking a reference phase distribution as an example, the reference phase distribution has n rows and m columns, where n and m are both positive integers. The imaging device can obtain a first numerical matrix corresponding to the reference phase distribution. The element values in the first numerical matrix are the phase values of each pixel in the reference phase distribution, for example, a 11 It refers to the phase value of the pixel in the first row and first column of the reference phase distribution, a nm It refers to the phase value of the pixel in the nth row and mth column of the reference phase distribution. If n is an integer multiple of 3, the preset number can be 3. The imaging device can split the first numerical matrix into n / 3 first block matrices, each with 3 rows.
[0069] S206, perform mean processing on all columns of each block matrix in the at least two first block matrices and the at least two second block matrices.
[0070] In one embodiment, the imaging device can perform averaging on at least two first block matrices and all columns of each block matrix within the at least two block matrices, changing the element values in all columns to the average of the element values in that column. Averaging can correct noise-affected or erroneous element values in the numerical matrix, effectively filtering out noise and dead pixels.
[0071] Optionally, the imaging device may acquire at least two first block matrices and at least two second block matrices, and then acquire any target block matrix from the target block matrix, calculate the mean of all element values in the target column, and then change all element values in the target column to this mean. See also... Figure 5 This provides an example diagram of mean processing in an embodiment of this application, using the first column [a] of the target block matrix.11 ,a 21 ,a 31 For example, to obtain the mean of all element values in the first column:
[0072]
[0073] Among them, a 11 a 21 a 31 Let b1 be the value of the elements in the first column, and b1 be the average value of all the elements in the first column. Figure 5 b2, b3, b4, ..., b m These are the average values of all elements in the second, third, fourth, ..., mth columns of the target block matrix.
[0074] Optionally, in addition to averaging all columns of each block matrix for filtering, the imaging device can also perform median processing on all columns of at least two first block matrices and at least two second block matrices. This involves changing the value of each element in each column of the block matrix to the median value of that column. For example, the imaging device can acquire any one of the at least two first block matrices and at least two second block matrices as a target block matrix, acquire any one target column in the target block matrix, acquire the median value of all elements in the target column, and then change the value of all elements in the target column to this median value.
[0075] S207, obtain the target phase distribution based on the at least two first block matrices after mean processing, obtain the target phase error distribution based on the at least two second block matrices after mean processing, and generate a compensation phase lookup table based on the target phase distribution and the target phase error distribution.
[0076] In one embodiment, the imaging device combines all the first block matrices after averaging to obtain the target phase distribution corresponding to the reference phase distribution after block filtering. It then combines all the second block matrices after averaging to obtain the target phase error distribution corresponding to the phase error distribution after block filtering. The imaging device can then generate a compensation phase lookup table based on the target phase distribution and the target phase error distribution.
[0077] S208, Obtain the actual phase distribution of the object under test on the reference plane.
[0078] In one embodiment, the object under test is placed on a reference plane. The imaging device can use a projection component to project grating fringes onto the object under test on the reference plane, use a camera component to acquire a grating fringe pattern of the object under test on the reference plane, acquire the full-range phase distribution of the object under test based on the grating fringe pattern, and confirm it as the actual phase distribution.
[0079] S209, Obtain the compensated phase distribution corresponding to the actual phase distribution based on the compensated phase lookup table.
[0080] In one embodiment, the imaging device can find the compensation phase of each pixel in the actual phase distribution in the compensation phase lookup table, generate the compensation phase distribution, and then subtract the actual phase distribution from the compensation phase distribution to obtain the actual phase distribution after compensation processing.
[0081] Optionally, the imaging device can acquire a target pixel in the actual phase distribution, and obtain the target row number of the target pixel in the actual phase distribution, and obtain the first phase value corresponding to the target pixel. Then, in the target row number of the target phase distribution, find the second phase value that has the smallest difference with the first phase value, and obtain the target column number of the pixel corresponding to the second phase value in the target phase distribution. The imaging device can obtain the target phase value at the target row number and target column number in the target phase error distribution. This target phase value is the compensation phase value corresponding to the target pixel. The imaging device can also acquire the compensation phase values corresponding to all pixels in the actual phase distribution, and generate a compensation phase distribution corresponding to the actual phase distribution based on the compensation phase values corresponding to all pixels.
[0082] Please see Figure 6 This is a schematic diagram illustrating an example of obtaining a compensated phase value in an embodiment of this application. This represents the actual error distribution. For the target phase distribution, Let x ∈ [1, N], y ∈ [1, M], where N and M represent the row and column numbers of pixels in the raster fringe pattern, respectively. Taking the target pixel in the x-th row and y-th column of the actual phase distribution as an example, the target pixel is located in the x-th column of the actual phase distribution, and the first phase value corresponding to the target pixel is... The imaging device can find the second phase value with the smallest difference from the first phase value in the x-th row of the target phase distribution. That is, all phase values d in the x-th row of the target phase distribution. x1 ... d xy′ ... d xm In the middle, d xy′ With c xy The difference between them is the smallest, the second phase value The target is located in column y' of the target phase distribution, so the target column number is column y'. The imaging device can find the target phase value in row x and column y' of the target error phase distribution. Target phase value This refers to the compensated phase value corresponding to the target pixel. The imaging device can obtain the compensated phase values corresponding to all pixels in the actual phase distribution, and generate the actual phase distribution based on the compensated phase values corresponding to all pixels. Corresponding compensation phase distribution
[0083] S210, Subtract the actual phase distribution from the compensated phase distribution to obtain the compensated actual phase distribution.
[0084] In one embodiment, the imaging device can compensate the actual phase distribution by using a compensated phase distribution, that is, by subtracting the actual phase distribution from the compensated phase distribution to obtain the compensated actual phase distribution, as shown in the following formula:
[0085]
[0086] in, For the actual phase distribution, To compensate for the phase distribution, To compensate for the actual phase distribution after processing, x∈[1,N], y∈[1,M], where N and M represent the number of rows and columns of pixels in the raster stripe pattern, respectively.
[0087] S211, perform surface imaging processing on the object under test based on the actual phase distribution after the compensation processing.
[0088] In one embodiment, the imaging device can perform surface imaging processing on the object under test using the PMP algorithm based on the actual phase distribution after compensation processing. Since the compensation phase lookup table is generated based on the reference phase distribution and phase error distribution after block filtering processing, and then the actual phase distribution is compensated according to the compensation phase lookup table, the noise resistance of the surface imaging is improved, and the clarity and accuracy of the surface imaging of the object under test are improved. There is no need to make and project grating stripes to overcome nonlinear errors, which improves the convenience and efficiency of surface imaging processing.
[0089] In this embodiment, a projection component projects grating fringes onto a reference plane. A reference phase distribution for the reference plane is generated based on the grating fringes. The desired phase distribution is obtained by performing cubic polynomial surface fitting on the reference phase distribution. The difference between the reference phase distribution and the desired phase distribution is used to obtain the phase error distribution. Then, block filtering is performed on the reference phase distribution and the phase error distribution to obtain the target phase distribution and the target phase error distribution, respectively. The columns in the block matrix are averaged to replace values affected by noise and erroneous values, effectively filtering noise and dead pixels. A compensated phase lookup table is generated based on the target phase distribution and the target phase error distribution to obtain the actual phase distribution of the object under test on the reference plane. Compensation processing is performed on the actual phase distribution based on the compensated phase lookup table. This eliminates the need for additional fabrication and projection of grating fringes to overcome nonlinear errors, improving the convenience and efficiency of surface imaging processing. Surface imaging processing of the object under test is performed based on the compensated actual phase distribution. By generating a compensated phase lookup table based on the block-filtered reference phase distribution and the phase error distribution, and compensating the calculated actual phase distribution based on the compensated phase lookup table, the noise resistance of surface imaging processing is improved, as well as the efficiency and accuracy of surface imaging.
[0090] Please see Figure 7 This is a schematic diagram of an imaging device provided in an embodiment of this application. Figure 7 As shown, the imaging device in this embodiment includes a projection component, a camera component, and a processor. The processor includes a phase distribution calculation component, a block filtering component, and a compensation processing component.
[0091] The projection component is connected to the phase distribution calculation component, the phase distribution calculation component is connected to the camera component, one end of the block filtering component is connected to the phase distribution calculation component, the other end of the block filtering component is connected to the compensation processing component, the projection component is connected to the compensation processing component, and the compensation processing component is connected to the camera component.
[0092] Before placing the object under test on the reference plane for surface imaging processing, the projection component can first project grating stripes onto the reference plane.
[0093] The camera component can acquire at least three grating fringe patterns on the reference plane, and the camera component sends the at least three grating fringe patterns to the phase distribution calculation component.
[0094] The phase distribution calculation component calculates the full-field phase distribution based on at least three grating fringe patterns, and confirms this full-field phase distribution as the reference phase distribution relative to the reference plane. It can be understood that if the imaging device uses a three-step phase-shifting method to calculate the full-field phase distribution, and then obtains the surface image of the object under test based on the full-field phase distribution, the camera component needs to acquire three grating fringe patterns; if the imaging device uses a four-step phase-shifting method to calculate the full-field phase distribution, the camera component needs to acquire four grating fringe patterns. The phase distribution calculation component can use the least squares method to perform cubic polynomial surface fitting on the reference phase distribution to obtain the desired phase distribution, and then calculate the difference between the reference phase distribution and the desired phase distribution to obtain the phase error distribution. The phase distribution calculation component sends the reference phase distribution and the phase error distribution to the block filtering component.
[0095] The block filtering component can obtain a first numerical matrix corresponding to the reference phase distribution. The element values in the first numerical matrix are the phase values of each pixel in the reference phase distribution. The first numerical matrix is then divided into at least two first block matrices with an equal number of rows, and the number of rows in all first block matrices satisfies a preset number. Similarly, the block filtering component can obtain a second numerical matrix corresponding to the phase error distribution. The element values in the second numerical matrix are the phase error values of each pixel in the phase error distribution. The second numerical matrix is then divided into at least two second block matrices with an equal number of rows, and the number of rows in all second block matrices satisfies a preset number. The preset number can be the initial setting of the imaging device, or it can be set by relevant personnel and saved in the imaging device. It can be understood that the number of rows in both the first and second numerical matrices is the number of rows of pixels in the raster fringe pattern, and is an integer multiple of the preset number. Then, the block filtering component can perform averaging on all columns of the at least two first block matrices and each block matrix within the at least two first block matrices, changing the element values in all columns to the average of the element values in that column. The averaging method can correct noise-affected and erroneous elements in the numerical matrix, effectively filtering out noise and dead pixels. The block filtering component combines all the first block matrices after averaging to obtain the target phase distribution corresponding to the reference phase distribution after block filtering. It then combines all the second block matrices after averaging to obtain the target phase error distribution corresponding to the phase error distribution after block filtering. Finally, the target phase distribution and the target phase error distribution are sent to the compensation processing component.
[0096] The compensation processing component can generate a compensation phase lookup table based on the target phase distribution and the target phase error distribution, and send a first instruction to the projection component. The projection component projects grating fringes onto the object under test on the reference plane based on the first instruction. The compensation processing component can send a second instruction to the camera component. The camera component can acquire at least three fringe images of the object under test based on the second instruction, and send the at least three fringe images to the compensation processing component. Based on the at least three fringe images, the compensation processing component uses the PMP algorithm to obtain the actual phase distribution of the object under test on the reference plane. Then, the compensation processing component can find the compensation phase of each pixel in the actual phase distribution in the compensation phase lookup table, generate a compensation phase distribution, and then subtract the actual phase distribution from the compensation phase distribution to obtain the compensated actual phase distribution. The compensation phase distribution is then used to compensate the actual phase distribution, i.e., the difference between the actual phase distribution and the compensation phase distribution is used to obtain the compensated actual phase distribution. Finally, the compensation processing component can use the PMP algorithm to perform surface imaging processing on the object under test based on the actual phase distribution after compensation processing. Since the compensation phase lookup table is generated based on the reference phase distribution and phase error distribution after block filtering, and then the actual phase distribution is compensated according to the compensation phase lookup table, the noise resistance of the surface imaging is improved, and the clarity and accuracy of the surface imaging of the object under test are improved. There is no need to make and project grating fringes to overcome nonlinear errors, which improves the convenience and efficiency of surface imaging processing.
[0097] In this embodiment, a projection component projects grating fringes onto a reference plane. A reference phase distribution for the reference plane is generated based on the grating fringes. The desired phase distribution is obtained by performing cubic polynomial surface fitting on the reference phase distribution. The difference between the reference phase distribution and the desired phase distribution is used to obtain the phase error distribution. Then, block filtering is performed on the reference phase distribution and the phase error distribution to obtain the target phase distribution and the target phase error distribution, respectively. The columns in the block matrix are averaged to replace values affected by noise and erroneous values, effectively filtering noise and dead pixels. A compensated phase lookup table is generated based on the target phase distribution and the target phase error distribution to obtain the actual phase distribution of the object under test on the reference plane. Compensation processing is performed on the actual phase distribution based on the compensated phase lookup table. This eliminates the need for additional fabrication and projection of grating fringes to overcome nonlinear errors, improving the convenience and efficiency of surface imaging processing. Surface imaging processing of the object under test is performed based on the compensated actual phase distribution. By generating a compensated phase lookup table based on the block-filtered reference phase distribution and the phase error distribution, and compensating the calculated actual phase distribution based on the compensated phase lookup table, the noise resistance of surface imaging processing is improved, as well as the efficiency and accuracy of surface imaging.
[0098] The following will be combined with the appendix Figure 8 This application provides a detailed description of the surface imaging apparatus provided in its embodiments. It should be noted that the appendix... Figure 8 The surface imaging device in the present application is used to perform the present application. Figure 2 and Figure 3 The methods shown in the embodiments are for illustrative purposes only, illustrating the parts relevant to the embodiments of this application. For specific technical details not disclosed, please refer to this application. Figure 2 and Figure 3 The example shown.
[0099] Please see Figure 8 This illustration shows a schematic diagram of a surface imaging device provided in an exemplary embodiment of this application. The surface imaging device can be implemented as all or part of a device through software, hardware, or a combination of both. The device 1 includes a grating projection module 11, a distribution calculation module 12, a filtering processing module 13, a lookup table generation module 14, a compensation processing module 15, and an imaging processing module 16.
[0100] The grating projection module 11 is used to project grating stripes onto the reference plane using the projection component;
[0101] The distribution calculation module 12 is used to employ the camera component and generate a reference phase distribution and a phase error distribution for the reference plane based on the grating stripes;
[0102] Optionally, the distribution calculation module 12 is specifically used to use the camera component and, based on at least three grating fringe patterns acquired by the grating fringes, obtain a reference phase distribution for the reference plane;
[0103] A surface fitting is performed on the reference phase distribution to obtain the desired phase distribution, and a phase error distribution is obtained based on the reference phase distribution and the desired phase distribution.
[0104] Optionally, the distribution calculation module 12 is specifically used to perform cubic polynomial surface fitting on the reference phase distribution using the least squares method to obtain the desired phase distribution;
[0105] The phase error distribution is obtained by subtracting the reference phase distribution from the desired phase distribution.
[0106] The filtering module 13 is used to perform block filtering on the reference phase distribution to obtain the target phase distribution, and to perform block filtering on the phase error distribution to obtain the target phase error distribution.
[0107] Optionally, the filtering module 13 is specifically used to obtain the first numerical matrix corresponding to the reference phase distribution, and split the first numerical matrix into at least two first block matrices, each with a preset number of rows.
[0108] Obtain the second numerical matrix corresponding to the phase error distribution, and split the second numerical matrix into at least two second block matrices whose row counts both satisfy the preset number;
[0109] The average value is applied to all columns of each block matrix in the at least two first block matrices and the at least two second block matrices.
[0110] The target phase distribution is obtained based on the at least two first block matrices after mean processing, and the target phase error distribution is obtained based on the at least two second block matrices after mean processing.
[0111] Optionally, the filtering module 13 is specifically used to obtain any one of the at least two first block matrices and the at least two second block matrices as a target block matrix;
[0112] Obtain the mean value of all element values in the target column of the target block matrix, and change the value of all element values in the target column to the mean value.
[0113] The lookup table generation module 14 is used to generate a compensated phase lookup table based on the target phase distribution and the target phase error distribution;
[0114] The compensation processing module 15 is used to obtain the actual phase distribution of the object under test on the reference plane and perform compensation processing on the actual phase distribution based on the compensation phase lookup table.
[0115] Optionally, the compensation processing module 15 is specifically used to obtain the actual phase distribution of the object under test on the reference plane;
[0116] The compensated phase distribution corresponding to the actual phase distribution is obtained based on the compensated phase lookup table;
[0117] The difference between the actual phase distribution and the compensated phase distribution is calculated to obtain the actual phase distribution after compensation.
[0118] Optionally, the compensation processing module 15 is specifically used to obtain the target row number corresponding to the target pixel in the actual phase distribution, and to obtain the first phase value corresponding to the target pixel;
[0119] In the target row number of the target phase distribution, obtain the second phase value that has the smallest difference from the first phase value, and obtain the target column number of the second phase value in the target phase distribution;
[0120] Obtain the target phase value at the target row number and the target column number in the target phase error distribution, and determine the target phase value as the compensation phase value corresponding to the target pixel;
[0121] Based on the compensation phase values corresponding to all pixels in the actual phase distribution, a compensation phase distribution corresponding to the actual phase distribution is generated.
[0122] The imaging processing module 16 is used to perform surface imaging processing on the object under test based on the actual phase distribution after the compensation processing.
[0123] In this embodiment, a projection component projects grating fringes onto a reference plane. A reference phase distribution for the reference plane is generated based on the grating fringes. The desired phase distribution is obtained by performing cubic polynomial surface fitting on the reference phase distribution. The phase error distribution is obtained by subtracting the reference phase distribution from the desired phase distribution. Then, block filtering is performed on the reference phase distribution and the phase error distribution to obtain the target phase distribution and the target phase error distribution, respectively. The columns in the block matrix are averaged to replace values affected by noise and erroneous values, effectively filtering noise and dead pixels. A compensated phase lookup table is generated based on the target phase distribution and the target phase error distribution to obtain the actual phase distribution of the object under test on the reference plane. Compensation processing is performed on the actual phase distribution based on the compensated phase lookup table. This eliminates the need for additional fabrication and projection of grating fringes to overcome nonlinear errors, improving the convenience and efficiency of surface imaging processing. Surface imaging processing of the object under test is then performed based on the compensated actual phase distribution. By generating a compensated phase lookup table based on the block-filtered reference phase distribution and the phase error distribution, and then compensating the calculated actual phase distribution based on the compensated phase lookup table, the noise resistance of surface imaging processing is improved, as well as the efficiency and accuracy of surface imaging.
[0124] It should be noted that the surface imaging device provided in the above embodiments is only illustrated by the division of the above functional modules when performing the surface imaging method. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the surface imaging device and the surface imaging method embodiments provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments, which will not be repeated here.
[0125] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0126] This application also provides a computer storage medium that can store multiple instructions, which are adapted to be loaded and executed by a processor as described above. Figures 2-6 The surface imaging method of the illustrated embodiment can be found in the following document for a detailed execution process. Figures 2-6 The specific details of the illustrated embodiments will not be elaborated here.
[0127] This application also provides a computer program product storing at least one instruction, which is loaded and executed by the processor as described above. Figures 2-6 The surface imaging method of the illustrated embodiment can be found in the following document for a detailed execution process. Figures 2-6 The specific details of the illustrated embodiments will not be elaborated here.
[0128] Please refer to Figure 9 This diagram illustrates a structural block diagram of a server provided in an exemplary embodiment of this application. The server in this application may include one or more components such as a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, memory 120, input device 130, and output device 140 may be connected via the bus 150.
[0129] Processor 110 may include one or more processing cores. Processor 110 connects to various parts of the server using various interfaces and lines, and executes various functions of terminal 100 and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 120, and by calling data stored in memory 120. Optionally, processor 110 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). Processor 110 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user page, and applications; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into processor 110 and may be implemented separately using a communication chip.
[0130] The memory 120 may include random access memory (RAM) or read-only memory (ROM). Optionally, the memory 120 may include non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the various method embodiments described above, etc. The operating system may be the Android system, including systems deeply developed based on the Android system, the iOS system developed by Apple Inc., including systems deeply developed based on the iOS system, or other systems.
[0131] The memory 120 can be divided into operating system space and user space. The operating system runs in the operating system space, while native and third-party applications run in user space. To ensure that different third-party applications can achieve good running performance, the operating system allocates corresponding system resources for each application. However, different application scenarios within the same third-party application have different requirements for system resources. For example, in local resource loading scenarios, third-party applications have high requirements for disk read speed; in animation rendering scenarios, third-party applications have high requirements for GPU performance. Since the operating system and third-party applications are independent of each other, the operating system often cannot promptly perceive the current application scenario of a third-party application, resulting in the operating system's inability to adapt system resources accordingly.
[0132] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to establish data communication between the third-party applications and the operating system. This would allow the operating system to obtain the current scenario information of the third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.
[0133] The input device 130 is used to receive input instructions or data, and includes, but is not limited to, a keyboard, mouse, camera, microphone, or touch device. The output device 140 is used to output instructions or data, and includes, but is not limited to, a display device and a speaker. In one example, the input device 130 and the output device 140 can be combined, and the input device 130 and the output device 140 can be a touch display screen.
[0134] The touch display screen can be designed as a full-screen, curved screen, or irregularly shaped screen. It can also be designed as a combination of a full-screen and a curved screen, or a combination of an irregularly shaped screen and a curved screen; however, this application does not limit the specific design in this regard.
[0135] In addition, those skilled in the art will understand that the structure of the terminal shown in the above figures does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the terminal may also include radio frequency circuits, input units, sensors, audio circuits, Wireless Fidelity (WiFi) modules, power supplies, Bluetooth modules, etc., which will not be described in detail here.
[0136] exist Figure 9 In the illustrated electronic device, the processor 110 can be used to call the surface imaging application stored in the memory 120 and specifically perform the following operations:
[0137] The projection component is used to project grating fringes onto the reference plane;
[0138] Using the camera assembly, a reference phase distribution and a phase error distribution for the reference plane are generated based on the grating stripes;
[0139] The reference phase distribution is subjected to block filtering to obtain the target phase distribution, and the phase error distribution is subjected to block filtering to obtain the target phase error distribution;
[0140] A compensation phase lookup table is generated based on the target phase distribution and the target phase error distribution;
[0141] Obtain the actual phase distribution of the object under test on the reference plane, and perform compensation processing on the actual phase distribution based on the compensation phase lookup table;
[0142] The surface imaging of the object under test is performed based on the actual phase distribution after the compensation process.
[0143] In one embodiment, when the processor 110 performs the following operations, using the camera component and generating a reference phase distribution and a phase error distribution for the reference plane based on the grating stripes:
[0144] Using the camera assembly and based on at least three grating fringe patterns acquired by the grating fringes, a reference phase distribution for the reference plane is obtained;
[0145] A surface fitting is performed on the reference phase distribution to obtain the desired phase distribution, and a phase error distribution is obtained based on the reference phase distribution and the desired phase distribution.
[0146] In one embodiment, when the processor 110 performs surface fitting on the reference phase distribution to obtain a desired phase distribution, and obtains a phase error distribution based on the reference phase distribution and the desired phase distribution, it specifically performs the following operations:
[0147] The reference phase distribution is fitted with a cubic polynomial surface using the least squares method to obtain the desired phase distribution.
[0148] The phase error distribution is obtained by subtracting the reference phase distribution from the desired phase distribution.
[0149] In one embodiment, when the processor 110 performs block filtering processing on the reference phase distribution to obtain the target phase distribution, and performs block filtering processing on the phase error distribution to obtain the target phase error distribution, it specifically performs the following operations:
[0150] Obtain the first numerical matrix corresponding to the reference phase distribution, and split the first numerical matrix into at least two first block matrices, each with a preset number of rows.
[0151] Obtain the second numerical matrix corresponding to the phase error distribution, and split the second numerical matrix into at least two second block matrices whose row counts both satisfy the preset number;
[0152] The average value is applied to all columns of each block matrix in the at least two first block matrices and the at least two second block matrices.
[0153] The target phase distribution is obtained based on the at least two first block matrices after mean processing, and the target phase error distribution is obtained based on the at least two second block matrices after mean processing.
[0154] In one embodiment, when the processor 110 performs the averaging process on all columns of each block matrix in the at least two first block matrices and the at least two second block matrices, it specifically performs the following operations:
[0155] Obtain any target block matrix from the at least two first block matrices and the at least two second block matrices;
[0156] Obtain the mean value of all element values in the target column of the target block matrix, and change the value of all element values in the target column to the mean value.
[0157] In one embodiment, when the processor 110 performs the following operations to obtain the actual phase distribution of the object under test on the reference plane and to compensate the actual phase distribution based on the compensated phase lookup table:
[0158] Obtain the actual phase distribution of the object under test on the reference plane;
[0159] The compensated phase distribution corresponding to the actual phase distribution is obtained based on the compensated phase lookup table;
[0160] The difference between the actual phase distribution and the compensated phase distribution is calculated to obtain the actual phase distribution after compensation.
[0161] In one embodiment, when the processor 110 executes the operation of obtaining the compensation phase distribution corresponding to the actual phase distribution based on the compensation phase lookup table, it specifically performs the following operations:
[0162] Obtain the target row number corresponding to the target pixel in the actual phase distribution, and obtain the first phase value corresponding to the target pixel;
[0163] In the target row number of the target phase distribution, obtain the second phase value that has the smallest difference from the first phase value, and obtain the target column number of the second phase value in the target phase distribution;
[0164] Obtain the target phase value at the target row number and the target column number in the target phase error distribution, and determine the target phase value as the compensation phase value corresponding to the target pixel;
[0165] Based on the compensation phase values corresponding to all pixels in the actual phase distribution, a compensation phase distribution corresponding to the actual phase distribution is generated.
[0166] In this embodiment, a projection component projects grating fringes onto a reference plane. A reference phase distribution for the reference plane is generated based on the grating fringes. The desired phase distribution is obtained by performing cubic polynomial surface fitting on the reference phase distribution. The phase error distribution is obtained by subtracting the reference phase distribution from the desired phase distribution. Then, block filtering is performed on the reference phase distribution and the phase error distribution to obtain the target phase distribution and the target phase error distribution, respectively. The columns in the block matrix are averaged to replace values affected by noise and erroneous values, effectively filtering noise and dead pixels. A compensated phase lookup table is generated based on the target phase distribution and the target phase error distribution to obtain the actual phase distribution of the object under test on the reference plane. Compensation processing is performed on the actual phase distribution based on the compensated phase lookup table. This eliminates the need for additional fabrication and projection of grating fringes to overcome nonlinear errors, improving the convenience and efficiency of surface imaging processing. Surface imaging processing of the object under test is then performed based on the compensated actual phase distribution. By generating a compensated phase lookup table based on the block-filtered reference phase distribution and the phase error distribution, and then compensating the calculated actual phase distribution based on the compensated phase lookup table, the noise resistance of surface imaging processing is improved, as well as the efficiency and accuracy of surface imaging.
[0167] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory, or random access memory, etc.
[0168] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A surface imaging method, applied in an imaging device, the imaging device comprising a projection component and a camera component, characterized in that, The method includes: The projection component is used to project grating fringes onto the reference plane; Using the camera assembly, a reference phase distribution and a phase error distribution for the reference plane are generated based on the grating stripes; The reference phase distribution is subjected to block filtering to obtain the target phase distribution, and the phase error distribution is subjected to block filtering to obtain the target phase error distribution; A compensation phase lookup table is generated based on the target phase distribution and the target phase error distribution; Obtain the actual phase distribution of the object under test on the reference plane, and perform compensation processing on the actual phase distribution based on the compensation phase lookup table; The surface imaging process of the object under test is performed based on the actual phase distribution after the compensation process. The step of performing block filtering on the reference phase distribution to obtain the target phase distribution, and performing block filtering on the phase error distribution to obtain the target phase error distribution, includes: Obtain the first numerical matrix corresponding to the reference phase distribution, and split the first numerical matrix into at least two first block matrices, each with a preset number of rows. Obtain the second numerical matrix corresponding to the phase error distribution, and split the second numerical matrix into at least two second block matrices whose row counts both satisfy the preset number; The average value is applied to all columns of each block matrix in the at least two first block matrices and the at least two second block matrices. The target phase distribution is obtained based on the at least two first block matrices after mean processing, and the target phase error distribution is obtained based on the at least two second block matrices after mean processing.
2. The method according to claim 1, characterized in that, The step of employing the camera component and generating a reference phase distribution and a phase error distribution for the reference plane based on the grating fringes includes: Using the camera assembly and based on at least three grating fringe patterns acquired by the grating fringes, a reference phase distribution for the reference plane is obtained; A surface fitting is performed on the reference phase distribution to obtain the desired phase distribution, and a phase error distribution is obtained based on the reference phase distribution and the desired phase distribution.
3. The method according to claim 2, characterized in that, The step of performing surface fitting on the reference phase distribution to obtain the desired phase distribution, and obtaining the phase error distribution based on the reference phase distribution and the desired phase distribution, includes: The reference phase distribution is fitted with a cubic polynomial surface using the least squares method to obtain the desired phase distribution. The phase error distribution is obtained by subtracting the reference phase distribution from the desired phase distribution.
4. The method according to claim 1, characterized in that, The step of averaging all columns of each block matrix in the at least two first block matrices and the at least two second block matrices includes: Obtain any target block matrix from the at least two first block matrices and the at least two second block matrices; Obtain the mean value of all element values in the target column of the target block matrix, and change the value of all element values in the target column to the mean value.
5. The method according to claim 1, characterized in that, The step of obtaining the actual phase distribution of the object under test on the reference plane and compensating the actual phase distribution based on the compensated phase lookup table includes: Obtain the actual phase distribution of the object under test on the reference plane; The compensated phase distribution corresponding to the actual phase distribution is obtained based on the compensated phase lookup table; The difference between the actual phase distribution and the compensated phase distribution is calculated to obtain the actual phase distribution after compensation.
6. The method according to claim 5, characterized in that, The step of obtaining the compensated phase distribution corresponding to the actual phase distribution based on the compensated phase lookup table includes: Obtain the target row number corresponding to the target pixel in the actual phase distribution, and obtain the first phase value corresponding to the target pixel; In the target row number of the target phase distribution, obtain the second phase value that has the smallest difference from the first phase value, and obtain the target column number of the second phase value in the target phase distribution; Obtain the target phase value at the target row number and the target column number in the target phase error distribution, and determine the target phase value as the compensation phase value corresponding to the target pixel; Based on the compensation phase values corresponding to all pixels in the actual phase distribution, a compensation phase distribution corresponding to the actual phase distribution is generated.
7. An imaging device, characterized in that, The imaging device includes: a projection component, a camera component, and a processor; wherein... One end of the processor is connected to the projection component, and the other end of the processor is connected to the camera component; The projection component projects grating stripes onto the reference plane; The camera component acquires at least three grating stripe patterns based on the grating stripes, and sends the at least three grating stripe patterns to the processor; The processor generates a reference phase distribution and a phase error distribution for the reference plane based on the at least three grating fringe patterns; The processor performs block filtering on the reference phase distribution to obtain the target phase distribution, and performs block filtering on the phase error distribution to obtain the target phase error distribution; The processor generates a compensated phase lookup table based on the target phase distribution and the target phase error distribution; The processor acquires the actual phase distribution of the object under test on the reference plane and performs compensation processing on the actual phase distribution based on the compensation phase lookup table; The processor performs surface imaging processing on the object under test based on the actual phase distribution after the compensation process. The step of performing block filtering on the reference phase distribution to obtain the target phase distribution, and performing block filtering on the phase error distribution to obtain the target phase error distribution, includes: Obtain the first numerical matrix corresponding to the reference phase distribution, and split the first numerical matrix into at least two first block matrices, each with a preset number of rows. Obtain the second numerical matrix corresponding to the phase error distribution, and split the second numerical matrix into at least two second block matrices whose row counts both satisfy the preset number; The average value is applied to all columns of each block matrix in the at least two first block matrices and the at least two second block matrices. The target phase distribution is obtained based on the at least two first block matrices after mean processing, and the target phase error distribution is obtained based on the at least two second block matrices after mean processing.
8. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions, which are adapted to be loaded by a processor and executed as the method steps of any one of claims 1 to 6.
9. An electronic device, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed the method steps as claimed in any one of claims 1 to 6.
Citation Information
Patent Citations
Phase compensating method in object surface outline measurement
CN102506760A
A phase error compensation method and device
CN106170679A