Hard-trigger asymmetric alternating illumination three-dimensional reconstruction method based on binocular vision
By employing a hard-triggered asymmetric alternating illumination method based on binocular vision, invalid image regions are eliminated by utilizing the complementary characteristics of light sources. Epipolar equations and normalized cross-correlation calculation cost functions are constructed, achieving high-precision 3D reconstruction of precision-machined metal parts. This solves the problems of image gradient loss and shadow occlusion, and improves measurement accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAZHONG UNIV OF SCI & TECH
- Filing Date
- 2026-05-21
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies for 3D reconstruction of precision-machined metal parts suffer from image gradient loss, local overexposure distortion, and blind spots caused by shadow occlusion, resulting in discontinuities and holes, which fail to meet measurement requirements.
A hard-triggered asymmetric alternating illumination method based on binocular vision is adopted. By utilizing the complementary characteristics of light sources under different viewpoints, invalid image regions are eliminated, epipolar equations and normalized cross-correlation calculation cost functions are constructed, stereo matching and three-dimensional solution are performed, and three-dimensional point cloud maps of parts are obtained.
It effectively eliminates feature loss caused by shadow occlusion and highlight overexposure, improves reconstruction accuracy, solves the problem of point cloud voids in part reconstruction, and improves the measurement accuracy of precision-machined metal parts.
Smart Images

