A surface imaging method, storage medium, and device

By calculating the phase error variance of the rotation angle set of the projection component lens, the desired rotation angle is determined and the lens is adjusted, thus solving the problem of insufficient contrast of grating stripes and achieving higher image clarity and accuracy of object surfaces.

CN116147528BActive Publication Date: 2025-11-04GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111386723.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-22
Publication Date
2025-11-04
Estimated Expiration
2041-11-22

AI Technical Summary

Technical Problem

In fields such as object contour scanning and face recognition, the rotation angle of the projector lens affects the contrast of the grating stripes, resulting in more noise and dead pixels in the grating stripe images acquired by the camera, leading to inaccurate and unclear object contours.

Method used

By obtaining the initial rotation angle of the projection component lens, a set of rotation angles is generated, the phase error distribution and variance corresponding to each rotation angle are calculated, the expected rotation angle corresponding to the minimum variance is determined, the lens is adjusted to that angle to project grating stripes, and the camera component is used for surface imaging processing.

Benefits of technology

It improves the contrast of grating stripes, reduces noise and dead pixels, and enhances the clarity and accuracy of object surface imaging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116147528B_ABST
    Figure CN116147528B_ABST
Patent Text Reader

Abstract

The application discloses a surface imaging method, a storage medium and equipment, wherein the method comprises the following steps: obtaining an initial rotation angle of a lens in a projection component; obtaining a rotation angle set containing at least two rotation angles based on the initial rotation angle; obtaining a phase error distribution corresponding to each rotation angle in the rotation angle set for a reference plane; obtaining a phase error variance corresponding to each rotation angle based on the phase error distribution corresponding to each rotation angle; obtaining a minimum variance in the phase error variance corresponding to each rotation angle; determining a rotation angle corresponding to the minimum variance as an expected rotation angle; adjusting the lens of the projection component to the expected rotation angle; projecting a grating fringe on a to-be-measured object on the reference plane by using the projection component; and performing surface imaging processing on the to-be-measured object by using a camera component. According to the application, the noise and bad points in the image obtained by the camera component are less, so that the clarity and accuracy of the obtained surface imaging of the object are higher.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, and in particular to a surface imaging method, a storage medium and an apparatus. BACKGROUND

[0002] In the field of object contour scanning, face recognition, etc., fringe pattern profilometry is used to obtain the object contour, a projector is required to project a fringe pattern on the object, and a camera is required to obtain a fringe pattern image to calculate the contour. The rotation angle of the lens of the projector will affect the fringe contrast of the grating fringe, especially when the resolution of the camera is much higher than the resolution of the projector, which will cause the image of the grating fringe obtained by the camera to have more noise and bad points, resulting in an inaccurate and unclear calculated object contour. SUMMARY

[0003] Embodiments of the present application provide a surface imaging method, a storage medium and an apparatus, which can obtain an expected rotation angle corresponding to a phase error distribution with the smallest variance, so that the fringe contrast of the grating fringe projected by the expected rotation angle is higher, and the noise and bad points in the image obtained by the camera assembly are less, thereby making the clarity and accuracy of the obtained object surface imaging higher. The technical solution is as follows:

[0004] In a first aspect, embodiments of the present application provide a surface imaging method, which is used in an imaging apparatus including a projection assembly and a camera assembly, and the method includes:

[0005] obtaining an initial rotation angle of a lens in the projection assembly, and obtaining a rotation angle set including at least two rotation angles based on the initial rotation angle;

[0006] for a reference plane, obtaining a phase error distribution corresponding to each rotation angle in the rotation angle set;

[0007] based on the phase error distribution corresponding to each rotation angle, obtaining a phase error variance corresponding to each rotation angle;

[0008] obtaining a minimum variance in the phase error variances corresponding to each rotation angle, and determining an expected rotation angle corresponding to the minimum variance;

[0009] adjusting the lens of the projection assembly to the expected rotation angle, projecting a grating fringe on a to-be-measured object on the reference plane by using the projection assembly, and performing surface imaging processing on the to-be-measured object by using the camera assembly.

[0010] In a second aspect, embodiments of the present application provide an imaging apparatus, which includes a projection assembly, a camera assembly and a processor, and wherein:

[0011] One end of the processor is connected with the projection component, and the other end of the processor is connected with the camera component;

[0012] The projection component sends an initial rotation angle of a lens to the processor;

[0013] The processor obtains a rotation angle set containing at least two rotation angles based on the initial rotation angle;

[0014] The processor obtains a phase error distribution corresponding to each rotation angle in the rotation angle set for a reference plane;

[0015] The processor obtains a phase error variance corresponding to each rotation angle based on the phase error distribution corresponding to each rotation angle;

[0016] The processor obtains a minimum variance in the phase error variances corresponding to each rotation angle, determines a rotation angle corresponding to the minimum variance as an expected rotation angle, and generates a first instruction based on the expected rotation angle;

[0017] The processor sends the first instruction to the projection component, and the projection component adjusts the lens to the expected rotation angle based on the first instruction and projects a grating fringe on a to-be-measured object on the reference plane;

[0018] The processor sends a second instruction to the camera component, and the camera component acquires a fringe image of the to-be-measured object based on the second instruction. The camera component sends the fringe image to the processor, and the processor performs surface imaging processing on the to-be-measured object based on the fringe image.

[0019] In a third aspect, an embodiment of the present application provides a computer storage medium, which stores a plurality of instructions. The instructions are suitable for being loaded by a processor and performing the method steps described above.

[0020] In a fourth aspect, an embodiment of the present application provides an electronic device, which can include a processor and a memory. The memory stores a computer program, and the computer program is suitable for being loaded by the processor and performing the method steps described above.

[0021] The technical scheme provided by some embodiments of the present application has at least the following beneficial effects:

[0022] In one or more embodiments of the present application, the set of rotation angles is obtained based on an initial rotation angle of a lens in the projection assembly, the phase error distribution corresponding to each rotation angle in the set of rotation angles and the phase error variance corresponding to each rotation angle are obtained for the reference plane, the minimum variance in the phase error variance corresponding to each rotation angle is obtained, the rotation angle corresponding to the minimum variance is determined as the expected rotation angle, the lens of the projection assembly is adjusted to the expected rotation angle, the grating fringe is projected by the projection assembly to the object to be measured on the reference plane, and the surface imaging of the object to be measured is processed by the camera assembly. By obtaining the expected rotation angle corresponding to the phase error distribution with the minimum variance, the grating fringe projected at the expected rotation angle has higher fringe contrast, and the image obtained by the camera assembly has less noise and bad points, so that the clarity and accuracy of the obtained surface imaging of the object are higher. BRIEF DESCRIPTION OF DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0024] Figure 1 is an example schematic diagram of surface imaging processing provided by an embodiment of the present application;

