Navigation line perception and obstacle ranging method for unmanned systems in weak texture scenes

Through the improved YOLOv5 network and RANSAC algorithm, and combined with the four-zone depth comparison algorithm, the problem of navigation line extraction and obstacle distance measurement of unmanned systems in weak texture scenarios is solved, and high-precision navigation line extraction and obstacle distance measurement are achieved to meet the real-time response needs of unmanned systems.

CN120339403BActive Publication Date: 2025-08-19HOHAI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510827842.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-20
Publication Date
2025-08-19
Estimated Expiration
2045-06-20

AI Technical Summary

Technical Problem

It is difficult for unmanned systems to accurately extract navigation lines and measure obstacles in weak texture scenarios, especially in inter-row scenarios, due to the lack of clear road boundaries and changing pedestrian postures, the navigation lines fitting deviation and ranging error.

Method used

The improved YOLOv5 convolutional neural network is used to detect reference objects and pedestrians in the image, combine the RANSAC algorithm to eliminate outliers, fit navigation lines through the least squares fitting algorithm, and use the four-partition depth comparison algorithm to measure obstacles to improve environmental perception accuracy and real-time response capabilities.

Benefits of technology

It realizes high-precision extraction of navigation lines and accurate distance measurement of obstacles, meets the real-time path tracking requirements of unmanned systems in complex environments, and improves the accuracy of the angle deviation of navigation lines extraction with an angle deviation of less than 5° and the distance measurement error of less than 1%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339403B_ABST
    Figure CN120339403B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for sensing navigation lines and measuring obstacles in an unmanned system in a weakly textured scene, belonging to the field of machine vision technology. The method first uses an improved YOLOv5 network to detect reference objects and pedestrians in an image, obtaining reference object bounding box coordinate information and pedestrian detection box coordinate information. Subsequently, an initial reference point set is extracted, and after removing outliers using the RANSAC algorithm, a least squares fitting algorithm is used to fit the lines and extract the navigation lines. Simultaneously, the target scene is divided into regions, the minimum depth value of each region is calculated, and the approximate minimum depth of pedestrians is determined using a four-region depth comparison algorithm. The depth range of the pedestrians is then obtained and their distance information is calculated. Finally, by integrating the improved YOLOv5 target detection with binocular vision technology, the method achieves navigation line extraction and pedestrian obstacle ranging, thereby improving the environmental perception accuracy, obstacle ranging accuracy, and real-time response capability of the unmanned system navigation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of machine vision technology, and in particular relates to a method for sensing navigation lines and measuring obstacles in an unmanned system in a weak-texture scene. Background Art

[0002] With the development of smart engineering, the demand for autonomous operation of unmanned systems is becoming increasingly urgent. These core technologies rely on the accuracy and robustness of environmental perception and positioning systems. Current unmanned systems face the following technical bottlenecks in complex, unstructured environments: Traditional methods rely on manually pre-set road edges or visual detection techniques based on fixed threshold segmentation. However, in inter-row scenarios, the lack of clear road boundaries, occlusion by branches and foliage, and uneven lighting lead to cumulative deviations in navigation line fitting, making it difficult to meet the real-time path tracking requirements of unmanned systems. Existing binocular stereo matching-based ranging algorithms rely on high-precision depth calculations. However, in scenarios with varying pedestrian postures and dynamically changing distances, traditional methods, lacking target semantic information, struggle to rapidly segment pedestrian areas, resulting in increased ranging delays and errors, and impacting obstacle avoidance response speed. To address these issues, existing technologies have attempted to improve perception capabilities by refining object detection algorithms, but these technologies suffer from the following limitations: YOLOv5-based detection methods fail to optimize the detection box reference point selection strategy, making them susceptible to occlusion when directly fitting the line using the detection box center point. Pedestrian ranging algorithms fail to incorporate the depth distribution characteristics of the detection box and rely solely on single-point depth values, which can lead to fluctuating ranging results. Summary of the Invention

