Algorithm based on AD sampling
The black line extraction algorithm based on AD can reflect the black and white degree of each point on the image. The extracted black line has higher accuracy, but the subsequent black line extraction algorithm is more complicated. Based on the voltage jump comparison method, the software black line extraction is very simple, but the hardware debugging is more difficult, and it cannot reflect the true black and white degree of each point. The requirements for the track environment are very high and are susceptible to interference.
There are several methods for black line extraction based on AD:
1) Find the left and right boundary points of the black line of each row, and use the middle point as the road;
2) Use several lines to add and take the darkest spot;
3) Find the darkest spot in each row and use it as a road.
The first method: find the left and right boundary points of the black line of each row, and use the middle point as the road.
Figure 1 Schematic view of the crossroads obliquely
It is the easiest way to think of, and it can achieve a very ideal effect when there are no intersections and the camera's black and white AD values ​​are distinct. However, if there is an oblique looking intersection or black-and-white AD is not very clear, the filtering of this method is very complicated. In practice, because the camera is not very sensitive to the black line in the distance, it makes it difficult to determine the threshold of the black point. If you select a large one, the road extraction will be wrong, and if you select a small one, you will lose the road information. Perhaps using dynamic threshold is a good method, but it is not very useful. In the experiment, we found that the threshold of the black dot does not change linearly with the change of the distance, and its change has a taste of point mutation. Therefore, it is difficult to determine the change rule of the black dot threshold, and it is difficult to set the natural dynamic threshold. Obliquely looking at the crossroads will cause more trouble, because in actual control it is difficult to strictly follow the line every time, so when the car comes out of the bend, if there is a crossroad in front of the bend, it is very It is easy to cause squinting. At this time, from the image collected by AD, it seems that the crossroads will come out of the road in front of it like a bifurcated tree branch. The worse case is that the right side of the road in front of the road disappears just by the side of the diagonal crossroad Too. If this method is adopted, it is easy to mistakenly determine the road to the side of the cross, making the car turn wrong. In order to filter out this situation, we have adopted many filtering methods according to its characteristics.
First, at the junction of the road ahead and the cross, the number of black spots will suddenly increase a lot. In general, as the distance increases, the number of black dots will gradually decrease, and there will be no sudden increase. Therefore, we can use the number of black points in the previous line to estimate the number of black points in the next line. If it exceeds our estimate, we think it is unreasonable.
Secondly, according to the principle that the track is not abrupt, the noise can be filtered out. We can predict the track change range of the next line based on the changes in the previous two lines, and use it to filter out the noise. However, in practical applications, the prediction of the change range of the next line is not always ideal. Therefore, when the car passes a 90-degree turn, the change of the track is very large in the car's view, and it is almost the same as the diagonal crossroad. Sometimes the 90-degree bend is filtered out, causing the car to directly run out of the runway.
Finally, we can also search the left and right boundary points of the track by left-to-right and right-to-left methods respectively. If the two are found to be inconsistent, we can take the point with less change as the track.
Figure 2 Schematic diagram of extracting black lines by adding three lines
After adding the above filtering, the real track search program will be very complicated, and it is not very reliable.
The second method: use the sum of several lines to take the darkest spot.
This approach is an algorithm proposed by our last senior. But I am not very reliable to use. Its head point has always been unstable. The reason for the addition of its three lines is that if the right black point in the middle line is lost, it can retrieve it using the threshold set by itself. For example, the black point threshold for the addition of three lines can be defined as 1 white point and 2 black The sum of points. With a taste of median filtering. However, because the black and white in the distance is not very clear, the threshold of black and white is difficult to set, and the threshold of adding three lines is more difficult to set. And because there are few distant points on the curve, there are only about one or two black points and they are not in the same column. It is easy to lose these points, resulting in unstable points on the head. In order to extract the remote black line as much as possible, the only way to increase the threshold from the software is to set the threshold for adding three lines to one black and two white, but the problem is that the black and white in the distance is not very obvious The white point is black, and the black point is white. The selection of this threshold can easily cause the darker white points in the distance to be included in the black line, which makes the car's steering chaotic.
Figure 3 Find black dots line by line
The third method: Find the darkest spot in each line and use it as a road.
Since each line searches for the darkest point, the threshold of the black point can be slightly expanded. Even if the black and white in the distance is not clear, the true black line can be extracted because the darkest point is found. The main problem is that not every line has a point that meets the requirements, it will cause a line to be lost and the black dots behind it will be lost. The solution is that when a line is found missing, it does not immediately quit searching, but sets a loss counter, and only quits when the value of the loss counter continuously accumulates to a certain threshold. When searching for a line of black lines each time, see if the loss counter is non-zero. If not, it means there is no missing line in front. If so, it means that a few lines were missing. We can linearize the lost line in the middle based on this line and the effective line in the middle. Then clear the loss counter. With the loss counter, we can place strict restrictions on the extraction conditions of the track without having to worry about missing the black line. For example, we can strictly limit the width of the black line, so that we can easily filter out the interference caused by seeing large black spots; for the above-mentioned problem of squinting the cross line, we only need to strictly limit the black line in the previous line. The range of a line of black lines can be easily filtered out. Of course, after the missing line is found, the search for the next line must be expanded. The more continuous missing lines are allowed, the lower the credibility of the black line retrieved again. In the actual extraction process, it must be lower. Grasp this threshold, so that you can find the road ahead smoothly, and you won't extract black lines by mistake. Actually proved that this method is simple to implement, has the highest reliability, and the black line extraction is very stable.
Ferrite Core Transformer,Ee25 Transformer,Ee16 Ferrite Core Transformer,Efd Ferrite Core Transformer
IHUA INDUSTRIES CO.,LTD. , https://www.ihua-transformer.com