[0025] Figure 2 is a flowchart of a surface imaging method provided by an embodiment of the present application;

[0026] Figure 3 is a flowchart of a surface imaging method provided by an embodiment of the present application;

[0027] Figure 4 is an example schematic diagram of a set of rotation angles provided by an embodiment of the present application;

[0028] Figure 5 is a structural schematic diagram of an imaging device provided by an embodiment of the present application;

[0029] Figure 6 is a structural schematic diagram of a surface imaging device provided by an embodiment of the present application;

[0030] Figure 7 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0031] With reference to the drawings and the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of the present application.

[0032] In the description of the present application, it should be understood that the terms "first", "second" and the like are used only for the purpose of description, and should not be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise specified and limited, "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units not listed, or optionally includes other steps or units inherent to the process, method, product or device. Those of ordinary skill in the art can understand the specific meaning of the above terms in the present application according to the specific circumstances. In addition, in the description of the present application, "a plurality of" means two or more, unless otherwise specified. "And / or" describes the relationship between the associated objects, which means that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects.

[0033] The surface imaging method provided by the embodiments of the present application can be realized by relying on a computer program and can run on a surface imaging device based on the von Neumann system. The computer program can be integrated in an application or can run as an independent tool application. The imaging device in the embodiments of the present application includes a projection component and a camera component. The projection component is a component with projection function in the imaging device, which can project a grating fringe onto a reference plane. The camera component is a component with image or video acquisition function in the imaging device, which can acquire a grating fringe image in the range of the reference plane. Please refer to Figure 1 An example schematic diagram of surface imaging processing is provided for the embodiments of the present application. The object to be measured for surface imaging processing is placed on the reference plane. The projection component can project a grating fringe onto the reference plane according to the rotation angle of the lens. It can be understood that the grating fringe can be a sinusoidal fringe pattern. The lens can be engraved with an initial scale. The angle obtained by rotating the lens on the basis of the initial scale is the rotation angle of the lens of the projection component, as shown in Figure 1 Figure 1

[0034] ​​The imaging assembly can acquire an image corresponding to the reference plane, i.e., a grating fringe pattern. According to a phase measuring profilometry (PMP) method, the gray value of a pixel point corresponding to the xth row and yth column in the nth frame of grating fringe pattern modulated by the surface topography of the object to be measured can be represented as

[0035]

[0036] where k represents the number of phase shift steps of the projected fringe grating, N and M represent the number of rows and columns of pixel points in the grating fringe pattern, respectively, is the reflectivity of the surface of the object, which can be the ratio of the light intensity projected by the projection assembly to the light intensity that can be captured by the imaging assembly; is the ambient light intensity of the environment in which the imaging device is located; is the modulation amplitude of the grating fringe, i.e., the amplitude value of the sine function corresponding to the gray value of the pixel point in the xth row and yth column in the grating fringe pattern. is the phase distribution of the object to be measured after height modulation, and thus

[0037]

[0038] where is discontinuous and is limited to by the rectified tangent function, and thus the phase unwrapping needs to be performed on to obtain a continuous full-field phase distribution After unwrapping, the surface imaging of the object to be measured can be obtained according to It can be understood that the accuracy of may affect the clarity and accuracy of the surface imaging of the object to be measured, and the fringe contrast, i.e., / may affect the accuracy of Therefore, in the embodiments of the present application, the imaging device can adopt a surface imaging method, so that the lens of the projection assembly projects the grating fringe onto the reference plane at a desired rotation angle, so that the grating fringe on the reference plane is uniform, clear, and has high fringe contrast, while reducing the noise and bad points on the grating fringe pattern acquired by the imaging assembly, thereby improving the clarity and accuracy of the surface imaging of the object to be measured.

[0039] The surface imaging method provided by the present application will be described in detail below in conjunction with specific embodiments.

[0040] Referring to Figure 2 , a flowchart of a surface imaging method is provided in the embodiments of the present application. As shown in Figure 2 ​As shown, the method described in this application embodiment may include the following steps S101-S105.

[0041] S101, obtain the initial rotation angle of the lens in the projection component, and obtain a set of rotation angles containing at least two rotation angles based on the initial rotation angle.

[0042] In one embodiment, before performing surface imaging processing on the object to be tested, the initial rotation angle of the lens in the projection assembly is obtained, i.e., the current rotation angle of the lens in the projection assembly. This can be the initial rotation angle corresponding to the projection assembly when the relevant personnel install it according to the slot on the projection assembly. The imaging device can obtain a set of rotation angles containing at least two rotation angles based on the initial rotation angle. For example, at least two rotation angles can be obtained with the initial rotation angle as the zero point and a preset angle as the step size to generate a set of rotation angles. The preset angle can be the initial setting of the imaging device, or it can be set and saved by the relevant personnel on the imaging device.

[0043] S102, for the reference plane, obtain the phase error distribution corresponding to each rotation angle in the set of rotation angles.

[0044] In one embodiment, before placing the object under test on the reference plane, the lens of the projection component is sequentially adjusted to each rotation angle in the rotation angle set and projects grating fringes onto the reference plane. Then, the camera component acquires at least three grating fringe images of the grating fringes. For example, if the imaging device uses a three-step phase-shifting method to obtain the full-field phase distribution, and then obtains the surface image of the object under test based on the full-field phase distribution, then the imaging device needs to acquire three grating fringe images of the grating fringes using the camera component. The imaging device can calculate the full-field phase distribution corresponding to the projection component's lens projecting the grating fringes under the conditions of each rotation angle based on the at least three grating fringe images corresponding to each rotation angle. Imaging equipment can Once the reference phase distribution is identified, a cubic polynomial surface fitting is performed on the reference phase distribution to obtain the desired phase distribution. The difference between the reference phase distribution and the desired phase distribution can be used to obtain the phase error distribution corresponding to each rotation angle.

[0045] S103, based on the phase error distribution corresponding to each rotation angle, obtain the phase error variance corresponding to each rotation angle.

[0046] In one embodiment, the full-field phase distribution calculated from the image acquired by the imaging assembly after the grating fringe projected by the projection assembly on the reference plane is represented by the reference phase distribution, and the reference phase distribution is affected by the rotation angle of the lens of the projection assembly, and there may be noise, bad points in the image acquired by the imaging assembly, that is, there are inaccurate, non-existent or erroneous data pixel points, which will cause the surface imaging of the measured object calculated from the reference phase distribution to be unclear and inaccurate. The full-field phase distribution corresponding to the grating fringe projected at the same rotation angle and satisfying the ideal state, high fringe contrast and few noise and bad points in the image acquired by the imaging assembly is calculated from the expected phase distribution represented by the phase distribution. The phase error distribution represents the difference between the reference phase distribution and the expected phase distribution. The imaging device can calculate the variance of the phase error distribution corresponding to each rotation angle to obtain the phase error variance corresponding to each rotation angle. It can be understood that the smaller the phase error variance of the phase error distribution, the smaller the difference between the reference phase distribution and the expected phase distribution, the higher the fringe contrast of the grating fringe projected at the rotation angle corresponding to the reference phase distribution, the fewer the noise and bad points in the image acquired by the imaging assembly, and the more accurate the surface imaging of the measured object that can be acquired.