[0003] In order to overcome the shortcomings of traditional unmanned system navigation, such as the reliance on obvious road edge lines for environmental perception, which leads to difficulties in extracting navigation lines between rows, and low accuracy and poor real-time performance in obstacle ranging, and the problem of reduced accuracy caused by the inability of the center point of the pedestrian detection bounding box to correspond to the center point of the pedestrian target due to blurred inter-row features and diverse pedestrian postures, the present invention provides a method for unmanned system navigation line perception and obstacle ranging in weak texture scenes. High-precision detection is achieved based on the trained optimal YOLOv5 convolutional neural network model, and the navigation path is generated by fitting the rows using RANSAC and the least squares method. The innovative four-partition depth comparison algorithm is used to perform approximate image segmentation and depth calculation on pedestrians. This method significantly improves the environmental perception accuracy, obstacle ranging accuracy, and real-time response capability of the unmanned system navigation.

[0004] Technical solution: To achieve the above objectives, the present invention adopts the following technical solution:

[0005] The present invention provides a method for sensing navigation lines and measuring obstacles in an unmanned system in a weak texture scene, the method comprising the following steps:

[0006] S1: Use the YOLOv5 detection model to perform real-time detection on the input image, obtain the coordinate information of all reference bounding boxes in the image, and extract the initial reference point set based on the bottom midpoint of the reference detection box;

[0007] S2: Detect and remove outliers on the initial reference point set obtained in step S1: Based on the RANSAC algorithm, distinguish between inliers and outliers for different detection situations, identify and remove outliers that deviate from the normal distribution in the point set, and obtain a reference point set;

[0008] S3: Using the least squares fitting algorithm, the reference point set obtained in step S2 is subjected to least squares fitting to obtain the left and right lines respectively. Based on the geometric relationship between the fitted left and right lines, the final navigation line is extracted again through least squares fitting calculation;

[0009] S4: refer to the final navigation line in step S3 to obtain the target scene, divide the target scene into regions, calculate the minimum depth value of each region, compare the minimum depth values of each region, and determine the approximate minimum depth of the pedestrian;

[0010] S5: Using the minimum depth obtained in S4, a depth range model is constructed to obtain the depth range of the pedestrian, the depth image is segmented, the depth mean within the depth range of the pedestrian is calculated, and the distance information of the pedestrian is obtained based on the depth mean.

[0011] Furthermore, the step S1 of obtaining all reference bounding box coordinate information in the image is to extract the reference bounding box coordinate information by geometric analysis of the target detection framework ( , , , ),in,( , ) is the center coordinate of the reference detection frame, , are the width and height of the reference detection frame respectively. The specific method is as follows:

[0012] S1-1: Based on the geometric features of the root point of the input image, define the bottom midpoint of the detection bounding box as the line fitting reference point ( , ), the calculation formula is:

[0013] ,

[0014] S1-2: Input the image to be tested into the YOLOv5 detection model, output the image detection bounding box set through feature extraction, extract the bottom midpoint coordinates of each detection box, obtain the initial reference point, and obtain the initial reference point set.

[0015] Furthermore, the specific method of step S2 is as follows:

[0016] S2-1: Based on the initial reference point set obtained in step S1, Arrange the reference point sets in ascending order of pixel coordinates; calculate the number of reference point sets ;if <4, perform outlier detection based on the threshold method, traverse the reference point set to calculate the current point and the reference point , Difference, if ,and , then the point is considered an outlier; if >4, the RANSAC algorithm is used to remove outliers and obtain the final optimized reference point set; Indicates the pixel coordinate difference between the current reference point and the previous reference point on the x-axis. Indicates a preset judgment Is the threshold abnormal? Indicates the pixel coordinate difference between the current reference point and the previous reference point on the y-axis. Indicates a preset judgment Abnormal threshold;

[0017] S2-2: The calculation steps for RANSAC to obtain internal points are as follows:

[0018] Set parameters for the initial set of data points: predefined maximum number of iterations and error tolerance threshold , initialize the optimal model parameters;

[0019] Randomly select initial inliers: randomly select some data points from the initial data point set as initial inliers;

