Unmanned vehicle vision processing method, system and unmanned vehicle equipment based on road shoulder features

Through the unmanned vehicle visual processing method based on road shoulder characteristics, erroneous data is discarded and the previous correct data is used for control. Combined with the PID controller and compensation mechanism, the stability problem caused by data errors in the unmanned vehicle visual navigation is solved and improved Improve the reliability and control accuracy of automatic navigation.

CN114724102BActive Publication Date: 2024-10-11HUAZHONG UNIV OF SCI & TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210201988.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-03
Publication Date
2024-10-11
Estimated Expiration
2042-03-03

AI Technical Summary

Technical Problem

Existing unmanned vehicle visual navigation technology is easily affected by factors such as vehicle body vibration, changes in road conditions, visual algorithm errors, and image acquisition device failures during field operation, resulting in errors in visual processing results and affecting the reliability and stability of the control process.

Method used

An unmanned vehicle visual processing method based on road shoulder characteristics is adopted to collect depth images of the road shoulder, analyze visual recognition data, judge and discard erroneous data, use the previous correct data for control, and combine the PID controller and compensation mechanism to adjust the unmanned vehicle deviation. angle to ensure that the distance to the road shoulder is close to the target distance.

Benefits of technology

It improves the reliability and stability of automatic navigation of unmanned vehicles, avoids control instability caused by single-frame data errors, and enhances the robustness and control accuracy of visual recognition algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114724102B_ABST
    Figure CN114724102B_ABST
Patent Text Reader

Abstract

The present invention discloses a visual processing method for an unmanned vehicle based on shoulder features, a system thereof, and an unmanned vehicle device, the method comprising: step S1: collecting a depth image of the shoulder during the driving of the unmanned vehicle; step S2: analyzing the depth image to obtain visual recognition data, the visual recognition data including the deflection angle of the unmanned vehicle and the distance from the shoulder; step S3: judging whether there is an error in obtaining the current visual recognition data, if there is no error, storing it as the current processing data, if there is an error, discarding the current visual recognition data, and retrieving the visual recognition data stored last time as the current processing data; step S4: calculating an adjustment instruction for adjusting the deflection angle of the unmanned vehicle according to the current processing data so that the distance between the unmanned vehicle and the shoulder approaches the target distance. By introducing an error discrimination mechanism, the situation in which the entire control process is destabilized due to errors in one or several frames of data can be avoided, thereby improving the reliability and stability of the control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of autonomous driving, and more specifically, relates to an unmanned vehicle visual processing method based on shoulder features, an unmanned vehicle visual processing system based on shoulder features, and an unmanned vehicle device for automatic navigation based on shoulder features. Background Art

[0002] With the continuous development of social economy and science and technology, unmanned operation has become one of the main goals of the new era, and the continuous progress of machine vision and automation technology is gradually making it possible. In many fields such as construction, transportation, industrial manufacturing, and agricultural production, unmanned operation vehicles based on machine vision have begun to appear and shine.

[0003] The basis of unmanned operation vehicles is automatic navigation vehicles, or AGVs. AGVs refer to transport vehicles equipped with various automatic navigation devices based on different principles, which can travel along a predetermined or desired path. At present, AVGs widely use visual navigation. Visual navigation does not require any physical path or sign to be set manually. It only requires that certain features always exist in the scene, and images are collected through CCD cameras or lidar sensors to identify specific visual features and make corresponding judgments. Since urban road scenes are changeable but shoulder features always exist, automatic navigation technology based on visual feature recognition is more applicable. However, various unpredictable situations may occur during field operation, such as vibration of the vehicle body, changes in road conditions, errors in visual algorithms, or failures in image acquisition devices... All of the above situations may cause errors in the results of visual processing or even failure to obtain results, thereby affecting the reliability and stability of the entire control process. Summary of the invention

[0004] In response to the above defects or improvement needs of the prior art, the present invention provides an unmanned vehicle visual processing method based on shoulder features, an unmanned vehicle visual processing system based on shoulder features, and an unmanned vehicle equipment for automatic navigation based on shoulder features, the purpose of which is to improve the reliability and stability of the unmanned vehicle's automatic navigation.

[0005] To achieve the above object, according to one aspect of the present invention, a visual processing method for an unmanned vehicle based on road shoulder features is provided, comprising:

[0006] Step S1: collecting a depth image of the road shoulder while the unmanned vehicle is driving;

[0007] Step S2: Analyze the depth image to obtain visual recognition data, wherein the visual recognition data includes the deflection angle of the unmanned vehicle and the distance from the road shoulder;

[0008] Step S3: determining whether there is an error in obtaining the current visual recognition data; if there is no error, storing it as the current processing data; if there is an error, discarding the current visual recognition data and retrieving the visual recognition data stored last time as the current processing data;

[0009] Step S4: Calculate an adjustment instruction for adjusting the deflection angle of the unmanned vehicle based on the current processed data so that the distance between the unmanned vehicle and the road shoulder approaches the target distance.

[0010] In one embodiment, in step S3, visually identifying data errors includes two types: gross errors and failure errors;

[0011] When the difference between the current visual recognition data and the stored previous frame visual recognition data exceeds the tolerable range, it is determined as a gross error;

[0012] When the visual recognition algorithm for acquiring visual recognition data fails to recognize, it is determined to be a failure error.

[0013] In one embodiment, when the difference between the current visual recognition data and the previously stored visual recognition data exceeds a tolerable range, it is determined to be a gross error, including:

[0014] When the difference between the deflection angle in the current visual recognition data and the deflection angle in the visual recognition data stored the previous time exceeds the tolerance value, it is determined to be a gross error.

[0015] In one embodiment, step S4 comprises:

