A method for calculating the structural depth of asphalt pavement using a three-dimensional model
Through a detection method based on binocular vision, a binocular camera is used to collect and process images, restore the three-dimensional model of the asphalt pavement and calculate the structure depth, solving the problem of long-term, expensive or susceptible to interference in the prior art, and achieving a fast, efficient and accurate detection effect.
Patent Information
- Application Number
- CN202310309976.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-01-21
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2039-01-21
AI Technical Summary
The existing asphalt pavement depth detection methods have problems such as long time, expensive or susceptible to interference, making it difficult to achieve fast, efficient, accurate and economical inspection.
Using a detection method based on binocular vision, the three-dimensional model of the road surface is restored by the left and right cameras to eliminate matching errors and correct camera angle errors.
It realizes fast, efficient and accurate depth detection of asphalt pavement structure, reduces equipment costs, reduces dependence on light and color, and can restore the three-dimensional model of the pavement and intuitively reflect the technical conditions of the pavement.
Smart Images

Figure CN116342674B_ABST
Abstract
Description
Technical Field
[0001] This invention application is a divisional application of an invention patent application with application date of January 21, 2019, application number: 201910053244.9, and named “Asphalt pavement structure depth detection method based on binocular vision”.
[0002] The invention relates to a detection technology of asphalt pavement structure depth in road engineering construction, and in particular to an asphalt pavement structure depth detection method based on binocular vision. Background Art
[0003] The anti-skid performance of asphalt pavement has a significant impact on driving safety, and the structural depth is an important indicator for evaluating the anti-skid performance of asphalt pavement. The structural depth of asphalt pavement refers to the average depth of the open pores on the uneven road surface, reflecting the roughness of the road surface. If the pavement structural depth is too small, the anti-skid performance of the asphalt pavement will be reduced, which will not only cause the car to slip, but also increase the braking distance of the car, seriously affecting driving safety.
[0004] At present, there are three main methods for detecting the structural depth of asphalt pavement: sand spreading method, laser structural depth meter method and digital image method. The principle of sand spreading method is simple and the measurement is convenient, but it is extremely time-consuming; although the laser structural depth meter method has high accuracy, it requires special equipment and is expensive; the digital image method is fast and efficient, but it is easily interfered by external light and the color of the road surface itself. Obviously, the existing asphalt pavement structural depth detection methods have problems such as being time-consuming, expensive and easily interfered.
[0005] Therefore, it is necessary to study a fast, efficient, non-interference and low-cost asphalt structure depth detection method. Summary of the invention
[0006] In order to overcome the above problems, the present invention provides a method for detecting the depth of asphalt pavement structure which is fast, efficient, not susceptible to interference and low in price.
[0007] The technical solution of the present invention is to provide a method for detecting the depth of asphalt pavement structure based on binocular vision, comprising the following steps:
[0008] 100. Obtain the internal and external parameters of the left and right cameras;
[0009] 200. Use left and right cameras to collect a left color image and a right color image of the asphalt road surface respectively;
[0010] 300. Process the left image and the right image into a left grayscale image and a right grayscale image respectively;
[0011] 400. Perform distortion correction on the left grayscale image and the right grayscale image respectively to obtain a first corrected left grayscale image and a first corrected right grayscale image;
[0012] 500. According to the internal and external parameters of the left and right cameras, the first corrected left grayscale image and the first corrected right grayscale image are respectively stereo corrected to obtain a second corrected left grayscale image and a second corrected right grayscale image; 600. The second corrected left grayscale image and the second corrected right grayscale image are stereo matched to identify the corresponding pixel points on the second corrected left grayscale image and the second corrected right grayscale image, and the disparity value d is calculated. According to the disparity value d, the distance of each pixel point on the image from the camera plane in the camera coordinate system is calculated, and a model matrix M containing the height information of each pixel point on the image is generated to restore the three-dimensional model of the road surface;
[0013] 700. Eliminate the value of stereo matching error;
[0014] 800. Correct the camera's shooting angle error;
[0015] 900. Calculate the construction depth of asphalt pavement.
[0016] As an improvement to the present invention, in the above step 300, the following steps are also included: 301. The left color image and the right color image are converted into a left single-channel grayscale image and a right single-channel grayscale image respectively by calculating the three channels of red (R), green (G), and blue (B) according to the following formula;
[0017] f(x,y)=R(x,y)×0.299+G(x,y)×0.587+B(x,y)×0.114;
[0018] Among them, f(x,y) is the grayscale value of the pixel, R(x,y), G(x,y), and B(x,y) are the values of the red, green, and blue channels of the pixel respectively.
[0019] As an improvement to the present invention, in the above step 300, the following step is also included: 302. Use median filtering to denoise the left single-channel grayscale image and the right single-channel grayscale image to obtain a left grayscale image and a right grayscale image.
[0020] As an improvement to the present invention, the above step 400 further includes the following steps: 401. Determine the distortion coefficients k1 and k2 according to the internal parameters of the camera according to the following formula:
[0021]
[0022] Among them, k1 and k2 are the distortion coefficients of the camera, u and v are the pixel coordinates without distortion, x and y are the continuous pixel coordinates without distortion, u0 and v0 are the pixel coordinates of the camera principal point, is the pixel coordinate after distortion;
[0023] 402. Using the obtained camera distortion coefficients k1 and k2, the left grayscale image and the right grayscale image are respectively subjected to distortion correction according to the following formula:
[0024]
[0025] As an improvement to the present invention, the above step 500 further includes the following steps:
[0026] 501. Determine the relative position relationship between the left and right cameras:
[0027] 502. Using Rodriguez transform, the relative rotation matrix is decomposed into the composite rotation matrix r of the left image and the right image respectively. l 、r r ;
[0028] 503. Calculate the rotation matrix R of the left and right images lt , R rt , the left image is rotated according to the rotation matrix R lt Rotate the right image according to the rotation matrix R rt Rotate the two images so that the epipolar lines are horizontal and the poles are at infinity, completing the stereo correction.
[0029] As an improvement to the present invention, the above step 600 further includes the following steps:
[0030] 601. After traversing each pixel on the image using a semi-global matching algorithm (SGBM), identify the same pixel on the second corrected left grayscale image and the second corrected right grayscale image, and calculate the disparity value d;
[0031]
[0032] Among them, x l 、x r are the horizontal axis coordinates of the same pixel point on the second corrected left grayscale image and the second corrected right grayscale image respectively; zc is a scale factor, which is one of the physical parameters of the camera used for shooting, and its value is the reciprocal of the pixel unit size of the camera;
[0033] 602. Calculate the height z of each pixel from the camera plane using the following formula;
[0034]
[0035] Among them, Tx is the component of the relative translation vector T in the horizontal direction, where T represents the distance between the left and right cameras, f is the focal length of the camera, and u l 、u r They represent the pixel coordinates of the principal points of the left and right cameras on the horizontal axis, and d is the parallax value; Tx is the camera parallax, which is one of the physical parameters of the camera used for shooting. Its value is the spatial distance in the horizontal direction between the optical center of the left camera and the optical center of the right camera, that is, the component of the relative translation vector T in the horizontal axis direction;
[0036] 603. The height values of all pixels are combined into a model matrix M to restore the three-dimensional model of the road surface.
[0037] As an improvement to the present invention, the above step 700 further includes the following steps:
[0038] 701. Calculate the first-order difference quotient of the height value corresponding to the pixel point according to the following formula to determine the position of the stereo matching error pixel point;
[0039] k=(z i+1 -z i ) / (x i+1 -x i );
[0040] Among them, k is the first-order difference quotient of the pixel point, x i , x i+1 is the pixel horizontal coordinate of the i-th and i+1-th pixel points, z i , z i+1 is the height value of the i-th and i+1-th pixel points.
[0041] 702. Define the points with first-order difference quotient greater than 1 as mismatched values. Use a 7×7 filter window to place the mismatched value in the center of the window, arrange all the grayscale values in the window from small to large, calculate the median of the grayscale values in the window, replace the mismatched value with the median, and output the height value after replacement.
[0042] As an improvement to the present invention, the above step 800 further includes the following steps: 801. plane fitting is performed on the elements of the model matrix M, and the parameters a1, a2, a3 of the fitting plane are calculated according to the following formula;
[0043]
[0044] Among them, x i ,y i is the pixel coordinate of the i-th pixel, z i is the height of the i-th pixel, and n is the total number of pixels in the matrix.
[0045] As an improvement to the present invention, the above step 800 further includes the following steps:
[0046] 802. Calculate the height value of each pixel after correction using the following formula to complete the shooting angle error correction;
[0047] h i =z i -a1x i -a2y i -a3;
[0048] Among them, z i 、h i are the heights of the i-th pixel before and after shooting angle correction, respectively.
[0049] As an improvement to the present invention, in the above step 900, the structural depth H of the asphalt pavement is calculated by the following formula: p ;
[0050]
[0051] Among them, h max is the maximum value of the pixel height, h i is the height value of the i-th pixel, m and n are the number of rows and columns of the model matrix M, where i is the number of the pixel and its value range is [1,mn].
[0052] The present invention adopts two left and right cameras, and respectively collects the left color image and the right color image of the asphalt pavement with the left and right cameras, performs grayscale processing, distortion correction, stereo correction in sequence, restores the three-dimensional model of the pavement, eliminates the value of stereo matching error, corrects the shooting angle error of the camera, and finally calculates the structural depth of the asphalt pavement; during the detection process, the invention is less affected by the illumination and the color of the pavement itself, and can not only measure the structural depth of the asphalt pavement, but also restore the three-dimensional model of the pavement, and can more intuitively reflect the technical status information of the asphalt pavement for reference by the detection personnel; it overcomes the disadvantages of the laser structural depth meter method that requires the use of special equipment and is expensive, and can complete the detection with a pair of ordinary camera lenses; it overcomes the disadvantages of the traditional manual sand spreading method and the electric sand spreading method that the detection speed is slow and is greatly affected by human subjectivity, and has the advantages of fast and efficient, not easy to be interfered, low price and more accurate detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a schematic diagram of the process block of the present invention.
[0054] Figure 2 It is the chessboard used for calibration of the present invention.
[0055] Figure 3It is a schematic diagram of the planar structure of the left and right cameras in the present invention when they are working. DETAILED DESCRIPTION
[0056] In the description of the present invention, it should be understood that the orientations or positional relationships indicated by the terms "center", "upper", "lower", "front", "back", "left", "right", etc. are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or component referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0057] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installation", "connection" and "connection" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0058] See also Figure 1 , Figure 1 Disclosed is a flowchart of a method for detecting the depth of an asphalt pavement structure based on binocular vision. The method for detecting the depth of an asphalt pavement structure based on binocular vision comprises the following steps:
[0059] 100. Obtain the internal and external parameters of the left and right cameras;
[0060] 200. Use left and right cameras to collect a left color image and a right color image of the asphalt road surface respectively;
[0061] 300. Process the left image and the right image into a left grayscale image and a right grayscale image respectively;
[0062] 400. Perform distortion correction on the left grayscale image and the right grayscale image respectively to obtain a first corrected left grayscale image and a first corrected right grayscale image;
[0063] 500. According to the intrinsic parameters and extrinsic parameters of the left and right cameras, stereo correction is performed on the first corrected left grayscale image and the first corrected right grayscale image respectively to obtain a second corrected left grayscale image and a second corrected right grayscale image;
[0064] 600. Perform stereo matching on the second corrected left grayscale image and the second corrected right grayscale image, identify corresponding pixel points on the second corrected left grayscale image and the second corrected right grayscale image, calculate the disparity value d, calculate the distance of each pixel point on the image from the camera plane in the camera coordinate system according to the disparity value d, generate a model matrix M containing height information of each pixel point on the image, and restore the three-dimensional model of the road surface;
[0065] 700. Eliminate the value of stereo matching error;
[0066] 800. Correct the camera's shooting angle error;
[0067] 900. Calculate the construction depth of asphalt pavement.
[0068] In the above step 100 of the present method, the specifications of the left and right cameras are the same, the imaging surfaces are parallel and coplanar and aligned, the cameras separated by a certain distance are used as binocular cameras, the world coordinate system is constructed with the measuring platform as the origin, and the binocular cameras are calibrated by Zhang Zhengyou calibration method to solve the intrinsic and extrinsic parameters of the two cameras. It should be noted that the intrinsic parameters of the camera are only related to the specifications of the camera, which are uniquely determined after the camera leaves the factory, and the extrinsic parameters of the camera are only related to the relative position relationship between the left and right cameras. The camera intrinsic parameters include the camera focal length f, the scale factor z c , the camera principal point positions u0, v0, reflect the internal structure of the camera. The camera external parameters include the rotation matrix R of the camera relative to the calibration object and the translation vector T of the camera relative to the calibration object, reflecting the relative position relationship between the cameras.
[0069] Furthermore, the camera was calibrated using MATLAB software and the Zhang Zhengyou calibration method was used to shoot a set of checkerboard images. Figure 2 As shown, MATLAB software is then used to identify the checkerboard corner points on the digital image, establish the corresponding relationship between the checkerboard corner points in the digital image and the checkerboard corner points in the real world, and solve the intrinsic and extrinsic parameters of the camera. The following steps are included:
[0070] 101. Let the coordinates of a point in the world coordinate system be P(X, Y, Z), and the pixel coordinates of the corresponding point on the image be p(u, v), then the conversion process from world coordinates to pixel coordinates is performed as follows:
[0071]
[0072] a x =z c f;
[0073] a y =zc f;
[0074] Among them, K is the intrinsic parameter matrix of the camera, u0 and v0 are the pixel coordinates of the camera principal point, and a x 、a y is the focal length parameter of the camera, R is the 3×3 rotation matrix of the camera relative to the calibration object, T is the 3×1 translation vector of the camera relative to the calibration object, z c is the scale factor.
[0075] 102. Assuming that the camera coordinate system and the world coordinate system coincide with each other, the above formula is transformed into:
[0076]
[0077] H=z c K[r1 r2 T];
[0078] Where H is a 3×3 homography matrix, r1 and r2 are the first and second columns of the camera rotation matrix R, respectively.
[0079] The homography matrix contains all the camera intrinsic and extrinsic parameters. The homography matrix H is written in the form of three column vectors [h1 h2 h3]. Using the constraints in the coordinate transformation, the homography matrix is solved according to the following formula;
[0080]
[0081] 103. Use a binocular camera to shoot a set of chessboard images, and then use image recognition technology to identify the corner points of the chessboard. Take the corner points p(u,v) in the pixel coordinate system and the corner points P(X,Y,Z) in the world coordinate system as known values, calculate the homography matrix, and solve all the camera intrinsic and extrinsic parameters.
[0082] In the above step 200 of the method, if Figure 3 As shown, since the specifications of the left and right cameras 1 are the same, the imaging surfaces are parallel, coplanar and aligned, and the cameras 1 separated by a certain distance on the left and right sides serve as a group of binocular cameras. That is to say, the left and right cameras 1 in the present invention constitute a group of binocular cameras, and the binocular cameras are vertically installed on the asphalt pavement 2 at a certain height. The left and right cameras 1 are controlled by a computer to take pictures at the same time, and the structural depth of the asphalt pavement 2 is detected using the obtained left and right digital images. The overlapping part of the shooting areas of the left and right cameras 1 is the measured area 3. The binocular camera must be a camera with a fixed focal length, and a camera lens with an automatic zoom function cannot be selected. It should be noted that the left and right cameras 1 are installed above the asphalt pavement 2 at a certain height, and the optical axis of the camera 1 is perpendicular to the asphalt pavement 2, and the shooting areas of the left and right cameras 1 overlap (please refer to Figure 3 ).
[0083] In the above step 300 of the method, the following steps are also included:
[0084] 301. The left color image and the right color image are converted into a left single-channel grayscale image and a right single-channel grayscale image respectively by calculating the three channels of red (R), green (G), and blue (B) according to the following formula;
[0085] f(x,y)=R(x,y)×0.299+G(x,y)×0.587+B(x,y)×0.114;
[0086] Among them, f(x,y) is the grayscale value of the pixel, R(x,y), G(x,y), and B(x,y) are the values of the red, green, and blue channels of the pixel respectively.
[0087] 302. Use median filtering to denoise the left single-channel grayscale image and the right single-channel grayscale image to obtain a left grayscale image and a right grayscale image.
[0088] The median filtering denoising refers to sliding a 3×3 square two-dimensional sliding template on the image, placing the grayscale value to be processed in the middle of the window, arranging all the grayscale values in the window from small to large, and calculating the median of the grayscale values in the window. When the grayscale value to be processed is equal to the maximum or minimum value of the grayscale value, the grayscale value is judged to be abnormal, and the grayscale value to be processed is replaced by the median of the grayscale value, and the replaced grayscale value is output; otherwise, it is judged to be a normal value and the original grayscale value is output.
[0089] In the above step 400 of the method, the following steps are also included:
[0090] 401. According to the internal parameters of the camera, the distortion coefficients k1 and k2 are determined according to the following formula:
[0091]
[0092] Among them, k1 and k2 are the distortion coefficients of the camera, u and v are the pixel coordinates without distortion, x and y are the continuous pixel coordinates without distortion, u0 and v0 are the pixel coordinates of the camera principal point, is the pixel coordinate after distortion. It should be noted that distortion correction refers to the correction of barrel distortion or pincushion distortion that may occur in the image, and the correction is based on the intrinsic parameters of the camera.
[0093] 402. Using the obtained camera distortion coefficients k1 and k2, the left grayscale image and the right grayscale image are respectively subjected to distortion correction according to the following formula:
[0094]
[0095] In the above step 500 of the method, stereo calibration refers to the calibration of the relative positions of the left and right cameras. There will be errors between the left and right cameras during installation. The two imaging planes cannot be completely parallel and coplanar and aligned, so the two images need to be stereo calibrated. The Bouguet algorithm is used to calibrate the image using the camera external parameters obtained by calibration. The following steps are also included:
[0096] 501. Determine the relative position relationship between the left and right cameras, the formula is as follows:
[0097] R=R r R l T;
[0098] T=T r -RT l ;
[0099] Among them, R is the 3×3 relative rotation matrix between the left and right cameras, T is the 3×1 relative translation vector between the left and right cameras, and R l , R r They are the 3×3 rotation matrices of the left and right cameras relative to the calibration object, T l , T r They are the 3×1 translation vectors of the left and right cameras relative to the calibration object;
[0100] 502. Using Rodriguez transform, the relative rotation matrix is decomposed into the composite rotation matrix r of the left image and the right image respectively. l 、r r ;
[0101] 503. Calculate the rotation matrix R of the left and right images lt , R rt , the left image is rotated according to the rotation matrix R lt Rotate the right image according to the rotation matrix R rt Rotate the two images so that the epipolar lines are horizontal and the poles are at infinity, completing the stereo correction. The formula is as follows:
[0102] R lt =R rect r l ;
[0103] R rt =R rect r r ;
[0104] R rect =[e1 e2 e3];
[0105]
[0106] e3=e1×e2;
[0107] In the formula, R lt , R rt are the 3×3 rotation matrices of the left and right images respectively, R is the 3×3 relative rotation matrix between the left and right cameras, T is the 3×1 relative translation vector between the left and right cameras, r l 、r r are the composite rotation matrices of the left and right images respectively.
[0108] In the above step 600 of the method, the following steps are also included:
[0109] 601. After traversing each pixel on the image using a semi-global matching algorithm (SGBM), identify the same pixel on the second corrected left grayscale image and the second corrected right grayscale image, and calculate the disparity value d, in mm;
[0110]
[0111] Among them, x l 、x r are the horizontal axis coordinates of the same pixel point on the second corrected left grayscale image and the second corrected right grayscale image respectively; zc is a scale factor, which is one of the physical parameters of the camera used for shooting, and its value is the reciprocal of the pixel unit size of the camera;
[0112] 602. Calculate the height z of each pixel from the camera plane using the following formula;
[0113]
[0114] Among them, Tx is the component of the relative translation vector T in the horizontal direction, where T represents the distance between the left and right cameras, f is the focal length of the camera, and u l 、u r They represent the pixel coordinates of the principal points of the left and right cameras on the horizontal axis, and d is the disparity value in mm. It can be seen that the larger the disparity value d, the closer the pixel is to the camera, and the smaller the disparity value d, the farther the pixel is from the camera; Tx is the camera parallax, which is one of the physical parameters of the camera used for shooting. Its value is the horizontal spatial distance between the optical center of the left camera and the optical center of the right camera, that is, the component of the relative translation vector T in the horizontal axis direction.
[0115] 603. The height values of all pixels are combined into a model matrix M to restore the three-dimensional model of the road surface.
[0116] In the above step 700 of the method, the following steps are also included:
[0117] 701. Calculate the first-order difference quotient of the height value corresponding to the pixel point according to the following formula to determine the position of the stereo matching error pixel point;
[0118] k=(z i+1 -z i ) / (x i+1 -x i );
[0119] Among them, k is the first-order difference quotient of the pixel point, x i , x i+1 is the pixel horizontal coordinate of the i-th and i+1-th pixel points, z i , z i+1 is the height of the i-th and i+1-th pixel points, in mm.
[0120] 702. Define the points with first-order difference quotient greater than 1 as mismatched values. Use a 7×7 filter window to place the mismatched value in the center of the window, arrange all the grayscale values in the window from small to large, calculate the median of the grayscale values in the window, replace the mismatched value with the median, and output the height value after replacement.
[0121] In the above step 800 of the method, the following steps are also included:
[0122] 801. Perform plane fitting on the elements of the model matrix M, and calculate the parameters a1, a2, a3 of the fitting plane according to the following formula;
[0123]
[0124] Among them, x i ,y i is the pixel coordinate of the i-th pixel, z i is the height of the ith pixel, in mm, and n is the total number of pixels in the matrix.
[0125] 802. Calculate the height value of each pixel after correction using the following formula to complete the shooting angle error correction;
[0126] h i =z i -a1x i -a2y i -a3;
[0127] Among them, z i 、h i are the heights of the i-th pixel before and after shooting angle correction, respectively, in mm, and n is the total number of pixels in the matrix.
[0128] In the above step 900 of the method, the structural depth H of the asphalt pavement is calculated by using MATLAB software according to the following formula: p ;
[0129]
[0130] Among them, h max The maximum value of the pixel height, in mm, h i is the height value of the i-th pixel, in mm, m and n are the number of rows and columns of the model matrix M, where i is the number of the pixel, and its value range is [1, mn].
[0131] The present invention adopts two left and right cameras, and respectively collects the left color image and the right color image of the asphalt pavement with the left and right cameras, performs grayscale processing, distortion correction, stereo correction in sequence, restores the three-dimensional model of the pavement, eliminates the value of stereo matching error, corrects the shooting angle error of the camera, and finally calculates the structural depth of the asphalt pavement; during the detection process, the invention is less affected by the illumination and the color of the pavement itself, and can not only measure the structural depth of the asphalt pavement, but also restore the three-dimensional model of the pavement, and can more intuitively reflect the technical status information of the asphalt pavement for reference by the detection personnel; it overcomes the disadvantages of the laser structural depth meter method that requires the use of special equipment and is expensive, and can complete the detection with a pair of ordinary camera lenses; it overcomes the disadvantages of the traditional manual sand spreading method and the electric sand spreading method that the detection speed is slow and is greatly affected by human subjectivity, and has the advantages of fast and efficient, not easy to be interfered, low price and more accurate detection results.
[0132] It should be noted that the detailed explanation of the above-mentioned embodiments is only intended to explain the present invention so as to better explain the present invention. However, these descriptions cannot be interpreted as limitations on the present invention for any reason. In particular, the various features described in different embodiments may also be arbitrarily combined with each other to form other embodiments. Unless there is a clear description to the contrary, these features should be understood to be applicable to any embodiment and are not limited to the described embodiments.
Claims
1. A method for calculating the structural depth of an asphalt pavement using a three-dimensional model, characterized in that: The steps include:
100. Obtain the internal and external parameters of the left and right cameras; 200. Use left and right cameras to collect a left color image and a right color image of the asphalt road surface respectively; 300. Process the left image and the right image into a left grayscale image and a right grayscale image respectively; 400. Perform distortion correction on the left grayscale image and the right grayscale image respectively to obtain a first corrected left grayscale image and a first corrected right grayscale image; 500. According to the intrinsic parameters and extrinsic parameters of the left and right cameras, stereo correction is performed on the first corrected left grayscale image and the first corrected right grayscale image respectively to obtain a second corrected left grayscale image and a second corrected right grayscale image; 600. Perform stereo matching on the second corrected left grayscale image and the second corrected right grayscale image, identify corresponding pixel points on the second corrected left grayscale image and the second corrected right grayscale image, calculate the disparity value d, calculate the distance of each pixel point on the image from the camera plane in the camera coordinate system according to the disparity value d, generate a model matrix M containing height information of each pixel point on the image, and restore the three-dimensional model of the road surface; 700. Determine the position of the stereo matching error value by the first-order difference quotient of the height value between two adjacent pixel points in the model matrix, and correct the stereo matching error value by using the median filter window to eliminate the stereo matching error value; 800. Perform plane fitting on the model matrix M, subtract the model matrix M from the fitting plane, and correct the shooting angle error caused by the camera optical axis not being completely perpendicular to the road surface when collecting images; 900. Calculate the construction depth of asphalt pavement; The step 300 further includes the following steps:
301. The left color image and the right color image are converted into a left single-channel grayscale image and a right single-channel grayscale image respectively by calculating the three channels of red (R), green (G), and blue (B) according to the following formula; in, is the gray value of the pixel, , , They are the values of the red, green, and blue channels of the pixel respectively; 302. Perform denoising on the left single-channel grayscale image and the right single-channel grayscale image using median filtering to obtain a left grayscale image and a right grayscale image; The step 400 further includes the following steps:
401. According to the internal parameters of the camera, the distortion coefficient is determined according to the following formula: , : ;in, , is the distortion coefficient of the camera, u and v are the pixel coordinates without distortion, x and y are the continuous pixel coordinates without distortion, , is the pixel coordinate of the camera principal point, , is the pixel coordinate after distortion; 402. Using the obtained camera distortion coefficient , According to the following formula, the distortion correction is performed on the left grayscale image and the right grayscale image respectively: The step 500 further includes the following steps:
501. Determine the relative position relationship between the left and right cameras:
502. Using Rodriguez transform, the relative rotation matrix is decomposed into the composite rotation matrices of the left image and the right image respectively , ; 503. Calculate the rotation matrix of the left and right images , , the left image is rotated according to the rotation matrix Rotate the right image according to the rotation matrix Rotate the two images so that the polar lines are horizontal and the poles are at infinity, completing the stereo correction. The step 600 further includes the following steps:
601. After traversing each pixel on the image using a semi-global matching algorithm (SGBM), identify the same pixel on the second corrected left grayscale image and the second corrected right grayscale image, and calculate the disparity value d; in, , are the horizontal axis coordinates of the same pixel point on the second corrected left grayscale image and the second corrected right grayscale image respectively; zc is a scale factor, which is one of the physical parameters of the camera used for shooting, and its value is the reciprocal of the pixel unit size of the camera; 602. Calculate the height z of each pixel from the camera plane using the following formula; Among them, Tx is the component of the relative translation vector T in the horizontal direction, where T represents the distance between the left and right cameras. is the camera focal length, , They represent the pixel coordinates of the principal points of the left and right cameras on the horizontal axis, and d is the parallax value; Tx is the camera parallax, which is one of the physical parameters of the camera used for shooting. Its value is the spatial distance in the horizontal direction between the optical center of the left camera and the optical center of the right camera, that is, the component of the relative translation vector T in the horizontal axis direction; 603. The height values of all pixels are combined into a model matrix M to restore the three-dimensional model of the road surface; The step 700 includes the following steps:
701. Calculate the first-order difference quotient of the height value corresponding to the pixel point according to the following formula to determine the position of the stereo matching error pixel point; Among them, k is the first-order difference quotient of the pixel point, , is the pixel horizontal coordinate of the i-th and i+1-th pixel points, , is the height value of the i-th and i+1-th pixel points; 702. Define the points where the first-order difference quotient is greater than 1 as the value of the matching error, using filter window, put the mismatched value in the center of the window, arrange all the grayscale values in the window from small to large, calculate the median of the grayscale values in the window, replace the mismatched value with the median, and output the replaced height value.
2. The method for calculating the structural depth of asphalt pavement using a three-dimensional model according to claim 1, characterized in that: In the above step 800, the following steps are also included:
801. Perform plane fitting on the elements of the model matrix M and calculate the parameters of the fitting plane as follows: , , ; in, , is the pixel coordinate of the i-th pixel, is the height of the i-th pixel, and n is the total number of pixels in the matrix.
3. The method for calculating the structural depth of asphalt pavement using a three-dimensional model according to claim 2 is characterized in that: In the above step 800, the following steps are also included:
802. Calculate the height value of each pixel after correction using the following formula to complete the shooting angle error correction; in, , are the heights of the i-th pixel before and after shooting angle correction, respectively.
4. The method for calculating the structural depth of asphalt pavement using a three-dimensional model according to claim 1, characterized in that: In the above step 900, the structural depth of the asphalt pavement is calculated by the following formula: ; in, is the maximum value of the pixel height. is the height value of the i-th pixel, m and n are the number of rows and columns of the model matrix M, where i is the number of the pixel and its value range is [1,mn].
Citation Information
Patent Citations
An asphalt pavement structure depth detection method based on binocular vision
CN109919856A
Cited By
A pavement structure depth self-adaptive calculation method
CN122841463A