Guardrail type recognition and cleaning visualization method and system based on image feature extraction

By using multi-scale gradient fusion edge detection and morphological parameter quantization, combined with confidence assessment and closed-loop feedback correction, automatic identification of guardrail types and visualization of cleaning parameters are achieved. This solves the problems of guardrail type identification and parameter correlation in existing technologies, and improves the efficiency and accuracy of guardrail cleaning operations.

CN122090459BActive Publication Date: 2026-07-07咸阳市公路局 +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
咸阳市公路局
Filing Date
2026-04-23
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing technologies cannot automatically identify the waveform type of the guardrail and associate it with cleaning parameters, resulting in low cleaning efficiency and easy damage to the guardrail. Existing image processing technologies are difficult to achieve real-time processing and visualization on guardrail cleaning vehicles.

Method used

Multi-scale gradient fusion edge detection is used to extract the waveform contour features of the guardrail. Combined with morphological parameter quantization and confidence assessment, a closed-loop feedback correction mechanism is used to achieve automatic classification and identification of guardrail types. The identification results and cleaning parameters are then presented in a visual manner.

Benefits of technology

It enables automatic classification and identification of guardrail types and real-time visualization of cleaning parameters, improving the accuracy and efficiency of cleaning operations, reducing manual intervention, and enhancing the system's adaptability and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122090459B_ABST
    Figure CN122090459B_ABST
Patent Text Reader

Abstract

The present application belongs to the field of image processing and intelligent identification technology, discloses a guardrail type identification and cleaning visualization method and system based on image feature extraction, which collects guardrail images through a vehicle-mounted industrial camera and performs adaptive preprocessing, adopts multi-scale gradient fusion edge detection to extract a waveform profile, calculates three morphological parameters of wave peak spacing, wave height and cross-sectional width to realize guardrail type classification identification, and through closed-loop feedback correction of confidence evaluation and edge detection parameters, improves the identification accuracy, and finally presents the identification result and cleaning parameters in a visual superimposed manner in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing and intelligent recognition technology, and in particular relates to a method and system for identifying and visualizing guardrail types based on image feature extraction and cleaning. Background Technology

[0002] With the rapid development of my country's expressway network, road guardrails, as passive safety protection facilities, play a crucial role in preventing vehicles from running off the road or entering oncoming lanes. Different types of guardrail structures are deployed on different road sections according to protection levels and road conditions, mainly including two-wave corrugated beam guardrails, three-wave corrugated beam guardrails, and urban median barriers. During long-term service, guardrails inevitably accumulate dust, oil, and road surface deposits; regular cleaning and maintenance are essential for maintaining their reflective properties and extending their service life.

[0003] Currently, before cleaning guardrails, drivers must manually determine the type of guardrail based on its appearance and adjust cleaning parameters such as brush height, speed, and extension distance accordingly. However, the differences in the waveform profiles of different guardrail types are mainly reflected in morphological parameters such as wave crest spacing, wave height, and cross-sectional width, which are difficult to distinguish accurately with the naked eye while the vehicle is in motion. Especially in sections where two-wave and three-wave guardrails alternate, the driver's frequent manual switching not only increases labor intensity but also easily leads to misjudgments that cause cleaning parameters to be incompatible with the guardrail type, resulting in decreased cleaning quality or even damage to the guardrail surface.

[0004] Chinese patent CN119599986B discloses a method and system for detecting defects in road ancillary facilities based on deep learning. It utilizes the PointRend deep convolutional network model to achieve image target detection, classification, and accurate segmentation of guardrails and anti-glare panels. It detects defects such as bending deformation and breakage in guardrails through boundary pixel traversal search, least-squares line fitting, and the RANSAC algorithm. This solution focuses on detecting the damage state of guardrails, effectively identifying bending deformation areas and breakage locations, providing technical support for road maintenance and inspection.

[0005] However, the aforementioned existing technologies have the following shortcomings: First, the solution aims to detect guardrail defects but does not involve the classification and recognition of guardrail waveform types, and cannot distinguish between guardrail structures of different specifications such as two-wave, three-wave, and urban isolation barriers; Second, the solution relies on deep learning models for semantic segmentation, which requires a large amount of labeled training data and has a large computational load for model inference, making it difficult to achieve real-time processing on the embedded platform of guardrail cleaning vehicles; Third, the solution lacks the function of associating the recognition results with cleaning parameters and presenting them to the driver in a visual manner, and cannot be directly applied to intelligent auxiliary scenarios for guardrail cleaning operations.

[0006] Furthermore, existing image processing-based road facility detection technologies mostly focus on common scenarios such as crack detection and pavement distress detection, lacking targeted identification methods for guardrail waveforms, which possess unique geometric structural features. Conventional edge detection algorithms typically employ single-scale gradient operators, often struggling to achieve a good balance between noise suppression and edge preservation when dealing with complex edges like guardrail waveforms, which simultaneously contain coarse-grained overall trends and fine-grained local transitions. Simultaneously, existing image visualization technologies mostly present detection results with simple text prompts or numerical displays, lacking a visualization scheme that integrates recognition results, matching confidence distributions, and associated control parameters in a graphical overlay, making it difficult for drivers to intuitively assess the reliability of the recognition results.

[0007] Therefore, there is an urgent need for a technical solution that can quickly classify and identify guardrail waveform types based on image feature extraction, and present the identification results and cleaning parameters in a visual manner in real time, to replace the traditional operation method of drivers manually judging and selecting cleaning modes. Summary of the Invention

[0008] To address the technical problem of existing technologies being unable to automatically identify guardrail waveform types and associate them with cleaning parameters, this invention provides a method and system for guardrail type identification and cleaning visualization based on image feature extraction.

[0009] This invention employs the following technical solution: a method for identifying guardrail types and visualizing cleaning based on image feature extraction, comprising the following steps:

[0010] Step S1, Image Acquisition and Adaptive Preprocessing: The image of the guardrail in front is acquired in real time by the vehicle-mounted industrial camera, and grayscale conversion, adaptive histogram equalization and Gaussian filtering are performed on the acquired image in sequence to obtain the preprocessed image.

[0011] Step S2, Multi-scale gradient fusion edge detection and waveform contour extraction steps: Perform multi-scale gradient operator convolution operations on the preprocessed image respectively, and obtain a multi-scale gradient fusion map by weighted fusion of the gradient response maps of each scale. Perform non-maximum suppression and double threshold connection on the multi-scale gradient fusion map to obtain the edge image, and obtain a continuous guardrail waveform contour by connecting the broken edges through morphological closure operation.

[0012] Step S3, Morphological parameter quantification and guardrail type classification and recognition steps: Perform peak detection and trough detection on the guardrail waveform contour, calculate three morphological parameters: peak spacing, peak height and cross-sectional width, combine the three morphological parameters into a feature vector, and achieve guardrail type classification and recognition by comparing with the weighted Euclidean distance of the feature vector of the preset guardrail type template.

[0013] Step S4, Confidence assessment and adaptive parameter feedback correction step: Calculate the classification confidence based on the distance difference between the feature vector and the feature vector of each type of template. When the classification confidence is lower than the preset threshold, adjust the edge detection double threshold parameters in step S2 in reverse to optimize the contour extraction quality, forming a closed-loop feedback correction between step S2 and step S4.

[0014] Step S5, Visual Overlay Rendering and Cleaning Parameter Mapping: The guardrail type identification result, contour matching confidence heatmap and corresponding cleaning parameters are rendered onto the acquired image in an overlay annotation manner to generate a visual monitoring screen and display it in real time on the touch screen in the cab.

[0015] This invention also provides a fence type identification and cleaning visualization system based on image feature extraction, comprising: an image acquisition and adaptive preprocessing module for performing step S1; a multi-scale gradient fusion edge detection and waveform contour extraction module for performing step S2; a morphological parameter quantization and fence type classification and identification module for performing step S3; a confidence assessment and adaptive parameter feedback correction module for performing step S4; and a visualization overlay rendering and cleaning parameter mapping module for performing step S5.