[0047] S104, acquiring the minimum variance in the phase error variances corresponding to each rotation angle, and determining the rotation angle corresponding to the minimum variance as the expected rotation angle.

[0048] In one embodiment, the imaging device can find the minimum variance in the phase error variances corresponding to each rotation angle in the set of rotation angles, and determine the rotation angle corresponding to the minimum variance as the expected rotation angle. It can be understood that when the lens of the projection assembly is adjusted to the expected rotation angle, the difference between the reference phase distribution corresponding to the grating fringe projected on the reference plane and the calculated expected phase distribution is the smallest. At this time, the grating fringe projected on the reference plane satisfies the high fringe contrast, and the noise and bad points in the image acquired by the imaging assembly are the fewest.

[0049] S105, adjusting the lens of the projection assembly to the expected rotation angle, and projecting the grating fringe on the measured object on the reference plane by using the projection assembly, and performing surface imaging processing on the measured object by using the imaging assembly.

[0050] In one embodiment, the object to be imaged is placed on a reference plane. The imaging device adjusts the lens of the projection component to the desired rotation angle and projects grating fringes onto the object on the reference plane. Then, the camera component acquires at least three grating fringe images of the object and the grating fringes projected onto it. Based on these at least three grating fringe images, the PMP algorithm is used to perform surface imaging processing on the object. Since the grating fringes at this point have higher contrast while the noise and dead pixels in the grating fringe images acquired by the camera component are minimized, the overall phase distribution calculated from the at least three grating fringe images is improved. The accuracy is improved based on the phase distribution of the entire field. The clarity and accuracy of the obtained surface image of the object under test.

[0051] In this embodiment, a set of rotation angles is obtained based on the initial rotation angle of the lens in the projection component. For the reference plane, the phase error distribution and the phase error variance corresponding to each rotation angle in the set are obtained. The minimum variance among the phase error variances corresponding to each rotation angle is obtained, and the rotation angle corresponding to the minimum variance is determined as the desired rotation angle. The lens of the projection component is adjusted to the desired rotation angle, and the projection component projects grating fringes onto the object under test on the reference plane. The camera component performs surface imaging processing on the object under test. By obtaining the desired rotation angle corresponding to the phase error distribution with the minimum variance, the grating fringes projected at the desired rotation angle have higher contrast, and the image acquired by the camera component has less noise and dead pixels, thereby resulting in higher clarity and accuracy of the acquired object surface image.

[0052] 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-S207.

[0053] S201, obtain the initial rotation angle of the lens in the projection component, and obtain a set of rotation angles containing at least two rotation angles based on the initial rotation angle.

[0054] In one embodiment, before performing surface imaging processing on the object to be measured, the initial rotation angle of the lens in the projection assembly is obtained, i.e., the current rotation angle of the lens in the projection assembly. This can be the initial rotation angle of the projection assembly when the relevant personnel install it according to the slot on the projection assembly. The imaging device can obtain a set of rotation angles containing at least two rotation angles based on the initial rotation angle.

[0055] Optionally, the imaging device can obtain an initial rotation angle of the lens in the projection assembly, and take the initial rotation angle as a zero point, a first angle as a step to obtain a first rotation angle satisfying a preset number, the first angle being greater than zero; then take the initial rotation angle as the zero point, a second angle as the step to obtain a second rotation angle satisfying the preset number, the second angle being less than zero, and the imaging device generates a rotation angle set according to the initial rotation angle, the first rotation angle and the second rotation angle, wherein the absolute values of the first angle and the second angle can be the same, and the first angle, the second angle and the preset number can be initial settings of the imaging device or can be set by relevant staff and saved in the imaging device. Please refer to Figure 4 An example schematic diagram of obtaining a rotation angle set is provided for the embodiment of the present application. Take the initial rotation angle as a zero point, and a first angle as a step to obtain a first rotation angle satisfying a preset number, the first rotation angle adjacent to the initial rotation angle being angle A, the difference between the initial rotation angle and angle A being the first angle, and the difference between two adjacent first rotation angles also being the first angle, for example, the imaging device can rotate clockwise by the first angle based on the initial rotation angle to obtain angle A. Similarly, the imaging device takes the initial rotation angle as a zero point, and a second angle as a step to obtain a second rotation angle satisfying a preset number, the second rotation angle adjacent to the initial rotation angle being angle B, the difference between the initial rotation angle and angle B being the second angle, and the difference between two adjacent second rotation angles also being the second angle, for example, the imaging device can rotate counterclockwise by the second angle based on the initial rotation angle to obtain angle B, and all the first rotation angles, all the second rotation angles and the initial rotation angle form a rotation angle set.

[0056] S202, for the reference plane, obtaining a target reference phase distribution corresponding to a target rotation angle in the rotation angle set.

[0057] In one embodiment, before placing the object to be measured on the reference plane, the imaging device can sequentially adjust the lens of the projection assembly to each rotation angle in the rotation angle set and project a grating fringe to the reference plane, and then use the camera assembly to collect at least three grating fringe images corresponding to each rotation angle. The imaging device can calculate the reference phase distribution corresponding to the projection assembly projecting the grating fringe at each rotation angle according to the at least three grating fringe images corresponding to each rotation angle.

[0058] Optionally, the imaging device can adjust the lens of the projection assembly to a target rotation angle in the set of rotation angles, project the grating fringe onto the reference plane by using the projection assembly, and then collect at least three grating fringe images of the grating fringe on the reference plane by using the camera assembly. The imaging device can calculate the full-field phase distribution at the target rotation angle based on the at least three grating fringe images, and determine the full-field phase distribution as a target reference phase distribution corresponding to the target rotation angle. It can be understood that, if the imaging device obtains the full-field phase distribution by using the three-step phase shift method, and then obtains the surface imaging of the object to be measured based on the full-field phase distribution, the imaging device needs to collect three grating fringe images of the grating fringe by using the camera assembly. If the imaging device uses the four-step phase shift method, the imaging device needs to collect four grating fringe images of the grating fringe by using the camera assembly.

[0059] In S203, the target reference phase distribution is fitted by a cubic polynomial surface by using the least square method, to obtain a target expected phase distribution.