[0020] Fitting calculation: Generate a hypothetical model based on the selected initial inliers, calculate the fitting error between all data points in the initial data point set and the current hypothetical model, and record the point with an error less than the threshold t as the current inlier;

[0021] Update the best model: If the current number of inliers exceeds the historical best record and the model error is lower, update the optimal model parameters, optimal error threshold and inlier set;

[0022] Repeat iteration: Repeat the above steps until the preset number of iterations is reached Terminate the calculation when

[0023] Final inlier point set: The final inlier point set is the optimized reference point set.

[0024] Furthermore, the specific method of step S3 is as follows:

[0025] S3-1: For the left and right line models on a two-dimensional plane, the following formula is used to express them:

[0026] ,

[0027] in, is the slope of the line, is the intercept of the line, 、 Indicates the horizontal and vertical coordinates of the fitted line in the reference system, for a given data point , the least squares problem is described as minimizing the residual sum of squares RSS:

[0028] ,

[0029] in, is the number of data points. By taking the derivative of RSS and setting the derivative to 0, the optimal line fitting parameters are calculated. and Estimated value of:

[0030] ,

[0031] According to the above formula, the slope of the fitting line is obtained and , the final fitted line model is ;

[0032] S3-2: Least squares fitting is performed based on the reference point set after RANSAC processing. After obtaining the left and right lines respectively, 10 points are taken symmetrically and evenly on the obtained left and right lines respectively, and recorded as 、 ,in , calculate the middle point based on the selected points , the calculation formula is as follows:

[0033] ,

[0034] Finally, the least squares fitting is performed on the middle point set to extract the navigation line.

[0035] Furthermore, step S4 is a pedestrian ranging algorithm based on four-partition depth comparison. It uses the principle of binocular vision ranging to simultaneously observe a scene with two cameras. The depth information of the object is calculated by comparing the difference between the images taken by the two cameras. The depth of the object is then calculated by triangulation to achieve ranging. During detection, the detection bounding box is divided into 2*2, i.e., 4 partitions. The minimum depth is calculated for each area and compared. The specific method is as follows:

[0036] S4-1: First, the camera image is detected through the YOLOv5 convolutional neural network, and the coordinate information of the pedestrian detection frame is obtained as follows: , according to the size of the image ( )Recover pixel coordinates, ( ), respectively represent the pixel coordinates of the center point of the detection bounding box ( ), and check the width of the bounding box and height ;

[0037] S4-2: Then, the depth map is obtained based on binocular vision through the left and right images, and the detection frame is divided into four partitions: upper, lower, left, and right. Depth statistics are performed on each partition. For each partition, the average depth from the upper center point to the center point of the region, from the bottom center point to the midpoint of the region, from the left center point to the center point of the region, and from the right center point to the center point of the region are respectively Represent four areas respectively;

[0038] S4-3: Average depth extracted from the left and right sides of the center point Compare the two and take the smaller one , sort all depth values on the smaller side, i.e. Operation, the top and bottom depth values are processed in the same way and sort;

[0039] S4-4: Finally, yes and For comparison, select the 5 minimum depth values on the smaller side and take the average as the approximate minimum depth of the area. ; Finally, sort the approximate minimum depths of the four regions , select the minimum depth as the depth of the pedestrian .

[0040] Furthermore, the specific method of step S5 is to obtain the pedestrian depth in step S4. Define the depth range as [ -0.2, +0.2], get the distance of the pedestrian , the calculation formula is as follows:

[0041] ,

[0042] ,

[0043] ,

[0044] .

[0045] Beneficial Effects: Compared to existing technologies, this invention achieves high-precision extraction of navigation lines and precise ranging of pedestrian obstacles through an improved YOLOv5 convolutional neural network and binocular vision technology. Experimental results show that the average angular deviation of the navigation line extraction algorithm of the present invention does not exceed 5° under different environments, and the average detection time is approximately 50ms, which meets the requirements for extracting navigation lines between rows. At the same time, the pedestrian ranging algorithm has a relative error of less than 1% within 6m, and the average ranging time meets real-time requirements, providing reliable technical support for autonomous operation of unmanned systems between rows. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is an overall block diagram of the present invention;