[0016] The beneficial effects of this invention are as follows: by extracting the waveform contour features of the guardrail through multi-scale gradient fusion edge detection, and combining morphological parameter quantization to achieve automatic classification and recognition of guardrail types, the recognition accuracy is improved through a closed-loop feedback mechanism between confidence assessment and edge detection parameters. Finally, the recognition results and cleaning parameters are presented to the driver in a visual overlay manner, replacing the traditional manual selection of guardrail types and improving the efficiency and accuracy of cleaning operations. Specifically, this invention overcomes the limitations of single-scale edge detection under complex lighting conditions by simultaneously capturing the detailed texture and overall contour trend of guardrail waveforms through a multi-scale gradient fusion strategy. A classification method based on three-parameter feature vectors (peak spacing, peak height, and cross-sectional width) and template matching eliminates the need for deep learning models and large amounts of labeled training data, enabling real-time processing on embedded platforms. A confidence-driven closed-loop feedback correction mechanism automatically adjusts edge detection sensitivity to obtain more complete contour information when classification results are uncertain, giving the system strong adaptability and robustness. Furthermore, the integrated multi-layered visualization of guardrail type labeling, confidence heatmaps, and cleaning parameters allows drivers to simultaneously obtain recognition results and operational suggestions on a single interface, significantly improving human-computer interaction efficiency. Attached Figure Description

[0017] Figure 1 This is a flowchart of a method for visualizing guardrail type identification and cleaning based on image feature extraction, provided in an embodiment of the present invention.

[0018] Figure 2 This is an architecture diagram of the image feature extraction-based guardrail type identification and cleaning visualization system provided in this embodiment of the invention. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and technical features described in these embodiments can be combined with each other.

[0020] like Figure 1 As shown, the image feature extraction-based guardrail type recognition and cleaning visualization method provided in this embodiment of the invention includes steps S1 to S5, forming a deeply coupled closed-loop collaborative architecture of forward data-driven and backward parameter feedback. Specifically, the preprocessed image in step S1 serves as the edge detection input for step S2, the waveform contour features extracted in step S2 are input to step S3 for morphological parameter quantization, the classification result of step S3 is input to step S4 for confidence evaluation, and the evaluation result of step S4 drives the visualization rendering in step S5. Simultaneously, when the confidence level is insufficient, step S4 adjusts the edge detection threshold parameter of step S2 in reverse, forming a closed-loop feedback correction mechanism, enabling the entire processing flow to adaptively optimize according to the actual scenario.

[0021] From a data flow perspective, the processing pipeline of this method can be described as follows: The original color image data is converted into a single-channel grayscale preprocessed image in step S1, reducing the data dimension from three channels to a single channel; step S2 performs multi-scale edge detection on the preprocessed image and outputs a binarized waveform contour mask image and corresponding gradient direction information; step S3 extracts three-dimensional feature vectors from the contour mask, compressing the high-dimensional image data into low-dimensional numerical features; step S4 performs distance calculation on the feature vectors and outputs classification labels and confidence scalar values; step S5 integrates the intermediate and final results from each stage and renders them into a visualization. This data flow architecture embodies a progressive abstraction process from high-dimensional image space to low-dimensional feature space and then to decision space. Simultaneously, the feedback path from step S4 to step S2 enables the reverse regulation of the perceptual layer parameters by the decision layer information. The following sections elaborate on each step.

[0022] Step S1: Image Acquisition and Adaptive Preprocessing. In one embodiment of the present invention, an on-board industrial camera is mounted on the inside of the windshield of the guardrail cleaning vehicle or on the roof support. Its optical axis is substantially parallel to the vehicle's driving direction and slightly biased towards the guardrail. Preferably, the industrial camera used has a resolution of no less than 1920×1080 pixels, a frame rate of no less than 30fps, a lens focal length of 6mm to 12mm, and a field of view of 45° to 90°, capable of clearly capturing guardrail images at a distance of 5m to 30m ahead within a vehicle speed range of 0km / h to 80km / h. In one embodiment of the present invention, the camera is connected to an on-board embedded processor via a GigE or USB 3.0 interface to achieve real-time transmission of image data.

[0023] After obtaining the original color image, grayscale conversion is performed first. Preferably, grayscale conversion uses a weighted average method, that is, the pixel values ​​of the three channels are weighted and summed according to the weights of the red channel (0.299), the green channel (0.587), and the blue channel (0.114) to obtain a single-channel grayscale image. Grayscale processing eliminates the interference of color information, allowing subsequent edge detection to focus on changes in brightness gradient, while compressing the data volume to one-third of the original image, which helps to improve processing speed.

[0024] After grayscale conversion, adaptive histogram equalization is performed. In one embodiment of the present invention, contrast-limited adaptive histogram equalization (CLAHE) is used to divide the grayscale image into multiple non-overlapping sub-blocks. Histogram equalization is performed independently within each sub-block, and bilinear interpolation is used to eliminate the boundary discontinuities between sub-blocks. Preferably, the clipping limit value is set to 3.0, and the block size tileGridSize is set to 8×8 pixels. Compared with global histogram equalization, the CLAHE method can effectively enhance the local contrast of the guardrail waveform contour area while avoiding the background noise amplification problem caused by global stretching. Under uneven lighting conditions such as strong outdoor light or shadow occlusion, the enhancement effect of this method is particularly significant, which can increase the grayscale difference between the guardrail waveform contour and the background by 30% to 50%.

[0025] After adaptive histogram equalization, Gaussian filtering is performed for noise reduction. In one embodiment of the present invention, the Gaussian filter kernel size is set to 5×5, and the standard deviation is... Set to 1.0 to 1.5. The purpose of Gaussian filtering is to smooth high-frequency noise components in an image while preserving as much mid- and low-frequency edge information as possible, such as the contours of the guardrail waveform. The two-dimensional continuous form of the Gaussian kernel is represented as: ,in: For the Gaussian kernel in coordinates The weight value at the location is dimensionless. This represents the standard deviation of the Gaussian kernel, expressed in pixels, and ranges from 1.0 to 1.5. The larger the size, the smoother the surface, but the more blurred the edges also become. and These represent the offsets of a pixel relative to the kernel center in the horizontal and vertical directions, respectively, in pixels. In this embodiment, Setting it to 1.2 achieves a good balance between noise suppression and edge preservation. Experimental results show that this parameter setting can improve the image signal-to-noise ratio by about 6dB to 8dB.

[0026] After the above three steps of grayscale conversion, CLAHE enhancement, and Gaussian filtering, the obtained preprocessed image has the characteristics of uniform brightness distribution, moderate contrast, and low noise level, providing high-quality input data for the subsequent multi-scale edge detection in step S2. In one embodiment of the present invention, the processing time of a single frame in step S1 on the vehicle-mounted embedded processor does not exceed 5ms, meeting the real-time requirements. It is worth noting that the adaptive preprocessing quality of step S1 directly affects the edge detection performance of the subsequent step S2. Therefore, the reasonable setting of preprocessing parameters plays a fundamental role in the recognition accuracy of the entire system. In one embodiment of the present invention, when the overall grayscale mean of multiple consecutive frames is detected to be too low (below 50) or too high (above 200), the system automatically adjusts the camera's exposure time parameters to maintain the grayscale distribution of the preprocessed image within a suitable dynamic range. Preferably, the exposure adjustment step size is set to 5% to 10% of the current exposure time, and the adjustment period is an evaluation performed every 10 frames. In addition, in scenarios with drastic changes in lighting, such as vehicles entering or exiting tunnels, the cropping limit value in the CLAHE parameter can be dynamically adjusted to a range of 2.0 to 5.0 to address the impact of instantaneous brightness changes on image contrast.

