A surface imaging method, storage medium, and device
By adjusting the projection component with the desired projection angle that minimizes the difference, and projecting grating stripes with high uniformity and high contrast, the problem of the projector's pitch angle affecting the accuracy of object contour calculation is solved, and clearer and more accurate object surface imaging is achieved.
Patent Information
- Application Number
- CN202111386728.9
- 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
The pitch angle of the projector affects the unevenness of the image depth, resulting in uneven and unclear stripes, which in turn affects the accuracy of object contour calculation.
By obtaining the desired projection angle that minimizes the difference between the actual modulation amplitude division and the desired modulation amplitude distribution, the projection component is adjusted to project grating stripes with high uniformity and high contrast, and the surface imaging process is performed using the camera component.
It improves the clarity and accuracy of object surface imaging, ensures the uniformity and contrast of grating fringes, and thus enhances the quality of object surface imaging.
Smart Images

Figure CN116147523B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a surface imaging method, a storage medium and an equipment. BACKGROUND
[0002] In the field of object contour scanning, face recognition and the like, fringe projection profilometry is used to obtain the object contour, a projector is needed to project a fringe on the object, and then a camera is used to obtain a fringe image to calculate the contour. However, the tilt angle of the projector affects the image depth at different positions, so that the projected fringe is not uniform and clear, resulting in inaccurate calculated object contour. SUMMARY
[0003] Embodiments of the present application provide a surface imaging method, a storage medium and an equipment, which can obtain an expected projection angle with the smallest difference between the actual modulation amplitude division and the expected modulation amplitude distribution, so that the grating fringe projected at the expected projection angle is more uniform and has higher contrast, thereby obtaining clearer and more accurate surface imaging of the object. The technical solution is as follows:
[0004] In a first aspect, embodiments of the present application provide a surface imaging method applied to an imaging equipment, the imaging equipment comprising a projection component and a camera component, and the method comprising:
[0005] obtaining an initial projection angle of the projection component, and obtaining a projection angle set comprising at least two projection angles based on the initial projection angle;
[0006] for a reference plane, obtaining actual modulation amplitude distributions corresponding to each projection angle in the projection angle set and expected modulation amplitude distributions corresponding to the each projection angle, the expected modulation amplitude distribution corresponding to each projection angle being obtained by plane fitting the actual modulation amplitude distribution corresponding to the each projection angle;
[0007] based on the actual modulation amplitude distribution corresponding to each projection angle and the expected modulation amplitude distribution corresponding to the each projection angle, obtaining modulation amplitude difference values corresponding to the each projection angle;
[0008] obtaining a minimum difference value in the modulation amplitude difference values corresponding to the each projection angle, and determining a projection angle corresponding to the minimum difference value as an expected projection angle;
[0009] adjusting the projection component to the expected projection 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 the camera component.
[0010] In a second aspect, embodiments of the present application provide an imaging equipment, comprising: a projection component, a camera component and a processor; 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 projection angle to the processor;
[0013] The processor obtains a projection angle set containing at least two projection angles based on the initial projection angle;
[0014] The processor obtains, for a reference plane, an actual modulation amplitude distribution corresponding to each projection angle in the projection angle set and an expected modulation amplitude distribution corresponding to the each projection angle, the expected modulation amplitude distribution being obtained by performing plane fitting on the actual modulation amplitude distribution corresponding to the each projection angle;
[0015] The processor obtains a modulation amplitude difference value corresponding to the each projection angle based on the actual modulation amplitude distribution corresponding to the each projection angle and the expected modulation amplitude distribution corresponding to the each projection angle;
[0016] The processor obtains a minimum difference value in the modulation amplitude difference values corresponding to the each projection angle, determines a projection angle corresponding to the minimum difference value as an expected projection angle, and generates a first instruction based on the expected projection angle;
[0017] The processor sends the first instruction to the projection component, and the projection component adjusts to the expected projection 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, the camera component collects 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 being 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; wherein the memory stores a computer program, the computer program being suitable for being loaded by the processor and performing the method steps described above.
[0021] In one or more embodiments of the present application, the set of projection angles is obtained according to an initial projection angle of the projection assembly, actual modulation amplitude distributions and expected modulation amplitude distributions corresponding to each projection angle in the set of projection angles are obtained for the reference plane, a modulation amplitude difference value is obtained based on the actual modulation amplitude distribution and the expected modulation amplitude distribution corresponding to each projection angle, the projection angle corresponding to the minimum difference value is determined as the expected projection angle, the projection assembly is adjusted to the expected projection angle, the grating fringe is projected onto the object to be measured on the reference plane by using the projection assembly, and the surface imaging of the object to be measured is processed by using the camera assembly. By obtaining the expected projection angle with the minimum difference between the actual modulation amplitude distribution and the expected modulation amplitude distribution, the grating fringe projected at the expected projection angle has higher uniformity and higher contrast, so that the surface imaging of the object obtained is clearer and more accurate. BRIEF DESCRIPTION OF DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed in the embodiments or 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.
[0023] Figure 1 is an example schematic diagram of a surface imaging processing provided by an embodiment of the present application;
[0024] Figure 2 is a flowchart of a surface imaging method provided by an embodiment of the present application;
[0025] Figure 3 is a flowchart of a surface imaging method provided by an embodiment of the present application;
[0026] Figure 4 is an example schematic diagram of a set of projection angles provided by an embodiment of the present application;
[0027] Figure 5 is an example schematic diagram of an expected projection angle provided by an embodiment of the present application;
[0028] Figure 6 is a structural schematic diagram of an imaging device provided by an embodiment of the present application;
[0029] Figure 7 is a structural schematic diagram of a surface imaging device provided by an embodiment of the present application;
[0030] Figure 8 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 explicitly 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, "multiple" means two or more, unless otherwise specified. The association relationship between the associated objects is described, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after it.
[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 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 a projection function in the imaging device, which can project a grating fringe onto a reference plane. The camera component is a component with an 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 projection angle. It can be understood that the grating fringe can be a sinusoidal fringe pattern, and the projection angle can be angle α, that is, the included angle between the projection direction and the horizontal direction, or angle β, that is, the included angle between the projection direction and the vertical direction. The camera component can acquire the corresponding image of the reference plane, that is, the grating fringe image. According to the phase measuring profilometry (PMP), I n(x, y) represents the gray value of the 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, and
[0034]
[0035] wherein k represents the number of phase shift steps of the projected fringe grating, x∈[1, N], y∈[1, M], N and M represent the number of rows and columns of the pixel points in the grating fringe pattern respectively, C(x, y) is the reflectivity of the object surface, which can be the ratio of the light intensity projected by the projection assembly to the light intensity captured by the camera assembly; 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, that is, the amplitude value of the sinusoidal 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, so
[0036]
[0037] wherein is discontinuous and is limited in (-π, π) by the sign function, so phase unwrapping needs to be performed on to obtain the continuous full-field phase distribution The surface imaging of the object to be measured can be obtained by using the PMP algorithm. It can be understood that the accuracy of will affect the clarity and accuracy of the surface imaging of the object to be measured, and the fringe contrast, that is, B(x, y) / A(x, y), will affect the accuracy of
[0038]
[0039] Therefore, the imaging device in the embodiment of the present application can adopt the surface imaging method, so that the projection assembly projects the fringe grating to the reference plane at the expected projection angle, so that the fringe grating on the reference plane is uniform, clear and has high fringe contrast, thereby improving the clarity and accuracy of the surface imaging of the object to be measured.
[0040] The surface imaging method provided by the present application will be described in detail below in combination with specific embodiments.
[0041] Please refer to Figure 2 , which provides a flowchart of a surface imaging method according to an embodiment of the present application. As shown in Figure 2 , the method according to the embodiment of the present application can include the following steps S101-S105.
[0042] S101, acquire an initial projection angle of the projection component, and acquire a projection angle set containing at least two projection angles based on the initial projection angle.
[0043] In one embodiment, before surface imaging processing of the object to be measured, the initial projection angle of the projection component is acquired, i.e. the current projection angle of the projection component, which can be the initial projection angle corresponding to the projection component when the relevant staff installs the projection component according to the card slot on the projection component. The imaging device can acquire a projection angle set containing at least two projection angles according to the initial projection angle, for example, at least two projection angles can be acquired with the initial projection angle as the zero point and a preset angle as the step to generate the projection angle set, and the preset angle can be the initial setting of the imaging device or can be set and saved by the relevant staff on the imaging device.
[0044] S102, for the reference plane, acquire the actual modulation amplitude distribution corresponding to each projection angle in the projection angle set and the expected modulation amplitude distribution corresponding to each projection angle.
[0045] In one embodiment, before the object to be measured is placed on the reference plane, the projection component is adjusted to each projection angle in the projection angle set in turn and projects the grating fringe to the reference plane, and then at least three grating fringe images are collected by the camera assembly. For example, if the imaging device adopts a three-step phase shift method to obtain the full-field phase distribution, 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 by the camera assembly. The imaging device can calculate the actual modulation amplitude distribution corresponding to the projection component when the grating fringe is projected under the condition of each projection angle according to at least three grating fringe images corresponding to each projection angle, and then the actual modulation amplitude distribution corresponding to each projection angle can be plane-fitted to obtain the expected modulation amplitude distribution corresponding to each projection angle.
[0046] S103, based on the actual modulation amplitude distribution corresponding to each projection angle and the expected modulation amplitude distribution corresponding to each projection angle, acquire the modulation amplitude difference value corresponding to each projection angle.
[0047] In one embodiment, the actual modulation amplitude distribution represents the modulation amplitude distribution obtained by the imaging assembly after the projection assembly projects the grating fringe onto the reference plane. The actual modulation distribution may not be clear enough and the fringe contrast may not be high due to the influence of the projection angle of the projection assembly. The expected modulation amplitude distribution obtained by fitting the actual modulation amplitude distribution is the modulation amplitude distribution corresponding to the grating fringe in the ideal state, i.e., the grating fringe is clear and the fringe contrast is high. It can be understood that the smaller the modulation amplitude difference value between the actual modulation amplitude distribution and the expected modulation amplitude distribution, the smaller the difference between the actual modulation amplitude distribution and the expected modulation amplitude distribution, the clearer the grating fringe corresponding to the actual modulation amplitude distribution, the higher the fringe contrast, and the more accurate the surface imaging of the object to be measured that can be obtained. The modulation amplitude difference value can be the Euclidean distance between the actual modulation amplitude distribution and the expected modulation amplitude distribution.
[0048] S104, obtaining the minimum difference value in the modulation amplitude difference values corresponding to the projection angles, and determining the projection angle corresponding to the minimum difference value as the expected projection angle.
[0049] In one embodiment, the imaging device can determine the projection angle corresponding to the minimum difference value as the expected projection angle by finding the minimum difference value in the modulation amplitude difference values corresponding to the projection angles in the set of projection angles. It can be understood that when the projection assembly is adjusted to the expected projection angle, the actual modulation amplitude distribution and the expected modulation amplitude distribution corresponding to the grating fringe projected onto the reference plane are closest to each other, and the grating fringe projected onto the reference plane is the clearest and has the highest fringe contrast.
[0050] S105, adjusting the projection assembly to the expected projection angle, and projecting the grating fringe onto the object to be measured on the reference plane by using the projection assembly, and performing surface imaging processing on the object to be measured by using the imaging assembly.
[0051] In one embodiment, 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 projection assembly to the expected projection angle, projects the grating fringe onto the object to be measured on the reference plane by using the projection assembly, and obtains at least three grating fringe images of the object to be measured and the grating fringe projected on the object to be measured by using the imaging assembly. Based on the at least three grating fringe images, the object to be measured is subjected to surface imaging processing by using the PMP algorithm. Since the grating fringe is the clearest and has the highest fringe contrast at this time, the accuracy of the full-field phase distribution calculated is improved, and the clarity and accuracy of the surface imaging of the object to be measured obtained according to the full-field phase distribution are improved.
[0052] In the embodiment of the present application, the initial projection angle of the projection assembly is obtained to obtain a projection angle set, the actual modulation amplitude distribution and the expected modulation amplitude distribution corresponding to each projection angle in the projection angle set are obtained for the reference plane, the modulation amplitude difference value is obtained based on the actual modulation amplitude distribution and the expected modulation amplitude distribution corresponding to each projection angle, the projection angle corresponding to the minimum difference value is determined as the expected projection angle, the projection assembly is adjusted to the expected projection angle, the grating fringe is projected onto the object to be measured on the reference plane by using the projection assembly, and the surface imaging of the object to be measured is processed by using the camera assembly. The expected projection angle with the minimum difference between the actual modulation amplitude distribution and the expected modulation amplitude distribution is obtained, the grating fringe projected by the expected projection angle has higher uniformity and higher contrast, and thus the surface imaging of the object obtained is clearer and more accurate.
[0053] Please refer to Figure 3 A flowchart of a surface imaging method is provided for the embodiment of the present application. As shown in Figure 3 The method of the embodiment of the present application can include the following steps S201-S208.
[0054] S201, the initial projection angle of the projection assembly is obtained, and a projection angle set containing at least two projection angles is obtained based on the initial projection angle.
[0055] In one embodiment, before the surface imaging of the object to be measured is processed, the initial projection angle of the projection assembly is obtained, that is, the current projection angle of the projection assembly. The initial projection angle corresponding to the projection assembly can be obtained by the relevant staff according to the installation of the card slot on the projection assembly. The imaging device can obtain a projection angle set containing at least two projection angles according to the initial projection angle.
[0056] Optionally, the imaging device can obtain the initial projection angle of the projection assembly, and take the projection angle as the zero point, obtain a first projection angle satisfying a preset number with a first angle as a step, and the first angle is greater than zero; then take the initial projection angle as the zero point, obtain a second projection angle satisfying the preset number with a second angle as a step, and the second angle is less than zero, and generate a projection angle set based on the initial projection angle, the first projection angle and the second projection angle. 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 on the imaging device. Please refer to Figure 4An example schematic diagram of obtaining a projection angle set is provided for the embodiments of the present application. Taking the initial projection angle as the zero point, a first angle as the step, a preset number of first projection angles are obtained, that is, the difference between the initial projection angle and the adjacent first projection angle is the first angle, and the difference between the adjacent two first projection angles is also the first angle. Taking the initial projection angle as the zero point, a second angle as the step, a preset number of second projection angles are obtained, that is, the difference between the initial projection angle and the adjacent second projection angle is the second angle, and the difference between the adjacent two second projection angles is also the second angle. All the first projection angles, all the second projection angles and the initial projection angle form a projection angle set.
[0057] S202, for the reference plane, obtaining a target actual modulation amplitude distribution corresponding to a target projection angle in the projection angle set.
[0058] In one embodiment, before the object to be measured is placed on the reference plane, the projection assembly is sequentially adjusted to each projection angle in the projection angle set and projects the grating fringe onto the reference plane, and then the camera assembly is used to collect at least three grating fringe images. The imaging device can calculate the actual modulation amplitude distribution corresponding to the projection of the projection assembly when the grating fringe is projected under the condition of each projection angle according to the at least three grating fringe images corresponding to each projection angle.
[0059] Optionally, the imaging device adjusts the projection assembly to a target projection angle in the projection angle set, uses the projection assembly to project the grating fringe onto the reference plane, uses the camera assembly to collect at least three grating fringe images of the grating fringe on the reference plane, and obtains a target actual modulation distribution corresponding to the target projection 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.
[0060] S203, using the least square method to perform plane fitting on the target actual modulation amplitude to obtain a target expected modulation amplitude distribution.
[0061] In one embodiment, the imaging device can perform plane fitting on the actual modulation amplitude distribution corresponding to each projection angle to obtain the expected modulation amplitude distribution corresponding to each projection angle. The imaging device can use the least square method to perform plane fitting on the target actual modulation amplitude distribution to obtain the target expected modulation amplitude distribution.
[0062] S204, obtaining the Euclidean distance between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution, and determining the Euclidean distance as a target modulation amplitude difference value corresponding to the target projection angle.
[0063] In one embodiment, the actual modulation amplitude distribution represents the modulation amplitude distribution acquired by the imaging component after the projection component projects the grating fringe onto the reference plane. Due to the influence of the projection angle of the projection component, the corresponding grating fringe may not be clear enough and the fringe contrast is not high. The expected modulation amplitude distribution obtained by fitting the actual modulation amplitude distribution is the modulation amplitude distribution corresponding to the grating fringe in the ideal state, that is, the grating fringe is clear and the fringe contrast is high. It can be understood that the smaller the modulation amplitude difference value between the actual modulation amplitude distribution and the expected modulation amplitude distribution, the smaller the difference between the actual modulation amplitude distribution and the expected modulation amplitude distribution, the clearer the grating fringe corresponding to the actual modulation amplitude distribution, the higher the fringe contrast, and the more accurate the surface imaging of the object to be measured that can be acquired. The imaging device can calculate the Euclidean distance L between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution:
[0064]
[0065] Wherein, x∈[1, N], y∈[1, M], N and M represent the number of rows and columns of pixel points in the grating fringe image respectively, B(x, y) is the target actual modulation amplitude distribution, B E (x, y) is the target expected modulation amplitude distribution. The imaging device confirms the Euclidean distance L between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution as the target modulation amplitude difference value corresponding to the target projection angle.
[0066] Optionally, the imaging device can also calculate the absolute value distance L1 between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution:
[0067]
[0068] Wherein, x∈[1, N], y∈[1, M], N and M represent the number of rows and columns of pixel points in the grating fringe image respectively, B(x, y) is the target actual modulation amplitude distribution, B E (x, y) is the target expected modulation amplitude distribution. The imaging device confirms the absolute value distance L1 between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution as the target modulation amplitude difference value corresponding to the target projection angle.
[0069] S205, acquiring the minimum difference value in the modulation amplitude difference values corresponding to the projection angles, and determining the projection angle corresponding to the minimum difference value as the expected projection angle.
[0070] In one embodiment, the imaging device can determine the projection angle corresponding to the minimum difference value as the desired projection angle, and it can be understood that the actual modulation amplitude distribution corresponding to the projected grating fringe on the reference plane is closest to the expected modulation amplitude distribution when the projection assembly is adjusted to the desired projection angle, and the projected grating fringe on the reference plane is the clearest and has the highest fringe contrast.
[0071] Optionally, the imaging device can further obtain a difference value fitting curve according to the projection angles and the modulation amplitude difference values corresponding to the projection angles, for example, generate the difference value fitting curve with the projection angles as independent variables and the modulation amplitude difference values corresponding to the projection angles as variables, obtain the minimum difference value in the difference value fitting curve, and determine the projection angle corresponding to the minimum difference value as the desired projection angle. Please refer to Figure 5 An example schematic diagram for obtaining the desired projection angle is provided for the embodiments of the present application. In the coordinate system of the projection angle-modulation amplitude difference value, a plurality of discrete points represented by the projection angles and the modulation amplitude difference values corresponding to the projection angles are generated, a difference value fitting curve is generated according to the points, and the lowest point of the difference value fitting curve is found. The ordinate of the lowest point is the minimum difference value, and the abscissa of the lowest point is the desired projection angle.
[0072] S206, adjusting the projection assembly to the desired projection angle, and projecting the grating fringe on the object to be measured on the reference plane by using the projection assembly, and performing surface imaging processing on the object to be measured by using the camera assembly.
[0073] In one embodiment, 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 projection assembly to the desired projection angle, projects the grating fringe on the object to be measured on the reference plane by using the projection assembly, and obtains at least three grating fringe images of the object to be measured and the grating fringe projected on the object to be measured by using the camera assembly. Based on the at least three grating fringe images, the object to be measured is subjected to surface imaging processing by using the PMP algorithm. Since the grating fringe is the clearest and has the highest fringe contrast at this time, the accuracy of the full-field phase distribution obtained by calculation is improved, and the clarity and accuracy of the surface imaging of the object to be measured obtained according to the full-field phase distribution are improved.
[0074] In the embodiment of the present application, the initial projection angle of the projection assembly is taken as the zero point, the first angle and the second angle are used to obtain the first projection angle and the second projection angle, the projection angle set is generated according to the initial projection angle, the first projection angle and the second projection angle, the target actual modulation amplitude distribution corresponding to the target projection angle in the projection angle set is obtained for the reference plane, the target expected modulation amplitude distribution is obtained by plane fitting on the target actual modulation amplitude distribution, the Euclidean distance or the absolute value distance between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution is taken as the target modulation amplitude difference value, the projection angle corresponding to the minimum difference value is determined as the expected projection angle, the projection assembly is adjusted to the expected projection 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 of the object to be measured is processed by using the camera assembly. The grating fringe projected by the expected projection angle has higher uniformity and higher contrast, so that the surface imaging of the object obtained is clearer and more accurate. Moreover, the difference value fitting curve between the projection angle and the modulation amplitude difference value can be obtained, the expected projection angle corresponding to the lowest point of the difference value fitting curve can be obtained, the accuracy of the expected projection angle can be improved, and the clarity and accuracy of the surface imaging of the object can be further improved.
[0075] Please refer to Figure 6 A structural schematic diagram of an imaging device is provided for the embodiment of the present application. As shown in the figure, Figure 6 The imaging device of the embodiment of the present application comprises a projection assembly, a camera assembly and a processor, and the processor comprises a modulation amplitude calculation assembly, a difference value calculation assembly and a surface imaging assembly.
[0076] The projection assembly is connected with the modulation amplitude calculation assembly, the modulation amplitude calculation assembly is connected with the difference value calculation assembly, the modulation amplitude calculation assembly is connected with the camera assembly, the difference value calculation assembly is connected with the surface imaging assembly, the surface imaging assembly is connected with the projection assembly, and the surface imaging assembly is connected with the camera assembly.
[0077] Before the surface imaging of the object to be measured is processed, the projection assembly can obtain the initial projection angle, that is, the current projection angle of the projection assembly. When the related staff installs the projection assembly according to the card slot on the projection assembly, the initial projection angle corresponding to the projection assembly can be obtained.
[0078] The projection component sends an initial projection angle to the modulation amplitude calculation component, and the modulation amplitude calculation component can obtain a projection angle set containing at least two projection angles according to the initial projection angle. The imaging device can obtain the initial projection angle of the projection component, and take the initial projection angle as the zero point, obtain a first projection angle set containing a preset number of first projection angles with a first angle as the step, and the first angle is greater than zero; then take the initial projection angle as the zero point, obtain a second projection angle set containing a preset number of second projection angles with a second angle as the step, and the second angle is less than zero, and generate a projection angle set based on the initial projection angle, the first projection angle and the second projection angle. 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 relevant staff and saved on the imaging device. Before placing the object to be measured on the reference plane, the modulation amplitude calculation component can send each projection angle in the projection angle set to the projection component in turn, instruct the projection component to adjust to each projection angle in the projection angle set in turn and project a grating fringe on the reference plane, and then instruct the camera component to collect at least three grating fringe images of the grating fringe. The modulation amplitude calculation component can calculate the actual modulation amplitude distribution corresponding to the projection of the grating fringe by the projection component under the condition of meeting each projection angle according to the at least three grating fringe images corresponding to each projection angle.
[0079] The modulation amplitude calculation component can send a target projection angle in the projection angle set to the projection component, and the projection component adjusts to the target projection angle after receiving the target projection angle and projects a grating fringe on the reference plane. The modulation amplitude calculation component sends a shooting instruction to the camera component, and the camera component collects at least three grating fringe images of the grating fringe on the reference plane after receiving the shooting instruction, and sends the at least three grating fringe images to the modulation amplitude calculation component. The modulation amplitude calculation component calculates a target actual modulation amplitude corresponding to the target projection angle according to the at least three grating fringe images. It can be understood that if the imaging device adopts a three-step phase shift method to obtain a full-field phase distribution, and then obtains the surface imaging of the object to be measured based on the full-field phase distribution, the camera component needs to collect three grating fringe images of the grating fringe. If the imaging device adopts a four-step phase shift method, the camera component needs to collect four grating fringe images of the grating fringe. Then the modulation amplitude calculation component can perform plane fitting on the target actual modulation amplitude distribution by using the least square method to obtain a target expected modulation amplitude distribution, and the modulation amplitude calculation component sends the target modulation amplitude distribution and the target expected modulation amplitude distribution to the difference value calculation component.
[0080] The difference value calculating component can calculate the Euclidean distance between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution, and confirm the Euclidean distance between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution as the target modulation amplitude difference value corresponding to the target projection angle. Optionally, the difference value calculating component can also calculate the absolute value distance between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution, and confirm the absolute value distance between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution as the target modulation amplitude difference value corresponding to the target projection angle. The difference value calculating component can find the minimum difference value in the modulation amplitude difference values corresponding to the projection angles in the projection angle set, determine the projection angle corresponding to the minimum difference value as the expected projection angle, and send the expected projection angle to the surface imaging component. Optionally, the difference value calculating component can also obtain a difference value fitting curve according to the projection angles and the modulation amplitude difference values corresponding to the projection angles, for example, generate the difference value fitting curve with the projection angles as the independent variables and the modulation amplitude difference values corresponding to the projection angles as the variables, obtain the minimum difference value in the difference value fitting curve, and determine the projection angle corresponding to the minimum difference value as the expected projection angle.
[0081] After the surface imaging component receives the expected projection angle, the surface imaging component generates a first instruction based on the expected projection angle, sends the first instruction to the projection component, and the projection component adjusts to the expected projection angle after receiving the first instruction, and projects the grating fringe onto the object to be measured on the reference plane according to the expected projection angle.
[0082] The surface imaging component sends a second instruction to the camera component, the camera component collects 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 by using the PMP algorithm according to the at least three fringe images.
[0083] In the embodiment of the present application, the initial projection angle of the projection assembly is taken as the zero point, the first angle and the second angle are used to obtain the first projection angle and the second projection angle, the projection angle set is generated according to the initial projection angle, the first projection angle and the second projection angle, the target actual modulation amplitude distribution corresponding to the target projection angle in the projection angle set is obtained for the reference plane, the target expected modulation amplitude distribution is obtained by plane fitting on the target actual modulation amplitude distribution, the Euclidean distance or the absolute value distance between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution is taken as the target modulation amplitude difference value, the projection angle corresponding to the minimum difference value is determined as the expected projection angle, the projection assembly is adjusted to the expected projection 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 of the object to be measured is processed by using the camera assembly. The expected projection angle with the minimum difference between the actual modulation amplitude distribution and the expected modulation amplitude distribution is obtained, the grating fringe projected by the expected projection angle has higher uniformity and higher contrast, so that the surface imaging of the object obtained is clearer and more accurate. Moreover, the difference value fitting curve between the projection angle and the modulation amplitude difference value is obtained, the expected projection angle corresponding to the lowest point of the difference value fitting curve is obtained, the accuracy of the expected projection angle is improved, and the clarity and accuracy of the surface imaging of the object are further improved.
[0084] The following will be combined with the accompanying Figure 7 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 7 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 please refer to the embodiments shown in the present application Figure 2 and Figure 3 .
[0085] Please refer to Figure 7 , which shows the 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 combination of the two to become all or part of the device. The device 1 includes a projection angle acquisition module 11, a modulation amplitude acquisition module 12, a difference value acquisition module 13, an expected angle acquisition module 14 and a surface imaging module 15.
[0086] The projection angle acquisition module 11 is used to acquire the initial projection angle of the projection assembly, and the projection angle set containing at least two projection angles is acquired based on the initial projection angle;
[0087] Optionally, the projection angle acquisition module 11 is specifically used to acquire the initial projection angle of the projection assembly;
[0088] Taking the initial projection angle as a zero point, a first angle as a step, a first projection angle satisfying a preset number is obtained, the first angle being greater than zero;
[0089] Taking the initial projection angle as a zero point, a second angle as a step, a second projection angle satisfying the preset number is obtained, the second angle being less than zero;
[0090] Generating a projection angle set based on the initial projection angle, the first projection angle and the second projection angle.
[0091] A modulation amplitude obtaining module 12 is configured to obtain, for a reference plane, an actual modulation amplitude distribution corresponding to each projection angle in the projection angle set and an expected modulation amplitude distribution corresponding to each projection angle, the expected modulation amplitude distribution corresponding to each projection angle being obtained by plane fitting the actual modulation amplitude distribution corresponding to each projection angle.
[0092] Optionally, the modulation amplitude obtaining module 12 is specifically configured to obtain, for a reference plane, a target actual modulation amplitude distribution corresponding to a target projection angle in the projection angle set.
[0093] Plane fitting the target actual modulation amplitude distribution to obtain a target expected modulation amplitude distribution.
[0094] Optionally, the modulation amplitude obtaining module 12 is specifically configured to adjust the projection component to a target projection angle in the projection angle set, and project a grating fringe onto a reference plane by using the projection component.
[0095] Based on at least three grating fringe images collected by the camera component for the grating fringe, a target actual modulation amplitude distribution corresponding to the target projection angle is obtained.
[0096] Optionally, the modulation amplitude obtaining module 12 is specifically configured to plane fit the target actual modulation amplitude by using a least square method to obtain a target expected modulation amplitude distribution.
[0097] A difference value obtaining module 13 is configured to obtain a modulation amplitude difference value corresponding to each projection angle based on the actual modulation amplitude distribution corresponding to each projection angle and the expected modulation amplitude distribution corresponding to each projection angle.
[0098] Optionally, the difference value obtaining module 13 is specifically configured to obtain a target modulation amplitude difference value corresponding to the target projection angle based on the target actual modulation amplitude distribution and the target expected modulation amplitude distribution.
[0099] Optionally, the difference value obtaining module 13 is specifically configured to obtain a Euclidean distance between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution.
[0100] The Euclidean distance is determined as a target modulation amplitude difference value corresponding to the target projection angle.
[0101] The expected angle acquisition module 14 is configured to acquire a minimum difference value in the modulation amplitude difference values corresponding to the projection angles, and determine a projection angle corresponding to the minimum difference value as an expected projection angle.
[0102] Optionally, the expected angle acquisition module 14 is specifically configured to acquire a difference value fitting curve based on the projection angles and the modulation amplitude difference values corresponding to the projection angles.
[0103] The minimum difference value in the difference value fitting curve is acquired, and a projection angle corresponding to the minimum difference value is determined as an expected projection angle.
[0104] The surface imaging module 15 is configured to adjust the projection assembly to the expected projection angle, project a grating fringe on a to-be-measured object on the reference plane by using the projection assembly, and perform surface imaging processing on the to-be-measured object by using the camera assembly.
[0105] In this embodiment, the initial projection angle of the projection assembly is taken as a zero point, the first angle and the second angle are taken as step lengths to acquire the first projection angle and the second projection angle, a projection angle set is generated according to the initial projection angle, the first projection angle and the second projection angle, a target actual modulation amplitude distribution corresponding to a target projection angle in the projection angle set is acquired for the reference plane, a target expected modulation amplitude distribution is acquired by performing plane fitting on the target actual modulation amplitude distribution, a Euclidean distance or an absolute value distance between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution is taken as a target modulation amplitude difference value, a projection angle corresponding to a minimum difference value is determined as an expected projection angle, the projection assembly is adjusted to the expected projection angle, a grating fringe is projected on a to-be-measured object on the reference plane by using the projection assembly, and surface imaging processing is performed on the to-be-measured object by using the camera assembly. By acquiring an expected projection angle at which an actual modulation amplitude distribution is most similar to an expected modulation amplitude distribution, the grating fringe projected by using the expected projection angle has higher uniformity and higher contrast, so that the acquired surface imaging of the object is clearer and more accurate. Furthermore, a difference value fitting curve between the projection angles and the modulation amplitude difference values can be acquired, an expected projection angle corresponding to a lowest point of the difference value fitting curve can be acquired, the accuracy of the expected projection angle is improved, and the clarity and the accuracy of the surface imaging of the object are further improved.
[0106] It should be noted that the surface imaging device provided in the above embodiment is only used for illustrating the surface imaging method, and the above functions can be completed by different functional modules according to actual needs in actual application, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above functions. In addition, the surface imaging device and the surface imaging method provided in the above embodiment belong to the same concept, and the implementation process is described in the method embodiment, which will not be described here.
[0107] The serial numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0108] The embodiment of the present application further provides a computer storage medium, which can store a plurality of instructions, the instructions being suitable for being loaded and executed by a processor to execute the surface imaging method of the embodiment shown in the above Figures 2-5 The specific execution process can refer to the specific description of the embodiment shown in the above Figures 2-5 The specific execution process can refer to the specific description of the embodiment shown in the above
[0109] The present application further provides a computer program product, which stores at least one instruction, the at least one instruction being loaded and executed by the processor to execute the surface imaging method of the embodiment shown in the above Figures 2-5 The specific execution process can refer to the specific description of the embodiment shown in the above Figures 2-5 The specific execution process can refer to the specific description of the embodiment shown in the above
[0110] Please refer to Figure 8 , which shows the structure block diagram of the server provided by an exemplary 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.
[0111] The processor 110 can include one or more processing cores. The processor 110 connects various parts within the entire server by various interfaces and lines, performs 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. Alternatively, the processor 110 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), a programmable logic array (PLA). The processor 110 can integrate a combination of one or several of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes an operating system, a user page, and an application program, etc.; 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 can be implemented by a separate communication chip.
[0112] The memory 120 can include a random access memory (RAM) and can also include a read-only memory (ROM). Alternatively, 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, wherein 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., the operating system can be an Android system, including a system developed based on the Android system, an IOS system developed by Apple Inc., including a system developed based on the IOS system or other systems.
[0113] The memory 120 can be divided into an operating system space and a user space, the operating system runs in the operating system space, and native and third-party application programs run in the user space. In order to ensure that different third-party application programs can achieve good running effect, the operating system allocates corresponding system resources for different third-party application programs. However, there are also differences in the demand for system resources in different application scenarios in the same third-party application program. For example, in the local resource loading scenario, the third-party application program has a higher requirement for the disk reading speed; in the animation rendering scenario, the third-party application program has a higher requirement for the GPU performance. However, the operating system and the third-party application program are independent of each other, and the operating system often cannot timely perceive the current application scenario of the third-party application program, so that the operating system cannot perform targeted system resource adaptation according to the specific application scenario of the third-party application program.
[0114] In order to enable the operating system to distinguish the specific application scenario of the third-party application program, it is necessary to open up the data communication between the third-party application program and the operating system, so that the operating system can obtain the current scenario information of the third-party application program at any time, and then perform targeted system resource adaptation based on the current scenario.
[0115] 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.
[0116] 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.
[0117] In addition, those skilled in the art can understand that the structure of the terminal shown in the above-mentioned drawings does not constitute a limitation on the terminal, and the terminal can include more or fewer components than the drawings, or combine certain components, or different component arrangements. For example, the terminal also includes radio frequency circuitry, an input unit, a sensor, audio circuitry, a wireless fidelity (WiFi) module, a power supply, a Bluetooth module, and the like, which are not described here.
[0118] In Figure 8 In the electronic device shown in the figure, the processor 110 can be configured to invoke the surface imaging application program stored in the memory 120, and specifically perform the following operations:
[0119] obtaining an initial projection angle of the projection component, and obtaining a projection angle set containing at least two projection angles based on the initial projection angle;
[0120] obtaining, for a reference plane, an actual modulation amplitude distribution corresponding to each projection angle in the projection angle set and an expected modulation amplitude distribution corresponding to each projection angle, the expected modulation amplitude distribution being obtained by performing plane fitting on the actual modulation amplitude distribution corresponding to each projection angle;
[0121] obtaining a modulation amplitude difference value corresponding to each projection angle based on the actual modulation amplitude distribution corresponding to each projection angle and the expected modulation amplitude distribution corresponding to each projection angle;
[0122] obtaining a minimum difference value in the modulation amplitude difference values corresponding to each projection angle, and determining a projection angle corresponding to the minimum difference value as an expected projection angle;
[0123] adjusting the projection component to the expected projection 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 the camera component.
[0124] In one embodiment, when the processor 110 performs obtaining an initial projection angle of the projection component and obtaining a projection angle set containing at least two projection angles based on the initial projection angle, the processor 110 specifically performs the following operations:
[0125] obtaining the initial projection angle of the projection component;
[0126] taking the initial projection angle as a zero point and a first angle as a step to obtain a first projection angle satisfying a preset number, the first angle being greater than zero;
[0127] taking the initial projection angle as a zero point and a second angle as a step to obtain a second projection angle satisfying the preset number, the second angle being less than zero;
[0128] generating a projection angle set based on the initial projection angle, the first projection angle, and the second projection angle.
[0129] In one embodiment, when the processor 110 performs obtaining, for a reference plane, an actual modulation amplitude distribution corresponding to each projection angle in the projection angle set and an expected modulation amplitude distribution corresponding to each projection angle, the processor 110 specifically performs the following operations:
[0130] obtaining, for a reference plane, a target actual modulation amplitude distribution corresponding to a target projection angle in the projection angle set;
[0131] performing plane fitting on the target actual modulation amplitude distribution to obtain a target expected modulation amplitude distribution;
[0132] The processor 110, in the process of obtaining the modulation amplitude difference value corresponding to each projection angle based on the actual modulation amplitude distribution corresponding to each projection angle and the expected modulation amplitude distribution corresponding to each projection angle, specifically performs the following operations:
[0133] obtaining a target modulation amplitude difference value corresponding to the target projection angle based on the target actual modulation amplitude distribution and the target expected modulation amplitude distribution.
[0134] In one embodiment, the processor 110, in the process of obtaining a target actual modulation amplitude distribution corresponding to a target projection angle in the set of projection angles for a reference plane, specifically performs the following operations:
[0135] adjusting the projection component to the target projection angle in the set of projection angles, and projecting a grating fringe to the reference plane using the projection component;
[0136] obtaining a target actual modulation amplitude distribution corresponding to the target projection angle based on at least three grating fringe images collected by the camera component for the grating fringe.
[0137] In one embodiment, the processor 110, in the process of performing plane fitting on the target actual modulation amplitude distribution to obtain a target expected modulation amplitude distribution, specifically performs the following operations:
[0138] performing plane fitting on the target actual modulation amplitude using the least squares method to obtain a target expected modulation amplitude distribution.
[0139] In one embodiment, the processor 110, in the process of obtaining a target modulation amplitude difference value corresponding to the target projection angle based on the target actual modulation amplitude distribution and the target expected modulation amplitude distribution, specifically performs the following operations:
[0140] obtaining the Euclidean distance between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution;
[0141] determining the Euclidean distance as the target modulation amplitude difference value corresponding to the target projection angle.
[0142] In one embodiment, the processor 110, in the process of obtaining the minimum difference value in the modulation amplitude difference values corresponding to each projection angle, and determining the projection angle corresponding to the minimum difference value as the expected projection angle, specifically performs the following operations:
[0143] obtaining a difference value fitting curve based on the each projection angle and the modulation amplitude difference value corresponding to each projection angle;
[0144] The minimum difference value in the difference value fitting curve is obtained, and the projection angle corresponding to the minimum difference value is determined as the expected projection angle.
[0145] In the embodiment, the initial projection angle of the projection assembly is taken as a zero point, the first projection angle and the second projection angle are obtained by taking the first angle and the second angle as steps, the projection angle set is generated according to the initial projection angle, the first projection angle and the second projection angle, the target actual modulation amplitude distribution corresponding to the target projection angle in the projection angle set is obtained for the reference plane, the target expected modulation amplitude distribution is obtained by performing plane fitting on the target actual modulation amplitude distribution, the Euclidean distance or the absolute value distance between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution is taken as the target modulation amplitude difference value, the projection angle corresponding to the minimum difference value is determined as the expected projection angle, the projection assembly is adjusted to the expected projection angle, the grating fringe is projected onto the object to be measured on the reference plane by using the projection assembly, and the surface imaging of the object to be measured is processed by using the camera assembly. By obtaining the expected projection angle with the minimum difference between the actual modulation amplitude distribution and the expected modulation amplitude distribution, the grating fringe projected by the expected projection angle has higher uniformity and higher contrast, so that the surface imaging of the object obtained is clearer and more accurate. Moreover, by obtaining the difference value fitting curve between the projection angle and the modulation amplitude difference value, the expected projection angle corresponding to the lowest point of the difference value fitting curve is obtained, the accuracy of the expected projection angle is improved, and the clarity and accuracy of the surface imaging of the object are further improved.
[0146] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, the processes of the above-mentioned embodiments can be included. The storage medium can be a magnetic disc, an optical disc, a read-only memory or a random access memory.
[0147] The above only describes the preferred embodiments of the present application, and cannot limit the scope of the present application. Therefore, 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 projection angle of the projection component, and acquiring a projection angle set comprising at least two projection angles based on the initial projection angle; for a reference plane, acquiring an actual modulation amplitude distribution corresponding to each projection angle in the projection angle set and an expected modulation amplitude distribution corresponding to each projection angle, the expected modulation amplitude distribution being obtained by plane fitting on the actual modulation amplitude distribution corresponding to each projection angle; based on the actual modulation amplitude distribution corresponding to each projection angle and the expected modulation amplitude distribution corresponding to each projection angle, acquiring a modulation amplitude difference value corresponding to each projection angle; acquiring a minimum difference value in the modulation amplitude difference value corresponding to each projection angle, and determining a projection angle corresponding to the minimum difference value as an expected projection angle; adjusting the projection component to the expected projection 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 the camera component.
2. The method of claim 1, wherein, The acquiring of the initial projection angle of the projection component and the acquiring of the projection angle set comprising at least two projection angles based on the initial projection angle comprise: acquiring an initial projection angle of the projection component; taking the initial projection angle as a zero point and a first angle as a step to acquire a first projection angle satisfying a preset number, the first angle being greater than zero; taking the initial projection angle as a zero point and a second angle as a step to acquire a second projection angle satisfying the preset number, the second angle being less than zero; generating a projection angle set based on the initial projection angle, the first projection angle and the second projection angle.
3. The method of claim 1, wherein, The acquiring of the actual modulation amplitude distribution corresponding to each projection angle in the projection angle set and the expected modulation amplitude distribution corresponding to each projection angle for the reference plane comprises: for a reference plane, acquiring a target actual modulation amplitude distribution corresponding to a target projection angle in the projection angle set; plane fitting on the target actual modulation amplitude distribution to acquire a target expected modulation amplitude distribution; The acquiring of the modulation amplitude difference value corresponding to each projection angle based on the actual modulation amplitude distribution corresponding to each projection angle and the expected modulation amplitude distribution corresponding to each projection angle comprises: based on the target actual modulation amplitude distribution and the target expected modulation amplitude distribution, acquiring a target modulation amplitude difference value corresponding to the target projection angle.
4. The method of claim 3, wherein, The acquiring of the target actual modulation amplitude distribution corresponding to a target projection angle in the projection angle set for the reference plane comprises: adjusting the projection component to the target projection angle in the projection angle set, and projecting a grating fringe on a reference plane by using the projection component; based on at least three grating fringe images collected by the camera component for the grating fringe, acquiring a target actual modulation amplitude distribution corresponding to the target projection angle.
5. The method of claim 3, wherein, The plane fitting on the target actual modulation amplitude distribution to acquire a target expected modulation amplitude distribution comprises: plane fitting on the target actual modulation amplitude by using a least square method to acquire a target expected modulation amplitude distribution.
6. The method of claim 3, wherein, The target modulation amplitude difference value corresponding to the target projection angle is obtained based on the target actual modulation amplitude distribution and the target expected modulation amplitude distribution, and the target modulation amplitude difference value corresponding to the target projection angle is obtained based on the target actual modulation amplitude distribution and the target expected modulation amplitude distribution. The Euclidean distance between the target actual modulation amplitude distribution and the target expected modulation amplitude distribution is obtained. The Euclidean distance is determined as the target modulation amplitude difference value corresponding to the target projection angle.
7. The method of claim 1, wherein, The minimum difference value in the modulation amplitude difference values corresponding to the respective projection angles is obtained, and the projection angle corresponding to the minimum difference value is determined as the expected projection angle, and the minimum difference value in the modulation amplitude difference values corresponding to the respective projection angles is obtained, and the projection angle corresponding to the minimum difference value is determined as the expected projection angle. Based on the respective projection angles and the modulation amplitude difference values corresponding to the respective projection angles, a difference value fitting curve is obtained. The minimum difference value in the difference value fitting curve is obtained, and the projection angle corresponding to the minimum difference value is determined as the expected projection angle.
8. 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 to the projection assembly, and the other end of the processor is connected to the camera assembly. The projection assembly sends an initial projection angle to the processor. The processor obtains a projection angle set comprising at least two projection angles based on the initial projection angle. For a reference plane, the processor obtains an actual modulation amplitude distribution corresponding to each projection angle in the projection angle set and an expected modulation amplitude distribution corresponding to each projection angle, and the expected modulation amplitude distribution corresponding to each projection angle is obtained by plane fitting the actual modulation amplitude distribution corresponding to each projection angle. The processor obtains a modulation amplitude difference value corresponding to each projection angle based on the actual modulation amplitude distribution corresponding to each projection angle and the expected modulation amplitude distribution corresponding to each projection angle. The processor obtains a minimum difference value in the modulation amplitude difference values corresponding to the respective projection angles, and determines the projection angle corresponding to the minimum difference value as the expected projection angle, and generates a first instruction based on the expected projection angle. The processor sends the first instruction to the projection assembly, and the projection assembly adjusts to the expected projection angle based on the first instruction and projects a grating fringe onto a 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 measured object based on the second instruction, and sends the fringe image to the processor, and the processor performs surface imaging processing on the measured object based on the fringe image.
9. 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.
10. An electronic device, comprising: It comprises: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded and executed by the processor to perform the method steps of any one of claims 1-7.
Citation Information
Patent Citations
System calibration method for grating projection three-dimensional measurement
CN103528543A
Error correction method of grating projection three-dimensional measurement system
CN106595522A