Road marking construction consistency detection system based on machine vision
By constructing virtual road marking models using machine vision technology and combining them with design drawings for automated inspection, the problem of low efficiency in manual comparison in existing technologies has been solved. This has enabled high-precision and intelligent inspection of road marking construction consistency, improving acceptance efficiency and accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies rely on manual comparison of static images and drawings for consistency inspection of road marking construction, resulting in low efficiency and difficulty in achieving high-precision, continuous, and structured automated inspection, which cannot meet the actual needs of modern road marking construction.
A machine vision-based inspection system is used to construct a virtual road marking model through drone video acquisition, video inspection, and data analysis modules. Combined with design drawings, the system automatically evaluates the geometric position, edge continuity, and color consistency of the road markings and outputs a consistency report.
It achieves full-process digital comparison and multi-dimensional consistency analysis, assists in acceptance decision-making, improves the efficiency and standardization of road marking project acceptance, and reduces human subjective judgment errors.
Smart Images

Figure CN121767975A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of road marking construction and mainly relates to a road marking construction consistency detection system based on machine vision. Background Technology
[0002] The road marking construction consistency inspection system is a system that uses machine vision technology to automatically inspect and evaluate the construction quality of road markings. It is used to determine whether the markings meet the design specifications and improve the efficiency and accuracy of construction acceptance.
[0003] In Chinese patent application CN202410605777.4, titled "Traffic Engineering Road Condition Detection Method Based on Machine Vision," this invention relates to the field of image processing technology, specifically to a traffic engineering road condition detection method based on machine vision. The method includes: determining the probability that each marked connected component is a lane marking based on the shape difference between the target connected component and each reference connected component, and the grayscale value of pixels within each marked connected component; determining the directional consistency degree of each marked connected component based on its reference angle; adjusting the filtering weights based on the probability and directional consistency degree of each marked connected component being a lane marking to obtain the adjusted filtering weights for each pixel; enhancing the road image to obtain an enhanced road image; and performing traffic condition detection based on the enhanced road image. This invention reduces the impact of wear and contamination on lane markings, improves the accuracy of lane marking acquisition on roads, and enhances the accuracy of traffic condition detection.
[0004] The aforementioned method has proposed a relatively complete road condition detection technology. Through image processing methods based on connected component shape differences, grayscale features, and directional consistency analysis, it has achieved enhanced recognition of lane markings under conditions such as wear and pollution, thereby improving the accuracy and robustness of lane line recognition in traffic operation scenarios. However, in the field of road marking construction, since the detection object is the completed construction area that is still in the acceptance stage, the requirements for elements such as the geometric position, edge continuity, width, and color consistency of the markings are more precise. It is not only necessary to identify whether the markings exist, but also to judge the consistency between the markings and the design drawings. However, existing technologies mostly rely on manual comparison of static images and drawings for consistency acceptance, resulting in low efficiency, long comparison cycles, and difficulty in achieving precise judgment of the consistency of marking construction. This cannot meet the actual needs of high-precision, continuous, structured, and automated detection of modern road marking construction. Therefore, there is an urgent need for a machine vision-based road marking construction consistency detection system that can combine design drawings, automatically construct virtual marking models, and dynamically extract marking features based on video images to achieve curve fitting and virtual-real difference assessment, so as to improve the accuracy and intelligence level of road marking construction consistency detection. Summary of the Invention
[0005] This invention provides a road marking construction consistency detection system based on machine vision, which aims to solve the problem that existing road marking consistency detection methods rely on manual comparison of static images and drawings, and cannot achieve high-precision automated detection of key indicators such as the geometric position, edge continuity and color consistency of road markings.
[0006] To solve the above problems, the present invention employs the following technology: Machine vision-based road marking construction consistency detection system: The video acquisition module is used for video acquisition. It uses drones to record road videos according to certain requirements, collects video data, and uploads the video data to the video inspection module via wireless network. The video inspection module receives video data uploaded by the video acquisition module, preprocesses the video data, checks the integrity of the video data using template matching, checks the boundary integrity of the video data using the Canny edge detection algorithm and contour inspection algorithm, and transmits the compliant video data to the data analysis module. The data analysis module receives video data transmitted from the video inspection module; it constructs a virtual road model using a road model building algorithm; it maps road markings into the virtual road model based on the drawings; it extracts the actual road marking construction details from the video data and assesses any missing road markings; it extracts the road marking model from each frame and stitches them together to form a complete virtual road marking model; it maps the actual road marking construction details onto the virtual road model to assess the morphological consistency of the road markings; it performs a color consistency assessment based on the video data; and based on the assessment results, it outputs a road marking construction consistency report and sends it to the acceptance personnel.
[0007] As a preferred embodiment, the acquired video data specifically includes: The video acquisition module mainly uses drones, which are equipped with cameras that meet the requirements to carry out standardized video acquisition work. Specific requirements include: camera requirements include: no less than 1080p resolution and 30fps frame rate, focal length should be 12mm to 16mm, and it should have automatic exposure, automatic white balance control and image stabilization system. The requirements for drones include: having a stable flight system, a flight speed controlled between 3m / s and 10m / s, and a flight altitude between 5m and 10m above the road. Standard video capture procedures specifically include starting recording from the beginning of the road, aiming the camera at the center line of the road, ensuring the speed does not fluctuate drastically, maintaining image stability and clear road markings during recording, and stopping recording at the end of the road. The specific road start and end point settings include: setting up clear road signs at the beginning and end of the road, and using the start point sign as the starting reference and the end point sign as the ending reference for the collected video data; The recorded video data is uploaded to the video inspection module via wireless network.
[0008] As a preferred implementation, the process of checking the integrity of video data specifically includes: The video inspection module preprocesses the video data. The specific preprocessing steps include: decoding the video into frame-by-frame images and performing geometric correction on each frame; stabilizing the video image sequence; and adjusting the brightness and color of the images. Video image integrity checks are performed using template matching. Extract the first and last frame images from the video data; Load the start and end point identifier template images from the database, and use the template matching algorithm Squashed Difference (SSD) to match these two keyframes; The two keyframe images are converted to grayscale by separating the RGB channels. For each pixel, a weighted average formula is used to convert the RGB value into a single grayscale value. The specific weighted average formula is as follows: ; Where GV is the pixel gray value, R is the red component in the original image, G is the green component in the original image, and B is the blue component in the original image; The weighted results of each pixel are combined to generate a complete grayscale image; The template image and the corresponding regions in the grayscale image are compared pixel by pixel. The difference between each corresponding pixel in the template image and the grayscale image is calculated. The squares of these difference values are summed. This process is repeated for each position to generate a correlation map. The completeness is evaluated based on the matching score.
[0009] As a preferred embodiment, the step of checking the boundary integrity of the video data specifically includes: The video inspection module performs grayscale processing on each frame of the image; The Canny edge detection algorithm is applied to process the grayscale image to extract the contour of the road boundary marking area; A Gaussian filter is used to filter the image, and a weight template based on a two-dimensional Gaussian function is constructed. Centered on the pixel to be processed in the image, select the pixel values within its neighborhood range, and perform a weighted summation according to the corresponding weights in the Gaussian template. The formula for the weighted summation is: ; Where x is the x-coordinate of the selected point and y is the y-coordinate of the selected point. Let be the output pixel value of the image at position (x, y) after Gaussian filtering, where i is the horizontal offset relative to the current pixel being processed, and j is the vertical offset relative to the current pixel being processed. The Gaussian template weights are given at the corresponding positions (i,j), and k is half the size of the filter window. Calculate the gradient intensity and direction of each pixel in the image, and apply non-maximum suppression to eliminate stray responses caused by edge detection; Dual threshold detection is applied to determine real and potential edges, and the contour of the road boundary marking area is used as the main edge preservation target. The binary image result corresponding to the road boundary marking area is output. A contour detection algorithm is used to detect contours in binary images. By scanning the foreground region, the boundary contours of each road sign are extracted based on the 8-connectivity principle. The extracted contours are subjected to edge coherence analysis, the degree of change of Euclidean distance between each pair of adjacent contour points is analyzed, the directional angle formed by three consecutive points is analyzed, the geometric features of the contours are analyzed, and the contour integrity and coherence of the road marking area are evaluated. Transmit qualified video data to the data analysis module.
[0010] As a preferred implementation, the construction of the virtual road model specifically includes: The data analysis module uses a road model building algorithm to construct a virtual road model that reflects the real situation based on road construction design drawings and road videos; Extract road geometry information from design drawings, convert paper drawings into DWG format electronic files, and use vector graphics analysis software AutoCAD to read the geometry information in the drawings; Through geometric calculation and coordinate transformation methods, the two-dimensional road geometric data extracted from the design drawings are mapped into a road structure in three-dimensional space; Extract the two-dimensional coordinate data of key elements in the drawing and import the vertical coordinate Z value; The mapping relationship between the coordinate system of the drawings and the coordinate system of the virtual model is unified, and the coordinate docking is carried out by affine transformation to construct a three-dimensional road skeleton model with actual scale and geometric structure. For curved segments, a cubic spline interpolation algorithm is used to fit and calculate the discrete control points extracted from the design drawings, generating a smooth curved segment structure and constructing a virtual road model.
[0011] As a preferred embodiment, mapping the road markings into the virtual road model specifically includes: The data analysis module uses the vector graphics parsing software AutoCAD to extract the geometric properties of the markings from DWG format drawings; Affine transformation is used to map the two-dimensional coordinates in the drawings to the three-dimensional coordinate system of the virtual model, and the offset position of the markings is determined by combining the road centerline and lane width parameters. Parametric mapping and cubic spline interpolation algorithms are used to smoothly fit the coordinate points of the datum line; A virtual road marking model with spatial accuracy has been constructed.
[0012] As a preferred implementation, the missing evaluation lines specifically include: The data analysis module uses the Canny edge detection algorithm to extract the outline of the markings and outputs a binary image of the markings. Contour detection algorithm is used to detect line breakage, and line type information in design drawings is introduced as an auxiliary judgment basis. Multi-segment feature fusion within consecutive frames is used to distinguish between dashed lines and abnormal breaks. The abnormal fracture area was recorded as the missing marking area. Then, the fracture area was filled in with cubic spline interpolation algorithm to complete the state, and spline fitting was performed on the result.
[0013] As a preferred embodiment, the process of assembling the virtual datum model specifically includes: The data analysis module integrates the spline fitting results extracted from all frame images using time series data and performs coordinate concatenation stitching. The spline curve fitting point set extracted from each frame is sorted according to the timestamp order of the video frames. Redundant points are removed between adjacent frames by using the coordinate distance threshold of the overlapping area. At the splicing node, a buffer transition interpolation method is used to introduce transition control points and perform global cubic spline interpolation reconstruction. The entire fitting curve is processed to be continuous, resulting in a virtual marking model that covers the entire actual paving path of the marking.
[0014] As a preferred embodiment, the morphological consistency assessment of the road marking construction specifically includes: The data analysis module extracts a set of reference points at equal intervals from the virtual datum model and extracts the corresponding fitted points on the mapped actual datum line. It then calculates the Euclidean distance between the two sets of corresponding points to obtain the offset at each position. The formula for calculating the Euclidean distance is: ; in Let be the Euclidean distance between the two points, and i be the index of the location point. The x-coordinate of the point on the actual marking line. The ordinate of the point on the actual marking line. Let x be the x-coordinate of a point on the virtual marking line. The ordinate of a point on the virtual marking line; Then, statistical analysis was performed on all offset values to calculate the average deviation, maximum deviation, and optional standard deviation. The tolerance level is calculated using the tolerance calculation formula, which is as follows: ; in Tolerance, The maximum allowable geometric offset tolerance for actual roads is determined according to technical specifications. For image sensor imaging scale, This refers to the pixel density acquired during image processing. When both the average deviation and the maximum deviation are within the tolerance range, the consistency is deemed reasonable; otherwise, it is recorded as an abnormal area of caliper deviation. By comparing the curve's direction angle and local curvature, the consistency of the markings in shape is determined. From the actual markings and the virtual marking model, equally spaced sampling point sequences are extracted respectively. The tangent direction angle is calculated using the direction difference between adjacent points, employing the arctangent function. The specific calculation formula is as follows: ; Where i is the index of the point. The tangent direction angle, Let i be the x-coordinate of point i. Let i be the ordinate of point i. For point x-coordinate For point The ordinate; Compare the difference between the actual tangent angle and the virtual tangent angle. If the difference exceeds the direction angle tolerance, it is recorded as a directional anomaly region. The formula for calculating the direction angle tolerance is: ; in For the orientation angle tolerance, For offset tolerance, The path length between adjacent sampling points; By comparing curvature anomalies, the curvature of the actual and virtual road markings is calculated separately. The formula for calculating curvature is: ; in Let be the curvature of point s. Let x be the x-coordinate function at point s. Let be the ordinate function at point s. for The first derivative, for The first derivative, for The second derivative, for The second derivative; By comparing the curvature differences, if the difference in curvature exceeds the threshold, it is recorded as a local curvature anomaly of the caliper.
[0015] As a preferred embodiment, the color consistency assessment specifically includes: The data analysis module uses a contour extraction algorithm to extract the markings from the binary image of the markings output by the Canny algorithm. Starting from the top left corner of the image, scan pixel by pixel, scan the foreground pixels, and track the neighboring pixels according to the 8-connectivity principle to form a closed or semi-closed contour line. Convert the marking area from the RGB color space to the HSV color model; Extract the HSV value of each pixel within the marked area; The hue values are divided into several color intervals for clustering statistics. The arithmetic mean of the H, S, and V values of all pixels is taken to obtain the average hue, average saturation, and average brightness of the region. The statistically obtained primary color distribution and average color value are compared with standard color parameters; If the proportion of color values of pixels within the marked area that are within the preset standard range does not exceed the threshold, it is marked as a region with abnormal marked color. The data analysis module integrates the missing areas, abnormal offset areas, abnormal direction areas, abnormal curvature areas, and abnormal color areas of the road markings, and outputs a road marking construction consistency report, which is then sent to the acceptance personnel.
[0016] The beneficial effects of this invention are: 1. Full-process digital comparison: By automatically extracting road geometry and marking information from design drawings and combining it with video data collected by drones to build a virtual marking model, a quantifiable and reproducible geometric comparison process is formed; 2. Multi-dimensional consistency analysis: It not only assesses the missing markings, but also includes multiple dimensions such as the degree of offset, direction consistency, curvature change and color consistency, to achieve a comprehensive quantitative analysis of the construction quality of the markings; 3. Assist in acceptance decision-making: The final output is a consistency report of road marking construction, which is provided for reference by the project acceptance personnel, reducing the error of subjective human judgment and improving the efficiency and standardization of road marking project acceptance. Attached Figure Description
[0017] Figure 1 This is a flowchart of the machine vision-based road marking construction consistency detection system of the present invention. Detailed Implementation
[0018] To make the technical means, creative features, and achieved objectives and effects of this invention easier to understand, the invention is further described below with reference to specific embodiments. However, the following embodiments are merely preferred embodiments of this invention and not all of them. Other embodiments obtained by those skilled in the art based on the embodiments described herein without creative effort are all within the protection scope of this invention. Unless otherwise specified, the experimental methods in the following embodiments are conventional methods, and the materials and reagents used in the following embodiments are commercially available unless otherwise specified.
[0019] Example 1: As Figure 1 The flowchart of the machine vision-based road marking construction consistency detection system is shown. This embodiment provides a machine vision-based road marking construction consistency detection system, which specifically includes the following steps: Step 1: The video acquisition module uses a drone equipped with a compliant camera to perform standardized video acquisition. The acquired video data is then uploaded to the video inspection module via a wireless network. Specifically, the drone uses a compliant camera to perform standardized video acquisition to obtain high-quality video data. Specific camera requirements include: a resolution of at least 1080p and a frame rate of 30fps; a focal length of 12mm to 16mm; a field of view covering the left and right edges of the road to avoid missing road markings or overlapping images; and automatic exposure, automatic white balance control, and an image stabilization system to ensure consistent image clarity under different lighting conditions. Specific drone requirements are also included. This includes: a stable flight system with a flight speed controlled between 3 m / s and 10 m / s, and a flight altitude between 5 and 10 meters above the road; the standardized video capture process specifically includes: starting recording from the beginning of the road, using standard angles and speeds, aligning the shooting angle with the road centerline, ensuring no drastic instantaneous fluctuations in speed, guaranteeing stable images and clearly visible road markings during recording, until recording stops at the end of the road; the specific road start and end point settings include: setting up clear road markings at the beginning and end of the road, such as painted markings, temporary signs, or road symbols, etc., with the captured video using the start point marking as the starting reference and the end point marking as the ending reference.
[0020] The recorded road marking status video data is uploaded to the video inspection module via wireless network.
[0021] Step Two: The video inspection module performs a standardization check on the recorded video data. After verification, the video data is transmitted to the data analysis module. The specific steps are as follows: receiving the video data uploaded by the video acquisition module, preprocessing the video, including decoding the video into frame-by-frame images and performing geometric correction on each frame to correct image distortion caused by shooting angle or lens distortion; stabilizing the video image sequence to reduce image shift caused by flight shaking and ensure that the position of the marking line remains consistent in adjacent images; in addition, adjusting the brightness and color of the images to ensure that the images captured under different lighting conditions remain uniform and clear.
[0022] Next, a video image integrity check is performed to ensure that the collected data meets the analysis requirements. The check verifies that the video begins with a road start marker and ends with an end marker. A template matching method is used to identify the start and end markers in the first and last frames of the video, ensuring the video starts and ends with the correct markers. The specific process is as follows: First, extract the first and last frame images from the video; next, load the start and end marker template images from the database; use the Squared Difference (SSD) template matching algorithm to match these two keyframes. Specifically, the first and last frames, as well as the template images, are converted to grayscale images. The process involves separating the RGB channels of the image and, for each pixel, using a weighted average formula to convert the RGB value into a single grayscale value. The specific weighted average formula is as follows: , Where GV is the pixel grayscale value, R is the red component in the original image, G is the green component in the original image, and B is the blue component in the original image.
[0023] Then, the weighted results of each pixel are combined to generate a complete grayscale image.
[0024] After the grayscale image is generated, for each location, the template image and the corresponding region in the grayscale image are compared pixel by pixel. The difference between each corresponding pixel in the template image and the grayscale image is calculated, and the squares of these differences are summed to obtain the matching score for that location. The smaller the score, the more similar the location is to the template image. The template image is slid across the entire image, and by traversing each location, a correlation map is finally generated. In the correlation map, the location with the lowest score corresponds to the matched template location. A matching box is marked in the original image based on the location with the lowest matching score. This box represents the region in the first or last frame that is most similar to the template image, i.e., the location of the start marker or end marker. If the score is lower than a set threshold, the match is considered successful; otherwise, it means that no valid marker was found at that location. If a start marker is found in the first frame and an end marker is found in the last frame, the video is considered to meet the condition of using the start marker as the starting reference and the end marker as the ending reference.
[0025] Next, the video was checked to ensure that the boundaries on both sides of the road were clear and that there was no boundary disappearance. The Canny edge detection algorithm was used to extract the outline of the road boundary marker area. First, each frame of the image was processed into grayscale, and the process was the same as the method for processing the first and last keyframes mentioned above.
[0026] Next, the Canny edge detection algorithm is applied to process the grayscale image to extract the contours of the road boundary marking area. The specific steps are as follows: A Gaussian filter is used to filter the image, constructing a weighted template based on a two-dimensional Gaussian function. The size and standard deviation of the template can be set according to the image resolution and noise level. Then, taking the pixel to be processed in the image as the center, the pixel values within its neighborhood are selected and weighted according to the corresponding weights in the Gaussian template. The formula for the weighted summation is: ; Where x is the x-coordinate of the selected point and y is the y-coordinate of the selected point. Let be the output pixel value of the image at position (x, y) after Gaussian filtering, where i is the horizontal offset relative to the current pixel being processed, and j is the vertical offset relative to the current pixel being processed. is the Gaussian template weight at the corresponding position (i,j), and k is half the size of the filter window.
[0027] The final calculation result is used as the filter value for that pixel, which reduces random noise caused by fluctuations in image acquisition equipment or ambient lighting, and enhances edge continuity and grayscale stability.
[0028] Subsequently, the gradient intensity and direction of each pixel in the image are calculated. By performing differentiation on the image, the gray-level change rate in the horizontal and vertical directions is calculated respectively, thereby constructing the gradient vector field of the pixel. The gradient intensity represents the magnitude of the pixel gray-level change and is used to measure the saliency of the edge. The gradient direction represents the direction of the fastest gray-level change, which is usually perpendicular to the tangent of the edge and is used to indicate the geometric orientation of the edge.
[0029] Non-maximum suppression is applied to eliminate stray responses caused by edge detection. After obtaining the gradient intensity and direction of each pixel in the image, the gradient of each pixel is compared with its neighboring pixels along the gradient direction to determine whether the pixel is a local maximum. If the gradient intensity of the pixel is less than either of the two adjacent pixels along its gradient direction, the pixel is considered not to be a local maximum of the edge, and its gradient value is set to 0, thereby suppressing the edge response of the point. Only the pixels with the largest local gradient intensity are retained, thus forming a detailed and accurate edge contour.
[0030] A dual-threshold detection method is applied to identify real and potential edges. Road boundary marker areas, such as guardrails, are used as the primary edge preservation targets. Typical gradient ranges, estimated beforehand through training, are set within these marker areas. Specifically, gradient values are calculated from image samples of the marker areas, and their distribution is statistically analyzed to define the gradient range. If the gradient distribution exhibits a right-skewed characteristic, the 70th and 90th percentile gradient values are selected as low and high thresholds for edge detection. Edge responses in all other non-guardrail areas of the image are suppressed. In subsequent processing, all pixels marked as weak edges are ultimately preserved only if they are connected to strong edges in an eight-neighborhood; otherwise, they are considered weak edges. False edges are identified and removed through a specific process: During the dual-threshold detection process, the gradient intensity of each pixel is compared with a preset high threshold and a low threshold to divide edge regions of different levels. Pixels with gradient intensities higher than the high threshold are considered strong edge points, representing the most prominent edge structures in the image. These typically correspond to clear edges in road marking areas, such as the light and dark boundaries of metal railings and concrete crash barriers. These structures are characterized by prominent brightness changes in the image and have obvious edge attributes. Pixels with gradient intensities between the high and low thresholds are classified as weak edge points. These pixels usually appear in the shadow areas of railings, areas with uneven edge lighting, or the gradual transition areas between railings and the background.
[0031] Based on this, only weak edge points adjacent to strong edges and in the same direction are retained, thus ensuring that all weak edges continuously connected to the road boundary marking area are preserved, while noise or isolated edges unrelated to the road boundary marking area are removed; the output is a binarized image result corresponding to the road boundary marking area, in which the road boundary marking area identified in the original image after gradient calculation and double thresholding is marked as 1, and the remaining non-edge areas are marked as 0; clearly highlighting the spatial position and edge contour of the road boundary marking area in the image.
[0032] Subsequently, a contour detection algorithm is used to perform contour detection on the binary image to determine whether the contours of the road boundary marking area are complete and continuous. The specific steps include: identifying 1 in the binary image as foreground and 0 as background; by scanning the foreground area, the boundary contour of each road marking is extracted according to the 8-connectivity principle. The 8-connectivity principle states that a pixel in an image is considered to be adjacent to its eight neighboring pixels in the four directions (up, down, left, right, and four diagonals). In contour extraction, this principle ensures continuous connection between boundary pixels in all possible directions, thereby extracting a more complete and coherent contour structure; and forming a continuous boundary path from the boundary contours. Subsequently, edge coherence analysis is performed on the extracted contours. The specific process is as follows: calculating the Euclidean distance between each pair of adjacent contour points, which reflects the numerical change of their spatial interval; if this distance suddenly increases compared to the average spacing of surrounding points, it indicates that there may be a break or missing connection. Secondly, the directional angle formed by three consecutive points is analyzed to determine whether the change in the contour is abrupt. If the angle changes significantly at a certain point, it indicates that the boundary of the area may have an abnormal direction or irregular reversal. This helps to determine whether there is a structural break or jump in the contour, thereby identifying potential boundary missing areas. If there is a break or jump, it indicates that the area has a missing boundary. Next, the geometric features of the contour (such as curvature changes, boundary length, directional continuity, etc.) are analyzed to determine the continuity of the contour in space, ensuring that it has the linear consistency and directional smoothness that road signs should have. Abnormal contours that are too small, structurally fragmented, or discrete point-like will be automatically eliminated as noise. If the contour as a whole shows the characteristics of not being closed or nonlinear abrupt changes, it will be judged as a structurally incomplete or missing sign area. Through contour extraction, structural analysis, and geometric judgment, the integrity and continuity of the road sign area contour are evaluated.
[0033] If any non-compliant situations are found, a report will be automatically generated, prompting the user to re-acquire or adjust the video shooting parameters; compliant video data will be transmitted to the data analysis module for further analysis.
[0034] Step 3: The data analysis module receives the video data transmitted by the video inspection module and uses a road model construction algorithm, combined with drawings, to construct a virtual road marking model. Specifically, the algorithm uses the road model construction algorithm to construct a virtual road model reflecting the actual situation based on the road construction design drawings and road video. The process of extracting road geometric information from the design drawings includes: identifying and analyzing key elements in the drawings, focusing on extracting structural parameters such as the road centerline, lane width, curve radius, and intersection location. In practice, the paper drawings are first converted into DWG format electronic files, and then the vector graphics analysis software AutoCAD is used to read the lines, curves, and annotation information in the drawings, thereby completing the digital extraction of road geometric information.
[0035] Subsequently, through geometric calculations and coordinate transformation methods, the two-dimensional road geometric data extracted from the design drawings is mapped into a three-dimensional road structure. Specifically, firstly, the two-dimensional coordinate data (X, Y) of key elements in the drawings are extracted. Combined with the preset elevation or road cross-section information in the drawings, the vertical coordinate Z value is introduced to form a complete three-dimensional coordinate point (X, Y, Z). The Z value can be set according to the elevation, slope, or cross-section changes in the road design drawings, representing the actual position of the point in space. The mapping relationship between the coordinate system of the drawings and the coordinate system of the virtual model is unified, and affine transformation is used for coordinate docking. Affine transformation transforms the coordinate points in the drawings to the target coordinate system through the correspondence between a set of known points, realizing operations such as translation, rotation, and scaling of the graphics. Keeping straight lines as straight lines, parallel relationships unchanged, and proportional relationships unchanged, the geometric lines, control point sets, and structural elements in the drawings are uniformly mapped to the three-dimensional space required for modeling, constructing a three-dimensional road skeleton model with actual proportions and geometric structure.
[0036] To further improve the geometric continuity and fitting accuracy of the model, during the skeleton model construction process, for curve segments containing bends, a cubic spline interpolation algorithm is used to fit and calculate the discrete control points extracted from the design drawings. Specifically, a set of key control points for the bends is extracted from the drawings, including the starting point, ending point, and feature points representing path changes, forming a set of discrete points that can reflect the road boundary contour. Adjacent control points are divided into several fixed-length intervals, and a cubic polynomial is used to fit each interval to ensure the continuity of function values, first derivatives, and second derivatives at the connection points. Natural boundary conditions are constructed with the second derivative at the endpoints as zero, and a tridiagonal linear equation system is constructed to solve the polynomial coefficients. Subsequently, the interpolation point density is dynamically adjusted according to the curvature change of each interval to ensure sufficient points in high-curvature areas, improve fitting accuracy, and finally generate a smooth curve segment structure.
[0037] Based on the completion of the road geometry model, the data analysis module further constructs the road marking information according to the design drawings, forming a complete virtual road marking model. Using the vector graphics analysis software AutoCAD, the geometric attributes of the road markings are extracted from the DWG format drawings, including the coordinate point sequence, marking type, and offset distance from the centerline. Next, affine transformations are used to uniformly map the two-dimensional coordinates in the drawings to the three-dimensional coordinate system of the virtual model, and the offset position of the markings is determined by combining the road centerline and lane width parameters. Subsequently, parametric mapping and cubic spline interpolation algorithms are used to smoothly fit the marking coordinate points, ensuring the continuity and structural rationality of the marking path in space, thereby constructing a road virtual marking model with spatial accuracy.
[0038] Step 4: The data analysis module extracts the actual markings from each frame of the received video data and maps the actual markings onto the virtual marking model for morphological consistency evaluation. The specific steps are as follows: First, the Canny edge detection algorithm is used to extract the marking contours. The extraction method is consistent with the above in terms of grayscale processing, filtering, and non-maximum suppression, but there is a difference in the dual threshold settings. Specifically, the dual threshold settings are modified to lower the high and low thresholds, significantly enhancing the contrast of the markings. Finally, a binary image of the markings is output. Next, a contour detection algorithm is used to detect... The general detection method for checking for breaks in the markings is the same as described above. However, to avoid misidentifying discontinuous dashed lines as broken areas, marking type information from the design drawings is introduced as an auxiliary criterion. Specifically, a multi-segment feature fusion method within consecutive frames is used to distinguish between dashed lines and abnormal breaks. The marking response at the same spatial location is tracked in consecutive frames. If a consistent, stable discontinuous structure appears repeatedly in multiple frames, and the interval size is within the range of the dashed line spacing defined in the drawing, it is judged as a designed dashed line structure. If this area is marked as a continuous solid line in the drawing, or although it is dashed... If the observed discontinuity length is less than the standard dashed line segment length or exhibits a non-uniform, fragmented discontinuity pattern, it may be an undesigned fracture caused by construction anomalies. In this case, spatial consistency judgment and inter-frame temporal consistency analysis are combined to further confirm whether the fracture is an occasional structural interruption or a persistent missing section. If edge fractures continuously appear at this location in multiple consecutive frames and exhibit random length variations, it is determined to be a missing grading area. If a fracture exists, it is recorded as a missing grading area, and then a cubic spline interpolation algorithm is used to supplement the fractured area to a complete state. Specifically, edge control is extracted at both ends of the fracture. The control points are completed using a cubic spline interpolation algorithm. Specifically, the control points are divided into several intervals, a cubic polynomial interpolation function is constructed, and the continuity of function values and derivatives is ensured at the connection points. By setting natural boundary conditions, a tridiagonal linear equation system is constructed, the polynomial coefficients are solved, and finally a smooth transition gradation structure is generated, restoring the geometric continuity of the broken area. Based on the completed gradation outline of each frame, spline fitting is performed, that is, a series of discrete points extracted from the gradation edge are smoothly connected into a continuous curve, so that the curve has no breaks or angles as a whole, presenting the smooth direction that a real gradation should have.
[0039] The spline fitting results extracted from all frame images are integrated over time and cascaded with coordinates to construct a complete virtual paving model that reflects the actual situation. Specifically: the spline curve fitting point set extracted from each frame is sorted according to the timestamp order of the video frames; redundant points are removed between adjacent frames using a coordinate distance threshold (e.g., 3-5 pixels) for overlapping areas to ensure a continuous and seamless spliced curve structure; then, a buffer transition interpolation method is used at the splicing nodes to introduce transition control points and perform global cubic spline interpolation reconstruction. Transition control points are introduced in the splicing sections of adjacent frames, and the position of the intermediate buffer point is estimated based on the endpoint direction of the splines on both sides and the local curvature trend to form a continuous control point sequence; then, based on this control point set, global cubic spline interpolation reconstruction is performed. By constructing natural boundary conditions and solving a tridiagonal linear equation system, the continuity of the curve function value and its first and second derivatives is achieved, generating a smooth curve structure with global geometric consistency; the entire fitted curve is processed to be continuous; thus forming a virtual paving model that covers the entire actual paving path.
[0040] Next, based on the geometric correspondence between the mapped actual datum curve and the virtual datum model, a difference analysis is performed. Specifically, a set of reference points is extracted at equal intervals from the virtual datum model, and the corresponding fitting points are extracted from the mapped actual datum. The Euclidean distance between the two sets of corresponding points is calculated to obtain the offset at each position. The formula for calculating the Euclidean distance is: , in Let be the Euclidean distance between the two points, and i be the index of the location point. The x-coordinate of the point on the actual marking line. The ordinate of the point on the actual marking line. Let x be the x-coordinate of a point on the virtual marking line. The vertical coordinate of the point on the virtual marking line.
[0041] Subsequently, statistical analysis was performed on all offset values to calculate the average deviation, maximum deviation, and optional standard deviation, used to quantify the overall offset level. A preset tolerance threshold was then used to determine whether the geometric deviation between the virtual and actual road markings was within acceptable limits during the marking comparison process. This threshold can be determined based on the road image resolution and construction specification tolerances. Specifically, the tolerance was calculated using the offset tolerance calculation formula: , in For offset tolerance, The maximum allowable geometric offset tolerance for actual roads is determined according to technical specifications. For image sensor imaging scale, This represents the pixel density acquired during image processing.
[0042] When both the average deviation and the maximum deviation are within the tolerance range, the consistency is considered reasonable; if either indicator exceeds the tolerance, it is recorded as an abnormal area of caliper deviation.
[0043] Simultaneously, by further comparing the curve's direction angle and local curvature, the consistency of the markings in shape is determined. The specific process is as follows: In each frame of the image, equally spaced sampling point sequences are extracted from both the actual extracted markings and the virtual marking model. The tangent direction angle is calculated using the direction difference between adjacent points, employing the arctangent function. The specific calculation formula is as follows: , Where i is the index of the point. The tangent direction angle, Let i be the x-coordinate of point i. Let i be the ordinate of point i. For point x-coordinate For point The ordinate.
[0044] Comparing the difference between the actual tangent angle and the virtual tangent angle, if it exceeds a certain threshold—the specific threshold is set based on the actual offset tolerance—the maximum position offset tolerance is converted into the corresponding orientation angle tolerance. The geometric conversion formula for the corresponding orientation angle tolerance is as follows: , in For the orientation angle tolerance, For offset tolerance, This represents the path length between adjacent sampling points.
[0045] Any direction exceeding the tolerance for directional angles is recorded as an abnormal directional area.
[0046] By comparing curvature anomalies, the curvature of the actual and virtual road markings is calculated separately. The formula for calculating curvature is: , in Let be the curvature of point s. Let x be the x-coordinate function at point s. Let be the ordinate function at point s. for The first derivative, for The first derivative, for The second derivative, for The second derivative of .
[0047] By comparing curvature differences, if the curvature difference exceeds a preset threshold, the curvature difference threshold can be derived from the minimum curve radius in the road design specifications to determine the maximum design curvature. Combined with the allowable error in actual construction and the image acquisition accuracy, a tolerance range is set proportionally. Usually, 10% to 15% of the maximum design curvature is used as the threshold. When the difference between the actual curvature and the curvature of the virtual model exceeds this threshold, it is judged as a curvature abnormal area. If it exceeds the threshold, it is recorded as a local curvature abnormality of the marking, which means that there is a curvature in the actual construction that is inconsistent with the design model.
[0048] Step 5: The data analysis module performs a color consistency assessment on the actual road marking images in the video data, outputs a road marking construction consistency report, and sends it to the acceptance personnel. The specific steps are as follows: Based on the binary image of the road markings output by the Canny algorithm, a contour extraction algorithm is used to extract the road markings. The specific process is as follows: Starting from the upper left corner of the image, scan pixel by pixel to find foreground pixels with a value of 1. Once a foreground pixel is found, its neighboring pixels are tracked according to the 8-connectivity principle to see if they are also foreground pixels, forming a closed or semi-closed contour line. The point sequence (coordinates) of each contour is saved in the extraction order. Subsequently, the road marking area in the original image is located based on the point sequence of the contour in the binary image, and the road marking area is converted from the RGB color space to the HSV color model. The specific process is as follows: First, calculate... In RGB, the maximum and minimum values determine the image's brightness (V). The difference between the minimum and maximum values is used to calculate the saturation (S). Next, if the maximum value is in the red channel, the hue (H) is calculated based on the difference between the green and blue channels; if the maximum value is in the green channel, the hue is calculated based on the difference between the blue and red channels; and if the maximum value is in the blue channel, the hue is calculated based on the difference between the red and green channels. The hue angle is calculated based on the position of the maximum RGB value, ensuring the hue value is between 0 and 360 degrees. Saturation (S) is the ratio of the difference between the maximum and minimum channel values in the three RGB channels to the maximum channel value, representing the color purity. If the maximum value is 0, the saturation is 0, representing grayscale. Brightness (V) is directly equal to the maximum value, representing the color's lightness.
[0049] Next, statistical analysis was performed on the hue (H), saturation (S), and lightness (V) of all pixels within the marking area to construct the overall distribution characteristics of the marking color. Specifically, by traversing each pixel within the marking area, its HSV value was extracted, and the hue value was divided into several color intervals, such as yellow intervals and white intervals, for clustering statistics. The statistical results were used to determine the proportion of the dominant color, thereby identifying the dominant color type of the area. At the same time, the arithmetic mean of the H, S, and V values of all pixels was taken to obtain the average hue, average saturation, and average lightness of the area. This is used to reflect the overall bias and uniformity of the marking color. Finally, the statistically obtained main color distribution and average color value are compared with the standard color parameters. For example, the HSV range of white markings is H∈[0,180], S∈[0,30], V∈[200,255], and that of yellow markings is H∈[20,45], S∈[100,255], V∈[150,255], etc. If the proportion of the color value of the pixels in the marking area within the preset standard range exceeds 80%, the color of the area is considered to meet the requirements; otherwise, it is marked as an abnormal marking color area.
[0050] Finally, the data analysis module integrates the missing marking areas, abnormal marking offset areas, abnormal direction areas, abnormal curvature areas, and abnormal marking color areas, and outputs a marking construction consistency report. This report reflects the differences and deviations between the actual road markings and the marking model in the design drawings. The report is then sent to the acceptance personnel, who make the final decision based on the actual situation.
[0051] Example 2: After the road marking construction was completed on the main road of a new urban area, in order to verify the consistency between the construction quality and the design drawings, the road marking construction consistency detection system based on machine vision of the present invention was used for consistency detection: First, a suitable drone was selected to record road video as required; during the flight, the high-resolution vision camera on the drone continuously collected road images with a resolution of 1920×1080, a frame rate of 30fps, and the flight speed was controlled at about 4m / s without significant changes. The flight altitude was set to 6 meters to ensure that the marking texture and edge features were completely visible in continuous frames. After the video data was collected, the video data was uploaded to the video inspection module through the 5G network.
[0052] The video inspection module performs a standardization check on the captured video. First, a template matching algorithm is used to check whether the first and last frames contain start and end point markers. The inspection results show that the markers are complete. At the same time, the integrity of the edge marker area is analyzed. The Canny algorithm is used to extract the outline of the marker edges in the image, resulting in a clear binary edge image. Subsequently, the outline inspection algorithm is used to analyze the extraction results to check whether there are boundary breaks, outline jumps, or missing parts in the marker area. The results show that the edges are continuous, the structure is complete, and there are no obvious breaks or occlusions. The video data is then transmitted to the data analysis module.
[0053] The data analysis module analyzes the geometric structure and marking layout information of the road in the design drawings, and uses fitting algorithms such as cubic spline interpolation to model and map the core elements such as the road centerline, lane boundaries and marking offset distance, generating a three-dimensional virtual road structure model that conforms to the design intent. Subsequently, based on the type and location parameters of the markings in the drawings, the spatial layout of the markings is reconstructed in the road model, and the markings are mapped onto the virtual road model.
[0054] Next, the data analysis module extracted the actual construction details of the road markings from the actual video data. Edge detection and contour analysis methods were used to perform structural recognition on the road marking images. By judging the integrity and continuity of the boundaries, areas with breaks, interruptions, or missing sections were identified. After the missing road marking areas were identified and recorded, a fitting reconstruction algorithm was introduced to complete the missing segments. Each frame of the video data was processed to extract the road marking edges, and a fitting algorithm was used to convert them into frame-level road marking models. Subsequently, according to the time sequence, the road marking models of each frame were systematically integrated, and the fitting results of adjacent frames were spliced using coordinate concatenation and redundant point removal. Transition control points were introduced, and a unified fitting method was used to reconstruct the global curve, constructing a complete virtual road marking model covering the entire detection section.
[0055] A comparative analysis of the actual and virtual road markings revealed that the positional offset of the markings in most areas was small and within the preset tolerance range, not constituting a substantial error. However, in some localized areas, the directional angle between the actual markings and the design model showed slight deviations, exceeding the set directional tolerance threshold. These areas were automatically identified and recorded as directional anomaly areas. Simultaneously, by comparing the curvature changes between the actual and virtual markings, some road sections exhibited abrupt changes in curvature, deviating from the smooth curve trend of the design model. These areas were identified and marked as curvature anomaly areas. Regarding color consistency, the color distribution of pixels within the marking area was analyzed, and the results showed that the colors in each area conformed to the color standards required by the drawings, with no color anomalies found.
[0056] Finally, based on the comprehensive analysis results, a construction consistency assessment report is automatically generated, including offset analysis, direction analysis, curvature analysis, and color analysis. This report is then sent to the relevant acceptance personnel. Based on the consistency report, and considering the actual construction environment, road usage requirements, and design drawing standards, the acceptance personnel confirm and approve acceptable offset areas. For some abnormal local areas, they recommend that the relevant construction units conduct on-site verification and necessary corrections based on the specific locations and nature of the deviations marked in the report, ensuring that the pavement marking construction quality meets design consistency and road traffic safety requirements.
[0057] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.
Claims
1. A machine vision-based road marking construction consistency detection system, characterized in that: The video acquisition module is used for video acquisition work, and a drone is used to record road videos with certain requirements, collect video data, and upload the video data to the video inspection module through a wireless network; The video inspection module is used to receive the video data uploaded by the video acquisition module, preprocess the video data, check the video data integrity using a template matching method, check the boundary integrity of the video data using a canny edge detection algorithm and a contour inspection algorithm, and transmit the video data meeting the specifications to the data analysis module; The data analysis module is used to receive the video data transmitted by the video inspection module; A road model construction algorithm is used to construct a virtual road model, the markings are mapped into the virtual road model in combination with the drawing situation, the actual marking construction situation is extracted from the video data to evaluate the marking missing situation, the marking model of each frame is extracted and spliced into a complete virtual marking model, the actual marking construction situation is mapped onto the virtual road model to evaluate the shape consistency of the markings, color consistency is evaluated according to the video data, and a marking construction consistency report is output according to the evaluation results and sent to the acceptance personnel. 2.The machine vision based road marking construction uniformity detection system of claim 1, wherein: The collected video data specifically includes: The video acquisition module is mainly a drone, and a drone equipped with a required camera is used for standard video acquisition work, and the specific requirements include: the camera requirements include: not less than 1080p resolution and 30fps frame rate, the focal length should be 12mm to 16mm, and it has automatic exposure, automatic white balance control and image stabilization system; The drone requirements include: having a stable flight system, the flight speed is controlled between 3m / s to 10m / s, and the flight height is within 5m to 10m above the road; The specific standard video acquisition work includes recording from the starting point of the road, the shooting angle is aligned with the direction of the road center line, the speed does not appear sharp transient fluctuation, ensures that the image is stable during shooting, the marking is clear and visible, and the recording stops at the end of the road; The specific setting of the starting point and the end point of the road includes: setting obvious road signs at the beginning and the end of the road, and the collected video data takes the starting point sign as the starting reference and the end point sign as the ending reference; The recorded video data is uploaded to the video inspection module through a wireless network. 3.The machine vision based road marking construction uniformity detection system of claim 1, wherein: The specific video data integrity checking includes: The video inspection module preprocesses the video data, and the specific preprocessing steps include: decoding the video into frame-by-frame images and performing geometric correction on each frame of image; smooth processing of video image sequence; adjusting the brightness and color of the image; Video image integrity checking is performed by template matching; The first frame image and the last frame image are extracted from the video data; The starting point sign and the end point sign template images are loaded from the database, and the two key frames are matched using the template matching algorithm square difference SSD; The two key frame images are processed by grayscale processing, the RGB channels of the key frame images are separated, and for each pixel, the RGB value is converted into a single grayscale value using a weighted average formula, and the specific weighted average formula is: ; Wherein GV is the pixel gray value, R is the red component in the original image, G is the green component in the original image, and B is the blue component in the original image; The weighted results of each pixel are combined to generate a complete gray image; The template image is compared with the corresponding region in the gray image pixel by pixel, the difference between each corresponding pixel of the template image and the gray image is calculated, the sum of the squares of these difference values is calculated, and the correlation map is generated by traversing each position, and the integrity is evaluated according to the matching degree score.
4. The machine vision-based road marking construction uniformity detection system of claim 1, wherein: The boundary integrity of the video data is checked, and the specific steps are as follows: The video inspection module performs gray processing on each frame image; The Canny edge detection algorithm is applied to process the gray image to extract the road boundary marking area contour; A Gaussian filter is used to filter the image to construct a weight template based on a two-dimensional Gaussian function; The pixel values in the neighborhood of the pixel to be processed in the image are selected, and the corresponding weights in the Gaussian template are used for weighted summation, and the formula for weighted summation is: ; where x is the horizontal coordinate of the selected point, y is the vertical coordinate of the selected point, is the output pixel value of the image after Gaussian filtering at position (x, y), i is the horizontal direction offset relative to the current processing pixel, j is the vertical direction offset relative to the current processing pixel, is the Gaussian template weight of the corresponding position (i, j), k is the half size of the filtering window; The gradient intensity and direction of each pixel point in the image are calculated, and non-maximum suppression is applied to eliminate the stray response caused by edge detection; A double threshold detection is applied to determine the real and potential edges, and the road boundary marking area contour is reserved as the main edge target, and a binary image result corresponding to the road boundary marking area is output; A contour detection algorithm is used to detect the contour of the binary image, and the boundary contour of each road marking is extracted according to the 8-connectivity principle by scanning the foreground region; The extracted contour is subjected to edge continuity analysis, the Euclidean distance change degree between each pair of adjacent contour points is analyzed, the direction included angle formed by three consecutive points is analyzed, and the contour integrity and continuity of the road marking area are evaluated. The video data meeting the requirements are transmitted to the data analysis module.
5. The machine vision-based road marking construction uniformity detection system of claim 1, wherein: The virtual road model is constructed, and the specific steps are as follows: The data analysis module uses a road model construction algorithm to construct a virtual road model reflecting the actual situation according to the road construction design drawings combined with the road video; The road geometric structure information is extracted from the design drawings, the paper drawings are converted into electronic files in DWG format, and the geometric structure information in the drawings is read by using the vector graphics analysis software AutoCAD; The two-dimensional road geometric data extracted from the design drawings are mapped into the road structure in three-dimensional space through geometric calculation and coordinate conversion methods; The two-dimensional coordinate data of the key elements in the drawings are extracted, and the vertical coordinate Z value is introduced; The mapping relationship between the drawing coordinate system and the virtual model construction coordinate system is unified, the coordinates are connected through affine transformation, and a three-dimensional road skeleton model with actual proportions and geometric structures is constructed. For curved segments, a cubic spline interpolation algorithm is used to fit and calculate the discrete control points extracted from the design drawings to generate smooth curved segment structures and construct a virtual road model.
6. The machine vision-based road marking construction uniformity detection system of claim 1, wherein: The specific steps of mapping the markings into the virtual road model are as follows: The data analysis module uses the vector graphics analysis software AutoCAD to extract the geometric properties of the markings from the DWG format drawings; The two-dimensional coordinates in the drawing are uniformly mapped into a three-dimensional coordinate system of the virtual model through affine transformation, and the offset position of the marking line is determined in combination with the road center line and the lane width parameter; The parameterized mapping and the cubic spline interpolation algorithm are used for smooth fitting of the marking line coordinate points; A road virtual marking line model with spatial accuracy is constructed.
7. The machine vision-based road marking construction uniformity detection system of claim 1, wherein: The evaluation of the marking line missing condition specifically includes: The data analysis module extracts the contour of the marking line by using the canny edge detection algorithm, and outputs a binary image of the marking line; The contour detection algorithm is used to detect the marking line breakage, the marking line type information in the design drawing is introduced as auxiliary judgment basis, and the continuous frame multi-segment feature fusion mode is used to distinguish the dashed line and abnormal breakage; The abnormal breakage area is recorded as the marking line missing area, then the cubic spline interpolation algorithm is used to supplement the breakage area to the complete state, and the result is subjected to spline fitting.
8. The machine vision-based road marking construction uniformity detection system of claim 1, wherein: The complete virtual marking line model is specifically constructed by: The data analysis module integrates and concatenates the spline fitting results extracted from all frames of images in time sequence; According to the time stamp order of the video frames, the spline curve fitting point set extracted in each frame is sorted, the coordinate distance threshold of the overlapping area is used to remove redundant points between adjacent frames, the transition control point is introduced and global cubic spline interpolation reconstruction is performed on the transition interpolation buffer, the whole segment fitting curve is continuously processed, and the virtual marking line model covering the actual laying path of the whole marking line is obtained.
9. The machine vision-based road marking conformance detection system of claim 1, wherein: The shape consistency evaluation of the marking line construction condition specifically includes: The data analysis module extracts a group of reference point sequences at equal intervals on the virtual marking line model, and extracts the corresponding fitting points on the mapped actual marking line, calculates the Euclidean distance between the corresponding points to obtain the offset at each position, and the calculation formula of the Euclidean distance is: ; wherein is the Euclidean distance between two points, i is the index of the number of the position point, is the horizontal coordinate of a point on the actual reticle, is the vertical coordinate of a point on the actual reticle, is the horizontal coordinate of a point on the virtual reticle, is the vertical coordinate of a point on the virtual reticle; Then, statistical analysis is performed on all offset values to calculate the average deviation, the maximum deviation and the optional standard deviation index; The tolerance is calculated by using the tolerance calculation formula, and the specific tolerance calculation formula is: ; wherein is the tolerance, is the maximum geometric offset tolerance allowed by the actual road, according to the technical specifications, is the image sensor imaging scale, is the pixel density captured in the image processing; When the average deviation and the maximum deviation are within the tolerance range, it is determined that the consistency is reasonable, otherwise, the marking line offset abnormal area is recorded; The shape consistency of the marking line is judged by comparing the curve direction angle and the local curvature, and the equal-interval sampling point sequences are extracted from the actual extracted marking line and the virtual marking line model respectively, the tangent direction angle is calculated by using the direction difference between adjacent points, the calculation formula is: ; where i is the index of the number of points, is the tangent direction angle, is the horizontal coordinate of point i, is the vertical coordinate of point i, is the horizontal coordinate of point , is the vertical coordinate of point . The difference between the actual tangent angle and the virtual tangent angle is compared, and if the difference exceeds the direction angle tolerance, the direction angle abnormal area is recorded, and the calculation formula of the direction angle tolerance is: ; wherein is a direction angle tolerance, is an offset tolerance, is a path length between adjacent sampling points; The curvature anomaly is compared, and the curvatures of the actual marking line and the virtual marking line are calculated, and the calculation formula of the curvature is: ; wherein is the curvature of the point s, is the abscissa function at the point s, is the ordinate function at the point s, is the first derivative of is the first derivative of is the first derivative of is the first derivative of is the second derivative of is the second derivative of is the second derivative of is the second derivative of If the difference of the curvatures exceeds the threshold, the local curvature anomaly of the marking line is recorded.
10. The machine vision-based road marking construction uniformity detection system of claim 1, wherein: The color consistency evaluation specifically includes: The data analysis module extracts the marking line based on the marking line binary image output by the canny algorithm; Scan foreground pixels from the top left corner of the image, and track neighborhood pixels according to the 8-connectivity principle to form a closed or semi-closed contour line; Convert the reticle area from the RGB color space to the HSV color model; Extract the HSV value of each pixel in the reticle area by traversing each pixel in the reticle area; Divide the hue value into several color intervals for clustering statistics, and take the arithmetic mean of the H, S, and V values of all pixels to obtain the average hue, average saturation, and average brightness of the region; Compare the main color distribution and average color value obtained by statistics with the standard color parameters; If the proportion of pixels in the reticle area whose color values are within the preset standard range does not exceed the threshold, mark it as a reticle color abnormal area; The data analysis module integrates the reticle missing area, reticle offset abnormal area, trend abnormal area, curvature abnormal area, and reticle color abnormal area to output a reticle construction consistency report, and sends the report to the acceptance personnel.
Citation Information
Patent Citations
Traffic engineering road condition detection method based on machine vision
CN118172738A