[0016] Determine whether the unmanned vehicle is in a special situation based on the current processing data. If the unmanned vehicle is in a special situation, a correction instruction for adjusting the deflection angle of the unmanned vehicle is calculated based on the current distance between the unmanned vehicle and the road shoulder, and an angle adjustment instruction is obtained by superimposing a compensation value on the correction instruction. If the unmanned vehicle is not in a special situation, a correction instruction for adjusting the deflection angle of the unmanned vehicle is directly calculated based on the current distance between the unmanned vehicle and the road shoulder, and the correction instruction is directly output as an angle adjustment instruction.

[0017] The calculation formula of the compensation value is:

[0018]

[0019] In the formula, dy is the compensation value, x is the current deflection angle, y is max is the maximum value of the angle control, θ max is the maximum value of the wheel turning angle of the unmanned vehicle;

[0020] Among them, situations when no one is in special circumstances include:

[0021] Scenario 1: The vehicle body is biased to the left and the distance from the shoulder is less than the target distance; or

[0022] Scenario 2: The vehicle body is biased to the right and the distance from the road shoulder is greater than the target distance.

[0023] In one embodiment, step S2 includes: using the first to third visual recognition algorithms in sequence to identify the boundary between the shoulder and the road surface, calculating the deflection angle of the unmanned vehicle and the distance from the shoulder based on the boundary, and when the previous visual recognition algorithm fails to obtain the next visual recognition data, jumping to the next visual recognition algorithm for recognition until the visual recognition data is obtained or all the visual recognition algorithms fail to successfully recognize and end the recognition;

[0024] Among them, the first visual recognition algorithm is used to recognize the shoulder under normal circumstances, the second visual recognition algorithm is used to recognize the shoulder in abnormal circumstances such as close to the field of view boundary, too low shoulder or poor image quality, and the third visual recognition algorithm is used to recognize the shoulder in abnormal circumstances where foreign objects exist.

[0025] In one embodiment,

[0026] The first visual recognition algorithm uses the FindStraightEdge function, and the parameter configuration includes:

[0027] Demarcation line search direction: from left to right;

[0028] Edge polarity: The grayscale changes only from white to black;

[0029] Search strategy: best edge;

[0030] Minimum edge strength: (5~9.5)×10 3 ;

[0031] The differences between the second visual recognition algorithm and the first visual recognition algorithm include:

[0032] Demarcation line search direction: from right to left;

[0033] Edge polarity: The grayscale changes only from black to white;

[0034] Search strategy: Best edge rake;

[0035] Minimum edge strength: 9-11;

[0036] The differences between the third-level visual recognition algorithm and the second-level visual recognition algorithm include:

[0037] Minimum edge strength: 25-35;

[0038] Search strategy: Optimal edge projection.

[0039] In one of the embodiments, in step S1, a depth image of the road shoulder is collected by a laser radar, and the laser radar is fixed on the right side of the drone to vertically scan the image of the right road shoulder.

[0040] According to another aspect of the present invention, there is provided a vision processing system for an unmanned vehicle based on road shoulder features, comprising:

[0041] A data extraction module, used to acquire and analyze the depth image of the road shoulder to obtain visual recognition data, wherein the visual recognition data includes the deflection angle of the unmanned vehicle and the distance from the road shoulder;

[0042] The error judgment module is used to judge whether there is an error in obtaining the current visual recognition data. If there is no error, it is stored as the current processing data. If there is an error, the current visual recognition data is discarded and the visual recognition data stored last time is retrieved as the current processing data;

[0043] The control module is used to calculate the adjustment instructions for adjusting the deflection angle of the unmanned vehicle based on the current processing data so that the distance between the unmanned vehicle and the shoulder approaches the target distance.

[0044] In one embodiment, the control module includes a PID controller, a special situation determination module and a compensation module, wherein the PID controller is used to calculate a correction instruction for adjusting the deflection angle of the unmanned vehicle according to the current distance between the unmanned vehicle and the road shoulder;

[0045] The special situation determination module is used to determine whether the unmanned vehicle is in a special situation according to the current processing data. When the unmanned vehicle is in a special situation, the compensation module is triggered to calculate the compensation value and superimpose the compensation value on the correction instruction output by the PID controller to obtain the angle adjustment instruction. When the unmanned vehicle is not in a special situation, the compensation module does not work, and the correction instruction output by the PID controller is directly used as the angle adjustment instruction.

[0046] The calculation formula of the compensation value is:

[0047]

[0048] In the formula, dy is the compensation value, x is the current deflection angle, y is max is the maximum value of the angle control, θ max is the maximum value of the wheel turning angle of the unmanned vehicle;

[0049] Among them, situations when no one is in special circumstances include:

[0050] Scenario 1: The vehicle body is biased to the left and the distance from the shoulder is less than the target distance; or

[0051] Scenario 2: The vehicle body is biased to the right and the distance from the road shoulder is greater than the target distance.

[0052] According to another aspect of the present invention, there is provided an unmanned vehicle device for automatic navigation based on road shoulder features, comprising:

[0053] An unmanned vehicle and an image acquisition device, a host computer, a slave computer, a steering gear, and a drive motor mounted on the unmanned vehicle, wherein:

[0054] The image acquisition device is used to acquire the road shoulder image;

[0055] The host computer has the above-mentioned unmanned vehicle visual processing system based on road shoulder features, which is used to convert the road shoulder image into a depth image and calculate the adjustment instruction for adjusting the deflection angle of the unmanned vehicle based on the depth image;

[0056] The lower computer is used to receive adjustment instructions and control the steering gear to turn to adjust the deflection angle of the UAV.