[0060] In one embodiment, the imaging device can fit the reference phase distribution corresponding to each rotation angle in the set of rotation angles by a surface, to obtain an expected phase distribution corresponding to each rotation angle. The imaging device can fit the target reference phase distribution corresponding to the target rotation angle by a cubic polynomial surface by using the least square method, to obtain a target expected phase distribution corresponding to the target rotation angle.

[0061] In S204, the target reference phase distribution and the target expected phase distribution are subtracted, to obtain a target phase error distribution corresponding to the target rotation angle.

[0062] In one embodiment, the reference phase distribution represents the full-field phase distribution calculated from the image obtained by the camera assembly after the projection assembly projects the grating fringe onto the reference plane. Due to the rotation angle of the lens of the projection assembly, there can be noise, bad points, i.e., pixel points with inaccurate data, non-existent data or wrong data, in the image obtained by the camera assembly, which can cause the surface imaging of the object to be measured calculated from the reference phase distribution to be unclear and inaccurate. The expected phase distribution represents the full-field phase distribution corresponding to the grating fringe projected at the same rotation angle, which satisfies the ideal state, has high fringe contrast, and has less noise and bad points in the image obtained by the camera assembly. The phase error distribution represents the difference between the reference phase distribution and the expected phase distribution. The imaging device can obtain the phase error distribution corresponding to each rotation angle according to the reference phase distribution corresponding to each rotation angle and the expected phase distribution corresponding to each rotation angle.

[0063] Optionally, the imaging device can subtract the target reference phase distribution and the target expected phase distribution to obtain a target phase error distribution corresponding to the target rotation angle, and the formula is as follows:

[0064]

[0065] wherein, is a target phase error distribution corresponding to the target rotation angle, is a target reference phase distribution corresponding to the target rotation angle, is a target expected phase distribution corresponding to the target rotation angle.

[0066] S205, variance of the target phase error distribution is calculated to obtain a target phase error variance corresponding to the target rotation angle.

[0067] In an embodiment, the imaging device can calculate the variance of the phase error distribution corresponding to each rotation angle to obtain the phase error variance corresponding to each rotation angle. It can be understood that the smaller the phase error variance of the phase error distribution, the smaller the difference between the reference phase distribution and the expected phase distribution, the higher the fringe contrast of the projected grating fringe at the rotation angle corresponding to the reference phase distribution, the less noise and bad points in the image obtained by the imaging assembly, and the more accurate the surface imaging of the object to be measured.

[0068] Optionally, the imaging device can calculate the variance of the target phase error distribution to obtain the target phase error variance corresponding to the target rotation angle, and the formula is as follows:

[0069]

[0070]

[0071] wherein V is the target phase error variance corresponding to the target rotation angle, N and M represent the number of rows and columns of the pixel points in the grating fringe image, respectively.

[0072] S206, the minimum variance in the phase error variance corresponding to each rotation angle is obtained, and the rotation angle corresponding to the minimum variance is determined as the expected rotation angle.

[0073] In an embodiment, the imaging device can find the minimum variance in the phase error variance corresponding to each rotation angle in the set of rotation angles, and determine the rotation angle corresponding to the minimum variance as the expected rotation angle. It can be understood that when the lens of the projection assembly is adjusted to the expected rotation angle, the difference between the reference phase distribution corresponding to the projected grating fringe on the reference plane and the calculated expected phase distribution is the smallest, and at this time the grating fringe projected on the reference plane satisfies the high fringe contrast, and the noise and bad points in the image obtained by the imaging assembly are the least.

[0074] Optionally, the imaging device can further generate a variance fitting curve according to the rotation angles and the phase error variances corresponding to the rotation angles, for example, generate a variance fitting curve with the rotation angles as independent variables and the phase error variances corresponding to the rotation angles as variables, find the lowest point of the variance fitting curve, and the phase error variance corresponding to the lowest point is the minimum variance, and the rotation angle corresponding to the lowest point is the expected rotation angle.

[0075] Optionally, in addition to using the phase error variance to represent the difference value between the reference phase distribution and the expected phase distribution, the imaging device can also obtain the phase error absolute value by taking the absolute value of the phase error distribution, and the formula is as follows:

[0076]

[0077]

[0078] wherein L is the target phase error absolute value corresponding to the target rotation angle, N and M represent the number of rows and columns of pixel points in the grating fringe image respectively. It can be understood that if the imaging device calculates the phase error absolute value corresponding to each rotation angle instead of the phase error variance, the minimum absolute value in the phase error absolute value corresponding to each rotation angle is obtained, and the rotation angle corresponding to the minimum absolute value is determined as the expected rotation angle.

[0079] S207, adjusting the lens of the projection assembly to the expected rotation angle, and using the projection assembly to project the grating fringe onto the object to be measured on the reference plane, and using the camera assembly to perform surface imaging processing on the object to be measured.

[0080] The object to be measured that needs to be subjected to surface imaging processing is placed on the reference plane, the imaging device adjusts the lens of the projection assembly to the expected rotation angle, uses the projection assembly to project the grating fringe onto the object to be measured on the reference plane, and then uses the camera assembly to obtain at least three grating fringe images of the object to be measured and the grating fringe projected on the object to be measured. Based on the at least three grating fringe images, the PMP algorithm is used to perform surface imaging processing on the object to be measured. Since the grating fringe at this time satisfies the higher fringe contrast, the noise and bad points in the grating fringe image obtained by the camera assembly are also the least, thereby improving the accuracy of the full-field phase distribution calculated according to the at least three grating fringe images, and improving the clarity and accuracy of the surface imaging of the object to be measured obtained according to the full-field phase distribution .

[0081] In the embodiment of the present application, the initial rotation angle of the lens in the projection assembly is taken as the zero point, the first angle and the second angle are used to obtain the first rotation angle and the second rotation angle, the rotation angle set is generated according to the initial rotation angle, the first rotation angle and the second rotation angle, the phase error distribution corresponding to each rotation angle in the rotation angle set is obtained for the reference plane, the phase error variance corresponding to each rotation angle is obtained by making variance of the phase error distribution corresponding to each rotation angle, the minimum variance in the phase error variance corresponding to each rotation angle is obtained, the rotation angle corresponding to the minimum variance is determined as the expected rotation angle, the lens of the projection assembly is adjusted to the expected rotation angle, the projection assembly is used to project the grating fringe on the object to be measured on the reference plane, and the surface imaging of the object to be measured is processed by using the camera assembly. By obtaining the expected rotation angle corresponding to the phase error distribution with the minimum variance, the fringe contrast of the grating fringe projected at the expected rotation angle is higher, and the noise and bad points in the image obtained by the camera assembly are less, so that the clarity and accuracy of the obtained surface imaging of the object are higher. And the expected rotation angle corresponding to the lowest point of the variance fitting curve between the rotation angle and the phase error variance can be obtained by fitting the variance fitting curve, the accuracy of the expected rotation angle is improved, and the clarity and accuracy of the surface imaging of the object are further improved.