[0027] Step S2: Multi-scale gradient fusion edge detection and waveform contour extraction. In one embodiment of the present invention, step S2 receives the preprocessed image output from step S1 as input and extracts continuous edge information of the guardrail waveform contour through a multi-scale gradient fusion strategy. Compared with traditional single-scale edge detection methods, the multi-scale fusion strategy can simultaneously capture the detailed texture and overall contour trend of the guardrail waveform, effectively suppressing false edge responses caused by noise while maintaining edge localization accuracy.

[0028] Specifically, three different scales of Sobel gradient operator convolution operations are performed on the preprocessed image. Preferably, the three scales are 3×3, 5×5, and 7×7. For each scale, the horizontal gradient component is calculated. and vertical gradient components Then calculate the gradient magnitude map at that scale. : ,in: For the first Coordinates at scale The gradient magnitude at point is dimensionless. and The first The gradient response values ​​of the scaled Sobel operator in the horizontal and vertical directions; superscript The values ​​1, 2, and 3 correspond to three scales: 3×3, 5×5, and 7×7, respectively. These are pixel coordinates. The 3×3 scale corresponds to fine edge information, which can capture the local turning features of the guardrail waveform; the 5×5 scale corresponds to edges with medium smoothness, which can reflect the overall trend of the guardrail waveform; and the 7×7 scale corresponds to coarse-grained edge contours, which have strong noise robustness.

[0029] After obtaining gradient magnitude maps at three scales, a multi-scale gradient fusion map is obtained through weighted fusion. In one embodiment of the present invention, an adaptive weighting strategy based on the gradient magnitude signal-to-noise ratio is employed, with the fusion weights for each scale being... The calculation is as follows: ,in: For the first The fusion weights of the scales are dimensionless. ,and ; For the first Signal-to-noise ratio of the scale gradient magnitude map, dimensionless; For the first The mean of all pixel gradient values ​​in the scale gradient magnitude map; For the first The standard deviation of the gradient values ​​of all pixels in the scale gradient magnitude map. This adaptive weighting strategy assigns greater fusion weight to scales with higher signal-to-noise ratios, thereby automatically optimizing edge detection performance under different noise levels. Preferably, in a typical outdoor guardrail shooting scenario, The typical value range is 0.25 to 0.40. The typical value range is 0.30 to 0.45. The typical value range is 0.20 to 0.35. Multi-scale gradient fusion map Represented as: ,in: coordinates The fusion gradient magnitude at the point is dimensionless.

[0030] After obtaining the multi-scale gradient fusion map, non-maximum suppression (NMS) and double-threshold connections are performed sequentially. NMS checks whether the gradient magnitude of each pixel is a local maximum along the gradient direction; if it is not a local maximum, it is set to zero, thus refining wide gradient response regions into edge lines of single-pixel width. In double-threshold connections, a high threshold is set. and low threshold The gradient magnitude is higher than Pixels with gradient magnitudes below 0 are directly retained as strong edge points. Pixels that are directly deleted, with gradient magnitude between and Pixels between points are only preserved if they are connected to strong edge points. Preferably, Set to 0.15 to 0.25 times the maximum value of the gradient fusion map. Set as 0.4 to 0.5 times. In one embodiment of the present invention, the initial parameter is taken as... , .

[0031] After nonmaximum suppression and double-threshold connection, the guardrail waveform contour in the edge image may exhibit local breaks, mainly caused by dirt occlusion on the guardrail surface or insufficient local contrast. To address this, a morphological closure operation is performed to connect the broken edges. Specifically, a dilation operation is first performed on the edge image to fill the edge gaps, followed by an erosion operation to restore the edge width. Preferably, the structuring element for the closure operation is an elliptical structuring element with its major axis along the guardrail's extension direction, having a major axis length of 7 to 15 pixels and a minor axis length of 3 to 5 pixels, to accommodate the horizontal extension of the guardrail waveform contour. After the closure operation is completed, connected component analysis is used to extract the largest connected region as the guardrail waveform contour, while smaller noise fragments are removed. In one embodiment of the invention, the connected component area threshold is set to 0.5% of the total number of pixels in the edge image.

[0032] The synergistic effect of the multi-scale gradient fusion and morphological closure operation results in extracted guardrail waveform contours with good continuity and high positioning accuracy. Field tests show that, under conditions of vehicle speed of 60 km / h and ambient light levels of 500 lux to 5000 lux, the integrity of the extracted waveform contours reaches over 92%, an improvement of approximately 18 percentage points compared to the single 3×3 Sobel operator.

[0033] In one embodiment of the present invention, step S2 further includes adaptive localization processing of the region of interest (ROI). Since guardrails are typically located in specific spatial areas within an image, to reduce computational load and minimize background interference, the ROI is first determined based on the typical imaging position of the guardrail before performing multi-scale edge detection. Preferably, the horizontal range of the ROI covers 60% to 100% of the image width (biased towards the guardrail side), and the vertical range covers 30% to 70% of the image height (corresponding to the typical height position of the guardrail). The initial position of the ROI is preset based on camera installation parameters and the nominal height of the guardrail, and is dynamically adjusted during system operation based on the guardrail outline position detected in the previous frame. The adjustment strategy is to shift the center of the ROI to the centroid position of the outline in the previous frame, with the offset not exceeding 20% ​​of the ROI size. Through adaptive ROI localization, the computational area in step S2 is reduced to 40% to 60% of the total image area, and the processing speed is correspondingly increased by approximately 40% to 60%, while effectively eliminating interference from non-guardrail edges such as road markings and distant building outlines.

[0034] Furthermore, in one embodiment of the present invention, gradient direction consistency screening is performed before the morphological closure operation. Since the guardrail waveform outline in the image is a periodic waveform extending approximately horizontally, the gradient direction of its edge pixels should mainly be concentrated in the near-vertical direction (i.e., the gradient direction angle is concentrated in the range of 60° to 120° or 240° to 300°). Gradient direction angle statistics are performed on the edge pixels after non-maximum suppression, retaining only edge pixels with gradient direction angles within the above range, and removing edge pixels with significantly deviated gradient direction angles. This screening operation can effectively remove lateral interference edges inconsistent with the guardrail's orientation, such as road joint lines and shadow edges of road barriers, making the objects for subsequent morphological closure operations cleaner and improving the accuracy of contour extraction.

[0035] Step S3: Morphological parameter quantification and guardrail type classification and identification. In one embodiment of the present invention, step S3 receives the guardrail waveform profile output from step S2 as input, and realizes automatic classification and identification of guardrail types through morphological parameter quantization. The guardrail waveform profile carries key geometric information to distinguish different guardrail types. This step achieves the discrimination of three types—two-wave guardrails, three-wave guardrails, and urban isolation fences—by accurately calculating three core morphological parameters and constructing a classification feature vector.

[0036] First, peak and trough detection are performed. In one embodiment of the invention, the vertical coordinate values ​​of the contour curve are scanned column by column along the horizontal direction of the guardrail waveform contour to construct a one-dimensional contour height sequence. ,in The pixel index is for the horizontal direction. Before constructing the height sequence, the waveform contour needs to be normalized, i.e., rotated to the horizontal direction according to the principal direction of the contour, to ensure that subsequent peak detection is not affected by the tilt angle of the guardrail in the image. Preferably, the principal direction of the contour is obtained by performing principal component analysis on the contour pixel coordinate set to obtain the first principal component direction angle. The rotation angle is For the rotated contour height sequence Perform local extremum detection: when and At that time, pixels Marked as a candidate point for the peak; when and At that time, pixels Points are marked as candidate troughs. To eliminate spurious extrema caused by noise, an extremum significance threshold is set. Only when the height difference between the wave crest and the adjacent wave trough is greater than Only then is the peak confirmed as a valid peak. Preferably, The height sequence amplitude is set to 10% to 20%. Furthermore, to further suppress the interference of high-frequency noise on extremum detection, the height sequence is adjusted before performing local extremum detection. Applying a one-dimensional median filter with a filter window length of 5 to 11 pixels can effectively smooth out jagged noise while maintaining the positional accuracy of peaks and troughs.