[0057] In general, the present application establishes an error discrimination mechanism to actively discriminate and store visual recognition data. When the current visual recognition data is judged to be correct data, it is stored and used as available data. When the current visual recognition data is judged to be erroneous data, it is directly discarded and not stored. The erroneous data is replaced by the most recent available data to continue to complete the subsequent control process, thereby avoiding the situation where the entire control process becomes unstable due to errors in one or several frames of data, thereby improving the reliability and stability of the control. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 is a schematic diagram of the structure of an unmanned vehicle device in an embodiment of the present application;

[0059] Figure 2 is a schematic structural diagram of an auxiliary bracket in an embodiment of the present application;

[0060] Figure 3 is a hardware topology diagram of a drone control system in an embodiment of the present application;

[0061] Figure 4 is an architectural diagram of a drone control system in one embodiment of the present application;

[0062] Figure 5 is a flowchart of the steps of the unmanned vehicle visual processing method based on road shoulder features in one embodiment of the present application;

[0063] Figure 6 It is a flow chart of establishing communication between the host computer and the data acquisition device in one embodiment of the present application;

[0064] Figure 7 is a flow chart of visual recognition data acquisition in one embodiment of the present application;

[0065] Figure 8is a flow chart of calculating angle adjustment instructions in one embodiment of the present application;

[0066] Fig. 9 It is a framework diagram of an unmanned vehicle visual processing system based on road shoulder features in one embodiment of the present application. DETAILED DESCRIPTION

[0067] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0068] To facilitate understanding, we first introduce the unmanned vehicle equipment that automatically navigates based on road shoulder features.

[0069] like Figure 1 As shown, the unmanned vehicle equipment includes an unmanned vehicle 3 and a control system 5 mounted on the unmanned vehicle 3. Among them, the control system includes an upper computer system and a lower computer system, the upper computer system includes an image acquisition device 4 and an upper computer, and the lower computer system includes a lower computer, a steering gear and a drive motor. Under normal working conditions, the unmanned vehicle 3 drives to the right, and the feature to be captured is the shoulder feature. The image acquisition device 4 installed on the right side of the vehicle body vertically scans the road surface 1 and the shoulder 2 above the shoulder. The upper computer is equipped with an unmanned vehicle visual processing system based on the shoulder feature, which can convert the picture collected by the image acquisition device into a depth image and calculate the adjustment instruction for adjusting the deflection angle of the unmanned vehicle based on the depth image and send it to the lower computer, and the lower computer directly controls the steering gear to continuously turn to adjust the deflection angle of the vehicle body and the distance from the shoulder. Among them, the unmanned vehicle visual processing system based on the shoulder feature loaded by the upper computer will be introduced later.

[0070] In a specific embodiment, the image acquisition device is a laser radar. Specifically, since vehicles usually drive on the right, Figure 1 As shown, the laser radar is fixed on the right side plate of the unmanned vehicle using an auxiliary bracket. The installation height of the laser radar needs to be determined in combination with the technical parameters of the laser radar, such as field of view angle, resolution, effective measurement distance, etc. If the field of view angle of the laser radar is α*β and the vertical height is h, the calculation formula for the obtained field of view size is as follows:

[0071] Length a = 2*h*tan(α / 2)

[0072] Width b = 2*h*tan(β / 2)

[0073] Area s = a*b = 4*h2*tan(α / 2)*tan(β / 2)

[0074] The vertical height should be chosen so that the field of view covers the area of ​​interest including the vehicle body, road surface, and shoulder, and enables the lidar to obtain good image quality within the effective measurement distance to meet the requirements of visual processing.

[0075] As for the working posture of the laser radar, in order to simplify the extraction and processing of shoulder features and avoid the trouble of subsequent field of view conversion and coordinate transformation, this application directly adopts a scanning method perpendicular to the road surface. For example, the installation / working height of the laser radar can be 60cm from the ground, the laser radar itself remains horizontal, and the emitted laser scans the road surface and shoulders vertically. Among them, the auxiliary bracket is used to fix the laser radar in a predetermined working position and maintain the expected working posture. The auxiliary bracket is connected and fixed to the unmanned vehicle by screws and nuts, and has a certain structural strength and shock absorption ability.

[0076] In order to keep the laser radar in this position during operation, a bracket is designed to fix the laser radar. The model of the bracket is shown in the attached figure. Figure 2 As shown, the bracket includes a parallel bottom surface and a top surface. The bottom surface is fixed to the unmanned vehicle by screws and nuts. The top surface is provided with a mounting hole for accommodating the laser radar. The laser radar is accommodated in the mounting hole and scans vertically downward. Since the laser radar is light in weight, it is only necessary to use symmetrical reinforcing ribs to connect the top surface and the bottom surface on the side away from the vehicle body to increase the structural strength of the bracket. The bracket is fixed to the right side plate of the unmanned vehicle by screws and nuts.

[0077] Specifically, Figure 3 As shown, the host computer can be a PC that can run the unmanned vehicle automatic navigation system, and the lower computer can be a single-chip microcomputer. More specifically, the single-chip microcomputer can be an RM development board, the servo can be a DJI gimbal motor, the drive motor can be a Buke servo motor, and the PC can be a micro notebook. The notebook is the core of the host computer system. It communicates with the lidar through LabVIEW and sends control instructions to the RM development board. The RM development board is the core of the lower computer system. It receives control instructions from the host computer system and controls the DJI gimbal motor and Buke servo motor. Specifically, the lower computer controls the drive motor through PLC. During debugging, the DJI remote control transmitter / receiver can be used to assist in debugging during the system development process, but it does not belong to the hardware ultimately required for this application.