[0047] Figure 2 (a) is the original image of the orchard scene, (b) is the original image of the wasteland scene, (c) is the navigation line extraction map of the orchard scene, and (d) is the navigation line extraction map of the wasteland scene;

[0048] Figure 3 (a) shows the angle deviation statistics in the orchard scene, and (b) shows the angle deviation statistics in the wasteland scene.

[0049] Figure 4 The results of pedestrian posture ranging at a distance of 1m taken for the experiment: Figure 4 The measurement distance of (a) is 1.0m, the measurement distance of (b) is 1.2m, and the measurement distance of (c) is 1.1m;

[0050] Figure 5 The results of pedestrian posture ranging at a distance of 3m taken for the experiment: Figure 5 The measurement distance of (a) is 2.7m, the measurement distance of (b) is 2.9m, and the measurement distance of (c) is 2.8m;

[0051] Figure 6 The results of pedestrian posture ranging at a distance of 8m taken for the experiment: Figure 6 The measurement distance of (a) is 8.1m, the measurement distance of (b) is 8.0m, and the measurement distance of (c) is 8.2m. DETAILED DESCRIPTION

[0052] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments.

[0053] The present invention provides a method for sensing navigation lines and measuring obstacles in an unmanned system under weak texture scenes. Figure 1 As shown, specifically including:

[0054] S1: Use the YOLOv5 detection model to perform real-time detection on the input image, obtain the coordinate information of all image bounding boxes in the image, and extract the initial reference point set based on the bottom midpoint of the image detection box;

[0055] S2: Detect and remove outliers from the initial reference point set. Based on the RANSAC (Random Sample Consensus) algorithm, distinguish between inliers and outliers for different detection situations, identify and remove outliers that deviate from the normal distribution, and obtain the reference point set.

[0056] S3: After removing outliers, the least squares fitting algorithm is used to fit the distribution characteristics of the left and right lines. Based on the fitted geometric relationship of the left and right lines, the final navigation line is extracted again through the least squares fitting calculation;

[0057] S4: Refer to the final navigation line in step S3 to obtain the target scene, divide the target scene into regions, and calculate the minimum depth value of each region. Compare the minimum depth values of each region to determine the approximate minimum depth of the pedestrian;

[0058] S5: Using the minimum depth obtained in S4, a depth range model is constructed to obtain the depth range of the pedestrian, the depth image is segmented, the depth mean within the depth range of the pedestrian is calculated, and the distance information of the pedestrian is obtained based on the depth mean.

[0059] Preferably, the step S1 extracts the reference bounding box coordinate information, specifically ( , , , ).in,( , ) is the center point coordinate of the image detection frame, , is the height of the detection box.

[0060] Based on the geometric features of the image root point, the bottom midpoint of the detection bounding box is defined as the initial reference point for line fitting ( , ), the calculation formula is:

[0061] ,

[0062] The image to be tested is input into the trained object detection model. The detection bounding box set is output through feature extraction. The initial reference points are then obtained according to the above formula. The outliers are removed through the RANSAC algorithm to obtain the optimized reference point set. For different scenes, the obtained initial reference points are basically consistent with the actual image root points. However, due to the influence of complex factors such as the environment and viewing angle, the obtained initial reference points cannot be used as reference points for line fitting. The specific problem can be described as:

[0063] Within the image field of view, there are too few image detection frames that can be detected on one side, resulting in large deviations when performing straight line fitting. Therefore, it is necessary to retain the initial reference point as much as possible.

[0064] The reference points obtained in the adjacent images are actually interference points, which will affect the subsequent line fitting. Therefore, the interference points need to be removed.

[0065] Preferably, step S2 addresses the problem in step S1 by distinguishing inliers and outliers based on the RANSAC (Random Sample Consensus) algorithm for different detection situations, eliminating outliers, and obtaining a reference point set.