[0037] After confirming the valid crests and troughs, three morphological parameters are calculated. The first parameter is the crest spacing. Defined as the horizontal pixel distance between two adjacent valid peaks as calibrated by the image scale coefficient. The actual distance obtained after conversion: ,in: The average peak spacing is expressed in mm. The number of valid peaks detected; For the first The horizontal pixel coordinates of each valid peak; This is the image scale calibration coefficient, measured in mm / pixel. It is calculated by placing a standard ruler at a fixed distance and taking calibration images. The typical shooting distance is 10m to 15m. The value ranges from 0.8 mm / pixel to 2.5 mm / pixel.

[0038] The second parameter is wave height. Defined as the vertical pixel distance between a peak and an adjacent trough within a single waveform period, after calibration. The actual height obtained after conversion: ,in: The average wave height is expressed in mm. For the first Vertical pixel coordinates of each valid peak; In order to be with the first The vertical pixel coordinates of the trough nearest to each peak; These are the image scale calibration coefficients in the vertical direction, measured in mm / pixel, in square pixel sensors. For a standard two-wave guardrail (model Gr-B-4E), the nominal wave height is approximately 85mm and the wave crest spacing is approximately 320mm; for a standard three-wave guardrail (model Gr-A-4E), the nominal wave height is approximately 85mm and the wave crest spacing is approximately 130mm; the cross-section of urban guardrails is usually a rectangular tubular structure, and the wave height and wave crest spacing parameters exhibit significantly different characteristics from those of corrugated beam guardrails.

[0039] The third parameter is the cross-sectional width. , defined as the projected width of the waveform profile perpendicular to the waveform propagation direction, is obtained by calculating the average pixel distance between the upper and lower boundaries of the profile and converting it using a calibration coefficient: ,in: This represents the average cross-sectional width, in mm. The horizontal pixel length of the effective contour region; and The horizontal pixel positions are respectively The vertical pixel coordinates of the upper and lower boundaries of the outline.

[0040] The above three morphological parameters are combined to form a feature vector. Classification and recognition are achieved by comparing the weighted Euclidean distance between the feature vector and a preset guardrail type template. In one embodiment of the present invention, the preset template feature vector includes a two-wave pattern template. Three-wave template Urban guardrail templates The units for all components are mm. Since urban guardrails lack a waveform structure, their crest spacing and wave height are both set to 0. The weighted Euclidean distance is defined as: ,in: For feature vectors With the Class template The weighted Euclidean distance between them is dimensionless; The eigenvector of the eigenvector One component; For the first Class template One component; For the first The weighting coefficients of each morphological parameter satisfy the following conditions: Preferably, (Crest Spacing Weight) (High wave weight) (Cross-section width weight), where the crest spacing is given the highest weight because this parameter has the highest distinguishing effect between different guardrail types. The classification rule is: This refers to classifying the guardrail to be identified into the type corresponding to the template with the smallest distance.

[0041] In one embodiment of the present invention, to improve the robustness of classification, step S3 also introduces a temporal filtering mechanism. In a continuous video frame sequence, the guardrail type for the same road segment usually remains unchanged; therefore, temporal consistency constraints can be used to smooth out occasional misclassifications in single-frame classification results. Specifically, a length of... Timing sliding window (preferred) (Taking 5 to 10 frames), the number of tickets issued for each guardrail type is counted within each window, and the type with the most tickets is used as the final classification output for that window. When the final classification results of two adjacent windows change, the system determines that the current location is in the guardrail type switching area and alerts the driver with a special indicator on the visual interface. Preferably, the confirmation condition for type switching is at least 3 consecutive frames of new type detection results to avoid false switching caused by single-frame noise. The temporal filtering mechanism improves the inter-frame stability of the classification results from 87.6% in the single-frame mode to 98.2% without increasing computational complexity, significantly reducing the flickering and jumping phenomenon of guardrail type labels on the visual interface.

[0042] In addition, in the image scale calibration coefficient and Regarding the determination of the scale coefficient, one embodiment of the present invention employs an online calibration method. During the initial deployment of the system, calibration images are collected while driving on road sections with known guardrail types. By comparing the detected peak spacing pixel values ​​with the nominal peak spacing of the guardrail model, the scale calibration coefficient under the current installation conditions can be obtained. To adapt to changes in the scale coefficient at different shooting distances, the system establishes a piecewise linear calibration model based on the vertical position of the guardrail in the image (reflecting the shooting distance), dividing the vertical direction of the image into 4 to 8 equal intervals, each interval corresponding to a different calibration coefficient value.

[0043] Step S4: Confidence Assessment and Adaptive Parameter Feedback Correction. In one embodiment of the present invention, step S4 receives the classification result and weighted Euclidean distance information output from step S3 as input, assesses the reliability of the recognition result by calculating the classification confidence, and adjusts the edge detection parameters of step S2 in reverse if the confidence is insufficient, forming a closed-loop feedback correction mechanism. This mechanism is one of the key technical means for achieving high-accuracy guardrail type recognition in the present invention.

[0044] Classification confidence Defined as a measure of the relative difference between the minimum and second minimum distances: ,in: For classification confidence, ; The weighted Euclidean distance between the feature vector and the nearest template; The weighted Euclidean distance between the feature vector and the second nearest template. . The closer the value is to 1, the greater the distance difference between the nearest and second nearest templates, and the higher the certainty of the classification result. A value closer to 0 indicates a smaller difference in distance between the two nearest templates, potentially leading to ambiguity in the classification result. Preferably, the confidence threshold... Set to 0.3 to 0.5, when The classification result is received and passed to step S5. The feedback correction process is triggered in a timely manner. To avoid the risk of division by zero in the classification confidence formula when the second smallest distance is zero or close to zero, a smoothing term is introduced into the denominator. The smoothing term Values ​​greater than zero and less than or equal to 0.01 are preferred for smoothing terms. The value is 0.005.

[0045] The core idea of ​​the feedback correction process is that a low classification confidence score usually indicates incomplete waveform contour extraction or the presence of interference, leading to significant deviations in morphological parameter calculations. Adjusting the edge detection threshold parameter can alter the sensitivity of contour extraction, thereby obtaining more accurate waveform contours and more reliable classification results. The specific adjustment strategy is to adjust the high threshold in step S2... Decrease step size , lower threshold Simultaneously reduce step size Then, steps S2 and S3 are re-executed with the updated threshold. Preferably, Set as 5% to 10% of the initial value Set as The initial threshold is 5% to 10% of the initial value. Lowering the threshold allows more weak edge pixels to be preserved, which is beneficial for connecting broken contour segments caused by uneven lighting or surface dirt. Furthermore, to prevent the high and low thresholds from being continuously reduced to zero or excessively low values ​​during repeated iterations, leading to edge detection failure, this embodiment sets lower limits for both the high and low thresholds. Preferably, with the initial high threshold value set to 0.15 to 0.20 times the maximum value of the gradient fusion map and the initial low threshold value set to 0.05 to 0.08 times the maximum value of the gradient fusion map, the lower limit for the high threshold is preferably 20% to 30% of the initial high threshold, and the lower limit for the low threshold is preferably 20% to 30% of the initial low threshold. Specifically, taking a scenario where the normalized maximum value of the gradient fusion map is 500 as an example, the initial high threshold is set to 100, the initial low threshold to 40, the corresponding lower limit of the high threshold to 25, and the lower limit of the low threshold to 10. The step size for decreasing the high threshold is 10, and the step size for decreasing the low threshold is 4. When the classification confidence is 0.20 in the first iteration, feedback correction is triggered. The high threshold is decreased to 90 by the step size, and the low threshold is decreased to 36 by the step size, and then steps S2 to S4 are re-executed. This rule is followed round by round. The threshold is reduced to 30 and the low threshold to 12 in the 8th round. The classification confidence increases to 0.38, but it is still lower than the preset threshold of 0.40. In the 9th round, the high threshold is planned to be reduced to 20 in steps, but 20 is less than the lower limit of the high threshold of 25. At this time, the termination condition that the high threshold has dropped to the lower limit is triggered, and the feedback iteration process is terminated immediately. The system uses the classification result corresponding to the highest accumulated confidence as the final output and prompts the driver to manually confirm with a warning sign on the visualization interface. The introduction of the lower limit constraint enables the feedback correction process to converge at any number of iterations, avoiding the abnormal situation where the threshold drops infinitely to zero, causing global edge collapse. At the same time, it maintains the basic robustness of the edge detection algorithm in the feedback failure scenario and avoids the entire frame of the image being misjudged as a false edge due to the threshold being too low. In extreme road section tests with severely damaged guardrails or extremely poor lighting conditions, this lower limit constraint mechanism enables the system to maintain a stable output frame rate of about 5fps to 8fps even when the feedback iteration fails to converge, without causing the system output to completely fail due to the threshold returning to zero.