[0078] like Figure 4In terms of functions, the host computer mainly performs visual processing, and the lower computer mainly performs motion control according to the instructions of the host computer. Among them, the lower computer can run embedded C programs, and the host computer can run LabVIEW programs. It can be understood that the control system based on LabVIEW can also be implemented based on other software. The FreeRTOS operating system is used on the lower computer for task management, and three periodic tasks are set respectively: pan-tilt motor control task, control data reception and processing task, and USB virtual serial port communication task. The LabVIEW master VI is used on the host computer to integrate sub-VIs such as laser radar communication, visual recognition and processing, and serial port command sending. The serial port command sending sub-VI of the host computer is connected to the USB virtual serial port communication task of the lower computer to realize data communication.

[0079] Below, a vision processing method for an unmanned vehicle based on road shoulder features will be introduced. The host computer system in the above-mentioned unmanned vehicle can execute this method to realize automatic navigation of the unmanned vehicle.

[0080] like Figure 5 As shown, the unmanned vehicle visual processing method based on road shoulder features includes the following steps:

[0081] Step S100: collecting a depth image of the road shoulder while the unmanned vehicle is driving.

[0082] Specifically, the host computer system includes an image acquisition device and a host computer. The shoulder image acquired by the image acquisition device is transmitted to the host computer, which converts it into a depth image. Therefore, in the host computer system, it is necessary to establish communication between the host computer and the data acquisition device. Taking laser radar as an example, the steps to achieve communication between the two are as follows: Figure 6 As shown, it includes three steps: completing device connection, sending instructions, and receiving feedback data packets:

[0083] Consult the user manual of the LiDAR sensor to obtain its default IP address and default port number. After the sensor is connected to the host Ethernet port, complete the configuration of its IP address on the host and establish a TCP connection with the LiDAR.

[0084] According to the communication protocol of the lidar sensor, a single measurement command is written to it. The written data is in hexadecimal, so it needs to be converted to binary before TCP transmission.

[0085] According to the communication protocol of the LiDAR sensor, the complete depth data packet fed back by the LiDAR is parsed, the header and footer and other minor information are removed, and the high and low bytes of each pixel are swapped to finally obtain the U16 (16-bit) depth information matrix Pixel 2D.

[0086] Among them, the detailed settings of the image acquisition device can be referred to the above introduction and will not be repeated here.

[0087] Step S200: Analyze the depth image to obtain visual recognition data, where the visual recognition data includes the deviation angle of the unmanned vehicle and the distance from the road shoulder.

[0088] In one embodiment, analyzing the depth image to obtain visual recognition data specifically includes two sub-steps: depth image preprocessing and visual recognition. Figure 7 As shown, before identifying and extracting the shoulder features, the acquired depth image needs to be preprocessed by grayscale transformation. In this technology, the Equalize function provided by IMAQ Vision is selected for preprocessing. The Equalize function increases the dynamic intensity by distributing the given grayscale interval over the entire grayscale domain. This step will redistribute the pixel intensity so that the grayscale histogram is linearly cumulative, which can significantly improve the contrast and layering of the image, thereby facilitating the subsequent identification and extraction of shoulder features.

[0089] The visual processing system in this application uses a depth image acquired by a laser radar sensor. The depth image is also called a distance image. It uses the distance (depth) from the image acquisition device to each point in the scene as the pixel value. No matter what style the shoulder is, there must be a certain height difference between it and the road surface, which is reflected in the depth image as an obvious dividing line. Therefore, the recognition and extraction of shoulder features in this application is specifically transformed into the recognition and extraction of the dividing line between the shoulder and the road surface. The body angle and the distance between the body and the shoulder are calculated based on the extracted dividing line, and adjustments are made according to the calculation results.

[0090] In one embodiment, the Find Straight Edge function provided by IMAQ Vision can be used to identify and extract the boundary between the shoulder and the road surface. The Find Straight Edge function is used to search for straight edges in a two-dimensional region of interest. The region of interest contains multiple search lines, and the function searches for sharp changes in pixel intensity along these lines. A sharp transition is usually a feature of the edge of an object in an image. The function fits a straight line through each edge point of each search line to determine the straight edge on the detected object.

[0091] Specifically, the basic parameters of the Find Straight Edge function are set as follows:

[0092] Direction: The direction of the search line in ROI (Region Of Interest). Considering that there may be interference from flower beds or other objects on the right side of the shoulder, Left to Right is finally selected, that is, the search starts from the road surface until it crosses the shoulder.

[0093] Edge Polarity: Edge polarity. The settings of edge polarity and search line direction are generally matched. The search direction from left to right has been selected, that is, the search starts from the road surface until it crosses the shoulder. Then the grayscale change must be from white to black (the closer to the lidar, the smaller the grayscale value), so Bright to Dark Only is selected.

[0094] Look for: Search for the edge type. To obtain higher recognition rate and accuracy, BestEdge is selected in this application.

[0095] In this application, the advanced parameter settings of the Find Straight Edge function first use the Auto Setup function to match the best parameters, and then manually adjust them through sample training. Take a set of images collected by the LiDAR on-site as samples. During the debugging process, first check Auto Setup, then traverse all sample images, use this function to automatically locate the best edge in the area of ​​interest and return the parameters for finding the best edge. There are three situations in the results of Auto Setup processing: ① The system cannot find the best edge; ② The system finds the best edge but it is not the shoulder edge we want; ③ The system finds the best edge and it is the shoulder edge we want. Find all the correctly matched results, compare their adaptive parameters, and determine the area where each parameter is most concentrated. Then select a set of parameters as the initial parameters, re-traverse all images, and continuously modify the parameters until the pass rate for the sample reaches more than 90%, and the parameters are considered reliable.

