Road Engineering Construction Quality Detection Method and System Based on Machine Vision
Through machine vision technology, greyscale processing and optical flow vector analysis are used to identify the density and quality factors of asphalt particles on the road surface, solving the accuracy and efficiency of manual inspection and achieving efficient construction quality inspection.
Patent Information
- Application Number
- CN202510323991.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-19
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-03-19
AI Technical Summary
When manually testing the quality of road construction, the inspection results are not accurate enough and are inefficient.
Using a machine vision-based method, the road surface construction image is received, and the optical flow vector and asphalt particle density are obtained. Combined with the distortion factor of the optical flow vector, the quality factors in the road surface gray image are analyzed and abnormal areas are identified.
It improves the accuracy and efficiency of road engineering construction quality inspection, and can promptly detect and deal with defects in construction.
Smart Images

Figure CN119863454B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and particularly to a method and system for detecting the construction quality of road engineering based on machine vision. Background Art
[0002] Road engineering construction refers to various construction activities carried out during the road construction process in accordance with the design drawings and technical specifications, including the construction of the road base and surface. In order to ensure the bearing capacity and durability of the road, asphalt is generally laid according to the design requirements. However, when asphalt is laid, cracks may occur on the road surface due to temperature changes, resulting in an uneven road surface and affecting driving comfort and safety.
[0003] In the related art, after the road is laid, it is detected by workers using equipment such as a level.
[0004] However, manual detection makes the detection result inaccurate and also makes the detection efficiency low. Summary of the Invention
[0005] In order to solve the technical problems of inaccurate detection results and low detection efficiency caused by manual detection, the purpose of the present invention is to provide a method and system for detecting the construction quality of road engineering based on machine vision. The specific technical solutions adopted are as follows:
[0006] In the first aspect of the present disclosure, a method for detecting the construction quality of road engineering based on machine vision is provided. The method includes:
[0007] Receiving a construction image of the road surface;
[0008] Performing grayscale processing on the construction image of the road surface to obtain a grayscale image of the road surface;
[0009] Obtaining an optical flow vector corresponding to the grayscale image of the road surface;
[0010] According to the gray value change situation of the pixel points in the grayscale image of the road surface, obtaining the asphalt particle density of each pixel point position in the grayscale image of the road surface;
[0011] Among them, the method for obtaining the asphalt particle density is: obtaining the maximum gray value point corresponding to each pixel point according to the gray values of the first neighborhood pixel points in the first preset neighborhood of each pixel point; obtaining the first distance between each pixel point and the central pixel point; obtaining the asphalt particle density of each pixel point position according to the maximum gray value point corresponding to each pixel point and the first distance;
[0012] According to the optical flow vector and the grayscale image of the road surface, obtaining the distortion factor of each optical flow vector;
[0013] Obtain the quality factor of each pixel point in the road surface grayscale image according to the asphalt particle density at the location of each pixel point and the distortion factor of each optical flow vector;
[0014] Obtain the abnormal area in the road surface construction image according to the quality factor of each pixel point.
[0015] In one implementable manner, the obtaining the abnormal area in the road surface construction image according to the quality factor of each pixel point includes:
[0016] Obtain the abnormal pixel points whose quality factors are greater than the preset quality factor among the quality factors of each pixel point;
[0017] Obtain the target abnormal pixel points whose density of the abnormal pixel points is greater than the preset density;
[0018] Determine the area composed of the target abnormal pixel points as the abnormal area.
[0019] In one implementable manner, the obtaining the asphalt particle density at the location of each pixel point according to the maximum gray value point corresponding to each pixel point and the first distance includes:
[0020] Obtain the maximum gray value point closest to each maximum gray value point corresponding to each pixel point as the target maximum gray value point;
[0021] Obtain the number of the maximum gray value points corresponding to each pixel point;
[0022] Obtain the asphalt particle density at the location of each pixel point according to the maximum gray value points corresponding to each pixel point, each target maximum gray value point, the number, and the first distance.
[0023] In one implementable manner, the obtaining the asphalt particle density at the location of each pixel point according to the maximum gray value points corresponding to each pixel point, each target maximum gray value point, the number, and the first distance includes:
[0024] Obtain the first gray value of each maximum gray value point corresponding to each pixel point;
[0025] Obtain the second gray value of the target maximum gray value point closest to each maximum gray value point corresponding to each pixel point;
[0026] Obtain the average gray value between each maximum gray value point corresponding to each pixel point and the corresponding target maximum gray value point;
[0027] Obtain a second distance between each of the maximum gray value points corresponding to each of the pixel points and the corresponding target maximum gray value point;
[0028] Obtain the asphalt particle density of the part where each pixel point is located according to the first gray value, the second gray value, the gray value average, the second distance, the quantity, and the first distance corresponding to each pixel point.
[0029] In one implementable manner, the obtaining the average gray value between each of the maximum gray value points corresponding to each pixel point and the corresponding target maximum gray value point includes:
[0030] Obtain all intermediate gray value points between each of the maximum gray value points corresponding to each pixel point and the corresponding target maximum gray value point;
[0031] Obtain the gray values of each of the intermediate gray value points corresponding to each pixel point;
[0032] Obtain the quantity of all the intermediate gray value points corresponding to each pixel point;
[0033] Obtain the gray value average according to the sum of the gray values of each of the intermediate gray value points corresponding to each pixel point and the quantity.
[0034] In one implementable manner, the obtaining the distortion factor of each optical flow vector according to the optical flow vector and the road surface gray image includes:
[0035] Obtain the horizontal component of each optical flow vector;
[0036] Obtain the vertical component of each optical flow vector;
[0037] Obtain a third distance between the origin of each optical flow vector and the midline of the road surface gray image;
[0038] Obtain a fourth distance between the origin of each optical flow vector and the bottom edge of the road surface gray image;
[0039] Obtain the distortion factor of each optical flow vector according to the vertical component, the horizontal component, the third distance, and the fourth distance of each optical flow vector.
[0040] In one implementable manner, the obtaining the quality factor of each pixel point in the road surface gray image according to the asphalt particle density of the part where each pixel point is located and the distortion factor of each optical flow vector includes:
[0041] Obtain each second neighborhood pixel point in the second preset neighborhood corresponding to each pixel point;
[0042] Obtain the distortion factor of the target light loss amount closest to each of the pixel points;
[0043] Obtain the fifth distance between each of the pixel points and the corresponding closest light loss amount;
[0044] Obtain the quality factor of each of the pixel points in the road surface grayscale image according to the asphalt particle density of each of the pixel points, the asphalt particle density of the second neighborhood pixel points, the distortion factor of the target light loss amount, and the fifth distance.
[0045] In an implementable manner, the obtaining the quality factor of each of the pixel points in the road surface grayscale image according to the asphalt particle density of each of the pixel points, the asphalt particle density of the second neighborhood pixel points, the distortion factor of the target light loss amount, and the fifth distance includes:
[0046] Obtain the variance of the asphalt particle density between the asphalt particle density of each of the pixel points and the asphalt particle density of each of the second neighborhood pixel points in the corresponding second preset neighborhood;
[0047] Obtain the quality factor of each of the pixel points in the road surface grayscale image according to the asphalt particle density of each of the pixel points, the variance of the asphalt particle density, the distortion factor of the target light loss amount, and the fifth distance.
[0048] In a second aspect of the present disclosure, there is provided a road engineering construction quality detection system based on machine vision, the system includes: a camera and a construction quality detection device;
[0049] The camera is configured to capture an image of the road surface construction and send the image of the road surface construction to the road engineering construction quality detection device based on machine vision;
[0050] The construction quality detection device is used to receive the construction image of the road surface; perform grayscale processing on the construction image of the road surface to obtain a grayscale image of the road surface; obtain the optical flow vector corresponding to the grayscale image of the road surface; obtain the asphalt particle density of each pixel point in the grayscale image of the road surface according to the gray value change of the pixel points in the grayscale image of the road surface. The method for obtaining the asphalt particle density is as follows: obtain the maximum gray value point corresponding to each pixel point according to the gray values of the first neighborhood pixel points in the first preset neighborhood of each pixel point; obtain the first distance between each pixel point and the central pixel point; obtain the asphalt particle density of each pixel point according to the maximum gray value point corresponding to each pixel point and the first distance; obtain the distortion factor of each optical flow vector according to the optical flow vector and the grayscale image of the road surface; obtain the quality factor of each pixel point in the grayscale image of the road surface according to the asphalt particle density of each pixel point and the distortion factor of each optical flow vector; obtain the abnormal area in the construction image of the road surface according to the quality factor of each pixel point.
[0051] The present invention has the following beneficial effects:
[0052] The present disclosure provides a method and system for detecting the construction quality of road engineering based on machine vision. The method includes: receiving a construction image of the road surface; performing grayscale processing on the construction image of the road surface to obtain a grayscale image of the road surface; obtaining the optical flow vector corresponding to the grayscale image of the road surface; obtaining the asphalt particle density of each pixel point in the grayscale image of the road surface; obtaining the distortion factor of each optical flow vector according to the optical flow vector and the grayscale image of the road surface; obtaining the quality factor of each pixel point in the grayscale image of the road surface according to the asphalt particle density of each pixel point and the distortion factor of each optical flow vector; obtaining the abnormal area in the construction image of the road surface according to the quality factor of each pixel point. Among them, the present disclosure analyzes the asphalt particle density of each part of the road through the gray scale situation, analyzes the distortion factor of the optical flow vector, and then combines the asphalt particle density and the distortion factor for quality detection, which can improve the detection accuracy and detection efficiency. Description of the Drawings
[0053] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0054] Figure 1Flow chart of a method for detecting the construction quality of road engineering based on machine vision provided by an embodiment of the present invention;
[0055] Figure 2 Schematic diagram of the optical flow vector provided by an embodiment of the present invention;
[0056] Figure 3 Provided by an embodiment of the present invention Figure 1 Detailed flow schematic diagram of step S104 in;
[0057] Figure 4 Provided by an embodiment of the present invention Figure 3 Detailed flow schematic diagram of step S1043 in;
[0058] Figure 5 Provided by an embodiment of the present invention Figure 4 Detailed flow schematic diagram of step S10433 in;
[0059] Figure 6 Provided by an embodiment of the present invention Figure 5 Detailed flow schematic diagram of step S104335 in;
[0060] Figure 7 Provided by an embodiment of the present invention Figure 1 Detailed flow schematic diagram of step S105 in;
[0061] Figure 8 Provided by an embodiment of the present invention Figure 1 Detailed flow schematic diagram of step S106 in;
[0062] Figure 9 Provided by an embodiment of the present invention Figure 8 Detailed flow schematic diagram of step S1064 in;
[0063] Figure 10 Provided by an embodiment of the present invention Figure 1 Detailed flow schematic diagram of step S107 in;
[0064] Figure 11 Schematic diagram of a machine vision-based road engineering construction quality detection system provided by an embodiment of the present invention. Detailed implementation manners
[0065] To further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following specifically describes, with reference to the accompanying drawings and preferred embodiments, the method and system for detecting the construction quality of road engineering based on machine vision proposed according to the present invention, including its specific implementation manner, structure, features, and effects. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0066] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs.
[0067] The following specifically describes the specific solution of the method and system for detecting the construction quality of road engineering based on machine vision provided by the present invention with reference to the accompanying drawings.
[0068] Please refer to Figure 1 , which shows a flowchart of a method for detecting the construction quality of road engineering based on machine vision provided by an embodiment of the present invention. As Figure 1 shown, the method includes the following steps S101 - S107:
[0069] S101. Receive the construction image of the road surface.
[0070] During road engineering construction, asphalt mixture is prepared according to design requirements to ensure that the material quality meets the standards. Then, a special paver is used to evenly lay the prepared asphalt mixture on the base course, and a roller is used to roll the laid asphalt to ensure its compaction reaches the design thickness.
[0071] During the cooling process of the asphalt, it is affected by the air temperature, resulting in a relatively fast cooling rate of the asphalt, which causes cracks to appear on the surface during rolling, making the laid road uneven.
[0072] To prevent this phenomenon from occurring, it is necessary to detect the defects of the laid road so that relevant remedial measures can be taken in a timely manner when the above situation is detected.
[0073] In the present disclosure, to detect the defects of the rolled road, a camera is installed at the rear side in the forward direction of the roller. The roller is started to move forward to roll the road, and at the same time, the camera is used to take pictures of the rolled road to obtain several construction images of the road surface.
[0074] The above camera can use an industrial high - resolution camera.
[0075] S102. Perform grayscale processing on the construction image of the road surface to obtain a grayscale image of the road surface.
[0076] Since the defect detection of the road needs to start from the texture of the road, the obtained construction image of the road surface is grayscale processed to obtain the grayscale image of the road surface.
[0077] S103. Obtain the optical flow vector corresponding to the grayscale image of the road surface.
[0078] For the grayscale image of the road surface obtained by the above operations, due to the perspective problem, the displacement of the pixel points at the same part in the grayscale image of the road surface is the same in adjacent frame images. However, since the crack will cause the deformation of the road, the displacement of the crack part in the grayscale image of the road surface will change.
[0079] Therefore, for the obtained grayscale image of the road surface, the optical flow method is used to obtain the optical flow vector between adjacent frames, as Figure 2 shown.
[0080] Among them, the optical flow method infers the motion direction and speed by analyzing the pixel intensity changes between consecutive frames. The optical flow vector of adjacent frame images can be obtained through the optical flow method, and each pixel point corresponds to a motion vector, which is used to represent the moving direction and speed of the object in the image.
[0081] For the optical flow vector between adjacent grayscale images of the road surface obtained by the above operations, since the crack part is caused by uneven cooling and will occur after being rolled, the crack part is uneven. In the optical flow detection, the optical flow vector of the crack part will be different from that of the normal part around it due to the unevenness. Therefore, the defect area on the road can be screened according to the abnormal change of the optical flow vector of the adjacent grayscale images of the road.
[0082] However, since the road after being rolled by the roller is not completely flat, it is necessary to screen out the defects in combination with the flatness of each part of the road.
[0083] For the obtained road surface, since the crack on the road surface is caused by the uneven cooling shrinkage of different parts of the asphalt pavement due to the influence of temperature after paving, resulting in uneven density of asphalt particles on the road surface, and cracks will occur due to uneven force during subsequent road rolling, it is necessary to obtain the gray level of each part of the road in the grayscale image of the road surface, so as to obtain the density of asphalt particles at each part in the grayscale image of the road surface.
[0084] S104. Obtain the density of asphalt particles at the position of each pixel point in the grayscale image of the road surface.
[0085] In one embodiment, as Figure 3 shown, the above step S104 includes the following sub-steps S1041 - 1043:
[0086] Under normal circumstances, the asphalt particles on the surface of the asphalt pavement should have a relatively uniform density. However, due to uneven cooling shrinkage, the asphalt particles on the surface become uneven. Since there are small gaps between the asphalt particles, the gray-scale change in the gray-scale image of the road surface is more obvious in the part where the asphalt particles are denser, and vice versa in the looser part. Therefore, it is necessary to analyze the asphalt particle density of each part according to the gray-scale change of the pixel points in the gray-scale image of the road surface, that is, the asphalt particle density of the part where each pixel point in the gray-scale image of the road surface is located can be obtained according to the gray-scale change of the pixel points in the gray-scale image of the road surface.
[0087] S1041. Obtain the maximum gray-scale value point corresponding to each pixel point according to the gray-scale values of each first neighborhood pixel point in the first preset neighborhood of each pixel point.
[0088] Among them, the first neighborhood pixel point is the pixel point in the first preset neighborhood. The first preset neighborhood can be a 5×5 neighborhood around the pixel point. That is, for any first neighborhood pixel point within the 5×5 neighborhood of the pixel point, if the gray-scale value of a certain first neighborhood pixel point is the largest among the gray-scale values of its eight neighborhoods, then this first neighborhood pixel point is called the maximum gray-scale value point corresponding to the pixel point.
[0089] S1042. Obtain the first distance between each pixel point and the central pixel point, where the central pixel point is the pixel point at the center of the bottom of the gray-scale image of the road surface.
[0090] Due to the perspective difference, objects far from the camera will become smaller in the gray-scale image of the road surface. Therefore, it is also necessary to eliminate the difference caused by the perspective difference. In the present disclosure, the above difference is eliminated by the distance between the pixel point and the central pixel point.
[0091] S1043. Obtain the asphalt particle density of the part where each pixel point is located according to the maximum gray-scale value point corresponding to each pixel point and the first distance.
[0092] In one embodiment, as Figure 4 shown, the above step S1043 includes the following sub-steps S10431-10433:
[0093] S10431. Obtain each target maximum gray-scale value point that is closest to each maximum gray-scale value point corresponding to each pixel point.
[0094] After obtaining the maximum gray-scale value points corresponding to each pixel point, it is also possible to obtain, among the maximum gray-scale value points corresponding to all pixel points, the maximum gray-scale value point that is closest to the maximum gray-scale value point corresponding to the pixel point as the target maximum gray-scale value point.
[0095] Taking pixel point 1 as an example for illustration, after obtaining the maximum gray value points corresponding to all pixel points, among the maximum gray value points corresponding to all pixel points, the maximum gray value points that are closest to each maximum gray value point of pixel point 1 are obtained. These closest maximum value points are called target maximum gray value points. At this time, it is necessary to find the target maximum gray value points corresponding to each maximum gray value point in pixel point 1.
[0096] S10432. Obtain the number of maximum gray value points corresponding to each pixel point.
[0097] S10433. Obtain the asphalt particle density of each part where the pixel points are located according to the maximum gray value points corresponding to each pixel point, each target maximum gray value point, the quantity, and the first distance.
[0098] In one embodiment, as Figure 5 shown, the above step S10433 includes the following sub-steps S104331 - 104335:
[0099] S104331. Obtain the first gray value of each maximum gray value point corresponding to each pixel point.
[0100] S104332. Obtain the second gray value of the target maximum gray value point that is closest to each maximum gray value point corresponding to each pixel point.
[0101] S104333. Obtain the average gray value between each maximum gray value point corresponding to each pixel point and the corresponding target maximum gray value point.
[0102] In the present disclosure, it is necessary to analyze the asphalt particle density of each part based on the gray value change situation. Therefore, after obtaining each maximum gray value point corresponding to each pixel point, the first gray value of each maximum gray value point corresponding to each pixel point can also be obtained. After obtaining the target maximum gray value point that is closest to each maximum gray value point corresponding to each pixel point, the second gray value of each target maximum gray value point also needs to be obtained, and the average gray value between each maximum gray value point corresponding to each pixel point and the corresponding target maximum gray value point also needs to be obtained. Specifically, in one embodiment, as Figure 6 shown, the above step S104333 includes the following sub-steps A1 - A4:
[0103] A1. Obtain all intermediate gray value points between each maximum gray value point corresponding to each pixel point and the corresponding target maximum gray value point.
[0104] After obtaining the maximum gray value points corresponding to each pixel point and the target maximum gray value points corresponding to each maximum gray value point, the pixel points on the line connecting the maximum gray value point and its corresponding target maximum gray value point can be obtained, and these pixel points are used as intermediate gray value points.
[0105] A2. Obtain the gray values of the intermediate gray value points corresponding to each pixel point.
[0106] A3. Obtain the number of all intermediate gray value points corresponding to each pixel point.
[0107] A4. Obtain the average gray value according to the sum of the gray values and the number of the intermediate gray value points corresponding to each pixel point.
[0108] S104334. Obtain the second distance between each maximum gray value point corresponding to each pixel point and the corresponding target maximum gray value point.
[0109] S104335. Obtain the asphalt particle density of the part where each pixel point is located according to the first gray value, the second gray value, the average gray value, the second distance, the number, and the first distance corresponding to each pixel point.
[0110] Specifically, step S104 can be implemented by the following formula:
[0111] ;
[0112] Among them, in the formula, represents the th pixel point in the road surface gray image, represents the th maximum gray value point in the first preset neighborhood of the th pixel point in the road surface gray image, represents the number of maximum gray value points in the first preset neighborhood of the th pixel point in the road surface gray image, represents the target maximum gray value point closest to the maximum gray value point of the th pixel point in the road surface gray image, represents the asphalt particle density of the part where the th pixel point in the road surface gray image is located, represents the first distance between the th pixel point in the road surface gray image and the central pixel point, represents the th pixel point in the road surface gray image, th first gray value of the maximum gray value point, represents the The second gray value of the th maximum gray value point of a pixel point from the nearest target maximum gray value point, represents the th pixel point in the road surface gray image th maximum gray value point and the average gray value of the intermediate gray value points between the th maximum gray value point and the nearest target maximum gray value point to the th maximum gray value point; represents the th maximum gray value point of the th pixel point in the road surface gray image and the second distance between the th maximum gray value point and the nearest target maximum gray value point to the
[0113] In the above formula, the larger the value of, the smaller the gray value between the maximum gray value points in the first preset neighborhood of the pixel point, so it indicates that the gray value change of the pixel point is faster; for the th pixel point in the road surface gray image th maximum gray value point and the second distance between the th maximum gray value point and the nearest target maximum gray value point to the th maximum gray value point, the smaller its value indicates that the gray value change of the first preset neighborhood of the pixel point is faster, so it indicates that the asphalt particle density at the position of the pixel point is greater, and due to the problem of perspective distortion of the camera, the part farther from the camera will become smaller in the image, so the above formula also weights according to the first distance
[0114] S105. Obtain the distortion factor of each optical flow vector according to the optical flow vector and the road surface gray image.
[0115] For the asphalt particle density at the position of each pixel point in the currently obtained road surface gray image, due to the non-uniformity of asphalt, cracks may occur due to stress during the rolling process, and due to the non-uniformity of asphalt, it may cause unevenness of the road surface due to uneven density in different parts during rolling, so the uneven parts are more likely to generate cracks in the subsequent process. Since the displacement of the same part in the image between two adjacent frames of a flat road is the same, it is necessary to judge the flatness of each part of the road according to the optical flow distribution in the image.
[0116] To obtain the flatness of each part of the road and finally obtain the crack generation conditions of each part of the road. For the optical flow vectors in the adjacent frame images obtained by the above operations, the distance between the origin of each optical flow vector and the bottom edge of the image can be obtained, and for each optical flow vector, its vertical component can be obtained, and its horizontal component and the distance between its origin and the middle line of the image can be obtained. Then, based on these values, the distortion factor of each optical flow vector in the optical flow field can be obtained. In one embodiment, as Figure 7 shown, the above step S105 includes the following sub-steps S1051-S1055:
[0117] S1051. Obtain the horizontal component of each optical flow vector.
[0118] S1052. Obtain the vertical component of each optical flow vector.
[0119] S1053. Obtain the third distance between the origin of each optical flow vector and the middle line of the grayscale image of the road surface.
[0120] S1054. Obtain the fourth distance between the origin of each optical flow vector and the bottom edge of the grayscale image of the road surface.
[0121] S1055. Obtain the distortion factor of each optical flow vector according to the vertical component, horizontal component, third distance and fourth distance of each optical flow vector.
[0122] Specifically, the distortion factor of each optical flow vector is obtained by the following formula:
[0123] ;
[0124] where, represents the th optical flow vector in the optical flow field, represents the distortion factor of the th optical flow vector in the optical flow field, represents the horizontal component of the th optical flow vector in the optical flow field represents the vertical component of the th optical flow vector in the optical flow field, represents the third distance between the origin of the th optical flow vector in the optical flow field and the middle line of the grayscale image of the road surface, represents the fourth distance between the origin of the th optical flow vector in the optical flow field and the bottom edge of the grayscale image of the road surface, represents the hyperbolic function.
[0125] For the absolute value of the difference between the ratio of the magnitude of the horizontal component of any optical flow vector in the optical flow field to the third distance between its origin and the middle line and 1 , the larger its value is, the greater the difference between the upper and lower parts of the ratio formula, indicating that the modulus of the horizontal component of the light loss amount is more negatively correlated with the third distance between its origin and the center line. However, due to the problem of the photographing angle, the horizontal component of the vector farther from the center line should be larger, so its distortion factor is larger; and for the absolute value of the difference between the modulus of the vertical component of any optical flow vector in the optical flow field and the ratio of the fourth distance between its origin and the bottom edge of the image and 1 , the smaller its value is, the closer the upper and lower values of the ratio formula are, indicating that the modulus of the vertical component of the light loss amount in the optical flow field is positively correlated with the fourth distance between its origin and the bottom edge of the image. However, due to the camera angle, the vertical component of the optical flow vector in the part of the image farther from the camera is smaller, so its distortion factor is larger.
[0126] S106. Obtain the quality factor of each pixel point in the road surface grayscale image according to the asphalt particle density of the part where each pixel point is located and the distortion factor of each optical flow vector.
[0127] Since the asphalt is evenly laid under normal conditions, the particle density of the asphalt is uniform and flat. Therefore, by analyzing the particle density of the part where each pixel point in the road surface grayscale image is located and the optical flow distortion factor, the construction quality of each part of the road surface grayscale image can be obtained. In one embodiment, as Figure 8 shown, the above step S106 includes the following sub-steps S1061-S1064:
[0128] S1061. Obtain each second neighborhood pixel point in the second preset neighborhood corresponding to each pixel point.
[0129] Exemplarily, the second preset neighborhood can be an eight-neighborhood. In this step, each second neighborhood pixel point in the eight-neighborhood corresponding to each pixel point is obtained, where the second neighborhood pixel point is a pixel point in the eight-neighborhood.
[0130] S1062. Obtain the distortion factor of the target light loss amount closest to each pixel point.
[0131] S1063. Obtain the fifth distance between each pixel point and the closest light loss amount corresponding to it.
[0132] S1064. Obtain the quality factor of each pixel point in the road surface grayscale image according to the asphalt particle density of each pixel point, the asphalt particle density of the second neighborhood pixel, the distortion factor of the target light loss amount, and the fifth distance.
[0133] In one embodiment, as Figure 9 shown, the above step S1064 includes the following sub-steps S10641-S10642:
[0134] S10641. Obtain the variance of the asphalt particle density between each pixel point and the asphalt particle densities of each second neighborhood pixel point in the corresponding second preset neighborhood.
[0135] S10642. Obtain the quality factor of each pixel point in the road surface grayscale image according to the asphalt particle density, the variance of the asphalt particle density, the distortion factor of the target light loss, and the fifth distance of each pixel point.
[0136] For each pixel point in the image, obtain the variance of the asphalt particle density with each pixel point in its eight-neighborhood, and obtain the origin of the light loss closest to the pixel point, so as to obtain the quality factor of each pixel point in the road surface grayscale image. Specifically, the quality factor of each pixel point in the road surface grayscale image is obtained through the following formula:
[0137] ;
[0138] In the formula, represents the quality factor of the th pixel point in the road surface grayscale image, represents the variance between the asphalt particle density of the th pixel point in the road surface grayscale image and the asphalt particle densities of the second neighborhood pixel points in the second preset neighborhood corresponding to the th pixel point, represents the distortion factor of the light loss closest to the th pixel point in the road surface grayscale image, represents the fifth distance between the th pixel point in the road surface grayscale image and the light loss closest to the th pixel point, is the exponential function with the natural constant e as the base.
[0139] For the variance between the asphalt particle density of the th pixel point in the road surface grayscale image and the asphalt particle densities of the second neighborhood pixel points in the second preset neighborhood corresponding to the th pixel point, the larger its value, the greater the difference between the asphalt particle density of the pixel point and the asphalt particle densities of its surrounding pixel points, indicating lower quality.
[0140] S107. Obtain the abnormal area in the road surface construction image according to the quality factor of each pixel point.
[0141] In one embodiment, as Figure 10 shown, step S107 includes the following sub-steps S1071 - S1073:
[0142] S1071. Obtain abnormal pixels whose quality factors of each pixel are greater than the preset quality factor.
[0143] S1072. Obtain target abnormal pixels whose density of the abnormal pixels is greater than the preset density.
[0144] S1073. Determine the area composed of the target abnormal pixels as the abnormal area.
[0145] For the quality factors of each pixel in the grayscale image of the road surface obtained by the above operations, compare them with the preset quality factor. Among them, the pixels smaller than the preset quality factor are abnormal pixels, and mark them in the road surface construction image. If the density of the abnormal pixels is higher than the preset density, determine these abnormal pixels as target abnormal pixels. The area composed of these target abnormal pixels is the abnormal area, and engineers need to detect the abnormal area, formulate a practical rectification plan, clarify the responsible person and the rectification time, and carry out rectification according to the plan to ensure that the construction process meets the design requirements and relevant standards.
[0146] Taking the preset quality factor as 0.6 and the preset density as 0.5 as an example for illustration:
[0147] For the quality factors of each pixel in the grayscale image of the road surface obtained by the above operations, compare them with the preset quality factor for comparison. Among them, for the pixels are abnormal pixels, and mark them in the road surface construction image. When the density of the abnormal pixels is higher than 0.5, it is an abnormal part. Engineers need to detect the abnormal part, formulate a practical rectification plan, clarify the responsible person and the rectification time, and carry out rectification according to the plan to ensure that the construction process meets the design requirements and relevant standards.
[0148] In order to detect the construction quality of the road project, after collecting the road image after construction through machine vision and conducting quality detection on its surface, due to the relatively high density of asphalt particles on the road surface after construction, and because the unevenness of the road surface after construction is relatively small and not obvious in the image, it affects the accuracy of road quality detection.
[0149] In order to detect the construction quality of road engineering, the present disclosure acquires the construction image of the road surface after construction by installing an industrial high-resolution camera behind the roller and performs grayscale processing to obtain the grayscale image of the road surface, obtains the optical flow loss of the grayscale image of the road surface by the optical flow method, and obtains the asphalt particle density of each pixel point in the grayscale image of the road surface according to the change fluctuation of the grayscale values between the pixel points in the grayscale image of the road surface. By combining the distortion factors of the obtained optical flow vectors, the quality factor of each pixel point is finally obtained. Then, based on the quality factor, the abnormal area in the construction image of the road surface is determined. Among them, the asphalt particle density is obtained by analyzing the grayscale situation in the image and combining the camera lens distortion, and the distortion situation of the optical flow vector is obtained according to the optical flow vectors of adjacent frames. Finally, quality detection is performed, so that the unobvious abnormalities in the image can be detected, and the accuracy and detection efficiency of the detection results are improved.
[0150] As Figure 11 shown, the present disclosure also provides a road engineering construction quality detection system based on machine vision. The system includes: a camera 11 and a construction quality detection device 12;
[0151] The camera 11 is used to capture the construction image of the road surface and send the construction image of the road surface to the road engineering construction quality detection device based on machine vision;
[0152] The construction quality detection device 12 is used to receive the construction image of the road surface; perform grayscale processing on the construction image of the road surface to obtain the grayscale image of the road surface; obtain the optical flow vector corresponding to the grayscale image of the road surface; obtain the asphalt particle density of each pixel point in the grayscale image of the road surface according to the grayscale change of the pixel points in the grayscale image of the road surface. Among them, the method for obtaining the asphalt particle density is: obtaining the maximum grayscale value point corresponding to each pixel point according to the grayscale values of each first neighborhood pixel point in the first preset neighborhood of each pixel point; obtaining the first distance between each pixel point and the central pixel point; obtaining the asphalt particle density of each pixel point according to the maximum grayscale value point corresponding to each pixel point and the first distance; obtaining the distortion factor of each optical flow vector according to the optical flow vector and the grayscale image of the road surface; obtaining the quality factor of each pixel point in the grayscale image of the road surface according to the asphalt particle density of each pixel point and the distortion factor of each optical flow vector; obtaining the abnormal area in the construction image of the road surface according to the quality factor of each pixel point.
[0153] In one implementable manner, in terms of obtaining the abnormal area in the construction image of the road surface according to the quality factor of each pixel point, the construction quality detection device 12 is specifically used for:
[0154] Obtain abnormal pixel points among the quality factors of each of the pixel points that are greater than a preset quality factor;
[0155] Obtain target abnormal pixel points whose density of the abnormal pixel points is greater than a preset density;
[0156] Determine the area composed of the target abnormal pixel points as the abnormal area.
[0157] In one implementable manner, in terms of obtaining the asphalt particle density at the location of each pixel point in the grayscale image of the road surface, the construction quality detection device 12 is specifically configured to:
[0158] Obtain the maximum gray value point corresponding to each of the pixel points according to the gray values of each first neighborhood pixel point in the first preset neighborhood of each of the pixel points;
[0159] Obtain the first distance between each of the pixel points and the central pixel point, where the central pixel point is the pixel point at the center of the lowermost part of the grayscale image of the road surface;
[0160] Obtain the asphalt particle density at the location of each of the pixel points according to the maximum gray value point corresponding to each of the pixel points and the first distance.
[0161] In one implementable manner, in terms of obtaining the asphalt particle density at the location of each of the pixel points according to the maximum gray value point corresponding to each of the pixel points and the first distance, the construction quality detection device 12 is specifically configured to:
[0162] Obtain each target maximum gray value point that is closest to each of the maximum gray value points corresponding to each of the pixel points;
[0163] Obtain the number of the maximum gray value points corresponding to each of the pixel points;
[0164] Obtain the asphalt particle density at the location of each of the pixel points according to the maximum gray value point corresponding to each of the pixel points, each of the target maximum gray value points, the number, and the first distance.
[0165] In one implementable manner, in terms of obtaining the asphalt particle density at the location of each of the pixel points according to the maximum gray value point corresponding to each of the pixel points, each of the target maximum gray value points, the number, and the first distance, the construction quality detection device 12 is specifically configured to:
[0166] Obtain the first gray value of each of the maximum gray value points corresponding to each of the pixel points;
[0167] Obtain the second gray value of the target maximum gray value point that is closest to each of the maximum gray value points corresponding to each of the pixel points;
[0168] Obtain the average gray value between each of the maximum gray value points corresponding to each of the pixel points and the corresponding target maximum gray value point;
[0169] Obtain the second distance between each of the maximum gray value points corresponding to each of the pixel points and the corresponding target maximum gray value point;
[0170] Obtain the asphalt particle density of the part where each pixel point is located according to the first gray value, the second gray value, the average gray value, the second distance, the quantity, and the first distance corresponding to each pixel point.
[0171] In one implementable manner, in terms of obtaining the average gray value between each of the maximum gray value points corresponding to each of the pixel points and the corresponding target maximum gray value point, the construction quality detection device 12 is specifically configured to:
[0172] Obtain all intermediate gray value points between each of the maximum gray value points corresponding to each of the pixel points and the corresponding target maximum gray value point;
[0173] Obtain the gray value of each of the intermediate gray value points corresponding to each of the pixel points;
[0174] Obtain the quantity of all the intermediate gray value points corresponding to each of the pixel points;
[0175] Obtain the average gray value according to the sum of the gray values of each of the intermediate gray value points corresponding to each of the pixel points and the quantity.
[0176] In one implementable manner, in terms of obtaining the distortion factor of each of the optical flow vectors according to the optical flow vectors and the road surface gray image, the construction quality detection device 12 is specifically configured to:
[0177] Obtain the horizontal component of each optical flow vector;
[0178] Obtain the vertical component of each of the optical flow vectors;
[0179] Obtain the third distance between the origin of each of the optical flow vectors and the midline of the road surface gray image;
[0180] Obtain the fourth distance between the origin of each of the optical flow vectors and the bottom edge of the road surface gray image;
[0181] Obtain the distortion factor of each of the optical flow vectors based on the vertical component, the horizontal component, the third distance, and the fourth distance of each of the optical flow vectors.
[0182] In an implementable manner, in terms of obtaining the quality factor of each pixel point in the road surface grayscale image according to the asphalt particle density of the part where each pixel point is located and the distortion factor of each optical flow vector, the construction quality detection device 12 is specifically configured to:
[0183] Obtain each second neighborhood pixel point in the second preset neighborhood corresponding to each pixel point;
[0184] Obtain the distortion factor of the target optical flow loss closest to each pixel point;
[0185] Obtain the fifth distance between each pixel point and the closest optical flow loss corresponding thereto;
[0186] Obtain the quality factor of each pixel point in the road surface grayscale image according to the asphalt particle density of each pixel point, the asphalt particle density of the second neighborhood pixel point, the distortion factor of the target optical flow loss, and the fifth distance.
[0187] In an implementable manner, in terms of obtaining the quality factor of each pixel point in the road surface grayscale image according to the asphalt particle density of each pixel point, the asphalt particle density of the second neighborhood pixel point, the distortion factor of the target optical flow loss, and the fifth distance, the construction quality detection device 12 is specifically configured to:
[0188] Obtain the asphalt particle density variance between the asphalt particle density of each pixel point and the asphalt particle density of each second neighborhood pixel point in the corresponding second preset neighborhood;
[0189] Obtain the quality factor of each pixel point in the road surface grayscale image according to the asphalt particle density of each pixel point, the asphalt particle density variance, the distortion factor of the target optical flow loss, and the fifth distance.
[0190] It should be noted that: the above sequence of the embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0191] Each embodiment in this specification is described in a progressive manner. The same or similar parts between each embodiment can be referred to each other, and the key points of each embodiment are the differences from other embodiments.
Claims
1. A road engineering construction quality detection method based on machine vision, characterized in that: The method comprises: receiving a road surface construction image; grayscale the road surface construction image to obtain a road surface grayscale image; Obtaining an optical flow vector corresponding to the road surface grayscale image; According to the grayscale changes of the pixels in the road surface grayscale image, the density of asphalt particles at the location of each pixel in the road surface grayscale image is obtained; The method for obtaining the density of asphalt particles is as follows: according to the grayscale value of each first neighborhood pixel point in the first preset neighborhood of each pixel point, obtain the maximum grayscale value point corresponding to each pixel point; obtain the first distance between each pixel point and the central pixel point; according to the maximum grayscale value point corresponding to each pixel point and the first distance, obtain the density of asphalt particles at the location of each pixel point; According to the optical flow vectors and the road surface grayscale image, obtaining a distortion factor of each of the optical flow vectors; Obtaining a quality factor of each pixel point in the road surface grayscale image according to the density of asphalt particles at the location of each pixel point and the distortion factor of each optical flow vector; The abnormal area in the road surface construction image is obtained according to the quality factor of each pixel point.
2. The road engineering construction quality detection method based on machine vision according to claim 1 is characterized in that: The obtaining of the abnormal area in the road surface construction image according to the quality factor of each pixel point includes: Obtaining abnormal pixel points whose quality factors are greater than a preset quality factor among the pixel points; Acquire target abnormal pixel points whose density of the abnormal pixel points is greater than a preset density; Determine the area composed of the target abnormal pixel points as the abnormal area.
3. The road engineering construction quality detection method based on machine vision according to claim 1 is characterized in that: The step of obtaining the density of asphalt particles at the location of each pixel point according to the maximum gray value point corresponding to each pixel point and the first distance includes: Acquire the maximum gray value point closest to each of the maximum gray value points corresponding to each of the pixel points as the target maximum gray value point; Obtaining the number of the maximum gray value points corresponding to each of the pixel points; The density of asphalt particles at the location of each pixel point is obtained according to the maximum gray value point corresponding to each pixel point, each target maximum gray value point, the number and the first distance.
4. The road engineering construction quality detection method based on machine vision according to claim 3 is characterized in that: The step of obtaining the density of asphalt particles at the location of each pixel point according to the maximum gray value point corresponding to each pixel point, each target maximum gray value point, the number and the first distance includes: Obtaining the first grayscale value of each of the maximum grayscale value points corresponding to each of the pixel points; Acquire the second gray value of the target maximum gray value point that is closest to each of the maximum gray value points corresponding to each of the pixel points; Obtaining the grayscale value mean between each of the maximum grayscale value points corresponding to each of the pixel points and the corresponding target maximum grayscale value point; Obtaining a second distance between each of the maximum gray value points corresponding to each of the pixel points and the corresponding target maximum gray value point; The density of asphalt particles at the location of each pixel point is obtained according to the first grayscale value, the second grayscale value, the grayscale value average, the second distance, the number and the first distance corresponding to each pixel point.
5. The method for detecting road engineering construction quality based on machine vision according to claim 4 is characterized in that: The step of obtaining the grayscale value mean between each of the maximum grayscale value points corresponding to each of the pixel points and the corresponding target maximum grayscale value point comprises: Obtain all intermediate gray value points between each maximum gray value point corresponding to each pixel point and the corresponding target maximum gray value point; Obtaining the grayscale value of each of the intermediate grayscale value points corresponding to each of the pixel points; Obtain the number of all the intermediate gray value points corresponding to each of the pixel points; The gray value mean is obtained according to the sum of the gray values of each of the intermediate gray value points corresponding to each of the pixel points and the number.
6. The road engineering construction quality detection method based on machine vision according to claim 1 is characterized in that: The step of obtaining the distortion factor of each optical flow vector according to the optical flow vector and the road surface grayscale image comprises: Get the horizontal component of each optical flow vector; Obtaining the vertical component of each of the optical flow vectors; Acquire a third distance between the origin of each of the optical flow vectors and the center line of the road surface grayscale image; Acquire a fourth distance between the origin of each of the optical flow vectors and the bottom edge of the road surface grayscale image; The distortion factor of each of the optical flow vectors is acquired according to the vertical component, the horizontal component, the third distance, and the fourth distance of each of the optical flow vectors.
7. The road engineering construction quality detection method based on machine vision according to claim 1 is characterized in that: The step of obtaining the quality factor of each pixel in the road surface grayscale image according to the density of asphalt particles at the location of each pixel and the distortion factor of each optical flow vector comprises: Acquire each second neighborhood pixel point in a second preset neighborhood corresponding to each of the pixel points; Obtaining a distortion factor of a target optical flow vector closest to each of the pixel points; Obtaining a fifth distance between each of the pixel points and the corresponding nearest optical flow vector; The quality factor of each pixel in the road surface grayscale image is obtained according to the asphalt particle density of each pixel, the asphalt particle density of the second neighborhood pixel, the distortion factor of the target optical flow vector, and the fifth distance.
8. The method for detecting road engineering construction quality based on machine vision according to claim 7 is characterized in that: The step of obtaining the quality factor of each pixel in the road surface grayscale image according to the asphalt particle density of each pixel, the asphalt particle density of the second neighborhood pixel, the distortion factor of the target optical flow vector, and the fifth distance includes: Obtaining the asphalt particle density variance between the asphalt particle density of each of the pixel points and the asphalt particle density of each of the second neighborhood pixel points in the corresponding second preset neighborhood; The quality factor of each pixel point in the road surface grayscale image is obtained according to the asphalt particle density of each pixel point, the asphalt particle density variance, the distortion factor of the target optical flow vector, and the fifth distance.
9. A road engineering construction quality inspection system based on machine vision, characterized in that: The system includes: a camera and a construction quality detection device; The camera is used to capture road surface construction images and send the road surface construction images to the machine vision-based road engineering construction quality detection device; The construction quality detection device is used to receive a road surface construction image; grayscale the road surface construction image to obtain a road surface grayscale image; obtain an optical flow vector corresponding to the road surface grayscale image; and obtain the asphalt particle density at the location of each pixel in the road surface grayscale image according to the grayscale change of the pixel in the road surface grayscale image. The asphalt particle density is obtained by: obtaining the maximum grayscale value point corresponding to each pixel according to the grayscale value of each first neighborhood pixel in the first preset neighborhood of each pixel; obtaining the first distance between each pixel and the central pixel; obtaining the asphalt particle density at the location of each pixel according to the maximum grayscale value point corresponding to each pixel and the first distance; obtaining the distortion factor of each optical flow vector according to the optical flow vector and the road surface grayscale image; obtaining the quality factor of each pixel in the road surface grayscale image according to the asphalt particle density at the location of each pixel and the distortion factor of each optical flow vector; and obtaining the abnormal area in the road surface construction image according to the quality factor of each pixel.
Citation Information
Patent Citations
Method and system for measuring optical flow velocity field based on thermal infrared image sequence of unmanned aerial vehicle
CN114565642A
Scenic spot multi-person action behavior monitoring method based on artificial intelligence
CN115880784A