[0046] In one embodiment of the present invention, the termination condition for closed-loop feedback is: classification confidence level. Reaching the threshold Or the cumulative number of iterations reaches the maximum number of iterations. Preferably, The iteration count is set to 3 to 5. If the classification confidence is still below the threshold when the maximum number of iterations is reached, the classification result corresponding to the highest confidence level is used as the final output, and a warning icon is displayed on the visualization interface to prompt the driver for manual confirmation. In actual testing, approximately 85% of low-confidence cases can be improved to above the threshold after 1 to 2 feedback iterations. The feedback correction mechanism increases the overall classification accuracy from 91.5% in a single processing iteration to 96.8%.

[0047] Furthermore, step S4 records the confidence score of each frame to construct a historical confidence score sequence. When the confidence score remains high for multiple consecutive frames, the initial threshold in step S2 can be dynamically increased to reduce computation and achieve an adaptive balance between processing efficiency and recognition accuracy. Preferably, when the confidence score of 10 consecutive frames is greater than 0.7, the threshold is increased. The initial value was increased by 5%.

[0048] In one embodiment of the present invention, the feedback correction process in step S4 further includes a fine-tuning mechanism for the weights of morphological parameters. During the feedback iteration process, if the re-extracted contour causes a significant increase in the change of a certain morphological parameter compared to other parameters, the weight coefficient of that parameter is appropriately increased in the next classification calculation to fully utilize the incremental information provided by the feedback contour. Preferably, the weight fine-tuning amplitude does not exceed 10% of the initial weight, and the fine-tuning is only effective during the feedback iteration process; after the iteration ends, the weight is restored to its initial value. This weight fine-tuning mechanism allows the feedback correction to not only act on the contour extraction level but also to perform adaptive optimization at the feature matching level, further improving the confidence recovery speed. Experimental results show that after introducing weight fine-tuning, the average number of feedback iterations is reduced from 2.1 to 1.6.

[0049] Step S4 also performs the function of anomaly detection. This occurs when the weighted Euclidean distance between the feature vector and all templates exceeds a preset maximum distance threshold. When the system determines that the target object in the current image may not belong to one of the three preset guardrail types (e.g., it may be a concrete retaining wall, a wire rope cable guardrail, or other non-standard structures), it outputs an unknown type identifier and displays a prominent orange warning box on the visual interface, prompting the driver to manually determine and set the cleaning parameters. Preferably, Set to 0.8 times the maximum cross distance between the feature vectors of each template.

[0050] Step S5: Visual overlay rendering and cleaning parameter mapping. In one embodiment of the present invention, step S5 receives the final classification result and confidence information output by step S4, as well as the waveform contour data output by step S2. The guardrail type identification result, contour matching confidence heat map and corresponding cleaning parameters are rendered onto the original acquired image in a graphical overlay annotation manner to generate a visual monitoring screen and display it in real time on the touch screen in the driver's cab.

[0051] First, a contour matching confidence heatmap is generated. In one embodiment of the invention, for each pixel location in the original image... Calculate the contour matching degree in the local neighborhood centered on the pixel. Specifically, extract at each pixel location. The local gradient direction histogram features within the neighborhood window are used to perform normalized cross-correlation calculations with the standard waveform templates corresponding to the identified guardrail types:

[0052] ,in: coordinates Local matching degree at the location, ; For the original image in coordinates The grayscale value at that location; It represents the average gray value within a local neighborhood. For template in coordinates The grayscale value at that location; This represents the average grayscale value of the template. and This represents the pixel offset within the neighborhood. , Preferably, Take 32 to 64 pixels. Set the match value. The mapping is done using pseudo-color, with areas showing higher matching scores displayed in warmer tones (red to yellow) and areas showing lower matching scores displayed in cooler tones (blue to green), generating a confidence heatmap covering the entire fence area.

[0053] Next, the cleaning parameter mapping is performed. In one embodiment of the present invention, a preset cleaning parameter mapping table stores the brush height, brush speed, and brush extension distance corresponding to each type of guardrail. Preferably, the two-wave guardrail corresponds to a brush height of 45cm to 55cm, a brush speed of 200rpm to 300rpm, and a brush extension distance of 30cm to 40cm; the three-wave guardrail corresponds to a brush height of 55cm to 70cm, a brush speed of 180rpm to 280rpm, and a brush extension distance of 35cm to 50cm; and the urban isolation fence corresponds to a brush height of 80cm to 120cm, a brush speed of 150rpm to 250rpm, and a brush extension distance of 20cm to 35cm. After the classification result is determined, the corresponding recommended cleaning parameter values ​​are retrieved from the mapping table.

[0054] Finally, a visual overlay rendering is performed. In one embodiment of the present invention, the following information is overlaid on the original acquired image: the guardrail type name (such as two-wave guardrail, three-wave guardrail, or urban isolation barrier) and classification confidence percentage value are displayed in the upper area of ​​the image using text labels; a semi-transparent confidence heatmap layer is overlaid on the image area where the guardrail is located, allowing the driver to intuitively observe the contour matching situation at each location; and recommended cleaning parameter values ​​are displayed in the lower area of ​​the image in the form of a table or dashboard. Preferably, the transparency of the heatmap layer is set to 0.3 to 0.5 to ensure that the matching degree distribution is clearly presented without obscuring the original image content.

[0055] The rendered visualization is output to a touchscreen display in the driver's cab via an HDMI or LVDS interface. The display size is preferably between 10.1 and 15.6 inches, with a resolution of at least 1280×800 pixels. The driver can switch display modes via the touchscreen, including full-image mode (displaying the complete annotated image), parameter mode (magnifying and displaying clear parameter areas), and comparison mode (comparing the original and annotated images side-by-side). In one embodiment of the invention, the frame rate of the visualization rendering is synchronized with the camera's capture frame rate, with a delay of no more than 100ms, ensuring that the time difference between the driver's observed image and the actual scene is within an acceptable range.

[0056] Through the above-mentioned visualization overlay rendering, the driver can confirm the guardrail type identification result and recommended cleaning parameters on the touch screen in real time without leaving the driver's seat, replacing the traditional manual guardrail type selection operation mode, which significantly reduces the complexity of operation and the risk of misjudgment.

