A binocular three-dimensional measurement method and system based on polarization order constraint
Patent Information
- Application Number
- CN202611508679.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-28
- Publication Date
- 2026-10-30
AI Technical Summary
但是,现有方法更多关注编码方式和相位展开过程,对于偏振信息和相位阶次信息在双目匹配过程中的约束作用利用不足
1)本公开利用相位周期阶次将传统整条极线搜索压缩为同阶次极线段搜索,显著减少候选匹配点数量,降低相位匹配计算量。
Smart Images

Figure CN123015694A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of optical three-dimensional measurement and binocular vision measurement technology, and in particular to a binocular three-dimensional measurement method and system based on polarization order constraints. Background Technology
[0002] Binocular structured light 3D measurement technology is a 3D measurement method that combines active projection coding and binocular vision geometric constraints. This technology projects a coded stripe pattern onto the surface of the object under test using a projector, and simultaneously acquires images of the modulated stripes from different perspectives using left and right cameras. The 3D shape of the object's surface is then reconstructed through steps such as phase decoding, binocular calibration, stereo correction, pixel matching, and triangulation. Compared to monocular structured light systems, binocular structured light systems offer advantages such as richer spectral information, higher reconstruction integrity, and greater adaptability to complex surfaces, and have been widely applied in industrial inspection, precision measurement, reverse engineering, and machine vision.
[0003] However, traditional binocular structured light methods still face significant challenges in the 3D measurement of high dynamic range objects, especially metal parts, polished molds, and highly reflective workpieces. Due to the uneven reflectivity distribution of metal surfaces, local areas are prone to strong specular reflection, high light saturation, weak reflection, and decreased fringe contrast, leading to phase-shifted fringe distortion, blurred Gray code boundaries, unstable wrapping phase, and phase unwrapping errors. These problems further affect pixel matching between the left and right views, resulting in missing point clouds, mismatched points, and local geometric distortions in the reconstruction results.
[0004] Existing binocular matching methods typically rely on epipolar constraints after stereo correction, transforming the original two-dimensional search into a one-dimensional search along the horizontal epipolar direction. While this method reduces matching complexity, relying solely on epipolar constraints and phase similarity is still insufficient for high dynamic range metal surface measurements. On one hand, background regions, weak signal regions, and areas with specular anomalies can lead to unreliable phase for some pixels; on the other hand, due to the periodicity of structured light fringes, multiple candidate points with similar phase values may exist on the same epipolar line, resulting in search redundancy and cross-period mismatches.
[0005] A 3LCD projector is a projection instrument that uses three liquid crystal panels to simultaneously process the three primary colors of red, green, and blue. The polarization misalignment fusion phase-shift coding method can utilize the orthogonal polarization characteristics of different color channels in a 3LCD projector to simultaneously obtain absolute phase, phase period order, and linear polarization degree information with fewer projection patterns. However, existing methods focus more on the coding method and phase unfolding process, and do not adequately utilize the constraining effect of polarization and phase order information in the binocular matching process. Therefore, it is necessary to propose a binocular matching optimization method that can fully utilize linear polarization degree, phase period order, and absolute phase information to improve the matching efficiency, anti-interference ability, and 3D reconstruction integrity in high dynamic range object binocular structured light measurement. Summary of the Invention
[0006] This disclosure provides a binocular three-dimensional measurement method and system based on polarization order constraints to solve the problems existing in the background art. The technical solution is as follows: In a first aspect, embodiments of this disclosure provide a binocular three-dimensional measurement method based on polarization order constraints, comprising: S10. Acquire two polarization fringe images as a left view and a right view, and perform stereoscopic correction on the left view and the right view. The two polarization fringe images are obtained by projecting a polarization misalignment fusion phase shift coding pattern onto the surface of the object under test by a projector and by synchronously acquiring them through a calibrated left polarization camera and a right polarization camera, respectively. S20. Perform polarization misalignment fusion phase shift decoding on the left and right views after stereo correction to obtain the absolute phase, phase period order and linear polarization degree of the left and right views. S30. Construct an effective area mask based on the linear polarization degree, and remove the background area, weak signal area and specular abnormality area to obtain the effective measurement area of the left view and the right view. S40. Using the pixels in the effective measurement area of the left view as the points to be matched, according to the phase period order, on the epipolar line of the right view after stereo correction, pixels with the same phase period order as the points to be matched in the left view are selected as candidate matching points and a candidate matching set is formed. S50. Construct a weighted absolute difference and matching cost function based on the linear polarization degree, calculate the matching cost of each candidate matching point within the candidate matching set, and determine the optimal matching point. S60. Perform triangulation based on the optimal matching point to obtain a three-dimensional point cloud of the surface of the object to be measured.
[0007] Optionally, the stereo correction includes: Based on the intrinsic parameters and distortion parameters of the binocular polarization camera, as well as the relative pose relationship between the left and right cameras, an epipolar correction algorithm is used to remap the left and right views onto the same imaging plane.
[0008] Optionally, polarization misalignment fusion phase shift decoding is performed on the left and right views, including: Phase-shifted fringe information and misaligned Gray code information are extracted from the left and right views; Phase shift calculation is performed on the phase shift fringe information to obtain the wrapping phase, and the misaligned Gray code information is decoded to obtain the phase period order; Calculate the absolute phase based on the wrapped phase and the phase period order; The degree of linear polarization is calculated based on the image responses of the left and right views under different linear polarization directions.
[0009] Optionally, the absolute phase is represented as: , In the formula, Indicates camera c medium pixel absolute phase, Indicates the package phase. Indicates the phase period order. L represents the left camera, and R represents the right camera.
[0010] Optionally, the effective region mask is represented as: , In the formula, Represents pixels This is within the valid measurement area. Represents pixels This is an invalid region. Indicates camera c medium pixel linear polarization degree, and These represent the upper and lower limits of the effective threshold for linear polarization, respectively.
[0011] Optionally, within the candidate matching set, the matching cost of each candidate matching point is calculated to determine the optimal matching point, including: A left matching window is determined with the point to be matched as the center, and a corresponding right matching window is determined with each candidate matching point in the right view as the center. The average degree of linear polarization within the left and right matching windows is calculated. The pixel weight is determined based on the ratio of the linear polarization degree of the pixels in the left and right matching windows to the average linear polarization degree of the corresponding matching windows. Within the left and right matching windows, the matching cost is calculated based on the absolute phase of the corresponding pixels in the left and right views and the pixel weights. The candidate matching point with the lowest matching cost is selected as the best matching point.
[0012] Optionally, the pixel weights are represented as: , In the formula, Indicates camera c Matching pixel weights within the window This indicates the degree of linear polarization of pixels within the matching window. This represents the average degree of linear polarization within the corresponding matching window. ε To prevent constants with zero denominators, clip() is a truncation function. and These represent the lower limit and upper limit of pixel weight, respectively.
[0013] Secondly, a binocular three-dimensional measurement system based on polarization order constraints is also provided, including: The image acquisition and correction module acquires two polarization fringe images as a left view and a right view, and performs stereoscopic correction on the left view and the right view. The two polarization fringe images are obtained by projecting a polarization misalignment fusion phase shift coding pattern onto the surface of the object under test by a projector and are acquired synchronously by a calibrated left polarization camera and a right polarization camera, respectively. The polarization decoding module performs polarization misalignment fusion phase shift decoding on the left and right views after stereo correction to obtain the absolute phase, phase period order, and linear polarization degree of the left and right views. The effective area mask construction module constructs an effective area mask based on the linear polarization degree, removes background areas, weak signal areas and specular abnormality areas, and obtains the effective measurement areas of the left and right views; The order constraint search module uses the pixels in the effective measurement area of the left view as the points to be matched. Based on the phase period order, it selects pixels with the same phase period order as the points to be matched in the left view as candidate matching points on the epipolar line of the right view after stereo correction, and forms a candidate matching set. The weighted matching module constructs a weighted absolute difference and a matching cost function based on the linear polarization degree, calculates the matching cost of each candidate matching point within the candidate matching set, and determines the optimal matching point. The triangulation module performs triangulation based on the optimal matching point to obtain a three-dimensional point cloud of the surface of the object to be measured.
[0014] Thirdly, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-described binocular three-dimensional measurement method based on polarization order constraints.
[0015] Fourthly, a computer-readable storage medium is also provided, on which a computer program / instruction and a bit stream are stored, wherein the program / instruction, when executed by a processor, implements the aforementioned binocular three-dimensional measurement method based on polarization order constraints to generate the bit stream.
[0016] The advantages or beneficial effects of the above technical solutions include at least the following: 1) This disclosure utilizes the phase period order to compress the traditional whole epipolar line search into an epipolar line segment search of the same order, which significantly reduces the number of candidate matching points and reduces the computational load of phase matching.
[0017] 2) This disclosure utilizes linear polarization to construct an effective region mask, eliminating background regions, weak signal regions, and specular abnormality regions before matching, thereby reducing the interference of unreliable pixels on the matching process.
[0018] 3) This disclosure adopts a weighted absolute difference and matching cost function, and adaptively adjusts the contribution of different pixels in the matching window according to the pixel polarization reliability, thereby reducing the impact of abnormal pixels on the matching cost and improving the integrity of three-dimensional reconstruction and measurement stability of high dynamic range metal object surface.
[0019] The above overview is for illustrative purposes only and is not intended to be limiting in any way. Further aspects, embodiments, and features of this disclosure will become readily apparent from the accompanying drawings and the following detailed description, in addition to the illustrative aspects, embodiments, and features described above. Attached Figure Description
[0020] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the various drawings denote the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings depict only some embodiments disclosed in this disclosure and should not be construed as limiting the scope of this disclosure.
[0021] Figure 1 This is a flowchart of a binocular three-dimensional measurement method based on polarization order constraints in an embodiment of this disclosure; Figure 2 This is a diagram showing the plane fitting error analysis of the standard metal block in this example. Figure 3 This is a 3D reconstruction of a complex-shaped metal in the example disclosed herein, along with magnified comparison images of its local details. Figure 4This is a block diagram of the binocular three-dimensional measurement system based on polarization order constraints in the example of this disclosure. Detailed Implementation
[0022] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of this disclosure. Therefore, the drawings and description are to be considered exemplary in nature and not restrictive.
[0023] To better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.
[0024] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some, but not all, of the embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the protection scope of this disclosure.
[0025] This disclosure provides a binocular three-dimensional measurement method based on polarization order constraints, such as... Figure 1 As shown, it includes the following steps: S10. Acquire two polarization fringe images as a left view and a right view, and perform stereoscopic correction on the left view and the right view. The two polarization fringe images are obtained by projecting a polarization misalignment fusion phase shift coding pattern onto the surface of the object under test by a projector and by synchronously acquiring them through a calibrated left polarization camera and a right polarization camera, respectively. S20. Perform polarization misalignment fusion phase shift decoding on the left and right views after stereo correction to obtain the absolute phase, phase period order and linear polarization degree of the left and right views. S30. Construct an effective area mask based on the linear polarization degree, and remove the background area, weak signal area and specular abnormality area to obtain the effective measurement area of the left view and the right view. S40. Using the pixels in the effective measurement area of the left view as the points to be matched, according to the phase period order, on the epipolar line of the right view after stereo correction, pixels with the same phase period order as the points to be matched in the left view are selected as candidate matching points and a candidate matching set is formed. S50. Construct a weighted absolute difference and matching cost function based on the linear polarization degree, calculate the matching cost of each candidate matching point within the candidate matching set, and determine the optimal matching point. S60. Perform triangulation based on the optimal matching point to obtain a three-dimensional point cloud of the surface of the object to be measured.
[0026] This disclosure describes the above steps by way of example: S10. Acquire two polarization fringe images as a left view and a right view, and perform stereoscopic correction on the left view and the right view. The two polarization fringe images are obtained by projecting a polarization misalignment fusion phase shift coding pattern onto the surface of the object under test by a projector and by synchronously acquiring them through a calibrated left polarization camera and a right polarization camera, respectively. In one embodiment, the calibration of the left and right polarizing cameras can be performed using the Zhang Zhengyou calibration method. Specifically, a 12x9 checkerboard calibration board is used to acquire multiple sets of images of the left and right cameras in different poses. By extracting the coordinates of the checkerboard corner points, the correspondence between the calibration board's world coordinate system and the image coordinate systems of the left and right cameras is established. The intrinsic parameter matrices, distortion coefficients, and relative rotation matrix and translation vector between the two cameras are then calculated for each camera. After calibration, the calibration accuracy can be evaluated by the reprojection error. Generally, a reprojection error of less than 0.1 pixels is considered sufficient to meet the requirements for subsequent 3D measurement.
[0027] The stereo correction includes: based on the intrinsic parameters and distortion parameters of the binocular polarization camera and the relative pose relationship between the left and right cameras, using an epipolar correction algorithm to remap the left and right views to the same imaging plane.
[0028] After obtaining the intrinsic and distortion parameters of the left and right cameras, as well as their relative extrinsic parameters, the Bouguet epipolar correction algorithm is used to perform stereo correction on the left and right views. This algorithm calculates a remapping matrix based on the geometric relationship between the left and right cameras, reprojecting the left and right views onto the same imaging plane, ensuring that corresponding pixels of the same spatial point lie on the same horizontal epipolar line in both views. This step transforms the matching search, which would normally be performed in a two-dimensional image plane, into a one-dimensional epipolar search along the horizontal direction, providing a geometric basis for subsequent phase-order locking searches.
[0029] S20. Perform polarization misalignment fusion phase shift decoding on the left and right views after stereo correction to obtain the absolute phase, phase period order and linear polarization degree of the left and right views.
[0030] The polarization misalignment fusion phase shift decoding of the left and right views includes: extracting phase shift fringe information and misalignment Gray code information from the left and right views; performing phase shift calculation on the phase shift fringe information to obtain the wrapping phase; decoding the misalignment Gray code information to obtain the phase period order; calculating the absolute phase based on the wrapping phase and the phase period order; and calculating the degree of linear polarization based on the image responses of the left and right views under different linear polarization directions.
[0031] In this embodiment, a polarization misalignment fusion phase-shift code pattern is projected onto the surface of the high dynamic range object under test using a 3LCD projector. A left polarization camera and a right polarization camera simultaneously acquire polarization fringe images modulated by the object surface. Since different color channels of the 3LCD projector have orthogonal polarization characteristics, the phase-shift fringe information and misalignment Gray code information can be encoded into different orthogonal polarization channels. The left and right polarization cameras, through their pixel-level polarization arrays, can simultaneously acquire image responses under different linear polarization directions, thereby extracting phase-shift fringe information, misalignment Gray code information, and linear polarization degree from a single acquisition process.
[0032] For any camera ( (where L represents the left camera and R represents the right camera). After polarization channel separation, polarization fringe images carrying four-step phase shift information and polarization fringe images carrying misaligned Gray code information can be obtained. The four phase-shifted fringe images can be represented as: , In the formula, Four phase-shifted fringe images, Represents the pixel coordinates of the image. n This indicates the number of phase shift steps. Based on the four-step phase shift algorithm, the wrapping phase of the corresponding pixel can be calculated as follows: , In the formula, For camera c The wrapping phase of the mid-pixel.
[0033] Simultaneously, by binarizing and order decoding the misaligned Gray code information, the phase period order can be obtained. Since the boundary of the misaligned Gray code has a spatial offset relative to the phase truncation position, the order jump error caused by boundary overlap in the traditional Gray code-assisted phase shift method can be reduced. After obtaining the wrapped phase and the phase period order, the absolute phase can be calculated, which is expressed as: , In the formula, Indicates camera c medium pixel absolute phase, Indicates the package phase. Indicates the phase period order. L represents the left camera, and R represents the right camera.
[0034] Furthermore, the degree of linear polarization is calculated based on the image response under different linear polarization directions. The degree of linear polarization is expressed as: , In the formula, Indicates camera c The degree of linear polarization of the middle pixel. and These represent the maximum and minimum response intensities in the orthogonal polarization directions, respectively. To prevent constants with zero denominators, both the left and right cameras can obtain three types of information: absolute phase, phase period order, and linear polarization degree. This provides continuous phase constraints, period consistency constraints, and polarization reliability constraints for subsequent binocular matching.
[0035] S30. Construct an effective area mask based on the linear polarization degree, and remove the background area, weak signal area and specular abnormality area to obtain the effective measurement area of the left view and the right view.
[0036] In the measurement of high dynamic range metallic objects, the two acquired polarization fringe images typically contain effective fringe regions, background regions, weak signal regions, and areas of strong reflective specular anomalies simultaneously. If all pixels participate in binocular matching, it not only increases the computational load but also allows unreliable pixels to affect the matching results. Therefore, this embodiment first constructs an effective region mask based on the degree of linear polarization before performing epipolar line search. For the camera... c Pixels The effective area mask is represented as: , In the formula, Represents pixels This is within the valid measurement area. Represents pixels This is an invalid region. Indicates camera c medium pixel linear polarization degree, and These represent the upper and lower limits of the effective threshold for linear polarization, respectively.
[0037] In this embodiment, the effective threshold range for linear polarization is preferably set to 0.3 to 0.9. This range is set based on the following: when the linear polarization is too low, the pixel may belong to a background area, a shadow area, or a low signal-to-noise ratio area; when the linear polarization is too high, the pixel may correspond to a strong specular reflection or an abnormal highlight area. By setting the effective range for linear polarization, pixels with relatively stable polarization responses can be retained, while areas with abnormal polarization characteristics can be eliminated. Furthermore, the above threshold range can be appropriately adjusted according to the surface material of the actual measurement object, lighting conditions, and exposure parameters.
[0038] After filtering by the effective region of Degree of Linear Polarization (DOLP), only those in the left view that meet the criteria are included. pixels, As the point to be matched; for those that satisfy... If a pixel in the left view is not found in the specified region, it is considered an invalid region and will not participate in subsequent matching. Correspondingly, when searching for candidate points on the right view epipolar line, only those points that meet the criteria are retained. The right view pixels, As a valid candidate point; for those that satisfy If a pixel in the right view is found to be an invalid candidate point, it is then discarded. This method removes a large number of background points and specular anomalies before matching, reducing interference from invalid areas in binocular matching.
[0039] S40. Using the pixels in the effective measurement area of the left view as the points to be matched, according to the phase period order, on the epipolar line of the right view after stereo correction, pixels with the same phase period order as the points to be matched in the left view are selected as candidate matching points and a candidate matching set is formed. In this embodiment, after Bouguet epipolar correction is completed, corresponding pixels of the same spatial point in the left and right views should lie on the same horizontal epipolar line. For the matching point in the left view... Traditional epipolar matching methods typically search for candidate matching points point by point within a preset disparity range corresponding to the epipolar line in the right view. That is, a candidate matching point can be represented as... .
[0040] Although epipolar constraints have simplified the two-dimensional search to a one-dimensional search, searching the entire epipolar line still generates a large amount of redundant computation in high-resolution images or scenes with large parallax. Furthermore, due to the periodicity of structured light fringes, candidate matching points with similar phase values may exist in different periods along the same epipolar line, easily leading to cross-period mismatches.
[0041] Therefore, this embodiment further utilizes the phase period order to constrain the epipolar line search. Since the same spatial point corresponds to the same projected fringe period in both the left and right views, its phase period order should remain consistent. Based on this characteristic, for the point to be matched in the left view... Its candidate matching set in the right view is defined as: , In the formula, Represents the point to be matched The candidate matching set in the right view This indicates the phase period order of the pixels in the left view. This indicates the phase period order of the candidate matching points in the right view. This indicates whether the candidate point is located within the valid measurement area.
[0042] By applying the above constraints, the traditional method of searching the entire epipolar line is transformed into searching epipolar segments of the same phase period order. In other words, the algorithm no longer traverses all pixels on the corresponding epipolar line in the right view, but only matches candidate points that satisfy the same phase period order and belong to the valid measurement region. This method reduces the number of candidate points, improving matching efficiency, and avoids interference from similar phase points between different phase periods, reducing the risk of cross-period mismatches.
[0043] S50. Construct a weighted absolute difference and matching cost function based on the linear polarization degree, calculate the matching cost of each candidate matching point within the candidate matching set, and determine the optimal matching point.
[0044] After obtaining the candidate matching set, this embodiment further calculates the matching cost between the point to be matched in the left view and each candidate matching point in the right view, and selects the candidate point with the minimum matching cost as the best matching point. The traditional Sum of Absolute Differences (SAD) method usually assigns the same weight to all pixels within the matching window. However, in high dynamic range metal surface measurement, different pixels within the window may be affected by high light saturation, weak reflection, or local noise, and their reliability is not the same.
[0045] Calculating the matching cost of each candidate matching point within the candidate matching set and determining the optimal matching point includes: determining a left matching window centered on the point to be matched, and determining a corresponding right matching window centered on each candidate matching point in the right view; calculating the average linear polarization degree within the left and right matching windows; determining pixel weights based on the ratio of the linear polarization degree of pixels within the left and right matching windows to the average linear polarization degree of the corresponding matching windows; calculating the matching cost within the left and right matching windows based on the absolute phase of the corresponding pixels in the left and right views and the pixel weights; and selecting the candidate matching point with the minimum matching cost as the optimal matching point.
[0046] Therefore, this embodiment introduces linear polarization degree as a pixel reliability evaluation factor and constructs a linear polarization degree-weighted SAD matching model. For the matching window... W First, calculate the average degree of linear polarization within the window, expressed as: , In the formula, This represents the average linear polarization degree within the corresponding matching window, | W | indicates the number of pixels within the matching window. This represents the pixel value to be matched within the matching window. q This indicates a local pixel offset within the window.
[0047] The pixel weight is expressed as: , In the formula, Indicates camera c Matching pixel weights within the window This indicates the degree of linear polarization of pixels within the matching window. This represents the average degree of linear polarization within the corresponding matching window. ε To prevent constants with zero denominators, clip() is a truncation function. and These represent the lower limit and upper limit of pixel weight, respectively. As a preferred implementation, 0.5 is acceptable. A value of 1.5 can be chosen to avoid the excessive impact of individual abnormal linear polarization pixels on the matching cost.
[0048] Finally, the weighted absolute difference matching cost function (weighted SAD matching cost function) is expressed as: , In the formula, For the weighted absolute difference and matching cost function, q Indicates local pixel offset within the window. and These represent the pixel weights within the left and right matching windows, respectively. and These represent the absolute phase in the left and right views, respectively.
[0049] The optimal matching point is represented as: , In the formula, This indicates the best matching point in the right view for the point to be matched in the left view.
[0050] Through the weighting method described above, pixels with stable polarization response make a higher contribution to the matching cost calculation, while the contribution of pixels with abnormal polarization response or low reliability is weakened, thereby improving the matching stability under high dynamic range metal surface conditions.
[0051] S60. Perform triangulation based on the optimal matching point to obtain a three-dimensional point cloud of the surface of the object to be measured.
[0052] In this embodiment, when the point to be matched in the left view The optimal matching point is determined as Then, the corresponding disparity can be calculated as: , By combining the intrinsic and extrinsic parameters of the binocular camera with the baseline distance, the 3D coordinates of the corresponding spatial points are calculated through triangulation. Repeating this process for all pixels that satisfy the valid region constraints and successfully complete the matching yields the 3D point cloud of the surface of the high dynamic range object under test.
[0053] In this embodiment, a high dynamic range binocular 3D measurement system for objects with joint polarization order constraints was constructed. The specific hardware composition and technical specifications are as follows.
[0054] Projection equipment: An Epson CB-FH52 3LCD projector with a physical resolution of 1920×1200 pixels was used. The projector projects a PFPS stripe pattern with a period of 120 pixels.
[0055] Data acquisition equipment: Two FLIRBFS-U3-51S5P-C polarized monochrome CMOS cameras with a resolution of 2448×2048 pixels were used. The camera sensors were Sony IMX250 series, with a size of 2 / 3 inch.
[0056] Optical components: The camera is equipped with an industrial lens with a focal length of 16mm. During measurement, the entire system is positioned approximately 0.7 meters in front of the object being measured.
[0057] The system calibration can employ the Zhang Zhengyou calibration method. Specifically, a 12x9 black and white checkerboard calibration board is used to acquire multiple sets of images from the left and right cameras in different poses. By extracting the coordinates of the checkerboard corner points, the correspondence between the calibration board's world coordinate system and the image coordinate systems of the left and right cameras is established. The intrinsic parameter matrices, distortion coefficients, and relative rotation matrix and translation vector between the left and right polarized cameras are then calculated. After calibration, the calibration accuracy can be evaluated using the reprojection error. Generally, a reprojection error of less than 0.1 pixels is considered sufficient to meet the requirements for subsequent 3D measurement.
[0058] To evaluate the performance of the above-mentioned high dynamic range binocular 3D measurement method for objects based on polarization order constraints, this embodiment conducted multiple sets of quantitative and qualitative experiments.
[0059] As a specific implementation method, a standard metal mass block is selected as the test object. The plane fitting error analysis diagram of the standard metal mass block is shown below. Figure 2 As shown, Figure 2 Image (a) in the image is the actual image of the standard metal block being tested. Figure 2 (b) in the figure is the block depth visualization cloud map obtained by the method of this embodiment. Figure 2 (c) in the figure is a heatmap of the plane fitting error distribution obtained by the traditional method. Figure 2 Figure (d) shows the heatmap of the plane fitting error distribution obtained by the method in this embodiment. A standard metal block with dimensions of 60 mm × 35 mm and a tolerance of 0.02 mm was used for accuracy verification. Experimental results show that the actual size of the standard metal block measured by the method in this embodiment can reach 59.9040 mm × 34.9132 mm, and the root mean square error of its reconstructed point cloud relative to the standard plane is 0.1185 mm; the size measured by the traditional method is 59.8608 mm × 34.8242 mm, and its root mean square error is 0.1749 mm. It can be seen that the root mean square error of the plane fitting corresponding to the method in this embodiment is smaller, the high-deviation noise area in the error heatmap is significantly reduced, and the measured size is closer to the true value of the standard block. This proves that the method in this embodiment can effectively reduce the 3D reconstruction measurement error and improve the 3D measurement accuracy of planar workpieces.
[0060] As another specific implementation method, a metal workpiece with a complex shape was selected as the test object. The 3D reconstruction of the complex-shaped metal and its magnified local details are shown in the following comparison images. Figure 3 As shown, Figure 3 Image (a) in the image is a physical image of the complex-shaped metal workpiece being tested. Figure 3 (b) in the image is a complete 3D reconstructed topography of the workpiece obtained using a traditional stereo matching algorithm. Figure 3 (c) in the figure is a complete three-dimensional reconstructed topography of the workpiece obtained using the method of this embodiment. Figure 3In the image, (d) represents a magnified detail image of the workpiece planar region corresponding to the reconstruction result of the traditional algorithm. Figure 3 (e) in the figure is a magnified detail image of the same planar region corresponding to the reconstruction result of the method in this embodiment. As can be seen from the figure, the metal planar region reconstructed by the traditional stereo matching algorithm has a large number of discrete noise points and local missing points; the point cloud surface reconstructed by the method in this embodiment is smooth and continuous, effectively eliminating the voids and burrs caused by matching noise, and significantly improving the ability to restore the details of complex-shaped metal workpieces.
[0061] As can be seen, the method of this embodiment can effectively reduce the point cloud missing and mismatch phenomenon caused by local highlight areas, making the reconstructed point cloud more complete, indicating that the method of this embodiment is suitable for stable three-dimensional measurement of highly reflective and complex-shaped metal objects.
[0062] As another aspect of the embodiments of this disclosure, a binocular three-dimensional measurement system 100 based on polarization order constraints is also provided, such as... Figure 4 As shown, it includes: Image acquisition and correction module 1 acquires two polarization fringe images as left and right views, and performs stereo correction on the left and right views. The two polarization fringe images are obtained by projecting a polarization misalignment fusion phase shift coding pattern onto the surface of the object under test by a projector and are acquired synchronously by a calibrated left polarization camera and right polarization camera, respectively. The polarization decoding module 2 performs polarization misalignment fusion phase shift decoding on the left and right views after stereo correction to obtain the absolute phase, phase period order and linear polarization degree of the left and right views. The effective area mask construction module 3 constructs an effective area mask based on the linear polarization degree, removes the background area, weak signal area and specular abnormality area, and obtains the effective measurement area of the left view and the right view. The order constraint search module 4 uses the pixels in the effective measurement area of the left view as the points to be matched, and according to the phase period order, filters out pixels with the same phase period order as the points to be matched in the left view on the epipolar line of the right view after stereo correction as candidate matching points, and forms a candidate matching set. The weighted matching module 5 constructs a weighted absolute difference and matching cost function based on the linear polarization degree, calculates the matching cost of each candidate matching point within the candidate matching set, and determines the optimal matching point. The triangulation module 6 performs triangulation based on the optimal matching point to obtain a three-dimensional point cloud of the surface of the object to be measured.
[0063] Without causing contradictions, the above-described modules in the system of the present disclosure embodiments can implement any of the above-described methods.
[0064] This disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements a binocular three-dimensional measurement method based on polarization order constraints as described in the above embodiments. The electronic device can be provided as a terminal, a server, or other types of device.
[0065] This disclosure also provides a computer-readable storage medium storing a computer program / instructions and a bitstream thereon. When the program / instructions are executed by a processor, they implement a binocular three-dimensional measurement method based on polarization order constraints described in the above embodiments to generate the bitstream. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
[0066] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0067] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise explicitly specified.
[0068] The above are merely specific embodiments of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in this disclosure, and these should all be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A binocular three-dimensional measurement method based on polarization order constraints, characterized in that, Includes the following steps: S10. Acquire two polarization fringe images as a left view and a right view, and perform stereoscopic correction on the left view and the right view. The two polarization fringe images are obtained by projecting a polarization misalignment fusion phase shift coding pattern onto the surface of the object under test by a projector and by synchronously acquiring them through a calibrated left polarization camera and a right polarization camera, respectively. S20. Perform polarization misalignment fusion phase shift decoding on the left and right views after stereo correction to obtain the absolute phase, phase period order and linear polarization degree of the left and right views. S30. Construct an effective area mask based on the linear polarization degree, and remove the background area, weak signal area and specular abnormality area to obtain the effective measurement area of the left view and the right view. S40. Using the pixels in the effective measurement area of the left view as the points to be matched, according to the phase period order, on the epipolar line of the right view after stereo correction, pixels with the same phase period order as the points to be matched in the left view are selected as candidate matching points and a candidate matching set is formed. S50. Construct a weighted absolute difference and matching cost function based on the linear polarization degree, calculate the matching cost of each candidate matching point within the candidate matching set, and determine the optimal matching point. S60. Perform triangulation based on the optimal matching point to obtain a three-dimensional point cloud of the surface of the object to be measured.
2. The method as described in claim 1, characterized in that, The stereo correction includes: Based on the intrinsic parameters and distortion parameters of the binocular polarization camera, as well as the relative pose relationship between the left and right cameras, an epipolar correction algorithm is used to remap the left and right views onto the same imaging plane.
3. The method as described in claim 1, characterized in that, The polarization misalignment fusion phase shift decoding of the left and right views includes: Phase-shifted fringe information and misaligned Gray code information are extracted from the left and right views; Phase shift calculation is performed on the phase shift fringe information to obtain the wrapping phase, and the misaligned Gray code information is decoded to obtain the phase period order; Calculate the absolute phase based on the wrapped phase and the phase period order; The degree of linear polarization is calculated based on the image responses of the left and right views under different linear polarization directions.
4. The method as described in claim 1 or 3, characterized in that, The absolute phase is represented as: , In the formula, Indicates camera c medium pixel absolute phase, Indicates the phase of the package. Indicates the phase period order. L represents the left camera, and R represents the right camera.
5. The method as described in claim 1, characterized in that, The effective region mask is represented as follows: , In the formula, Represents pixels This is within the valid measurement area. Represents pixels This is an invalid region. Indicates camera c medium pixel linear polarization degree, and These represent the upper and lower limits of the effective threshold for linear polarization, respectively.
6. The method as described in claim 1, characterized in that, Calculate the matching cost of each candidate matching point within the candidate matching set, and determine the optimal matching point, including: A left matching window is determined with the point to be matched as the center, and a corresponding right matching window is determined with each candidate matching point in the right view as the center. The average degree of linear polarization within the left and right matching windows is calculated. The pixel weight is determined based on the ratio of the linear polarization degree of the pixels in the left and right matching windows to the average linear polarization degree of the corresponding matching windows. Within the left and right matching windows, the matching cost is calculated based on the absolute phase of the corresponding pixels in the left and right views and the pixel weights. The candidate matching point with the lowest matching cost is selected as the best matching point.
7. The method as described in claim 6, characterized in that, The pixel weight is expressed as: , In the formula, Indicates camera c Matching pixel weights within the window This indicates the degree of linear polarization of pixels within the matching window. This represents the average degree of linear polarization within the corresponding matching window. ε To prevent constants with zero denominators, clip() represents the cutoff function. and These represent the lower limit and upper limit of pixel weight, respectively.
8. A binocular three-dimensional measurement system based on polarization order constraints, characterized in that, include: The image acquisition and correction module acquires two polarization fringe images as a left view and a right view, and performs stereoscopic correction on the left view and the right view. The two polarization fringe images are obtained by projecting a polarization misalignment fusion phase shift coding pattern onto the surface of the object under test by a projector and are acquired synchronously by a calibrated left polarization camera and a right polarization camera, respectively. The polarization decoding module performs polarization misalignment fusion phase shift decoding on the left and right views after stereo correction to obtain the absolute phase, phase period order and linear polarization degree of the left and right views. The effective area mask construction module constructs an effective area mask based on the linear polarization degree, removes background areas, weak signal areas and specular abnormality areas, and obtains the effective measurement areas of the left and right views; The order constraint search module uses the pixels in the effective measurement area of the left view as the points to be matched. Based on the phase period order, it selects pixels with the same phase period order as the points to be matched in the left view as candidate matching points on the epipolar line of the right view after stereo correction, and forms a candidate matching set. The weighted matching module constructs a weighted absolute difference and a matching cost function based on the linear polarization degree, calculates the matching cost of each candidate matching point within the candidate matching set, and determines the optimal matching point. The triangulation module performs triangulation based on the optimal matching point to obtain a three-dimensional point cloud of the surface of the object to be measured.
9. 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, it implements the binocular three-dimensional measurement method based on polarization order constraints as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program / instructions and a bit stream thereon, characterized in that, When the program / instruction is executed by the processor, it implements the binocular three-dimensional measurement method based on polarization order constraints according to any one of claims 1 to 7 to generate the bit stream.