[0096] According to the above parameter adjustment method, the final high-level parameters are as follows:

[0097] Minimum Edge Strength: Minimum edge strength, that is, the minimum difference in grayscale value between the edge and its surroundings, which can be (8.5-9.5)×10 3 , in this embodiment, it is set to 9.33×103;

[0098] Kernel Size: The size of the edge detection kernel, which can be 12 to 14, and is set to 13 in this embodiment;

[0099] Projection width: the average number of pixels perpendicular to the search direction, which can be 12 to 14. In this embodiment, it is set to 13;

[0100] Gap: the interval between search lines. Theoretically, the smaller the Gap value, the more edge points there are, and the fitted straight line is closer to the actual straight line edge. It can be 1.8 to 2.2, and is set to 2 in this embodiment.

[0101] During actual operation, the image acquisition device may acquire abnormal samples, and the boundary line cannot be successfully identified simply by the above FindStraight Edge function. Therefore, it is necessary to further improve the visual recognition algorithm.

[0102] In one embodiment, through multiple field tests, a large number of abnormal samples are collected. Through the analysis of abnormal images and the restoration of abnormal conditions, the reasons that eventually lead to abnormalities in the visual algorithm are summarized as follows: ① approaching the boundary of the field of view; ② the shoulder is too low; ③ the image quality is poor; ④ foreign objects appear; ⑤ unknown reasons (may be algorithm defects). ①②③ are classified as the first type of abnormality, and ④ is classified as the second type of abnormality. Based on this, this embodiment sets a triple visual recognition algorithm, which is the first, second and third level. The first to third visual recognition algorithms are used in turn to identify the boundary between the shoulder and the road surface, and the deflection angle of the unmanned vehicle and the distance from the shoulder are calculated based on the boundary. When the first visual recognition algorithm is used to obtain the next visual recognition data, jump to the second visual recognition algorithm for recognition. When the second visual recognition algorithm is used to obtain the next visual recognition data, jump to the third visual recognition algorithm for recognition. Once the boundary is identified by the current visual recognition algorithm, the recognition is terminated without jumping to the next algorithm; or when all the visual recognition algorithms cannot successfully recognize, the recognition is also terminated. Among them, the first visual recognition algorithm is used for the recognition of the shoulder in general situations, the second visual recognition algorithm is used for the recognition of the shoulder in abnormal situations such as close to the visual area boundary, too low shoulder or poor image quality, and the third visual recognition algorithm is used for the recognition of the shoulder in abnormal situations such as the presence of foreign objects. This improves the recognition accuracy of the visual algorithm, enabling it to cope with some abnormal situations where it cannot be recognized or is recognized incorrectly.

[0103] Specifically, two Adv.Straight Edge functions with different parameter biases are added to the original single Find Straight Edge function to form a triple visual recognition algorithm.

[0104] The original single Find Straight Edge function is used as the first recognition function for the recognition and extraction of shoulder features in general. Its parameter settings are relatively balanced. For details, please refer to the above settings.

[0105] In the configuration of the second visual recognition function Adv.Straight EdgeⅠ, the search direction is changed to from right to left, the edge polarity is changed to only black to white, the Minimum Edge Strength is set to 9 to 11, specifically 10, and the BestEdge Rake search strategy is used to target abnormal situations such as being close to the boundary of the field of view, too low a shoulder, or poor image quality.

[0106] The configuration of the third visual recognition function Adv.Straight EdgeⅡ retains the same basic settings as Adv.Straight EdgeⅠ, only the Minimum Edge Strength is changed to 25-35, specifically 30, and the Best EdgeProjection search strategy is used to target abnormal situations where foreign objects exist.

[0107] In this way, the search strategies and parameter biases of the triple visual recognition algorithm are different, which can cover all conditions as much as possible, thereby significantly improving the recognition success rate.

[0108] After the boundary line is identified, the deflection angle can be extracted and the spacing can be calculated based on the processing results of the triple vision recognition algorithm.

[0109] Specifically, the line connecting two fixed points of the vehicle body can be used as the Y-axis of the coordinate system. The result of the triple vision recognition algorithm gives the angle between the boundary line between the shoulder and the road surface and the Y-axis in the image coordinate system. The angle is positive in the counterclockwise direction. The deflection angle of the boundary line between the shoulder and the road surface in the image is exactly opposite to the deflection angle of the vehicle body in reality, that is, the boundary line between the shoulder and the road surface in the image is deflected to the left, but the vehicle body is actually deflected to the right.

[0110] In this embodiment, the vertical distance between a fixed point of the vehicle body and the shoulder can be selected as the spacing instead of the straight-line distance. Whether it is the vertical distance or the straight-line distance, the two are unified when the vehicle body is parallel to the shoulder. In other words, the selection result has no effect on the control target. However, considering that the vertical distance is more sensitive to the control command (i.e., the steering command), the vertical distance is selected as the control target in order to obtain a better control effect. Here, the vertical spacing between the vehicle body and the shoulder is the pixel distance. By establishing an image coordinate system, the expression of the boundary line between the shoulder and the road surface in the image coordinate system is obtained, and a fixed point is selected in the image coordinate system as the vehicle body reference point (the selection of the vehicle body reference point is not too restricted, as long as it is on the horizontal symmetry axis of the image), and then the point-line distance formula is used to calculate the vertical spacing. The pixel distance can be converted into the actual distance through the field of view calculation, thereby obtaining visual recognition data including the deflection angle and the distance.

[0111] Then execute

[0112] Step S300: Determine whether there is an error in obtaining the current visual recognition data. If there is no error, store it as the current processing data. If there is an error, discard the current visual recognition data and retrieve the visual recognition data stored last time as the current processing data.