[0066] S2-1: Based on the initial reference point set obtained in step S1, Arrange the reference point sets in ascending order of pixel coordinates; calculate the number of reference point sets ;if <4, perform outlier detection based on the threshold method, traverse the reference point set to calculate the current point and the reference point , Difference, if ,and , then the point is considered an outlier; if >4, the RANSAC algorithm is used to remove outliers and obtain the final optimized reference point set; Indicates the pixel coordinate difference between the current reference point and the previous reference point on the x-axis. Indicates a preset judgment Is the threshold abnormal? Indicates the pixel coordinate difference between the current reference point and the previous reference point on the y-axis. Indicates a preset judgment The threshold for abnormality.

[0067] S2-2: RANSAC is a robust model fitting method that uses iterative operations to screen valid inliers from noisy data and calculate the optimal model parameters.

[0068] The calculation steps for RANSAC to obtain internal points are as follows:

[0069] Set parameters for the initialization dataset: predefined maximum number of iterations and error tolerance threshold , initialize the optimal model parameters. The value of the point is calculated according to the formula, is the expected probability of success, is the ratio of inliers in the dataset (the higher the noise in the data, the smaller the value, and in the experiment it is 0.4-0.6), The minimum number of samples required to fit the model (for example, a minimum of two points is required to fit a straight line). The value of is related to the noise characteristics of the data (usually 1-3 in image feature matching) and needs to be adjusted according to the actual distribution.

[0070] ,

[0071] Randomly select inliers: Randomly select some points from the data points as the initial inliers (inliers are data points after removing outliers).

[0072] Perform fitting calculation: Fit the model based on the selected points, calculate the fitting error of all data points to the model, and set the error to be less than the threshold The point is marked as the current interior point.

[0073] Update the best model: If the current number of inliers meets the requirements and the fitting error is smaller than the current best error, update the best model and the best error threshold.

[0074] Repeat iteration: Repeat the above steps until the maximum number of iterations is reached Ends when.

[0075] Final inlier point set: The final inlier point set is the optimized reference point set.

[0076] As a preference, the basic idea of step S3 is to use the least squares fitting algorithm to fit the distribution characteristics of the line to extract the final navigation line. For the line model on the two-dimensional plane, it is expressed by the following formula:

[0077] ,

[0078] in, is the slope of the straight line, is the intercept of the straight line, 、 Indicates the horizontal and vertical coordinates of the fitted line in the reference system, for a given reference point , the least squares problem is described as minimizing the residual sum of squares (RSS):

[0079] ,

[0080] in, is the number of data points. By taking the derivative of RSS and setting the derivative to 0, the optimal straight line fitting parameters are calculated. and Estimated value of:

[0081] ,

[0082] According to the above formula, the slope of the fitting line can be obtained and , the final fitted straight line model is .

[0083] Least squares fitting is performed based on the reference point set processed by RANSAC to obtain the left and right lines respectively. Figure 2 As shown, 10 points are taken symmetrically and evenly on the left and right lines, and are recorded as 、 ,in , calculate the midpoint based on the selected points , the calculation formula is as follows:

[0084] ,

[0085] Finally, the least squares fitting is performed on the intermediate point set to extract the navigation line.

[0086] Preferably, step S4 is based on a pedestrian ranging algorithm using four-partition depth comparison. While moving along the navigation line extracted in S3, the binocular vision ranging principle is used to simultaneously observe a scene with two cameras. Based on the human eye model, the binocular camera uses the baseline distance between the two cameras (i.e., the distance between the two cameras) and the parallax between the images captured by the two cameras (i.e., the difference between the images captured by the two cameras) to calculate the depth information of the object through triangulation to achieve ranging. During detection, the detection bounding box is divided into 2×2, i.e., 4 partitions. The minimum depth is calculated for each partition and compared:

[0087] S4-1: First, pedestrian detection is performed on the camera image through the YOLOv5 convolutional neural network. The coordinate information of the extracted pedestrian detection frame is ( ), according to the size of the image ( )Recover pixel coordinates, ( ), respectively represent the pixel coordinates of the center point of the detection bounding box ( ), and check the width of the bounding box and height ;

