A method and system for three-dimensional reconstruction of highly reflective object surfaces based on polarization line structure
Through a method based on the polarization line structure, the Stokes vector and Mueller matrix are used to determine the optimal polarization angle, combined with the adaptive binarization threshold and Steger algorithm, the problem of information loss in the three-dimensional reconstruction of the surface of high reflectivity objects is solved, and high Accuracy and robustness of 3D reconstruction results.
Patent Information
- Application Number
- CN202411032096.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-07-30
AI Technical Summary
During the three-dimensional reconstruction process, information is lost due to occlusion and high-gloss surfaces on high-reflectivity object surfaces, making it impossible to accurately restore the three-dimensional shape of the object.
Using a method based on the polarization line structure, by acquiring images at different polarization angles, calculating the Stokes vector and Mueller matrix, determining the optimal polarization angle, calculating the adaptive binarization threshold, binarizing the image, and using the Steger algorithm Extract the fringe center and fit the light plane equation for three-dimensional reconstruction.
It effectively reduces the impact of high reflectivity on the three-dimensional reconstruction system, significantly improves the accuracy and robustness of the three-dimensional reconstruction, is suitable for different light intensity scenes, and meets industrial measurement requirements.
Smart Images

Figure CN118570396B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of visual non-contact measurement, and in particular to a method and system for three-dimensional reconstruction of a surface of a highly reflective object based on a polarization line structure. Background Art
[0002] With the rapid development of computer vision and image processing technology, 3D measurement has become a research field that has attracted much attention. 3D industrial measurement technology is mainly divided into contact measurement and non-contact measurement. Non-contact measurement includes photoelectric measurement technologies such as optical measurement and radar measurement. Structured light measurement technology is the most widely used in optical measurement due to its high measurement accuracy, fast measurement speed, and dense point cloud data. Line structured light measurement is a commonly used structured light measurement technology. It is widely used in object surface contour measurement due to its simple structure, large measurement range and working distance, and high efficiency.
[0003] The line structured light measurement system is also called the laser scanning measurement system. The system consists of a camera and a line laser. The line laser is projected onto the object to be measured, and the camera obtains the deformed laser stripes. The three-dimensional point cloud coordinates of the object to be measured are calculated by extracting the center point of the laser stripes and combining the pre-calibrated camera parameters with the light plane equation. However, in industrial measurement, when measuring the surface of objects with high reflectivity, such as metals, ceramics, plastics, transparent objects, etc., the surface of the object is prone to produce highlights due to its high reflectivity. The saturation of the image is too high, resulting in distortion of the measurement information and greatly reducing the accuracy of the measurement. Therefore, using line structured light technology to measure objects with high gloss surfaces has always been a key point and difficulty. Summary of the invention
[0004] The present disclosure proposes a three-dimensional reconstruction method for the surface of a highly reflective object based on a polarization line structure to solve the following problems: due to the occlusion and highlight surface of the object itself, some information is lost during the three-dimensional reconstruction process, and the three-dimensional shape of the object cannot be accurately and completely restored.
[0005] According to one aspect of the present disclosure, a method for three-dimensional reconstruction of a highly reflective object surface based on a polarization line structure is provided, comprising:
[0006] S10, acquiring images at three different polarization angles, calculating Stokes vectors according to the images, constructing a Mueller matrix by normalizing the Stokes vectors, calculating a maximum eigenvector corresponding to a maximum eigenvalue of the Mueller matrix, and determining an optimal polarization angle according to the maximum eigenvector;
[0007] S20, calculating the gradient value of each pixel in the image at the optimal polarization angle, and obtaining an adaptive binarization threshold based on the gradient value of each pixel;
[0008] S30. At the optimal polarization angle, binarize the image based on an adaptive binarization threshold to obtain a binarized image, use the Steger algorithm to extract the fringe centers of the binarized image, and use the least squares method to fit the light plane equation according to the obtained fringe centers to perform three-dimensional reconstruction.
[0009] Preferably, the Stokes vector is calculated based on the image and is expressed as:
[0010] ,
[0011] In the formula, Represents the total intensity of light, that is x Direction and y The sum of the light intensities in the direction, express x Direction and y The light intensity difference in the direction, Indicates the light intensity difference between +45° and -45°. It represents the intensity difference between the left-hand circularly polarized light component and the right-hand circularly polarized light component. , and Represents the intensity of light at three different polarization angles: 0°, 45°, and 90°, where: and Respectively x Direction and y Directional light intensity.
[0012] Preferably, the Mueller matrix is expressed as:
[0013] ,
[0014] In the formula, is the normalized Stokes vector, , is the transpose of the normalized Stokes vector.
[0015] Preferably, the maximum eigenvector corresponding to the maximum eigenvalue of the Mueller matrix is calculated, and the optimal polarization angle is determined by the maximum eigenvector, which is expressed as:
[0016] ,
[0017] ,
[0018] In the formula, represents the maximum eigenvalue of the Mueller matrix, represents the maximum eigenvector corresponding to the maximum eigenvalue of the Mueller matrix, is the pixel value at different polarization angles, is the optimal polarization angle.
[0019] Preferably, the gradient value of each pixel in the image is calculated at the optimal polarization angle, and the gradient value is expressed as:
[0020] ,
[0021] In the formula, Represents each pixel in the image The gray value of M , N Represent the rows and columns of image pixels respectively.
[0022] Preferably, an adaptive binarization threshold is calculated based on the gradient value of each pixel, and the adaptive binarization threshold is expressed as:
[0023] ,
[0024] In the formula, is the adaptive binarization threshold, Represents each pixel in the image The gradient value of .
[0025] Preferably, the image is binarized based on an adaptive binarization threshold to obtain a binarized image, and the binarized image is represented as:
[0026] ,
[0027] In the formula, Represents a binary image.
[0028] According to one aspect of the present disclosure, a system for three-dimensional reconstruction of a highly reflective object surface based on a polarization line structure is provided, comprising:
[0029] An optimal polarization angle determination module is configured to obtain images at three different polarization angles, calculate Stokes vectors according to the images, construct a Mueller matrix by normalizing the Stokes vectors, calculate a maximum eigenvector corresponding to a maximum eigenvalue of the Mueller matrix, and determine an optimal polarization angle according to the maximum eigenvector;
[0030] An adaptive binarization threshold calculation module calculates the gradient value of each pixel in the image at the optimal polarization angle, and obtains an adaptive binarization threshold based on the gradient value of each pixel;
[0031] The three-dimensional reconstruction module binarizes the image based on the adaptive binarization threshold at the optimal polarization angle to obtain a binarized image, uses the Steger algorithm to extract the fringe center of the binarized image, and uses the least squares method to fit the light plane equation according to the acquired fringe center to perform three-dimensional reconstruction.
[0032] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to: execute the above-mentioned method for three-dimensional reconstruction of a highly reflective object surface based on a polarization line structure.
[0033] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above-mentioned method for three-dimensional reconstruction of a highly reflective object surface based on a polarization line structure is implemented.
[0034] Compared with the prior art, the beneficial effects of the present disclosure are:
[0035] 1) The present invention utilizes the optimal polarization angle to precisely control light, thereby alleviating the impact of high reflectivity on the three-dimensional reconstruction system.
[0036] 2) The present invention uses an adaptive binarization threshold method to accurately segment light fringes, thereby significantly improving the accuracy of three-dimensional reconstruction, which is suitable for scenes with different light intensities and meets industrial measurement requirements.
[0037] 3) The present disclosure proposes a method for reconstructing high-reflectivity objects, which can generate high-precision three-dimensional reconstruction results and effectively improve the accuracy and robustness of three-dimensional reconstruction.
[0038] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
[0039] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0041] Figure 1 A flow chart of a method for three-dimensional reconstruction of a highly reflective object surface based on a polarization line structure is shown;
[0042] Figure 2 A schematic diagram of a three-dimensional measurement model of polarized line structured light is shown;
[0043] Figure 3 A flowchart of three-dimensional scanning reconstruction is shown;
[0044] Figure 4 The structural block diagram of the three-dimensional reconstruction system of the high-reflective object surface based on the polarization line structure is shown. DETAILED DESCRIPTION
[0045] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0046] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0047] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0048] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0049] It can be understood that the above-mentioned three-dimensional reconstruction method and system embodiments of the high-reflective object surface based on the polarization line structure mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not go into details.
[0050] Traditional 3D reconstruction methods use the principle of light projection and reflection to obtain depth information of the surface of the object being measured. A series of light rays are projected onto the surface of the object being measured, and the deformation of the light rays on the surface of the object is analyzed. The camera acquires the contour image, solves the two-dimensional image coordinates of the structured light contour, and uses the proposed algorithm to calculate the three-dimensional coordinates corresponding to the two-dimensional coordinates. However, when scanning the surface of complex objects, some information is lost in the 3D reconstruction process due to the occlusion and highlight surface of the object itself. This means that the 3D shape of the object cannot be accurately and completely restored.
[0051] In response to the above problems, the present invention proposes a method for 3D reconstruction of the surface of a highly reflective object based on a polarization line structure, which can quantitatively analyze the optimal polarization angle of a linear polarizer and the adaptive binarization threshold of a polarization image in a polarization line structured light measurement system. This method mainly considers factors such as calibration image acquisition, light streak center point extraction, computational complexity, and the influence of ambient light intensity. By calculating the global optimal polarization angle and adaptive binarization threshold, the method can remove part of the highlight area in the image while retaining the maximum image information, thereby improving the accuracy of light streak center extraction, having good reliability, and meeting the accuracy requirements of line structured light for highly reflective objects in industrial 3D measurement.
[0052] Based on the above ideas, the present invention proposes a three-dimensional reconstruction method for the surface of a highly reflective object based on a polarization line structure. Figure 1 A flow chart showing a method for three-dimensional reconstruction of a highly reflective object surface based on a polarization line structure. The method comprises:
[0053] S10, acquiring images at three different polarization angles, calculating Stokes vectors according to the images, constructing a Mueller matrix by normalizing the Stokes vectors, calculating a maximum eigenvector corresponding to a maximum eigenvalue of the Mueller matrix, and determining an optimal polarization angle according to the maximum eigenvector;
[0054] S20, calculating the gradient value of each pixel in the image at the optimal polarization angle, and obtaining an adaptive binarization threshold based on the gradient value of each pixel;
[0055] S30. At the optimal polarization angle, binarize the image based on an adaptive binarization threshold to obtain a binarized image, use the Steger algorithm to extract the fringe centers of the binarized image, and use the least squares method to fit the light plane equation according to the obtained fringe centers to perform three-dimensional reconstruction.
[0056] Flowchart of the method for 3D reconstruction of highly reflective object surfaces based on polarization line structure, such as Figure 1 As shown, the specific steps are as follows:
[0057] S10, acquiring images at three different polarization angles, calculating Stokes vectors according to the images, constructing a Mueller matrix by normalizing the Stokes vectors, calculating a maximum eigenvector corresponding to a maximum eigenvalue of the Mueller matrix, and determining an optimal polarization angle through the maximum eigenvector.
[0058] In the embodiment of the present disclosure and other possible embodiments, the hardware of the polarized line structured light 3D measurement system is generally composed of a camera 1, a linear polarizer 2, a laser 3, and a mobile platform 4. The laser 3 projects a laser plane that intersects the surface of the object. Any object point on the intersection line P The image is formed on the image plane through the pinhole imaging The specific measurement model is as follows: Figure 2 As shown, is the pixel coordinate system, is the camera 1 coordinate system, is the world coordinate system. Axis and The axes are parallel to and axis and in the same direction, The axis coincides with the main optical axis of the camera lens. The principle of line structured light measurement is to use the system calibration results and the pixel coordinates of the center point of the light stripe in the image to reversely calculate the three-dimensional world coordinates of this point. The system can only obtain the three-dimensional coordinates corresponding to one stripe in a single measurement, and it is necessary to use the mobile platform 4 to scan the entire surface of the object. But in theory, only when the single axis of the world coordinate system is parallel to the moving direction of the guide rail can the three-dimensional contour data of the object be directly integrated in the same coordinate system. If the parallel condition cannot be achieved, it is necessary to calibrate the movement direction of the guide rail in the world coordinate system and then compensate the data.
[0059] Assume that the pixel coordinates of the object point P in the image are , and its corresponding homogeneous coordinates can be expressed as , combined with the internal parameters obtained by camera calibration, the corresponding image coordinates can be calculated as:
[0060] ,
[0061] is the camera intrinsic parameter matrix, defined as:
[0062] ,
[0063] In the formula, , Respectively represent the effective focal length of camera 1 in horizontal and vertical directions, Represents the optical center. The above parameters are internal parameters of camera 1 and are obtained by calibrating camera 1.
[0064] Assume that the light plane equation in the camera coordinate system is:
[0065] ,
[0066] and image point The equation of the straight line formed by is:
[0067] ,
[0068] Combining the formulas, we can get:
[0069] ,
[0070] Then the coordinates of point P in the world coordinate system are It can be calculated from the transformation relationship between the world coordinate system and the camera coordinate system:
[0071] ,
[0072] In the formula, is a 3×3 orthogonal rotation matrix, is a 3×1 translation matrix, Expressed as a transformation matrix from the world coordinate system to the camera coordinate system.
[0073] But in fact, the actual camera model is not an ideal pinhole imaging model. Considering the distortion of the real image by the camera distortion, it is usually necessary to perform distortion correction on the obtained image. To the actual distorted image point The distortion model is:
[0074] ,
[0075] In the formula, , , and are the radial distortion coefficient and the tangential distortion coefficient respectively.
[0076] In this embodiment, the global optimal polarization angle is quantitatively analyzed by using the Stokes vector and the Mueller matrix. Multiple experiments are not required, and the global optimal polarization angle can be calculated using only images at three polarization angles of 0°, 45°, and 90°. Under the premise of using the global optimal polarization angle, the influence of the image highlight area on the light stripe processing is reduced, and a stripe image with a high signal-to-noise ratio is collected, which is convenient for subsequent three-dimensional contour measurement of highly reflective objects.
[0077] The Stokes vector is calculated from the image and is expressed as:
[0078] ,
[0079] In the formula, Represents the total intensity of light, that is x Direction and y The sum of the light intensities in the direction, express x Direction and y The light intensity difference in the direction, Indicates the light intensity difference between +45° and -45°. It represents the intensity difference between the left-hand circularly polarized light component and the right-hand circularly polarized light component. , and Represents the intensity of light at three different polarization angles: 0°, 45°, and 90°, where: and Respectively x Direction and y The light intensity in the direction. Since the circular polarization component in the light is very small, it can generally be ignored. .
[0080] When a beam of polarized light is incident on the surface of a medium, the polarization state of the reflected light from the medium will also change accordingly. The relationship between the incident light and the reflected light can be described by a 4*4 Mueller matrix. According to physics knowledge, the Mueller matrix of the electrolyte surface is M It can be expressed as:
[0081] ,
[0082] In the polarization line structured light measurement system, the intensity of the laser can be changed by adjusting the polarization angle of the polarizer in front of the laser 3. Ideally, the angle between the vibration direction of the polarized light and the polarization direction of the polarizer is , the intensity of polarized light when the line laser is incident is The intensity of the projected light is According to Malus's law, we can get:
[0083] ,
[0084] when , It can be found that, under ideal conditions, the normalized Stokes parameter of the line laser passing through the polarizer can be expressed as , , , It can be expressed as When the line laser passes through the polarizer and directly hits the surface of the object being measured, the reflected light of the line laser is It can be expressed as:
[0085] ,
[0086] After the line laser is reflected from the surface of the object through the polarizer, its polarization characteristics are maintained and only its light intensity is changed. Based on this principle, in order to simulate the quantitative analysis of the global optimal polarization angle, the connection between the Stokes vector and the Mueller matrix is established through light intensity. Because the units of the Stokes vector are all light intensity, when using them to construct the Mueller matrix, in order to ensure that the diagonal elements of the Mueller matrix are equal to 1 in the physical sense.
[0087] First, we need to normalize the Stokes vector by the total number of pixels in the image. The image size is M × N , then the normalized Stokes vector can be expressed as:
[0088] ,
[0089] In the formula, is the light intensity value at the pixel coordinate (m, n) when the polarization angle i = 0°, 45°, 90°.
[0090] Then, this normalized Stokes vector is used to construct the Mueller matrix. When calculating the Mueller matrix, the images collected using three polarization angles can be regarded as three independent measurements. Therefore, when these three measurement results are used to calculate the Mueller matrix, the measurement results should usually be normalized, that is, divided by the number of images 3, so that all elements are scaled to [0,1] to reduce the influence of errors and noise. The Mueller matrix is expressed as:
[0091] ,
[0092] In the formula, is the normalized Stokes vector, , is the transpose of the normalized Stokes vector.
[0093] Finally, the maximum eigenvector corresponding to the maximum eigenvalue of the Mueller matrix is calculated, and the optimal polarization angle is determined by the maximum eigenvector, which is expressed as:
[0094] ,
[0095] ,
[0096] In the formula, represents the maximum eigenvalue of the Mueller matrix, represents the maximum eigenvector corresponding to the maximum eigenvalue of the Mueller matrix, is the pixel value at different polarization angles, is the optimal polarization angle.
[0097] In this embodiment, since the physical meaning of the diagonal elements of the Mueller matrix is the various polarization states of light, the maximum eigenvector corresponding to its maximum eigenvalue represents the maximum value of the Mueller matrix in this direction, and therefore the direction corresponding to the maximum eigenvector represents the optimal polarization angle of light. In addition, since the Mueller matrix is a real symmetric matrix, its eigenvectors are orthogonal. Therefore, by finding the eigenvector corresponding to the maximum eigenvalue, it is ensured to be orthogonal to other eigenvectors, thereby forming a complete polarization basis. This allows the maximum eigenvector to be used to uniquely represent the polarization state of light. At this globally optimal polarization angle, while the highlights on the surface of the object are eliminated to the greatest extent, camera 1 can also obtain image information to the greatest extent.
[0098] S20, calculating the gradient value of each pixel in the image at the optimal polarization angle, and obtaining an adaptive binarization threshold based on the gradient value of each pixel.
[0099] In the embodiments of the present disclosure and other possible embodiments, before using the algorithm to extract the center of the light stripe, the image needs to be binarized to segment the detected target from the image. There is a certain relationship between the binarization threshold and the light intensity: a higher light intensity may require a higher binarization threshold to correctly identify pixels with light intensity higher than the threshold as white. This is because a higher light intensity may make the bright area in the image brighter, and a higher threshold is required to distinguish between bright and dark areas. On the contrary, a lower light intensity may require a lower binarization threshold to correctly identify pixels with light intensity lower than the threshold as black. Under lower light intensity, the bright area in the image may be relatively dark, and a lower threshold is required to distinguish between bright and dark areas. Because after the linear laser passes through the linear polarizer 2, the vibration component of part of the light of the linear polarizer 2 will be weakened or blocked, and the vibration component of part of the light will be relatively enhanced, which will have a certain impact on the change in light intensity caused by surface reflection, thereby reducing the intensity of the highlight to a certain extent. However, the width and intensity of light stripes are also affected by light intensity: when the light intensity increases, higher light intensity will cause the surface that scatters or reflects light to respond more strongly, expanding the interference area of light, thereby increasing the stripe width and brightness; conversely, when the light intensity decreases, lower light intensity will cause the surface scattering or reflection response to weaken, limiting the interference area of light, thereby reducing the stripe width and brightness.
[0100] Among them, the most critical part in binarization processing is how to select the threshold. Currently, Otsu method (OTSU) and percentage threshold method (p-tile) are two relatively mature adaptive global threshold algorithms.
[0101] The Otsu method is also known as the maximum inter-class variance method. The main idea is to use the threshold obtained by this method to perform image binarization segmentation so that the inter-class variance between the target and the background is maximized. The Otsu method is simple to calculate and is not affected by image brightness and contrast, but it only produces a good segmentation effect for images with a single peak in inter-class variance. When the size ratio of the target to the background is very different, the inter-class variance criterion function may be bimodal or multimodal, and the effect is not good at this time.
[0102] The percentage threshold method sets the threshold based on the prior probability. The known prior probability is: the ratio of the target area to the entire image area is P. The threshold T gradually decreases from the maximum grayscale value. When the binarized target area accounts for the entire image area greater than or equal to P, T is the percentage threshold. This method is simple and efficient, but it cannot be calculated for images where the prior probability is difficult to estimate. According to the changes in the light stripes after the line laser passes through the polarizer, the above two methods have limitations.
[0103] In this embodiment, the gradient value of each pixel in the image is calculated at the optimal polarization angle, and the gradient value is expressed as:
[0104] ,
[0105] In the formula, Represents each pixel in the image The gray value of M , N Represents rows and columns of image pixels.
[0106] Furthermore, an adaptive binarization threshold is calculated based on the gradient value of each pixel, and the adaptive binarization threshold is expressed as:
[0107] ,
[0108] In the formula, is the adaptive binarization threshold, Represents each pixel in the image The gradient value of .
[0109] S30. At the optimal polarization angle, binarize the image based on an adaptive binarization threshold to obtain a binarized image, use the Steger algorithm to extract the fringe centers of the binarized image, and use the least squares method to fit the light plane equation according to the obtained fringe centers to perform three-dimensional reconstruction.
[0110] In the embodiment of the present disclosure and other possible embodiments, the Hessian matrix-based Steger algorithm is used to extract the stripe center. This algorithm obtains the normal direction of the light stripe through the Hessian matrix, and then uses Taylor expansion in the normal direction to obtain the sub-pixel position of the light stripe. The grayscale of the laser stripe is approximately Gaussian in its normal direction, and the closer the pixel is to the center point of the light stripe, the larger its grayscale value.
[0111] The image is binarized based on the adaptive binarization threshold to obtain a binarized image, which is expressed as:
[0112] ,
[0113] In the formula, Represents a binary image.
[0114] Furthermore, under the conditions of optimal polarization angle and adaptive binarization threshold, the Steger algorithm is used to extract the fringe center, and the obtained fringe center is used to fit the light plane equation through the least squares method, and the light plane calibration is performed. The laser scanning image of the object to be measured is obtained with the help of the electric platform, and the three-dimensional contour point cloud of the surface of the object to be measured is obtained by participating in the light plane equation in the camera. Figure 3 shown.
[0115] From the above content, it can be seen that the three-dimensional reconstruction method of the surface of a highly reflective object based on a polarization line structure designed in the embodiment of the present disclosure has good efficiency, robustness and accuracy. Compared with the traditional method, this method can effectively suppress the strong reflection and scattering of the highly reflective metal surface. The light strips are quickly and accurately segmented to obtain the center points of the light strips with higher precision and more reliable. It helps to achieve high integrity and low noise in the reconstruction of the surface of the object. The method remains robust under different light intensities and is suitable for the application of polarization line structured light in industrial measurement.
[0116] As another aspect of the embodiments of the present disclosure, a high-reflective object surface three-dimensional reconstruction system 100 based on a polarization line structure is also provided. Figure 4 As shown, including:
[0117] The optimal polarization angle determination module 10 obtains images at three different polarization angles, calculates Stokes vectors according to the images, constructs a Mueller matrix by normalizing the Stokes vectors, calculates the maximum eigenvector corresponding to the maximum eigenvalue of the Mueller matrix, and determines the optimal polarization angle according to the maximum eigenvector;
[0118] An adaptive binarization threshold calculation module 20 calculates the gradient value of each pixel in the image at the optimal polarization angle, and obtains an adaptive binarization threshold based on the gradient value of each pixel;
[0119] The three-dimensional reconstruction module 30 performs binarization processing on the image based on the adaptive binarization threshold at the optimal polarization angle to obtain a binarized image, uses the Steger algorithm to extract the fringe centers of the binarized image, and uses the least squares method to fit the light plane equation according to the acquired fringe centers for three-dimensional reconstruction.
[0120] Based on the description of the above embodiments, it can be seen that the embodiments of the present disclosure can achieve the following technical effects:
[0121] 1) The present invention utilizes the optimal polarization angle to precisely control light, thereby alleviating the impact of high reflectivity on the three-dimensional reconstruction system.
[0122] 2) The present invention uses an adaptive binarization threshold method to accurately segment light fringes, thereby significantly improving the accuracy of three-dimensional reconstruction, which is suitable for scenes with different light intensities and meets industrial measurement requirements.
[0123] 3) The present disclosure proposes a method for reconstructing high-reflectivity objects, which can generate high-precision three-dimensional reconstruction results and effectively improve the accuracy and robustness of three-dimensional reconstruction.
[0124] The present disclosure also provides an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above-mentioned method for three-dimensional reconstruction of a highly reflective object surface based on a polarization line structure. The electronic device can be provided as a terminal, a server, or other forms of equipment.
[0125] The present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above-mentioned method for three-dimensional reconstruction of a highly reflective object surface based on a polarization line structure is implemented. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
[0126] Those skilled in the art will understand that in the above-mentioned method and system for three-dimensional reconstruction of the surface of a highly reflective object based on a polarization line structure in a specific embodiment, the order in which the steps are written does not imply a strict order of execution and does not constitute any limitation on the implementation process. The specific order of execution of the steps should be determined by their function and possible internal logic.
[0127] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0128] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A three-dimensional reconstruction method for a highly reflective object surface based on a polarization line structure, characterized in that: The steps include: S10, acquiring images at three different polarization angles, calculating Stokes vectors according to the images, constructing a Mueller matrix by normalizing the Stokes vectors, calculating a maximum eigenvector corresponding to a maximum eigenvalue of the Mueller matrix, and determining an optimal polarization angle according to the maximum eigenvector; S20, calculating the gradient value of each pixel in the image at the optimal polarization angle, and obtaining an adaptive binarization threshold based on the gradient value of each pixel; S30, at the optimal polarization angle, binarizing the image based on an adaptive binarization threshold to obtain a binarized image, extracting the fringe centers of the binarized image using a Steger algorithm, and fitting the light plane equation using a least squares method to perform three-dimensional reconstruction according to the acquired fringe centers; The Stokes vector is calculated from the image and is expressed as: , In the formula, Represents the total intensity of light, that is x Direction and y The sum of the light intensities in the direction, express x Direction and y The light intensity difference in the direction, Indicates the light intensity difference between +45° and -45°. It represents the intensity difference between the left-hand circularly polarized light component and the right-hand circularly polarized light component. , and Represents the intensity of light at three different polarization angles: 0°, 45°, and 90°, where: and Respectively x Direction and y Directional light intensity; The Mueller matrix is expressed as: , In the formula, is the normalized Stokes vector, , is the transpose of the normalized Stokes vector; The maximum eigenvector corresponding to the maximum eigenvalue of the Mueller matrix is calculated, and the optimal polarization angle is determined by the maximum eigenvector, which is expressed as: , , In the formula, represents the maximum eigenvalue of the Mueller matrix, represents the maximum eigenvector corresponding to the maximum eigenvalue of the Mueller matrix, is the pixel value at different polarization angles, is the optimal polarization angle; The gradient value of each pixel in the image is calculated at the optimal polarization angle, and the gradient value is expressed as: , In the formula, Represents each pixel in the image The gray value of M , N Represent the rows and columns of image pixels respectively; The adaptive binarization threshold is calculated based on the gradient value of each pixel. The adaptive binarization threshold is expressed as: , In the formula, is the adaptive binarization threshold, Represents each pixel in the image The gradient value of .
2. The method according to claim 1, characterized in that The image is binarized based on the adaptive binarization threshold to obtain a binarized image, which is expressed as: , In the formula, Represents a binary image.
3. A three-dimensional reconstruction system for highly reflective object surfaces based on polarization line structures, characterized in that: include: An optimal polarization angle determination module is configured to obtain images at three different polarization angles, calculate Stokes vectors according to the images, construct a Mueller matrix by normalizing the Stokes vectors, calculate a maximum eigenvector corresponding to a maximum eigenvalue of the Mueller matrix, and determine an optimal polarization angle according to the maximum eigenvector; An adaptive binarization threshold calculation module calculates the gradient value of each pixel in the image at the optimal polarization angle, and obtains an adaptive binarization threshold based on the gradient value of each pixel; A three-dimensional reconstruction module, at an optimal polarization angle, performs binarization processing on the image based on an adaptive binarization threshold to obtain a binarized image, uses a Steger algorithm to extract the fringe centers of the binarized image, and uses a least squares method to fit the light plane equation according to the obtained fringe centers to perform three-dimensional reconstruction; The Stokes vector is calculated from the image and is expressed as: , In the formula, Represents the total intensity of light, that is x Direction and y The sum of the light intensities in the direction, express x Direction and y The light intensity difference in the direction, Indicates the light intensity difference between +45° and -45°. It represents the intensity difference between the left-hand circularly polarized light component and the right-hand circularly polarized light component. , and Represents the intensity of light at three different polarization angles: 0°, 45°, and 90°, where: and Respectively x Direction and y Directional light intensity; The Mueller matrix is expressed as: , In the formula, is the normalized Stokes vector, , is the transpose of the normalized Stokes vector; The maximum eigenvector corresponding to the maximum eigenvalue of the Mueller matrix is calculated, and the optimal polarization angle is determined by the maximum eigenvector, which is expressed as: , , In the formula, represents the maximum eigenvalue of the Mueller matrix, represents the maximum eigenvector corresponding to the maximum eigenvalue of the Mueller matrix, is the pixel value at different polarization angles, is the optimal polarization angle; The gradient value of each pixel in the image is calculated at the optimal polarization angle, and the gradient value is expressed as: , In the formula, Represents each pixel in the image The gray value of M , N Represent the rows and columns of image pixels respectively; The adaptive binarization threshold is calculated based on the gradient value of each pixel. The adaptive binarization threshold is expressed as: , In the formula, is the adaptive binarization threshold, Represents each pixel in the image The gradient value of .
4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for three-dimensional reconstruction of the surface of a highly reflective object based on a polarization line structure as described in any one of claims 1 to 2 is implemented.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for three-dimensional reconstruction of the surface of a highly reflective object based on a polarization line structure as described in any one of claims 1 to 2 is implemented.