[0113] During the driving of the car, due to the vibration of the car body, the change of road conditions, the error of the visual algorithm, or the failure of the laser radar... All of the above situations may cause errors in the results of visual processing, such as the extracted straight line is not the actual boundary between the shoulder and the road surface or the boundary cannot be extracted at all, thus affecting the reliability and stability of the entire control process. In order to avoid the situation where the entire control process is unstable due to errors in one or several frames of data, this application establishes an error discrimination mechanism based on cached data, by establishing a cached data area for storing the visual processing results of the previous period (including the body angle and the distance between the body and the shoulder). In specific operations, the current erroneous data is discarded, and the most recent data is used to replace the erroneous data to continue to complete the subsequent control process. Since the frame rate of the visual processing algorithm is moderate, as long as the error does not occur continuously for a long time, it will not affect the reliability and stability of the control process.

[0114] In one embodiment, if Figure 7 As shown in the figure, the error discrimination mechanism mainly targets two types of errors: ① gross error, that is, the difference between the current processing result and the processing result of the previous frame is too large; ② failure error, that is, the visual algorithm processing fails and no result is obtained. Among them, the failure error ② can be directly judged by querying the result flag bit Calibration Valid of the visual processing algorithm, that is, when the recognition fails through the visual processing algorithm, it is judged as a failure abnormality. And the gross error ① is judged according to the set discrimination index after the visual recognition algorithm successfully obtains the visual recognition data. After analyzing a large number of error frames, it is found that the gross error is more obvious in the parameter of the body angle, so the discrimination standard is preliminarily determined, that is, when the difference between the current body angle and the body angle of the previous frame exceeds the tolerance value, it is considered that a gross error has occurred, the error frame is discarded, and the data of the previous frame is used to replace the current frame to complete the motion control. In the subsequent debugging, it is also confirmed that the discrimination standard and the error threshold perform well. Specifically, the adjustable angle of the system each time has certain restrictions, and the tolerance value of the difference between the angles of the previous and next two frames of data can be determined according to the specific settings of the system. In this embodiment, the tolerance value of the difference between the current vehicle body deflection angle and the vehicle body deflection angle of the previous frame may be set to 10°.

[0115] Furthermore, in order to ensure the correctness of the data in the cache data area, an initialization process is set up, that is, after running the main program, the user manually judges whether the images and data presented on the front panel are correct, and only after confirming that they are correct will the automatic control process be officially entered.

[0116] In one embodiment, if Figure 7As shown, when it is determined that there is an error in obtaining the current visual recognition data, error samples are collected for subsequent analysis and improvement. If there is no abnormality, the processing result is directly sent to the motion control system to complete subsequent control.

[0117] After determining the available processing data, perform

[0118] Step S400: Calculate an adjustment instruction for adjusting the deflection angle of the unmanned vehicle based on the current processed data so that the distance between the unmanned vehicle and the road shoulder approaches the target distance.

[0119] The expected goal of this application is to enable the unmanned vehicle to maintain parallelism with the road shoulder and a certain set target distance during the process of automatic driving. This goal can be divided into two control standards: ① the direction of the car's driving angle is 0°, ② the distance between the car body and the road shoulder is maintained at a certain set value, but essentially one of the prerequisites for achieving control standard ② is that control standard ① has been met. In other words, as long as control standard ② has been achieved, then control standard ① must be met, so the control standard can be simplified to one, that is: the distance between the car body and the road shoulder is maintained at a certain target distance.

[0120] In one embodiment, PID control technology can be used. Specifically, a PID controller provided by the LabVIEW control and simulation module can be used. The target distance and the actual distance calculated in step S300 are input into the PID controller. The PID outputs an adjustment instruction and sends the angle adjustment instruction to the lower computer. The lower computer controls the servo to steer, thereby forming a complete PID closed-loop control.

[0121] In actual debugging, it was found that when only the above-mentioned closed-loop PID control was used, the test car would seriously deviate from the control target under certain special circumstances until it was out of the effective control range, resulting in complete control failure. After analysis and theoretical derivation of experimental data, the causes of all special situations were summarized and classified into two categories: ① The body deviates to the left + the distance from the shoulder is too close, ② The body deviates to the right + the distance from the shoulder is too far. In these two special cases, the closed-loop PID control will have excessive negative feedback. For example, in case of ①, when the distance between the body and the shoulder is less than the target distance, the PID control will regulate the body to deviate to the left. If the body is already deviating to the left at this time, if it continues to deviate to the left, it is likely to cause the body to deviate too much or even turn around. Similarly, in case of ②, it is also possible to cause the body to deviate too much or even turn around. Therefore, in one embodiment, a control compensation mechanism is further established. As Figure 8As shown in the figure, after calculating the current spacing, the PID controller outputs a correction instruction for adjusting the deflection angle of the unmanned vehicle according to the current spacing and the target spacing. At the same time, before outputting the instruction to the lower computer, it is also determined whether the unmanned vehicle is in the above-mentioned special situation according to the current processing data. If so, the compensation value is added to the correction instruction output by the PID controller as the final angle adjustment instruction input to the lower computer. If not, the correction instruction output by the PID controller is directly used as the angle adjustment instruction input to the lower computer. Among them, the compensation value is used to make the current deflection angle of the vehicle body close to 0°.

[0122] Specifically, the compensation value can be calculated by the following calculation formula:

[0123]

[0124] In the formula, dy is the compensation value, x is the current deflection angle, y is max is the maximum value of the angle control, θ max In this embodiment, the current deflection angle of the car is negative and multiplied by the conversion coefficient to obtain a compensation value, which is then added to the control value output by the original PID controller. The sum of the two is sent to the steering gear as a new angle adjustment command to offset excessive negative feedback and improve the control process.

