Slope surface three-dimensional reconstruction point cloud cavity self-adaptive repairing method and system
Through the three histogram enhancement and bilateral filtering technology of the S membership function, the data loss problem caused by light and climate change in the three-dimensional reconstruction of the slope surface is solved, the data is adaptive repair and image quality improvement are achieved, and the monitoring system is enhanced. adaptability and accuracy.
Patent Information
- Application Number
- CN202411099234.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-11-29
AI Technical Summary
In natural environment, the three-dimensional data loss caused by the randomness of light and climatic randomness in the three-dimensional reconstruction monitoring process of slope surfaces results in data discontinuity and low image quality, affecting subsequent analysis and processing.
The three histogram enhancement method based on the S membership function and bilateral filtering technology are adopted to adaptively enhance the stereoscopic image to fill the void points in the three-dimensional reconstruction data, and improve image quality and data continuity.
It significantly improves image quality and the integrity of three-dimensional data, enhances the system's adaptability to variable environments, and improves the accuracy and reliability of monitoring data.
Smart Images

Figure CN119048711A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image processing and restoration, and in particular relates to a method and a system for adaptively restoring holes in a point cloud of a three-dimensionally reconstructed slope surface. Background Art
[0002] When the binocular stereo vision-based 3D reconstruction monitoring method is used in a natural environment, there is a certain amount of data missing in the 3D reconstruction data. Due to the uncertainty of the field environment and the surface texture characteristics of the slope, there may be the following three problems that affect the stereo matching process of the 3D reconstruction calculation, resulting in missing 3D information data.
[0003] The lighting conditions in the slope monitoring scene are random. Since the lighting conditions in the wild environment change over time, when the sun moves to a certain angle, the lighting distribution on the slope will be uneven. Some areas may be blocked by shadows, while some areas may be overexposed due to direct sunlight, resulting in a reduction in the amount of effective information in the photo that can be used for subsequent analysis. The schematic diagram of lighting changes is shown in the figure below. Figure 1 shown.
[0004] The climate randomness of the slope monitoring environment. In the wild environment, morning fog and irregular rain will cause the monitoring area with a depth of field behind the image obtained by the monitoring equipment to be blocked by fog and the camera monitoring screen to be affected by raindrop noise. These two weather conditions will have a significant impact on subsequent calculations. The impact of slope fog on image quality, such as Figure 2 shown.
[0005] Image enhancement technology is one of the core technologies in image processing. Due to the influence of the geometric characteristics of the photographed object, the limitations of the image acquisition equipment and the changing lighting conditions, the image quality obtained is often poor. When the actual image quality is poor, such as low contrast, unclear details and uneven overall brightness, it will bring difficulties to the subsequent image analysis and processing. The main purpose of image enhancement is to expand the differences between the features of different objects in the image, suppress features that are not of interest, improve image quality, enrich the amount of information, make the image more suitable for human visual characteristics and machine recognition analysis, so as to facilitate further processing and analysis of the image. Summary of the invention
[0006] The present invention provides a method for adaptively repairing holes in point cloud of three-dimensional reconstruction of slope surface, which is used to enhance the adaptability of stereo vision system to variable monitoring environment and solve the problem of slope surface The problem of missing three-dimensional data occurs during the three-dimensional reconstruction monitoring process.
[0007] The present invention provides a system for adaptively repairing holes in a three-dimensionally reconstructed point cloud of a slope surface, so as to solve the problem of data holes in a three-dimensionally reconstructed slope surface point cloud caused by the weather randomness of the slope deformation monitoring environment and the lighting randomness of the slope monitoring scene, thereby causing the discontinuity problem in the calculation of the three-dimensional deformation data of the slope.
[0008] The present invention is achieved through the following technical solutions:
[0009] A method for adaptively repairing holes in a point cloud of a three-dimensionally reconstructed slope surface, the method specifically comprising the following steps:
[0010] Step 1: Obtain a pair of stereo images of the slope, wherein the pair of stereo images of the slope is a left and right camera image of the slope at the same time obtained by a stereo vision system composed of two cameras of the same model and specification, and the internal and external parameters of the stereo vision system are obtained by using a chessboard calibration method;
[0011] Step 2: Based on the stereo image pair obtained in step 1, the stereo image pair is adaptively enhanced using a three-histogram enhancement method based on an S membership function;
[0012] Step 3: Select uniformly distributed reference points on the left image enhanced in step 2, and construct a matching sub-region of size (2m+1)×(2m+1) with the reference points as the center;
[0013] Step 4: Using the matching sub-region divided on the enhanced left image in step 3 as the reference sub-region, stereo matching is performed in the enhanced right image to obtain the right image coordinates of the matching points corresponding to the reference points in the enhanced right image;
[0014] Step 5: Perform bilateral filtering on the hole points in the right image coordinates of the reference points obtained by stereo matching in step 4 to obtain the right image coordinates of the matching points after hole repair;
[0015] Step 6: According to the stereo vision mathematical model, the three-dimensional coordinates of the reference point are calculated by combining the left image coordinates of the reference point with the right image coordinates of the matching point after hole repair and the internal and external parameters of the stereo vision system to obtain the three-dimensional data of the slope surface obtained by adaptive repair.
[0016] Furthermore, the step 2 specifically includes the following steps:
[0017] Step 2.1: Perform stretching processing on the entire acquired image, stretching the histogram range of the image to the full grayscale range, and obtaining a stretched histogram image I;
[0018] Step 2.2: Divide the histogram image stretched in step 2.1 into four non-overlapping sub-blocks I i , i∈{1, 2, 3, 4};
[0019] Step 2.3: Adaptively crop the histogram of each sub-block after the block division in step 2.2;
[0020] Step 2.4: Take each sub-block I i The mean square error is used as the boundary for dividing different brightness areas, and for each sub-block I i The histogram is segmented and the sub-image block is further divided into three sub-images with different brightness ranges. ij ;
[0021] Step 2.5: Based on the histogram clipped in step 2.3, each sub-histogram in step 2.4 is equalized;
[0022] Step 2.6: Use bilinear interpolation to process the images of each sub-histogram processed in step 2.5 to obtain the final image enhancement result.
[0023] Furthermore, the step 2.1 is specifically to define the gray value of the pixel at the position (i, j) in the image before the stretching transformation as g(i, j), the gray value of the point after the stretching transformation as G(i, j), and define the minimum gray value in the image as g min , the maximum gray value is g max , then the histogram stretching transformation can be expressed as:
[0024]
[0025] Furthermore, the step 2.3 is specifically that the threshold-based histogram clipping formula is as follows:
[0026]
[0027] Among them, N represents the total number of pixels in a sub-block, β represents the cropping value of the histogram, and L max represents the maximum gray level in the sub-block, γ represents the gray mean value of the image sub-block, Represents the grayscale mean square error of the sub-block, k max is the maximum slope, CL represents the final clipping value of the sub-block histogram;
[0028] The S-type membership function is introduced to replace the fixed value of β, and the functional relationship between the clipping coefficient and the grayscale value is established; the expression of S(x) is as follows:
[0029]
[0030] Where x represents different gray levels, ranging from 0 to 255, and S(x) ranges from 0 to 1. By calculating the cropping values of different gray levels, 256 different cropping values are obtained to achieve adaptive cropping of the image.
[0031] Obtain different histogram clipping values at different pixel proportion gray levels to achieve adaptive clipping of the image; the modified clipping value expressions for each gray level are as follows:
[0032]
[0033] Among them, n i is the number of pixels of the i-th gray level, n max 、n min is the number of pixels with the largest and smallest grayscale level in the image sub-block, x i is the S membership function parameter corresponding to the i-th grayscale level, and the number of grayscales in the histogram is n max With n min All n between i Mapped between the interval [0, 255], the cropping parameter value cl is obtained as the number of pixels in different gray levels changes. i ;
[0034] Substitute equation (5) into the clipping threshold expression (2) to obtain the histogram clipping threshold CL under different quantity distributions: i , which is expressed as follows:
[0035]
[0036] The histograms of the four sub-blocks are clipped according to the clipping threshold calculated based on the S-type membership function, and the pixels exceeding the threshold are evenly distributed to other gray levels to obtain the histogram distribution H after histogram clipping. s (i).
[0037] Furthermore, the step 2.4 is specifically that, if the processed image is an image taken by a single camera, components of different brightness ranges in the image are separated, and the mean square error calculation formula is as follows:
[0038]
[0039] Among them, G mean is the grayscale mean of the image, n i is the number of pixels with gray level i in the original image, I sd is the mean square error of the image; the upper and lower segmentation points U and B of the histogram of the input image are calculated as follows:
[0040] U=L 0 +I sd (10)
[0041] B=L max -I sd (11)
[0042] Among them, L 0 , L max are the minimum and maximum gray levels respectively. Since the histogram has been stretched to the full gray range in the first step, L 0 , L max 0 and 255 respectively.
[0043] Furthermore, if the image processed in step 2.4 is a stereoscopic image pair, then for the selection of the subhistogram segmentation point positions of the left and right images at the same time, the mean of the segmentation points calculated by selecting the left and right images is considered, and the calculation expression is as follows:
[0044]
[0045]
[0046] Furthermore, the step 2.4 is specifically as follows: the first sub-histogram interval is [0, U]; the second sub-histogram grayscale interval is [U+1, B]; the third sub-histogram grayscale interval is [B+1, 255];
[0047] Perform histogram equalization on each subhistogram and calculate the probability density distribution function PDF of the three subhistograms respectively 1 (i) PDF 2 (i) PDF 3 (i) are as follows:
[0048]
[0049] Among them, N 1 、N 2 、N 3 The total number of pixels in the three sub-histograms is calculated according to the probability distribution of each sub-histogram. 1 (I) CDF 2 (I) CDF 3 (I), the calculation formula is as follows:
[0050]
[0051] Then the histogram equalization mapping relationship of each sub-histogram is obtained as follows:
[0052] I S1 =U×CDF 1 (I) (20)
[0053] I S2 =(U+1)+(B-U+1)×CDF 2 (I) (21)
[0054] I S3 = (B + 1) + (255 - B + 1) × CDF 3 (I) (22)
[0055] Wherein, I S1 、I S2 、I S3 are respectively three image components after enhancement of a certain image sub - block of the input image I. After superposition, I S is obtained, which is the image sub - block processed by the three - histogram enhancement method based on the S membership function. After the four sub - blocks divided from the original image are adaptively enhanced from step 2.3 to step 2.5, bilinear interpolation is used to process the edges of the sub - image blocks to reduce the image block effect.
[0056] Furthermore, step 5 adopts an adaptive 3D point cloud hole repair algorithm based on bilateral filtering to fill the holes in the 3D reconstruction data of the slope surface. Specifically,
[0057] Step 5.1: Traverse the right - image coordinates of the reference points obtained by stereo matching in step 4 to determine the valid holes to be filled;
[0058] Step 5.2: Determine the size of the filter for each valid hole to be filled;
[0059] Step 5.3: Perform bilateral filtering calculation on the valid holes to be filled in the right - image coordinates to obtain the right - image coordinate values of the reference points after hole filling;
[0060] Furthermore, step 5.1 is specifically as follows: Traverse the right - image pixel coordinates of the stereo - matching reference points, scan all the holes in the right - image pixel coordinates with a window of size m×m, calculate the proportion Y of the number of valid points in the neighborhood of the hole points, and artificially determine the effective - point proportion threshold R. The rules for valid holes to be filled are as follows:
[0061] Step 5.1.1: If Y > R in the neighborhood of the current hole point, it is determined as a valid hole to be filled;
[0062] Step 5.1.2: If the proportion of valid points in the neighborhood of the current hole point is 0.1 < Y < R, the side length of the neighborhood is enlarged by 2, and at this time the neighborhood becomes (m + 2)×(m + 2). Calculate the new proportion Y of valid points 1 ; If Y 1 > 0.1, then continue the above process, enlarge the neighborhood and calculate the new proportion Y of valid points k ; Until Y k < Y k-1 < R, this point is determined as a non - valid hole to be filled, or when Y k > R, it is determined as a valid hole to be filled;
[0063] Specifically, the scanning window size is initially set to m, and the determination window of some hole points may be larger than m. The filter window size of each hole point is determined according to the hole point determination window size when the Y>R condition is finally satisfied in step 5.1.
[0064] A slope surface three-dimensional reconstruction point cloud hole adaptive repair system, the repair system uses the slope surface three-dimensional reconstruction point cloud hole adaptive repair method as mentioned above, the repair system includes:
[0065] An image acquisition module is used to acquire the original image of the three-dimensional reconstruction data of the slope surface, wherein the image includes a photo image taken by a single camera and a binocular vision image;
[0066] The image enhancement module uses a three-histogram enhancement method based on the S membership function to enhance the image based on the image pair obtained by the stereo vision system;
[0067] The data hole filling module fills the data holes of the three-dimensional reconstruction of the slope surface based on bilateral filtering on the enhanced image, and completes the adaptive repair of the data holes of the three-dimensional reconstruction of the slope surface.
[0068] The beneficial effects of the present invention are:
[0069] The present invention aims at the problem of light changes and rain and fog noise in the natural environment. The present invention is based on the existing limited contrast histogram equalization algorithm (CLAHE) for optimization, adopts an adaptively changing S membership function to determine the histogram clipping threshold, and performs adaptive clipping according to the distribution characteristics of different gray levels in the histogram. In the histogram equalization process, the original image is histogram segmented to differentiate three sub-histograms representing different brightness areas, and the corresponding image parts are enhanced based on the sub-histograms, thereby achieving targeted enhancement of different brightness areas. The method was subjected to image enhancement experiments, and the test results showed that the method has obvious improvements over traditional HE, AHE, and CLAHE algorithms in brightness changes and simulated rain and fog scenes, and improves the image quality and grayscale information while ensuring image details.
[0070] The present invention adopts a three-dimensional data repair method based on bilateral filtering to address the problem of data holes in the three-dimensional reconstruction results caused by texture missing areas on the surface of the monitored object. This method has obvious advantages in both the subjective evaluation of three-dimensional data repair and the objective evaluation indicators of point cloud quality, which verifies the effectiveness of this method in repairing three-dimensional data holes. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] Figure 1 It is a schematic diagram of the changes in illumination during the monitoring process.
[0072] Figure 2 This is an image of the impact of slope fog during the monitoring process.
[0073] Figure 3 It is a flow chart of the method of the present invention.
[0074] Figure 4 It is a flow chart of the three-histogram enhancement algorithm based on the S membership function of the present invention.
[0075] Figure 5 It is a flow chart of the three-histogram enhancement algorithm of the left and right image pairs based on the S membership function of the present invention.
[0076] Figure 6 This is an example diagram of image enhancement after slope segmentation using the three-histogram enhancement algorithm based on the S membership function in the present invention.
[0077] Figure 71 is an image enhancement experiment result diagram in an embodiment of the present invention, wherein (a1) is a conventional image, (a2) is an image enhancement experiment result diagram of the HE algorithm, (a3) is an image enhancement experiment result diagram of the AHE algorithm, (a4) is an image enhancement experiment result diagram of the CLAHE algorithm, and (a5) is an image enhancement experiment result diagram of the algorithm of the present invention; (b1) is a rain and fog image 1, (b2) is an image enhancement experiment result diagram of the HE algorithm rain and fog image 1, (b3) is an image enhancement experiment result diagram of the AHE algorithm rain and fog image 1, and (b4) is an image enhancement experiment result diagram of the CLAHE algorithm rain and fog image 1. Result diagram, (b5) is the image enhancement result diagram of rain fog image 1 using the algorithm of the present invention; (c1) is the image enhancement result diagram of rain fog image 2, (c2) is the image enhancement result diagram of rain fog image 2 using the HE algorithm, (c3) is the image enhancement result diagram of rain fog image 2 using the AHE algorithm, (c4) is the image enhancement result diagram of rain fog image 2 using the CLAHE algorithm, (c5) is the image enhancement result diagram of rain fog image 2 using the algorithm of the present invention; (d1) is the image enhancement result diagram of rain fog image 3, (d2) is the image enhancement result diagram of rain fog image 3 using the HE algorithm, (d3) is the image enhancement result diagram of rain fog image 3 using the AHE algorithm (d4) is the image enhancement result diagram of rain and fog image 3 using the CLAHE algorithm, and (d5) is the image enhancement result diagram of rain and fog image 3 using the algorithm of the present invention; (e1) is abnormal illumination 1, (e2) is the image enhancement result diagram of abnormal illumination 1 using the HE algorithm, (e3) is the image enhancement result diagram of abnormal illumination 1 using the AHE algorithm, (e4) is the image enhancement result diagram of abnormal illumination 1 using the CLAHE algorithm, and (e5) is the image enhancement result diagram of abnormal illumination 1 using the algorithm of the present invention; (f1) is abnormal illumination 2, and (f2) is the image enhancement result diagram of abnormal illumination 2 using the HE algorithm Enhanced experimental result diagram, (f3) is the image enhancement result diagram of abnormal illumination 2 experiment of AHE algorithm, (f4) is the image enhancement result diagram of abnormal illumination 2 experiment of CLAHE algorithm, (f5) is the image enhancement result diagram of abnormal illumination 2 experiment of the algorithm of the present invention; (g1) is abnormal illumination 3, (g2) is the image enhancement result diagram of abnormal illumination 3 experiment of HE algorithm, (g3) is the image enhancement result diagram of abnormal illumination 3 experiment of AHE algorithm, (g4) is the image enhancement result diagram of abnormal illumination 3 experiment of CLAHE algorithm, (g5) is the image enhancement result diagram of abnormal illumination 3 experiment of the algorithm of the present invention.
[0078] Figure 8 It is a schematic diagram of the point cloud holes of the three-dimensional reconstruction of the monitoring area of the present invention.
[0079] Fig. 9 This is a three-dimensional reconstruction point cloud hole repair effect diagram of the present invention.
[0080] Fig.10It is the point cloud hole repair experimental result diagram of the present invention, wherein, (a1) is the 5×5 median filtering point cloud hole repair experimental result diagram, (a2) is the 5×5 Gaussian filtering point cloud hole repair experimental result diagram, (a3) is the 5×5 bilateral filtering point cloud hole repair experimental result diagram; (b1) is the 7×7 median filtering point cloud hole repair experimental result diagram, (b2) is the 7×7 Gaussian filtering point cloud hole repair experimental result diagram, (b3) is the 7×7 bilateral filtering point cloud hole repair experimental result diagram; (c1) is the 9×9 median filtering point cloud hole repair experimental result diagram, (c2) is the 9×9 bilateral filtering point cloud hole repair experimental result diagram, (c3) is the 9×9 bilateral filtering point cloud hole repair experimental result diagram.
[0081] Fig.11 It is the layout diagram of the stereoscopic vision system for slope deformation monitoring test.
[0082] Fig.12 It is a schematic diagram of the slope deformation monitoring test area.
[0083] Fig.13 It is a three-dimensional reconstruction data result diagram of the slope deformation monitoring test, where (a) is the monitoring result of the slope surface deformation field at t=0s, (b) is the monitoring result of the slope surface deformation field at t=1s, (c) is the monitoring result of the slope surface deformation field at t=2s; (d) is the monitoring result of the slope surface deformation field at t=3s, (e) is the monitoring result of the slope surface deformation field at t=4s, (f) is the monitoring result of the slope surface deformation field at t=5s; (g) is the monitoring result of the slope surface deformation field at t=6s, and (h) is the monitoring result of the slope surface deformation field at t=7s. DETAILED DESCRIPTION
[0084] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0085] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0086] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.
[0087] The following is attached to this application specification Figure 1-13 , the technical solutions in the embodiments of the present application are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0088] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.
[0089] Implementation Method 1
[0090] This embodiment provides a method for adaptively repairing holes in a point cloud of a three-dimensionally reconstructed slope surface. The method specifically comprises the following steps:
[0091] Step 1: Obtain a pair of stereo images of the slope, and use the checkerboard calibration method to obtain the internal and external parameters of the stereo vision system. The stereo image pair of the slope is the image of the left and right cameras of the slope obtained at the same time by a stereo vision system composed of two cameras of the same model and specifications;
[0092] Step 2: Based on the stereo image pair obtained in step 1, the image pair is adaptively enhanced using a three-histogram enhancement method based on the S membership function;
[0093] Step 3: Select uniformly distributed reference points on the left image enhanced in step 3, and construct a matching sub-region of size (2m+1)×(2m+1) with the reference points as the center;
[0094] Step 4: Using the matching sub-region divided on the enhanced left image in step 3 as the reference sub-region, stereo matching is performed in the enhanced right image to obtain the right image coordinates of the matching points corresponding to the reference points in the enhanced right image;
[0095] Step 5: Perform bilateral filtering on the hole points in the right image coordinates of the reference points obtained by stereo matching in step 4 to obtain the right image coordinates of the matching points after hole repair;
[0096] Step 6: According to the stereoscopic vision mathematical model, the left image coordinates of the reference point are combined with the right image coordinates after hole repair and the internal and external parameters of the stereoscopic vision system to calculate the three-dimensional coordinates of the reference point and obtain the three-dimensional data of the slope obtained by adaptive repair;
[0097] Further, step 1.1: calibrate the stereo vision system using the checkerboard calibration plate using the Zhang Zhengyou calibration method;
[0098] Step 1.2: Place a checkerboard calibration board of appropriate size vertically at the bottom of the slope to be monitored, parallel to the lower edge of the slope; define the geodetic coordinate system O g -X g Y g Z g The geodetic coordinate system uses the lower left corner of the chessboard calibration plate as the origin of the geodetic coordinate system, and the direction from the lower left corner of the chessboard calibration plate to the lower right corner is parallel to the ground as the geodetic coordinate system X g The positive direction of the axis is the direction from the lower left corner of the chessboard calibration plate to the upper left corner as the geodetic coordinate system Z g The positive direction of the axis is perpendicular to the plane of the chessboard calibration plate and points to the direction of the slope to be monitored as the geodetic coordinate system Y g Axis positive direction;
[0099] Step 1.3: The stereo vision system obtains the left and right images of the checkerboard calibration plate, obtains the pixel coordinates of each corner point of the checkerboard calibration plate in the left and right images according to the Harris corner point recognition algorithm, and obtains the three-dimensional coordinates of each corner point in the checkerboard calibration plate in the left camera coordinate system in combination with the stereo vision mathematical model;
[0100] Step 1.4: Take the lower left corner as the origin of the geodetic coordinate system (0, 0, 0). The X coordinates of the other corners in the geodetic coordinate system are g Axis and Z g The coordinate values of the axes are determined according to the physical size of the chessboard, and the geodetic coordinate system Y is established based on the chessboard calibration plate. g The axis is perpendicular to the plane of the checkerboard calibration plate, and the Y g The coordinate value is 0, and the three-dimensional coordinates of each corner point of the chessboard calibration plate in the geodetic coordinate system are determined according to the above conditions;
[0101] Step 1.5: According to the left image pixel coordinates of each corner point of the chessboard calibration plate and the three-dimensional coordinates in the geodetic coordinate system, combined with the linear projection model of the camera, establish the transformation matrix formula between the left camera coordinate system and the geodetic coordinate system.
[0102] Furthermore, the step 1.1 is specifically to calibrate and obtain the intrinsic parameter matrix A of the left and right cameras. l With A r And the extrinsic parameter matrix M between the left and right cameraslr , the internal and external parameters of the stereoscopic vision system are expressed by the following formula:
[0103]
[0104] in and are the principal point image coordinates of the left and right cameras, and are the equivalent focal lengths of the left and right cameras in the x and y directions respectively; the external parameter matrix M lr By the rotation matrix R lr With the translation vector T lr Composition, r i is the rotation component, t x , t y , t z is the translation component in the three-axis direction.
[0105] Furthermore, the specific formula of step 1.5 is:
[0106]
[0107] Among them, z li is the z of the i-th chessboard corner point in the left camera coordinate system l Axis coordinate value, m li are the rotation and translation components in the transformation matrix between the left camera coordinate system and the earth coordinate system, (u i , v i , 1) is the homogeneous coordinates of the left image pixel coordinates of the i-th chessboard corner point, (X gi , Y gi , Z gi , 1) is the homogeneous coordinate of the three-dimensional coordinate of the i-th chessboard corner point in the geodetic coordinate system; according to the linear equation system constructed by formula (40), the unknown parameter m in the transformation matrix is solved by the direct linear transformation method li , get the transformation matrix M between the left camera coordinate system and the earth coordinate system l2g .
[0108] Furthermore, the existing histogram equalization method has not been able to solve the problem of adaptive enhancement of a time sequence of images. In addition, although the spatial distribution characteristics of different local areas in the image are considered for local enhancement, there is a lack of separate consideration of different brightness areas in the histogram. For scenes with uneven brightness distribution in the image, it is difficult for existing algorithms to perform separate processing on pixel sets of different brightness in the image.
[0109] The S membership function is used to adaptively crop the histogram to avoid the pre-defined cropping values being not universal under different lighting conditions. The cropped histogram can improve the growth trend of the cumulative distribution function, limit the additional noise caused by excessive contrast enhancement, and use segmented sub-histogram processing to perform targeted enhancement on pixel point sets in different brightness areas. The three segmented sub-histograms represent darker scenes, normal lighting areas, and brighter scenes, respectively. The segmentation of the histogram can effectively perform targeted enhancement on areas with local exposure abnormalities.
[0110] like Figure 2 and 3 As shown, the step 2 specifically includes the following steps:
[0111] Step 2.1: Perform stretching processing on the entire acquired image, stretching the histogram range of the image to the full grayscale range, which can improve the overall contrast of the image and obtain a stretched histogram image I;
[0112] Furthermore, the step 2.1 is specifically to define the gray value of the pixel at the position (i, j) in the image before the stretching transformation as g(i, j), the gray value of the point after the stretching transformation as G(i, j), and define the minimum gray value in the image as g min , the maximum gray value is g max , then the histogram stretching transformation can be expressed as:
[0113]
[0114] Step 2.2: Divide the histogram image stretched in step 2.1 into four non-overlapping sub-blocks I i , i∈{1, 2, 3, 4}, to enhance the local position of the image;
[0115] Step 2.3: Crop the histogram after the block division in step 2.2 to limit the noise amplification problem caused by the contrast enhancement after histogram equalization;
[0116] Furthermore, the step 2.3 is specifically that the threshold-based histogram clipping formula is as follows:
[0117]
[0118] Among them, N represents the total number of pixels in a sub-block, β represents the cropping value of the histogram, and L max represents the maximum gray level in the sub-block, γ represents the gray mean value of the image sub-block, Represents the grayscale mean square error of the sub-block, k max is the maximum slope, CL represents the final clipping value of the sub-block histogram;
[0119] Since the threshold of histogram clipping in CLAHE requires artificially determined parameters, a single limit value is insufficient for scenes with different lighting conditions and image adaptive adjustment capabilities. Therefore, the present invention functionalizes the threshold β and dynamically adjusts the histogram clipping threshold according to the histogram characteristics of the image to increase the robustness and adaptability of the image enhancement algorithm to scenes with large brightness changes.
[0120] The contrast limitation method proposed in the present invention can realize adaptive enhancement of different images, introduce the S-type membership function instead of the β fixed value, thereby realizing adaptive threshold clipping of the histogram, and establishing a functional relationship between the clipping coefficient and the grayscale value; the expression of S(x) is as follows:
[0121]
[0122] Wherein, x represents different gray levels, ranging from 0 to 255, and S(x) ranges from 0 to 1; by calculating the clipping values of different gray levels, 256 different clipping values are obtained to achieve adaptive clipping of the image; however, there are certain limitations here, because S(x) does not directly consider the distribution characteristics of the histogram, and only considers the clipping values of different gray levels with the same definition; the present invention refers to the S membership function and modifies it, introduces the distribution characteristics of the gray histogram, takes the number of pixels at different gray levels as the independent variable, obtains different histogram clipping values at different pixel proportion gray levels, and achieves adaptive clipping of the image; the clipping value expressions of the gray values at each level after modification are as follows:
[0123]
[0124] Among them, n i is the number of pixels of the i-th gray level, n max 、n min is the number of pixels with the largest and smallest grayscale level in the image sub-block, x i is the S membership function parameter corresponding to the i-th grayscale level, and the number of grayscales in the histogram is n max With n min All n between i Mapped between the interval [0, 255], we can obtain the cropping parameter value cl that changes with the number of pixels in different gray levels i , it is possible to set a higher clipping threshold for gray levels with higher gray levels, and set a lower clipping threshold for gray levels with lower pixel proportions;
[0125] Substituting equation (5) into the clipping threshold expression (2), we can obtain the histogram clipping threshold CL under different quantity distributions: i , which is expressed as follows:
[0126]
[0127] The histograms of the four sub-blocks are clipped according to the clipping threshold calculated based on the S-type membership function, and the pixels exceeding the threshold are evenly distributed to other gray levels to obtain the histogram distribution H after histogram clipping. s (i).
[0128] Step 2.4: Use the mean square error of the image as the boundary to divide different brightness areas, segment the histogram, and divide the original image into three sub-images;
[0129] Furthermore, the step 2.4 is specifically that, if the processed image is a photo image taken by a single camera, the present invention uses the mean square error of the image as the boundary for dividing different brightness areas, segments the histogram, divides the original image into three sub-images, separates the components of different brightness ranges in the image, thereby achieving an enhancement effect in each local brightness range, and the mean square error calculation formula is as follows:
[0130]
[0131] Among them, G mean is the grayscale mean of the image, n i is the number of pixels with gray level i in the original image, I sd is the mean square error of the image; the upper and lower segmentation points U and B of the histogram of the input image are calculated as follows:
[0132] U=L 0 +I sd (10)
[0133] B=L max -I sd (11)
[0134] Among them, L 0 , L max are the minimum and maximum gray levels respectively. Since the histogram has been stretched to the full gray range in the first step, L 0 , L max 0 and 255 respectively.
[0135] Or further, if the image processed in step 2.4 is a binocular vision image, since the present invention enhances the image in order to have more feature information that can be matched in the subsequent three-dimensional reconstruction under the stereoscopic vision model of the image, in order to obtain a synchronous enhancement effect for the subsequent binocular vision image, for the selection of the subhistogram segmentation point positions of the left and right images at the same time, the mean of the segmentation points calculated by the left and right images is considered, and the calculation expression is as follows:
[0136]
[0137] Furthermore, the step 2.4 is specifically as follows: the first sub-histogram interval is [0, U], the pixel grayscale value in this interval is small, representing the darker area in the image; the second sub-histogram grayscale interval is [U+1, B], the number of pixels in this interval is the largest and the brightness is relatively uniform; the third sub-histogram grayscale interval is [B+1, 255], representing the area with the highest brightness in the image;
[0138] Perform histogram equalization on each subhistogram and calculate the probability density distribution function PDF of the three subhistograms respectively 1 (i) PDF 2 (i) PDF 3 (i) are as follows:
[0139]
[0140] Among them, N 1 、N 2 、N 3 The total number of pixels in the three sub-histograms is calculated according to the probability distribution of each sub-histogram. 1 (I) CDF 2 (I) CDF 3 (I), the calculation formula is as follows:
[0141]
[0142] Then the histogram equalization mapping relationship of each sub-histogram is obtained as follows:
[0143] I S1 =U×CDF 1 (I) (20)
[0144] I S2 =(U+1)+(B-U+1)×CDF 2 (I) (21)
[0145] I S3 =(B+1)+(255-B+1)×CDF 3 (I) (22)
[0146] Among them, I S1 ,I S2 ,I S3 They are the three image components after the input image I is enhanced, and I is obtained by superposition. S, which is the image sub-block processed by the three-histogram enhancement method based on the S membership function. After the four sub-blocks divided by the original image are adaptively enhanced from step 2.3 to step 2.5, bilinear interpolation is used to process the sub-block edges to reduce the image block effect.
[0147] Step 2.5: Based on the histogram clipped in step 2.3, each sub-histogram in step 2.4 is equalized;
[0148] Step 2.6: Use bilinear interpolation to process the image of each sub-histogram processed in step 2.5 to obtain the final enhanced result.
[0149] The sample image is enhanced using steps 2.1 to 2.6. The image processing flow is as follows: Figure 6 shown.
[0150] The image enhancement comparison experiment includes image quality evaluation indicators, specifically,
[0151] The evaluation indexes of image quality are mainly divided into subjective evaluation method and index evaluation method. The subjective evaluation method evaluates the image quality by observing the image with human eyes. The subjective factor will lead to poor consistency of the observation and evaluation results. In addition, it is difficult for the human eye to observe the difference at the pixel level and cannot make accurate judgments on tiny details. The index evaluation method is based on multiple quantifiable indicators in the grayscale distribution characteristics of the image for evaluation, which can quantitatively analyze the quality of the image and has better reference value. The present invention uses image information entropy (IE), image two-dimensional information entropy (2DIE), Tenengrad evaluation function, and modified Laplace function to quantitatively compare the image before and after enhancement, which is used to objectively evaluate the effectiveness of the algorithm of the present invention in solving the image enhancement problem in areas with local abnormal exposure.
[0152] 1. Information entropy reflects the degree of chaos of random events and can also be used as a measure of the complexity of random event systems. Similarly, the distribution of grayscale information in an image is random, and the image information entropy also reflects the amount of information contained in the image. The larger the information entropy, the more random the content in the image is and the greater the amount of information it contains.
[0153]
[0154] Where P i is the ratio of pixels with gray level i to the total pixels.
[0155] 2. The two-dimensional information entropy can take into account more the spatial characteristics of the distribution of image grayscale information. Therefore, the present invention uses the two-dimensional information entropy as a quantitative indicator of the amount of image information. The expression of the two-dimensional information entropy is as follows:
[0156]
[0157] Among them, f(i, j) is the number of times the (i, j) pair appears in the image, i represents the gray value of the central pixel in the sliding window, and j represents the average gray value of all pixels except the central pixel in the sliding window.
[0158] 3. The Tenengrad function is a commonly used image clarity evaluation index. The basic principle of this function is that the higher the image clarity, the higher the edge sharpness. The Tenengrad evaluation function uses the Sobel operator to extract the horizontal and vertical gradient values of the image respectively. For the intuitiveness of the result, the square sum of the gradient values in the x and y directions is performed in the result. The specific expression is as follows:
[0159]
[0160]
[0161] Among them G x is the horizontal gradient of the image pixel, G y is the vertical gradient of the image pixel, I is the image to be evaluated, and w and h are the width and height of the image respectively.
[0162] 4.LAPM Gaussian correction function is an objective evaluation index of image quality, which is widely used in the field of image processing to evaluate the focus sharpness of images. The modified Laplace operator is derived from the Laplace second-order derivative filter, which highlights the area with rapid intensity changes and effectively captures the edge information of the image. Its expression is as follows:
[0163]
[0164] L x =I*M h (30)
[0165] L y =I*M v (31)
[0166] Where L x is the horizontal gradient of the image pixel, L y is the vertical gradient of the image pixel, I is the image to be evaluated, N is the total number of pixels in the image, and M h 、M v are the Laplacian convolution kernels in the horizontal and vertical directions of the image, M h =M v T .
[0167] The comparative experimental results are as follows:
[0168] The image enhancement algorithm proposed in the present invention was experimented and compared with the image enhancement effects of HE, AHE and CLAHE algorithms. Abnormal lighting conditions and rain and fog conditions were simulated for the laboratory simulated slope sand scene. The present invention uses a mobile light source to simulate the influence of different lighting conditions that may occur during slope monitoring, and uses a watering can to simulate the noise interference of the camera when it rains and fogs. Three pictures of each of the above two low-quality pictures are collected, and a picture taken during conventional collection (without abnormal lighting and rain and fog conditions) is combined for comprehensive comparison. The result diagram enhanced by different algorithms is shown in the figure below. Figure 7 As shown, it can be seen intuitively that when the histogram equalization algorithm is used to process the simulated rain and fog images and the scenes with overall dim brightness, the contrast between the dark and bright parts of the image is strong, and the details in the dark part of the image are not effectively enhanced. The AHE and CLAHE algorithms can effectively improve the details of the image for scenes with abnormal lighting and overall overexposure of brightness, and also effectively enhance the overall details of the image for rain and fog images. However, due to the large overall contrast of the image, the noise of the image is also enhanced accordingly, adding more irrelevant grayscale information. The algorithm proposed in the present invention effectively improves the details of the image for rain and fog scenes and scenes with abnormal lighting, and due to the use of histogram adaptive cropping, the enhancement effect for different image scenes is relatively stable, and has a significant suppression effect on noise. The implementation process of the image enhancement algorithm is shown as follows. Figure 4 or Figure 5 shown.
[0169] The objective evaluation indexes of image enhancement effect are shown in Table 1. It can be seen that the indexes of the algorithm proposed in the present invention in rainy and foggy scenes are higher than those of other algorithms for picture enhancement results, which is consistent with the subjective effect of picture enhancement. In the image enhancement results of abnormal illumination 2 and abnormal illumination 3, the enhancement effect of the algorithm proposed in the present invention is slightly lower than that of the CLAHE enhanced image. However, in general, the algorithm of the present invention has good adaptability to rainy and foggy environments and abnormal illumination environments, and has good enhancement effects for different scenes.
[0170] Table 1 Image enhancement experiment evaluation indicators
[0171]
[0172] Furthermore, the step 4 specifically includes the following steps:
[0173] Step 4.1: Select the slope monitoring area on the initial left image, select a step size of s pixels, divide the slope monitoring area of the initial left image into grids, and obtain a total of R×C uniformly distributed grid points; R and C are determined as follows:
[0174]
[0175] Wherein, fl0or represents the floor rounding function, height is the image height value of the slope monitoring area, and width is the image width value of the slope monitoring area.
[0176] The grid points obtained by dividing the monitoring area on the initial left image according to the fixed step length s are used as time-series fixed image points. The pixel positions of these time-series fixed image points on the left image at other moments in the left image sequence are always fixed. Therefore, by performing stereo matching on the right image at the corresponding moment, three-dimensional reconstruction of these time-series fixed image points can be achieved in the time series, which can solve the problem of failure of time series matching caused by loss of grayscale features of the slope image.
[0177] Step 4.2: During the monitoring process, the slope monitoring area of the left image at other times after image enhancement is gridded with the same step size s to obtain the left image coordinates of all time-series fixed image points. Where i∈1,2,...,R, j∈1,2,...,C; k is the kth frame image in the monitoring process;
[0178] A reference sub-region with a window size of (2m+1)pixel×(2m+1)pixel is constructed in each neighborhood. The zero-mean normalized cross-correlation function (ZNCC) is used to perform stereo matching on all temporally fixed image points on the left image on the right image. The inverse combined Gauss-Newton algorithm (IC-GN) is used for iterative calculation to obtain the sub-pixel coordinates of the matching points corresponding to the temporally fixed image points on the right image.
[0179] Furthermore, analyzing the data structure in the stereo matching process helps to fundamentally find a solution for how to repair the data. Since the bilateral filter can consider both the distance factor from the filter kernel center within the filter window and the similarity relationship between the filter kernel center value and the surrounding value when considering the distribution of weight factors, it can repair images with obvious boundaries and retain the edge feature values of the image. The data distribution characteristics of the stereo matching results have strong edge characteristics. Therefore, the use of bilateral filtering for image coordinate matrix repair has good applicability. The present invention fills the two-dimensional holes in the stereo matching results based on the bilateral filter of formula (34), and then repairs the empty three-dimensional point values in the three-dimensional point cloud.
[0180] The step 5 adopts an adaptive 3D point cloud hole repair algorithm based on bilateral filtering to fill the holes in the 3D deformation data of the slope surface, specifically,
[0181] Step 5.1: Traverse the right image coordinates of the reference points obtained by stereo matching in step 4 to determine the valid hole points to be filled;
[0182] Step 5.2: Determine the size of each effective hole point filter to be filled;
[0183] Step 5.3: Perform bilateral filtering calculation on the valid hole points to be filled in the right image coordinates to obtain the right image coordinate values of the reference points after hole filling, as Fig. 9 shown.
[0184] Further, the specific process of Step 5.1 is as follows: traverse the pixel coordinates of the image of the three-dimensional deformation field of the slope, scan all points in the matrix with a window of size m×m, calculate the proportion Y of the number of valid points in the hole point, and determine the threshold R of the proportion of valid points. The rules for valid hole points to be filled are as follows:
[0185] Step 5.1.1: If Y > R in the neighborhood of the current hole point, it is determined as a valid hole point to be filled;
[0186] Step 5.1.2: If the proportion of valid points in the neighborhood of the current hole point is 0.1 < Y < R, expand the side length of the neighborhood by 2. At this time, the neighborhood is (m + 2)×(m + 2), and calculate the new proportion Y of valid points 1 , if Y 1 > 0.1, then continue the above process, expand the neighborhood and calculate the new proportion Y of valid points k , until Y k < Y k-1 < R, this point is determined as a non-valid hole point to be filled, or when Y k > R, it is determined as a valid hole point to be filled;
[0187] The specific process of Step 5.2 is as follows: in order to judge valid hole points in Step 5.1.1, the initially set neighborhood size is m, and the judgment neighborhood of some hole points may be larger than m. When specifically calculating, the filtering neighborhood window size of each hole point is determined according to the window when the condition Y > R is finally satisfied in Step 5.1.1 for each valid hole point to be filled.
[0188] The specific process of Step 5.3 is as follows: perform bilateral filtering calculation on the hole points to be filled according to Equation (34),
[0189]
[0190] where:
[0191]
[0192] In the above formula, I b (p) is the intensity value of the pixel at the center of the filtering window after bilateral filtering, I(p) and I(q) are the intensity values of the pixel at the center of the filtering window before filtering and other pixels respectively, p and q are position coordinates, and σ s is the standard deviation of the spatial Gaussian kernel, which controls the influence of spatial proximity on the filter weight coefficient, and σ ris the standard deviation of the range Gaussian kernel, which controls the influence of pixel value similarity on the filter weight coefficient, W p is the normalization factor to ensure that the weight sum of the filter is 1, and S is the neighborhood area range of the bilateral filter.
[0193] The three-dimensional point cloud hole repair test is as follows:
[0194] The binocular image 3D reconstruction and repair experiment conducted by the present invention uses pictures of concrete surface defect test blocks for the experiment, and uses the point cloud repair method based on bilateral filtering proposed by the present invention to perform point cloud repair. The result is compared with the three-dimensional point cloud repair method using mean filtering and Gaussian filtering, and the effectiveness of the algorithm of the present invention is evaluated from the intuitive three-dimensional point cloud repair effect and the three objective evaluation indicators mentioned above. The physical size of the concrete test block used is 100mm×100mm×100mm. The resolution of the left and right cameras of the binocular stereo vision system is 2064pixel×1544pixel. The parameter setting of the three-dimensional reconstruction is that the matching point step size is set to 15pixel, and the window size of the matching sub-area is selected to be 31×31pixel, which divides a total of 101×135 three-dimensional points. In order to make a comprehensive comparison with the filling effects of other filtering methods, the mean, Gaussian filtering, and bilateral filtering with initial window sizes of 5, 7, and 9 are used to fill and repair the three-dimensional point cloud. The visualization results after the point cloud filling are as follows. Fig.10 shown.
[0195] like Figure 8 The results show that the 3D point cloud restoration results based on bilateral filtering are smoother than those of median filtering and Gaussian filtering, and the restoration results are more continuous. At the same time, it can be clearly seen that the filtering effects under different windows are somewhat different. The results when the initial value of the filter window is 5×5 are obviously better than those when the initial value of the window is 9×9. This shows that a window that is too large is not conducive to the 3D point recovery at the center of the filter. In order to further objectively compare the relationship between the window size and the quality of point cloud restoration, the point cloud surface quality evaluation index is used for objective evaluation. The objective evaluation index results of filters with different window sizes and different filter hole restoration effects are shown in the following table. In the table, S represents the local smoothness evaluation index, σ is the local standard deviation of the 3D coordinates, D is the average distance of the fitting plane, and different columns represent the range of the local evaluation area. (5×5) represents the index calculation of the 3D point cloud within the 5×5 range of the hole point neighborhood.
[0196] Table 2 Evaluation of local smoothness of point cloud restoration
[0197]
[0198] Table 3 Evaluation of local standard deviation of three-dimensional coordinates of point cloud restoration
[0199]
[0200]
[0201] Table 4 Average distance evaluation of point cloud repair fitting plane
[0202]
[0203] According to the calculation results of the three objective evaluation indicators in Table 2, Table 3, and Table 4, it can be clearly seen that the results of the 3D point cloud repair are the highest quality repair results in the local standard deviation of the 3D coordinates and the average distance of the fitting plane. The evaluation indicators based on the bilateral filtering repair results are the highest quality repair results in the local areas of different sizes evaluated, and in the local smoothness evaluation indicators, when the evaluated area is large enough, the local repair results of the 3D point cloud based on bilateral filtering are better. In addition, it can be clearly seen in the table that in the point cloud repair results based on bilateral filtering, the three evaluation indicators have little change in the filter window size, while in the repair results based on mean filtering, it can be seen that as the filter window becomes larger, the quality evaluation results gradually deteriorate, reflecting that the bilateral filtering has a good adaptive effect on the window size, high robustness, and high practicality in the smoothness of point cloud recovery.
[0204] Implementation Method 2
[0205] This embodiment provides a slope surface 3D reconstruction point cloud hole adaptive repair system, the repair system uses the slope surface 3D reconstruction point cloud hole adaptive repair method as described in embodiment 1, the repair system includes:
[0206] An image acquisition module is used to acquire a pair of stereoscopic images of the slope. The stereoscopic image pair of the slope is an image of the left and right cameras of the slope acquired at the same time by a stereoscopic vision system composed of two cameras of the same model and specification, and the internal and external parameters of the stereoscopic vision system are acquired by a chessboard calibration method;
[0207] The image enhancement module uses a three-histogram enhancement method based on the S membership function to enhance the image based on the image pair obtained by the stereo vision system;
[0208] The data hole filling module selects evenly distributed reference points on the enhanced left image and constructs a matching sub-area of size (2m+1)×(2m+1) with the reference points as the center;
[0209] The matching sub-region divided on the enhanced left image is used as a reference sub-region, stereo matching is performed in the enhanced right image, and the right image coordinates of the matching points corresponding to the reference points in the enhanced right image are obtained;
[0210] Perform bilateral filtering on the hole points in the right image coordinates of the reference points obtained by stereo matching to obtain the right image coordinates of the matching points after hole repair;
[0211] According to the stereo vision mathematical model, the three-dimensional coordinates of the reference point are calculated by combining the left image coordinates of the reference point with the right image coordinates after hole repair and the internal and external parameters of the stereo vision system, and the three-dimensional data of the slope obtained by adaptive repair is obtained.
[0212] Implementation Method 3
[0213] This embodiment is a three-dimensional deformation monitoring test of the slope surface. The purpose of this test is to verify the effectiveness of the method of the present invention. The preparation is specifically carried out according to the following steps:
[0214] The experimental study was conducted using a stereoscopic vision slope sliding deformation monitoring system consisting of two ME2P-1840-21U3M cameras (resolution 4504 pixels × 4096 pixels) and a ThinkPad P53 mobile graphics workstation. The experimental arrangement is as follows: Fig.11 As shown. The base distance between the left and right cameras of the stereo vision system is 190mm, the left and right cameras use 25mm focal length lenses, the camera height is 1.5m, and the stereo vision system is 7.2m away from the nearest end of the slope. During the test, the geodetic coordinate system based on the chessboard calibration plate was established. A 7×7 chessboard calibration plate was selected, with a square size of 150mm×150mm and a thickness of 10mm. During the test, the chessboard was placed vertically at the junction of the underground ditch and the ground, and perpendicular to the ground, with the lower left corner of the chessboard identifying point O g is the origin, and the vertical checkerboard calibration plate points to the slope direction as Y g Axis, vertical upward is Z g Axis, horizontal to the right is X g axis.
[0215] During the test, the stereoscopic vision monitoring system continuously collected slope surface images, and a total of 81 pairs of stereoscopic images were collected. Eight representative pairs of images were selected for 3D reconstruction. The slope surface deformation was continuously reconstructed and calculated based on the geodetic coordinate system. Fig.12 As shown in the figure, the size of the 3D reconstruction area in the slope monitoring area of the stereoscopic vision system is 3.7m×3.0m. The step size of the monitoring points divided for the 3D deformation monitoring of the slope is set to 35pixels, and the size of the stereo matching window is set to 75pixels×75pixels. The monitoring image enhancement and 3D data restoration are performed using the method proposed in the present invention. The 3D monitoring results of the slope are shown in the figure. Fig.13 According to the test results, it can be seen that the slope three-dimensional deformation monitoring data enhancement and adaptive repair method proposed in the present invention can effectively fill data gaps during slope monitoring and improve the integrity of slope three-dimensional deformation monitoring data.
Claims
1. A method for adaptively repairing holes in point cloud of three-dimensional reconstruction of slope surface, characterized in that: The repair method specifically comprises the following steps: Step 1: Obtain a pair of stereo images of the slope, wherein the pair of stereo images of the slope is a left and right camera image of the slope at the same time obtained by a stereo vision system composed of two cameras of the same model and specification, and the internal and external parameters of the stereo vision system are obtained by using a chessboard calibration method; Step 2: Based on the stereo image pair obtained in step 1, the stereo image pair is adaptively enhanced using a three-histogram enhancement method based on an S membership function; Step 3: Select uniformly distributed reference points on the left image enhanced in step 2, and construct a matching sub-region of size (2m+1)×(2m+1) with the reference points as the center; Step 4: Using the matching sub-region divided on the enhanced left image in step 3 as the reference sub-region, stereo matching is performed in the enhanced right image to obtain the right image coordinates of the matching points corresponding to the reference points in the enhanced right image; Step 5: Perform bilateral filtering on the hole points in the right image coordinates of the reference points obtained by stereo matching in step 4 to obtain the right image coordinates of the matching points after hole repair; Step 6: According to the stereo vision mathematical model, the three-dimensional coordinates of the reference point are calculated by combining the left image coordinates of the reference point with the right image coordinates of the matching point after hole repair and the internal and external parameters of the stereo vision system to obtain the three-dimensional data of the slope surface obtained by adaptive repair.
2. According to claim 1, a method for adaptively repairing holes in point cloud of three-dimensional reconstruction of slope surface, characterized in that: The step 2 specifically includes the following steps: Step 2.1: Perform stretching processing on the entire acquired image, stretching the histogram range of the image to the full grayscale range, and obtaining a stretched histogram image I; Step 2.2: Divide the histogram image I stretched in step 2.1 into four non-overlapping sub-blocks I i , i∈{1,2,3,4}; Step 2.3: Adaptively crop the histogram of each sub-block after the block division in step 2.2; Step 2.4: Take each sub-block I i The mean square error is used as the boundary for dividing different brightness areas, and for each sub-block I i The histogram is segmented and the sub-image block is further divided into three sub-images with different brightness ranges. ij ; Step 2.5: Based on the histogram clipped in step 2.3, each sub-histogram in step 2.4 is equalized; Step 2.6: Use bilinear interpolation to process the images of each sub-histogram processed in step 2.5 to obtain the final image enhancement result.
3. According to claim 2, a method for adaptively repairing holes in point cloud of three-dimensional reconstruction of slope surface is characterized in that: Specifically, step 2.1 defines the gray value of the pixel at the position (i, j) in the image before the stretching transformation as g(i, j), the gray value of the point after the stretching transformation as G(i, j), and the minimum gray value in the image as g min , the maximum gray value is g max , then the histogram stretching transformation can be expressed as:
4. According to claim 3, a method for adaptively repairing holes in point cloud of three-dimensional reconstruction of slope surface is characterized in that: Specifically, the threshold-based histogram clipping formula in step 2.3 is as follows: Among them, N represents the total number of pixels in a sub-block, β represents the cropping value of the histogram, and L max represents the maximum gray level in the sub-block, γ represents the gray mean value of the image sub-block, Represents the grayscale mean square error of the sub-block, k max is the maximum slope, CL represents the final clipping value of the sub-block histogram; The S-type membership function is introduced to replace the fixed value of β, and the functional relationship between the clipping coefficient and the grayscale value is established; the expression of S(x) is as follows: Where x represents different gray levels, ranging from 0 to 255, and S(x) ranges from 0 to 1. By calculating the cropping values of different gray levels, 256 different cropping values are obtained to achieve adaptive cropping of the image. Obtain different histogram clipping values at different pixel proportion gray levels to achieve adaptive clipping of the image; the modified clipping value expressions for each gray level are as follows: Among them, n i is the number of pixels of the i-th gray level, n max 、n min is the number of pixels with the largest and smallest grayscale level in the image sub-block, x i is the S membership function parameter corresponding to the i-th grayscale level, and the number of grayscales in the histogram is n max With n min All n between i Mapped between the interval [0,255], the cropping parameter value cl is obtained as the number of pixels in different gray levels changes i ; Substitute equation (5) into the clipping threshold expression (2) to obtain the histogram clipping threshold CL under different quantity distributions: i , which is expressed as follows: The histograms of the four sub-blocks are clipped according to the clipping threshold calculated based on the S-type membership function, and the pixels exceeding the threshold are evenly distributed to other gray levels to obtain the histogram distribution H after histogram clipping. s (i).
5. According to claim 4, a method for adaptively repairing holes in point cloud of three-dimensional reconstruction of slope surface is characterized in that: Specifically, step 2.4 is as follows: if the processed image is an image taken by a single camera, components of different brightness ranges in the image are separated, and the mean square error calculation formula is as follows: Among them, G mean is the grayscale mean of the image, n i is the number of pixels with gray level i in the original image, I sd is the mean square error of the image; the upper and lower segmentation points U and B of the histogram of the input image are calculated as follows: U=L0+I sd (10) B=L max -I sd (11) Among them, L0, L max are the minimum and maximum gray levels respectively. Since the histogram has been stretched to the full gray range in the first step, L0 and L max 0 and 255 respectively.
6. According to claim 5, a method for adaptively repairing holes in point cloud of three-dimensional reconstruction of slope surface is characterized in that: If the image processed in step 2.4 is a stereo image pair, then for the selection of the subhistogram segmentation point positions of the left and right images at the same time, the mean of the segmentation points calculated by selecting the left and right images is considered, and the calculation expression is as follows:
7. The method for adaptively repairing holes in point cloud of three-dimensional reconstruction of slope surface according to claim 6, characterized in that: Specifically, the step 2.4 includes: the first sub-histogram interval is [0, U]; the second sub-histogram grayscale interval is [U+1, B]; the third sub-histogram grayscale interval is [B+1, 255]; Perform histogram equalization on each subhistogram, and calculate the probability density distribution functions PDF1(i), PDF2(i), and PDF3(i) of the three subhistograms as follows: Among them, N1, N2, and N3 are the total number of pixels in the three sub-histograms respectively. The cumulative probability distribution functions CDF1(I), CDF2(I), and CDF3(I) are calculated according to the probability distribution of each sub-histogram. The calculation formula is as follows: Then the histogram equalization mapping relationship of each sub-histogram is obtained as follows: I S1 =U×CDF1(I) (20) I S2 =(U+1)+(B-U+1)×CDF2(I) (21) I S3 =(B+1)+(255-B+1)×CDF3(I) (22) Among them, I S1 ,I S2 ,I S3 They are the three image components of a sub-block of the input image I after enhancement, and I is obtained by superposition. S , which is the image sub-block processed by the three-histogram enhancement method based on the S membership function. After the four sub-blocks divided by the original image are adaptively enhanced from step 2.3 to step 2.5, bilinear interpolation is used to process the sub-block edges to reduce the image block effect.
8. The method for adaptively repairing holes in point cloud of three-dimensional reconstruction of slope surface according to claim 1, characterized in that: The step 5 adopts an adaptive 3D point cloud hole repair algorithm based on bilateral filtering to fill the holes in the 3D reconstruction data of the slope surface, specifically, Step 5.1: Traverse the right image coordinates of the reference points obtained by stereo matching in step 4 to determine the valid hole points to be filled; Step 5.2: Determine the size of each effective hole point filter to be filled; Step 5.3: Perform bilateral filtering calculation on the valid hole points to be filled in the right image coordinates to obtain the right image coordinate values of the reference points after hole filling.
9. The method for adaptively repairing holes in point cloud of three-dimensional reconstruction of slope surface according to claim 8, characterized in that: Specifically, step 5.1 is to traverse the pixel coordinates of the right image of the stereo matching reference point, scan all the hole points in the pixel coordinates of the right image with a window of size m×m, calculate the ratio Y of the number of valid points in the neighborhood of the hole point, and manually determine the threshold R of the ratio of valid points. The rules for valid hole points to be filled are as follows: Step 5.1.1: If Y>R in the neighborhood of the current hole point, it is determined to be a valid hole point to be filled; Step 5.1.2: When the proportion of valid points in the neighborhood of the current hole point is 0.1 < Y < R, the side length of the neighborhood is increased by 2, and at this time the neighborhood becomes (m + 2) × (m + 2). Calculate the new proportion of valid points Y1. If Y1 > 0.1, continue the above process to expand the neighborhood and calculate the new proportion of valid points Y k ; until Y k < Y k-1 < R, this point is determined as a non-valid hole point to be filled, or when Y k > R, it is determined as a valid hole point to be filled; Specifically, the scanning window size is initially set to m, and the determination window of some hole points may be larger than m. The filter window size of each hole point is determined according to the hole point determination window size when the Y>R condition is finally satisfied in step 5.
1.
10. A slope surface 3D reconstruction point cloud hole adaptive repair system, characterized in that: The repair system uses the slope surface three-dimensional reconstruction point cloud hole adaptive repair method as described in any one of claims 1 to 9, and the repair system includes: An image acquisition module is used to acquire the original image of the three-dimensional reconstruction data of the slope surface, wherein the image includes a photo image taken by a single camera and a binocular vision image; The image enhancement module uses a three-histogram enhancement method based on the S membership function to enhance the image based on the image pair obtained by the stereo vision system; The data hole filling module fills the data holes of the three-dimensional reconstruction of the slope surface based on bilateral filtering on the enhanced image, and completes the adaptive repair of the data holes of the three-dimensional reconstruction of the slope surface.
Citation Information
Cited By
Land space planning index calculation method and system based on large language model
CN119294771A