[0057] In one embodiment of the present invention, the visualized monitoring screen in step S5 also supports a historical playback function. During operation, the system caches the most recent 30 to 60 seconds of visualized footage in a circular video buffer. Drivers can review the identification status of previous road sections by using a time slider on the touchscreen while the vehicle is parked. The historical playback function is particularly suitable for scenarios where drivers need to confirm the cleaning effect or review the identification results after passing a section of guardrail. Furthermore, the visualized interface also includes a manual overwrite button area. When a driver believes the automatic identification result is incorrect, they can manually select the correct guardrail type via the touchscreen. Upon receiving the manual overwrite command, the system immediately updates the cleaning parameters and uses the manually corrected result as the reference benchmark for the current road section. This interactive mode, combining automatic identification and manual confirmation, ensures the system's autonomous operation efficiency while retaining the driver's final decision-making power, embodying the design concept of human-machine collaboration.

[0058] Preferably, the cleaning parameter mapping in step S5 also supports seasonal adjustment. In low-temperature winter environments, frost may adhere to the guardrail surface. During cleaning, it is necessary to appropriately reduce the brush speed to reduce mechanical impact on the icy guardrail surface. Therefore, the system automatically fine-tunes the recommended brush speed parameters based on the ambient temperature reading from the vehicle-mounted temperature sensor. Preferably, when the ambient temperature is below 5°C, the recommended speed is reduced by 10% to 20%.

[0059] like Figure 2 As shown in the figure, the image feature extraction-based guardrail type recognition and cleaning visualization system provided in this embodiment of the invention includes an image acquisition and adaptive preprocessing module 1, a multi-scale gradient fusion edge detection and waveform contour extraction module 2, a morphological parameter quantization and guardrail type classification and recognition module 3, a confidence assessment and adaptive parameter feedback correction module 4, and a visualization overlay rendering and cleaning parameter mapping module 5. The data flow between each module corresponds one-to-one with the execution order of steps S1 to S5 in the method embodiment. At the same time, a feedback communication link is established between the confidence assessment and adaptive parameter feedback correction module 4 and the multi-scale gradient fusion edge detection and waveform contour extraction module 2 to achieve closed-loop parameter adjustment.

[0060] The image acquisition and adaptive preprocessing module 1 includes an onboard industrial camera submodule and an image preprocessing submodule. The onboard industrial camera submodule is responsible for acquiring images of the guardrail ahead at a frame rate of no less than 30fps. The image preprocessing submodule is responsible for sequentially performing grayscale conversion, CLAHE enhancement, and Gaussian filtering for noise reduction. Its implementation details are the same as those described in step S1 of the method embodiment. Preferably, the image acquisition and adaptive preprocessing module 1 is deployed at the image acquisition front end of the onboard embedded processor, and the preprocessed image data is written to shared memory via DMA (Direct Memory Access) for subsequent modules to read.

[0061] The multi-scale gradient fusion edge detection and waveform contour extraction module 2 includes a multi-scale gradient calculation submodule, an adaptive weighted fusion submodule, and a contour extraction submodule. The multi-scale gradient calculation submodule performs Sobel gradient operations at three scales in parallel on the preprocessed image. The adaptive weighted fusion submodule calculates the fusion weights based on the gradient magnitude signal-to-noise ratio at each scale and generates a multi-scale gradient fusion map. The contour extraction submodule performs non-maximum suppression, double-threshold connection, and morphological closure operations to obtain a continuous guardrail waveform contour. In one embodiment of the invention, the double-threshold parameters of the multi-scale gradient fusion edge detection and waveform contour extraction module 2 receive feedback adjustment instructions from the confidence evaluation and adaptive parameter feedback correction module 4 through a configurable register to achieve closed-loop correction.

[0062] The morphological parameter quantification and guardrail type classification and recognition module 3 includes a peak and trough detection submodule, a parameter calculation submodule, and a classification decision submodule. The peak and trough detection submodule performs local extremum detection on the waveform contour and filters valid extremum points. The parameter calculation submodule calculates three morphological parameters: peak spacing, peak height, and cross-sectional width. The classification decision submodule outputs the classification result through weighted Euclidean distance comparison. The morphological parameter quantification and guardrail type classification and recognition module 3 has pre-stored template feature vectors that support online updates. When a new type of guardrail needs to be included in the recognition range, a new template vector can be added through the configuration interface.

[0063] The confidence assessment and adaptive parameter feedback correction module 4 includes a confidence calculation submodule and a feedback control submodule. The confidence calculation submodule calculates the classification confidence based on the ratio of the minimum distance to the sum of the second smallest distance and a smoothing term. The feedback control submodule generates a threshold adjustment command and sends it to the multi-scale gradient fusion edge detection and waveform contour extraction module 2 when the confidence is below a threshold. In one embodiment of the invention, the confidence assessment and adaptive parameter feedback correction module 4 further includes a historical confidence buffer, storing the confidence sequence of the most recent N frames for trend analysis and adaptive threshold adjustment. In one embodiment of the present invention, the feedback control submodule internally presets a high threshold lower limit parameter and a low threshold lower limit parameter. During each round of threshold adjustment instruction generation, the sub-decreased high threshold is compared with the high threshold lower limit parameter, and the sub-decreased low threshold is compared with the low threshold lower limit parameter. When the sub-decreased high threshold is not higher than the high threshold lower limit parameter or the sub-decreased low threshold is not higher than the low threshold lower limit parameter, the feedback control submodule stops sending threshold adjustment instructions to the multi-scale gradient fusion edge detection and waveform contour extraction module 2, and outputs the classification result corresponding to the current highest cumulative confidence level as the final recognition result to the visualization overlay rendering and cleaning parameter mapping module 5. Simultaneously, a warning sign prompting the driver to manually confirm is generated on the visualization interface. The high threshold lower limit parameter and the low threshold lower limit parameter are adjustable through a configuration interface, with default values ​​of 20% to 30% of the initial high threshold and initial low threshold, respectively, to adapt to different road segment lighting conditions and guardrail dirt levels.

[0064] The visualization overlay rendering and cleaning parameter mapping module 5 includes a heatmap generation submodule, a parameter mapping submodule, and an image rendering submodule. The heatmap generation submodule calculates the local matching degree of each pixel position and maps it to pseudo-color. The parameter mapping submodule queries the corresponding recommended cleaning parameter values ​​from the mapping table. The image rendering submodule overlays the guardrail type label, confidence heatmap, and cleaning parameter information onto the original image and outputs it to the touchscreen display. In one embodiment of the invention, the visualization overlay rendering and cleaning parameter mapping module 5 achieves real-time rendering through GPU acceleration, with a rendering frame rate of no less than 25fps. The image rendering submodule internally employs a double-buffering mechanism, that is, the rendering operation of the current frame is completed in the background buffer before switching to the foreground display, avoiding screen tearing that affects the driver's visual experience.

[0065] The above five modules constitute a complete pipeline for guardrail type recognition and cleaning visualization on an in-vehicle embedded platform. Preferably, the in-vehicle embedded platform uses an ARM Cortex-A72 or equivalent processor with a clock speed of at least 1.5GHz, at least 4GB of memory, and is equipped with a GPU acceleration unit. The end-to-end processing latency of the entire system does not exceed 80ms per frame, meeting real-time requirements. The system automatically enters working mode after power-on, requiring no additional operation from the driver.

[0066] In one embodiment of the present invention, data transmission between modules employs a communication mechanism combining shared memory and message queues. The image acquisition and adaptive preprocessing module 1 writes the preprocessed image into a circular buffer. The multi-scale gradient fusion edge detection and waveform contour extraction module 2 reads the latest frame from the buffer for processing, and the processing result is transmitted to the morphological parameter quantization and guardrail type classification and recognition module 3 via a message queue. The classification result and distance information from the morphological parameter quantization and guardrail type classification and recognition module 3 are packaged into a structure and transmitted to the confidence assessment and adaptive parameter feedback correction module 4 via a message queue. The feedback adjustment instructions from the confidence assessment and adaptive parameter feedback correction module 4 are directly written to the parameter register of the multi-scale gradient fusion edge detection and waveform contour extraction module 2 for low-latency transmission. The visualization overlay rendering and cleaning parameter mapping module 5 simultaneously reads the original image, contour data, and classification result from shared memory, performs rendering, and outputs the image to the display buffer. This asynchronous pipeline architecture allows the modules to work in parallel, improving the overall throughput of the system.