[0082] Please refer to Figure 5 A structural schematic diagram of an imaging device is provided for the embodiment of the present application. As shown in the figure, Figure 5 The imaging device of the embodiment of the present application comprises a projection assembly, a camera assembly and a processor, the processor comprises a phase distribution calculation assembly, a variance calculation assembly and a surface imaging assembly.

[0083] One end of the variance calculation assembly is connected with the phase distribution calculation assembly, the other end of the variance calculation assembly is connected with the surface imaging assembly, the projection assembly is connected with the phase distribution calculation assembly, the phase distribution calculation assembly is connected with the camera assembly, the projection assembly is connected with the surface imaging assembly, and the surface imaging assembly is connected with the camera assembly.

[0084] Before the surface imaging of the object to be measured is processed, the projection assembly can obtain the initial rotation angle of the lens, that is, the current rotation angle of the lens in the projection assembly, which can be the initial rotation angle of the projection assembly corresponding to the installation of the related staff according to the card slot on the projection assembly. The projection assembly sends the initial rotation angle of the lens to the phase distribution calculation assembly.

[0085] After receiving the initial rotation angle, the phase distribution calculation component can obtain a rotation angle set containing at least two rotation angles according to the initial rotation angle. The phase distribution calculation component can take the initial rotation angle as the zero point, obtain a first rotation angle satisfying a preset number with a first angle as the step, and the first angle is greater than zero; then take the initial rotation angle as the zero point, obtain a second rotation angle satisfying the preset number with a second angle as the step, and the second angle is less than zero. The phase distribution calculation component generates the rotation angle set according to the initial rotation angle, the first rotation angle and the second rotation angle, wherein the absolute values of the first angle and the second angle can be the same, and the first angle, the second angle and the preset number can be the initial settings of the imaging device or can be set by the relevant staff and saved in the imaging device.

[0086] Before placing the object to be measured on the reference plane, the phase distribution calculation component can send each rotation angle in the rotation angle set to the projection component once. After receiving each rotation angle, the projection component adjusts the lens to each rotation angle in the rotation angle set in turn, and projects a grating fringe onto the reference plane according to each rotation angle. The phase distribution calculation component can send an image acquisition instruction to the camera component. After receiving the image acquisition instruction, the camera component will collect at least three grating fringe images corresponding to each rotation angle, and send the at least three grating fringe images corresponding to each rotation angle to the phase distribution calculation component. The phase distribution calculation component can calculate the reference phase distribution corresponding to each rotation angle according to the at least three grating fringe images corresponding to each rotation angle. The phase distribution calculation component can perform surface fitting on the reference phase distribution corresponding to each rotation angle to obtain the expected phase distribution corresponding to each rotation angle. The phase distribution calculation component sends the reference phase distribution corresponding to each rotation angle and the expected phase distribution corresponding to each rotation angle to the variance calculation component. Optionally, the phase distribution calculation component can send a target rotation angle in the rotation angle set to the projection component. The projection component adjusts the lens to the target rotation angle and projects a grating fringe onto the reference plane. The phase distribution calculation component sends an image acquisition instruction to the camera component. Based on the image acquisition instruction, the camera component collects at least three grating fringe images for the grating fringe on the reference plane, and sends the at least three grating fringe images to the phase distribution calculation component. The phase distribution calculation component calculates the full-field phase distribution corresponding to the target rotation angle based on the at least three grating fringe images, and confirms the full-field phase distribution as the target reference phase distribution corresponding to the target rotation angle. Then, the phase distribution calculation component performs cubic polynomial surface fitting on the target reference phase distribution corresponding to the target rotation angle using the least squares method to obtain the target expected phase distribution corresponding to the target rotation angle.

[0087] The variance calculation component can obtain a phase error distribution corresponding to each rotation angle according to the reference phase distribution corresponding to each rotation angle and the expected phase distribution corresponding to each rotation angle, and then can calculate the variance of the phase error distribution corresponding to each rotation angle to obtain the phase error variance corresponding to each rotation angle. Optionally, the variance calculation component can subtract the target reference phase distribution corresponding to the target rotation angle from the target expected phase distribution corresponding to the target rotation angle to obtain a target phase error distribution corresponding to the target rotation angle, and then calculate the variance of the target phase error distribution to obtain the phase error variance corresponding to the target rotation angle.

[0088] The variance calculation component can find the minimum variance in the phase error variances corresponding to the rotation angles in the set of rotation angles, and determine the rotation angle corresponding to the minimum variance as the expected rotation angle. Optionally, the variance calculation component can also generate a variance fitting curve according to the rotation angles and the phase error variances corresponding to the rotation angles, for example, generate a variance fitting curve with the rotation angles as independent variables and the phase error variances corresponding to the rotation angles as dependent variables, find the lowest point of the variance fitting curve, and the phase error variance corresponding to the lowest point is the minimum variance, and the rotation angle corresponding to the lowest point is the expected rotation angle. The variance calculation component sends the expected rotation angle to the surface imaging component.

[0089] After the surface imaging component receives the expected rotation angle, it generates a first instruction based on the expected rotation angle, sends the first instruction to the projection component, and the projection component adjusts to the expected rotation angle after receiving the first instruction, and projects a grating fringe onto the object to be measured on the reference plane according to the expected rotation angle; the surface imaging component sends a second instruction to the camera component, the camera component acquires at least three fringe images of the object to be measured based on the second instruction after receiving the second instruction, and sends the at least three fringe images to the surface imaging component, and the surface imaging component performs surface imaging processing on the object to be measured using the PMP algorithm according to the at least three fringe images.

[0090] In the embodiment of the present application, the initial rotation angle of the lens in the projection assembly is taken as the zero point, the first angle and the second angle are used to obtain the first rotation angle and the second rotation angle, the rotation angle set is generated according to the initial rotation angle, the first rotation angle and the second rotation angle, the phase error distribution corresponding to each rotation angle in the rotation angle set is obtained for the reference plane, the phase error variance corresponding to each rotation angle is obtained by making variance of the phase error distribution corresponding to each rotation angle, the minimum variance in the phase error variance corresponding to each rotation angle is obtained, the rotation angle corresponding to the minimum variance is determined as the expected rotation angle, the lens of the projection assembly is adjusted to the expected rotation angle, the projection assembly is used to project the grating fringe on the object to be measured on the reference plane, and the surface imaging of the object to be measured is processed by using the camera assembly. By obtaining the expected rotation angle corresponding to the phase error distribution with the minimum variance, the fringe contrast of the grating fringe projected at the expected rotation angle is higher, and the noise and bad points in the image obtained by the camera assembly are less, so that the clarity and accuracy of the obtained surface imaging of the object are higher. Moreover, the expected rotation angle corresponding to the lowest point of the variance fitting curve between the rotation angle and the phase error variance can be obtained by obtaining the variance fitting curve between the rotation angle and the phase error variance, so as to improve the accuracy of the expected rotation angle and further improve the clarity and accuracy of the surface imaging of the object.