[0125] Furthermore, in order to make the closed-loop control have a faster response speed and better control accuracy, its control parameters need to be adjusted. During the parameter adjustment process, it was found that the adjustment effects of the critical proportionality method and the attenuation curve method were not ideal. Therefore, the trial and error method was finally used to complete the PID parameter adjustment.

[0126] Through the above steps S100 to S400, the angle adjustment instruction can be obtained from the collected image analysis and calculation, that is, the processing process of the host computer in the drone is completed.

[0127] Correspondingly, the following introduces an unmanned vehicle vision processing system for executing the above-mentioned unmanned vehicle vision processing method. The unmanned vehicle vision processing system can be loaded into the host computer in the above-mentioned unmanned vehicle to realize automatic navigation of the unmanned vehicle based on road shoulder features.

[0128] like Fig. 9 As shown in the figure, the unmanned vehicle visual processing system based on road shoulder features mainly includes:

[0129] A data extraction module is used to obtain and analyze the depth image of the road shoulder to obtain visual recognition data, which includes the deviation angle of the unmanned vehicle and the distance from the road shoulder;

[0130] The error judgment module is used to judge whether there is an error in obtaining the current visual recognition data. If there is no error, it is stored as the current processing data. If there is an error, the current visual recognition data is discarded and the visual recognition data stored last time is retrieved as the current processing data;

[0131] The control module is used to calculate the adjustment instructions for adjusting the deflection angle of the unmanned vehicle based on the current processing data so that the distance between the unmanned vehicle and the shoulder approaches the target distance.

[0132] Furthermore, the control module includes a PID controller, a special situation determination module and a compensation module, wherein the PID controller is used to calculate a correction instruction for adjusting the deflection angle of the unmanned vehicle according to the current distance between the unmanned vehicle and the road shoulder;

[0133] The special situation determination module is used to determine whether the unmanned vehicle is in a special situation based on the current processing data. When the unmanned vehicle is in a special situation, the compensation module is triggered to calculate the compensation value and superimpose the compensation value on the correction instruction output by the PID controller to obtain the angle adjustment instruction. When the unmanned vehicle is not in a special situation, the compensation module does not work, and the correction instruction output by the PID controller is directly used as the angle adjustment instruction.

[0134] In summary, the unmanned vehicle visual processing system mainly obtains visual recognition data and calculates angle adjustment instructions. During this period, by introducing a triple visual recognition algorithm, an error discrimination mechanism, and an angle compensation mechanism, the reliability and stability of the control can be further improved. It can be understood that the unmanned vehicle visual processing system is used to execute the unmanned vehicle visual processing method introduced above, and the functions of each module therein are adapted to the corresponding method above. For details, please refer to the above introduction and will not be repeated here.

[0135] It will be easily understood by those skilled in the art that the above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A visual processing method for an unmanned vehicle based on road shoulder features, characterized in that: include: Step S1: collecting a depth image of the road shoulder while the unmanned vehicle is driving; Step S2: Analyze the depth image to obtain visual recognition data, wherein the visual recognition data includes the deflection angle of the unmanned vehicle and the distance from the road shoulder; Step S3: determining whether there is an error in obtaining the current visual recognition data; if there is no error, storing it as the current processing data; if there is an error, discarding the current visual recognition data and retrieving the visual recognition data stored last time as the current processing data; Step S4: calculating an adjustment instruction for adjusting the deflection angle of the unmanned vehicle according to the current processed data so that the distance between the unmanned vehicle and the road shoulder approaches the target distance; In step S2, analyzing the depth image to obtain visual recognition data includes: The first to third visual recognition algorithms are used in sequence to identify the boundary between the shoulder and the road surface, and the deflection angle of the unmanned vehicle and the distance from the shoulder are calculated based on the boundary. When the previous visual recognition algorithm fails to obtain the next visual recognition data, the next visual recognition algorithm is jumped to for recognition until the visual recognition data is obtained or all the visual recognition algorithms fail to successfully recognize and the recognition is terminated; The first visual recognition algorithm is used for the recognition of the road shoulder in general situations, the second visual recognition algorithm is used for the recognition of the road shoulder in abnormal situations such as when the road shoulder is close to the boundary of the visual area, when the road shoulder is too low, or when the image quality is poor, and the third visual recognition algorithm is used for the recognition of the road shoulder in abnormal situations such as when there are foreign objects. The first visual recognition algorithm uses the Find Straight Edge function, and the parameter configuration includes: Demarcation line search direction: from left to right; Edge polarity: The grayscale changes only from white to black; Search strategy: best edge; Minimum edge strength: (8.5~9.5)×103; The differences between the second visual recognition algorithm and the first visual recognition algorithm include: Demarcation line search direction: from right to left; Edge polarity: The grayscale changes only from black to white; Search strategy: Best edge rake; Minimum edge strength: 9~11; The differences between the third-level visual recognition algorithm and the second-level visual recognition algorithm include: Minimum edge strength: 25~35; Search strategy: Optimal edge projection.

2. The unmanned vehicle vision processing method according to claim 1, characterized in that: In step S3, visual recognition data errors include two types: gross errors and failure errors; When the difference between the current visual recognition data and the stored previous frame visual recognition data exceeds the tolerable range, it is determined as a gross error; When the visual recognition algorithm for acquiring visual recognition data fails to recognize, it is determined to be a failure error.

3. The unmanned vehicle vision processing method according to claim 2, characterized in that: When the difference between the current visual recognition data and the previously stored visual recognition data exceeds the tolerable range, it is judged as a gross error, including: When the difference between the deflection angle in the current visual recognition data and the deflection angle in the visual recognition data stored the previous time exceeds the tolerance value, it is determined to be a gross error.

