3D reconstruction method based on target area semi-global block matching algorithm and adaptive conditional filtering point cloud post-processing
By using the target area semi-global block matching algorithm and adaptive conditional filtering point cloud post-processing in 3D reconstruction, combined with YOLOv8n target detection and triangulation principles, the problems of long calculation time of the 3D reconstruction algorithm and the impact of noisy point clouds are solved, and the Efficient 3D reconstruction and noise removal improve the real-time and robustness of safety warnings.
Patent Information
- Application Number
- CN202410624342.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-05-20
AI Technical Summary
When existing three-dimensional reconstruction algorithms process images collected from actual scenes, the calculation time is long, and the obtained point clouds contain background point clouds and noise point clouds, which affects the safety warning effect.
Using a semi-global block matching algorithm based on the target area and adaptive conditional filtering point cloud post-processing method, the human area is detected through the YOLOv8n target detection network, cropped and stereo matched, combined with the triangulation principle to convert into depth maps and point clouds, and use Adaptive conditional filtering removes noisy point clouds.
It shortens the algorithm calculation time, reduces the complexity, ensures real-time performance, effectively removes noise point clouds, retains environmental feature details, and improves robustness and early warning effects.
Smart Images

Figure CN118587353B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing, and specifically relates to a three-dimensional reconstruction method based on a target area semi-global block matching algorithm and adaptive conditional filtering point cloud post-processing. Background Art
[0002] There are many dangerous factors in the high-intensity work process of the crane. Once an accident occurs, it may threaten the life safety of the personnel on site. Dangerous areas are set for the crane hoisting operation area. Once personnel enter the area, their life safety is threatened. Therefore, it is necessary to warn of the behavior of intrusion into the dangerous area to ensure the safety of personnel.
[0003] At present, there have been studies on safety warnings for personnel in crane hoisting operation areas. When the crane is working, in order to ensure the safety of workers around the crane, positioning technologies are usually used to obtain the location information of the workers, such as radio frequency identification (RFID), ultra-wideband (UWB) and global positioning system (GPS). After that, through the real-time warning system, construction workers can actively determine their safety status and avoid accidents.
[0004] In recent years, machine vision has been developing rapidly, and binocular vision has also begun to play an important role in the field of safety warning in the crane field. The crane operation space is reconstructed in three dimensions through binocular vision, and a three-dimensional dynamic virtual electronic fence is set for the hoisting operation space. Combined with the three-dimensional collision algorithm, the intelligent warning and control of safety risks such as collision with objects and people during the hoisting operation of the crane can be achieved.
[0005] However, 3D reconstruction often contains noisy point clouds, which will affect the effect of early warning, so it is necessary to remove the noisy point clouds. At present, there are many studies on point cloud denoising methods. Some scholars have proposed a K-nearest neighbor comprehensive weighted filtering algorithm to process point clouds, thereby obtaining high-quality 3D point clouds of the measured objects. Other scholars have found that bilateral filtering is suitable for small-scale noise, and applied this method to the laser radar point cloud data in autonomous driving scenarios. Other scholars have proposed a bidirectional cloth simulation filtering algorithm to solve the problem of negative anomalies or over-filtering in point cloud data recognition. Point cloud denoising can also be accomplished through deep learning. Some scholars have proposed a normal estimation method to remove point cloud noise while retaining its geometric features. Other scholars have proposed a point cloud denoising network called Repcd-net, which extracts adaptive features at different denoising stages and regularizes the prediction of multi-scale geometric details. Other scholars have developed a simple data-driven method to eliminate outliers and reduce noise in disordered point clouds.
[0006] For images collected from actual scenes, when the original image samples are large and the image background texture features are relatively complex, the algorithm takes a long time to directly reconstruct the original image in three dimensions. At the same time, the point cloud obtained by three-dimensional reconstruction often contains background point clouds and noise point clouds with large errors, which will have a great impact on the subsequent safety warning results. Summary of the invention
[0007] In order to solve the above problems, the present invention proposes a three-dimensional reconstruction method based on target area SGBM and adaptive conditional filtering point cloud post-processing. The present invention can shorten the algorithm calculation time, has low complexity, ensures the real-time performance of the algorithm, and can effectively remove noise while retaining the details of environmental features and has good robustness.
[0008] In order to achieve the above object, the present invention is achieved through the following technical solutions:
[0009] The present invention is a three-dimensional reconstruction method based on a target area semi-global block matching algorithm and adaptive conditional filtering point cloud post-processing, comprising:
[0010] Step 1: Obtain image data collected by the binocular camera;
[0011] Step 2: calibrate the binocular camera, obtain the calibration parameters of the binocular camera, and obtain the binocular image, wherein the calibration parameters include the intrinsic parameters, extrinsic parameters and distortion parameters of the left camera and the right camera;
[0012] Step 3, read the original image and convert it into a grayscale image;
[0013] Step 4: Perform stereo correction on the binocular images to eliminate the distortion between the binocular images so that the left image and the right image in the binocular images are aligned in the horizontal direction;
[0014] Step 5: Use the target detection algorithm YOLOv8n to perform target detection on the left eye image corrected in step 4, identify the target area of interest, and obtain the target category and coordinates;
[0015] Step 6: According to the target detection result of step 5, the position of the target detection frame of the left image is obtained, and the left image is cropped to obtain a partial left image Image_Left containing only pedestrians, and the right image is cropped at the same position to obtain a partial right image Image_Right containing only pedestrians;
[0016] Step 7, perform BT cost calculation on the image obtained in step 6 to obtain GrayBT, perform horizontal Sobel operator processing on the image, perform BT cost calculation on the processed image to obtain SobelBT, and perform weighted fusion of GrayBT and SobelBT to obtain the total cost CombineBT;
[0017] Step 8: Combine the total cost obtained in step 7 with the SAD idea and use the neighborhood summation method to obtain the SAD-BT cost SADBTCost;
[0018] Step 9: Aggregate the SAD-BT cost by multiple paths. The final matching cost of each pixel is the superposition of all path information to obtain the aggregation cost AggregationCost.
[0019] Step 10: Using the winner-take-all (WTA) algorithm, each pixel selects the disparity value corresponding to the minimum aggregation cost value as the final disparity, and finally obtains a disparity map with the same size as the left-eye image;
[0020] Step 11: In order to restore the X and Y coordinates of the pixel points, the disparity map is restored to the corresponding area of the left eye image, and the disparity values of other areas are filled with the minimum disparity value of the disparity map, that is, the invalid disparity, to obtain DisparityMapFilled;
[0021] Step 12: Convert the filled disparity map into a depth map DepthMap using the triangulation principle;
[0022] Step 13: Convert the depth map into a point cloud to obtain PointCloud, and in order to improve the efficiency of subsequent work, perform voxel filtering on the point cloud data to complete downsampling to obtain VoxelFilteredPointCloud, and the voxel size (voxel_size) is set to 10;
[0023] Step 14, according to the target detection information, obtain the center point position information of the target detection frame, i.e., (Left+Right) / 2 and (Top+Bottom) / 2, and obtain the center point depth value Z1 according to the center point position information and the depth map; and obtain the first depth value Z2, Z3, Z4, and Z5 that is not an invalid depth value by extending in the directions of 0°, 90°, 180°, and 270° from the center point;
[0024] Step 15: As the target position changes, the target detection frame center point position information is automatically updated through target detection, and the disparity map obtained by SGBM is automatically updated. The updated depth map is obtained through the triangulation principle, and finally the updated depth values Z1, Z2, Z3, Z4 and Z5 are obtained.
[0025] Step 16: The median value Depth of Z1, Z2, Z3, Z4 and Z5 is used as the target depth value, thereby obtaining the updated target depth value Depth;
[0026] Step 17: Set two thresholds for depth min=Depth-500,Depth max =Depth+500, retain the point cloud with depth value between the two thresholds, and retain the point cloud with depth value less than Depth min Or greater than Depth max The point cloud is removed to obtain the final point cloud FilterPointCloud.
[0027] A further improvement of the present invention is that in step 2, the binocular camera is calibrated by using a 37×36 chessboard calibration plate, each chessboard has a size of 5mm×5mm, and an accuracy of ±0.01mm, and a binocular camera is used to collect 10-20 pairs of images of the chessboard calibration plate in different postures, and MATLAB's calibration toolbox Stereo CameraCalibrator is used for calibration, and then the intrinsic parameter matrix M, extrinsic parameter matrices R and T, radial distortion coefficients k1, k2, k3 and tangential distortion coefficients p1, p2 of the binocular camera are obtained.
[0028] A further improvement of the present invention is that in step 5, the target detection algorithm YOLOv8n is used to perform target detection on the corrected binocular image, identify the target area of interest, and obtain the target category and coordinates, which specifically includes the following steps:
[0029] Step 5.1, use the integrated PASCAL VOC 2007 and PASCAL VOC 2012 datasets as the training dataset of YOLOv8n, a total of 21503 images and the XML format label file corresponding to each image, and randomly divide the constructed training dataset into training set, validation set and test set, with a ratio of 3:1:1;
[0030] Step 5.2: Use the Pytorch framework to build the YOLOv8n network model and set the corresponding network training parameters. The network training parameters include model settings, training settings, verification settings, and test settings.
[0031] Step 5.3: After the setup is complete, load the open source pre-trained weight initialization model and start training using the GPU. After the training is complete, obtain the optimal weight file in the validation set and the YOLOv5s target detection network model.
[0032] Step 5.4: Input the stereo-rectified left and right images into the trained target detection network respectively, and output object recognition information, including the category of the object and the location information of the detection frame.
[0033] A further improvement of the present invention is that in step 5.2, the YOLOv8n network model consists of four parts: input, backbone, neck and detection head.
[0034] A further improvement of the present invention is that in step 6, the pedestrian area in the binocular image is cropped, specifically: using the slicing operation in Python, the area of interest whose target detection category is person in step 4 is cropped according to the coordinates of the bounding box.
[0035] A further improvement of the present invention is that in step 7, the image is processed by a horizontal Sobel operator, and the formula is as follows:
[0036] Sobel(x,y)=2×[f(x+1,y)-f(x-1,y)]+f(x+1,y+1)-f(x-1,y+1)
[0037] +f(x+1,y-1)-f(x-1,y-1)
[0038] A further improvement of the present invention is that in step 12, the filled disparity map is converted into a depth map using the triangulation principle, including:
[0039]
[0040] The baseline B is the actual physical distance between the optical centers of the binocular cameras, obtained through the external parameter matrix T obtained in step 2, f is the focal length of the camera, obtained through the internal parameter matrix B, and x l 、x r Respectively represent P l , P r The pixel distance in the x-axis direction in each coordinate system, x l With x r The difference is the parallax d, (c x ,c y ) is the coordinate of the center point of the imaging plane in the pixel coordinate system.
[0041] A further improvement of the present invention is that in step 4, the stereoscopic correction of the binocular image is specifically performed as follows:
[0042]
[0043] Among them, (u,v) is the original coordinate on the image, (u',v') is the coordinate of the original image after correction, r is a variable and r 2 =u 2 +v 2 .
[0044] The beneficial effects of the present invention are as follows: the present invention provides a 3D reconstruction method based on a target area semi-global block matching algorithm and adaptive conditional filtering point cloud post-processing, wherein the personnel area of interest is detected by a YOLOv8n target detection network and cropped, and SGBM stereo matching is performed only on the part of interest, thereby reducing the calculation time;
[0045] The present invention converts the disparity map into a depth map through the principle of triangulation, and then converts the depth map into a point cloud to obtain an initial point cloud;
[0046] The present invention proposes an adaptive conditional filtering point cloud post-processing algorithm, which converts the disparity value obtained by SGBM stereo matching in the target detection area into a depth value, and uses the depth value to automatically update the depth threshold of the conditional filtering to remove the initial point cloud noise points and finally complete the three-dimensional reconstruction of the person. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 Flow chart of the three-dimensional reconstruction method of the present invention.
[0048] Figure 2 Flowchart of the adaptive conditional filtering algorithm.
[0049] Figure 3 This is a schematic diagram of the network structure of the deep learning convolutional neural network YOLOv8n of the present invention.
[0050] Figure 4 is the disparity map.
[0051] Figure 5 This is a schematic diagram of the binocular stereoscopic vision parallax positioning principle of the present invention.
[0052] Figure 6 This is the initial point cloud for 3D reconstruction of the present invention, (a) is the side view of the point cloud, and (b) is the front view of the point cloud.
[0053] Figure 7 This is the final point cloud of the 3D reconstruction method of the present invention, (a) is the side view of the point cloud, and (b) is the front view of the point cloud. DETAILED DESCRIPTION
[0054] The following will disclose the embodiments of the present invention with drawings. For the purpose of clear description, many practical details will be described together in the following description. However, it should be understood that these practical details should not be used to limit the present invention. That is to say, in some embodiments of the present invention, these practical details are not necessary.
[0055] like Figure 1-2 As shown, the present invention is a 3D reconstruction method based on a target area semi-global block matching algorithm and adaptive conditional filtering point cloud post-processing. The specific calculation steps are as follows:
[0056] Step 1: Obtain image data collected by the binocular camera;
[0057] Step 2: calibrate the binocular camera, obtain the calibration parameters of the binocular camera, and obtain the binocular image. The calibration parameters include the intrinsic parameters, extrinsic parameters and distortion parameters of the left camera and the right camera. The camera calibration is implemented as follows:
[0058] A 37×36 chessboard calibration board is used, where the size of each chessboard is 5mm×5mm and the accuracy is ±0.01mm. A binocular camera is used to collect 10-20 pairs of images of the chessboard calibration board in different postures. The calibration is performed using MATLAB's calibration toolbox Stereo Camera Calibrator. Then the intrinsic parameter matrix M, extrinsic parameter matrices R and T, radial distortion coefficients k1, k2, k3 and tangential distortion coefficients p1 and p2 of the binocular camera are obtained.
[0059] Step 3, read the original image and convert it into a grayscale image;
[0060] Step 4: Perform stereoscopic correction on the binocular images to eliminate the distortion between the binocular images so that the left image and the right image in the binocular images are aligned in the horizontal direction. The specific steps of stereoscopic correction on the binocular images are as follows:
[0061]
[0062] Among them, (u,v) is the original coordinate on the image, (u',v') is the coordinate of the original image after correction, r is a variable and r 2 =u 2 +v 2 .
[0063] Step 5: Use the target detection algorithm YOLOv8n to perform target detection on the left eye image corrected in step 4, identify the target area of interest, and obtain the target category and coordinates. The target detection algorithm YOLOv8n is used to identify and crop a local binocular image, including:
[0064] Step 5.1, use the integrated PASCAL VOC 2007 and PASCAL VOC 2012 datasets as the training dataset for YOLOv8n, with a total of 21,503 images and XML-formatted label files corresponding to each image. The constructed training dataset is randomly divided into training set, validation set, and test set in a ratio of 3:1:1;
[0065] Step 5.2: Use the Pytorch framework to build the YOLOv8n network model and set the corresponding network training parameters. The network training parameters include model settings, training settings, verification settings, and test settings.
[0066] Step 5.3: After the setup is complete, load the open source pre-trained weight initialization model and start training using the GPU. After the training is complete, the optimal weight file in the validation set and the YOLOv5s target detection network model are obtained. Figure 3 As shown, the YOLOv8n network model consists of four parts: input, backbone, neck and detection head.
[0067] Step 5.4: Input the stereo-rectified left and right images into the trained target detection network respectively, and output object recognition information, including the category of the object and the location information of the detection frame.
[0068] Step 6: According to the target detection result of step 5, the position of the target detection frame of the left image is obtained, and the left image is cropped to obtain a partial left image Image_Left containing only pedestrians, and the right image is cropped at the same position to obtain a partial right image Image_Right containing only pedestrians;
[0069] Step 7: Perform BT cost calculation on the image obtained in step 6 to obtain GrayBT, and perform horizontal Sobel operator processing on the image. Perform BT cost calculation on the processed image to obtain SobelBT, and perform weighted fusion of GrayBT and SobelBT to obtain the total cost CombineBT, wherein the image is processed by the horizontal Sobel operator, and the formula is as follows:
[0070] Sobel(x,y)=2×[f(x+1,y)-f(x-1,y)]+f(x+1,y+1)-f(x-1,y+1)
[0071] +f(x+1,y-1)-f(x-1,y-1)
[0072] Among them, (x, y) represents the coordinates of a pixel in the image, and f(x, y) represents the grayscale value of the pixel.
[0073] Step 8: Combine the total cost obtained in step 7 with the SAD idea and use the neighborhood summation method to obtain the SAD-BT cost SADBTCost;
[0074] Step 9: Aggregate the SAD-BT cost by multiple paths. The final matching cost of each pixel is the superposition of all path information to obtain the aggregation cost AggregationCost.
[0075] Step 10: Using the winner-take-all (WTA) algorithm, each pixel selects the disparity value corresponding to the minimum aggregation cost value as the final disparity, and finally obtains a disparity map of the same size as the left eye image. The disparity map is as follows: Figure 4As shown in the figure, the principle diagram of binocular stereoscopic vision parallax is as follows Figure 5 As shown;
[0076] Step 11: In order to restore the X and Y coordinates of the pixel points, the disparity map is restored to the corresponding area of the left eye image, and the disparity values of other areas are filled with the minimum disparity value of the disparity map, that is, the invalid disparity, to obtain DisparityMapFilled;
[0077] Step 12: Convert the filled disparity map into a depth map DepthMap using the triangulation principle. The implementation method of converting the disparity map into a depth map using the triangulation principle is as follows:
[0078]
[0079] Wherein, the baseline B is the actual physical distance between the optical centers of the binocular cameras, obtained through the external parameter matrix T obtained in step 2; f is the focal length of the camera, obtained through the internal parameter matrix R; x l 、x r Respectively represent P l , P r The pixel distance in the x-axis direction in each coordinate system; x l With x r The difference is the parallax d; (c x ,c y ) is the coordinate of the center point of the imaging plane in the pixel coordinate system.
[0080] Step 13: Convert the depth map into a point cloud to obtain PointCloud, and in order to improve the efficiency of subsequent work, perform voxel filtering on the point cloud data to complete downsampling to obtain VoxelFilteredPointCloud, such as Figure 6 As shown, the voxel size (voxel_size) is set to 10;
[0081] Step 14, according to the target detection information, obtain the center point position information of the target detection frame, i.e., (Left+Right) / 2 and (Top+Bottom) / 2, and obtain the center point depth value Z1 according to the center point position information and the depth map; and obtain the first depth value Z2, Z3, Z4, and Z5 that is not an invalid depth value by extending in the directions of 0°, 90°, 180°, and 270° from the center point;
[0082] Step 15: As the target position changes, the target detection frame center point position information is automatically updated through target detection, and the disparity map obtained by SGBM is automatically updated. The updated depth map is obtained through the triangulation principle, and finally the updated depth values Z1, Z2, Z3, Z4 and Z5 are obtained.
[0083] Step 16: The median value Depth of Z1, Z2, Z3, Z4 and Z5 is used as the target depth value, thereby obtaining the updated target depth value Depth;
[0084] Step 17: Set two thresholds for depth min =Depth-500,Depth max =Depth+500, retain the point cloud with depth value between the two thresholds, and retain the point cloud with depth value less than Depth min Or greater than Depth max The point cloud is removed to obtain the final point cloud FilterPointCloud, such as Figure 7 shown.
[0085] The true value of the point cloud is approximately replaced by the value obtained by manually calibrating the initial point cloud. Experiments are conducted on people who are 12m, 10m, and 8m away from the camera, and the results are shown in Table 1.
[0086] Table 1
[0087]
[0088] The above table shows the six performance indicators of the present invention at different distances. The results show that the present invention can effectively shorten the processing time of the algorithm and has good real-time performance. At the same time, the F1 value of the present invention is maintained above 0.9, and the characteristic point cloud of the person can be retained while removing the noise point cloud. It has a good filtering effect and good robustness, and can effectively complete the three-dimensional reconstruction of the target.
[0089] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A 3D reconstruction method based on target area semi-global block matching algorithm and adaptive conditional filtering point cloud post-processing, characterized by: The three-dimensional reconstruction method specifically comprises the following steps: Step 1: Obtain image data collected by the binocular camera; Step 2: calibrate the binocular camera, obtain the calibration parameters of the binocular camera, and obtain the binocular image, wherein the calibration parameters include the intrinsic parameters, extrinsic parameters and distortion parameters of the left camera and the right camera; Step 3, read the image data in step 1 and convert it into a grayscale image; Step 4: Perform stereo correction on the binocular image obtained in step 2 to eliminate the distortion between the binocular images so that the left image and the right image in the binocular image are aligned in the horizontal direction; Step 5: Use the target detection algorithm YOLOv8n to perform target detection on the left eye image corrected in step 4, identify the target area of interest, and obtain the target category and coordinates; Step 6: According to the target detection result of step 5, the position of the target detection frame of the left image is obtained, and the left image is cropped to obtain a partial left image Image_Left containing only pedestrians, and the right image is cropped at the same position to obtain a partial right image Image_Right containing only pedestrians; Step 7, perform BT cost calculation on the left image Image_Left and the right image Image_Right obtained in step 6 to obtain GrayBT, perform horizontal Sobel operator processing on the images, perform BT cost calculation on the processed images to obtain SobelBT, and perform weighted fusion of GrayBT and SobelBT to obtain the total cost CombineBT; Step 8: Combine the total cost CombineBT obtained in step 7, combine it with the SAD idea of the binocular stereo matching algorithm, and use the neighborhood summation method to obtain the SAD-BT cost SADBTCost; Step 9: Aggregate the SAD-BT cost by multiple paths. The final matching cost of each pixel is the superposition of all path information to obtain the aggregation cost AggregationCost. Step 10: Using the winner-take-all (WTA) algorithm, each pixel selects the disparity value corresponding to the minimum aggregation cost value as the final disparity, and finally obtains a disparity map with the same size as the left-eye image; Step 11, in order to restore the X and Y coordinates of the pixel point, the disparity map DisparityMap obtained in step 10 is restored to the corresponding area of the left eye image, and the disparity values of other areas are filled with the minimum disparity value of the disparity map, that is, the invalid disparity, to obtain the filled disparity map DisparityMapFilled; Step 12: Use the triangulation principle to convert the filled disparity map DisparityMapFilled into a depth map DepthMap; Step 13, convert the depth map DepthMap obtained in step 12 into a point cloud to obtain PointCloud, and in order to improve the efficiency of subsequent work, perform voxel filtering algorithm on the point cloud data to complete downsampling to obtain voxel filtered point cloud VoxelFilteredPointCloud, and the voxel size (voxel_size) is set to 10; Step 14, according to the target detection information obtained in step 5, the center point position information of the target detection frame, i.e., (Left+Right) / 2 and (Top+Bottom) / 2, is obtained, and the center point depth value Z1 is obtained according to the center point position information of the target detection frame and the depth map DepthMap obtained in step 12; the first depth values Z2, Z3, Z4, and Z5 that are not invalid depth values are obtained by extending the center point of the target detection frame in the directions of 0°, 90°, 180°, and 270°; Step 15: As the target position changes, the target detection frame center point position information is automatically updated through target detection, and the disparity map obtained by SGBM is automatically updated. The updated depth map is obtained through the triangulation principle, and finally the updated depth values Z1, Z2, Z3, Z4 and Z5 are obtained. Step 16: taking the median value Depth of the depth values Z1, Z2, Z3, Z4, and Z5 in step 15 as the target depth value, thereby obtaining an updated target depth value Depth; Step 17: Set two depth thresholds Depthmin=Depth-500 and Depthmax=Depth+500, retain the point clouds with depth values between the two thresholds, remove the point clouds with depth values less than Depthmin or greater than Depthmax, and obtain the final point cloud FilterPointCloud.
2. The three-dimensional reconstruction method based on target area semi-global block matching algorithm and adaptive conditional filtering point cloud post-processing according to claim 1 is characterized in that: In the step 2, the binocular camera is calibrated as follows: a checkerboard calibration plate is used, 10-20 pairs of images of the checkerboard calibration plate in different postures are collected by the binocular camera, and the calibration toolbox Stereo Camera Calibrator of MATLAB is used for calibration, and then the intrinsic parameter matrix, extrinsic parameter matrix and radial distortion coefficients k1, k2, k3 and tangential distortion coefficients p1, p2 of the binocular camera are obtained.
3. The three-dimensional reconstruction method based on target area semi-global block matching algorithm and adaptive conditional filtering point cloud post-processing according to claim 1, characterized in that: In step 4, the binocular image is subjected to stereo correction as follows: Among them, (u, v) is the original coordinate on the image, (u', v') is the coordinate of the original image after correction, r is a variable and r 2 =u 2 +v 2 .
4. The three-dimensional reconstruction method based on target area semi-global block matching algorithm and adaptive conditional filtering point cloud post-processing according to claim 1, characterized in that: In step 5, the target detection algorithm YOLOv8n is used to perform target detection on the corrected binocular image, identify the target area of interest, and obtain the target category and coordinates, which specifically includes the following steps: Step 5.1, use the integrated PASCAL VOC 2007 and PASCAL VOC 2012 datasets as the training dataset of YOLOv8n, and randomly divide the constructed training dataset into training set, validation set and test set with a ratio of 3:1:1; Step 5.2: Build the YOLOv8n network model and set the network training parameters, which include model settings, training settings, verification settings, and test settings. Step 5.3: After the setup is complete, pre-train the weights to initialize the model and start training using the GPU. After the training is complete, the optimal weight file in the validation set and the YOLOv5s target detection network model are obtained. Step 5.4: Input the left and right images after stereo correction into the trained target detection network respectively, and output object recognition information, wherein the object recognition information includes the category of the object and the position information of the detection frame.
5. The three-dimensional reconstruction method based on target area semi-global block matching algorithm and adaptive conditional filtering point cloud post-processing according to claim 4, characterized in that: In step 5.2, the YOLOv8n network model consists of four parts: input, backbone, neck and detection head.
6. The three-dimensional reconstruction method based on target area semi-global block matching algorithm and adaptive conditional filtering point cloud post-processing according to claim 1, characterized in that: In the step 6, the pedestrian area in the binocular image is cropped, specifically: using the slicing operation in Python, the area of interest whose target detection category is person in step 4 is cropped according to the coordinates of the bounding box.
7. The three-dimensional reconstruction method based on target area semi-global block matching algorithm and adaptive conditional filtering point cloud post-processing according to claim 1, characterized in that: In step 7, the image is processed with a horizontal Sobel operator, and the formula is as follows: Sobel(x,y)=2×[f(x+1,y)-f(x-1,y)]+f(x+1,y+1)-f(x-1,y+1) +f(x+1,y-1)-f(x-1,y-1) Among them, (x, y) represents the coordinates of a pixel in the image, and f(x, y) represents the grayscale value of the pixel.
8. The three-dimensional reconstruction method based on target area semi-global block matching algorithm and adaptive conditional filtering point cloud post-processing according to claim 1, characterized in that: In step 12, the filled disparity map is converted into a depth map using the triangulation principle, which is expressed as: Where, the baseline B is the actual physical distance between the optical centers of the binocular cameras, obtained through the external parameter matrix T obtained in step 2, f is the focal length of the camera, obtained through the internal parameter matrix B, and x l 、x r Respectively represent P l , P r The pixel distance in the x-axis direction in each coordinate system, x l With x r The difference is the parallax d, (c x ,c y ) is the coordinate of the center point of the imaging plane in the pixel coordinate system.