[0067] Furthermore, in one embodiment of the present invention, the system further includes a data recording module, used to record the guardrail type identification results, confidence scores, morphological parameters, and corresponding GPS coordinate information of each frame of image to an on-board storage device during system operation, forming a geographic information database of guardrail type distribution. This database can be exported and analyzed in the background to provide road maintenance management departments with inventory management data of guardrail assets, and at the same time provide a reference for cleaning operation route planning. Preferably, the data recording sampling interval is once every 100m, the storage format is a structured text file, and the data volume of a single operation is approximately 10MB to 50MB.

[0068] To verify the effectiveness of the technical solution of this invention, the following tests were conducted. The test environment was a highway maintenance operation scenario. The test vehicle was a standard guardrail cleaning vehicle, equipped with an industrial camera with a resolution of 1920×1080 and an embedded computing platform based on an ARM Cortex-A72 processor. The test sections included approximately 5km each of two-wave guardrail sections, three-wave guardrail sections, and urban median barriers sections, covering three weather conditions: sunny, cloudy, and foggy. The test speed range was 20km / h to 60km / h.

[0069] Regarding the accuracy of guardrail type recognition, the method of this invention achieves a recognition accuracy of 97.2% for two-wave guardrails, 96.5% for three-wave guardrails, and 98.1% for urban isolation barriers, with a combined recognition accuracy of 97.3% for all three types. In contrast, without the closed-loop feedback correction mechanism (i.e., removing the feedback function in step S4), the combined recognition accuracy decreases to 91.5%, indicating that the closed-loop feedback correction mechanism can improve the recognition accuracy by approximately 5.8 percentage points. Furthermore, without the multi-scale gradient fusion strategy (i.e., using only a single 3×3 Sobel operator), the combined recognition accuracy further decreases to 85.3%, demonstrating that the multi-scale fusion strategy makes a significant contribution to improving recognition performance.

[0070] Regarding real-time performance, the method of this invention achieves a single-frame end-to-end processing time of 35ms to 65ms (including all steps S1 to S5) on the aforementioned embedded platform, with an average processing time of 48ms, corresponding to a processing frame rate of approximately 21fps. Specifically, step S1 takes approximately 4ms, step S2 approximately 18ms, step S3 approximately 8ms, step S4 approximately 3ms, and step S5 approximately 15ms. In frames requiring feedback correction (approximately 15% of the total frames), the processing time increases to 55ms to 90ms due to the need to repeatedly execute steps S2 to S4. Overall, the system's average processing frame rate meets the requirements for real-time display.

[0071] In terms of visualization, subjective evaluation tests by drivers showed that the readability of the visualized monitoring screen scored 8.7 out of 10, the intuitiveness of the heat map scored 8.2, and the accuracy of the cleaning parameter display scored 9.1. Through the visualized monitoring screen, drivers can confirm the guardrail type identification result within 0.5 to 1.0 seconds, which is approximately 3 to 5 times more efficient than the traditional manual identification and cleaning mode selection process (approximately 3 to 5 seconds).

[0072] Regarding robustness under different lighting conditions, the overall recognition accuracy was 94.8% under ambient light conditions of 100 lux to 500 lux (cloudy / foggy days); 97.3% under ambient light conditions of 500 lux to 5000 lux (sunny days with normal lighting); and 95.6% under ambient light conditions of 5000 lux to 20000 lux (direct sunlight). The combined effect of CLAHE adaptive histogram equalization and multi-scale gradient fusion strategies enabled the system to maintain good recognition stability over a wide lighting range.

[0073] Regarding recognition performance under different vehicle speeds, the overall recognition accuracy was 98.1% at 20 km / h, 97.5% at 40 km / h, and 96.2% at 60 km / h. Increased vehicle speed exacerbated motion blur of the guardrail in single-frame images, leading to a decrease in the edge sharpness of the waveform contour. However, the 7×7 scale coarse-grained edge extraction capability of the multi-scale fusion strategy in this invention compensated for the loss of fine edges caused by motion blur to a certain extent, thus limiting the decrease in recognition accuracy.

[0074] Regarding guardrail type switching detection, the method of this invention has a detection delay of 1 to 3 frames for guardrail type switching nodes, meaning that the confirmation of the new type and the updating of cleaning parameters are completed within approximately 50ms to 150ms after the switching node. In all test road sections, the detection rate of guardrail type switching was 100%, the false alarm rate was 1.2%, and the missed alarm rate was 0%. False alarms mainly occurred at locations where there are short-distance transition connectors between two-wave and three-wave guardrails. The waveform characteristics of this transition area are between the two types, leading to alternating judgments within the time-series filtering window.

[0075] Regarding system resource consumption, the method of this invention, when running on an in-vehicle embedded platform, exhibits a CPU utilization rate of 45% to 65%, a memory utilization rate of approximately 120MB to 180MB, and a GPU utilization rate (used only for rendering in step S5) of 20% to 35%. During stability testing of continuous operation for over 8 hours, no issues such as memory leaks, frame rate drops, or abnormal exits were observed, indicating that the software architecture possesses good long-term operational stability. In terms of power consumption, the total power consumption of the entire system in operation does not exceed 15W, with the camera module consuming approximately 3W, the processor module approximately 8W, and the display module approximately 4W, meeting the power margin requirements of the in-vehicle power supply system.

[0076] In comparison with existing technologies, the multi-scale gradient fusion edge detection method of this invention improves the waveform contour extraction completeness by about 18 percentage points compared with the traditional single-scale Canny edge detection. Compared with the deep learning PointRend model-based method used in CN119599986B, the computational complexity of this invention is reduced by more than 90%, and real-time processing can be achieved on ARM processors without relying on GPU acceleration. Furthermore, no training dataset or model training process is required, significantly reducing deployment and maintenance costs.

[0077] Based on the above test results, the image feature extraction-based guardrail type identification and cleaning visualization method and system provided by this invention can achieve high accuracy and real-time automatic identification of guardrail types and recommendation of visualization parameters in typical guardrail cleaning operation scenarios. It effectively replaces the traditional method of manual identification and selection of cleaning modes by the driver, and has significant practical value. The core innovation of this invention lies in the organic combination of multi-scale gradient fusion edge detection, morphological parameter quantization classification, and confidence-driven closed-loop feedback correction, forming a lightweight and robust guardrail type identification technology solution. This solves the technical problems of existing technologies, such as the inability to automatically identify guardrail waveform types and the inability to correlate identification results with cleaning parameters for visualization.

[0078] The embodiments of the present invention are not limited to the specific embodiments described above. Those skilled in the art can make various equivalent changes or substitutions based on the technical solutions of the present invention, and all such changes or substitutions should be included within the protection scope of the present invention.

Claims