[0088] S4-2: Then, the depth map is obtained based on binocular vision using the left and right images. The detection frame is divided into four partitions: upper, lower, left, and right. Depth statistics are performed on each partition. For each partition, the average depth from the upper center point to the center point of the region, from the bottom center point to the midpoint of the region, from the left center point to the center point of the region, and from the right center point to the center point of the region are respectively Represent four areas respectively;

[0089] S4-3: Average depth extracted from the left and right sides of the center point Compare the two and take the smaller one , sort all the depth values on the smaller side, and do the same for the top and bottom depth values. and sort;

[0090] S4-4: Finally, yes and For comparison, select the 5 minimum depth values on the smaller side and take the average as the approximate minimum depth of the area. ; Finally, sort the approximate minimum depths of the four regions , select the minimum depth as the depth of the pedestrian .

[0091] As an example, the step S5 is based on the pedestrian depth obtained in step S4. Define the depth range as [Dperson - 0.2,Dperson+0.2] Then we get the distance of the pedestrian , the calculation formula is as follows, including:

[0092] ,

[0093] ,

[0094] ,

[0095] distance=[Dperson - 0.2,Dperson+0.2] ,

[0096] Figure 2 The extraction of navigation lines in different orchard scenes, the red line represents the tree line on the left, the green line represents the tree line on the right, the white line represents the navigation line, and the blue point represents the line fitting reference point. The navigation line extraction experiment for pictures in different orchard scenes is shown in the figure. Figure 2The results show that the detection results of tree trunks in different orchard scenes are relatively accurate. After removing outliers and fitting the line, the extracted navigation line is consistent with the actual scene. The experimental results show the effectiveness and accuracy of the proposed algorithm.

[0097] In order to analyze the error between the navigation lines extracted by the algorithm of the present invention and the manually marked navigation lines, the present invention randomly selects 100 pictures in two different scenes as test sets, analyzes them according to the indicators in the previous section, and obtains the statistical results of the angle deviation, as shown in the following figure: Figure 3 As shown, the average angle deviation and angle standard deviation are calculated. The test set pictures are analyzed to obtain the statistical results of the angle deviation. Figure 3 It can be seen that the maximum angle deviation of scene 1 is 7.5°, the maximum angle deviation of scene 2 is 18°, and most angle deviations are less than 6°. The corresponding results show that the algorithm of the present invention can meet the accuracy requirements of internal navigation.

[0098] The ZED2i binocular camera is used to conduct a data measurement experiment. The camera is fixed on a movable device. In a simulated environment, the movable device moves at a constant speed. The pedestrian is in front of the camera's field of view and remains motionless at a fixed position. Figure 4 , 5, 6, the results of the algorithm proposed in this invention are visualized at 1m, 3m, and 8m. The three images in each row represent the ranging results under three different pedestrian postures, where the ranging unit is meter (m).

[0099] Experimental results show that within the optimal range of the binocular camera, at a distance of 1m, the algorithm measured distances of 1.0m, 1.1m, and 1.2m for pedestrians in three different postures; at a distance of 3m, the distances were 2.7m, 2.9m, and 2.8m, respectively, with a maximum error of approximately 5cm and an average error of 1.5cm, demonstrating the high precision of the algorithm and verifying its accuracy. Beyond the optimal range of the camera, at a distance of 8m, the algorithm measured distances of 8.1m, 8.0m, and 8.2m in different postures, with a maximum error of approximately 8cm. This relatively large error is primarily due to the decreasing number of effective depth points at longer distances, resulting in inaccurate ranging. However, in real-world scenarios, the effective distance for obstacle detection is generally between 1m and 6m. Therefore, the method of the present invention also meets the requirements for obstacle ranging.

[0100] As shown in Table 1, in scene 1, the average angle deviation of the extracted navigation line is 1.5°, and the standard deviation of the angle deviation is 1.4°, which is a small error. For scene 2, the average angle deviation is 2.9°, and the standard deviation of the angle deviation is 2.7°. The error is doubled relative to scene 1. The reason is that the perspective of the pictures collected in scene 2 is variable, which makes the algorithm unstable. However, the error also meets the accuracy requirements of navigation line extraction, that is, the method of the present invention can adapt to the navigation line extraction of both scenes.