4. The unmanned vehicle vision processing method according to claim 1, characterized in that: Step S4 includes: Determine whether the unmanned vehicle is in a special situation based on the current processing data. If the unmanned vehicle is in a special situation, a correction instruction for adjusting the deflection angle of the unmanned vehicle is calculated based on the current distance between the unmanned vehicle and the road shoulder, and an angle adjustment instruction is obtained by superimposing a compensation value on the correction instruction. If the unmanned vehicle is not in a special situation, a correction instruction for adjusting the deflection angle of the unmanned vehicle is directly calculated based on the current distance between the unmanned vehicle and the road shoulder, and the correction instruction is directly output as an angle adjustment instruction. The calculation formula of the compensation value is: In the formula, is the compensation value, is the current declination angle, is the maximum value of the angle control amount, is the maximum value of the wheel turning angle of the unmanned vehicle; Among them, situations when no one is in special circumstances include: Scenario 1: The vehicle body is biased to the left and the distance from the shoulder is less than the target distance; or Scenario 2: The vehicle body is biased to the right and the distance from the road shoulder is greater than the target distance.

5. The unmanned vehicle vision processing method according to claim 1, characterized in that: In step S1, a depth image of the road shoulder is collected by a laser radar, and the laser radar is fixed on the right side of the drone to vertically scan the image of the right road shoulder.

6. A visual processing system for unmanned vehicles based on road shoulder features, characterized in that: include: A data extraction module, used to acquire and analyze the depth image of the road shoulder to obtain visual recognition data, wherein the visual recognition data includes the deflection angle of the unmanned vehicle and the distance from the road shoulder; The error judgment module is used to judge whether there is an error in obtaining the current visual recognition data. If there is no error, it is stored as the current processing data. If there is an error, the current visual recognition data is discarded and the visual recognition data stored last time is retrieved as the current processing data; A control module, used to calculate an adjustment instruction for adjusting the deflection angle of the unmanned vehicle according to the current processing data so that the distance between the unmanned vehicle and the road shoulder approaches the target distance; In the data extraction module, the depth image of the road shoulder is analyzed to obtain visual recognition data, including: using the first to third visual recognition algorithms in sequence to identify the boundary between the road shoulder and the road surface, calculating the deflection angle of the unmanned vehicle and the distance from the road shoulder based on the boundary, and when the previous visual recognition algorithm fails to obtain the next visual recognition data, jumping to the next visual recognition algorithm for recognition until the visual recognition data is obtained or all the visual recognition algorithms fail to successfully recognize and end the recognition; The first visual recognition algorithm is used for the recognition of the road shoulder in general situations, the second visual recognition algorithm is used for the recognition of the road shoulder in abnormal situations such as when the road shoulder is close to the boundary of the visual area, when the road shoulder is too low, or when the image quality is poor, and the third visual recognition algorithm is used for the recognition of the road shoulder in abnormal situations such as when there are foreign objects. The first visual recognition algorithm uses the Find Straight Edge function, and the parameter configuration includes: Demarcation line search direction: from left to right; Edge polarity: The grayscale changes only from white to black; Search strategy: best edge; Minimum edge strength: (8.5~9.5)×103; The differences between the second visual recognition algorithm and the first visual recognition algorithm include: Demarcation line search direction: from right to left; Edge polarity: The grayscale changes only from black to white; Search strategy: Best edge rake; Minimum edge strength: 9~11; The differences between the third-level visual recognition algorithm and the second-level visual recognition algorithm include: Minimum edge strength: 25~35; Search strategy: Optimal edge projection.

7. The unmanned vehicle visual processing system according to claim 6, characterized in that: The control module includes a PID controller, a special situation determination module and a compensation module, wherein the PID controller is used to calculate a correction instruction for adjusting the deflection angle of the unmanned vehicle according to the current distance between the unmanned vehicle and the road shoulder; The special situation determination module is used to determine whether the unmanned vehicle is in a special situation according to the current processing data. When the unmanned vehicle is in a special situation, the compensation module is triggered to calculate the compensation value and superimpose the compensation value on the correction instruction output by the PID controller to obtain the angle adjustment instruction. When the unmanned vehicle is not in a special situation, the compensation module does not work, and the correction instruction output by the PID controller is directly used as the angle adjustment instruction. The calculation formula of the compensation value is: In the formula, is the compensation value, is the current declination angle, is the maximum value of the angle control amount, is the maximum value of the wheel turning angle of the unmanned vehicle; Among them, situations when no one is in special circumstances include: Scenario 1: The vehicle body is biased to the left and the distance from the shoulder is less than the target distance; or Scenario 2: The vehicle body is biased to the right and the distance from the road shoulder is greater than the target distance.

8. An unmanned vehicle device for automatic navigation based on road shoulder features, characterized in that: include: An unmanned vehicle and an image acquisition device, a host computer, a slave computer, a steering gear, and a drive motor mounted on the unmanned vehicle, wherein: The image acquisition device is used to acquire the road shoulder image; The host computer has the unmanned vehicle visual processing system based on the shoulder feature according to claim 6 or 7, which is used to convert the shoulder image into a depth image and calculate the adjustment instruction for adjusting the deflection angle of the unmanned vehicle based on the depth image; The lower computer is used to receive adjustment instructions and control the steering gear to turn to adjust the deflection angle of the UAV.

Citation Information

Patent Citations

  • Vision-based centering driving method for unstructured road

    CN112528829A

  • Visual navigation control method for all-terrain robot

    CN112720408A

  • Vehicle control method and device based on image recognition

    CN113085893A