Figure CN122244337A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of precision measurement technology, specifically relating to a hard-triggered asymmetric alternating illumination three-dimensional reconstruction method based on binocular vision. Background Technology
[0002] In the fields of high-end intelligent equipment manufacturing and precision industrial measurement, 3D reconstruction technology based on binocular stereo vision has become an important means of obtaining the spatial 3D shape of target objects.
[0003] When applying binocular stereo vision-based 3D reconstruction technology to precision-machined metal parts, significant physical and optical challenges arise. Because the surfaces of precision-machined metal parts are typically highly smooth and lack texture, in actual machine vision forming, the reflection of light on the metal surface exhibits an uneven physical distribution, regardless of whether it's under natural ambient light or artificial fixed light source illumination. Furthermore, strong specular reflections easily occur at the curved cylindrical surfaces or chamfers of the parts, leading to localized overexposure distortion in the image sensor and causing the true physical contours of the parts to be completely obscured by highlight patches. Moreover, since complex metal parts also contain geometrical differences such as steps and deep holes, the rectilinear propagation characteristics of light project large areas of physical shadow on the back side of the part.
[0004] Due to various issues during the photography process of metal parts, severe loss or distortion of local image gradients can occur, resulting in large-area breaks and hole blind spots in the final generated 3D point cloud at key dimensional measurement locations such as stepped hinges and tool relief grooves, which cannot meet the measurement requirements of modern metal parts. Summary of the Invention
[0005] In response to one or more of the above-mentioned defects or improvement needs of the existing technology, the present invention provides a hard-triggered asymmetric alternating illumination three-dimensional reconstruction method based on binocular vision to solve the problem of large-area tortuosity and hole blind spots in metal part inspection images.
[0006] To achieve the above objectives, this invention provides a hard-triggered asymmetric alternating illumination 3D reconstruction method based on binocular vision, which includes the following steps: S1. Obtain first-view and second-view images of the part; S2. Decouple the first-view image and the second-view image, remove invalid image regions, and obtain a mask matrix with valid regions. S3. Merge the effective regions selected by the mask matrix to obtain a fused feature map; S4. Construct epipolar equations based on two-dimensional data constraints in the fused feature map, calculate the cost function using normalized cross-correlation, lock the corresponding points at the peak, and complete stereo matching. S5. Solve the two-dimensional pixel coordinates of the image into three-dimensional absolute coordinates to obtain the three-dimensional point cloud map of the part.
[0007] As a further improvement of the present invention, the first view image is captured at the first view, a first camera is provided at the first view, and the first camera is equipped with a first shadowless light source. The second perspective image is captured from the second perspective, where a second camera is provided, and the second camera is coaxially mounted with a second shadowless light source. The opening and closing of the first shadowless light source and the second shadowless light source are controlled by a hard-triggered light source synchronization controller; Furthermore, the first and second perspectives converge on the reference working surface where the part is located.
[0008] As a further improvement of the present invention, S1 includes: S101, Define the microsecond-level image acquisition cycle The acquisition period is divided into two consecutive time phases. and Level-flipping asymmetrical lighting is achieved by controlling the first and second shadowless light sources through a hard-triggered light source synchronization controller. S102. Within the stable range of the pulse peaks in the two time phases, control the first camera and the second camera to generate microsecond-level global shutter hard trigger signals, and acquire two physically aligned binocular high-resolution image pairs based on the time integration exposure model.
[0009] As a further improvement of the present invention, S2 includes: S201. Solve for the local geometric gradient magnitude of pixels in the first-view image and the second-view image using the first-order differential operator. S202, Set shadow threshold High-light nonlinear saturation threshold Minimum gradient threshold A nonlinear mask mapping equation is constructed to classify and filter pixels; S203. Generating a mask matrix based on a nonlinear mask mapping equation. .
[0010] As a further improvement of the present invention, S3 includes: S301. Within the effective area of the mask matrix, sub-pixel-level positioning is achieved through Hessian matrix eigenvalue decomposition. S302. Utilizing the complementary symmetry between the first-view and second-view images, a mask weight maximization aggregation strategy is adopted to fuse pixels within the effective area, resulting in a fused feature map with no blind spots across the entire field of view.
[0011] As a further improvement of the present invention, the intrinsic parameter matrices of the first camera and the second camera after calibration are set as follows: and The extrinsic parameter matrix from the first camera coordinate system to the second camera coordinate system is set as follows: ; S4 includes: S401. Based on the intrinsic parameter matrices of the first and second cameras and the extrinsic parameter matrix from the first camera coordinate system to the second camera coordinate system, solve for the fundamental matrix. S402. For any sub-pixel in the second-view image, calculate its epipolar equation on the first-view image. S403. In the one-dimensional domain of the epipolar equation, the cost function is calculated using normalized cross-correlation, and the corresponding point at the peak is locked to complete the stereo matching.
[0012] As a further improvement of the present invention, S5 includes: S501. Construct the projection matrices of the first camera and the second camera. For the matching pairs and real space points, construct an overdetermined linear equation system using cross product. S502. Perform singular value decomposition on the coefficient matrix corresponding to the overdetermined linear equation system, extract the second singular vector with the smallest singular value, and obtain the linear analytical solution in three-dimensional coordinates. ; S503, with As initial values for iteration, an objective function to minimize the binocular reprojection error is constructed, and the Levenberg-Marquardt algorithm is introduced for optimization to solve for the optimal 3D coordinates. ; S504. Traverse all matching point pairs to generate a continuous, unbroken micrometer-level edge feature point cloud.
[0013] As a further improvement of the present invention, in S101: The system global clock sequence is set to t, and the brightness drive functions of the hard-triggered light source synchronization controller controlling the first and second shadowless light sources are respectively... and Its normalized amplitude range is ; Set the total image acquisition cycle in microseconds The total image acquisition cycle is divided into two temporally consecutive asymmetric illumination phases. and ; First phase Inside, the first shadowless light source serves as the primary source, while the second shadowless light source assists in asymmetrical lighting;
[0014] in, The set background dark current bias threshold; Second phase Inside, the system level flips, with the second shadowless light source taking the lead and the first shadowless light source assisting in asymmetrical lighting; .
[0015] As a further improvement of the present invention, in S201: The local geometric gradient magnitudes of pixels in the first-view and second-view images are solved using a first-order differential operator. for: (Formula 1) in, The image grayscale value, and These are the partial derivatives of the image grayscale in the horizontal and vertical directions, respectively.
[0016] As a further improvement of the present invention, in S202: The nonlinear mask mapping equation for: (Formula 2) in, The output mask weight values (range) ), Used to remove underexposed dark areas Used to remove overexposed saturated areas. The weights for removing featureless flat areas are 0, and the weights for underexposed dark areas, overexposed saturated areas, and featureless flat areas are 0. It is a monotonically increasing exponential normalization function used to assign continuous confidence weights to valid physical edges.
[0017] The aforementioned improved technical features can be combined with each other as long as they do not conflict with each other.
[0018] In summary, the beneficial effects of the above-described technical solutions conceived by this invention compared with the prior art include: (1) The hard-triggered asymmetric alternating illumination three-dimensional reconstruction method based on binocular vision of the present invention is based on binocular vision scheme, which acquires surface images of parts at different viewpoints, utilizes the complementary characteristics of light sources under binocular viewpoints to physically eliminate feature loss caused by shadow occlusion and highlight overexposure; then, invalid data such as point cloud faults and holes caused by highlight overexposure and shadow occlusion in the first viewpoint image and the second viewpoint image are removed by decoupling; then, the effective areas on the first viewpoint image and the second viewpoint image are fused to make up for the feature blind spots under single illumination; the epipolar constraint and normalized cross-correlation calculation cost function can greatly improve the robustness and efficiency of matching and avoid the ambiguity of traditional matching methods; finally, the three-dimensional point cloud map of the part is obtained through three-dimensional solution, so that the reconstruction accuracy of the part approaches the physical limit. This invention is based on a binocular vision scheme, which obtains the overall picture of the part from the physical level, effectively extracts edge information under geometric occlusion areas, and solves the problem of hole in the point cloud of part reconstruction. At the same time, by decoupling and eliminating invalid image areas, effective physical features with high signal-to-noise ratio are selected and stitched together to obtain part images with reconstruction accuracy close to the physical limit, which greatly improves the measurement accuracy of precision-machined metal parts. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating the hard-triggered asymmetric alternating illumination 3D reconstruction method based on binocular vision in an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0021] Furthermore, unless otherwise stated, 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 indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0022] Example: Please see Figure 1 The preferred embodiment of the present invention includes a hard-triggered asymmetric alternating illumination 3D reconstruction method based on binocular vision, comprising: S1. Obtain first-view and second-view images of the part; S2. Decouple the first-view image and the second-view image, remove invalid image regions, and obtain a mask matrix with valid regions. S3. Merge the effective regions selected by the mask matrix to obtain a fused feature map; S4. Construct epipolar equations based on two-dimensional data constraints in the fused feature map, calculate the cost function using normalized cross-correlation, lock the corresponding points at the peak, and complete stereo matching. S5. Solve the two-dimensional pixel coordinates of the image into three-dimensional absolute coordinates to obtain the three-dimensional point cloud map of the part.
[0023] Specifically, this invention proposes a hard-triggered asymmetric alternating illumination 3D reconstruction method based on binocular vision. Based on a binocular vision scheme, it acquires surface images of a part from different viewpoints. Utilizing the complementary characteristics of light sources under binocular vision, it physically eliminates feature loss caused by shadow occlusion and highlight overexposure. Then, through decoupling, it removes invalid data such as point cloud faults and holes caused by highlight overexposure and shadow occlusion from the first and second viewpoint images. Next, it fuses the effective regions on the first and second viewpoint images to compensate for feature blind spots under single illumination. Epipolar constraints and normalized cross-correlation calculation cost functions significantly improve the robustness and efficiency of matching, avoiding the ambiguity of traditional matching methods. Finally, it obtains a 3D point cloud map of the part through 3D calculation, making the reconstruction accuracy of the part approach the physical limit. This invention is based on a binocular vision scheme, which obtains the overall picture of the part from the physical level, effectively extracts edge information under geometric occlusion areas, and solves the problem of hole in the point cloud of part reconstruction. At the same time, by decoupling and eliminating invalid image areas, effective physical features with high signal-to-noise ratio are selected and stitched together to obtain part images with reconstruction accuracy close to the physical limit, which greatly improves the measurement accuracy of precision-machined metal parts.
[0024] Further, as an optional embodiment of the present invention, the first-view image is captured at the first-view location, where a first camera is located and a first shadowless light source is coaxially mounted; the second-view image is captured at the second-view location, where a second camera is located and a second shadowless light source is coaxially mounted; and the first and second shadowless light sources are controlled to open and close by a hard-triggered light source synchronization controller, with the first and second views converging on the reference working surface where the part is located. Specifically, the hard-triggered asymmetric alternating illumination 3D reconstruction method based on binocular vision in the present invention relies on a micrometer-level converging binocular vision hardware device that has undergone high-precision physical calibration beforehand. Both the first and second cameras are high-resolution cameras, and the first and second cameras are respectively arranged on both sides of the part, with their perspectives converging on the reference working surface where the part is located. The first and second shadowless light sources are set according to the shape of the cameras, usually as ring-shaped shadowless light sources, and their opening and closing are controlled by a hard-triggered light source synchronization controller, realizing microsecond-level synchronization between the light source timing and the camera acquisition, providing hardware support for the construction of the asymmetric alternating light field.
[0025] Furthermore, the aforementioned micron-level convergent binocular vision hardware device has completed the calculation of the camera intrinsic and extrinsic parameter matrices and lens distortion coefficients based on a high-precision alumina calibration plate, and the system reprojection error is calibrated and controlled within 0.25 pixels. Based on this, the intrinsic parameter matrices of the calibrated first and second cameras are set as follows: and And the extrinsic parameter matrix (rigid body transformation matrix) from the first camera coordinate system to the second camera coordinate system is .
[0026] Furthermore, as an optional embodiment of the present invention, step S1 specifically includes: S101, Define the microsecond-level image acquisition cycle The acquisition period is divided into two consecutive time phases. and Level-flipping asymmetrical lighting is achieved by controlling the first and second shadowless light sources through a hard-triggered light source synchronization controller. S102. Within the stable range of the pulse peaks in the two time phases, control the first camera and the second camera to generate microsecond-level global shutter hard trigger signals, and acquire two physically aligned binocular high-resolution image pairs based on the time integration exposure model.
[0027] Step S1 mainly utilizes the level response capability of the hard-triggered light source synchronization controller to actively project two sets of asymmetric light fields that are completely complementary in terms of spatial physical shadow and highlight distribution onto the target within the time window when the part under test remains stationary relative to the vision system, using time-division multiplexing technology. Then, by controlling the first and second cameras to synchronously send external global shutter hard-triggered signals with microsecond-level widths, two sets of binocular high-resolution image pairs (first-view image and second-view image) with physical alignment accuracy are acquired within the image acquisition cycle.
[0028] Furthermore, step S101 is mainly used to realize two sets of asymmetric light fields that are completely complementary in terms of spatial physical shadow and highlight distribution. The specific implementation of step S101 is as follows: The system global clock sequence is set to t, and the brightness drive functions of the hard-triggered light source synchronization controller controlling the first and second shadowless light sources are respectively... and Its normalized amplitude range is ; Set the total image acquisition cycle in microseconds The total image acquisition cycle is divided into two temporally consecutive asymmetric illumination phases. and ; First phase Inside, the first shadowless light source serves as the primary source, while the second shadowless light source assists in asymmetrical lighting;
[0029] in, The set background dark current bias threshold is used to suppress thermal noise from the two camera image sensors against a pure black background; This is the brightness driving function for the first shadowless light source. This is the brightness driving function for the second shadowless light source.
[0030] Second phase Inside, the system level flips, with the second shadowless light source taking the lead and the first shadowless light source assisting in asymmetrical lighting; .
[0031] Furthermore, step S102 is the specific step for taking the photo: exist and Within the stable range of the pulse peak, the hard-triggered light source synchronization controller synchronously sends microsecond-wide external global shutter hard-triggered signals to the image sensors of the first and second cameras. .
[0032] For any pixel coordinate on the image sensor array Its exposure integral model is: (Formula 3) in, Accumulate energy for the sensor. For the trigger time, For exposure duration, Illuminance of alternating light source For the reflectivity of the metal surface, For ambient stray light, For quantum efficiency, The curvature of the metal surface.
[0033] This hardware device uses a hard-triggered light source synchronization controller. Two sets of high-resolution binocular image pairs with physical alignment accuracy were acquired within the period: The first group is Phase acquisition In the first-person perspective, light dominates, while in the second-person perspective, the base of the steps and the tool relief groove form a dark area of shadow. However, the physical edges in the first-person perspective are illuminated by a high signal-to-noise ratio. This represents the pixel grayscale value of the first camera at time T1, and the others are similar.
[0034] The second group is Phase acquisition The light field is reversed, and the structure in the second perspective, which was originally hidden in the shadows, is clearly revealed, while the edges in the first perspective recede into the dark area.
[0035] It is worth noting that the first-view image and the second-view image in this invention can refer to two sets of images or to a set of two sets of images.
[0036] Furthermore, as an optional embodiment of the present invention, step S2 includes: S201. Solve for the local geometric gradient magnitude of pixels in the first-view image and the second-view image using the first-order differential operator. S202, Set shadow threshold High-light nonlinear saturation threshold Minimum gradient threshold A nonlinear mask mapping equation is constructed to classify and filter pixels; S203. Generating a mask matrix based on a nonlinear mask mapping equation. .
[0037] Since the original image inevitably contains overexposed areas of metallic highlights and dark areas of light occlusion, step S2 of this invention is mainly used to construct a pixel-level validity mask, physically decouple the image, remove invalid areas, and peel out the valid area containing reliable physical edges.
[0038] Furthermore, as a feasible embodiment of the present invention, step S201 specifically includes: The local geometric gradient magnitudes of pixels in the first-view and second-view images are solved using a first-order differential operator. for: (Formula 1) in, The image grayscale value, and These are the partial derivatives of the image grayscale in the horizontal and vertical directions, respectively.
[0039] Furthermore, step S202 constructs a highly nonlinear pixel-level quality mask mapping equation. Among them, a low-light shadow background threshold is set. High-light nonlinear saturation threshold and minimum effective geometric gradient threshold The pixel-level quality mask mapping equation is defined as follows: (Formula 2) in, The output mask weight values (range) ), Used to remove underexposed dark areas Used to remove overexposed saturated areas. The weights for removing featureless flat areas are 0, and the weights for underexposed dark areas, overexposed saturated areas, and featureless flat areas are 0. It is a monotonically increasing exponential normalization function used to assign continuous confidence weights to valid physical edges; For Tk phase pixels The gradient magnitude.
[0040] Furthermore, as an optional embodiment of the present invention, step S3 specifically includes: S301. Within the effective area of the mask matrix, sub-pixel-level positioning is achieved through Hessian matrix eigenvalue decomposition. S302. Utilizing the complementary symmetry between the first-view and second-view images, a mask weight maximization aggregation strategy is adopted to fuse pixels within the effective area, resulting in a fused feature map with no blind spots across the entire field of view.
[0041] Step S3 of this invention is mainly used to reduce the extraction accuracy to the submicron level and combine it with a quality mask to perform spatiotemporal fusion of the effective edge features under two lighting conditions.
[0042] Specifically, as an optional implementation of step S301: In the effective region selected by the mask matrix ( Within the effective pixel neighborhood, construct the second-order partial derivative Hessian matrix of the gray-level distribution of that pixel in the two-dimensional image. : (Formula 4) in, These are the second-order partial derivatives of the image.
[0043] For matrix Perform eigenvalue decomposition to find the eigenvector corresponding to the eigenvalue with the largest absolute value. This vector points in the direction of the steepest geometric normal of the image profile.
[0044] At the same time, the current integer-pixel edge point is set as t is the offset along the normal direction. Perform a second-order Taylor series expansion on the image grayscale function:
[0045] Setting the first derivative to zero, we can solve for the subpixel-level geometric subpixel bias. : (Formula 5) By combining the camera's physical pixel size, this algorithm extracts a high-precision initial sub-pixel edge point set. .
[0046] Furthermore, as an optional embodiment of step S302: Taking the first camera as an example, the cross-temporal phase fusion equation is: (Formula 6) in, For the final left camera fused feature point set, The function is used to extract the feature point with the largest mask weight for the same pixel coordinate in two time phases; For the first camera in T k Phase mask weights; For the first camera in T k Temporal sub-pixel feature points. The second camera is implemented in the same way as the first camera, thereby generating a second camera fused feature map. .
[0047] The equation in step S3 above ensures that for any physical point on the surface of the part, the device can select and retain the effective sub-pixel features with the highest signal-to-noise ratio and free from specular or shading contamination from two illumination moments. Through processing the data from the two cameras, a pair of binocular fusion feature maps with no blind spots across the entire field of view can finally be generated. and .
[0048] Furthermore, as an optional embodiment of the present invention, step S4 includes: S401. Based on the intrinsic parameter matrices of the first and second cameras and the extrinsic parameter matrix from the first camera coordinate system to the second camera coordinate system, solve for the fundamental matrix. S402. For any sub-pixel in the second-view image, calculate its epipolar equation on the first-view image. S403. In the one-dimensional domain of the epipolar equation, the cost function is calculated using normalized cross-correlation, and the corresponding point at the peak is locked to complete the stereo matching.
[0049] Step S4 of this invention is mainly used to convert the two-dimensional feature points in the images acquired by the first camera and the second camera into one-to-one matching point pairs through epipolar constraints and NCC matching, thereby realizing the matching from monocular two-dimensional to binocular two-dimensional, which facilitates the subsequent step S5 to calculate the three-dimensional physical space coordinates based on the binocular two-dimensional pixel coordinates.
[0050] Specifically, step S401 of the present invention includes: Using binocular internal reference With external references Construct the basic matrix : (Formula 7) Among them, K L -1 / K R -T The inverse / transpose inverse of the intrinsic parameter matrix. The rotation matrix from the first camera to the second camera. Let be the translation vector from the first camera to the second camera.
[0051] For the fused feature map at the first-person perspective any sub-pixel edge point on Calculate its polar equation on the right feature map. : (Formula 8) in, Let be the antisymmetric matrix of the translation vector. These are the pixel coordinates of the image.
[0052] Steps S402 and S403 of the present invention include: Since the fused feature map at the second viewpoint has already been filtered by a mask matrix to remove reflective false edges and dark noise, this invention extracts reference image blocks based on the grayscale information of the original captured image, using the sub-pixel coordinates on the fused feature map at the first viewpoint as the center; and uses the fundamental matrix to constrain the search space to the corresponding epipolar line at the second viewpoint. The algorithm extracts candidate image patches by sliding them within the one-dimensional neighborhood of the epipolar line and calculates the local normalized cross-correlation (NCC) cost function. in, Candidate matching points for the second-view image. These are the pixel grayscale values of the first-view image and the second-view image, respectively. The algorithm matches the mean grayscale value within the matching window. Because it effectively avoids areas of lighting distortion, the NCC score exhibits a unimodal characteristic. The matching algorithm then identifies the corresponding point at the score peak. This completes the stereo matching.
[0053] Furthermore, as an optional embodiment of the present invention, step S5 includes: S501. Construct the projection matrices of the first camera and the second camera. For the matching pairs and real space points, construct an overdetermined linear equation system using cross product. S502. Perform singular value decomposition on the coefficient matrix corresponding to the overdetermined linear equation system, extract the second singular vector with the smallest singular value, and obtain the linear analytical solution in three-dimensional coordinates. ; S503, with As initial values for iteration, an objective function to minimize the binocular reprojection error is constructed, and the Levenberg-Marquardt algorithm is introduced for optimization to solve for the optimal 3D coordinates. ; S504. Traverse all matching point pairs to generate a continuous, unbroken micrometer-level edge feature point cloud.
[0054] In this invention, step S5 is mainly used to solve the two-dimensional pixel coordinates of the image into three-dimensional absolute coordinates in the real physical space, and to approximate the physical measurement limit of three-dimensional reconstruction through nonlinear optimization.
[0055] Specifically, as one feasible embodiment, steps S501 and S502 of the present invention specifically include: Construct the projection matrices of the first and second cameras ; For matching pairs and real space points Construct an overdetermined system of linear equations using cross products: (Formula 9) (Formula 10) in, This is a vector cross product operation. Singular value decomposition is performed on the coefficient matrix of the overdetermined linear equation system to extract the right singular vector with the smallest singular value, thus obtaining a linear analytical solution in three-dimensional coordinates. .
[0056] Step S503 specifically includes: by As initial values for iteration, construct an objective function to minimize the global binocular reprojection error: (Formula 11) in, To account for distortion in the forward perspective projection function, Let be the square of the Euclidean distance. An LM nonlinear optimization algorithm is introduced, using dynamic iterative descent of the Jacobian matrix to find the optimal coordinates in 3D space that minimize the reprojection error. .
[0057] Step S504 specifically includes: traversing all matching pairs, and finally outputting a high-precision edge feature point cloud of the part that is continuous and without breaks. By combining sub-micron level feature extraction and calibration error, this three-dimensional reconstruction method locks the absolute accuracy of the three-dimensional spatial reconstruction of complex metal parts at the micron level within the macroscopic working viewing distance range.
[0058] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A hard-triggered asymmetric alternating illumination 3D reconstruction method based on binocular vision, characterized in that, Includes the following steps: S1. Obtain first-view and second-view images of the part; S2. Decouple the first-view image and the second-view image, remove invalid image regions, and obtain a mask matrix with valid regions. S3. Merge the effective regions selected by the mask matrix to obtain a fused feature map; S4. Construct epipolar equations based on two-dimensional data constraints in the fused feature map, calculate the cost function using normalized cross-correlation, lock the corresponding points at the peak, and complete stereo matching. S5. Solve the two-dimensional pixel coordinates of the image into three-dimensional absolute coordinates to obtain the three-dimensional point cloud map of the part.
2. The hard-triggered asymmetric alternating illumination 3D reconstruction method based on binocular vision according to claim 1, characterized in that, The first viewpoint image is captured at the first viewpoint, and a first camera is provided at the first viewpoint. The first camera is coaxially mounted with a first shadowless light source. The second perspective image is captured from the second perspective, where a second camera is provided, and the second camera is coaxially mounted with a second shadowless light source. The opening and closing of the first shadowless light source and the second shadowless light source are controlled by a hard-triggered light source synchronization controller; The first and second perspectives converge on the reference working surface where the part is located.
3. The hard-triggered asymmetric alternating illumination 3D reconstruction method based on binocular vision according to claim 2, characterized in that, S1 includes: S101, Define the microsecond-level image acquisition cycle The acquisition period is divided into two consecutive time phases. and Level-flipping asymmetrical lighting is achieved by controlling the first and second shadowless light sources through a hard-triggered light source synchronization controller. S102. Within the stable range of the pulse peaks in the two time phases, control the first camera and the second camera to generate microsecond-level global shutter hard trigger signals, and acquire two physically aligned binocular high-resolution image pairs based on the time integration exposure model.
4. The hard-triggered asymmetric alternating illumination 3D reconstruction method based on binocular vision according to claim 1, characterized in that, S2 includes: S201. Solve for the local geometric gradient magnitude of pixels in the first-view image and the second-view image using the first-order differential operator. S202, Set shadow threshold High-light nonlinear saturation threshold Minimum gradient threshold A nonlinear mask mapping equation is constructed to classify and filter pixels; S203. Generating a mask matrix based on a nonlinear mask mapping equation. .
5. The hard-triggered asymmetric alternating illumination 3D reconstruction method based on binocular vision according to claim 1, characterized in that, S3 includes: S301. Within the effective area of the mask matrix, sub-pixel-level positioning is achieved through Hessian matrix eigenvalue decomposition. S302. Utilizing the complementary symmetry between the first-view and second-view images, a mask weight maximization aggregation strategy is adopted to fuse pixels within the effective area, resulting in a fused feature map with no blind spots across the entire field of view.
6. The hard-triggered asymmetric alternating illumination 3D reconstruction method based on binocular vision according to claim 1, characterized in that, After calibration, the intrinsic parameter matrices of the first and second cameras are set as follows: and The extrinsic parameter matrix from the first camera coordinate system to the second camera coordinate system is set as follows: ; S4 includes: S401. Based on the intrinsic parameter matrices of the first and second cameras and the extrinsic parameter matrix from the first camera coordinate system to the second camera coordinate system, solve for the fundamental matrix. S402. For any sub-pixel in the second-view image, calculate its epipolar equation on the first-view image. S403. In the one-dimensional domain of the epipolar equation, the cost function is calculated using normalized cross-correlation, and the corresponding point at the peak is locked to complete the stereo matching.
7. The hard-triggered asymmetric alternating illumination 3D reconstruction method based on binocular vision according to claim 1, characterized in that, S5 includes: S501. Construct the projection matrices of the first camera and the second camera. For the matching pairs and real space points, construct an overdetermined linear equation system using cross product. S502. Perform singular value decomposition on the coefficient matrix corresponding to the overdetermined linear equation system, extract the second singular vector with the smallest singular value, and obtain the linear analytical solution in three-dimensional coordinates. ; S503, with As initial values for iteration, an objective function to minimize the binocular reprojection error is constructed, and the Levenberg-Marquardt algorithm is introduced for optimization to solve for the optimal 3D coordinates. ; S504. Traverse all matching point pairs to generate a continuous, unbroken micrometer-level edge feature point cloud.
8. The hard-triggered asymmetric alternating illumination 3D reconstruction method based on binocular vision according to claim 3, characterized in that, In S101: The system global clock sequence is set to t, and the brightness drive functions of the hard-triggered light source synchronization controller controlling the first and second shadowless light sources are respectively... and Its normalized amplitude range is ; Set the total image acquisition cycle in microseconds The total image acquisition cycle is divided into two temporally consecutive asymmetric illumination phases. and ; First phase Inside, the first shadowless light source serves as the primary source, while the second shadowless light source assists in asymmetrical lighting; in, The set background dark current bias threshold; Second phase Inside, the system level flips, with the second shadowless light source taking the lead and the first shadowless light source assisting in asymmetrical lighting; 。 9. The hard-triggered asymmetric alternating illumination 3D reconstruction method based on binocular vision according to claim 4, characterized in that, In S201: The local geometric gradient magnitudes of pixels in the first-view and second-view images are solved using a first-order differential operator. for: (Official 1) in, The image grayscale value, and These are the partial derivatives of the image grayscale in the horizontal and vertical directions, respectively.
10. The hard-triggered asymmetric alternating illumination 3D reconstruction method based on binocular vision according to claim 9, characterized in that, In S202: The nonlinear mask mapping equation for: (Official 2) in, The output mask weight values (range) ), Used to remove underexposed dark areas. Used to remove overexposed saturated areas. The weights for removing featureless flat areas are 0, and the weights for underexposed dark areas, overexposed saturated areas, and featureless flat areas are 0. It is a monotonically increasing exponential normalization function used to assign continuous confidence weights to valid physical edges.