[0091] The embodiments of the present application will be described below in detail with reference to the accompanying drawings. Figure 6 The surface imaging device provided by the embodiments of the present application will be described in detail. It should be noted that the surface imaging device in the embodiments of the present application is used to execute the method of the embodiments of the present application shown in Figure 6 Figure 2 and Figure 3 In order to facilitate the description, only the parts related to the embodiments of the present application are shown, and the specific technical details not disclosed are described with reference to the embodiments shown in Figure 2 and Figure 3

[0092] Please refer to Figure 6 , which shows a structure schematic diagram of the surface imaging device provided by an exemplary embodiment of the present application. The surface imaging device can be realized by software, hardware or a combination of the two to become all or part of the device. The device 1 includes a rotation angle obtaining module 11, an error distribution obtaining module 12, a variance obtaining module 13, an expected angle obtaining module 14 and an imaging processing module 15.

[0093] The rotation angle obtaining module 11 is used to obtain the initial rotation angle of the lens in the projection assembly, and obtain the rotation angle set containing at least two rotation angles based on the initial rotation angle;

[0094] Optionally, the rotation angle obtaining module 11 is specifically used to obtain the initial rotation angle of the lens in the projection assembly;

[0095] ​​Take the initial rotation angle as a zero point, and a first angle as a step to obtain a first rotation angle satisfying a preset number, the first angle being greater than zero;

[0096] Take the initial rotation angle as a zero point, and a second angle as a step to obtain a second rotation angle satisfying the preset number, the second angle being less than zero;

[0097] Generate a rotation angle set based on the initial rotation angle, the first rotation angle, and the second rotation angle.

[0098] An error distribution obtaining module 12 is configured to obtain, for a reference plane, a phase error distribution corresponding to each rotation angle in the rotation angle set;

[0099] Optionally, the error distribution obtaining module 12 is specifically configured to obtain, for a reference plane, a target reference phase distribution corresponding to a target rotation angle in the rotation angle set;

[0100] Perform surface fitting on the target reference phase distribution to obtain a target expected phase distribution;

[0101] Differ the target reference phase distribution and the target expected phase distribution to obtain a target phase error distribution corresponding to the target rotation angle.

[0102] Optionally, the error distribution obtaining module 12 is specifically configured to adjust a lens of the projection assembly to a target rotation angle in the rotation angle set, and project a grating fringe onto a reference plane by using the projection assembly;

[0103] Obtain a target reference phase distribution corresponding to the target rotation angle based on at least three grating fringe images collected by the camera assembly for the grating fringe.

[0104] Optionally, the error distribution obtaining module 12 is specifically configured to perform cubic polynomial surface fitting on the target reference phase distribution by using a least square method to obtain a target expected phase distribution.

[0105] A variance obtaining module 13 is configured to obtain a phase error variance corresponding to each rotation angle based on the phase error distribution corresponding to the rotation angle;

[0106] Optionally, the variance obtaining module 13 is specifically configured to obtain a target phase error variance corresponding to the target rotation angle by calculating a variance of the target phase error distribution.

[0107] An expected angle obtaining module 14 is configured to obtain a minimum variance in the phase error variances corresponding to the rotation angles, and determine a rotation angle corresponding to the minimum variance as an expected rotation angle;

[0108] Optionally, the expected angle obtaining module 14 is specifically configured to obtain a variance fitting curve based on the rotation angles and the phase error variances corresponding to the rotation angles.

[0109] Obtain the minimum variance in the variance fitting curve, and determine the rotation angle corresponding to the minimum variance as the expected rotation angle.

[0110] The imaging processing module 15 is configured to adjust the lens of the projection assembly to the expected rotation angle, project the grating fringe on the object to be measured on the reference plane by using the projection assembly, and perform surface imaging processing on the object to be measured by using the camera assembly.

[0111] In the embodiment, the initial rotation angle of the lens in the projection assembly is taken as the zero point, the first angle and the second angle are taken as the step to obtain the first rotation angle and the second rotation angle, the rotation angle set is generated according to the initial rotation angle, the first rotation angle and the second rotation angle, the phase error distribution corresponding to each rotation angle in the rotation angle set is obtained for the reference plane, the phase error variance corresponding to each rotation angle is obtained by making variance of the phase error distribution corresponding to each rotation angle, the minimum variance in the phase error variances corresponding to each rotation angle is obtained, the rotation angle corresponding to the minimum variance is determined as the expected rotation angle, the lens of the projection assembly is adjusted to the expected rotation angle, the grating fringe is projected on the object to be measured on the reference plane by using the projection assembly, and the surface imaging processing is performed on the object to be measured by using the camera assembly. By obtaining the expected rotation angle corresponding to the phase error distribution with the minimum variance, the fringe contrast of the grating fringe projected at the expected rotation angle is higher, and the noise and bad points in the image obtained by the camera assembly are less, so that the clarity and accuracy of the obtained surface imaging of the object are higher. Moreover, the variance fitting curve between the rotation angle and the phase error variance can be obtained, the expected rotation angle corresponding to the lowest point of the variance fitting curve is obtained, the accuracy of the expected rotation angle is improved, and the clarity and accuracy of the surface imaging of the object are further improved.

[0112] It should be noted that the surface imaging device provided in the above embodiments is only used as an example to illustrate the division of the above functional modules when the surface imaging method is performed. In actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the surface imaging device and the surface imaging method provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments. Here, it is not repeated.

[0113] The serial numbers of the above embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0114] The embodiment of the present application further provides a computer storage medium, which can store a plurality of instructions, and the instructions are suitable for being loaded and executed by a processor to implement the surface imaging method of the above-mentioned embodiment. Figures 2-4 The specific implementation process of the surface imaging method of the above-mentioned embodiment can refer to the specific description of the above-mentioned embodiment, which will not be repeated here. Figures 2-4 The specific implementation process of the surface imaging method of the above-mentioned embodiment can refer to the specific description of the above-mentioned embodiment, which will not be repeated here.

[0115] The embodiment of the present application further provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the surface imaging method of the above-mentioned embodiment. Figures 2-4 The specific implementation process of the surface imaging method of the above-mentioned embodiment can refer to the specific description of the above-mentioned embodiment, which will not be repeated here. Figures 2-4 The specific implementation process of the surface imaging method of the above-mentioned embodiment can refer to the specific description of the above-mentioned embodiment, which will not be repeated here.

[0116] Please refer to Figure 7 Fig. 1 shows a structural block diagram of a server provided by an example embodiment of the present application. The server in the present application can include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140 and a bus 150. The processor 110, the memory 120, the input device 130 and the output device 140 can be connected through the bus 150.