[0101] Table 1 Analysis of navigation line extraction error indicators in different environments

[0102] Scenario Number of images Average angle deviation / (°) Angle deviation standard deviation / (°) Orchard Scene 1 100 1.5 1.4 Wasteland Scene 2 100 2.9 2.7

Claims

1. A method for sensing navigation lines and measuring obstacles in an unmanned system in a weak texture scene, characterized in that: The method comprises the following steps: S1: Use the YOLOv5 detection model to perform real-time detection on the input image, obtain the coordinate information of all reference bounding boxes in the image, and extract the initial reference point set based on the bottom midpoint of the reference detection box; S2: Detect and remove outliers on the initial reference point set obtained in step S1: Based on the RANSAC algorithm, distinguish between inliers and outliers for different detection situations, identify and remove outliers that deviate from the normal distribution in the point set, and obtain a reference point set; S3: Using the least squares fitting algorithm, the reference point set obtained in step S2 is subjected to least squares fitting to obtain the left and right lines respectively. Based on the geometric relationship between the fitted left and right lines, the final navigation line is extracted again through least squares fitting calculation; S4: refer to the final navigation line in step S3 to obtain the target scene, divide the target scene into regions, calculate the minimum depth value of each region, compare the minimum depth values of each region, and determine the approximate minimum depth of the pedestrian; S5: Using the minimum depth obtained in S4, a depth range model is constructed to obtain the depth range of the pedestrian, the depth image is segmented, the depth mean within the depth range of the pedestrian is calculated, and the distance information of the pedestrian is obtained based on the depth mean; Step S4 is a pedestrian ranging algorithm based on four-partition depth comparison. It uses the principle of binocular vision ranging to simultaneously observe a scene with two cameras. The depth information of the object is calculated by comparing the difference between the images taken by the two cameras. The depth of the object is then calculated by triangulation to achieve ranging. During detection, the detection bounding box is divided into 2*2, i.e., 4 partitions. The minimum depth is calculated for each area and compared. The specific method is as follows: S4-1: First, the camera image is detected through the YOLOv5 convolutional neural network, and the coordinate information of the pedestrian detection frame is obtained as (x r ,y r ,w r ,h r ), restore pixel coordinates according to the image size (pW, pH), (X=x r *pW,Y=y r *pH,W=w r *pW,H=h r *pH), which represent the pixel coordinates (X, Y) of the center point of the detection bounding box, and the width W and height H of the detection bounding box respectively; S4-2: Then, the depth map is obtained based on binocular vision through the left and right images. The detection frame is divided into four partitions: upper, lower, left, and right. Depth statistics are performed on each partition. For each partition, the average depth from the top center point to the center point of the region, from the bottom center point to the midpoint of the region, from the left center point to the center point of the region, and from the right center point to the center point of the region are D respectively. t i ,D b i ,D l i ,D r i ,i=(1,2,3,4) represents four regions respectively; S4-3: Depth mean D extracted from the left and right sides of the center point t i ,D b i Compare the two and take the smaller value D tb i , sort all the depth values on the smaller side, that is, sortd operation, and perform the same processing on the top and bottom depth values to get D lr i and sort; S4-4: Finally, to v tb i With D lr i Compare and select the 5 minimum depth values on the smaller side and take the average as the minimum depth D of the area. i ; Finally, sort the minimum depths of the four areas to get D 1 ,D 2 ,D 3 ,D 4 , the smallest depth is selected as the approximate minimum depth Dperson of the pedestrian.

