A control method for a vehicle-mounted height limit alarm system based on a binocular camera
By equipping vehicles with binocular cameras and the YOLOv5-Lite system, and combining it with an improved adaptive window algorithm to optimize the disparity map, the high cost and computational inaccuracy issues of vehicle-mounted height limit warning systems are resolved, achieving flexible deployment and precise ranging.
Patent Information
- Application Number
- CN202210709592.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-21
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2042-06-21
AI Technical Summary
The existing vehicle height limit alarm system is expensive and has inaccurate calculations, making it difficult to apply on a large scale, especially in backward areas or on roads with low traffic volume, where its promotion value is low.
A binocular camera is installed on the car, combined with the YOLOv5-Lite system and the improved adaptive window algorithm to optimize the disparity map, improve the ranging accuracy and reduce the system cost.
It achieves flexible deployment, reduces costs, and improves ranging accuracy. It is suitable for mobile and embedded terminals, reduces noise interference, and improves calculation accuracy.
Smart Images

Figure CN115240162B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields related to binocular stereo vision, image recognition, target detection and embedded system development, and in particular to a control method for a vehicle-mounted height limit alarm system based on a binocular camera. Background Art
[0002] In recent years, the transportation industry has experienced rapid growth, driven by the substantial expansion of my country's highway network. Its enormous scale now represents a significant portion of the national economy. Within this sector, the wide width of transport vehicles often prevents drivers from accurately assessing the vehicle's height when encountering obstacles such as height limit poles, arched bridge tunnels, and culverts, often leading to transportation accidents.
[0003] Currently, there are two main measures in the field of vehicle-mounted height limit alarm systems. The first is to add early warning devices to height limit poles to prevent accidents involving over-height vehicles. However, the overall cost of this method is too high and it is not suitable for use in some backward areas. The other method is to install lidar sensors, infrared ranging sensors or cameras on the vehicle to detect the height of the height limit device during driving. However, this method has very high requirements for ranging algorithms and acquisition equipment. The accuracy and efficiency of some currently known algorithms need to be further improved.
[0004] In the paper "Design of a New Road Height Limit Detection System Based on Three-Dimensional Measurement", two ultra-high-definition cameras are hung on the edge columns on both sides of the detection road. This method can be deployed on large lanes. The patent publication number is CN112630791A, and the patent name is "A method for measuring the height limit of special vehicles". A laser multi-line radar is used as a measuring device, which is more accurate than general infrared ranging and camera ranging. The patent publication number is CN114463388A, and the patent name is "A method, system and intelligent terminal for detecting height limit devices based on binocular cameras". A training model is used to identify height limit scenes, which can realize the recognition of some height limit equipment, greatly improving the intelligence of the system. The above three existing technologies can all solve the above problems.
[0005] However, in the paper "Design of a New Road Height Limit Detection System Based on Three-Dimensional Measurement", two ultra-high-definition cameras are hung on the edge pillars on both sides of the detection road. This method can be deployed on the road, but it cannot be carried on vehicles and is not flexible enough. In addition, this method can achieve the expected effect in detection, but the overall cost of the equipment is relatively high, especially in some rural areas, underdeveloped areas or sections with low traffic volume. It is difficult to deploy and has low promotion value.
[0006] In the patent publication number CN112630791A, the patent name is a special vehicle height limit measurement method. Although the use of laser multi-line radar as a measuring device has been avoided, reducing the cost of the system, the cost of the single-point laser radar used in the system is still very high, so the system still has certain disadvantages in large-scale applications.
[0007] In the patent publication number CN114463388 A, entitled "Height Limiting Device Detection Method, System and Intelligent Terminal Based on Binocular Camera", a training model is used to identify height-limited scenes. However, the memory and computing power on embedded devices are currently far behind those on computers, so smaller models and algorithms should be selected as much as possible for target detection. In addition, a disparity map is generated to calculate the height of the height limiting device. However, the disparity map generated by the image acquired by the camera will be affected by holes and noise factors, resulting in a certain error in the calculated distance.
[0008] Therefore, the above three existing technologies still have the problems of high cost and inaccurate calculation, which makes the system unable to be used on a large scale. Summary of the Invention
[0009] The present invention proposes a control method for a vehicle-mounted height limit warning system based on a binocular camera. The binocular camera is directly mounted on the vehicle, which is convenient and flexible, and does not require the expensive establishment of a height limit warning system on the road. The system adopts YOLOv5-Lite, making it easy to deploy on mobile and embedded terminals. In addition, an improved adaptive window method is used to optimize the disparity map generated, greatly improving the accuracy of ranging. Finally, the system uses a binocular camera to collect image information, which can achieve significant cost savings compared to lidar. The above-mentioned technical problems can be effectively solved.
[0010] The present invention is achieved through the following technical solutions:
[0011] A control method for a vehicle-mounted height limit alarm system based on a binocular camera is proposed. The binocular camera is directly mounted on the vehicle and, through the YOLOv5-Lite system, can be easily deployed on mobile and embedded devices. The disparity map is optimized using an improved adaptive window method to improve the accuracy of ranging. The method includes the following steps:
[0012] S1: binocular camera collects information about the road ahead of the vehicle;
[0013] S2: preprocessing the collected images;
[0014] S3: Input the processed image into the YOLOv5-Lite target detection network to detect obstacles;
[0015] S4: Determine whether the binocular camera detects an obstacle. If so, proceed to S5; if not, proceed to S1.
[0016] S5: Output the target category and coordinate information of the obstacle;
[0017] S6: Use the SGBM algorithm to match binocular vision images and generate disparity maps;
[0018] S7: Use the improved adaptive window algorithm to optimize the disparity map;
[0019] From step S6, we can get the disparity maps generated by the left and right cameras. The left disparity map is named D L , the right disparity map is named D R The specific method of using the improved adaptive window algorithm to optimize the disparity map is as follows:
[0020] S71: Left and right consistency detection determines the distortion point, using z(x, y) as the traversed pixel point, and the disparity value D of the corresponding pixel point in the left disparity map L (x, y), the right disparity map corresponds to the pixel z (xD L The disparity value of (x, y), y) is D R (xD L (x, y), y); when the absolute value of the difference between the two disparity values is less than the threshold T, it indicates a valid disparity; when the absolute value of the difference between the two disparity values is greater than the threshold T and the disparity is not zero, it indicates a non-zero distortion point; if the absolute value is greater than the threshold T and the disparity is zero, it indicates a hole point; the formula is:
[0021] |D L (x, y)-D R (xD L (x, y), y)|<T;
[0022] S72: Filling with non-zero distortion points; if point z(x, y) is a non-zero distortion point, a 3x3 area centered at the point is selected as the initial window. If the difference between the 8 disparity points in the initial window and the current disparity value fluctuates little, the initial window is used. Otherwise, the cross method is used to redefine the area window W. The resulting formula is:
[0023]
[0024] Where δ(z) represents the variance of point z(x, y), t represents the threshold of disparity fluctuation, and W(z) represents the size of the window.
[0025] The cross method determines the window W. First, with this point as the center, we search for points near the center point in the horizontal and vertical directions that have different and non-zero disparity values from the current point. - x(x, y'), z + x (x, y'), z - x (x', y), z + x (x', y), constitute a window area W;
[0026] Compare the disparity values corresponding to the points in W and compare the size of the disparity values; remove the maximum and minimum disparity values in the area, and record the set of remaining disparity values as H, and mark the maximum value M in the set H max and the minimum value M min , calculate the average value M in the set mean ;
[0027] H={D L (x, y)|xi≤x≤x+i, yj≤y≤y+J, D L (x, y)!=Max(W[D L (x,y)])∧D L (x, y)!=Min(W[D L (x, y)]), (x, y, i, j∈N + )}
[0028]
[0029] Assign appropriate disparity values for filling according to the size of the disparity values of the non-zero distortion points;
[0030]
[0031] S73: Construct a variable adaptive window matrix; starting from the hole point, traverse from the x and y axis directions respectively, and find a point z with a non-zero disparity value x 、z y , whose coordinate values are z x (x, y'), z x (x', y) and the lower corner point z xy (x', y'). Let d x =(x'-x),d y =(y'-y), construct a coordinate system with the hole point z(x, y) as the starting point, d x is the width, d y For the high matrix N dx×dy ;
[0032]
[0033] S74: Find the number n of non-zero elements in the matrix N, the sum S of the corresponding elements in the matrix, and the average S meanFill holes;
[0034]
[0035] All pixels are detected according to steps S71 to S74;
[0036] S75: filtering the filled image using weighted mean filtering to eliminate generated noise;
[0037] S8: Convert the disparity map into a depth map to obtain the height of the target object;
[0038] S9: Compare the height of the obstacle with the height of the vehicle to determine whether the current vehicle can pass through. If not, proceed to S10; otherwise, proceed to S1.
[0039] S10: The vehicle cannot pass, prompting an alarm: the voice alarm module in the cockpit gives a voice prompt.
[0040] Furthermore, the specific operation method of step S1 is: installing a binocular camera on the top of the vehicle so that the camera has a wide field of view, and the binocular camera collects images based on the principle of binocular stereo vision to obtain images of the road section in front of the vehicle.
[0041] Furthermore, the specific operation method of step S2 is: the quality of the image directly affects the accuracy of the recognition algorithm. Therefore, after the image information is collected, the collected picture needs to be preprocessed, which includes image grayscale, geometric transformation, and image enhancement. Through image preprocessing, irrelevant information in the image can be eliminated, useful real information can be restored, and the detectability of relevant information can be enhanced.
[0042] Furthermore, the specific operation method of step S3 is: transferring the processed image information into the YOLOv5-Lite target detection network to identify the obstacle scene.
[0043] Furthermore, the construction of the YOLOv5-Lite target detection network specifically includes:
[0044] S31: Construct a dataset using the various height-limiting devices and images of height-limiting obstacles captured by the camera. This dataset is used to train the target detection model. After training, the optimal training result weight file and the final training result weight file are obtained. The optimal training result file is the optimal detection model we need.
[0045] S32: Deploy the optimal detection model obtained in S31 to the embedded device.
[0046] Furthermore, the specific operation method of step S4 is as follows: This step is to make a judgment: the obstacle information in the video file captured by the binocular camera is marked one by one through S3. If obstacle information is detected, S5 is executed; if no obstacle is detected, it means that there is no height limit device on the current road, and the driver can drive safely, and return to S1 for execution.
[0047] Furthermore, the specific operation of step S5 is as follows: if S4 detects an obstacle, the obstacle will be marked with a box, the obstacle category name and obstacle recognition rate will be displayed in the mark, and the obstacle coordinate point information will be returned, and the target category and coordinate information of the obstacle will be output.
[0048] Furthermore, the specific operation method of step S6 is: using the SGBM algorithm in binocular stereo vision matching to process the area included in the obstacle to generate a disparity map.
[0049] Furthermore, the specific operation of step S8 is: converting the disparity map optimized in S7 into a depth map, converting the disparity value into a depth value, and then calculating the actual height value of the target obstacle;
[0050] depth = (f*baseline) / disp;
[0051] depth is the depth value, f is the normalized focal length, baseline is the baseline distance, and disp is the disparity value.
[0052] Furthermore, the specific operation method of step S9 is as follows: this step is to make a judgment: if the height of the obstacle is greater than the height of the vehicle, return to S1; if the height of the obstacle is less than the height of the vehicle, execute S10.
[0053] Beneficial effects
[0054] The control method of a vehicle-mounted height limit alarm system based on a binocular camera proposed in the present invention has the following beneficial effects compared with the conventional prior art:
[0055] (1) This technical solution can directly install the binocular camera on the car, which is convenient and flexible. There is no need to spend expensive money to establish a height limit warning system on the road, which reduces the cost of height limit equipment. The system uses YOLOv5-Lite, which makes it easy to deploy on mobile and embedded terminals, realizing the simple installation of the system. In addition, the improved adaptive window method is used to optimize the disparity map generated, which greatly improves the accuracy of ranging. Finally, the system uses binocular cameras to collect image information, which can achieve a lot of cost savings compared to lidar. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1It is a schematic diagram of the overall process of the present invention.
[0057] Figure 2 Schematic diagram of the disparity map optimization process of the present invention.
[0058] Figure 3 A schematic diagram of a system control framework provided by an embodiment of the present invention.
[0059] Figure 4 This is a comparison chart obtained when conducting experimental comparisons in the embodiments of the present invention. DETAILED DESCRIPTION
[0060] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0061] Example 1:
[0062] like Figure 1-Figure 3 As shown in the figure, a control method for a vehicle-mounted height limit alarm system based on a binocular camera is shown. The binocular camera is directly mounted on the vehicle and, through the YOLOv5-Lite system, can be easily deployed on mobile and embedded terminals. The disparity map is optimized using an improved adaptive window method to improve the accuracy of ranging. The method includes the following steps:
[0063] S1: binocular camera collects information about the road ahead of the vehicle;
[0064] Mount the binocular camera on the top of the vehicle to provide a wide field of view. The binocular camera captures images based on the principle of binocular stereo vision, capturing images of the road ahead. S2: Preprocess the captured images.
[0065] The quality of the image directly affects the accuracy of the recognition algorithm. Therefore, after collecting the image information, the collected image needs to be preprocessed, which includes image grayscale, geometric transformation, and image enhancement. Through image preprocessing, irrelevant information in the image can be eliminated, useful real information can be restored, and the detectability of relevant information can be enhanced.
[0066] S3: Input the processed image into the YOLOv5-Lite target detection network to detect obstacles;
[0067] The processed image information is passed to the YOLOv5-Lite target detection network to identify obstacle scenes. Building the YOLOv5-Lite target detection network specifically includes:
[0068] S31: Construct a dataset using the various height-limiting devices and images of height-limiting obstacles captured by the camera. This dataset is used to train the target detection model. After training, the optimal training result weight file and the final training result weight file are obtained. The optimal training result file is the optimal detection model we need.
[0069] S32: Deploy the optimal detection model obtained in S31 to the embedded device. S4: Determine whether the binocular camera detects an obstacle. If yes, proceed to S5; if no, proceed to S1.
[0070] This step is to make a judgment: through S3, the obstacle information in the video file captured by the binocular camera is marked one by one. If the obstacle information is detected, S5 is executed; if no obstacle is detected, it means that there is no height limit device on the current road, and the driver can drive safely, and the process returns to S1.
[0071] S5: Output the target category and coordinate information of the obstacle;
[0072] If S4 detects an obstacle, it will mark the obstacle with a box, display the category name of the obstacle, the recognition rate of the obstacle, and return the obstacle coordinate point information, and output the target category and coordinate information of the obstacle.
[0073] S6: Use the SGBM algorithm to match binocular vision images and generate disparity maps;
[0074] The SGBM algorithm in binocular stereo vision matching is used to process the area contained by the obstacle and generate a disparity map.
[0075] S7: Use the improved adaptive window algorithm to optimize the disparity map;
[0076] From step S6, we can get the disparity maps generated by the left and right cameras. The left disparity map is named D L , the right disparity map is named D R The specific method of using the improved adaptive window algorithm to optimize the disparity map is as follows:
[0077] S71: Left and right consistency detection determines the distortion point, using z(x, y) as the traversed pixel point, and the disparity value D of the corresponding pixel point in the left disparity map L (x, y), the right disparity map corresponds to the pixel z (xD L The disparity value of (x, y), y) is D R (xD L(x, y), y); when the absolute value of the difference between the two disparity values is less than the threshold T, it indicates a valid disparity; when the absolute value of the difference between the two disparity values is greater than the threshold T and the disparity is not zero, it indicates a non-zero distortion point; if the absolute value is greater than the threshold T and the disparity is zero, it indicates a hole point; the formula is:
[0078] |D L (x, y)-D R (xD L (x, y), y)|<T;
[0079] S72: Filling with non-zero distortion points; if point z(x, y) is a non-zero distortion point, a 3x3 area centered at the point is selected as the initial window. If the difference between the 8 disparity points in the initial window and the current disparity value fluctuates little, the initial window is used. Otherwise, the cross method is used to redefine the area window W. The resulting formula is:
[0080]
[0081] Where δ(z) represents the variance of point z(x, y), t represents the threshold of disparity fluctuation, and W(z) represents the size of the window.
[0082] The cross method determines the window W. First, with this point as the center, we search for points near the center point in the horizontal and vertical directions that have different and non-zero disparity values from the current point. - x (x, y'), z + x (x, y'), z - x (x', y), z + x (x', y), constitute a window area W;
[0083] Compare the disparity values corresponding to the points in W and compare the size of the disparity values; remove the maximum and minimum disparity values in the area, and record the set of remaining disparity values as H, and mark the maximum value M in the set H max and the minimum value M min , calculate the average value M in the set mean ;
[0084] H={D L (x, y)|xi≤x≤x+i, yj≤y≤y+j, D L (x, y)!=Max(W[D L (x,y)])∧D L (x, y)!=Min(W[D L (x, y)]), (x, y, i, j∈N + )}
[0085]
[0086] Assign appropriate disparity values for filling according to the size of the disparity values of the non-zero distortion points;
[0087]
[0088] S73: Construct a variable adaptive window matrix; starting from the hole point, traverse from the x and y axis directions respectively, and find a point z with a non-zero disparity value x 、z y , whose coordinate values are z x (x, y'), z x (x', y) and the lower corner point z xy (x', y'). Let d x =(x'-x),d y =(y'-y), construct a coordinate system with the hole point z(x, y) as the starting point, d x is the width, d y For the high matrix N dx×dy ;
[0089]
[0090] S74: Find the number n of non-zero elements in the matrix N, the sum S of the corresponding elements in the matrix, and the average S mean Fill holes;
[0091]
[0092] All pixels are detected according to steps S71 to S74;
[0093] S75: Using weighted mean filtering to filter the filled image to eliminate generated noise.
[0094] S8: Convert the disparity map into a depth map to obtain the height of the target object;
[0095] Convert the disparity map optimized by S7 into a depth map, convert the disparity value into a depth value, and then calculate the actual height value of the target obstacle;
[0096] depth = (f*baseline) / disp;
[0097] depth is the depth value, f is the normalized focal length, baseline is the baseline distance, and disp is the disparity value.
[0098] S9: Compare the height of the obstacle with the height of the vehicle to determine whether the current vehicle volume can pass through. If not, proceed to S10; otherwise, proceed to S1.
[0099] If the height of the obstacle is greater than the vehicle height, the process returns to S1 ; if the height of the obstacle is less than the vehicle height, the process proceeds to S10 .
[0100] S10: The vehicle cannot pass and an alarm is prompted; the voice alarm module in the cockpit gives a voice prompt.
[0101] The inventor conducted experiments in the laboratory using the above method. The experimental environment used Windows 10 operating system, Nvidia GeForce RTX 3050Ti (8G memory) GPU graphics card, Inter(R) Core(TM) i5-12500H CPU@3.5GHz CPU processor, and a laptop with a 256G solid-state drive. An ordinary camera with a resolution of 640*480 was used as the acquisition device, and MatalaB2021b was used as the image processing software.
[0102] In order to verify the accuracy of the view optimization algorithm, a special target detection dataset for detecting height-limited obstacles is constructed, and some height-limited scenes are selected from the dataset for testing.
[0103] like Figure 4 As shown in the figure, (a) is the original image, (b) is the original disparity map obtained by the SGBM algorithm, (c) is the disparity-optimized map obtained by processing with the adaptive window algorithm based on the SGBM algorithm, and (d) is the disparity-optimized map obtained by processing with the improved adaptive window algorithm based on the SGBM algorithm. The disparity map optimization images show that the disparity map optimized by this algorithm has a large reduction in disparity holes, a clear disparity map outline, and a clearer overall display.
[0104] To further illustrate the superiority of the algorithm, we use the four most commonly used standard left and right stereo image pairs provided by Middlebury, a dataset specifically used to evaluate stereo matching algorithms: Cones, Tsukuba, Venus, and Teddy. We compare the BM, SGBM, and the algorithm proposed in this paper. The test results are shown in Table 1:
[0105] Table 1 Algorithm performance comparison
[0106]
[0107] The BM algorithm compared in the table above is a block matching algorithm. It divides the frames of two cameras into many small blocks for matching. It moves the small blocks to match the small blocks in the other image. The distance is calculated by combining the pixel positions of different small blocks in the other image with the relationship data of the two cameras. The SGBM algorithm is a semi-global matching algorithm that effectively balances the advantages and disadvantages of local matching and global matching. It minimizes the global energy function of the entire image by finding the optimal disparity for each pixel. The adaptive window algorithm finds the closest non-zero disparity value in the horizontal and vertical directions in the disparity hole area, generates an adaptive matrix window based on the coordinates, and calculates the mean disparity within the window to fill the hole area, thereby completing the disparity map optimization.
[0108] As can be seen from Table 1, the proposed algorithm has improved the matching accuracy compared with other algorithms.
Claims
1. A control method for a vehicle-mounted height limit warning system based on a binocular camera. This method uses the YOLOv5-Lite system to enable easy deployment on mobile and embedded devices. The method also optimizes the disparity map using an improved adaptive window method to improve ranging accuracy. The method is characterized by: Including steps: S1: binocular camera collects information about the road ahead of the vehicle; S2: preprocessing the collected images; S3: Input the processed image into the YOLOv5-Lite target detection network to detect obstacles; S4: Determine whether the binocular camera detects an obstacle. If so, proceed to S5; if not, proceed to S1. S5: Output the target category and coordinate information of the obstacle; S6: Use the SGBM algorithm to match binocular vision images and generate disparity maps; S7: Use the improved adaptive window algorithm to optimize the disparity map; From step S6, we can get the disparity maps generated by the left and right cameras. The left disparity map is named D L , the right disparity map is named D R The specific method of using the improved adaptive window algorithm to optimize the disparity map is as follows: S71: Left and right consistency detection determines the distortion point, using z(x, y) as the traversed pixel point, and the disparity value D of the corresponding pixel point in the left disparity map L (x, y), the right disparity map corresponds to the pixel z (xD L The disparity value of (x, y), y) is D R (xD L (x, y), y); when the absolute value of the difference between the two disparity values is less than the threshold T, it indicates a valid disparity; when the absolute value of the difference between the two disparity values is greater than the threshold T and the disparity is not zero, it indicates a non-zero distortion point; If the absolute value is greater than the threshold T and the disparity is zero, it indicates a hole point; the formula is: |D L (x,y)-D R (x-D L (x,y),y)|<T; S72: Filling with non-zero distortion points; if point z(x, y) is a non-zero distortion point, a 3x3 area centered at the point is selected as the initial window. If the difference between the 8 disparity points in the initial window and the current disparity value fluctuates little, the initial window is used. Otherwise, the cross method is used to redefine the area window W. The resulting formula is: Where δ(z) represents the variance of point z(x, y), t represents the threshold of disparity fluctuation, and W(z) represents the size of the window. The cross method determines the window W. First, with this point as the center, we search for points near the center point in the horizontal and vertical directions that have different and non-zero disparity values from the current point. - x (x, y'), z + x (x, y'), z - x (x', y), z + x (x', y), constitute a window area W; Compare the disparity values corresponding to the points in W and compare the size of the disparity values; remove the maximum and minimum disparity values in the area, and record the set of remaining disparity values as H, and mark the maximum value M in the set H max and the minimum value M min , calculate the average value M in the set mean ; H={D L (x,y)|x-i≤x≤x+i,y-j≤y≤y+j,D L (x,y)!=Max(W[D L (x,y)])∧D L (x,y)!=Min(W[D L (x,y)]),(x,y,i,j∈N + )} Assign appropriate disparity values for filling according to the size of the disparity values of the non-zero distortion points; S73: Construct a variable adaptive window matrix; starting from the hole point, traverse from the x and y axis directions respectively, and find a point z with a non-zero disparity value x 、z y , whose coordinate values are z x (x, y'), z x (x', y) and the lower corner point z xy (x', y'), let d x =(x'-x),d y =(y'-y), construct a coordinate system with the hole point z(x, y) as the starting point, d x is the width, d y For the high matrix N dx×dy ; S74: Find the number n of non-zero elements in the matrix N, the sum S of the corresponding elements in the matrix, and the average S mean Fill holes; All pixels are detected according to steps S71 to S74; S75: filtering the filled image using weighted mean filtering to eliminate generated noise; S8: Convert the disparity map into a depth map to obtain the height of the target object; S9: Compare the height of the obstacle with the height of the vehicle to determine whether the current vehicle can pass through. If not, proceed to S10; otherwise, proceed to S1. S10: The vehicle cannot pass, prompting an alarm: the voice alarm module in the cockpit gives a voice prompt.
2. The control method of a vehicle height limit warning system based on a binocular camera according to claim 1, characterized in that: The specific operation method of step S1 is: install the binocular camera on the top of the vehicle so that the camera has a wide field of view. The binocular camera collects images based on the principle of binocular stereo vision to obtain images of the road section in front of the vehicle.
3. The control method of a vehicle height limit warning system based on a binocular camera according to claim 1, characterized in that: The specific operation method of step S2 is: the quality of the image directly affects the accuracy of the recognition algorithm. Therefore, after the image information is collected, the collected image needs to be preprocessed, which includes image grayscale, geometric transformation, and image enhancement. Through image preprocessing, irrelevant information in the image can be eliminated, useful real information can be restored, and the detectability of relevant information can be enhanced.
4. The control method of a vehicle height limit warning system based on a binocular camera according to claim 1, characterized in that: The specific operation method of step S3 is: passing the processed image information into the YOLOv5-Lite target detection network to identify the obstacle scene.
5. The control method of a vehicle height limit warning system based on a binocular camera according to claim 1 or 4, characterized in that: The construction of the YOLOv5-Lite target detection network specifically includes: S31: Construct a data set. This data set is constructed using the various height-limiting devices and height-limiting obstacle image information collected by the camera. This data set is used to train the target detection model. After training, the optimal training result weight file and the final training result weight file will be obtained. The optimal training result file is the optimal detection model we need. S32: Deploy the optimal detection model obtained in S31 to the embedded device.
6. The control method of a vehicle height limit warning system based on a binocular camera according to claim 1, characterized in that: The specific operation method of step S4 is: This step is to make a judgment: the obstacle information in the video file collected by the binocular camera is marked one by one through S3. If obstacle information is detected, S5 is executed; if no obstacle is detected, it means that there is no height limit device on the current road, and the driver can drive safely, and return to S1 for execution.
7. The control method of a vehicle height limit warning system based on a binocular camera according to claim 1, characterized in that: The specific operation of step S5 is as follows: if an obstacle is detected in S4, the obstacle will be marked with a box, the obstacle category name and obstacle recognition rate will be displayed in the mark, and the obstacle coordinate point information will be returned, and the target category and coordinate information of the obstacle will be output.
8. The control method of a vehicle height limit warning system based on a binocular camera according to claim 1, characterized in that: The specific operation method of step S6 is: using the SGBM algorithm in binocular stereo vision matching to process the area contained by the obstacle and generate a disparity map.
9. The control method of a vehicle height limit warning system based on a binocular camera according to claim 1, characterized in that: The specific operation of step S8 is: converting the disparity map optimized in S7 into a depth map, converting the disparity value into a depth value, and then calculating the actual height value of the target obstacle; the formula for calculating the actual height value of the target obstacle is: depth = (f*baseline) / disp; depth is the depth value, f is the normalized focal length, baseline is the baseline distance, and disp is the disparity value.
10. The control method of a vehicle height limit warning system based on a binocular camera according to claim 1, characterized in that: The specific operation method of step S9 is: this step is to make a judgment: if the height of the obstacle is greater than the height of the vehicle, return to S1; if the height of the obstacle is less than the height of the vehicle, execute S10.
Citation Information
Patent Citations
Special vehicle height limit measuring method
CN112630791A
Height limiting device detection method and system based on binocular camera and intelligent terminal
CN114463388A
Pavement height detection method and system based on binocular stereo vision, and intelligent terminal
CN114049307A
Method for constructing grid map by using binocular stereo camera
US20220044474A1