[0117] The processor 110 can include one or more processing cores. The processor 110 connects various parts in the entire server through various interfaces and lines, executes various functions of the terminal 100 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be realized in at least one of the hardware forms of digital signal processing (DSP), field programmable gate array (FPGA) and programmable logic array (PLA). The processor 110 can integrate a combination of one or more of central processing unit (CPU), graphics processing unit (GPU) and modem. Among them, the CPU mainly processes operating systems, user pages and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used for processing wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 110, but be realized by a separate communication chip.

[0118] The memory 120 can include a Random Access Memory (RAM) and a Read-Only Memory (ROM). Optionally, the memory 120 includes a Non-Transitory Computer-Readable Storage Medium. The memory 120 can be used to store instructions, programs, codes, code sets, or instruction sets. The memory 120 can include a program storage area and a data storage area, where the program storage area can store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-mentioned various method embodiments, etc., and the operating system can be an Android system, an IOS system developed by Apple Inc., a system developed based on the Android system or the IOS system, or other systems.

[0119] The memory 120 can be divided into an operating system space and a user space, where the operating system runs in the operating system space, and native and third-party applications run in the user space. In order to ensure that different third-party applications can achieve good running effects, the operating system allocates corresponding system resources to different third-party applications. However, there are also differences in the demand for system resources in different application scenarios in the same third-party application, for example, in the local resource loading scenario, the third-party application has a higher requirement for the disk reading speed; in the animation rendering scenario, the third-party application has a higher requirement for the GPU performance. However, the operating system and the third-party application are independent of each other, and the operating system often cannot timely perceive the current application scenario of the third-party application, resulting in that the operating system cannot perform targeted system resource adaptation according to the specific application scenario of the third-party application.

[0120] In order to enable the operating system to distinguish the specific application scenario of the third-party application, it is necessary to open up the data communication between the third-party application and the operating system, so that the operating system can obtain the current scenario information of the third-party application at any time, and then perform targeted system resource adaptation based on the current scenario.

[0121] The input device 130 is configured to receive input instructions or data, and the input device 130 includes but is not limited to a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is configured to output instructions or data, and the output device 140 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 are a touch display screen.

[0122] The touch display screen can be designed as a full screen, a curved screen or a special-shaped screen. The touch display screen can also be designed as a combination of a full screen and a curved screen, a combination of a special-shaped screen and a curved screen, and the present application does not limit this.

[0123] In addition, those skilled in the art can understand that the structure of the terminal shown in the above figure does not constitute a limitation on the terminal, and the terminal can include more or fewer components than the figure, or combine certain components, or different component arrangements. For example, the terminal also includes radio frequency circuit, input unit, sensor, audio circuit, wireless fidelity (Wireless Fidelity, WiFi) module, power supply, Bluetooth module and other components, which will not be described here.

[0124] In Figure 7 In the electronic device shown, the processor 110 can be used to call the surface imaging application stored in the memory 120, and specifically perform the following operations:

[0125] Obtain an initial rotation angle of a lens in the projection assembly, and obtain a rotation angle set containing at least two rotation angles based on the initial rotation angle;

[0126] For a reference plane, obtain a phase error distribution corresponding to each rotation angle in the rotation angle set;

[0127] Based on the phase error distribution corresponding to each rotation angle, obtain a phase error variance corresponding to each rotation angle;

[0128] Obtain the minimum variance in the phase error variance corresponding to each rotation angle, and determine the rotation angle corresponding to the minimum variance as the expected rotation angle;

[0129] Adjust the lens of the projection assembly to the expected rotation angle, and use the projection assembly to project a grating fringe on the object to be measured on the reference plane, and use the camera assembly to perform surface imaging processing on the object to be measured.

[0130] In one embodiment, when the processor 110 performs the operation of obtaining an initial rotation angle of a lens in the projection assembly and obtaining a rotation angle set containing at least two rotation angles based on the initial rotation angle, it specifically performs the following operations:

[0131] Obtain an initial rotation angle of a lens in the projection assembly;

[0132] Take the initial rotation angle as the zero point, and obtain a first rotation angle satisfying a preset number with a first angle as a step, the first angle being greater than zero;

[0133] Take the initial rotation angle as the zero point, and obtain a second rotation angle satisfying the preset number with a second angle as a step, the second angle being less than zero;

[0134] generate a set of rotation angles based on the initial rotation angle, the first rotation angle and the second rotation angle.

[0135] In one embodiment, the processor 110, when performing the operation of obtaining a target reference phase distribution corresponding to a target rotation angle in the set of rotation angles for a reference plane, specifically performs the following operation:

[0136] obtaining a target reference phase distribution corresponding to a target rotation angle in the set of rotation angles for a reference plane;

[0137] performing surface fitting on the target reference phase distribution to obtain a target expected phase distribution;

[0138] obtaining a target phase error distribution corresponding to the target rotation angle by differencing the target reference phase distribution and the target expected phase distribution.

[0139] In one embodiment, the processor 110, when performing the operation of obtaining a target reference phase distribution corresponding to a target rotation angle in the set of rotation angles for a reference plane, specifically performs the following operation:

[0140] adjusting a lens of the projection component to a target rotation angle in the set of rotation angles, and projecting a grating fringe onto a reference plane by using the projection component;

[0141] obtaining a target reference phase distribution corresponding to the target rotation angle based on at least three grating fringe images collected by the camera component for the grating fringe.

[0142] In one embodiment, the processor 110, when performing the operation of performing surface fitting on the target reference phase distribution to obtain a target expected phase distribution, specifically performs the following operation:

[0143] performing cubic polynomial surface fitting on the target reference phase distribution by using a least square method to obtain a target expected phase distribution.

[0144] In one embodiment, the processor 110, when performing the operation of obtaining a phase error variance corresponding to each rotation angle based on the phase error distribution corresponding to the rotation angle, specifically performs the following operation:

[0145] obtaining a target phase error variance corresponding to the target rotation angle by calculating a variance of the target phase error distribution.

[0146] In one embodiment, the processor 110, when performing the operation of obtaining a minimum variance in the phase error variances corresponding to the rotation angles, and determining a rotation angle corresponding to the minimum variance as an expected rotation angle, specifically performs the following operation:

[0147] Based on the rotation angles and the phase error variances corresponding to the rotation angles, a variance fitting curve is obtained;

[0148] A minimum variance is obtained in the variance fitting curve, and a rotation angle corresponding to the minimum variance is determined as an expected rotation angle.