1. A method for guardrail type identification and cleaning visualization based on image feature extraction, characterized in that, The method includes: Step S1, Image Acquisition and Adaptive Preprocessing: The image of the guardrail in front is acquired in real time by the vehicle-mounted industrial camera, and grayscale conversion, adaptive histogram equalization and Gaussian filtering are performed on the acquired image in sequence to obtain the preprocessed image. Step S2, Multi-scale gradient fusion edge detection and waveform contour extraction steps: Perform multi-scale gradient operator convolution operations on the preprocessed image respectively, and obtain a multi-scale gradient fusion map by weighted fusion of the gradient response maps of each scale. Perform non-maximum suppression and double threshold connection on the multi-scale gradient fusion map to obtain the edge image, and obtain a continuous guardrail waveform contour by connecting the broken edges through morphological closure operation. Step S3, Morphological parameter quantification and guardrail type classification and recognition steps: Perform peak detection and trough detection on the guardrail waveform contour, calculate three morphological parameters: peak spacing, peak height, and cross-sectional width, and combine the three morphological parameters into a feature vector. Classify and recognize the guardrail type by comparing it with the weighted Euclidean distance of the feature vector of the preset guardrail type template. The cross-sectional width is the projection width of the guardrail waveform contour perpendicular to the waveform propagation direction. The cross-sectional width is obtained by averaging the vertical pixel distance between the upper and lower boundaries of each horizontal pixel position in the effective area of ​​the guardrail waveform contour, and then converting it into the actual width using an image scale calibration coefficient. Step S4, Confidence assessment and adaptive parameter feedback correction step: Calculate the classification confidence based on the distance difference between the feature vector and the feature vector of each type of template. When the classification confidence is lower than the preset threshold, adjust the edge detection double threshold parameters in step S2 in reverse to optimize the contour extraction quality, forming a closed-loop feedback correction between step S2 and step S4. Step S5, Visual Overlay Rendering and Cleaning Parameter Mapping Step: The guardrail type identification result, contour matching confidence heatmap, and corresponding cleaning parameters are rendered onto the acquired image in an overlay annotation manner to generate a visual monitoring screen and display it in real time on the touch screen in the driver's cab; wherein the contour matching confidence heatmap is generated as follows: for each pixel position in the acquired image, the local gradient direction histogram feature within the local neighborhood window centered on the pixel position is extracted, and the local gradient direction histogram feature is normalized and cross-correlated with the standard waveform template corresponding to the identified guardrail type to obtain the local contour matching degree at the pixel position. The value of each pixel in the contour matching confidence heatmap represents the local contour matching degree at the pixel position, and the local contour matching degree at each pixel position is mapped from high to low to a pseudo-color value from warm to cool tones.

2. The method for guardrail type identification and cleaning visualization based on image feature extraction according to claim 1, characterized in that, In step S1, the adaptive histogram equalization adopts the contrast-limited adaptive histogram equalization method, wherein the cropping limit value is set to 2.0 to 4.0, and the block size is set to 8×8 pixels.

3. The method for guardrail type identification and cleaning visualization based on image feature extraction according to claim 1, characterized in that, In step S2, the gradient operators of the multiple scales include the 3×3 scale Sobel operator, the 5×5 scale Sobel operator, and the 7×7 scale Sobel operator. The fusion weights of the gradient response maps at each scale correspond to detail weights, intermediate weights, and global weights, respectively, and the sum of the three is 1.

4. The method for guardrail type identification and cleaning visualization based on image feature extraction according to claim 1, characterized in that, In step S3, the peak spacing is the actual distance calculated by scaling the pixel distance between two adjacent peaks in the horizontal direction, the wave height is the actual height calculated by scaling the pixel distance between peaks and troughs in the vertical direction within a single waveform period, and the cross-sectional width is the projected width of the waveform profile perpendicular to the waveform propagation direction.

5. The method for guardrail type identification and cleaning visualization based on image feature extraction according to claim 1, characterized in that, In step S2, the weighted fusion adopts an adaptive weighting strategy based on the gradient magnitude signal-to-noise ratio, wherein the fusion weight of each scale is obtained by normalizing the ratio of the mean gradient magnitude to the standard deviation of the gradient magnitude of the gradient response map at that scale.

6. The method for guardrail type identification and cleaning visualization based on image feature extraction according to claim 1, characterized in that, In step S3, in the weighted Euclidean distance comparison, the weight of the crest spacing is 0.4 to 0.5, the weight of the wave height is 0.3 to 0.4, the weight of the cross-sectional width is 0.15 to 0.25, and the sum of the three weights is 1.

7. The method for guardrail type identification and cleaning visualization based on image feature extraction according to claim 1, characterized in that, In step S4, the classification confidence is calculated as follows: the weighted Euclidean distance between the feature vector and the nearest template feature vector is the minimum distance, and the weighted Euclidean distance between the feature vector and the second nearest template feature vector is the second minimum distance. The classification confidence is equal to 1 minus the ratio of the minimum distance to the second minimum distance plus a smoothing term. The smoothing term is a value greater than zero and less than or equal to 0.

01.

8. The method for guardrail type identification and cleaning visualization based on image feature extraction according to claim 1, characterized in that, In step S4, the reverse adjustment of the edge detection dual threshold parameters in step S2 includes: decreasing the low threshold of the dual threshold by a preset step size, and the reduced low threshold is not lower than the preset low threshold lower limit; decreasing the high threshold of the dual threshold by a preset step size, and the reduced high threshold is not lower than the preset high threshold lower limit; and re-executing steps S2 to S4 with the updated dual thresholds, terminating the iteration when any of the following conditions are met: the classification confidence reaches the preset threshold, the low threshold has dropped to the low threshold lower limit, the high threshold has dropped to the high threshold lower limit, or the number of iterations reaches the maximum number of iterations.

9. The method for guardrail type identification and cleaning visualization based on image feature extraction according to claim 1, characterized in that, In step S5, the cleaning parameters include brush height, brush rotation speed, and brush extension distance. The correspondence between each cleaning parameter and the guardrail type is stored in a preset cleaning parameter mapping table. The contour matching confidence heatmap is generated by mapping the local feature matching degree at each pixel position of the original image to color values.

10. A visual system for guardrail type identification and cleaning based on image feature extraction, characterized in that: The system is used to execute the image feature extraction-based guardrail type identification and cleaning visualization method according to any one of claims 1 to 9. The system includes: an image acquisition and adaptive preprocessing module, which is used to acquire images of the guardrail in front in real time through an on-board industrial camera and perform grayscale conversion, adaptive histogram equalization and Gaussian filtering noise reduction on the acquired images to obtain a preprocessed image. The multi-scale gradient fusion edge detection and waveform contour extraction module is used to perform multi-scale gradient operator convolution operations on the preprocessed image and obtain continuous guardrail waveform contours through weighted fusion, non-maximum suppression, double threshold connection and morphological closure operation. The morphological parameter quantification and guardrail type classification and recognition module is used to perform peak detection and trough detection on the guardrail waveform contour and calculate three morphological parameters: peak spacing, peak height, and cross-sectional width. Guardrail type classification and recognition are achieved through weighted Euclidean distance comparison. The cross-sectional width is the projection width of the guardrail waveform contour perpendicular to the waveform propagation direction. The cross-sectional width is obtained by averaging the vertical pixel distance between the upper and lower boundaries of each horizontal pixel position in the effective area of ​​the guardrail waveform contour and then converting it into the actual width using an image scale calibration coefficient. The confidence assessment and adaptive parameter feedback correction module is used to calculate the classification confidence based on the distance difference between the feature vector and the template feature vector, and to adjust the dual threshold parameters of the multi-scale gradient fusion edge detection and waveform contour extraction module in reverse when the confidence is lower than a preset threshold. The visualization overlay rendering and cleaning parameter mapping module is used to render the guardrail type identification results, contour matching confidence heatmap, and corresponding cleaning parameters onto the acquired image in an overlay annotation manner and display them in real time on the driver's cab touch screen. The contour matching confidence heatmap is generated as follows: for each pixel position in the acquired image, the local gradient direction histogram feature within the local neighborhood window centered on that pixel position is extracted. The local gradient direction histogram feature is then normalized and cross-correlated with the standard waveform template corresponding to the identified guardrail type to obtain the local contour matching degree at that pixel position. The value of each pixel in the contour matching confidence heatmap represents the local contour matching degree at that pixel position, and the local contour matching degree at each pixel position is mapped from high to low to a pseudo-color value from warm to cool tones.