2. The method for sensing navigation lines and measuring obstacles for unmanned systems in weak texture scenes according to claim 1, characterized in that: The step S1 obtains all the reference bounding box coordinate information in the image by extracting the reference bounding box coordinate information (cx, cy, w, h) through the geometric analysis of the target detection framework, where (cx, cy) is the center point coordinate of the reference detection frame, and w and h are the width and height of the reference detection frame respectively. The specific method is as follows: S1-1: Based on the geometric features of the root point of the input image, define the bottom midpoint of the detection bounding box as the line fitting reference point (x, y). The calculation formula is: S1-2: Input the image to be tested into the YOLOv5 detection model, output the image detection bounding box set through feature extraction, extract the bottom midpoint coordinates of each detection box, obtain the initial reference point, and obtain the initial reference point set.

3. The method for sensing navigation lines and measuring obstacles for unmanned systems in weak texture scenes according to claim 2, characterized in that: The specific method of step S2 is as follows: S2-1: Based on the initial reference point set obtained in step S1, the reference point set is arranged in ascending order according to the y pixel coordinate; the number N of the reference point set is calculated; if N<4, outlier detection is performed according to the threshold method, and the x and y differences between the current point and the reference point are traversed through the reference point set. If dx>thresh1 and dy>thresh2, the point is considered an outlier; if N>4, the outliers are removed by the RANSAC algorithm to obtain the final optimized reference point set; where dx represents the pixel coordinate difference between the current reference point and the previous reference point on the x-axis, thresh1 represents the preset threshold for judging whether dx is abnormal, dy represents the pixel coordinate difference between the current reference point and the previous reference point on the y-axis, and thresh2 represents the preset threshold for judging whether dy is abnormal; S2-2: The calculation steps for RANSAC to obtain internal points are as follows: Set parameters for the initial data point set: predefine the maximum number of iterations K and the error tolerance threshold t, and initialize the optimal model parameters; Randomly select initial inliers: randomly select some data points from the initial data point set as initial inliers; Fitting calculation: Generate a hypothetical model based on the selected initial inliers, calculate the fitting error between all data points in the initial data point set and the current hypothetical model, and record the point with an error less than the threshold t as the current inlier; Update the best model: If the current number of inliers exceeds the historical best record and the model error is lower, update the optimal model parameters, optimal error threshold and inlier set; Repeated iteration: Repeat the above steps and terminate the calculation when the preset number of iterations K is reached; Final inlier point set: The final inlier point set is the optimized reference point set.

4. The method for sensing navigation lines and measuring obstacles for unmanned systems in weak texture scenes according to claim 3, characterized in that: The specific method of step S3 is as follows: S3-1: For the left and right line models on a two-dimensional plane, the following formula is used to express them: y1=kx1+b Among them, k is the slope of the line, b is the intercept of the line, x1 and y1 are the horizontal and vertical coordinates of the fitted line in the reference system. For a given data point (x i ,y i ), the least squares problem is described as minimizing the residual sum of squares RSS: Where n is the number of data points. By taking the derivative of RSS and setting the derivative to 0, we can calculate the best estimates of the line fitting parameters k and b: According to the above formula, we can get the slope k and b of the fitting line, and the final fitting line model is y1=kx1+b; S3-2: Perform least squares fitting based on the reference point set after RANSAC processing. After obtaining the left and right lines respectively, 10 points are taken symmetrically and evenly spaced on the obtained left and right lines respectively, and recorded as (x l ,y l ),l=(1,…10), (x r ,y r ),r=(1,…10), where y l =y r , calculate the middle point (x c ,y c ), c=(1,…10), the calculation formula is as follows: Finally, the least squares fitting is performed on the middle point set to extract the navigation line.

5. The method for sensing navigation lines and measuring obstacles for unmanned systems in weak texture scenes according to claim 1, characterized in that: The specific method of step S5 is to define the depth range as [Dperson-0.2, Dperson+0.2] based on the approximate minimum depth of the pedestrian Dperson obtained in S4, and obtain the distance of the pedestrian. The calculation formula is as follows: distance=[Dperson-0.2,Dperson+0.2].

Citation Information

Patent Citations

  • Method for image feature deep learning and perceptibility quantification through computer

    CN107392252A

  • Field seedling zone navigation line detection method based on laser radar point cloud

    CN113376614A