[0149] In the embodiment, the initial rotation angle of the lens in the projection assembly is taken as a zero point, the first angle and the second angle are taken as steps to obtain the first rotation angle and the second rotation angle, a rotation angle set is generated according to the initial rotation angle, the first rotation angle and the second rotation angle, a phase error distribution corresponding to each rotation angle in the rotation angle set is obtained for the reference plane, a phase error variance corresponding to each rotation angle is obtained by taking variance of the phase error distribution corresponding to each rotation angle, a minimum variance in the phase error variances corresponding to the rotation angles is obtained, a rotation angle corresponding to the minimum variance is determined as an expected rotation angle, the lens of the projection assembly is adjusted to the expected rotation angle, the projection assembly is used to project a grating fringe on a to-be-measured object on the reference plane, and the camera assembly is used to perform surface imaging processing on the to-be-measured object. By obtaining the expected rotation angle corresponding to the phase error distribution with the minimum variance, the grating fringe projected at the expected rotation angle has higher fringe contrast, and the image obtained by the camera assembly has less noise and bad points, so that the clarity and accuracy of the obtained object surface imaging are higher. Moreover, a variance fitting curve between the rotation angles and the phase error variances is obtained, the expected rotation angle corresponding to the lowest point of the variance fitting curve is obtained, the accuracy of the expected rotation angle is improved, and the clarity and accuracy of the object surface imaging are further improved.

[0150] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when the program is executed, the processes of the above-mentioned embodiments of the methods can be included. The storage medium can be a magnetic disc, an optical disc, a read-only memory or a random access memory, etc.

[0151] The above disclosure is only the preferred embodiment of the present application, and of course cannot limit the scope of the rights of the present application, so equivalent changes made according to the claims of the present application are still within the scope of the present application.

Claims

1. A surface imaging method applied in an imaging device, the imaging device comprising a projection assembly and a camera assembly, characterized in that, The method comprises: acquiring an initial rotation angle of a lens in the projection assembly, and acquiring a rotation angle set comprising at least two rotation angles based on the initial rotation angle; acquiring a phase error distribution corresponding to each rotation angle in the rotation angle set for a reference plane; acquiring a phase error variance corresponding to each rotation angle based on the phase error distribution corresponding to each rotation angle; acquiring a minimum variance in the phase error variance corresponding to each rotation angle, and determining a rotation angle corresponding to the minimum variance as an expected rotation angle; adjusting the lens of the projection assembly to the expected rotation angle, projecting a grating fringe on a to-be-measured object on the reference plane by using the projection assembly, and performing surface imaging processing on the to-be-measured object by using the camera assembly; the acquiring of the phase error distribution corresponding to each rotation angle in the rotation angle set for the reference plane comprises: acquiring a target reference phase distribution corresponding to a target rotation angle in the rotation angle set for the reference plane; performing curved surface fitting on the target reference phase distribution to acquire a target expected phase distribution; subtracting the target reference phase distribution from the target expected phase distribution to acquire a target phase error distribution corresponding to the target rotation angle.

2. The method of claim 1, wherein, the acquiring of the initial rotation angle of the lens in the projection assembly and the acquiring of the rotation angle set comprising at least two rotation angles based on the initial rotation angle comprise: acquiring an initial rotation angle of a lens in the projection assembly; taking the initial rotation angle as a zero point and a first angle as a step to acquire a first rotation angle satisfying a preset number, the first angle being greater than zero; taking the initial rotation angle as a zero point and a second angle as a step to acquire a second rotation angle satisfying the preset number, the second angle being less than zero; generating a rotation angle set based on the initial rotation angle, the first rotation angle and the second rotation angle.

3. The method of claim 1, wherein, the acquiring of the target reference phase distribution corresponding to the target rotation angle in the rotation angle set for the reference plane comprises: adjusting the lens of the projection assembly to a target rotation angle in the rotation angle set, and projecting a grating fringe on a reference plane by using the projection assembly; acquiring a target reference phase distribution corresponding to the target rotation angle based on at least three grating fringe images collected by the camera assembly for the grating fringe.

4. The method of claim 1, wherein, the performing of the curved surface fitting on the target reference phase distribution to acquire a target expected phase distribution comprises: performing cubic polynomial curved surface fitting on the target reference phase distribution by using a least square method to acquire a target expected phase distribution.

5. The method of claim 1, wherein, the acquiring of the phase error variance corresponding to each rotation angle based on the phase error distribution corresponding to each rotation angle comprises: calculating a variance of the target phase error distribution to acquire a target phase error variance corresponding to the target rotation angle.

6. The method of claim 1, wherein, the acquiring of a minimum variance in the phase error variance corresponding to each rotation angle and the determination of a rotation angle corresponding to the minimum variance as an expected rotation angle comprise: acquiring a variance fitting curve based on the rotation angles and the phase error variances corresponding to the rotation angles; acquiring a minimum variance in the variance fitting curve, and determining a rotation angle corresponding to the minimum variance as an expected rotation angle.

7. An image forming apparatus characterized by comprising: The imaging device comprises a projection assembly, a camera assembly and a processor. One end of the processor is connected with the projection assembly, and the other end of the processor is connected with the camera assembly. The projection assembly sends an initial rotation angle of a lens to the processor. The processor obtains a rotation angle set comprising at least two rotation angles based on the initial rotation angle. The processor obtains a phase error distribution corresponding to each rotation angle in the rotation angle set for a reference plane. The processor obtains a phase error variance corresponding to each rotation angle based on the phase error distribution corresponding to each rotation angle. The processor obtains a minimum variance in the phase error variances corresponding to each rotation angle, determines a rotation angle corresponding to the minimum variance as an expected rotation angle, and generates a first instruction based on the expected rotation angle. The processor sends the first instruction to the projection assembly, and the projection assembly adjusts the lens to the expected rotation angle based on the first instruction and projects a grating fringe on a to-be-measured object on the reference plane. The processor sends a second instruction to the camera assembly, and the camera assembly acquires a fringe image of the to-be-measured object based on the second instruction. The camera assembly sends the fringe image to the processor, and the processor performs surface imaging processing on the to-be-measured object based on the fringe image. The processor obtains a target reference phase distribution corresponding to a target rotation angle in the rotation angle set for a reference plane. The target reference phase distribution is subjected to surface fitting to obtain a target expected phase distribution. The target reference phase distribution and the target expected phase distribution are subtracted to obtain a target phase error distribution corresponding to the target rotation angle. The computer storage medium stores a plurality of instructions, which are suitable for being loaded and executed by the processor to perform the method steps of any one of claims 1-6.

8. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, which are suitable for being loaded and executed by the processor to perform the method steps of any one of claims 1-6.

9. An electronic device, comprising: The computer storage medium stores a plurality of instructions, which are suitable for being loaded and executed by the processor to perform the method steps of any one of claims 1-6. ​

Citation Information

Patent Citations

  • Test method for optical lens set

    CN1247324A

  • Rotational phase unwrapping

    US20150139385A1